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 [2/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/filenet/connector/org/apache/acf/crawler/connectors/filenet/FilenetConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/filenet/connector/org/apache/acf/crawler/connectors/filenet/FilenetConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/filenet/connector/org/apache/acf/crawler/connectors/filenet/FilenetConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/filenet/connector/org/apache/acf/crawler/connectors/filenet/FilenetConnector.java Mon Aug 23 18:08:32 2010
@@ -23,7 +23,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 org.apache.acf.crawler.common.filenet.*;
@@ -141,30 +141,30 @@ public class FilenetConnector extends or
/** Get a DFC session. This will be done every time it is needed.
*/
protected void getSession()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (session == null)
{
// Check for parameter validity
if (userID == null || userID.length() < 1)
- throw new LCFException("Parameter "+CONFIG_PARAM_USERID+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_USERID+" required but not set");
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("FileNet: UserID = '" + userID + "'");
if (password == null || password.length() < 1)
- throw new LCFException("Parameter "+CONFIG_PARAM_PASSWORD+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_PASSWORD+" required but not set");
Logging.connectors.debug("FileNet: Password exists");
if (objectStore == null || objectStore.length() < 1)
- throw new LCFException("Parameter "+CONFIG_PARAM_OBJECTSTORE+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_OBJECTSTORE+" required but not set");
if (serverProtocol == null || serverProtocol.length() < 1)
- throw new LCFException("Parameter "+CONFIG_PARAM_SERVERPROTOCOL+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_SERVERPROTOCOL+" required but not set");
if (serverHostname == null || serverHostname.length() < 1)
- throw new LCFException("Parameter "+CONFIG_PARAM_SERVERHOSTNAME+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_SERVERHOSTNAME+" required but not set");
if (serverPort != null && serverPort.length() < 1)
serverPort = null;
@@ -173,10 +173,10 @@ public class FilenetConnector extends or
Logging.connectors.debug("FileNet: Server URI is '"+serverWSIURI+"'");
if (docUrlServerProtocol == null || docUrlServerProtocol.length() == 0)
- throw new LCFException("Parameter "+CONFIG_PARAM_URLPROTOCOL+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_URLPROTOCOL+" required but not set");
if (docUrlServerName == null || docUrlServerName.length() == 0)
- throw new LCFException("Parameter "+CONFIG_PARAM_URLHOSTNAME+" required but not set");
+ throw new ACFException("Parameter "+CONFIG_PARAM_URLHOSTNAME+" required but not set");
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("FileNet: Document base URI is '"+docURIPrefix+"'");
@@ -205,11 +205,11 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (java.net.MalformedURLException e)
{
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
catch (NotBoundException e)
{
@@ -222,7 +222,7 @@ public class FilenetConnector extends or
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
// Treat this as a transient problem
Logging.connectors.warn("FileNet: Transient remote exception creating session: "+e.getMessage(),e);
currentTime = System.currentTimeMillis();
@@ -237,7 +237,7 @@ public class FilenetConnector extends or
currentTime = System.currentTimeMillis();
throw new ServiceInterruption(e.getMessage(),e,currentTime + 300000L,currentTime + 12 * 60 * 60000L,-1,true);
}
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
@@ -279,7 +279,7 @@ public class FilenetConnector extends or
/** Release the session, if it's time.
*/
protected void releaseCheck()
- throws LCFException
+ throws ACFException
{
if (lastSessionFetch == -1L)
return;
@@ -308,13 +308,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
session = null;
lastSessionFetch = -1L;
// Treat this as a transient problem
@@ -432,7 +432,7 @@ public class FilenetConnector extends or
*@return the connection's status as a displayable string.
*/
public String check()
- throws LCFException
+ throws ACFException
{
try
{
@@ -447,14 +447,14 @@ public class FilenetConnector extends or
if (e.getType() == FilenetException.TYPE_SERVICEINTERRUPTION)
throw new ServiceInterruption(e.getMessage(),0L);
else
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
catch (ServiceInterruption e)
{
return "Connection temporarily failed: "+e.getMessage();
}
- catch (LCFException e)
+ catch (ACFException e)
{
return "Connection failed: "+e.getMessage();
}
@@ -464,7 +464,7 @@ public class FilenetConnector extends or
* in active use.
*/
public void poll()
- throws LCFException
+ throws ACFException
{
releaseCheck();
}
@@ -472,7 +472,7 @@ public class FilenetConnector extends or
/** Disconnect from Filenet.
*/
public void disconnect()
- throws LCFException
+ throws ACFException
{
if (session != null)
{
@@ -497,13 +497,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
session = null;
lastSessionFetch = -1L;
// Treat this as a transient problem
@@ -541,13 +541,13 @@ public class FilenetConnector extends or
*@param input is the request object.
*/
public void executeCommand(Configuration output, String command, Configuration input)
- throws LCFException
+ throws ACFException
{
if (command.equals("documentclass/metadatafields"))
{
- String documentClass = LCF.getRootArgument(input,"document_class");
+ String documentClass = ACF.getRootArgument(input,"document_class");
if (documentClass == null)
- throw new LCFException("Missing required field 'document_class'");
+ throw new ACFException("Missing required field 'document_class'");
try
{
MetadataFieldDefinition[] metaFields = getDocumentClassMetadataFieldsDetails(documentClass);
@@ -568,11 +568,11 @@ public class FilenetConnector extends or
}
catch (ServiceInterruption e)
{
- LCF.createServiceInterruptionNode(output,e);
+ ACF.createServiceInterruptionNode(output,e);
}
- catch (LCFException e)
+ catch (ACFException e)
{
- LCF.createErrorNode(output,e);
+ ACF.createErrorNode(output,e);
}
}
else if (command.equals("documentclass/list"))
@@ -597,11 +597,11 @@ public class FilenetConnector extends or
}
catch (ServiceInterruption e)
{
- LCF.createServiceInterruptionNode(output,e);
+ ACF.createServiceInterruptionNode(output,e);
}
- catch (LCFException e)
+ catch (ACFException e)
{
- LCF.createErrorNode(output,e);
+ ACF.createErrorNode(output,e);
}
}
else if (command.equals("mimetype/list"))
@@ -620,11 +620,11 @@ public class FilenetConnector extends or
}
catch (ServiceInterruption e)
{
- LCF.createServiceInterruptionNode(output,e);
+ ACF.createServiceInterruptionNode(output,e);
}
- catch (LCFException e)
+ catch (ACFException e)
{
- LCF.createErrorNode(output,e);
+ ACF.createErrorNode(output,e);
}
}
else
@@ -640,7 +640,7 @@ public class FilenetConnector extends or
*/
public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec,
long startTime, long endTime)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
Logging.connectors.debug("FileNet: Inside addSeedDocuments");
@@ -746,7 +746,7 @@ public class FilenetConnector extends or
if (e.getType() == FilenetException.TYPE_SERVICEINTERRUPTION)
throw new ServiceInterruption(e.getMessage(),e,currentTime+300000L,currentTime+12*60*60000L,-1,true);
else
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
@@ -836,7 +836,7 @@ public class FilenetConnector extends or
*/
public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activity,
DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
Logging.connectors.debug("FileNet: Inside getDocumentVersions");
@@ -1052,7 +1052,7 @@ public class FilenetConnector extends or
rval[i] = null;
}
else
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
else
@@ -1102,7 +1102,7 @@ public class FilenetConnector extends or
*/
public void processDocuments(String[] documentIdentifiers, String[] documentVersions,
IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
Logging.connectors.debug("FileNet: Inside processDocuments");
@@ -1135,7 +1135,7 @@ public class FilenetConnector extends or
}
catch (NumberFormatException e)
{
- throw new LCFException("Bad number in identifier: "+documentIdentifier,e);
+ throw new ACFException("Bad number in identifier: "+documentIdentifier,e);
}
// Unpack the information in the document version
@@ -1199,7 +1199,7 @@ public class FilenetConnector extends or
{
activities.recordActivity(new Long(startTime),ACTIVITY_FETCH,
null,documentIdentifier,"Miscellaneous error",e.getMessage(),null);
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
@@ -1262,7 +1262,7 @@ public class FilenetConnector extends or
}
catch (InterruptedIOException e)
{
- throw new LCFException(e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException(e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -1278,12 +1278,12 @@ public class FilenetConnector extends or
}
catch (InterruptedIOException e)
{
- throw new LCFException(e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException(e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
Logging.connectors.error("FileNet: IO Exception ingesting document '"+documentIdentifier+"': "+e.getMessage(),e);
- throw new LCFException("IO Exception ingesting document '"+documentIdentifier+"': "+e.getMessage(),e);
+ throw new ACFException("IO Exception ingesting document '"+documentIdentifier+"': "+e.getMessage(),e);
}
}
}
@@ -1338,7 +1338,7 @@ public class FilenetConnector extends or
}
else
{
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
}
@@ -1355,7 +1355,7 @@ public class FilenetConnector extends or
*@param versions is the corresponding set of version identifiers (individual identifiers may be null).
*/
public void releaseDocumentVersions(String[] documentIdentifiers, String[] versions)
- throws LCFException
+ throws ACFException
{
// Nothing to do
}
@@ -1383,7 +1383,7 @@ public class FilenetConnector extends or
*@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("Object Store");
@@ -1487,7 +1487,7 @@ public class FilenetConnector extends or
*@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 userID = parameters.getParameter(org.apache.acf.crawler.connectors.filenet.FilenetConnector.CONFIG_PARAM_USERID);
if (userID == null)
@@ -1667,7 +1667,7 @@ public class FilenetConnector extends or
*@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 serverprotocol = variableContext.getParameter("serverprotocol");
if (serverprotocol != null)
@@ -1727,7 +1727,7 @@ public class FilenetConnector extends or
*@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"+
@@ -1775,7 +1775,7 @@ public class FilenetConnector extends or
*@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector.
*/
public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, ArrayList tabsArray)
- throws LCFException, IOException
+ throws ACFException, IOException
{
tabsArray.add("Document Classes");
tabsArray.add("Mime Types");
@@ -1839,7 +1839,7 @@ public class FilenetConnector extends or
*@param tabName is the current tab name.
*/
public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i;
Iterator iter;
@@ -1882,7 +1882,7 @@ public class FilenetConnector extends or
documentClassFields.put(documentClass,metaFields);
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
message = e.getMessage();
}
@@ -2141,7 +2141,7 @@ public class FilenetConnector extends or
{
mimeTypesArray = getMimeTypes();
}
- catch (LCFException e)
+ catch (ACFException e)
{
message = e.getMessage();
}
@@ -2335,7 +2335,7 @@ public class FilenetConnector extends or
*@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
*/
public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
- throws LCFException
+ throws ACFException
{
String[] x;
String y;
@@ -2525,7 +2525,7 @@ public class FilenetConnector extends or
*@param ds is the current document specification for this job.
*/
public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i;
Iterator iter;
@@ -2764,7 +2764,7 @@ public class FilenetConnector extends or
/** Get the set of available document classes, with details */
public DocumentClassDefinition[] getDocumentClassesDetails()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
long currentTime;
try
@@ -2778,13 +2778,13 @@ public class FilenetConnector extends or
if (e.getType() == FilenetException.TYPE_SERVICEINTERRUPTION)
throw new ServiceInterruption(e.getMessage(),e,currentTime+300000L,currentTime+12*60*60000L,-1,true);
else
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
/** Get the set of available metadata fields per document class */
public MetadataFieldDefinition[] getDocumentClassMetadataFieldsDetails(String documentClassName)
- throws ServiceInterruption, LCFException
+ throws ServiceInterruption, ACFException
{
long currentTime;
try
@@ -2798,13 +2798,13 @@ public class FilenetConnector extends or
if (e.getType() == FilenetException.TYPE_SERVICEINTERRUPTION)
throw new ServiceInterruption(e.getMessage(),e,currentTime+300000L,currentTime+12*60*60000L,-1,true);
else
- throw new LCFException(e.getMessage(),e);
+ throw new ACFException(e.getMessage(),e);
}
}
/** Get the set of available mime types */
public String[] getMimeTypes()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
// For now, return the list of mime types we know about
return new String[]
@@ -2898,7 +2898,7 @@ public class FilenetConnector extends or
/** Check connection, with appropriate retries */
protected void checkConnection()
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -2925,13 +2925,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -2980,7 +2980,7 @@ public class FilenetConnector extends or
/** Get document class details, with appropriate retries */
protected DocumentClassDefinition[] getDocumentClassesInfo()
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3007,13 +3007,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -3064,7 +3064,7 @@ public class FilenetConnector extends or
/** Get document class metadata fields details, with appropriate retries */
protected MetadataFieldDefinition[] getDocumentClassMetadataFieldsInfo(String documentClassName)
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3091,13 +3091,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -3149,7 +3149,7 @@ public class FilenetConnector extends or
/** Get matching object id's for a given query */
protected String[] doGetMatchingObjectIds(String sql)
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3176,13 +3176,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -3233,7 +3233,7 @@ public class FilenetConnector extends or
}
protected Integer doGetDocumentContentCount(String documentIdentifier)
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3260,13 +3260,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -3321,7 +3321,7 @@ public class FilenetConnector extends or
/** Get document info */
protected FileInfo doGetDocumentInformation(String docId, HashMap metadataFields)
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3348,13 +3348,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
@@ -3404,7 +3404,7 @@ public class FilenetConnector extends or
/** Get document contents */
protected void doGetDocumentContents(String docId, int elementNumber, String tempFileName)
- throws FilenetException, LCFException, ServiceInterruption
+ throws FilenetException, ACFException, ServiceInterruption
{
while (true)
{
@@ -3431,13 +3431,13 @@ public class FilenetConnector extends or
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (RemoteException e)
{
Throwable e2 = e.getCause();
if (e2 instanceof InterruptedException || e2 instanceof InterruptedIOException)
- throw new LCFException(e2.getMessage(),e2,LCFException.INTERRUPTED);
+ throw new ACFException(e2.getMessage(),e2,ACFException.INTERRUPTED);
if (noSession)
{
currentTime = System.currentTimeMillis();
Modified: incubator/lcf/trunk/modules/connectors/filesystem/connector/org/apache/acf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/filesystem/connector/org/apache/acf/crawler/connectors/filesystem/FileConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/filesystem/connector/org/apache/acf/crawler/connectors/filesystem/FileConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/filesystem/connector/org/apache/acf/crawler/connectors/filesystem/FileConnector.java Mon Aug 23 18:08:32 2010
@@ -106,7 +106,7 @@ public class FileConnector extends org.a
*@return the document uri.
*/
protected String convertToURI(String documentIdentifier)
- throws LCFException
+ throws ACFException
{
//
// Note well: This MUST be a legal URI!!!
@@ -116,7 +116,7 @@ public class FileConnector extends org.a
}
catch (java.io.IOException e)
{
- throw new LCFException("Bad url",e);
+ throw new ACFException("Bad url",e);
}
}
@@ -134,7 +134,7 @@ public class FileConnector extends org.a
*@return the stream of local document identifiers that should be added to the queue.
*/
public IDocumentIdentifierStream getDocumentIdentifiers(DocumentSpecification spec, long startTime, long endTime)
- throws LCFException
+ throws ACFException
{
return new IdentifierStream(spec);
}
@@ -149,7 +149,7 @@ public class FileConnector extends org.a
* will always be processed.
*/
public String[] getDocumentVersions(String[] documentIdentifiers, DocumentSpecification spec)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
String[] rval = new String[documentIdentifiers.length];
int i = 0;
@@ -199,7 +199,7 @@ public class FileConnector extends org.a
* should only find other references, and should not actually call the ingestion methods.
*/
public void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
int i = 0;
while (i < documentIdentifiers.length)
@@ -236,7 +236,7 @@ public class FileConnector extends org.a
{
errorCode = "IO ERROR";
errorDesc = e.getMessage();
- throw new LCFException("IO Error: "+e.getMessage(),e);
+ throw new ACFException("IO Error: "+e.getMessage(),e);
}
}
finally
@@ -284,7 +284,7 @@ public class FileConnector extends org.a
{
errorCode = "IO ERROR";
errorDesc = e.getMessage();
- throw new LCFException("IO Error: "+e.getMessage(),e);
+ throw new ACFException("IO Error: "+e.getMessage(),e);
}
}
finally
@@ -316,7 +316,7 @@ public class FileConnector 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
{
out.print(
"<script type=\"text/javascript\">\n"+
@@ -341,7 +341,7 @@ public class FileConnector 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
{
}
@@ -355,7 +355,7 @@ public class FileConnector 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
{
return null;
}
@@ -368,7 +368,7 @@ public class FileConnector 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
{
}
@@ -380,7 +380,7 @@ public class FileConnector 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, DocumentSpecification ds, ArrayList tabsArray)
- throws LCFException, IOException
+ throws ACFException, IOException
{
tabsArray.add("Paths");
@@ -412,7 +412,7 @@ public class FileConnector extends org.a
*@param tabName is the current tab name.
*/
public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i;
int k;
@@ -605,7 +605,7 @@ public class FileConnector 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, DocumentSpecification ds)
- throws LCFException
+ throws ACFException
{
String x = variableContext.getParameter("pathcount");
if (x != null)
@@ -707,7 +707,7 @@ public class FileConnector extends org.a
*@param ds is the current document specification for this job.
*/
public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
- throws LCFException, IOException
+ throws ACFException, IOException
{
out.print(
"<table class=\"displaytable\">\n"
@@ -766,7 +766,7 @@ public class FileConnector extends org.a
*@return true if it should be included.
*/
protected static boolean checkInclude(File file, String fileName, DocumentSpecification documentSpecification)
- throws LCFException
+ throws ACFException
{
if (Logging.connectors.isDebugEnabled())
{
@@ -861,7 +861,7 @@ public class FileConnector extends org.a
}
catch (IOException e)
{
- throw new LCFException("IO Error",e);
+ throw new ACFException("IO Error",e);
}
}
@@ -871,7 +871,7 @@ public class FileConnector extends org.a
*@param documentSpecification is the specification.
*/
protected static boolean checkIngest(File file, DocumentSpecification documentSpecification)
- throws LCFException
+ throws ACFException
{
// Since the only exclusions at this point are not based on file contents, this is a no-op.
// MHL
@@ -985,7 +985,7 @@ public class FileConnector extends org.a
protected int currentIndex = 0;
public IdentifierStream(DocumentSpecification spec)
- throws LCFException
+ throws ACFException
{
try
{
@@ -1021,7 +1021,7 @@ public class FileConnector extends org.a
}
catch (IOException e)
{
- throw new LCFException("Could not get a canonical path",e);
+ throw new ACFException("Could not get a canonical path",e);
}
}
@@ -1029,7 +1029,7 @@ public class FileConnector extends org.a
*@return the next document identifier, or null if there are no more.
*/
public String getNextIdentifier()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (currentIndex == ids.length)
return null;
@@ -1039,7 +1039,7 @@ public class FileConnector extends org.a
/** Close the stream.
*/
public void close()
- throws LCFException
+ throws ACFException
{
ids = null;
}
Modified: incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/Sanity.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/Sanity.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/Sanity.java (original)
+++ incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/Sanity.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.crawler.connector
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.io.*;
import java.util.*;
Modified: incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/TestBase.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/TestBase.java (original)
+++ incubator/lcf/trunk/modules/connectors/filesystem/tests/org/apache/acf/crawler/connectors/filesystem/tests/TestBase.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.crawler.connector
import org.apache.acf.core.interfaces.*;
import org.apache.acf.agents.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.io.*;
import java.util.*;
Modified: incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/GTSConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/GTSConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/GTSConnector.java (original)
+++ incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/GTSConnector.java Mon Aug 23 18:08:32 2010
@@ -103,7 +103,7 @@ public class GTSConnector extends org.ap
/** Close the connection. Call this before discarding the connection.
*/
public void disconnect()
- throws LCFException
+ throws ACFException
{
poster = null;
super.disconnect();
@@ -111,13 +111,13 @@ public class GTSConnector extends org.ap
/** Set up a session */
protected void getSession()
- throws LCFException
+ throws ACFException
{
if (poster == null)
{
String ingestURI = params.getParameter(GTSConfig.PARAM_INGESTURI);
if (ingestURI == null)
- throw new LCFException("Missing parameter '"+GTSConfig.PARAM_INGESTURI+"'");
+ throw new ACFException("Missing parameter '"+GTSConfig.PARAM_INGESTURI+"'");
String userID = params.getParameter(GTSConfig.PARAM_USERID);
String password = params.getObfuscatedParameter(GTSConfig.PARAM_PASSWORD);
String realm = params.getParameter(GTSConfig.PARAM_REALM);
@@ -129,7 +129,7 @@ public class GTSConnector extends org.ap
*@return the connection's status as a displayable string.
*/
public String check()
- throws LCFException
+ throws ACFException
{
try
{
@@ -206,7 +206,7 @@ public class GTSConnector extends org.ap
*@return true if the mime type is indexable by this connector.
*/
public boolean checkMimeTypeIndexable(String mimeType)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
return (ingestableMimeTypeMap.get(mimeType) != null);
}
@@ -218,7 +218,7 @@ public class GTSConnector extends org.ap
*@return true if the file is indexable.
*/
public boolean checkDocumentIndexable(File localFile)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (!super.checkDocumentIndexable(localFile))
return false;
@@ -242,7 +242,7 @@ public class GTSConnector extends org.ap
* the document will not need to be sent again to the output data store.
*/
public String getOutputDescription(OutputSpecification spec)
- throws LCFException
+ throws ACFException
{
// The information we want in this string is:
// (1) the collection name(s), in sorted order.
@@ -303,7 +303,7 @@ public class GTSConnector extends org.ap
*@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
{
// Establish a session
getSession();
@@ -336,7 +336,7 @@ public class GTSConnector extends org.ap
*@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();
@@ -362,7 +362,7 @@ public class GTSConnector extends org.ap
*@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("Appliance");
out.print(
@@ -408,7 +408,7 @@ public class GTSConnector extends org.ap
*@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 ingestURI = parameters.getParameter(org.apache.acf.agents.output.gts.GTSConfig.PARAM_INGESTURI);
if (ingestURI == null)
@@ -480,7 +480,7 @@ public class GTSConnector extends org.ap
*@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 ingestURI = variableContext.getParameter("ingesturi");
if (ingestURI != null)
@@ -509,7 +509,7 @@ public class GTSConnector extends org.ap
*@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(
"\n"+
@@ -559,7 +559,7 @@ public class GTSConnector extends org.ap
*@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("Collections");
tabsArray.add("Template");
@@ -593,7 +593,7 @@ public class GTSConnector extends org.ap
*@param tabName is the current tab name.
*/
public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os, String tabName)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i = 0;
String collectionName = null;
@@ -671,7 +671,7 @@ public class GTSConnector extends org.ap
*@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
{
// Collection name
String collectionName = variableContext.getParameter("gts_collectionname");
@@ -722,7 +722,7 @@ public class GTSConnector extends org.ap
*@param os is the current output specification for this job.
*/
public void viewSpecification(IHTTPOutput out, OutputSpecification os)
- throws LCFException, IOException
+ throws ACFException, IOException
{
int i = 0;
String collectionName = null;
@@ -888,7 +888,7 @@ public class GTSConnector extends org.ap
* The code here has been lifted algorithmically from products/ShareCrawler/Fingerprinter.pas.
*/
protected static int fingerprint(File file)
- throws LCFException
+ throws ACFException
{
try
{
@@ -962,7 +962,7 @@ public class GTSConnector extends org.ap
}
catch (InterruptedIOException e)
{
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (IOException e)
{
@@ -1003,7 +1003,7 @@ public class GTSConnector extends org.ap
* does not seem to be an OLE compound document.
*/
protected static String getAppName(File documentPath)
- throws LCFException
+ throws ACFException
{
try
{
@@ -1030,7 +1030,7 @@ public class GTSConnector extends org.ap
}
catch (InterruptedIOException e)
{
- throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
}
catch (Throwable e)
{
Modified: incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/HttpPoster.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/HttpPoster.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/HttpPoster.java (original)
+++ incubator/lcf/trunk/modules/connectors/gts/connector/org/apache/acf/agents/output/gts/HttpPoster.java Mon Aug 23 18:08:32 2010
@@ -81,7 +81,7 @@ public class HttpPoster
{
secureSocketFactory = getSecureSocketFactory();
}
- catch (LCFException e)
+ catch (ACFException e)
{
// If we can't create, print and fail
e.printStackTrace();
@@ -96,7 +96,7 @@ public class HttpPoster
* @param postURI the uri to post the request to
*/
public HttpPoster(String realm, String userID, String password, String postURI)
- throws LCFException
+ throws ACFException
{
if (userID != null && userID.length() > 0 && password != null)
{
@@ -106,7 +106,7 @@ public class HttpPoster
}
catch (java.io.UnsupportedEncodingException e)
{
- throw new LCFException("Couldn't convert to utf-8 bytes",e);
+ throw new ACFException("Couldn't convert to utf-8 bytes",e);
}
this.realm = realm;
}
@@ -121,7 +121,7 @@ public class HttpPoster
}
catch (MalformedURLException murl)
{
- throw new LCFException("Bad url",murl);
+ throw new ACFException("Bad url",murl);
}
// set the port
@@ -136,16 +136,16 @@ public class HttpPoster
port = 80;
}
- String x = LCF.getProperty(ingestBufferSizeProperty);
+ String x = ACF.getProperty(ingestBufferSizeProperty);
if (x != null && x.length() > 0)
buffersize = new Integer(x).intValue();
- x = LCF.getProperty(ingestResponseRetryCount);
+ x = ACF.getProperty(ingestResponseRetryCount);
if (x != null && x.length() > 0)
responseRetries = new Integer(x).intValue();
- x = LCF.getProperty(ingestResponseRetryInterval);
+ x = ACF.getProperty(ingestResponseRetryInterval);
if (x != null && x.length() > 0)
responseRetryWait = new Long(x).longValue();
- x = LCF.getProperty(ingestRescheduleInterval);
+ x = ACF.getProperty(ingestRescheduleInterval);
if (x != null && x.length() > 0)
interruptionRetryTime = new Long(x).longValue();
}
@@ -155,12 +155,12 @@ public class HttpPoster
* @param documentURI is the document's uri.
* @param document is the document structure to ingest.
* @return true if the ingestion was successful, or false if the ingestion is illegal.
- * @throws LCFException, ServiceInterruption
+ * @throws ACFException, ServiceInterruption
*/
public boolean indexPost(String documentURI,
String[] collections, String documentTemplate, String authorityNameString,
RepositoryDocument document, IOutputAddActivity activities)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
StringBuffer aclXml = new StringBuffer();
writeACLs(aclXml,"share",document.getShareACL(),document.getShareDenyACL(),authorityNameString,activities);
@@ -205,8 +205,8 @@ public class HttpPoster
{
if (thr instanceof ServiceInterruption)
throw (ServiceInterruption)thr;
- if (thr instanceof LCFException)
- throw (LCFException)thr;
+ if (thr instanceof ACFException)
+ throw (ACFException)thr;
if (thr instanceof IOException)
throw (IOException)thr;
if (thr instanceof RuntimeException)
@@ -219,7 +219,7 @@ public class HttpPoster
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
}
catch (java.net.SocketTimeoutException ioe)
@@ -254,11 +254,11 @@ public class HttpPoster
// Sleep for a time, and retry
try
{
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
}
catch (InterruptedException e)
{
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
ioErrorRetry--;
@@ -270,7 +270,7 @@ public class HttpPoster
/** Write acls into a stringbuffer */
protected static void writeACLs(StringBuffer aclXml, String type, String[] acl, String[] denyAcl, String authorityNameString, IOutputAddActivity activities)
- throws LCFException
+ throws ACFException
{
if (acl != null && acl.length > 0 || denyAcl != null && denyAcl.length > 0)
{
@@ -306,7 +306,7 @@ public class HttpPoster
/** Post a check request.
*/
public void checkPost()
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (Logging.ingest.isDebugEnabled())
Logging.ingest.debug("checkPost()");
@@ -328,8 +328,8 @@ public class HttpPoster
{
if (thr instanceof ServiceInterruption)
throw (ServiceInterruption)thr;
- if (thr instanceof LCFException)
- throw (LCFException)thr;
+ if (thr instanceof ACFException)
+ throw (ACFException)thr;
if (thr instanceof IOException)
throw (IOException)thr;
if (thr instanceof RuntimeException)
@@ -342,7 +342,7 @@ public class HttpPoster
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
}
catch (IOException ioe)
@@ -363,11 +363,11 @@ public class HttpPoster
// Sleep for a time, and retry
try
{
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
}
catch (InterruptedException e)
{
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
}
ioErrorRetry--;
@@ -379,7 +379,7 @@ public class HttpPoster
*@param documentURI is the document's URI.
*/
public void deletePost(String documentURI, IOutputRemoveActivity activities)
- throws LCFException, ServiceInterruption
+ throws ACFException, ServiceInterruption
{
if (Logging.ingest.isDebugEnabled())
Logging.ingest.debug("deletePost(): '" + documentURI + "'");
@@ -404,8 +404,8 @@ public class HttpPoster
{
if (thr instanceof ServiceInterruption)
throw (ServiceInterruption)thr;
- if (thr instanceof LCFException)
- throw (LCFException)thr;
+ if (thr instanceof ACFException)
+ throw (ACFException)thr;
if (thr instanceof IOException)
throw (IOException)thr;
if (thr instanceof RuntimeException)
@@ -418,7 +418,7 @@ public class HttpPoster
catch (InterruptedException e)
{
t.interrupt();
- throw new LCFException("Interrupted: "+e.getMessage(),LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted: "+e.getMessage(),ACFException.INTERRUPTED);
}
}
catch (IOException ioe)
@@ -440,11 +440,11 @@ public class HttpPoster
// Sleep for a time, and retry
try
{
- LCF.sleep(10000L);
+ ACF.sleep(10000L);
}
catch (InterruptedException e)
{
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
}
ioErrorRetry--;
@@ -457,9 +457,9 @@ public class HttpPoster
* Get the response code of the post
* @param stream the stream the response is going to come from
* @return the response string
- * @throws LCFException
+ * @throws ACFException
*/
- protected String getResponse(BufferedReader stream) throws LCFException, ServiceInterruption
+ protected String getResponse(BufferedReader stream) throws ACFException, ServiceInterruption
{
Logging.ingest.debug("Waiting for response stream");
StringBuffer res = new StringBuffer();
@@ -490,7 +490,7 @@ public class HttpPoster
}
catch (InterruptedIOException e)
{
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
}
catch (java.net.ConnectException e)
{
@@ -567,7 +567,7 @@ public class HttpPoster
/** Build a secure socket factory based on no keystore and a lax trust manager.
* This allows use of SSL for privacy but not identification. */
protected static javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
- throws LCFException
+ throws ACFException
{
try
{
@@ -580,18 +580,18 @@ public class HttpPoster
}
catch (java.security.NoSuchAlgorithmException e)
{
- throw new LCFException("No such algorithm",e);
+ throw new ACFException("No such algorithm",e);
}
catch (java.security.KeyManagementException e)
{
- throw new LCFException("Key management exception",e);
+ throw new ACFException("Key management exception",e);
}
}
/** Create a socket in a manner consistent with all of our specified parameters.
*/
protected Socket createSocket(long responseRetryCount)
- throws IOException, LCFException
+ throws IOException, ACFException
{
Socket socket;
if (protocol.equals("https"))
@@ -607,7 +607,7 @@ public class HttpPoster
}
catch (IOException e)
{
- throw new LCFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
+ throw new ACFException("Couldn't set up SSL connection to ingestion API: "+e.getMessage(),e);
}
}
else
@@ -929,7 +929,7 @@ public class HttpPoster
// A negative number means http error of some kind.
if (codeValue < 0)
- throw new LCFException("Http protocol error");
+ throw new ACFException("Http protocol error");
// 200 means everything went OK
if (codeValue == 200)
@@ -945,11 +945,11 @@ public class HttpPoster
// If the situation is (2), then we CAN'T retry if we already read any of the stream; therefore
// we are forced to throw a "service interrupted" exception, and let the caller reschedule
// the ingestion.
- // 3) Something is wrong with the setup, e.g. bad credentials. In this case we chuck a LCFException,
+ // 3) Something is wrong with the setup, e.g. bad credentials. In this case we chuck a ACFException,
// since this will abort the current activity entirely.
if (codeValue == 401)
- throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+ throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
if (codeValue >= 400 && codeValue < 500)
{
@@ -960,7 +960,7 @@ public class HttpPoster
// If this continues, we should indeed abort the job. Retries should not go on indefinitely either; 2 hours is plenty
long currentTime = System.currentTimeMillis();
throw new ServiceInterruption("Error "+Integer.toString(codeValue)+" from ingestion request; ingestion will be retried again later",
- new LCFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
+ new ACFException("Ingestion HTTP error code "+Integer.toString(codeValue)),
currentTime + interruptionRetryTime,
currentTime + 2L * 60L * 60000L,
-1,
@@ -1000,7 +1000,7 @@ public class HttpPoster
}
catch (UnsupportedEncodingException ioe)
{
- throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+ throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
}
catch (java.net.SocketTimeoutException ioe)
{
@@ -1179,7 +1179,7 @@ public class HttpPoster
int codeValue = cd.getCodeValue();
if (codeValue < 0)
- throw new LCFException("Http protocol error");
+ throw new ACFException("Http protocol error");
// 200 means everything went OK
if (codeValue == 200)
@@ -1187,13 +1187,13 @@ public class HttpPoster
// We ignore everything in the range from 400-500 now
if (codeValue == 401)
- throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+ throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
if (codeValue >= 400 && codeValue < 500)
return;
// Anything else means the document didn't delete. Throw the error.
- throw new LCFException("Error deleting document: '"+res+"'");
+ throw new ACFException("Error deleting document: '"+res+"'");
}
finally
{
@@ -1229,7 +1229,7 @@ public class HttpPoster
}
catch (UnsupportedEncodingException ioe)
{
- throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+ throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
}
catch (InterruptedIOException ioe)
{
@@ -1334,7 +1334,7 @@ public class HttpPoster
int codeValue = cd.getCodeValue();
if (codeValue < 0)
- throw new LCFException("Http protocol error");
+ throw new ACFException("Http protocol error");
// 200 means everything went OK
if (codeValue == 200)
@@ -1342,10 +1342,10 @@ public class HttpPoster
// We ignore everything in the range from 400-500 now
if (codeValue == 401)
- throw new LCFException("Bad credentials for ingestion",LCFException.SETUP_ERROR);
+ throw new ACFException("Bad credentials for ingestion",ACFException.SETUP_ERROR);
// Anything else means the info request failed.
- throw new LCFException("Error connecting to MetaCarta ingestion API: '"+res+"'");
+ throw new ACFException("Error connecting to MetaCarta ingestion API: '"+res+"'");
}
finally
{
@@ -1381,7 +1381,7 @@ public class HttpPoster
}
catch (UnsupportedEncodingException ioe)
{
- throw new LCFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
+ throw new ACFException("Fatal ingestion error: "+ioe.getMessage(),ioe);
}
catch (InterruptedIOException ioe)
{
Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/GetConnectionInfo.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/GetConnectionInfo.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/GetConnectionInfo.java (original)
+++ incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/GetConnectionInfo.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;
public class GetConnectionInfo
{
@@ -48,15 +48,15 @@ public class GetConnectionInfo
try
{
- LCF.initializeEnvironment();
+ ACF.initializeEnvironment();
IThreadContext tc = ThreadContextFactory.make();
IRepositoryConnectionManager connectionManager = RepositoryConnectionManagerFactory.make(tc);
IRepositoryConnection connection = connectionManager.load(connectionName);
if (connection == null)
- throw new LCFException("Connection "+connectionName+" does not exist");
+ throw new ACFException("Connection "+connectionName+" does not exist");
if (connection.getClassName() == null || !connection.getClassName().equals("org.apache.acf.crawler.connectors.sharedrive.SharedDriveConnector"))
- throw new LCFException("Command can only be used on working share connector connections.");
+ throw new ACFException("Command can only be used on working share connector connections.");
ConfigParams cfg = connection.getConfigParams();
Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/MatchMap.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/MatchMap.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/MatchMap.java (original)
+++ incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/acf/crawler/connectors/sharedrive/MatchMap.java Mon Aug 23 18:08:32 2010
@@ -261,7 +261,7 @@ public class MatchMap
/** Perform a translation.
*/
public String translate(String input)
- throws LCFException
+ throws ACFException
{
// Build pattern vector if not already there
if (matchPatterns == null)
@@ -278,7 +278,7 @@ public class MatchMap
catch (java.util.regex.PatternSyntaxException e)
{
matchPatterns = null;
- throw new LCFException("For match expression '"+regexp+"', found pattern syntax error: "+e.getMessage(),e);
+ throw new ACFException("For match expression '"+regexp+"', found pattern syntax error: "+e.getMessage(),e);
}
i++;
}