public abstract class BaseOutputConnector extends BaseConnector implements IOutputConnector
xxx();Connectors are either configured or not. If configured, they will persist in a pool, and be reused multiple times. Certain methods of a connector may be called before the connector is configured. This includes basically all methods that permit inspection of the connector's capabilities.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_rcsid |
currentContext, paramsDOCUMENTSTATUS_ACCEPTED, DOCUMENTSTATUS_REJECTED| Constructor and Description |
|---|
BaseOutputConnector() |
| Modifier and Type | Method and Description |
|---|---|
int |
addOrReplaceDocumentWithException(java.lang.String documentURI,
VersionContext pipelineDescription,
RepositoryDocument document,
java.lang.String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
boolean |
checkDateIndexable(VersionContext pipelineDescription,
java.util.Date date,
IOutputCheckActivity checkActivity)
Detect if a document date is acceptable or not.
|
boolean |
checkDocumentIndexable(VersionContext pipelineDescription,
java.io.File localFile,
IOutputCheckActivity checkActivity)
Pre-determine whether a document (passed here as a File object) is acceptable or not.
|
boolean |
checkLengthIndexable(VersionContext pipelineDescription,
long length,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's length is acceptable.
|
boolean |
checkMimeTypeIndexable(VersionContext pipelineDescription,
java.lang.String mimeType,
IOutputCheckActivity checkActivity)
Detect if a mime type is acceptable or not.
|
boolean |
checkURLIndexable(VersionContext pipelineDescription,
java.lang.String url,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's URL is acceptable.
|
java.lang.String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e.
|
java.lang.String |
getFormCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form check javascript method to call.
|
java.lang.String |
getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form presave check javascript method to call.
|
VersionContext |
getPipelineDescription(Specification spec)
Get a pipeline version string, given a pipeline specification object.
|
void |
noteAllRecordsRemoved()
Notify the connector that all records associated with this connection have been removed.
|
void |
noteJobComplete(IOutputNotifyActivity activities)
Notify the connector of a completed job.
|
void |
outputSpecificationBody(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
java.lang.String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber,
java.util.List<java.lang.String> tabsArray)
Output the specification header section.
|
java.lang.String |
processSpecificationPost(IPostParameters variableContext,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber)
Process a specification post.
|
void |
removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
IOutputRemoveActivity activities)
Remove a document using the connector.
|
boolean |
requestInfo(Configuration output,
java.lang.String command)
Request arbitrary connector information.
|
void |
viewSpecification(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber)
View specification.
|
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheck, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfigurationpublic static final java.lang.String _rcsid
public java.lang.String[] getActivitiesList()
getActivitiesList in interface IOutputConnectorpublic boolean requestInfo(Configuration output, java.lang.String command) throws ManifoldCFException
requestInfo in interface IOutputConnectoroutput - is the response object, to be filled in by this method.command - is the command, which is taken directly from the API request.ManifoldCFExceptionpublic void noteJobComplete(IOutputNotifyActivity activities) throws ManifoldCFException, ServiceInterruption
noteJobComplete in interface IOutputConnectoractivities - is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.ManifoldCFExceptionServiceInterruptionpublic boolean checkDateIndexable(VersionContext pipelineDescription, java.util.Date date, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkDateIndexable in interface IPipelineConnectorpipelineDescription - is the document's pipeline version string, for this connection.date - is the date of the document.checkActivity - is an object including the activities that can be performed by this method.ManifoldCFExceptionServiceInterruptionpublic boolean checkMimeTypeIndexable(VersionContext pipelineDescription, java.lang.String mimeType, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkMimeTypeIndexable in interface IPipelineConnectorpipelineDescription - is the document's pipeline version string, for this connection.mimeType - is the mime type of the document.checkActivity - is an object including the activities that can be performed by this method.ManifoldCFExceptionServiceInterruptionpublic boolean checkDocumentIndexable(VersionContext pipelineDescription, java.io.File localFile, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkDocumentIndexable in interface IPipelineConnectorpipelineDescription - is the document's pipeline version string, for this connection.localFile - is the local file to check.checkActivity - is an object including the activities that can be done by this method.ManifoldCFExceptionServiceInterruptionpublic boolean checkLengthIndexable(VersionContext pipelineDescription, long length, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkLengthIndexable in interface IPipelineConnectorpipelineDescription - is the document's pipeline version string, for this connection.length - is the length of the document.checkActivity - is an object including the activities that can be done by this method.ManifoldCFExceptionServiceInterruptionpublic boolean checkURLIndexable(VersionContext pipelineDescription, java.lang.String url, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkURLIndexable in interface IPipelineConnectorpipelineDescription - is the document's pipeline version string, for this connection.url - is the URL of the document.checkActivity - is an object including the activities that can be done by this method.ManifoldCFExceptionServiceInterruptionpublic VersionContext getPipelineDescription(Specification spec) throws ManifoldCFException, ServiceInterruption
getPipelineDescription in interface IPipelineConnectorspec - is the current pipeline specification object for this connection for the job that is doing the crawling.ManifoldCFExceptionServiceInterruptionpublic int addOrReplaceDocumentWithException(java.lang.String documentURI,
VersionContext pipelineDescription,
RepositoryDocument document,
java.lang.String authorityNameString,
IOutputAddActivity activities)
throws ManifoldCFException,
ServiceInterruption,
java.io.IOException
addOrReplaceDocumentWithException in interface IPipelineConnectordocumentURI - is the URI of the document. The URI is presumed to be the unique identifier which the output data store will use to process
and serve the document. This URI is constructed by the repository connector which fetches the document, and is thus universal across all output connectors.pipelineDescription - includes the description string that was constructed for this document by the getOutputDescription() method.document - is the document data to be processed (handed to the output data store).authorityNameString - is the name of the authority responsible for authorizing any access tokens passed in with the repository document. May be null.activities - is the handle to an object that the implementer of a pipeline connector may use to perform operations, such as logging processing activity,
or sending a modified document to the next stage in the pipeline.java.io.IOException - only if there's a stream error reading the document data.ManifoldCFExceptionServiceInterruptionpublic void removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
IOutputRemoveActivity activities)
throws ManifoldCFException,
ServiceInterruption
removeDocument in interface IOutputConnectordocumentURI - is the URI of the document. The URI is presumed to be the unique identifier which the output data store will use to process
and serve the document. This URI is constructed by the repository connector which fetches the document, and is thus universal across all output connectors.outputDescription - is the last description string that was constructed for this document by the getOutputDescription() method above.activities - is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.ManifoldCFExceptionServiceInterruptionpublic void noteAllRecordsRemoved()
throws ManifoldCFException
noteAllRecordsRemoved in interface IOutputConnectorManifoldCFExceptionpublic java.lang.String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName in interface IPipelineConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public java.lang.String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName in interface IPipelineConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public void outputSpecificationHeader(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber, java.util.List<java.lang.String> tabsArray) throws ManifoldCFException, java.io.IOException
outputSpecificationHeader in interface IPipelineConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.os - is the current output specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFExceptionjava.io.IOExceptionpublic void outputSpecificationBody(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber, int actualSequenceNumber, java.lang.String tabName) throws ManifoldCFException, java.io.IOException
outputSpecificationBody in interface IPipelineConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.os - is the current output specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.actualSequenceNumber - is the connection within the job that has currently been selected.tabName - is the current tab name.ManifoldCFExceptionjava.io.IOExceptionpublic java.lang.String processSpecificationPost(IPostParameters variableContext, java.util.Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException
processSpecificationPost in interface IPipelineConnectorvariableContext - contains the post data, including binary file-upload information.locale - is the preferred local of the output.os - is the current output specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.ManifoldCFExceptionpublic void viewSpecification(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException, java.io.IOException
viewSpecification in interface IPipelineConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.connectionSequenceNumber - is the unique number of this connection within the job.os - is the current output specification for this job.ManifoldCFExceptionjava.io.IOException