|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IOutputConnector
This interface describes an instance of a connection between an engine that needs to output documents, and an output connector. Each instance of this interface is used in only one thread at a time. Connection Pooling on these kinds of objects is performed by the factory which instantiates connector objects from symbolic names and config parameters, and is pooled by these parameters. That is, a pooled connector handle is used only if all the connection parameters for the handle match. Implementers of this interface should provide a default constructor which has this signature: xxx(); Connector instances 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. The complete list is: The purpose of the output connector is to allow documents to be sent to their final destination (as far as Connector Framework is concerned).
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
static int |
DOCUMENTSTATUS_ACCEPTED
Document accepted |
static int |
DOCUMENTSTATUS_REJECTED
Document permanently rejected |
| Method Summary | |
|---|---|
int |
addOrReplaceDocument(java.lang.String documentURI,
java.lang.String outputDescription,
RepositoryDocument document,
java.lang.String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector. |
boolean |
checkDocumentIndexable(java.io.File localFile)
Pre-determine whether a document (passed here as a File object) is indexable by this connector. |
boolean |
checkMimeTypeIndexable(java.lang.String mimeType)
Detect if a mime type is indexable or not. |
java.lang.String[] |
getActivitiesList()
Return a list of activities that this connector generates. |
java.lang.String |
getOutputDescription(OutputSpecification spec)
Get an output version string, given an output specification. |
void |
noteJobComplete(IOutputNotifyActivity activities)
Notify the connector of a completed job. |
void |
outputSpecificationBody(IHTTPOutput out,
OutputSpecification os,
java.lang.String tabName)
Output the specification body section. |
void |
outputSpecificationHeader(IHTTPOutput out,
OutputSpecification os,
java.util.ArrayList tabsArray)
Output the specification header section. |
java.lang.String |
processSpecificationPost(IPostParameters variableContext,
OutputSpecification os)
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,
OutputSpecification os)
View specification. |
| Methods inherited from interface org.apache.manifoldcf.core.interfaces.IConnector |
|---|
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration |
| Field Detail |
|---|
static final java.lang.String _rcsid
static final int DOCUMENTSTATUS_ACCEPTED
static final int DOCUMENTSTATUS_REJECTED
| Method Detail |
|---|
java.lang.String[] getActivitiesList()
boolean requestInfo(Configuration output,
java.lang.String command)
throws ManifoldCFException
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
boolean checkMimeTypeIndexable(java.lang.String mimeType)
throws ManifoldCFException,
ServiceInterruption
mimeType - is the mime type of the document.
ManifoldCFException
ServiceInterruption
boolean checkDocumentIndexable(java.io.File localFile)
throws ManifoldCFException,
ServiceInterruption
localFile - is the local file to check.
ManifoldCFException
ServiceInterruption
java.lang.String getOutputDescription(OutputSpecification spec)
throws ManifoldCFException
spec - is the current output specification for the job that is doing the crawling.
ManifoldCFException
int addOrReplaceDocument(java.lang.String documentURI,
java.lang.String outputDescription,
RepositoryDocument document,
java.lang.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
void removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
IOutputRemoveActivity 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 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
void noteJobComplete(IOutputNotifyActivity activities)
throws ManifoldCFException,
ServiceInterruption
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
void outputSpecificationHeader(IHTTPOutput out,
OutputSpecification os,
java.util.ArrayList tabsArray)
throws ManifoldCFException,
java.io.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
java.io.IOException
void outputSpecificationBody(IHTTPOutput out,
OutputSpecification os,
java.lang.String tabName)
throws ManifoldCFException,
java.io.IOException
java.lang.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
void viewSpecification(IHTTPOutput out,
OutputSpecification os)
throws ManifoldCFException,
java.io.IOException
out - is the output to which any HTML should be sent.os - is the current output specification for this job.
ManifoldCFException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||