Class IncrementalIngester.OutputAddActivitiesWrapper
- java.lang.Object
-
- org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.OutputRecordingActivity
-
- org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.OutputAddActivitiesWrapper
-
- All Implemented Interfaces:
IOutputAddActivity
,IOutputCheckActivity
,IOutputHistoryActivity
,IOutputQualifyActivity
- Direct Known Subclasses:
IncrementalIngester.OutputActivitiesWrapper
- Enclosing class:
- IncrementalIngester
protected static class IncrementalIngester.OutputAddActivitiesWrapper extends IncrementalIngester.OutputRecordingActivity implements IOutputAddActivity
-
-
Field Summary
Fields Modifier and Type Field Description protected IOutputAddActivity
addActivities
-
Fields inherited from class org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.OutputRecordingActivity
activityProvider, outputConnectionName
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputAddActivity
_rcsid
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputHistoryActivity
_rcsid, CREATED_DIRECTORY, EXCEPTION, EXCLUDED_CONTENT, EXCLUDED_DATE, EXCLUDED_LENGTH, EXCLUDED_MIMETYPE, EXCLUDED_URL, HTTP_ERROR, IOEXCEPTION, UNKNOWN_SECURITY
-
-
Constructor Summary
Constructors Constructor Description OutputAddActivitiesWrapper(IOutputAddActivity addActivities, java.lang.String outputConnectionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkDateIndexable(java.util.Date date)
Detect if a date is acceptable downstream or not.boolean
checkDocumentIndexable(java.io.File localFile)
Pre-determine whether a document (passed here as a File object) is acceptable downstream.boolean
checkLengthIndexable(long length)
Pre-determine whether a document's length is acceptable downstream.boolean
checkMimeTypeIndexable(java.lang.String mimeType)
Detect if a mime type is acceptable downstream or not.boolean
checkURLIndexable(java.lang.String url)
Pre-determine whether a document's URL is acceptable downstream.void
noDocument()
Send NO document via the pipeline to the next output connection.java.lang.String
qualifyAccessToken(java.lang.String authorityNameString, java.lang.String accessToken)
Qualify an access token appropriately, to match access tokens as returned by mod_aa.int
sendDocument(java.lang.String documentURI, RepositoryDocument document)
Send a document via the pipeline to the next output connection.-
Methods inherited from class org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.OutputRecordingActivity
recordActivity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputHistoryActivity
recordActivity
-
-
-
-
Field Detail
-
addActivities
protected final IOutputAddActivity addActivities
-
-
Constructor Detail
-
OutputAddActivitiesWrapper
public OutputAddActivitiesWrapper(IOutputAddActivity addActivities, java.lang.String outputConnectionName)
-
-
Method Detail
-
qualifyAccessToken
public java.lang.String qualifyAccessToken(java.lang.String authorityNameString, java.lang.String accessToken) throws ManifoldCFException
Qualify an access token appropriately, to match access tokens as returned by mod_aa. This method includes the authority name with the access token, if any, so that each authority may establish its own token space.- Specified by:
qualifyAccessToken
in interfaceIOutputQualifyActivity
- Parameters:
authorityNameString
- is the name of the authority to use to qualify the access token.accessToken
- is the raw, repository access token.- Returns:
- the properly qualified access token.
- Throws:
ManifoldCFException
-
sendDocument
public int sendDocument(java.lang.String documentURI, RepositoryDocument document) throws ManifoldCFException, ServiceInterruption, java.io.IOException
Send a document via the pipeline to the next output connection.- Specified by:
sendDocument
in interfaceIOutputAddActivity
- Parameters:
documentURI
- is the document's URI.document
- is the document data to be processed (handed to the output data store).- Returns:
- the document status (accepted or permanently rejected); return codes are listed in IPipelineConnector.
- Throws:
java.io.IOException
- only if there's an IO error reading the data from the document.ManifoldCFException
ServiceInterruption
-
noDocument
public void noDocument() throws ManifoldCFException, ServiceInterruption
Send NO document via the pipeline to the next output connection. This is equivalent to sending an empty document placeholder.- Specified by:
noDocument
in interfaceIOutputAddActivity
- Throws:
ManifoldCFException
ServiceInterruption
-
checkDateIndexable
public boolean checkDateIndexable(java.util.Date date) throws ManifoldCFException, ServiceInterruption
Detect if a date is acceptable downstream or not. This method is used to determine whether it makes sense to fetch a document in the first place.- Specified by:
checkDateIndexable
in interfaceIOutputCheckActivity
- Parameters:
date
- is the mime type of the document.- Returns:
- true if the date can be accepted by the downstream connection.
- Throws:
ManifoldCFException
ServiceInterruption
-
checkMimeTypeIndexable
public boolean checkMimeTypeIndexable(java.lang.String mimeType) throws ManifoldCFException, ServiceInterruption
Detect if a mime type is acceptable downstream or not. This method is used to determine whether it makes sense to fetch a document in the first place.- Specified by:
checkMimeTypeIndexable
in interfaceIOutputCheckActivity
- Parameters:
mimeType
- is the mime type of the document.- Returns:
- true if the mime type can be accepted by the downstream connection.
- Throws:
ManifoldCFException
ServiceInterruption
-
checkDocumentIndexable
public boolean checkDocumentIndexable(java.io.File localFile) throws ManifoldCFException, ServiceInterruption
Pre-determine whether a document (passed here as a File object) is acceptable downstream. This method is used to determine whether a document needs to be actually transferred. This hook is provided mainly to support search engines that only handle a small set of accepted file types.- Specified by:
checkDocumentIndexable
in interfaceIOutputCheckActivity
- Parameters:
localFile
- is the local file to check.- Returns:
- true if the file is acceptable by the downstream connection.
- Throws:
ManifoldCFException
ServiceInterruption
-
checkLengthIndexable
public boolean checkLengthIndexable(long length) throws ManifoldCFException, ServiceInterruption
Pre-determine whether a document's length is acceptable downstream. This method is used to determine whether to fetch a document in the first place.- Specified by:
checkLengthIndexable
in interfaceIOutputCheckActivity
- Parameters:
length
- is the length of the document.- Returns:
- true if the file is acceptable by the downstream connection.
- Throws:
ManifoldCFException
ServiceInterruption
-
checkURLIndexable
public boolean checkURLIndexable(java.lang.String url) throws ManifoldCFException, ServiceInterruption
Pre-determine whether a document's URL is acceptable downstream. This method is used to help filter out documents that cannot be indexed in advance.- Specified by:
checkURLIndexable
in interfaceIOutputCheckActivity
- Parameters:
url
- is the URL of the document.- Returns:
- true if the file is acceptable by the downstream connection.
- Throws:
ManifoldCFException
ServiceInterruption
-
-