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 [8/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/solr/connector/org/apache/acf/agents/output/solr/SolrConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/SolrConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/SolrConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/solr/connector/org/apache/acf/agents/output/solr/SolrConnector.java Mon Aug 23 18:08:32 2010
@@ -81,7 +81,7 @@ public class SolrConnector extends org.a
/** Close the connection. Call this before discarding the connection.
*/
public void disconnect()
- throws LCFException
+ throws ACFException
{
poster = null;
super.disconnect();
@@ -89,17 +89,17 @@ public class SolrConnector extends org.a
/** Set up a session */
protected void getSession()
- throws LCFException
+ throws ACFException
{
if (poster == null)
{
String protocol = params.getParameter(org.apache.acf.agents.output.solr.SolrConfig.PARAM_PROTOCOL);
if (protocol == null || protocol.length() == 0)
- throw new LCFException("Missing parameter: "+org.apache.acf.agents.output.solr.SolrConfig.PARAM_PROTOCOL);
+ throw new ACFException("Missing parameter: "+org.apache.acf.agents.output.solr.SolrConfig.PARAM_PROTOCOL);
String server = params.getParameter(org.apache.acf.agents.output.solr.SolrConfig.PARAM_SERVER);
if (server == null || server.length() == 0)
- throw new LCFException("Missing parameter: "+org.apache.acf.agents.output.solr.SolrConfig.PARAM_SERVER);
+ throw new ACFException("Missing parameter: "+org.apache.acf.agents.output.solr.SolrConfig.PARAM_SERVER);
String port = params.getParameter(org.apache.acf.agents.output.solr.SolrConfig.PARAM_PORT);
if (port == null || port.length() == 0)
@@ -136,7 +136,7 @@ public class SolrConnector extends org.a
if (core != null)
{
if (webapp.length() == 0)
- throw new LCFException("Webapp must be specified if core is specified.");
+ throw new ACFException("Webapp must be specified if core is specified.");
webapp = webapp + "/" + core;
}
@@ -147,7 +147,7 @@ public class SolrConnector extends org.a
}
catch (NumberFormatException e)
{
- throw new LCFException(e.getMessage());
+ throw new ACFException(e.getMessage());
}
}
}
@@ -156,7 +156,7 @@ public class SolrConnector extends org.a
*@return the connection's status as a displayable string.
*/
public String check()
- throws LCFException
+ throws ACFException
{
try
{
@@ -182,7 +182,7 @@ public class SolrConnector extends org.a
* the document will not need to be sent again to the output data store.
*/
public String getOutputDescription(OutputSpecification spec)
- throws LCFException
+ throws ACFException
{
StringBuffer sb = new StringBuffer();
@@ -295,7 +295,7 @@ public class SolrConnector extends org.a
*@return the document status (accepted or permanently rejected).
*/
public int addOrReplaceDocument(String documentURI, String outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// Build the argument map we'll send.
Map args = new HashMap();
@@ -349,7 +349,7 @@ public class SolrConnector extends org.a
*@param activities is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.
*/
public void removeDocument(String documentURI, String outputDescription, IOutputRemoveActivity activities)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// Establish a session
getSession();
@@ -375,7 +375,7 @@ public class SolrConnector extends org.a
*@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("Server");
tabsArray.add("Schema");
@@ -539,7 +539,7 @@ public class SolrConnector extends org.a
*@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 protocol = parameters.getParameter(org.apache.acf.agents.output.solr.SolrConfig.PARAM_PROTOCOL);
if (protocol == null)
@@ -847,7 +847,7 @@ public class SolrConnector extends org.a
*@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 protocol = variableContext.getParameter("serverprotocol");
if (protocol != null)
@@ -950,7 +950,7 @@ public class SolrConnector extends org.a
*@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
{
out.print(
"<table class=\"displaytable\">\n"+
@@ -1042,7 +1042,7 @@ public class SolrConnector extends org.a
*@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, OutputSpecification os, ArrayList tabsArray)
- throws LCFException, IOException
+ throws ACFException, IOException
{
tabsArray.add("Field Mapping");
out.print(
@@ -1093,7 +1093,7 @@ public class SolrConnector extends org.a
*@param tabName is the current tab name.
*/
public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
// Prep for field mapping tab
HashMap fieldMap = new HashMap();
@@ -1236,7 +1236,7 @@ public class SolrConnector extends org.a
*@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, OutputSpecification os)
- throws LCFException
+ throws ACFException
{
String x = variableContext.getParameter("solr_fieldmapping_count");
if (x != null && x.length() > 0)
@@ -1294,7 +1294,7 @@ public class SolrConnector extends org.a
*@param os is the current output specification for this job.
*/
public void viewSpecification(IHTTPOutput out, OutputSpecification os)
- throws LCFException, IOException
+ throws ACFException, IOException
{
// Prep for field mappings
HashMap fieldMap = new HashMap();
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CookieManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CookieManager.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CookieManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CookieManager.java Mon Aug 23 18:08:32 2010
@@ -24,7 +24,7 @@ import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.authorities.interfaces.*;
import org.apache.acf.crawler.interfaces.CacheKeyFactory;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import org.apache.acf.crawler.system.Logging;
import org.apache.commons.httpclient.Cookie;
@@ -73,7 +73,7 @@ public class CookieManager extends org.a
*@param database is the database handle.
*/
public CookieManager(IThreadContext tc, IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"cookiedata");
cacheManager = CacheManagerFactory.make(tc);
@@ -82,7 +82,7 @@ public class CookieManager extends org.a
/** Install the manager.
*/
public void install()
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -120,7 +120,7 @@ public class CookieManager extends org.a
addTableIndex(false,list);
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -139,7 +139,7 @@ public class CookieManager extends org.a
/** Uninstall the manager.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -149,7 +149,7 @@ public class CookieManager extends org.a
*@return the login cookies object.
*/
public LoginCookies readCookies(String sessionKey)
- throws LCFException
+ throws ACFException
{
// Build description objects
CookiesDescription[] objectDescriptions = new CookiesDescription[1];
@@ -169,7 +169,7 @@ public class CookieManager extends org.a
*@param cookies are the cookies to write into the database.
*/
public void updateCookies(String sessionKey, LoginCookies cookies)
- throws LCFException
+ throws ACFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getCookiesCacheKey(sessionKey));
@@ -256,7 +256,7 @@ public class CookieManager extends org.a
cacheManager.invalidateKeys(ch);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -293,7 +293,7 @@ public class CookieManager extends org.a
*@return the login cookies object.
*/
protected LoginCookies readCookiesUncached(String sessionKey)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(sessionKey);
@@ -348,14 +348,14 @@ public class CookieManager extends org.a
/** Convert a boolean string to a boolean.
*/
protected static boolean stringToBoolean(String value)
- throws LCFException
+ throws ACFException
{
if (value.equals("T"))
return true;
else if (value.equals("F"))
return false;
else
- throw new LCFException("Expected T or F but saw "+value);
+ throw new ACFException("Expected T or F but saw "+value);
}
/** Convert a boolean to a boolean string.
@@ -371,7 +371,7 @@ public class CookieManager extends org.a
/** Convert a string to a port array.
*/
protected static int[] stringToPorts(String value)
- throws LCFException
+ throws ACFException
{
String[] ports = value.split(",");
int[] rval = new int[ports.length];
@@ -384,7 +384,7 @@ public class CookieManager extends org.a
}
catch (NumberFormatException e)
{
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
i++;
}
@@ -563,7 +563,7 @@ public class CookieManager extends org.a
* @return the newly created objects to cache, or null, if any object cannot be created.
* The order of the returned objects must correspond to the order of the object descriptinos.
*/
- public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
+ public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
{
// I'm not expecting multiple values to be requested, so it's OK to walk through the objects
// and do a request at a time.
@@ -587,7 +587,7 @@ public class CookieManager extends org.a
* @param objectDescription is the unique identifier of the object.
* @param cachedObject is the cached object.
*/
- public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
+ public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
{
// Cast what came in as what it really is
CookiesDescription objectDesc = (CookiesDescription)objectDescription;
@@ -599,7 +599,7 @@ public class CookieManager extends org.a
/** Perform the desired operation. This method is called after either createGetObject()
* or exists() is called for every requested object.
*/
- public void execute() throws LCFException
+ public void execute() throws ACFException
{
// Does nothing; we only want to fetch objects in this cacher.
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CredentialsDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CredentialsDescription.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CredentialsDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/CredentialsDescription.java Mon Aug 23 18:08:32 2010
@@ -19,7 +19,7 @@
package org.apache.acf.crawler.connectors.webcrawler;
import org.apache.acf.core.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.util.*;
import java.util.regex.*;
@@ -54,7 +54,7 @@ public class CredentialsDescription
/** Constructor. Build the description from the ConfigParams. */
public CredentialsDescription(ConfigParams configData)
- throws LCFException
+ throws ACFException
{
// Scan, looking for bin description nodes
int i = 0;
@@ -74,7 +74,7 @@ public class CredentialsDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Access credential regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Access credential regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
}
CredentialsItem ti = new CredentialsItem(p);
@@ -84,7 +84,7 @@ public class CredentialsDescription
String userName = node.getAttributeValue(WebcrawlerConfig.ATTR_USERNAME);
String password = node.getAttributeValue(WebcrawlerConfig.ATTR_PASSWORD);
if (password != null)
- password = LCF.deobfuscate(password);
+ password = ACF.deobfuscate(password);
if (type.equals(WebcrawlerConfig.ATTRVALUE_BASIC))
ti.setCredential(new BasicCredential(userName,password));
@@ -115,7 +115,7 @@ public class CredentialsDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Authentication page regular expression '"+authPageRegexp+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Authentication page regular expression '"+authPageRegexp+"' is illegal: "+e.getMessage(),e);
}
Pattern matchPattern;
try
@@ -124,7 +124,7 @@ public class CredentialsDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Match regular expression '"+matchRegexp+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Match regular expression '"+matchRegexp+"' is illegal: "+e.getMessage(),e);
}
if (pageType.equals(WebcrawlerConfig.ATTRVALUE_FORM))
{
@@ -139,7 +139,7 @@ public class CredentialsDescription
sc.addAuthPage(authPageRegexp,authPattern,null,null,null,null,matchRegexp,matchPattern);
}
else
- throw new LCFException("Invalid page type: "+pageType);
+ throw new ACFException("Invalid page type: "+pageType);
// Finally, walk through any specified parameters
int k = 0;
@@ -156,12 +156,12 @@ public class CredentialsDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Parameter name regular expression '"+paramName+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Parameter name regular expression '"+paramName+"' is illegal: "+e.getMessage(),e);
}
String passwordValue = paramNode.getAttributeValue(WebcrawlerConfig.ATTR_PASSWORD);
String paramValue = paramNode.getAttributeValue(WebcrawlerConfig.ATTR_VALUE);
if (passwordValue != null)
- paramValue = LCF.deobfuscate(passwordValue);
+ paramValue = ACF.deobfuscate(passwordValue);
sc.addPageParameter(authPageRegexp,paramName,paramNamePattern,paramValue);
}
}
@@ -170,12 +170,12 @@ public class CredentialsDescription
ti.setCredential(sc);
}
else
- throw new LCFException("Illegal credential type: "+type);
+ throw new ACFException("Illegal credential type: "+type);
patternHash.put(urlDescription,ti);
}
catch (PatternSyntaxException e)
{
- throw new LCFException("Bad pattern syntax in '"+urlDescription+"'",e);
+ throw new ACFException("Bad pattern syntax in '"+urlDescription+"'",e);
}
}
}
@@ -542,7 +542,7 @@ public class CredentialsDescription
String preferredLinkRegexp, Pattern preferredLinkPattern,
String formNameRegexp, Pattern formNamePattern,
String preferredRedirectionRegexp, Pattern preferredRedirectionPattern)
- throws LCFException
+ throws ACFException
{
sessionPages.put(urlregexp,new SessionCredentialItem(urlregexp,urlPattern,
preferredLinkRegexp,preferredLinkPattern,
@@ -569,7 +569,7 @@ public class CredentialsDescription
* If null is returned, then this page has no specific login information.
*/
public Iterator findLoginParameters(String documentIdentifier)
- throws LCFException
+ throws ACFException
{
return new LoginParameterIterator(sessionPages,documentIdentifier);
}
@@ -629,7 +629,7 @@ public class CredentialsDescription
/** Turn this instance into a Credentials object, given the specified target host name */
public Credentials makeCredentialsObject(String targetHostName)
- throws LCFException
+ throws ACFException
{
return credentialsObject;
}
@@ -668,7 +668,7 @@ public class CredentialsDescription
/** Turn this instance into a Credentials object, given the specified target host name */
public Credentials makeCredentialsObject(String targetHostName)
- throws LCFException
+ throws ACFException
{
return new NTCredentials(userName,password,targetHostName,domain);
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DNSManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DNSManager.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DNSManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DNSManager.java Mon Aug 23 18:08:32 2010
@@ -24,7 +24,7 @@ import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.authorities.interfaces.*;
import org.apache.acf.crawler.interfaces.CacheKeyFactory;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import org.apache.acf.crawler.system.Logging;
@@ -55,7 +55,7 @@ public class DNSManager extends org.apac
*@param database is the database handle.
*/
public DNSManager(IThreadContext tc, IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"dnsdata");
cacheManager = CacheManagerFactory.make(tc);
@@ -64,7 +64,7 @@ public class DNSManager extends org.apac
/** Install the manager.
*/
public void install()
- throws LCFException
+ throws ACFException
{
// Standard practice: outer loop, no transactions
while (true)
@@ -99,7 +99,7 @@ public class DNSManager extends org.apac
/** Uninstall the manager.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -108,7 +108,7 @@ public class DNSManager extends org.apac
*@return null if there is no available cached version of this info.
*/
public DNSInfo lookup(String hostName, long currentTime)
- throws LCFException
+ throws ACFException
{
// Build description objects
HostDescription[] objectDescriptions = new HostDescription[1];
@@ -133,7 +133,7 @@ public class DNSManager extends org.apac
*@param expirationTime is the time this data should expire.
*/
public void writeDNSData(String hostName, String fqdn, String ipaddress, long expirationTime)
- throws LCFException
+ throws ACFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getDNSKey(hostName));
@@ -173,7 +173,7 @@ public class DNSManager extends org.apac
}
cacheManager.invalidateKeys(ch);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -209,7 +209,7 @@ public class DNSManager extends org.apac
*@return null if the data doesn't exist at all. Return DNS data if it does.
*/
protected DNSInfo readDNSInfo(String hostName)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(hostName);
@@ -403,7 +403,7 @@ public class DNSManager extends org.apac
* @return the newly created objects to cache, or null, if any object cannot be created.
* The order of the returned objects must correspond to the order of the object descriptinos.
*/
- public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
+ public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
{
// I'm not expecting multiple values to be request, so it's OK to walk through the objects
// and do a request at a time.
@@ -430,7 +430,7 @@ public class DNSManager extends org.apac
* @param objectDescription is the unique identifier of the object.
* @param cachedObject is the cached object.
*/
- public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
+ public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
{
// Cast what came in as what it really is
HostDescription objectDesc = (HostDescription)objectDescription;
@@ -442,7 +442,7 @@ public class DNSManager extends org.apac
/** Perform the desired operation. This method is called after either createGetObject()
* or exists() is called for every requested object.
*/
- public void execute() throws LCFException
+ public void execute() throws ACFException
{
// Does nothing; we only want to fetch objects in this cacher.
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DataCache.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DataCache.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DataCache.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/DataCache.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 java.util.*;
import java.io.*;
@@ -55,7 +55,7 @@ public class DataCache
*@return a "checksum" value, to use as a version string.
*/
public String addData(IVersionActivity activities, String documentIdentifier, IThrottledConnection connection)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// Grab the response code, and the content-type header
int responseCode = connection.getResponseCode();
@@ -79,7 +79,7 @@ public class DataCache
// after it's removed. So disable this and live with the occasional
// dangling file left as a result of shutdown or error. :-(
// tempFile.deleteOnExit();
- LCF.addFile(tempFile);
+ ACF.addFile(tempFile);
// Transfer data to temporary file
long checkSum = 0L;
@@ -111,7 +111,7 @@ public class DataCache
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -150,22 +150,22 @@ public class DataCache
}
catch (IOException e)
{
- LCF.deleteFile(tempFile);
+ ACF.deleteFile(tempFile);
throw e;
}
- catch (LCFException e)
+ catch (ACFException e)
{
- LCF.deleteFile(tempFile);
+ ACF.deleteFile(tempFile);
throw e;
}
catch (ServiceInterruption e)
{
- LCF.deleteFile(tempFile);
+ ACF.deleteFile(tempFile);
throw e;
}
catch (Error e)
{
- LCF.deleteFile(tempFile);
+ ACF.deleteFile(tempFile);
throw e;
}
}
@@ -197,20 +197,20 @@ public class DataCache
}
catch (java.net.SocketTimeoutException e)
{
- throw new LCFException("Socket timeout exception creating temporary file: "+e.getMessage(),e);
+ throw new ACFException("Socket timeout exception creating temporary file: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new LCFException("Socket connect timeout exception creating temporary file: "+e.getMessage(),e);
+ throw new ACFException("Socket connect timeout exception creating temporary file: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new LCFException("IO exception creating temporary file: "+e.getMessage(),e);
+ throw new ACFException("IO exception creating temporary file: "+e.getMessage(),e);
}
}
@@ -267,7 +267,7 @@ public class DataCache
*@return a binary data stream.
*/
public synchronized InputStream getData(String documentIdentifier)
- throws LCFException
+ throws ACFException
{
DocumentData dd = (DocumentData)cacheData.get(documentIdentifier);
if (dd == null)
@@ -278,7 +278,7 @@ public class DataCache
}
catch (FileNotFoundException e)
{
- throw new LCFException("File not found exception opening data: "+e.getMessage(),e);
+ throw new ACFException("File not found exception opening data: "+e.getMessage(),e);
}
}
@@ -290,7 +290,7 @@ public class DataCache
DocumentData dd = (DocumentData)cacheData.remove(documentIdentifier);
if (dd != null)
{
- LCF.deleteFile(dd.getData());
+ ACF.deleteFile(dd.getData());
}
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/IThrottledConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/IThrottledConnection.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/IThrottledConnection.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/IThrottledConnection.java Mon Aug 23 18:08:32 2010
@@ -43,12 +43,12 @@ public interface IThrottledConnection
* is used solely for logging purposes.
*/
public void beginFetch(String fetchType)
- throws LCFException;
+ throws ACFException;
/** Execute the fetch and get the return code. This method uses the
* standard logging mechanism to keep track of the fetch attempt. It also
* signals the following conditions: ServiceInterruption (if a dynamic
- * error occurs), or LCFException if a fatal error occurs, or nothing if
+ * error occurs), or ACFException if a fatal error occurs, or nothing if
* a standard protocol error occurs.
* Note that, for proxies etc, the idea is for this fetch request to handle whatever
* redirections are needed to support proxies.
@@ -64,32 +64,32 @@ public interface IThrottledConnection
public void executeFetch(String urlPath, String userAgent, String from, int connectionTimeoutMilliseconds,
int socketTimeoutMilliseconds, boolean redirectOK, String host, FormData formData,
LoginCookies loginCookies)
- throws LCFException, ServiceInterruption;
+ throws ACFException, ServiceInterruption;
/** Get the http response code.
*@return the response code. This is either an HTTP response code, or one of the codes above.
*/
public int getResponseCode()
- throws LCFException, ServiceInterruption;
+ throws ACFException, ServiceInterruption;
/** Get the last fetch cookies.
*@return the cookies now in effect from the last fetch.
*/
public LoginCookies getLastFetchCookies()
- throws LCFException, ServiceInterruption;
+ throws ACFException, ServiceInterruption;
/** Get a specified response header, if it exists.
*@param headerName is the name of the header.
*@return the header value, or null if it doesn't exist.
*/
public String getResponseHeader(String headerName)
- throws LCFException, ServiceInterruption;
+ throws ACFException, ServiceInterruption;
/** Get the response input stream. It is the responsibility of the caller
* to close this stream when done.
*/
public InputStream getResponseBodyStream()
- throws LCFException, ServiceInterruption;
+ throws ACFException, ServiceInterruption;
/** Note that the connection fetch was interrupted by something.
*/
@@ -99,10 +99,10 @@ public interface IThrottledConnection
* describing what was done.
*/
public void doneFetch(IVersionActivity activities)
- throws LCFException;
+ throws ACFException;
/** Close the connection. Call this to end this server connection.
*/
public void close()
- throws LCFException;
+ throws ACFException;
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/PageCredentials.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/PageCredentials.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/PageCredentials.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/PageCredentials.java Mon Aug 23 18:08:32 2010
@@ -32,5 +32,5 @@ public interface PageCredentials extends
/** Turn this instance into a Credentials object, given the specified target host name */
public Credentials makeCredentialsObject(String targetHostName)
- throws LCFException;
+ throws ACFException;
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/RobotsManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/RobotsManager.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/RobotsManager.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/RobotsManager.java Mon Aug 23 18:08:32 2010
@@ -24,7 +24,7 @@ import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.authorities.interfaces.*;
import org.apache.acf.crawler.interfaces.CacheKeyFactory;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import org.apache.acf.crawler.system.Logging;
@@ -53,7 +53,7 @@ public class RobotsManager extends org.a
*@param database is the database handle.
*/
public RobotsManager(IThreadContext tc, IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"robotsdata");
cacheManager = CacheManagerFactory.make(tc);
@@ -62,7 +62,7 @@ public class RobotsManager extends org.a
/** Install the manager.
*/
public void install()
- throws LCFException
+ throws ACFException
{
// Standard practice: outer loop on install methods, no transactions
while (true)
@@ -91,7 +91,7 @@ public class RobotsManager extends org.a
/** Uninstall the manager.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -104,7 +104,7 @@ public class RobotsManager extends org.a
*/
public Boolean checkFetchAllowed(String userAgent, String hostName, long currentTime, String pathString,
IVersionActivity activities)
- throws LCFException
+ throws ACFException
{
// Build description objects
HostDescription[] objectDescriptions = new HostDescription[1];
@@ -129,7 +129,7 @@ public class RobotsManager extends org.a
*@param data is the robots data stream. May be null.
*/
public void writeRobotsData(String hostName, long expirationTime, InputStream data)
- throws LCFException, IOException
+ throws ACFException, IOException
{
TempFileInput tfi = null;
try
@@ -140,9 +140,9 @@ public class RobotsManager extends org.a
{
tfi = new TempFileInput(data);
}
- catch (LCFException e)
+ catch (ACFException e)
{
- if (e.getErrorCode() == LCFException.INTERRUPTED)
+ if (e.getErrorCode() == ACFException.INTERRUPTED)
throw e;
throw new IOException("Fetch failed: "+e.getMessage());
}
@@ -183,7 +183,7 @@ public class RobotsManager extends org.a
}
cacheManager.invalidateKeys(ch);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -225,7 +225,7 @@ public class RobotsManager extends org.a
*@return null if the data doesn't exist at all. Return robots data if it does.
*/
protected RobotsData readRobotsData(String hostName, IVersionActivity activities)
- throws LCFException
+ throws ACFException
{
try
{
@@ -236,7 +236,7 @@ public class RobotsManager extends org.a
if (set.getRowCount() == 0)
return null;
if (set.getRowCount() > 1)
- throw new LCFException("Unexpected number of robotsdata rows matching '"+hostName+"': "+Integer.toString(set.getRowCount()));
+ throw new ACFException("Unexpected number of robotsdata rows matching '"+hostName+"': "+Integer.toString(set.getRowCount()));
IResultRow row = set.getRow(0);
long expiration = ((Long)row.getValue(expirationField)).longValue();
BinaryInput bi = (BinaryInput)row.getValue(robotsField);
@@ -254,11 +254,11 @@ public class RobotsManager extends org.a
}
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 error reading robots data for "+hostName+": "+e.getMessage(),e);
+ throw new ACFException("IO error reading robots data for "+hostName+": "+e.getMessage(),e);
}
}
@@ -291,7 +291,7 @@ public class RobotsManager extends org.a
/** Constructor. */
public RobotsData(InputStream is, long expiration, String hostName, IVersionActivity activities)
- throws IOException, LCFException
+ throws IOException, ACFException
{
this.expiration = expiration;
if (is == null)
@@ -398,7 +398,7 @@ public class RobotsManager extends org.a
* Is NOT expected to close the stream.
*/
protected void parseRobotsTxt(BufferedReader r, String hostName, IVersionActivity activities)
- throws IOException, LCFException
+ throws IOException, ACFException
{
boolean parseCompleted = false;
boolean robotsWasHtml = false;
@@ -782,7 +782,7 @@ public class RobotsManager extends org.a
* @return the newly created objects to cache, or null, if any object cannot be created.
* The order of the returned objects must correspond to the order of the object descriptinos.
*/
- public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
+ public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
{
// I'm not expecting multiple values to be request, so it's OK to walk through the objects
// and do a request at a time.
@@ -809,7 +809,7 @@ public class RobotsManager extends org.a
* @param objectDescription is the unique identifier of the object.
* @param cachedObject is the cached object.
*/
- public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
+ public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
{
// Cast what came in as what it really is
HostDescription objectDesc = (HostDescription)objectDescription;
@@ -821,7 +821,7 @@ public class RobotsManager extends org.a
/** Perform the desired operation. This method is called after either createGetObject()
* or exists() is called for every requested object.
*/
- public void execute() throws LCFException
+ public void execute() throws ACFException
{
// Does nothing; we only want to fetch objects in this cacher.
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/SequenceCredentials.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/SequenceCredentials.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/SequenceCredentials.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/SequenceCredentials.java Mon Aug 23 18:08:32 2010
@@ -36,6 +36,6 @@ public interface SequenceCredentials ext
* the case where more than one matching rule is found.
*/
public Iterator findLoginParameters(String documentIdentifier)
- throws LCFException;
+ throws ACFException;
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottleDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottleDescription.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottleDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottleDescription.java Mon Aug 23 18:08:32 2010
@@ -43,7 +43,7 @@ public class ThrottleDescription
/** Constructor. Build the description from the ConfigParams. */
public ThrottleDescription(ConfigParams configData)
- throws LCFException
+ throws ACFException
{
// Scan, looking for bin description nodes
int i = 0;
@@ -78,7 +78,7 @@ public class ThrottleDescription
}
catch (NumberFormatException e)
{
- throw new LCFException("Bad number",e);
+ throw new ACFException("Bad number",e);
}
}
}
@@ -95,7 +95,7 @@ public class ThrottleDescription
}
catch (NumberFormatException e)
{
- throw new LCFException("Bad number",e);
+ throw new ACFException("Bad number",e);
}
}
}
@@ -112,7 +112,7 @@ public class ThrottleDescription
}
catch (NumberFormatException e)
{
- throw new LCFException("Bad number: "+e.getMessage(),e);
+ throw new ACFException("Bad number: "+e.getMessage(),e);
}
}
}
@@ -129,7 +129,7 @@ public class ThrottleDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Bin regular expression '"+binDescription+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Bin regular expression '"+binDescription+"' is illegal: "+e.getMessage(),e);
}
ThrottleItem ti = new ThrottleItem(p);
ti.setMaxOpenConnections(maxConnectionCount);
@@ -139,7 +139,7 @@ public class ThrottleDescription
}
catch (PatternSyntaxException e)
{
- throw new LCFException("Bad pattern syntax in '"+binDescription+"'",e);
+ throw new ACFException("Bad pattern syntax in '"+binDescription+"'",e);
}
}
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottledFetcher.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottledFetcher.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/ThrottledFetcher.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 java.util.*;
import java.io.*;
import java.net.*;
@@ -94,7 +94,7 @@ public class ThrottledFetcher
IKeystoreManager trustStore,
ThrottleDescription throttleDescription, String[] binNames,
int connectionLimit)
- throws LCFException
+ throws ACFException
{
// First, create a protocol factory object, if we can
ProtocolFactory myFactory = new ProtocolFactory();
@@ -312,8 +312,8 @@ public class ThrottledFetcher
if (e instanceof Error)
throw (Error)e;
- if (e instanceof LCFException)
- throw (LCFException)e;
+ if (e instanceof ACFException)
+ throw (ACFException)e;
if (e instanceof WaitException)
{
@@ -343,7 +343,7 @@ public class ThrottledFetcher
continue;
}
- throw new LCFException("Unexpected exception encountered: "+e.getMessage(),e);
+ throw new ACFException("Unexpected exception encountered: "+e.getMessage(),e);
}
if (Logging.connectors.isDebugEnabled())
@@ -358,7 +358,7 @@ public class ThrottledFetcher
}
catch (InterruptedException e)
{
- throw new LCFException(e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException(e.getMessage(),ACFException.INTERRUPTED);
}
}
}
@@ -366,7 +366,7 @@ public class ThrottledFetcher
/** Flush connections that have timed out from inactivity. */
public static void flushIdleConnections()
- throws LCFException
+ throws ACFException
{
synchronized (poolLock)
{
@@ -783,7 +783,7 @@ public class ThrottledFetcher
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Performing a read wait on bin '"+binName+"' of "+
new Long(waitTime).toString()+" ms.");
- LCF.sleep(waitTime);
+ ACF.sleep(waitTime);
}
}
@@ -849,14 +849,14 @@ public class ThrottledFetcher
}
public DataSession getSession(String url)
- throws LCFException
+ throws ACFException
{
return new DataSession(this,url);
}
/** Atomically write resultlog record, returning data file name to use */
public synchronized String writeResponseRecord(String url, int responseCode, ArrayList headerNames, ArrayList headerValues)
- throws LCFException
+ throws ACFException
{
// Open log file
try
@@ -891,7 +891,7 @@ public class ThrottledFetcher
}
catch (IOException e)
{
- throw new LCFException("Error recording file info: "+e.getMessage(),e);
+ throw new ACFException("Error recording file info: "+e.getMessage(),e);
}
}
@@ -927,7 +927,7 @@ public class ThrottledFetcher
}
public void endHeader()
- throws LCFException
+ throws ACFException
{
documentName = dr.writeResponseRecord(url,responseCode,headerNames,headerValues);
}
@@ -1186,7 +1186,7 @@ public class ThrottledFetcher
* is used solely for logging purposes.
*/
public void beginFetch(String fetchType)
- throws LCFException
+ throws ACFException
{
try
{
@@ -1215,7 +1215,7 @@ public class ThrottledFetcher
}
catch (InterruptedException e)
{
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
}
}
@@ -1263,7 +1263,7 @@ public class ThrottledFetcher
/** Execute the fetch and get the return code. This method uses the
* standard logging mechanism to keep track of the fetch attempt. It also
* signals the following conditions: ServiceInterruption (if a dynamic
- * error occurs), or LCFException if a fatal error occurs, or nothing if
+ * error occurs), or ACFException if a fatal error occurs, or nothing if
* a standard protocol error occurs.
* Note that, for proxies etc, the idea is for this fetch request to handle whatever
* redirections are needed to support proxies.
@@ -1279,7 +1279,7 @@ public class ThrottledFetcher
public void executeFetch(String urlPath, String userAgent, String from, int connectionTimeoutMilliseconds,
int socketTimeoutMilliseconds, boolean redirectOK, String host, FormData formData,
LoginCookies loginCookies)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
StringBuffer sb = new StringBuffer(protocol);
sb.append("://").append(server);
@@ -1412,7 +1412,7 @@ public class ThrottledFetcher
fetchMethod = postMethod;
break;
default:
- throw new LCFException("Illegal method type: "+Integer.toString(pageFetchMethod));
+ throw new ACFException("Illegal method type: "+Integer.toString(pageFetchMethod));
}
// Set all appropriate headers and parameters
@@ -1496,7 +1496,7 @@ public class ThrottledFetcher
// Temporary service interruption
// May want to make the retry time a parameter someday
long currentTime = System.currentTimeMillis();
- throw new ServiceInterruption("Http response temporary error on '"+myUrl+"': "+Integer.toString(statusCode),new LCFException("Service unavailable (code "+Integer.toString(statusCode)+")"),
+ throw new ServiceInterruption("Http response temporary error on '"+myUrl+"': "+Integer.toString(statusCode),new ACFException("Service unavailable (code "+Integer.toString(statusCode)+")"),
currentTime + TIME_2HRS, currentTime + TIME_1DAY, -1, false);
case HttpStatus.SC_UNAUTHORIZED:
case HttpStatus.SC_USE_PROXY:
@@ -1529,9 +1529,9 @@ public class ThrottledFetcher
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throwable = new LCFException("Interrupted: "+e.getMessage(),e);
+ throwable = new ACFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
}
catch (org.apache.commons.httpclient.RedirectException e)
{
@@ -1572,13 +1572,13 @@ public class ThrottledFetcher
// Drop the current connection, and in fact the whole pool, on the floor.
fetchMethod = null;
connManager = null;
- throwable = new LCFException("Interrupted: "+e.getMessage(),e);
+ throwable = new ACFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IllegalArgumentException e)
{
- throwable = new LCFException("Illegal URI: '"+myUrl+"'",e);
+ throwable = new ACFException("Illegal URI: '"+myUrl+"'",e);
statusCode = FETCH_BAD_URI;
if (recordEverything)
dataSession.setResponseCode(statusCode);
@@ -1586,7 +1586,7 @@ public class ThrottledFetcher
}
catch (IllegalStateException e)
{
- throwable = new LCFException("Illegal state while fetching URI: '"+myUrl+"'",e);
+ throwable = new ACFException("Illegal state while fetching URI: '"+myUrl+"'",e);
statusCode = FETCH_SEQUENCE_ERROR;
if (recordEverything)
dataSession.setResponseCode(statusCode);
@@ -1596,7 +1596,7 @@ public class ThrottledFetcher
{
throw e;
}
- catch (LCFException e)
+ catch (ACFException e)
{
throw e;
}
@@ -1616,7 +1616,7 @@ public class ThrottledFetcher
*@return the response code. This is either an HTTP response code, or one of the codes above.
*/
public int getResponseCode()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
return statusCode;
}
@@ -1625,7 +1625,7 @@ public class ThrottledFetcher
*@return the cookies now in effect from the last fetch.
*/
public LoginCookies getLastFetchCookies()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
return lastFetchCookies;
}
@@ -1635,7 +1635,7 @@ public class ThrottledFetcher
*@return the header value, or null if it doesn't exist.
*/
public String getResponseHeader(String headerName)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
Header h = fetchMethod.getResponseHeader(headerName);
if (h == null)
@@ -1649,10 +1649,10 @@ public class ThrottledFetcher
* to close this stream when done.
*/
public InputStream getResponseBodyStream()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (fetchMethod == null)
- throw new LCFException("Attempt to get a response when there is no method");
+ throw new ACFException("Attempt to get a response when there is no method");
try
{
if (recordEverything)
@@ -1678,7 +1678,7 @@ public class ThrottledFetcher
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen: "+e.getMessage(),e);
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -1698,7 +1698,7 @@ public class ThrottledFetcher
{
if (statusCode > 0)
{
- throwable = new LCFException("Interrupted: "+e.getMessage(),e);
+ throwable = new ACFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
}
}
@@ -1707,7 +1707,7 @@ public class ThrottledFetcher
* describing what was done.
*/
public void doneFetch(IVersionActivity activities)
- throws LCFException
+ throws ACFException
{
if (fetchType != null)
{
@@ -1762,7 +1762,7 @@ public class ThrottledFetcher
/** Close the connection. Call this to end this server connection.
*/
public void close()
- throws LCFException
+ throws ACFException
{
synchronized (poolLock)
{
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/TrustsDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/TrustsDescription.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/TrustsDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/acf/crawler/connectors/webcrawler/TrustsDescription.java Mon Aug 23 18:08:32 2010
@@ -19,7 +19,7 @@
package org.apache.acf.crawler.connectors.webcrawler;
import org.apache.acf.core.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.util.*;
import java.util.regex.*;
@@ -47,7 +47,7 @@ public class TrustsDescription
/** Constructor. Build the description from the ConfigParams. */
public TrustsDescription(ConfigParams configData)
- throws LCFException
+ throws ACFException
{
// Scan, looking for bin description nodes
int i = 0;
@@ -68,7 +68,7 @@ public class TrustsDescription
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new LCFException("Trust regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
+ throw new ACFException("Trust regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
}
if (trustEverything != null && trustEverything.equals("true"))
{
@@ -84,7 +84,7 @@ public class TrustsDescription
}
catch (PatternSyntaxException e)
{
- throw new LCFException("Bad pattern syntax in '"+urlDescription+"': "+e.getMessage(),e);
+ throw new ACFException("Bad pattern syntax in '"+urlDescription+"': "+e.getMessage(),e);
}
}
}
@@ -93,7 +93,7 @@ public class TrustsDescription
/** Given a URL, build the right trust certificate store, or return null if all certs should be accepted.
*/
public IKeystoreManager getTrustStore(String url)
- throws LCFException
+ throws ACFException
{
IKeystoreManager rval = KeystoreManagerFactory.make("");
@@ -133,7 +133,7 @@ public class TrustsDescription
/** Constructor. */
public TrustsItem(Pattern p, String trustStoreString)
- throws LCFException
+ throws ACFException
{
pattern = p;
if (trustStoreString != null)