public abstract class BaseOutputConnector extends BaseConnector implements IOutputConnector
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
currentContext, params
DOCUMENTSTATUS_ACCEPTED, DOCUMENTSTATUS_REJECTED
Constructor and Description |
---|
BaseOutputConnector() |
Modifier and Type | Method and Description |
---|---|
int |
addOrReplaceDocument(String documentURI,
String outputDescription,
RepositoryDocument document,
String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
int |
addOrReplaceDocumentWithException(String documentURI,
VersionContext pipelineDescription,
RepositoryDocument document,
String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
boolean |
checkDateIndexable(VersionContext pipelineDescription,
Date date,
IOutputCheckActivity checkActivity)
Detect if a document date is acceptable or not.
|
boolean |
checkDocumentIndexable(File localFile)
Pre-determine whether a document (passed here as a File object) is indexable by this connector.
|
boolean |
checkDocumentIndexable(String outputDescription,
File localFile)
Pre-determine whether a document (passed here as a File object) is indexable by this connector.
|
boolean |
checkDocumentIndexable(VersionContext pipelineDescription,
File localFile,
IOutputCheckActivity checkActivity)
Pre-determine whether a document (passed here as a File object) is acceptable or not.
|
boolean |
checkLengthIndexable(String outputDescription,
long length)
Pre-determine whether a document's length is indexable by this connector.
|
boolean |
checkLengthIndexable(VersionContext pipelineDescription,
long length,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's length is acceptable.
|
boolean |
checkMimeTypeIndexable(String mimeType)
Detect if a mime type is indexable or not.
|
boolean |
checkMimeTypeIndexable(String outputDescription,
String mimeType)
Detect if a mime type is indexable or not.
|
boolean |
checkMimeTypeIndexable(VersionContext pipelineDescription,
String mimeType,
IOutputCheckActivity checkActivity)
Detect if a mime type is acceptable or not.
|
boolean |
checkURLIndexable(String outputDescription,
String url)
Pre-determine whether a document's URL is indexable by this connector.
|
boolean |
checkURLIndexable(VersionContext pipelineDescription,
String url,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's URL is acceptable.
|
String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e.
|
String |
getFormCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form check javascript method to call.
|
String |
getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form presave check javascript method to call.
|
String |
getOutputDescription(OutputSpecification spec)
Get an output version string, given an output specification.
|
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,
Locale locale,
OutputSpecification os,
String tabName)
Output the specification body section.
|
void |
outputSpecificationBody(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
String tabName)
Output the specification body section.
|
void |
outputSpecificationBody(IHTTPOutput out,
OutputSpecification os,
String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
OutputSpecification os,
List<String> tabsArray)
Output the specification header section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber,
List<String> tabsArray)
Output the specification header section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
OutputSpecification os,
ArrayList<Object> tabsArray) |
void |
outputSpecificationHeader(IHTTPOutput out,
OutputSpecification os,
List<String> tabsArray)
Output the specification header section.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
OutputSpecification os)
Process a specification post.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
Specification os,
int connectionSequenceNumber)
Process a specification post.
|
String |
processSpecificationPost(IPostParameters variableContext,
OutputSpecification os)
Process a specification post.
|
void |
removeDocument(String documentURI,
String outputDescription,
IOutputRemoveActivity activities)
Remove a document using the connector.
|
boolean |
requestInfo(Configuration output,
String command)
Request arbitrary connector information.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
OutputSpecification os)
View specification.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber)
View specification.
|
void |
viewSpecification(IHTTPOutput out,
OutputSpecification os)
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, viewConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration
public static final String _rcsid
public String[] getActivitiesList()
getActivitiesList
in interface IOutputConnector
public boolean requestInfo(Configuration output, String command) throws ManifoldCFException
requestInfo
in interface IOutputConnector
output
- is the response object, to be filled in by this method.command
- is the command, which is taken directly from the API request.ManifoldCFException
public void noteJobComplete(IOutputNotifyActivity activities) throws ManifoldCFException, ServiceInterruption
noteJobComplete
in interface IOutputConnector
activities
- is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.ManifoldCFException
ServiceInterruption
public boolean checkDateIndexable(VersionContext pipelineDescription, Date date, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkDateIndexable
in interface IPipelineConnector
pipelineDescription
- 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.ManifoldCFException
ServiceInterruption
public boolean checkMimeTypeIndexable(VersionContext pipelineDescription, String mimeType, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkMimeTypeIndexable
in interface IPipelineConnector
pipelineDescription
- 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.ManifoldCFException
ServiceInterruption
public boolean checkMimeTypeIndexable(String outputDescription, String mimeType) throws ManifoldCFException, ServiceInterruption
outputDescription
- is the document's output version.mimeType
- is the mime type of the document.ManifoldCFException
ServiceInterruption
public boolean checkMimeTypeIndexable(String mimeType) throws ManifoldCFException, ServiceInterruption
mimeType
- is the mime type of the document.ManifoldCFException
ServiceInterruption
public boolean checkDocumentIndexable(VersionContext pipelineDescription, File localFile, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkDocumentIndexable
in interface IPipelineConnector
pipelineDescription
- 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.ManifoldCFException
ServiceInterruption
public boolean checkDocumentIndexable(String outputDescription, File localFile) throws ManifoldCFException, ServiceInterruption
outputDescription
- is the document's output version.localFile
- is the local file to check.ManifoldCFException
ServiceInterruption
public boolean checkDocumentIndexable(File localFile) throws ManifoldCFException, ServiceInterruption
localFile
- is the local file to check.ManifoldCFException
ServiceInterruption
public boolean checkLengthIndexable(VersionContext pipelineDescription, long length, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkLengthIndexable
in interface IPipelineConnector
pipelineDescription
- 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.ManifoldCFException
ServiceInterruption
public boolean checkLengthIndexable(String outputDescription, long length) throws ManifoldCFException, ServiceInterruption
outputDescription
- is the document's output version.length
- is the length of the document.ManifoldCFException
ServiceInterruption
public boolean checkURLIndexable(VersionContext pipelineDescription, String url, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
checkURLIndexable
in interface IPipelineConnector
pipelineDescription
- 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.ManifoldCFException
ServiceInterruption
public boolean checkURLIndexable(String outputDescription, String url) throws ManifoldCFException, ServiceInterruption
outputDescription
- is the document's output version.url
- is the URL of the document.ManifoldCFException
ServiceInterruption
public VersionContext getPipelineDescription(Specification spec) throws ManifoldCFException, ServiceInterruption
getPipelineDescription
in interface IPipelineConnector
spec
- is the current pipeline specification object for this connection for the job that is doing the crawling.ManifoldCFException
ServiceInterruption
public String getOutputDescription(OutputSpecification spec) throws ManifoldCFException, ServiceInterruption
spec
- is the current output specification for the job that is doing the crawling.ManifoldCFException
ServiceInterruption
public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException, ServiceInterruption, IOException
addOrReplaceDocumentWithException
in interface IPipelineConnector
documentURI
- 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 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.IOException
- only if there's a stream error reading the document data.ManifoldCFException
ServiceInterruption
public int addOrReplaceDocument(String documentURI, String outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException, ServiceInterruption
documentURI
- 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 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 an output connector may use to perform operations, such as logging processing activity.ManifoldCFException
ServiceInterruption
public void removeDocument(String documentURI, String outputDescription, IOutputRemoveActivity activities) throws ManifoldCFException, ServiceInterruption
removeDocument
in interface IOutputConnector
documentURI
- 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.ManifoldCFException
ServiceInterruption
public void noteAllRecordsRemoved() throws ManifoldCFException
noteAllRecordsRemoved
in interface IOutputConnector
ManifoldCFException
public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName
in interface IPipelineConnector
connectionSequenceNumber
- is the unique number of this connection within the job.public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName
in interface IPipelineConnector
connectionSequenceNumber
- is the unique number of this connection within the job.public void outputSpecificationHeader(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber, List<String> tabsArray) throws ManifoldCFException, IOException
outputSpecificationHeader
in interface IPipelineConnector
out
- 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.ManifoldCFException
IOException
public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification os, List<String> tabsArray) throws ManifoldCFException, IOException
out
- 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.tabsArray
- is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFException
IOException
public void outputSpecificationHeader(IHTTPOutput out, OutputSpecification os, List<String> tabsArray) throws ManifoldCFException, IOException
out
- is the output to which any HTML should be sent.os
- is the current output specification for this job.tabsArray
- is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFException
IOException
public void outputSpecificationHeader(IHTTPOutput out, OutputSpecification os, ArrayList<Object> tabsArray) throws ManifoldCFException, IOException
ManifoldCFException
IOException
public void outputSpecificationBody(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException
outputSpecificationBody
in interface IPipelineConnector
out
- 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.ManifoldCFException
IOException
public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification os, String tabName) throws ManifoldCFException, IOException
out
- 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.tabName
- is the current tab name.ManifoldCFException
IOException
public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os, String tabName) throws ManifoldCFException, IOException
out
- is the output to which any HTML should be sent.os
- is the current output specification for this job.tabName
- is the current tab name.ManifoldCFException
IOException
public String processSpecificationPost(IPostParameters variableContext, Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException
processSpecificationPost
in interface IPipelineConnector
variableContext
- 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.ManifoldCFException
public String processSpecificationPost(IPostParameters variableContext, Locale locale, OutputSpecification os) throws ManifoldCFException
variableContext
- 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.ManifoldCFException
public String processSpecificationPost(IPostParameters variableContext, OutputSpecification os) throws ManifoldCFException
variableContext
- contains the post data, including binary file-upload information.os
- is the current output specification for this job.ManifoldCFException
public void viewSpecification(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException, IOException
viewSpecification
in interface IPipelineConnector
out
- 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.ManifoldCFException
IOException
public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os) throws ManifoldCFException, IOException
out
- 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.ManifoldCFException
IOException
public void viewSpecification(IHTTPOutput out, OutputSpecification os) throws ManifoldCFException, IOException
out
- is the output to which any HTML should be sent.os
- is the current output specification for this job.ManifoldCFException
IOException