You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2010/08/23 20:08:42 UTC
svn commit: r988237 [9/24] - in /incubator/lcf/trunk:
modules/connectors/activedirectory/connector/org/apache/acf/authorities/authorities/activedirectory/
modules/connectors/documentum/connector/org/apache/acf/crawler/authorities/DCTM/
modules/connecto...
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/WebcrawlerConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/WebcrawlerConnector.java Mon Aug 23 18:08:32 2010
@@ -22,7 +22,7 @@ import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import org.xml.sax.Attributes;
@@ -219,13 +219,13 @@ public class WebcrawlerConnector extends
*@param threadContext is the current thread context.
*/
public void install(IThreadContext threadContext)
- throws LCFException
+ throws ACFException
{
// Install
IDBInterface mainDatabase = DBInterfaceFactory.make(threadContext,
- LCF.getMasterDatabaseName(),
- LCF.getMasterDatabaseUsername(),
- LCF.getMasterDatabasePassword());
+ ACF.getMasterDatabaseName(),
+ ACF.getMasterDatabaseUsername(),
+ ACF.getMasterDatabasePassword());
RobotsManager rm = new RobotsManager(threadContext,mainDatabase);
DNSManager dns = new DNSManager(threadContext,mainDatabase);
@@ -237,7 +237,7 @@ public class WebcrawlerConnector extends
dns.install();
cm.install();
}
- catch (LCFException e)
+ catch (ACFException e)
{
mainDatabase.signalRollback();
throw e;
@@ -260,13 +260,13 @@ public class WebcrawlerConnector extends
*@param threadContext is the current thread context.
*/
public void deinstall(IThreadContext threadContext)
- throws LCFException
+ throws ACFException
{
// Uninstall
IDBInterface mainDatabase = DBInterfaceFactory.make(threadContext,
- LCF.getMasterDatabaseName(),
- LCF.getMasterDatabaseUsername(),
- LCF.getMasterDatabasePassword());
+ ACF.getMasterDatabaseName(),
+ ACF.getMasterDatabaseUsername(),
+ ACF.getMasterDatabasePassword());
RobotsManager rm = new RobotsManager(threadContext,mainDatabase);
DNSManager dns = new DNSManager(threadContext,mainDatabase);
@@ -278,7 +278,7 @@ public class WebcrawlerConnector extends
rm.deinstall();
dns.deinstall();
}
- catch (LCFException e)
+ catch (ACFException e)
{
mainDatabase.signalRollback();
throw e;
@@ -324,15 +324,15 @@ public class WebcrawlerConnector extends
/** Start a session */
protected void getSession()
- throws LCFException
+ throws ACFException
{
// Handle the stuff that requires a thread context
if (robotsManager == null || dnsManager == null || cookieManager == null)
{
IDBInterface databaseHandle = DBInterfaceFactory.make(currentContext,
- LCF.getMasterDatabaseName(),
- LCF.getMasterDatabaseUsername(),
- LCF.getMasterDatabasePassword());
+ ACF.getMasterDatabaseName(),
+ ACF.getMasterDatabaseUsername(),
+ ACF.getMasterDatabasePassword());
robotsManager = new RobotsManager(currentContext,databaseHandle);
dnsManager = new DNSManager(currentContext,databaseHandle);
@@ -346,8 +346,8 @@ public class WebcrawlerConnector extends
String emailAddress = params.getParameter(WebcrawlerConfig.PARAMETER_EMAIL);
if (emailAddress == null)
- throw new LCFException("Missing email address");
- userAgent = "ApacheLCFWebCrawler; "+emailAddress+")";
+ throw new ACFException("Missing email address");
+ userAgent = "ApacheACFWebCrawler; "+emailAddress+")";
from = emailAddress;
x = params.getParameter(WebcrawlerConfig.PARAMETER_ROBOTSUSAGE);
@@ -374,7 +374,7 @@ public class WebcrawlerConnector extends
* in active use.
*/
public void poll()
- throws LCFException
+ throws ACFException
{
ThrottledFetcher.flushIdleConnections();
}
@@ -382,7 +382,7 @@ public class WebcrawlerConnector extends
/** Check status of connection.
*/
public String check()
- throws LCFException
+ throws ACFException
{
getSession();
return super.check();
@@ -391,7 +391,7 @@ public class WebcrawlerConnector extends
/** Close the connection. Call this before discarding the repository connector.
*/
public void disconnect()
- throws LCFException
+ throws ACFException
{
throttleDescription = null;
credentialsDescription = null;
@@ -453,7 +453,7 @@ public class WebcrawlerConnector extends
*/
public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
long startTime, long endTime)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
getSession();
@@ -521,7 +521,7 @@ public class WebcrawlerConnector extends
*/
public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
getSession();
@@ -723,7 +723,7 @@ public class WebcrawlerConnector extends
activityResultCode = null;
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
connection.noteInterrupted(e);
throw e;
@@ -1072,7 +1072,7 @@ public class WebcrawlerConnector extends
rval[i] = null;
break;
default:
- throw new LCFException("Unexpected value for result signal: "+Integer.toString(resultSignal));
+ throw new ACFException("Unexpected value for result signal: "+Integer.toString(resultSignal));
}
}
finally
@@ -1109,7 +1109,7 @@ public class WebcrawlerConnector extends
* should only find other references, and should not actually call the ingestion methods.
*/
public void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
getSession();
@@ -1225,20 +1225,20 @@ public class WebcrawlerConnector extends
}
catch (java.net.SocketException e)
{
- throw new LCFException("Socket timeout error closing stream: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout error closing stream: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new LCFException("Socket connect timeout error closing stream: "+e.getMessage(),e);
+ throw new ACFException("Socket connect timeout error closing stream: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new LCFException("IO error closing stream: "+e.getMessage(),e);
+ throw new ACFException("IO error closing stream: "+e.getMessage(),e);
}
}
}
@@ -1268,7 +1268,7 @@ public class WebcrawlerConnector extends
*@param versions is the corresponding set of version identifiers (individual identifiers may be null).
*/
public void releaseDocumentVersions(String[] documentIdentifiers, String[] versions)
- throws LCFException
+ throws ACFException
{
int i = 0;
while (i < documentIdentifiers.length)
@@ -1309,7 +1309,7 @@ public class WebcrawlerConnector extends
*@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector.
*/
public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
- throws LCFException, IOException
+ throws ACFException, IOException
{
tabsArray.add("Email");
tabsArray.add("Robots");
@@ -1640,7 +1640,7 @@ public class WebcrawlerConnector extends
*@param tabName is the current tab name.
*/
public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
String email = parameters.getParameter(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.PARAMETER_EMAIL);
if (email == null)
@@ -1908,7 +1908,7 @@ public class WebcrawlerConnector extends
if (domain == null)
domain = "";
String userName = cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME);
- String password = org.apache.acf.crawler.system.LCF.deobfuscate(cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
+ String password = org.apache.acf.crawler.system.ACF.deobfuscate(cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
// It's prefix will be...
String prefix = "acredential_" + Integer.toString(accessCounter);
@@ -2102,7 +2102,7 @@ public class WebcrawlerConnector extends
" <nobr><input type=\"text\" size=\"15\" name=\""+authParamPrefix+"_value"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(value)+"\"/></nobr>\n"+
" </td>\n"+
" <td class=\"formcolumncell\">\n"+
-" <nobr><input type=\"password\" size=\"15\" name=\""+authParamPrefix+"_password"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(org.apache.acf.crawler.system.LCF.deobfuscate(password))+"\"/></nobr>\n"+
+" <nobr><input type=\"password\" size=\"15\" name=\""+authParamPrefix+"_password"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(org.apache.acf.crawler.system.ACF.deobfuscate(password))+"\"/></nobr>\n"+
" </td>\n"+
" </tr>\n"
);
@@ -2229,7 +2229,7 @@ public class WebcrawlerConnector extends
if (domain == null)
domain = "";
String userName = cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME);
- String password = org.apache.acf.crawler.system.LCF.deobfuscate(cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
+ String password = org.apache.acf.crawler.system.ACF.deobfuscate(cn.getAttributeValue(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
// It's prefix will be...
String prefix = "acredential_" + Integer.toString(accessCounter);
@@ -2307,7 +2307,7 @@ public class WebcrawlerConnector extends
out.print(
"<input type=\"hidden\" name=\""+authParamPrefix+"_param"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(param)+"\"/>\n"+
"<input type=\"hidden\" name=\""+authParamPrefix+"_value"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(value)+"\"/>\n"+
-"<input type=\"hidden\" name=\""+authParamPrefix+"_password"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(org.apache.acf.crawler.system.LCF.deobfuscate(password))+"\"/>\n"
+"<input type=\"hidden\" name=\""+authParamPrefix+"_password"+"\" value=\""+org.apache.acf.ui.util.Encoder.attributeEscape(org.apache.acf.crawler.system.ACF.deobfuscate(password))+"\"/>\n"
);
paramCounter++;
}
@@ -2506,7 +2506,7 @@ public class WebcrawlerConnector extends
*@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
*/
public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
- throws LCFException
+ throws ACFException
{
String email = variableContext.getParameter("email");
if (email != null)
@@ -2638,7 +2638,7 @@ public class WebcrawlerConnector extends
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_DOMAIN,domain);
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME,userName);
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,
- org.apache.acf.crawler.system.LCF.obfuscate(password));
+ org.apache.acf.crawler.system.ACF.obfuscate(password));
parameters.addChild(parameters.getChildCount(),node);
}
i++;
@@ -2657,7 +2657,7 @@ public class WebcrawlerConnector extends
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_DOMAIN,domain);
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME,userName);
node.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,
- org.apache.acf.crawler.system.LCF.obfuscate(password));
+ org.apache.acf.crawler.system.ACF.obfuscate(password));
parameters.addChild(parameters.getChildCount(),node);
}
}
@@ -2726,7 +2726,7 @@ public class WebcrawlerConnector extends
if (value != null && value.length() > 0)
paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_VALUE,value);
if (password != null && password.length() > 0)
- paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.acf.crawler.system.LCF.obfuscate(password));
+ paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.acf.crawler.system.ACF.obfuscate(password));
authPageNode.addChild(authPageNode.getChildCount(),paramNode);
}
z++;
@@ -2744,7 +2744,7 @@ public class WebcrawlerConnector extends
if (value != null && value.length() > 0)
paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_VALUE,value);
if (password != null && password.length() > 0)
- paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.acf.crawler.system.LCF.obfuscate(password));
+ paramNode.setAttribute(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.acf.crawler.system.ACF.obfuscate(password));
authPageNode.addChild(authPageNode.getChildCount(),paramNode);
}
}
@@ -2881,7 +2881,7 @@ public class WebcrawlerConnector extends
*@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
*/
public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
- throws LCFException, IOException
+ throws ACFException, IOException
{
String email = parameters.getParameter(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.PARAMETER_EMAIL);
String robots = parameters.getParameter(org.apache.acf.crawler.connectors.webcrawler.WebcrawlerConfig.PARAMETER_ROBOTSUSAGE);
@@ -3215,7 +3215,7 @@ public class WebcrawlerConnector extends
*@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector.
*/
public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, ArrayList tabsArray)
- throws LCFException, IOException
+ throws ACFException, IOException
{
tabsArray.add("Seeds");
tabsArray.add("Canonicalization");
@@ -3328,7 +3328,7 @@ public class WebcrawlerConnector extends
*@param tabName is the current tab name.
*/
public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i;
int k;
@@ -3778,7 +3778,7 @@ public class WebcrawlerConnector extends
*@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
*/
public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
- throws LCFException
+ throws ACFException
{
// Get the seeds
String seeds = variableContext.getParameter("seeds");
@@ -4030,7 +4030,7 @@ public class WebcrawlerConnector extends
*@param ds is the current document specification for this job.
*/
public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int j;
boolean seenAny;
@@ -4100,7 +4100,7 @@ public class WebcrawlerConnector extends
}
catch (java.io.IOException e)
{
- throw new LCFException("IO error: "+e.getMessage(),e);
+ throw new ACFException("IO error: "+e.getMessage(),e);
}
out.print(
" </td>\n"+
@@ -4218,7 +4218,7 @@ public class WebcrawlerConnector extends
}
catch (java.io.IOException e)
{
- throw new LCFException("IO error: "+e.getMessage(),e);
+ throw new ACFException("IO error: "+e.getMessage(),e);
}
out.print(
" </td>\n"+
@@ -4260,7 +4260,7 @@ public class WebcrawlerConnector extends
}
catch (java.io.IOException e)
{
- throw new LCFException("IO error: "+e.getMessage(),e);
+ throw new ACFException("IO error: "+e.getMessage(),e);
}
out.print(
" </td>\n"+
@@ -4372,7 +4372,7 @@ public class WebcrawlerConnector extends
*@return appropriate status.
*/
protected int lookupIPAddress(String documentIdentifier, IVersionActivity activities, String hostName, long currentTime, StringBuffer ipAddressBuffer)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
String eventName = makeDNSEventName(activities,hostName);
DNSManager.DNSInfo info = dnsManager.lookup(hostName,currentTime);
@@ -4450,7 +4450,7 @@ public class WebcrawlerConnector extends
*/
protected int checkFetchAllowed(String documentIdentifier, String protocol, String hostIPAddress, int port, PageCredentials credential,
IKeystoreManager trustStore, String hostName, String[] binNames, long currentTime, String pathString, IVersionActivity versionActivities, int connectionLimit)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// hostNameAndPort is the key for looking up the robots file in the database
String hostNameAndPort = makeRobotsKey(protocol,hostName,port);
@@ -4546,7 +4546,7 @@ public class WebcrawlerConnector extends
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e2.getMessage(),e2,ACFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -4574,7 +4574,7 @@ public class WebcrawlerConnector extends
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e2.getMessage(),e2,ACFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -4584,7 +4584,7 @@ public class WebcrawlerConnector extends
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -4607,7 +4607,7 @@ public class WebcrawlerConnector extends
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e2.getMessage(),e2,ACFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -4654,7 +4654,7 @@ public class WebcrawlerConnector extends
*@return the canonical URL (the document identifier), or null if the url was illegal.
*/
protected String makeDocumentIdentifier(String parentIdentifier, String rawURL, DocumentURLFilter filter)
- throws LCFException
+ throws ACFException
{
try
{
@@ -4734,7 +4734,7 @@ public class WebcrawlerConnector extends
/** Code to canonicalize a URL. If URL cannot be canonicalized (and is illegal) return null.
*/
protected String doCanonicalization(DocumentURLFilter filter, java.net.URI url)
- throws LCFException, java.net.URISyntaxException
+ throws ACFException, java.net.URISyntaxException
{
// First, we have to figure out what the canonicalization policy is.
// To do that, we need to do a regexp match against the COMPLETE raw url.
@@ -4949,7 +4949,7 @@ public class WebcrawlerConnector extends
/** Code to check if data is interesting, based on response code and content type.
*/
protected boolean isContentInteresting(IFingerprintActivity activities, String documentIdentifier, int response, String contentType)
- throws ServiceInterruption, LCFException
+ throws ServiceInterruption, ACFException
{
// Additional filtering only done if it's a 200 response
if (response != 200)
@@ -4979,7 +4979,7 @@ public class WebcrawlerConnector extends
/** Code to check if an already-fetched document should be ingested.
*/
protected boolean isDataIngestable(IFingerprintActivity activities, String documentIdentifier)
- throws ServiceInterruption, LCFException
+ throws ServiceInterruption, ACFException
{
if (cache.getResponseCode(documentIdentifier) != 200)
return false;
@@ -5010,7 +5010,7 @@ public class WebcrawlerConnector extends
/** Find a redirection URI, if it exists */
protected String findRedirectionURI(String currentURI)
- throws LCFException
+ throws ACFException
{
FindRedirectionHandler handler = new FindRedirectionHandler(currentURI);
handleRedirects(currentURI,handler);
@@ -5019,7 +5019,7 @@ public class WebcrawlerConnector extends
/** Find matching HTML form data, if present. Return null if not. */
protected FormData findHTMLForm(String currentURI, LoginParameters lp)
- throws LCFException
+ throws ACFException
{
if (lp == null || lp.getFormNamePattern() == null)
return null;
@@ -5037,7 +5037,7 @@ public class WebcrawlerConnector extends
/** Find a preferred redirection URI, if it exists */
protected String findPreferredRedirectionURI(String currentURI, LoginParameters lp)
- throws LCFException
+ throws ACFException
{
if (lp == null || lp.getPreferredRedirectionPattern() == null)
return null;
@@ -5049,7 +5049,7 @@ public class WebcrawlerConnector extends
/** Find HTML link URI, if present, making sure specified preference is matched. */
protected String findHTMLLinkURI(String currentURI, LoginParameters lp)
- throws LCFException
+ throws ACFException
{
if (lp == null || lp.getPreferredLinkPattern() == null)
return null;
@@ -5082,7 +5082,7 @@ public class WebcrawlerConnector extends
/** Override noteDiscoveredLink */
public void noteDiscoveredLink(String rawURL)
- throws LCFException
+ throws ACFException
{
if (targetURI == null)
{
@@ -5137,7 +5137,7 @@ public class WebcrawlerConnector extends
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws LCFException
+ throws ACFException
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Saw form with name "+((formAttributes.get("name")==null)?"null":"'"+formAttributes.get("name")+"'"));
@@ -5183,7 +5183,7 @@ public class WebcrawlerConnector extends
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws LCFException
+ throws ACFException
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Saw form element of type '"+inputAttributes.get("type")+"' name '"+inputAttributes.get("name")+"'");
@@ -5193,7 +5193,7 @@ public class WebcrawlerConnector extends
/** Note the end of a form */
public void noteFormEnd()
- throws LCFException
+ throws ACFException
{
if (currentFormData != null)
{
@@ -5204,25 +5204,25 @@ public class WebcrawlerConnector extends
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws LCFException
+ throws ACFException
{
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws LCFException
+ throws ACFException
{
}
@@ -5519,25 +5519,25 @@ public class WebcrawlerConnector extends
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws LCFException
+ throws ACFException
{
}
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws LCFException
+ throws ACFException
{
}
/** Note the end of a form */
public void noteFormEnd()
- throws LCFException
+ throws ACFException
{
}
/** Override noteDiscoveredLink */
public void noteDiscoveredLink(String rawURL)
- throws LCFException
+ throws ACFException
{
if (targetURI == null)
{
@@ -5567,27 +5567,27 @@ public class WebcrawlerConnector extends
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws LCFException
+ throws ACFException
{
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
@@ -5609,7 +5609,7 @@ public class WebcrawlerConnector extends
*@param rawURL is the raw discovered url. This may be relative, malformed, or otherwise unsuitable for use until final form is acheived.
*/
public void noteDiscoveredLink(String rawURL)
- throws LCFException
+ throws ACFException
{
// Build a complete url, but don't filter or anything
try
@@ -5680,7 +5680,7 @@ public class WebcrawlerConnector extends
/** Code to extract links from an already-fetched document. */
protected void extractLinks(String documentIdentifier, IProcessActivity activities, DocumentURLFilter filter)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
handleRedirects(documentIdentifier,new ProcessActivityRedirectionHandler(documentIdentifier,activities,filter));
// For html, we don't want any actions, because we don't do form submission.
@@ -5713,7 +5713,7 @@ public class WebcrawlerConnector extends
*@param rawURL is the raw discovered url. This may be relative, malformed, or otherwise unsuitable for use until final form is acheived.
*/
public void noteDiscoveredLink(String rawURL)
- throws LCFException
+ throws ACFException
{
String newIdentifier = makeDocumentIdentifier(documentIdentifier,rawURL,filter);
if (newIdentifier != null)
@@ -5752,46 +5752,46 @@ public class WebcrawlerConnector extends
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws LCFException
+ throws ACFException
{
}
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws LCFException
+ throws ACFException
{
}
/** Note the end of a form */
public void noteFormEnd()
- throws LCFException
+ throws ACFException
{
}
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws LCFException
+ throws ACFException
{
noteDiscoveredLink(rawURL);
}
@@ -5811,7 +5811,7 @@ public class WebcrawlerConnector extends
*@param rawTtlValue is the raw discovered ttl value. Null indicates we should set the default.
*/
public void noteDiscoveredTtlValue(String rawTtlValue)
- throws LCFException
+ throws ACFException
{
long currentTime = System.currentTimeMillis();
Long rescanTime = null;
@@ -5842,7 +5842,7 @@ public class WebcrawlerConnector extends
/** Handle extracting the redirect link from a redirect response. */
protected void handleRedirects(String documentURI, IRedirectionHandler handler)
- throws LCFException
+ throws ACFException
{
int responseCode = cache.getResponseCode(documentURI);
if (responseCode == 302 || responseCode == 301)
@@ -5864,7 +5864,7 @@ public class WebcrawlerConnector extends
/** Handle document references from XML. Right now we only understand RSS. */
protected void handleXML(String documentURI, IXMLHandler handler)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
try
{
@@ -5941,7 +5941,7 @@ public class WebcrawlerConnector extends
x.cleanup();
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
// Ignore XML parsing errors. These should probably have their own error code, but that requires a core change.
if (e.getMessage().indexOf("pars") >= 0)
@@ -5959,21 +5959,21 @@ public class WebcrawlerConnector extends
}
catch (java.net.SocketTimeoutException e)
{
- throw new LCFException("Socket timeout exception: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout exception: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new LCFException("Socket connect timeout exception: "+e.getMessage(),e);
+ throw new ACFException("Socket connect timeout exception: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new LCFException("IO error: "+e.getMessage(),e);
+ throw new ACFException("IO error: "+e.getMessage(),e);
}
}
@@ -6006,7 +6006,7 @@ public class WebcrawlerConnector extends
/** Handle the tag beginning to set the correct second-level parsing context */
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (qName.equals("rss"))
{
@@ -6035,7 +6035,7 @@ public class WebcrawlerConnector extends
/** Handle the tag ending */
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext context = theStream.getContext();
String tagName = context.getQname();
@@ -6068,7 +6068,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// Handle each channel
if (qName.equals("channel"))
@@ -6082,7 +6082,7 @@ public class WebcrawlerConnector extends
}
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// If it's our channel tag, process global channel information
XMLContext context = theStream.getContext();
@@ -6114,7 +6114,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -6132,7 +6132,7 @@ public class WebcrawlerConnector extends
}
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -6162,7 +6162,7 @@ public class WebcrawlerConnector extends
/** Process this data */
protected void process()
- throws LCFException
+ throws ACFException
{
// Deal with the ttlvalue, if it was found
// Use the ttl value as a signal for when we ought to look at this feed again. If not present, use the default.
@@ -6181,7 +6181,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -6203,7 +6203,7 @@ public class WebcrawlerConnector extends
/** Convert the individual sub-fields of the item context into their final forms */
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -6223,7 +6223,7 @@ public class WebcrawlerConnector extends
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws LCFException
+ throws ACFException
{
if (linkField == null || linkField.length() == 0)
linkField = guidField;
@@ -6260,7 +6260,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -6278,7 +6278,7 @@ public class WebcrawlerConnector extends
}
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -6305,7 +6305,7 @@ public class WebcrawlerConnector extends
/** Process this data */
protected void process()
- throws LCFException
+ throws ACFException
{
// Deal with the ttlvalue, if it was found
handler.noteDiscoveredTtlValue(ttlValue);
@@ -6322,7 +6322,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -6339,7 +6339,7 @@ public class WebcrawlerConnector extends
/** Convert the individual sub-fields of the item context into their final forms */
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -6355,7 +6355,7 @@ public class WebcrawlerConnector extends
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws LCFException
+ throws ACFException
{
if (linkField != null && linkField.length() > 0)
{
@@ -6389,7 +6389,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -6407,7 +6407,7 @@ public class WebcrawlerConnector extends
}
protected void endTag()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -6434,7 +6434,7 @@ public class WebcrawlerConnector extends
/** Process this data */
protected void process()
- throws LCFException
+ throws ACFException
{
// Deal with the ttlvalue, if it was found
// Use the ttl value as a signal for when we ought to look at this feed again. If not present, use the default.
@@ -6452,7 +6452,7 @@ public class WebcrawlerConnector extends
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -6470,7 +6470,7 @@ public class WebcrawlerConnector extends
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws LCFException
+ throws ACFException
{
if (linkField != null && linkField.length() > 0)
{
@@ -6488,7 +6488,7 @@ public class WebcrawlerConnector extends
/** Handle document references from HTML */
protected void handleHTML(String documentURI, IHTMLHandler handler)
- throws LCFException
+ throws ACFException
{
int responseCode = cache.getResponseCode(documentURI);
if (responseCode != 200)
@@ -6578,27 +6578,27 @@ public class WebcrawlerConnector extends
}
catch (SocketTimeoutException e)
{
- throw new LCFException("Socket timeout exception: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout exception: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new LCFException("Socket connect timeout exception: "+e.getMessage(),e);
+ throw new ACFException("Socket connect timeout exception: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new LCFException("IO error: "+e.getMessage(),e);
+ throw new ACFException("IO error: "+e.getMessage(),e);
}
}
/** Is the document text, as far as we can tell? */
protected boolean isDocumentText(String documentURI)
- throws LCFException
+ throws ACFException
{
try
{
@@ -6633,19 +6633,19 @@ public class WebcrawlerConnector extends
}
catch (SocketTimeoutException e)
{
- throw new LCFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new LCFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new LCFException("IO exception accessing cached document: "+e.getMessage(),e);
+ throw new ACFException("IO exception accessing cached document: "+e.getMessage(),e);
}
}
@@ -6730,7 +6730,7 @@ public class WebcrawlerConnector extends
* list.
*/
protected static void compileList(ArrayList output, ArrayList input)
- throws LCFException
+ throws ACFException
{
int i = 0;
while (i < input.size())
@@ -6742,7 +6742,7 @@ public class WebcrawlerConnector extends
}
catch (PatternSyntaxException e)
{
- throw new LCFException("Mapping regular expression '"+inputString+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Mapping regular expression '"+inputString+"' is illegal: "+e.getMessage(),e);
}
}
}
@@ -6761,7 +6761,7 @@ public class WebcrawlerConnector extends
/** Get the trust store for a given document identifier (URL) */
protected IKeystoreManager getTrustStore(String documentIdentifier)
- throws LCFException
+ throws ACFException
{
return trustsDescription.getTrustStore(documentIdentifier);
}
@@ -6796,7 +6796,7 @@ public class WebcrawlerConnector extends
/** Read a document specification to yield a map of name/value pairs for metadata */
protected static ArrayList findMetadata(DocumentSpecification spec)
- throws LCFException
+ throws ACFException
{
ArrayList rval = new ArrayList();
int i = 0;
@@ -7077,7 +7077,7 @@ public class WebcrawlerConnector extends
* will thus cause the include or exclude regexp to be skipped.
*/
public DocumentURLFilter(DocumentSpecification spec)
- throws LCFException
+ throws ACFException
{
String includes = "";
String excludes = "";
@@ -7168,7 +7168,7 @@ public class WebcrawlerConnector extends
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Canonicalization regular expression '"+urlRegexp+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Canonicalization regular expression '"+urlRegexp+"' is illegal: "+e.getMessage(),e);
}
}
}
@@ -7234,7 +7234,7 @@ public class WebcrawlerConnector extends
*@param rawURL is the raw discovered url. This may be relative, malformed, or otherwise unsuitable for use until final form is acheived.
*/
public void noteDiscoveredLink(String rawURL)
- throws LCFException;
+ throws ACFException;
}
/** This interface describes the functionality needed by an redirection processor in order to handle a redirection.
@@ -7251,7 +7251,7 @@ public class WebcrawlerConnector extends
*@param rawTtlValue is the raw discovered ttl value.
*/
public void noteDiscoveredTtlValue(String rawTtlValue)
- throws LCFException;
+ throws ACFException;
}
@@ -7261,31 +7261,31 @@ public class WebcrawlerConnector extends
{
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws LCFException;
+ throws ACFException;
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws LCFException;
+ throws ACFException;
/** Note the end of a form */
public void noteFormEnd()
- throws LCFException;
+ throws ACFException;
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws LCFException;
+ throws ACFException;
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws LCFException;
+ throws ACFException;
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws LCFException;
+ throws ACFException;
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws LCFException;
+ throws ACFException;
}
// HTML parsing classes and constants
@@ -7385,7 +7385,7 @@ public class WebcrawlerConnector extends
/** Deal with a character. No exceptions are allowed, since those would represent syntax errors, and we don't want those to cause difficulty. */
public void dealWithCharacter(char thisChar)
- throws LCFException
+ throws ACFException
{
// At this level we want basic lexical analysis - that is, we deal with identifying tags and comments, that's it.
char thisCharLower = Character.toLowerCase(thisChar);
@@ -7673,24 +7673,24 @@ public class WebcrawlerConnector extends
currentValueBuffer.append(thisChar);
break;
default:
- throw new LCFException("Invalid state: "+Integer.toString(currentState));
+ throw new ACFException("Invalid state: "+Integer.toString(currentState));
}
}
protected void noteTag(String tagName, Map attributes)
- throws LCFException
+ throws ACFException
{
Logging.connectors.debug(" Saw tag '"+tagName+"'");
}
protected void noteEndTag(String tagName)
- throws LCFException
+ throws ACFException
{
Logging.connectors.debug(" Saw end tag '"+tagName+"'");
}
public void finishUp()
- throws LCFException
+ throws ACFException
{
// Does nothing
}
@@ -7715,7 +7715,7 @@ public class WebcrawlerConnector extends
// Override methods having to do with notification of tag discovery
protected void noteTag(String tagName, Map attributes)
- throws LCFException
+ throws ACFException
{
super.noteTag(tagName,attributes);
switch (scriptParseState)
@@ -7730,12 +7730,12 @@ public class WebcrawlerConnector extends
// Skip all tags until we see the end script one.
break;
default:
- throw new LCFException("Unknown script parse state: "+Integer.toString(scriptParseState));
+ throw new ACFException("Unknown script parse state: "+Integer.toString(scriptParseState));
}
}
protected void noteEndTag(String tagName)
- throws LCFException
+ throws ACFException
{
super.noteEndTag(tagName);
switch (scriptParseState)
@@ -7754,12 +7754,12 @@ public class WebcrawlerConnector extends
}
protected void noteNonscriptTag(String tagName, Map attributes)
- throws LCFException
+ throws ACFException
{
}
protected void noteNonscriptEndTag(String tagName)
- throws LCFException
+ throws ACFException
{
}
@@ -7778,7 +7778,7 @@ public class WebcrawlerConnector extends
}
protected void noteNonscriptTag(String tagName, Map attributes)
- throws LCFException
+ throws ACFException
{
super.noteNonscriptTag(tagName,attributes);
String lowerTagName = tagName.toLowerCase();
@@ -7832,7 +7832,7 @@ public class WebcrawlerConnector extends
// Override methods having to do with notification of tag discovery
protected void noteNonscriptTag(String tagName, Map attributes)
- throws LCFException
+ throws ACFException
{
super.noteNonscriptTag(tagName,attributes);
switch (formParseState)
@@ -7899,12 +7899,12 @@ public class WebcrawlerConnector extends
case FORMPARSESTATE_IN_TEXTAREA:
break;
default:
- throw new LCFException("Unknown form parse state: "+Integer.toString(formParseState));
+ throw new ACFException("Unknown form parse state: "+Integer.toString(formParseState));
}
}
protected void noteNonscriptEndTag(String tagName)
- throws LCFException
+ throws ACFException
{
super.noteNonscriptEndTag(tagName);
switch (formParseState)
@@ -7927,7 +7927,7 @@ public class WebcrawlerConnector extends
formParseState = FORMPARSESTATE_IN_FORM;
break;
default:
- throw new LCFException("Unknown form parse state: "+Integer.toString(formParseState));
+ throw new ACFException("Unknown form parse state: "+Integer.toString(formParseState));
}
}
Modified: incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/APISanity.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/APISanity.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/APISanity.java (original)
+++ incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/APISanity.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.filesystem_tests;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.io.*;
import java.util.*;
@@ -176,9 +176,9 @@ public class APISanity extends TestBase
// Crawl everything underneath the 'testdata' area
File testDataFile = new File("testdata").getCanonicalFile();
if (!testDataFile.exists())
- throw new LCFException("Test data area not found! Looking in "+testDataFile.toString());
+ throw new ACFException("Test data area not found! Looking in "+testDataFile.toString());
if (!testDataFile.isDirectory())
- throw new LCFException("Test data area not a directory! Looking in "+testDataFile.toString());
+ throw new ACFException("Test data area not a directory! Looking in "+testDataFile.toString());
ConfigurationNode sn = new ConfigurationNode("startpoint");
sn.setAttribute("path",testDataFile.toString());
ConfigurationNode n = new ConfigurationNode("include");
@@ -229,7 +229,7 @@ public class APISanity extends TestBase
long count;
count = getJobDocumentsProcessed(jobIDString);
if (count != 5)
- throw new LCFException("Wrong number of documents processed - expected 5, saw "+new Long(count).toString());
+ throw new ACFException("Wrong number of documents processed - expected 5, saw "+new Long(count).toString());
// Add a file and recrawl
createFile(new File("testdata/testdir/test4.txt"),"Added file");
@@ -241,7 +241,7 @@ public class APISanity extends TestBase
// The test data area has 4 documents and one directory, and we have to count the root directory too.
count = getJobDocumentsProcessed(jobIDString);
if (count != 6)
- throw new LCFException("Wrong number of documents processed after add - expected 6, saw "+new Long(count).toString());
+ throw new ACFException("Wrong number of documents processed after add - expected 6, saw "+new Long(count).toString());
// Change a file, and recrawl
changeFile(new File("testdata/test1.txt"),"Modified contents");
@@ -253,7 +253,7 @@ public class APISanity extends TestBase
// The test data area has 4 documents and one directory, and we have to count the root directory too.
count = getJobDocumentsProcessed(jobIDString);
if (count != 6)
- throw new LCFException("Wrong number of documents processed after change - expected 6, saw "+new Long(count).toString());
+ throw new ACFException("Wrong number of documents processed after change - expected 6, saw "+new Long(count).toString());
// We also need to make sure the new document was indexed. Have to think about how to do this though.
// MHL
@@ -268,7 +268,7 @@ public class APISanity extends TestBase
// The test data area has 3 documents and one directory, and we have to count the root directory too.
count = getJobDocumentsProcessed(jobIDString);
if (count != 5)
- throw new LCFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(count).toString());
+ throw new ACFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(count).toString());
// Now, delete the job.
deleteJob(jobIDString);
@@ -397,7 +397,7 @@ public class APISanity extends TestBase
break;
if (status.equals("error"))
throw new Exception("Job reports error.");
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
continue;
}
}
@@ -410,7 +410,7 @@ public class APISanity extends TestBase
String status = getJobStatus(jobIDString);
if (status == null)
break;
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
}
}
Modified: incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/Sanity.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/Sanity.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/Sanity.java (original)
+++ incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/Sanity.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.filesystem_tests;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.io.*;
import java.util.*;
@@ -109,9 +109,9 @@ public class Sanity extends TestBase
// Crawl everything underneath the 'testdata' area
File testDataFile = new File("testdata").getCanonicalFile();
if (!testDataFile.exists())
- throw new LCFException("Test data area not found! Looking in "+testDataFile.toString());
+ throw new ACFException("Test data area not found! Looking in "+testDataFile.toString());
if (!testDataFile.isDirectory())
- throw new LCFException("Test data area not a directory! Looking in "+testDataFile.toString());
+ throw new ACFException("Test data area not a directory! Looking in "+testDataFile.toString());
SpecificationNode sn = new SpecificationNode("startpoint");
sn.setAttribute("path",testDataFile.toString());
SpecificationNode n = new SpecificationNode("include");
@@ -145,7 +145,7 @@ public class Sanity extends TestBase
JobStatus status = jobManager.getStatus(job.getID());
// The test data area has 3 documents and one directory, and we have to count the root directory too.
if (status.getDocumentsProcessed() != 5)
- throw new LCFException("Wrong number of documents processed - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString());
+ throw new ACFException("Wrong number of documents processed - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString());
// Add a file and recrawl
createFile(new File("testdata/testdir/test4.txt"),"Added file");
@@ -157,7 +157,7 @@ public class Sanity extends TestBase
status = jobManager.getStatus(job.getID());
// The test data area has 4 documents and one directory, and we have to count the root directory too.
if (status.getDocumentsProcessed() != 6)
- throw new LCFException("Wrong number of documents processed after add - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString());
+ throw new ACFException("Wrong number of documents processed after add - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString());
// Change a file, and recrawl
changeFile(new File("testdata/test1.txt"),"Modified contents");
@@ -169,7 +169,7 @@ public class Sanity extends TestBase
status = jobManager.getStatus(job.getID());
// The test data area has 4 documents and one directory, and we have to count the root directory too.
if (status.getDocumentsProcessed() != 6)
- throw new LCFException("Wrong number of documents processed after change - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString());
+ throw new ACFException("Wrong number of documents processed after change - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString());
// We also need to make sure the new document was indexed. Have to think about how to do this though.
// MHL
@@ -184,7 +184,7 @@ public class Sanity extends TestBase
status = jobManager.getStatus(job.getID());
// The test data area has 3 documents and one directory, and we have to count the root directory too.
if (status.getDocumentsProcessed() != 5)
- throw new LCFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString());
+ throw new ACFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString());
// Now, delete the job.
jobManager.deleteJob(job.getID());
@@ -200,24 +200,24 @@ public class Sanity extends TestBase
}
protected void waitJobInactive(IJobManager jobManager, Long jobID)
- throws LCFException, InterruptedException
+ throws ACFException, InterruptedException
{
while (true)
{
JobStatus status = jobManager.getStatus(jobID);
if (status == null)
- throw new LCFException("No such job: '"+jobID+"'");
+ throw new ACFException("No such job: '"+jobID+"'");
int statusValue = status.getStatus();
switch (statusValue)
{
case JobStatus.JOBSTATUS_NOTYETRUN:
- throw new LCFException("Job was never started.");
+ throw new ACFException("Job was never started.");
case JobStatus.JOBSTATUS_COMPLETED:
break;
case JobStatus.JOBSTATUS_ERROR:
- throw new LCFException("Job reports error status: "+status.getErrorText());
+ throw new ACFException("Job reports error status: "+status.getErrorText());
default:
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
continue;
}
break;
@@ -225,14 +225,14 @@ public class Sanity extends TestBase
}
protected void waitJobDeleted(IJobManager jobManager, Long jobID)
- throws LCFException, InterruptedException
+ throws ACFException, InterruptedException
{
while (true)
{
JobStatus status = jobManager.getStatus(jobID);
if (status == null)
break;
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
}
}
Modified: incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/TestBase.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/TestBase.java (original)
+++ incubator/lcf/trunk/modules/filesystem-tests/org/apache/acf/filesystem_tests/TestBase.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.filesystem_tests;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.io.*;
import java.util.*;
@@ -131,7 +131,7 @@ public class TestBase extends org.apache
// API support
- // These methods allow communication with the LCF api webapp, via the locally-instantiated jetty
+ // These methods allow communication with the ACF api webapp, via the locally-instantiated jetty
/** Perform an json API operation.
*@param command is the operation.
@@ -232,7 +232,7 @@ public class TestBase extends org.apache
{
jobManager.manualAbort(desc.getID());
}
- catch (LCFException e)
+ catch (ACFException e)
{
// This generally means that the job was not running
}
@@ -255,7 +255,7 @@ public class TestBase extends org.apache
case JobStatus.JOBSTATUS_ERROR:
break;
default:
- LCF.sleep(10000);
+ ACF.sleep(10000);
continue;
}
}
@@ -272,7 +272,7 @@ public class TestBase extends org.apache
{
jobManager.deleteJob(desc.getID());
}
- catch (LCFException e)
+ catch (ACFException e)
{
// This usually means that the job is already being deleted
}
@@ -288,7 +288,7 @@ public class TestBase extends org.apache
JobStatus status = jobManager.getStatus(desc.getID());
if (status != null)
{
- LCF.sleep(10000);
+ ACF.sleep(10000);
continue;
}
break;
@@ -361,11 +361,11 @@ public class TestBase extends org.apache
break;
// Start whatever agents need to be started
- LCF.startAgents(tc);
+ ACF.startAgents(tc);
try
{
- LCF.sleep(5000);
+ ACF.sleep(5000);
}
catch (InterruptedException e)
{
@@ -373,7 +373,7 @@ public class TestBase extends org.apache
}
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
daemonException = e;
}
@@ -381,9 +381,9 @@ public class TestBase extends org.apache
{
try
{
- LCF.stopAgents(tc);
+ ACF.stopAgents(tc);
}
- catch (LCFException e)
+ catch (ACFException e)
{
daemonException = e;
}
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentRun.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentRun.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentRun.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentRun.java Mon Aug 23 18:08:32 2010
@@ -34,7 +34,7 @@ public class AgentRun extends BaseAgents
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
ILockManager lockManager = LockManagerFactory.make(tc);
// Clear the agents shutdown signal.
@@ -47,11 +47,11 @@ public class AgentRun extends BaseAgents
break;
// Start whatever agents need to be started
- LCF.startAgents(tc);
+ ACF.startAgents(tc);
try
{
- LCF.sleep(5000);
+ ACF.sleep(5000);
}
catch (InterruptedException e)
{
@@ -77,7 +77,7 @@ public class AgentRun extends BaseAgents
agentRun.execute();
System.err.println("Shutting down...");
}
- catch (LCFException e)
+ catch (ACFException e)
{
Logging.root.error("Exception: "+e.getMessage(),e);
e.printStackTrace(System.err);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentStop.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentStop.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentStop.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/AgentStop.java Mon Aug 23 18:08:32 2010
@@ -32,7 +32,7 @@ public class AgentStop extends BaseAgent
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
ILockManager lockManager = LockManagerFactory.make(tc);
lockManager.setGlobalFlag(AgentRun.agentShutdownSignal);
@@ -54,7 +54,7 @@ public class AgentStop extends BaseAgent
agentStop.execute();
System.err.println("Shutdown signal sent");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace(System.err);
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/BaseAgentsInitializationCommand.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/BaseAgentsInitializationCommand.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/BaseAgentsInitializationCommand.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/BaseAgentsInitializationCommand.java Mon Aug 23 18:08:32 2010
@@ -1,9 +1,9 @@
package org.apache.acf.agents;
-import org.apache.acf.agents.system.LCF;
+import org.apache.acf.agents.system.ACF;
import org.apache.acf.core.InitializationCommand;
import org.apache.acf.core.interfaces.IThreadContext;
-import org.apache.acf.core.interfaces.LCFException;
+import org.apache.acf.core.interfaces.ACFException;
import org.apache.acf.core.interfaces.ThreadContextFactory;
/**
@@ -11,12 +11,12 @@ import org.apache.acf.core.interfaces.Th
*/
public abstract class BaseAgentsInitializationCommand implements InitializationCommand
{
- public void execute() throws LCFException
+ public void execute() throws ACFException
{
- LCF.initializeEnvironment();
+ ACF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
doExecute(tc);
}
- protected abstract void doExecute(IThreadContext tc) throws LCFException;
+ protected abstract void doExecute(IThreadContext tc) throws ACFException;
}
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DefineOutputConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DefineOutputConnection.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DefineOutputConnection.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DefineOutputConnection.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.agents;
import java.io.*;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
-import org.apache.acf.agents.system.LCF;
+import org.apache.acf.agents.system.ACF;
import java.util.*;
/** This class is used to define an output connection.
@@ -51,7 +51,7 @@ public class DefineOutputConnection
try
{
- LCF.initializeEnvironment();
+ ACF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IOutputConnectionManager mgr = OutputConnectionManagerFactory.make(tc);
IOutputConnection conn = mgr.create();
@@ -67,7 +67,7 @@ public class DefineOutputConnection
// Parse
int pos = arg.indexOf("=");
if (pos == -1)
- throw new LCFException("Argument missing =");
+ throw new ACFException("Argument missing =");
String name = arg.substring(0,pos);
String value = arg.substring(pos+1);
if (name.endsWith("assword"))
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DeleteOutputConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DeleteOutputConnection.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DeleteOutputConnection.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/DeleteOutputConnection.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.agents;
import java.io.*;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
-import org.apache.acf.agents.system.LCF;
+import org.apache.acf.agents.system.ACF;
import java.util.*;
/** This class is a command that is used to delete an output connection.
@@ -46,7 +46,7 @@ public class DeleteOutputConnection
String connectionName = args[0];
try
{
- LCF.initializeEnvironment();
+ ACF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IOutputConnectionManager mgr = OutputConnectionManagerFactory.make(tc);
mgr.delete(connectionName);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Install.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Install.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Install.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Install.java Mon Aug 23 18:08:32 2010
@@ -29,9 +29,9 @@ public class Install extends BaseAgentsI
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
- LCF.installTables(tc);
+ ACF.installTables(tc);
Logging.root.info("Agent tables installed");
}
@@ -49,7 +49,7 @@ public class Install extends BaseAgentsI
install.execute();
System.err.println("Agent tables installed");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Register.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Register.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Register.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Register.java Mon Aug 23 18:08:32 2010
@@ -36,7 +36,7 @@ public class Register extends BaseAgents
this.className = className;
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IAgentManager mgr = AgentManagerFactory.make(tc);
mgr.registerAgent(className);
@@ -58,7 +58,7 @@ public class Register extends BaseAgents
register.execute();
System.err.println("Successfully registered agent '"+className+"'");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/RegisterOutput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/RegisterOutput.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/RegisterOutput.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/RegisterOutput.java Mon Aug 23 18:08:32 2010
@@ -39,7 +39,7 @@ public class RegisterOutput extends Tran
this.description = description;
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc);
IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc);
@@ -70,7 +70,7 @@ public class RegisterOutput extends Tran
registerOutput.execute();
System.err.println("Successfully registered output connector '"+className+"'");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeAll.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeAll.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeAll.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeAll.java Mon Aug 23 18:08:32 2010
@@ -33,7 +33,7 @@ public class SynchronizeAll extends Base
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IAgentManager mgr = AgentManagerFactory.make(tc);
String[] classnames = mgr.getAllAgents();
@@ -45,7 +45,7 @@ public class SynchronizeAll extends Base
{
AgentFactory.make(tc,classname);
}
- catch (LCFException e)
+ catch (ACFException e)
{
// Couldn't instantiate the agent: Remove from database table
mgr.removeAgent(classname);
@@ -68,7 +68,7 @@ public class SynchronizeAll extends Base
synchronizeAll.execute();
System.err.println("Successfully synchronized all agents");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeOutputs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeOutputs.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeOutputs.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/SynchronizeOutputs.java Mon Aug 23 18:08:32 2010
@@ -33,12 +33,12 @@ public class SynchronizeOutputs extends
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IDBInterface database = DBInterfaceFactory.make(tc,
- LCF.getMasterDatabaseName(),
- LCF.getMasterDatabaseUsername(),
- LCF.getMasterDatabasePassword());
+ ACF.getMasterDatabaseName(),
+ ACF.getMasterDatabaseUsername(),
+ ACF.getMasterDatabasePassword());
IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc);
IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc);
IResultSet classNames = mgr.getConnectors();
@@ -51,7 +51,7 @@ public class SynchronizeOutputs extends
{
OutputConnectorFactory.getConnectorNoCheck(className);
}
- catch (LCFException e)
+ catch (ACFException e)
{
// Deregistration should be done in a transaction
database.beginTransaction();
@@ -64,7 +64,7 @@ public class SynchronizeOutputs extends
// Now that all jobs have been placed into an appropriate state, actually do the deregistration itself.
mgr.removeConnector(className);
}
- catch (LCFException e2)
+ catch (ACFException e2)
{
database.signalRollback();
throw e2;
@@ -98,7 +98,7 @@ public class SynchronizeOutputs extends
synchronizeOutputs.execute();
System.err.println("Successfully synchronized all outputs");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/TransactionalAgentsInitializationCommand.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/TransactionalAgentsInitializationCommand.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/TransactionalAgentsInitializationCommand.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/TransactionalAgentsInitializationCommand.java Mon Aug 23 18:08:32 2010
@@ -1,6 +1,6 @@
package org.apache.acf.agents;
-import org.apache.acf.agents.system.LCF;
+import org.apache.acf.agents.system.ACF;
import org.apache.acf.core.InitializationCommand;
import org.apache.acf.core.interfaces.*;
@@ -9,21 +9,21 @@ import org.apache.acf.core.interfaces.*;
*/
public abstract class TransactionalAgentsInitializationCommand implements InitializationCommand
{
- public void execute() throws LCFException
+ public void execute() throws ACFException
{
- LCF.initializeEnvironment();
+ ACF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IDBInterface database = DBInterfaceFactory.make(tc,
- org.apache.acf.agents.system.LCF.getMasterDatabaseName(),
- org.apache.acf.agents.system.LCF.getMasterDatabaseUsername(),
- org.apache.acf.agents.system.LCF.getMasterDatabasePassword());
+ org.apache.acf.agents.system.ACF.getMasterDatabaseName(),
+ org.apache.acf.agents.system.ACF.getMasterDatabaseUsername(),
+ org.apache.acf.agents.system.ACF.getMasterDatabasePassword());
try
{
database.beginTransaction();
doExecute(tc);
}
- catch (LCFException e)
+ catch (ACFException e)
{
database.signalRollback();
throw e;
@@ -40,5 +40,5 @@ public abstract class TransactionalAgent
}
- protected abstract void doExecute(IThreadContext tc) throws LCFException;
+ protected abstract void doExecute(IThreadContext tc) throws ACFException;
}
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegister.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegister.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegister.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegister.java Mon Aug 23 18:08:32 2010
@@ -36,7 +36,7 @@ public class UnRegister extends BaseAgen
this.className = className;
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IAgentManager mgr = AgentManagerFactory.make(tc);
mgr.unregisterAgent(className);
@@ -59,7 +59,7 @@ public class UnRegister extends BaseAgen
unRegister.execute();
System.err.println("Successfully unregistered agent '"+className+"'");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAll.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAll.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAll.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAll.java Mon Aug 23 18:08:32 2010
@@ -33,7 +33,7 @@ public class UnRegisterAll extends BaseA
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IAgentManager mgr = AgentManagerFactory.make(tc);
String[] classnames = mgr.getAllAgents();
@@ -60,7 +60,7 @@ public class UnRegisterAll extends BaseA
unRegisterAll.execute();
System.err.println("Successfully unregistered all agents");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAllOutputs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAllOutputs.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAllOutputs.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterAllOutputs.java Mon Aug 23 18:08:32 2010
@@ -33,12 +33,12 @@ public class UnRegisterAllOutputs extend
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IDBInterface database = DBInterfaceFactory.make(tc,
- LCF.getMasterDatabaseName(),
- LCF.getMasterDatabaseUsername(),
- LCF.getMasterDatabasePassword());
+ ACF.getMasterDatabaseName(),
+ ACF.getMasterDatabaseUsername(),
+ ACF.getMasterDatabasePassword());
IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc);
IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc);
IResultSet classNames = mgr.getConnectors();
@@ -58,7 +58,7 @@ public class UnRegisterAllOutputs extend
// Now that all jobs have been placed into an appropriate state, actually do the deregistration itself.
mgr.unregisterConnector(className);
}
- catch (LCFException e)
+ catch (ACFException e)
{
database.signalRollback();
throw e;
@@ -91,7 +91,7 @@ public class UnRegisterAllOutputs extend
unRegisterAllOutputs.execute();
System.err.println("Successfully unregistered all output connectors");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterOutput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterOutput.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterOutput.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/UnRegisterOutput.java Mon Aug 23 18:08:32 2010
@@ -36,7 +36,7 @@ public class UnRegisterOutput extends Tr
this.className = className;
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc);
IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc);
@@ -65,7 +65,7 @@ public class UnRegisterOutput extends Tr
unRegisterOutput.execute();
System.err.println("Successfully unregistered output connector '"+className+"'");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Uninstall.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Uninstall.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Uninstall.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/acf/agents/Uninstall.java Mon Aug 23 18:08:32 2010
@@ -32,9 +32,9 @@ public class Uninstall extends BaseAgent
{
}
- protected void doExecute(IThreadContext tc) throws LCFException
+ protected void doExecute(IThreadContext tc) throws ACFException
{
- LCF.deinstallTables(tc);
+ ACF.deinstallTables(tc);
Logging.root.info("Agent tables uninstalled");
}
@@ -52,7 +52,7 @@ public class Uninstall extends BaseAgent
uninstall.execute();
System.err.println("Agent tables uninstalled");
}
- catch (LCFException e)
+ catch (ACFException e)
{
e.printStackTrace();
System.exit(1);