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/02/17 16:57:35 UTC
svn commit: r911029 [7/19] - in /incubator/lcf/trunk:
modules/connectors/documentum/connector/org/apache/lcf/crawler/authorities/DCTM/
modules/connectors/documentum/connector/org/apache/lcf/crawler/connectors/DCTM/
modules/connectors/documentum/crawler...
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/SequenceCredentials.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/SequenceCredentials.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/SequenceCredentials.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/SequenceCredentials.java Wed Feb 17 15:57:27 2010
@@ -36,6 +36,6 @@
* the case where more than one matching rule is found.
*/
public Iterator findLoginParameters(String documentIdentifier)
- throws MetacartaException;
+ throws LCFException;
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottleDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottleDescription.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottleDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottleDescription.java Wed Feb 17 15:57:27 2010
@@ -43,7 +43,7 @@
/** Constructor. Build the description from the ConfigParams. */
public ThrottleDescription(ConfigParams configData)
- throws MetacartaException
+ throws LCFException
{
// Scan, looking for bin description nodes
int i = 0;
@@ -78,7 +78,7 @@
}
catch (NumberFormatException e)
{
- throw new MetacartaException("Bad number",e);
+ throw new LCFException("Bad number",e);
}
}
}
@@ -95,7 +95,7 @@
}
catch (NumberFormatException e)
{
- throw new MetacartaException("Bad number",e);
+ throw new LCFException("Bad number",e);
}
}
}
@@ -112,7 +112,7 @@
}
catch (NumberFormatException e)
{
- throw new MetacartaException("Bad number: "+e.getMessage(),e);
+ throw new LCFException("Bad number: "+e.getMessage(),e);
}
}
}
@@ -129,7 +129,7 @@
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new MetacartaException("Bin regular expression '"+binDescription+"' is illegal: "+e.getMessage(),e);
+ throw new LCFException("Bin regular expression '"+binDescription+"' is illegal: "+e.getMessage(),e);
}
ThrottleItem ti = new ThrottleItem(p);
ti.setMaxOpenConnections(maxConnectionCount);
@@ -139,7 +139,7 @@
}
catch (PatternSyntaxException e)
{
- throw new MetacartaException("Bad pattern syntax in '"+binDescription+"'",e);
+ throw new LCFException("Bad pattern syntax in '"+binDescription+"'",e);
}
}
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottledFetcher.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottledFetcher.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/ThrottledFetcher.java Wed Feb 17 15:57:27 2010
@@ -22,7 +22,7 @@
import org.apache.lcf.agents.interfaces.*;
import org.apache.lcf.crawler.interfaces.*;
import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
import java.util.*;
import java.io.*;
import java.net.*;
@@ -92,7 +92,7 @@
IKeystoreManager trustStore,
ThrottleDescription throttleDescription, String[] binNames,
int connectionLimit)
- throws MetacartaException
+ throws LCFException
{
// First, create a protocol factory object, if we can
ProtocolFactory myFactory = new ProtocolFactory();
@@ -310,8 +310,8 @@
if (e instanceof Error)
throw (Error)e;
- if (e instanceof MetacartaException)
- throw (MetacartaException)e;
+ if (e instanceof LCFException)
+ throw (LCFException)e;
if (e instanceof WaitException)
{
@@ -341,7 +341,7 @@
continue;
}
- throw new MetacartaException("Unexpected exception encountered: "+e.getMessage(),e);
+ throw new LCFException("Unexpected exception encountered: "+e.getMessage(),e);
}
if (Logging.connectors.isDebugEnabled())
@@ -356,7 +356,7 @@
}
catch (InterruptedException e)
{
- throw new MetacartaException(e.getMessage(),MetacartaException.INTERRUPTED);
+ throw new LCFException(e.getMessage(),LCFException.INTERRUPTED);
}
}
}
@@ -364,7 +364,7 @@
/** Flush connections that have timed out from inactivity. */
public static void flushIdleConnections()
- throws MetacartaException
+ throws LCFException
{
synchronized (poolLock)
{
@@ -781,7 +781,7 @@
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Performing a read wait on bin '"+binName+"' of "+
new Long(waitTime).toString()+" ms.");
- Metacarta.sleep(waitTime);
+ LCF.sleep(waitTime);
}
}
@@ -847,14 +847,14 @@
}
public DataSession getSession(String url)
- throws MetacartaException
+ throws LCFException
{
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 MetacartaException
+ throws LCFException
{
// Open log file
try
@@ -889,7 +889,7 @@
}
catch (IOException e)
{
- throw new MetacartaException("Error recording file info: "+e.getMessage(),e);
+ throw new LCFException("Error recording file info: "+e.getMessage(),e);
}
}
@@ -925,7 +925,7 @@
}
public void endHeader()
- throws MetacartaException
+ throws LCFException
{
documentName = dr.writeResponseRecord(url,responseCode,headerNames,headerValues);
}
@@ -1184,7 +1184,7 @@
* is used solely for logging purposes.
*/
public void beginFetch(String fetchType)
- throws MetacartaException
+ throws LCFException
{
try
{
@@ -1213,7 +1213,7 @@
}
catch (InterruptedException e)
{
- throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted",LCFException.INTERRUPTED);
}
}
@@ -1261,7 +1261,7 @@
/** 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 MetacartaException if a fatal error occurs, or nothing if
+ * error occurs), or LCFException 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.
@@ -1277,7 +1277,7 @@
public void executeFetch(String urlPath, String userAgent, String from, int connectionTimeoutMilliseconds,
int socketTimeoutMilliseconds, boolean redirectOK, String host, FormData formData,
LoginCookies loginCookies)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
StringBuffer sb = new StringBuffer(protocol);
sb.append("://").append(server);
@@ -1410,7 +1410,7 @@
fetchMethod = postMethod;
break;
default:
- throw new MetacartaException("Illegal method type: "+Integer.toString(pageFetchMethod));
+ throw new LCFException("Illegal method type: "+Integer.toString(pageFetchMethod));
}
// Set all appropriate headers and parameters
@@ -1494,7 +1494,7 @@
// 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 MetacartaException("Service unavailable (code "+Integer.toString(statusCode)+")"),
+ throw new ServiceInterruption("Http response temporary error on '"+myUrl+"': "+Integer.toString(statusCode),new LCFException("Service unavailable (code "+Integer.toString(statusCode)+")"),
currentTime + TIME_2HRS, currentTime + TIME_1DAY, -1, false);
case HttpStatus.SC_UNAUTHORIZED:
case HttpStatus.SC_USE_PROXY:
@@ -1527,9 +1527,9 @@
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throwable = new MetacartaException("Interrupted: "+e.getMessage(),e);
+ throwable = new LCFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
- throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted",LCFException.INTERRUPTED);
}
catch (org.apache.commons.httpclient.RedirectException e)
{
@@ -1570,13 +1570,13 @@
// Drop the current connection, and in fact the whole pool, on the floor.
fetchMethod = null;
connManager = null;
- throwable = new MetacartaException("Interrupted: "+e.getMessage(),e);
+ throwable = new LCFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IllegalArgumentException e)
{
- throwable = new MetacartaException("Illegal URI: '"+myUrl+"'",e);
+ throwable = new LCFException("Illegal URI: '"+myUrl+"'",e);
statusCode = FETCH_BAD_URI;
if (recordEverything)
dataSession.setResponseCode(statusCode);
@@ -1584,7 +1584,7 @@
}
catch (IllegalStateException e)
{
- throwable = new MetacartaException("Illegal state while fetching URI: '"+myUrl+"'",e);
+ throwable = new LCFException("Illegal state while fetching URI: '"+myUrl+"'",e);
statusCode = FETCH_SEQUENCE_ERROR;
if (recordEverything)
dataSession.setResponseCode(statusCode);
@@ -1594,7 +1594,7 @@
{
throw e;
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
throw e;
}
@@ -1614,7 +1614,7 @@
*@return the response code. This is either an HTTP response code, or one of the codes above.
*/
public int getResponseCode()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
return statusCode;
}
@@ -1623,7 +1623,7 @@
*@return the cookies now in effect from the last fetch.
*/
public LoginCookies getLastFetchCookies()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
return lastFetchCookies;
}
@@ -1633,7 +1633,7 @@
*@return the header value, or null if it doesn't exist.
*/
public String getResponseHeader(String headerName)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
Header h = fetchMethod.getResponseHeader(headerName);
if (h == null)
@@ -1647,10 +1647,10 @@
* to close this stream when done.
*/
public InputStream getResponseBodyStream()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
if (fetchMethod == null)
- throw new MetacartaException("Attempt to get a response when there is no method");
+ throw new LCFException("Attempt to get a response when there is no method");
try
{
if (recordEverything)
@@ -1676,7 +1676,7 @@
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen: "+e.getMessage(),e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -1696,7 +1696,7 @@
{
if (statusCode > 0)
{
- throwable = new MetacartaException("Interrupted: "+e.getMessage(),e);
+ throwable = new LCFException("Interrupted: "+e.getMessage(),e);
statusCode = FETCH_INTERRUPTED;
}
}
@@ -1705,7 +1705,7 @@
* describing what was done.
*/
public void doneFetch(IVersionActivity activities)
- throws MetacartaException
+ throws LCFException
{
if (fetchType != null)
{
@@ -1760,7 +1760,7 @@
/** Close the connection. Call this to end this server connection.
*/
public void close()
- throws MetacartaException
+ throws LCFException
{
synchronized (poolLock)
{
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/TrustsDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/TrustsDescription.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/TrustsDescription.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/TrustsDescription.java Wed Feb 17 15:57:27 2010
@@ -19,7 +19,7 @@
package org.apache.lcf.crawler.connectors.webcrawler;
import org.apache.lcf.core.interfaces.*;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
import java.util.*;
import java.util.regex.*;
@@ -47,7 +47,7 @@
/** Constructor. Build the description from the ConfigParams. */
public TrustsDescription(ConfigParams configData)
- throws MetacartaException
+ throws LCFException
{
// Scan, looking for bin description nodes
int i = 0;
@@ -68,7 +68,7 @@
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new MetacartaException("Trust regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
+ throw new LCFException("Trust regular expression '"+urlDescription+"' is illegal: "+e.getMessage(),e);
}
if (trustEverything != null && trustEverything.equals("true"))
{
@@ -84,7 +84,7 @@
}
catch (PatternSyntaxException e)
{
- throw new MetacartaException("Bad pattern syntax in '"+urlDescription+"': "+e.getMessage(),e);
+ throw new LCFException("Bad pattern syntax in '"+urlDescription+"': "+e.getMessage(),e);
}
}
}
@@ -93,7 +93,7 @@
/** Given a URL, build the right trust certificate store, or return null if all certs should be accepted.
*/
public IKeystoreManager getTrustStore(String url)
- throws MetacartaException
+ throws LCFException
{
IKeystoreManager rval = KeystoreManagerFactory.make("");
@@ -131,7 +131,7 @@
/** Constructor. */
public TrustsItem(Pattern p, String trustStoreString)
- throws MetacartaException
+ throws LCFException
{
pattern = p;
if (trustStoreString != null)
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/connector/org/apache/lcf/crawler/connectors/webcrawler/WebcrawlerConnector.java Wed Feb 17 15:57:27 2010
@@ -22,7 +22,7 @@
import org.apache.lcf.agents.interfaces.*;
import org.apache.lcf.crawler.interfaces.*;
import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
import org.xml.sax.Attributes;
@@ -291,13 +291,13 @@
*@param threadContext is the current thread context.
*/
public void install(IThreadContext threadContext)
- throws MetacartaException
+ throws LCFException
{
// Install
IDBInterface mainDatabase = DBInterfaceFactory.make(threadContext,
- Metacarta.getMasterDatabaseName(),
- Metacarta.getMasterDatabaseUsername(),
- Metacarta.getMasterDatabasePassword());
+ LCF.getMasterDatabaseName(),
+ LCF.getMasterDatabaseUsername(),
+ LCF.getMasterDatabasePassword());
RobotsManager rm = new RobotsManager(threadContext,mainDatabase);
DNSManager dns = new DNSManager(threadContext,mainDatabase);
@@ -309,7 +309,7 @@
dns.install();
cm.install();
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
mainDatabase.signalRollback();
throw e;
@@ -332,13 +332,13 @@
*@param threadContext is the current thread context.
*/
public void deinstall(IThreadContext threadContext)
- throws MetacartaException
+ throws LCFException
{
// Uninstall
IDBInterface mainDatabase = DBInterfaceFactory.make(threadContext,
- Metacarta.getMasterDatabaseName(),
- Metacarta.getMasterDatabaseUsername(),
- Metacarta.getMasterDatabasePassword());
+ LCF.getMasterDatabaseName(),
+ LCF.getMasterDatabaseUsername(),
+ LCF.getMasterDatabasePassword());
RobotsManager rm = new RobotsManager(threadContext,mainDatabase);
DNSManager dns = new DNSManager(threadContext,mainDatabase);
@@ -350,7 +350,7 @@
rm.deinstall();
dns.deinstall();
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
mainDatabase.signalRollback();
throw e;
@@ -396,15 +396,15 @@
/** Start a session */
protected void getSession()
- throws MetacartaException
+ throws LCFException
{
// Handle the stuff that requires a thread context
if (robotsManager == null || dnsManager == null || cookieManager == null)
{
IDBInterface databaseHandle = DBInterfaceFactory.make(currentContext,
- Metacarta.getMasterDatabaseName(),
- Metacarta.getMasterDatabaseUsername(),
- Metacarta.getMasterDatabasePassword());
+ LCF.getMasterDatabaseName(),
+ LCF.getMasterDatabaseUsername(),
+ LCF.getMasterDatabasePassword());
robotsManager = new RobotsManager(currentContext,databaseHandle);
dnsManager = new DNSManager(currentContext,databaseHandle);
@@ -418,7 +418,7 @@
String emailAddress = params.getParameter(WebcrawlerConfig.PARAMETER_EMAIL);
if (emailAddress == null)
- throw new MetacartaException("Missing email address");
+ throw new LCFException("Missing email address");
userAgent = "ApacheLCFWebCrawler; "+emailAddress+")";
from = emailAddress;
@@ -446,7 +446,7 @@
* in active use.
*/
public void poll()
- throws MetacartaException
+ throws LCFException
{
ThrottledFetcher.flushIdleConnections();
}
@@ -454,7 +454,7 @@
/** Check status of connection.
*/
public String check()
- throws MetacartaException
+ throws LCFException
{
getSession();
return super.check();
@@ -463,7 +463,7 @@
/** Close the connection. Call this before discarding the repository connector.
*/
public void disconnect()
- throws MetacartaException
+ throws LCFException
{
throttleDescription = null;
credentialsDescription = null;
@@ -525,7 +525,7 @@
*/
public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
long startTime, long endTime)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
getSession();
@@ -593,7 +593,7 @@
*/
public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities,
DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
getSession();
@@ -795,7 +795,7 @@
activityResultCode = null;
}
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
connection.noteInterrupted(e);
throw e;
@@ -1144,7 +1144,7 @@
rval[i] = null;
break;
default:
- throw new MetacartaException("Unexpected value for result signal: "+Integer.toString(resultSignal));
+ throw new LCFException("Unexpected value for result signal: "+Integer.toString(resultSignal));
}
}
finally
@@ -1181,7 +1181,7 @@
* 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 MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
getSession();
@@ -1297,20 +1297,20 @@
}
catch (java.net.SocketException e)
{
- throw new MetacartaException("Socket timeout error closing stream: "+e.getMessage(),e);
+ throw new LCFException("Socket timeout error closing stream: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new MetacartaException("Socket connect timeout error closing stream: "+e.getMessage(),e);
+ throw new LCFException("Socket connect timeout error closing stream: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new MetacartaException("IO error closing stream: "+e.getMessage(),e);
+ throw new LCFException("IO error closing stream: "+e.getMessage(),e);
}
}
}
@@ -1340,7 +1340,7 @@
*@param versions is the corresponding set of version identifiers (individual identifiers may be null).
*/
public void releaseDocumentVersions(String[] documentIdentifiers, String[] versions)
- throws MetacartaException
+ throws LCFException
{
int i = 0;
while (i < documentIdentifiers.length)
@@ -1386,7 +1386,7 @@
*@return appropriate status.
*/
protected int lookupIPAddress(String documentIdentifier, IVersionActivity activities, String hostName, long currentTime, StringBuffer ipAddressBuffer)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
String eventName = makeDNSEventName(activities,hostName);
DNSManager.DNSInfo info = dnsManager.lookup(hostName,currentTime);
@@ -1464,7 +1464,7 @@
*/
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 MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// hostNameAndPort is the key for looking up the robots file in the database
String hostNameAndPort = makeRobotsKey(protocol,hostName,port);
@@ -1560,7 +1560,7 @@
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new MetacartaException("Interrupted: "+e2.getMessage(),e2,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -1588,7 +1588,7 @@
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new MetacartaException("Interrupted: "+e2.getMessage(),e2,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -1598,7 +1598,7 @@
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -1621,7 +1621,7 @@
catch (InterruptedIOException e2)
{
//Logging.connectors.warn("IO interruption seen",e2);
- throw new MetacartaException("Interrupted: "+e2.getMessage(),e2,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e2.getMessage(),e2,LCFException.INTERRUPTED);
}
catch (IOException e2)
{
@@ -1666,7 +1666,7 @@
*@return the canonical URL (the document identifier), or null if the url was illegal.
*/
protected String makeDocumentIdentifier(String parentIdentifier, String rawURL, DocumentURLFilter filter)
- throws MetacartaException
+ throws LCFException
{
try
{
@@ -1746,7 +1746,7 @@
/** 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 MetacartaException, java.net.URISyntaxException
+ throws LCFException, 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.
@@ -1961,7 +1961,7 @@
/** Code to check if data is interesting, based on response code and content type.
*/
protected boolean isContentInteresting(String documentIdentifier, int response, String contentType)
- throws MetacartaException
+ throws LCFException
{
// Additional filtering only done if it's a 200 response
if (response != 200)
@@ -1987,7 +1987,7 @@
/** Code to check if an already-fetched document should be ingested.
*/
protected boolean isDataIngestable(String documentIdentifier)
- throws MetacartaException
+ throws LCFException
{
if (cache.getResponseCode(documentIdentifier) != 200)
return false;
@@ -2024,7 +2024,7 @@
/** Find a redirection URI, if it exists */
protected String findRedirectionURI(String currentURI)
- throws MetacartaException
+ throws LCFException
{
FindRedirectionHandler handler = new FindRedirectionHandler(currentURI);
handleRedirects(currentURI,handler);
@@ -2033,7 +2033,7 @@
/** Find matching HTML form data, if present. Return null if not. */
protected FormData findHTMLForm(String currentURI, LoginParameters lp)
- throws MetacartaException
+ throws LCFException
{
if (lp == null || lp.getFormNamePattern() == null)
return null;
@@ -2051,7 +2051,7 @@
/** Find a preferred redirection URI, if it exists */
protected String findPreferredRedirectionURI(String currentURI, LoginParameters lp)
- throws MetacartaException
+ throws LCFException
{
if (lp == null || lp.getPreferredRedirectionPattern() == null)
return null;
@@ -2063,7 +2063,7 @@
/** Find HTML link URI, if present, making sure specified preference is matched. */
protected String findHTMLLinkURI(String currentURI, LoginParameters lp)
- throws MetacartaException
+ throws LCFException
{
if (lp == null || lp.getPreferredLinkPattern() == null)
return null;
@@ -2096,7 +2096,7 @@
/** Override noteDiscoveredLink */
public void noteDiscoveredLink(String rawURL)
- throws MetacartaException
+ throws LCFException
{
if (targetURI == null)
{
@@ -2151,7 +2151,7 @@
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws MetacartaException
+ throws LCFException
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Saw form with name "+((formAttributes.get("name")==null)?"null":"'"+formAttributes.get("name")+"'"));
@@ -2197,7 +2197,7 @@
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws MetacartaException
+ throws LCFException
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("WEB: Saw form element of type '"+inputAttributes.get("type")+"' name '"+inputAttributes.get("name")+"'");
@@ -2207,7 +2207,7 @@
/** Note the end of a form */
public void noteFormEnd()
- throws MetacartaException
+ throws LCFException
{
if (currentFormData != null)
{
@@ -2218,25 +2218,25 @@
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
}
@@ -2533,25 +2533,25 @@
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws MetacartaException
+ throws LCFException
{
}
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws MetacartaException
+ throws LCFException
{
}
/** Note the end of a form */
public void noteFormEnd()
- throws MetacartaException
+ throws LCFException
{
}
/** Override noteDiscoveredLink */
public void noteDiscoveredLink(String rawURL)
- throws MetacartaException
+ throws LCFException
{
if (targetURI == null)
{
@@ -2581,27 +2581,27 @@
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
@@ -2623,7 +2623,7 @@
*@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 MetacartaException
+ throws LCFException
{
// Build a complete url, but don't filter or anything
try
@@ -2694,7 +2694,7 @@
/** Code to extract links from an already-fetched document. */
protected void extractLinks(String documentIdentifier, IProcessActivity activities, DocumentURLFilter filter)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
handleRedirects(documentIdentifier,new ProcessActivityRedirectionHandler(documentIdentifier,activities,filter));
// For html, we don't want any actions, because we don't do form submission.
@@ -2727,7 +2727,7 @@
*@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 MetacartaException
+ throws LCFException
{
String newIdentifier = makeDocumentIdentifier(documentIdentifier,rawURL,filter);
if (newIdentifier != null)
@@ -2766,46 +2766,46 @@
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws MetacartaException
+ throws LCFException
{
}
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws MetacartaException
+ throws LCFException
{
}
/** Note the end of a form */
public void noteFormEnd()
- throws MetacartaException
+ throws LCFException
{
}
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws MetacartaException
+ throws LCFException
{
noteDiscoveredLink(rawURL);
}
@@ -2825,7 +2825,7 @@
*@param rawTtlValue is the raw discovered ttl value. Null indicates we should set the default.
*/
public void noteDiscoveredTtlValue(String rawTtlValue)
- throws MetacartaException
+ throws LCFException
{
long currentTime = System.currentTimeMillis();
Long rescanTime = null;
@@ -2856,7 +2856,7 @@
/** Handle extracting the redirect link from a redirect response. */
protected void handleRedirects(String documentURI, IRedirectionHandler handler)
- throws MetacartaException
+ throws LCFException
{
int responseCode = cache.getResponseCode(documentURI);
if (responseCode == 302 || responseCode == 301)
@@ -2878,7 +2878,7 @@
/** Handle document references from XML. Right now we only understand RSS. */
protected void handleXML(String documentURI, IXMLHandler handler)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
try
{
@@ -2955,7 +2955,7 @@
x.cleanup();
}
}
- catch (MetacartaException e)
+ catch (LCFException 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)
@@ -2973,21 +2973,21 @@
}
catch (java.net.SocketTimeoutException e)
{
- throw new MetacartaException("Socket timeout exception: "+e.getMessage(),e);
+ throw new LCFException("Socket timeout exception: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new MetacartaException("Socket connect timeout exception: "+e.getMessage(),e);
+ throw new LCFException("Socket connect timeout exception: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new MetacartaException("IO error: "+e.getMessage(),e);
+ throw new LCFException("IO error: "+e.getMessage(),e);
}
}
@@ -3020,7 +3020,7 @@
/** Handle the tag beginning to set the correct second-level parsing context */
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
if (qName.equals("rss"))
{
@@ -3049,7 +3049,7 @@
/** Handle the tag ending */
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext context = theStream.getContext();
String tagName = context.getQname();
@@ -3082,7 +3082,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// Handle each channel
if (qName.equals("channel"))
@@ -3096,7 +3096,7 @@
}
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// If it's our channel tag, process global channel information
XMLContext context = theStream.getContext();
@@ -3128,7 +3128,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -3146,7 +3146,7 @@
}
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -3176,7 +3176,7 @@
/** Process this data */
protected void process()
- throws MetacartaException
+ throws LCFException
{
// 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.
@@ -3195,7 +3195,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -3217,7 +3217,7 @@
/** Convert the individual sub-fields of the item context into their final forms */
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -3237,7 +3237,7 @@
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws MetacartaException
+ throws LCFException
{
if (linkField == null || linkField.length() == 0)
linkField = guidField;
@@ -3274,7 +3274,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -3292,7 +3292,7 @@
}
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -3319,7 +3319,7 @@
/** Process this data */
protected void process()
- throws MetacartaException
+ throws LCFException
{
// Deal with the ttlvalue, if it was found
handler.noteDiscoveredTtlValue(ttlValue);
@@ -3336,7 +3336,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -3353,7 +3353,7 @@
/** Convert the individual sub-fields of the item context into their final forms */
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -3369,7 +3369,7 @@
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws MetacartaException
+ throws LCFException
{
if (linkField != null && linkField.length() > 0)
{
@@ -3403,7 +3403,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("ttl"))
@@ -3421,7 +3421,7 @@
}
protected void endTag()
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
XMLContext theContext = theStream.getContext();
String theTag = theContext.getQname();
@@ -3448,7 +3448,7 @@
/** Process this data */
protected void process()
- throws MetacartaException
+ throws LCFException
{
// 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.
@@ -3466,7 +3466,7 @@
}
protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes atts)
- throws MetacartaException, ServiceInterruption
+ throws LCFException, ServiceInterruption
{
// The tags we care about are "ttl" and "item", nothing else.
if (qName.equals("link"))
@@ -3484,7 +3484,7 @@
/** Process the data accumulated for this item */
public void process(IXMLHandler handler)
- throws MetacartaException
+ throws LCFException
{
if (linkField != null && linkField.length() > 0)
{
@@ -3502,7 +3502,7 @@
/** Handle document references from HTML */
protected void handleHTML(String documentURI, IHTMLHandler handler)
- throws MetacartaException
+ throws LCFException
{
int responseCode = cache.getResponseCode(documentURI);
if (responseCode != 200)
@@ -3610,21 +3610,21 @@
}
catch (SocketTimeoutException e)
{
- throw new MetacartaException("Socket timeout exception: "+e.getMessage(),e);
+ throw new LCFException("Socket timeout exception: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new MetacartaException("Socket connect timeout exception: "+e.getMessage(),e);
+ throw new LCFException("Socket connect timeout exception: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new MetacartaException("IO error: "+e.getMessage(),e);
+ throw new LCFException("IO error: "+e.getMessage(),e);
}
}
@@ -3657,7 +3657,7 @@
}
protected void extractLinksFromLine(String line, IHTMLHandler handler, int tagMask)
- throws MetacartaException
+ throws LCFException
{
String lowerLine = line.toLowerCase();
int index = 0;
@@ -3716,7 +3716,7 @@
/** Is the document text, as far as we can tell? */
protected boolean isDocumentText(String documentURI)
- throws MetacartaException
+ throws LCFException
{
try
{
@@ -3751,21 +3751,21 @@
}
catch (SocketTimeoutException e)
{
- throw new MetacartaException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
+ throw new LCFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
}
catch (org.apache.commons.httpclient.ConnectTimeoutException e)
{
- throw new MetacartaException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
+ throw new LCFException("Socket timeout exception accessing cached document: "+e.getMessage(),e);
}
catch (InterruptedIOException e)
{
//Logging.connectors.warn("IO interruption seen",e);
- throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+ throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
}
catch (IOException e)
{
- throw new MetacartaException("IO exception accessing cached document: "+e.getMessage(),e);
+ throw new LCFException("IO exception accessing cached document: "+e.getMessage(),e);
}
}
@@ -3850,7 +3850,7 @@
* list.
*/
protected static void compileList(ArrayList output, ArrayList input)
- throws MetacartaException
+ throws LCFException
{
int i = 0;
while (i < input.size())
@@ -3862,7 +3862,7 @@
}
catch (PatternSyntaxException e)
{
- throw new MetacartaException("Mapping regular expression '"+inputString+"' is illegal: "+e.getMessage(),e);
+ throw new LCFException("Mapping regular expression '"+inputString+"' is illegal: "+e.getMessage(),e);
}
}
}
@@ -3881,7 +3881,7 @@
/** Get the trust store for a given document identifier (URL) */
protected IKeystoreManager getTrustStore(String documentIdentifier)
- throws MetacartaException
+ throws LCFException
{
return trustsDescription.getTrustStore(documentIdentifier);
}
@@ -3916,7 +3916,7 @@
/** Read a document specification to yield a map of name/value pairs for metadata */
protected static ArrayList findMetadata(DocumentSpecification spec)
- throws MetacartaException
+ throws LCFException
{
ArrayList rval = new ArrayList();
int i = 0;
@@ -4197,7 +4197,7 @@
* will thus cause the include or exclude regexp to be skipped.
*/
public DocumentURLFilter(DocumentSpecification spec)
- throws MetacartaException
+ throws LCFException
{
String includes = "";
String excludes = "";
@@ -4280,7 +4280,7 @@
}
catch (java.util.regex.PatternSyntaxException e)
{
- throw new MetacartaException("Canonicalization regular expression '"+urlRegexp+"' is illegal: "+e.getMessage(),e);
+ throw new LCFException("Canonicalization regular expression '"+urlRegexp+"' is illegal: "+e.getMessage(),e);
}
}
}
@@ -4346,7 +4346,7 @@
*@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 MetacartaException;
+ throws LCFException;
}
/** This interface describes the functionality needed by an redirection processor in order to handle a redirection.
@@ -4363,7 +4363,7 @@
*@param rawTtlValue is the raw discovered ttl value.
*/
public void noteDiscoveredTtlValue(String rawTtlValue)
- throws MetacartaException;
+ throws LCFException;
}
@@ -4373,31 +4373,31 @@
{
/** Note the start of a form */
public void noteFormStart(Map formAttributes)
- throws MetacartaException;
+ throws LCFException;
/** Note an input tag */
public void noteFormInput(Map inputAttributes)
- throws MetacartaException;
+ throws LCFException;
/** Note the end of a form */
public void noteFormEnd()
- throws MetacartaException;
+ throws LCFException;
/** Note discovered href */
public void noteAHREF(String rawURL)
- throws MetacartaException;
+ throws LCFException;
/** Note discovered href */
public void noteLINKHREF(String rawURL)
- throws MetacartaException;
+ throws LCFException;
/** Note discovered IMG SRC */
public void noteIMGSRC(String rawURL)
- throws MetacartaException;
+ throws LCFException;
/** Note discovered FRAME SRC */
public void noteFRAMESRC(String rawURL)
- throws MetacartaException;
+ throws LCFException;
}
// HTML parsing classes and constants
@@ -4497,7 +4497,7 @@
/** 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 MetacartaException
+ throws LCFException
{
// 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);
@@ -4785,24 +4785,24 @@
currentValueBuffer.append(thisChar);
break;
default:
- throw new MetacartaException("Invalid state: "+Integer.toString(currentState));
+ throw new LCFException("Invalid state: "+Integer.toString(currentState));
}
}
protected void noteTag(String tagName, Map attributes)
- throws MetacartaException
+ throws LCFException
{
Logging.connectors.debug(" Saw tag '"+tagName+"'");
}
protected void noteEndTag(String tagName)
- throws MetacartaException
+ throws LCFException
{
Logging.connectors.debug(" Saw end tag '"+tagName+"'");
}
public void finishUp()
- throws MetacartaException
+ throws LCFException
{
// Does nothing
}
@@ -4827,7 +4827,7 @@
// Override methods having to do with notification of tag discovery
protected void noteTag(String tagName, Map attributes)
- throws MetacartaException
+ throws LCFException
{
super.noteTag(tagName,attributes);
switch (scriptParseState)
@@ -4842,12 +4842,12 @@
// Skip all tags until we see the end script one.
break;
default:
- throw new MetacartaException("Unknown script parse state: "+Integer.toString(scriptParseState));
+ throw new LCFException("Unknown script parse state: "+Integer.toString(scriptParseState));
}
}
protected void noteEndTag(String tagName)
- throws MetacartaException
+ throws LCFException
{
super.noteEndTag(tagName);
switch (scriptParseState)
@@ -4866,12 +4866,12 @@
}
protected void noteNonscriptTag(String tagName, Map attributes)
- throws MetacartaException
+ throws LCFException
{
}
protected void noteNonscriptEndTag(String tagName)
- throws MetacartaException
+ throws LCFException
{
}
@@ -4890,7 +4890,7 @@
}
protected void noteNonscriptTag(String tagName, Map attributes)
- throws MetacartaException
+ throws LCFException
{
super.noteNonscriptTag(tagName,attributes);
String lowerTagName = tagName.toLowerCase();
@@ -4944,7 +4944,7 @@
// Override methods having to do with notification of tag discovery
protected void noteNonscriptTag(String tagName, Map attributes)
- throws MetacartaException
+ throws LCFException
{
super.noteNonscriptTag(tagName,attributes);
switch (formParseState)
@@ -5011,12 +5011,12 @@
case FORMPARSESTATE_IN_TEXTAREA:
break;
default:
- throw new MetacartaException("Unknown form parse state: "+Integer.toString(formParseState));
+ throw new LCFException("Unknown form parse state: "+Integer.toString(formParseState));
}
}
protected void noteNonscriptEndTag(String tagName)
- throws MetacartaException
+ throws LCFException
{
super.noteNonscriptEndTag(tagName);
switch (formParseState)
@@ -5039,7 +5039,7 @@
formParseState = FORMPARSESTATE_IN_FORM;
break;
default:
- throw new MetacartaException("Unknown form parse state: "+Integer.toString(formParseState));
+ throw new LCFException("Unknown form parse state: "+Integer.toString(formParseState));
}
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/editconfig.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/editconfig.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/editconfig.jsp (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/editconfig.jsp Wed Feb 17 15:57:27 2010
@@ -296,7 +296,7 @@
if (domain == null)
domain = "";
String userName = cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME);
- String password = org.apache.lcf.crawler.system.Metacarta.deobfuscate(cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
+ String password = org.apache.lcf.crawler.system.LCF.deobfuscate(cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
// It's prefix will be...
String prefix = "acredential_" + Integer.toString(accessCounter);
@@ -486,7 +486,7 @@
<nobr><input type="text" size="15" name='<%=authParamPrefix+"_value"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(value)%>'/></nobr>
</td>
<td class="formcolumncell">
- <nobr><input type="password" size="15" name='<%=authParamPrefix+"_password"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(org.apache.lcf.crawler.system.Metacarta.deobfuscate(password))%>'/></nobr>
+ <nobr><input type="password" size="15" name='<%=authParamPrefix+"_password"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(org.apache.lcf.crawler.system.LCF.deobfuscate(password))%>'/></nobr>
</td>
</tr>
<%
@@ -607,7 +607,7 @@
if (domain == null)
domain = "";
String userName = cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME);
- String password = org.apache.lcf.crawler.system.Metacarta.deobfuscate(cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
+ String password = org.apache.lcf.crawler.system.LCF.deobfuscate(cn.getAttributeValue(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD));
// It's prefix will be...
String prefix = "acredential_" + Integer.toString(accessCounter);
@@ -685,7 +685,7 @@
%>
<input type="hidden" name='<%=authParamPrefix+"_param"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(param)%>'/>
<input type="hidden" name='<%=authParamPrefix+"_value"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(value)%>'/>
-<input type="hidden" name='<%=authParamPrefix+"_password"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(org.apache.lcf.crawler.system.Metacarta.deobfuscate(password))%>'/>
+<input type="hidden" name='<%=authParamPrefix+"_password"%>' value='<%=org.apache.lcf.ui.util.Encoder.attributeEscape(org.apache.lcf.crawler.system.LCF.deobfuscate(password))%>'/>
<%
paramCounter++;
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/postconfig.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/postconfig.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/postconfig.jsp (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/postconfig.jsp Wed Feb 17 15:57:27 2010
@@ -166,7 +166,7 @@
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_DOMAIN,domain);
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME,userName);
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,
- org.apache.lcf.crawler.system.Metacarta.obfuscate(password));
+ org.apache.lcf.crawler.system.LCF.obfuscate(password));
parameters.addChild(parameters.getChildCount(),node);
}
i++;
@@ -185,7 +185,7 @@
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_DOMAIN,domain);
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_USERNAME,userName);
node.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,
- org.apache.lcf.crawler.system.Metacarta.obfuscate(password));
+ org.apache.lcf.crawler.system.LCF.obfuscate(password));
parameters.addChild(parameters.getChildCount(),node);
}
}
@@ -254,7 +254,7 @@
if (value != null && value.length() > 0)
paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_VALUE,value);
if (password != null && password.length() > 0)
- paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.lcf.crawler.system.Metacarta.obfuscate(password));
+ paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.lcf.crawler.system.LCF.obfuscate(password));
authPageNode.addChild(authPageNode.getChildCount(),paramNode);
}
z++;
@@ -272,7 +272,7 @@
if (value != null && value.length() > 0)
paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_VALUE,value);
if (password != null && password.length() > 0)
- paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.lcf.crawler.system.Metacarta.obfuscate(password));
+ paramNode.setAttribute(org.apache.lcf.crawler.connectors.webcrawler.WebcrawlerConfig.ATTR_PASSWORD,org.apache.lcf.crawler.system.LCF.obfuscate(password));
authPageNode.addChild(authPageNode.getChildCount(),paramNode);
}
}
Modified: incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/viewspec.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/viewspec.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/viewspec.jsp (original)
+++ incubator/lcf/trunk/modules/connectors/webcrawler/crawler-ui/connectors/webcrawler/viewspec.jsp Wed Feb 17 15:57:27 2010
@@ -120,7 +120,7 @@
}
catch (java.io.IOException e)
{
- throw new MetacartaException("IO error: "+e.getMessage(),e);
+ throw new LCFException("IO error: "+e.getMessage(),e);
}
%>
</td>
@@ -240,7 +240,7 @@
}
catch (java.io.IOException e)
{
- throw new MetacartaException("IO error: "+e.getMessage(),e);
+ throw new LCFException("IO error: "+e.getMessage(),e);
}
%>
</td>
@@ -282,7 +282,7 @@
}
catch (java.io.IOException e)
{
- throw new MetacartaException("IO error: "+e.getMessage(),e);
+ throw new LCFException("IO error: "+e.getMessage(),e);
}
%>
</td>
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentRun.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentRun.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentRun.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentRun.java Wed Feb 17 15:57:27 2010
@@ -41,10 +41,10 @@
System.exit(1);
}
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
// Create a file to indicate that we're running
- String synchDirectory = Metacarta.getProperty(Metacarta.synchDirectoryProperty);
+ String synchDirectory = LCF.getProperty(LCF.synchDirectoryProperty);
File synchFile = null;
if (synchDirectory != null)
{
@@ -65,11 +65,11 @@
break;
// Start whatever agents need to be started
- Metacarta.startAgents(tc);
+ LCF.startAgents(tc);
try
{
- Metacarta.sleep(5000);
+ LCF.sleep(5000);
}
catch (InterruptedException e)
{
@@ -80,10 +80,10 @@
}
finally
{
- Metacarta.stopAgents(tc);
+ LCF.stopAgents(tc);
}
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
Logging.root.error("Exception: "+e.getMessage(),e);
e.printStackTrace();
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentStop.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentStop.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentStop.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/AgentStop.java Wed Feb 17 15:57:27 2010
@@ -41,10 +41,10 @@
System.exit(1);
}
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
// Create a file to indicate that we're stopping
- String synchDirectory = Metacarta.getProperty(Metacarta.synchDirectoryProperty);
+ String synchDirectory = LCF.getProperty(LCF.synchDirectoryProperty);
File synchFile = null;
if (synchDirectory != null)
{
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Install.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Install.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Install.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Install.java Wed Feb 17 15:57:27 2010
@@ -43,12 +43,12 @@
try
{
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
- Metacarta.installTables(tc);
+ LCF.installTables(tc);
System.err.println("Agent tables installed");
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Register.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Register.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Register.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/Register.java Wed Feb 17 15:57:27 2010
@@ -43,13 +43,13 @@
String className = args[0];
try
{
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IAgentManager mgr = AgentManagerFactory.make(tc);
mgr.registerAgent(className);
System.err.println("Successfully registered agent '"+className+"'");
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/RegisterOutput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/RegisterOutput.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/RegisterOutput.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/RegisterOutput.java Wed Feb 17 15:57:27 2010
@@ -45,12 +45,12 @@
try
{
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IDBInterface database = DBInterfaceFactory.make(tc,
- Metacarta.getMasterDatabaseName(),
- Metacarta.getMasterDatabaseUsername(),
- Metacarta.getMasterDatabasePassword());
+ LCF.getMasterDatabaseName(),
+ LCF.getMasterDatabaseUsername(),
+ LCF.getMasterDatabasePassword());
IOutputConnectorManager mgr = OutputConnectorManagerFactory.make(tc);
IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc);
// Deregistration should be done in a transaction
@@ -65,7 +65,7 @@
// For all connection names, notify all agents of the registration
AgentManagerFactory.noteOutputConnectorRegistration(tc,connectionNames);
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
database.signalRollback();
throw e;
@@ -82,7 +82,7 @@
System.err.println("Successfully registered output connector '"+className+"'");
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
e.printStackTrace();
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SetupAgentConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SetupAgentConnection.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SetupAgentConnection.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SetupAgentConnection.java Wed Feb 17 15:57:27 2010
@@ -60,8 +60,8 @@
is.close();
}
- p.setProperty(Metacarta.ingestURIProperty,args[1]);
- p.setProperty(Metacarta.ingestUserProperty,args[2]);
+ p.setProperty(LCF.ingestURIProperty,args[1]);
+ p.setProperty(LCF.ingestUserProperty,args[2]);
String password;
if (args.length > 3)
password = args[3];
@@ -91,7 +91,7 @@
}
}
- p.setProperty(Metacarta.ingestPasswordProperty,Metacarta.obfuscate(password));
+ p.setProperty(LCF.ingestPasswordProperty,LCF.obfuscate(password));
// Write it out.
OutputStream os = new FileOutputStream(f);
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SynchronizeAll.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SynchronizeAll.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SynchronizeAll.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/SynchronizeAll.java Wed Feb 17 15:57:27 2010
@@ -42,7 +42,7 @@
try
{
- Metacarta.initializeEnvironment();
+ LCF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IAgentManager mgr = AgentManagerFactory.make(tc);
String[] classnames = mgr.getAllAgents();
@@ -54,7 +54,7 @@
{
AgentFactory.make(tc,classname);
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
// Couldn't instantiate the agent: Remove from database table
mgr.removeAgent(classname);
@@ -62,7 +62,7 @@
}
System.err.println("Successfully synchronized all agents");
}
- catch (MetacartaException e)
+ catch (LCFException e)
{
e.printStackTrace();
System.exit(1);