public class AmazonCloudSearchConnector extends BaseOutputConnector
Modifier and Type | Field and Description |
---|---|
protected static int |
CHUNK_SIZE |
static String |
INGEST_ACTIVITY
Ingestion activity
|
protected org.apache.http.client.methods.HttpPost |
poster
Local connection
|
static String |
REMOVE_ACTIVITY
Document removal activity
|
protected String |
serverHost |
protected String |
serverPath |
_rcsid
currentContext, params
DOCUMENTSTATUS_ACCEPTED, DOCUMENTSTATUS_REJECTED
Constructor and Description |
---|
AmazonCloudSearchConnector()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
addOrReplaceDocumentWithException(String documentURI,
VersionContext outputDescription,
RepositoryDocument document,
String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
String |
check()
Test the connection.
|
boolean |
checkMimeTypeIndexable(VersionContext outputDescription,
String mimeType,
IOutputCheckActivity activities)
Detect if a mime type is indexable or not.
|
void |
clearThreadContext()
Clear out any state information specific to a given thread.
|
protected void |
conditionallyFlushDocuments(IOutputHistoryActivity activities) |
void |
connect(ConfigParams configParameters)
Connect.
|
void |
deinstall(IThreadContext threadContext) |
void |
disconnect()
Close the connection.
|
protected void |
flushDocuments(IOutputHistoryActivity activities) |
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.
|
protected void |
getSession()
Set up a session
|
void |
install(IThreadContext threadContext) |
boolean |
isConnected()
This method is called to assess whether to count this connector instance should
actually be counted as being connected.
|
void |
noteJobComplete(IOutputNotifyActivity activities) |
void |
outputConfigurationBody(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
String tabName) |
void |
outputConfigurationHeader(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
List<String> tabsArray)
Output the configuration header section.
|
String |
processConfigurationPost(IThreadContext threadContext,
IPostParameters variableContext,
ConfigParams parameters)
Process a configuration post.
|
void |
removeDocument(String documentURI,
String outputDescription,
IOutputRemoveActivity activities)
Remove a document using the connector.
|
void |
viewConfiguration(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters)
View configuration.
|
addOrReplaceDocument, checkDateIndexable, checkDocumentIndexable, checkDocumentIndexable, checkDocumentIndexable, checkLengthIndexable, checkLengthIndexable, checkMimeTypeIndexable, checkMimeTypeIndexable, checkURLIndexable, checkURLIndexable, getOutputDescription, getPipelineDescription, noteAllRecordsRemoved, outputSpecificationBody, outputSpecificationBody, outputSpecificationBody, outputSpecificationHeader, outputSpecificationHeader, outputSpecificationHeader, outputSpecificationHeader, processSpecificationPost, processSpecificationPost, processSpecificationPost, requestInfo, viewSpecification, viewSpecification, viewSpecification
getConfiguration, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, poll, processConfigurationPost, setThreadContext
public static final String INGEST_ACTIVITY
public static final String REMOVE_ACTIVITY
protected org.apache.http.client.methods.HttpPost poster
protected String serverHost
protected String serverPath
protected static final int CHUNK_SIZE
public void clearThreadContext()
clearThreadContext
in interface IConnector
clearThreadContext
in class BaseConnector
public void install(IThreadContext threadContext) throws ManifoldCFException
install
in interface IConnector
install
in class BaseConnector
ManifoldCFException
public void deinstall(IThreadContext threadContext) throws ManifoldCFException
deinstall
in interface IConnector
deinstall
in class BaseConnector
ManifoldCFException
public String[] getActivitiesList()
getActivitiesList
in interface IOutputConnector
getActivitiesList
in class BaseOutputConnector
public void connect(ConfigParams configParameters)
connect
in interface IConnector
connect
in class BaseConnector
configParameters
- is the set of configuration parameters, which
in this case describe the target appliance, basic auth configuration, etc. (This formerly came
out of the ini file.)public boolean isConnected()
isConnected
in interface IConnector
isConnected
in class BaseConnector
public void disconnect() throws ManifoldCFException
disconnect
in interface IConnector
disconnect
in class BaseConnector
ManifoldCFException
protected void getSession() throws ManifoldCFException
ManifoldCFException
public String check() throws ManifoldCFException
check
in interface IConnector
check
in class BaseConnector
ManifoldCFException
public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
checkMimeTypeIndexable
in interface IPipelineConnector
checkMimeTypeIndexable
in class BaseOutputConnector
outputDescription
- is the document's output version.mimeType
- is the mime type of the document.ManifoldCFException
ServiceInterruption
public int addOrReplaceDocumentWithException(String documentURI, VersionContext outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException, ServiceInterruption, IOException
addOrReplaceDocumentWithException
in interface IPipelineConnector
addOrReplaceDocumentWithException
in class BaseOutputConnector
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
IOException
public void removeDocument(String documentURI, String outputDescription, IOutputRemoveActivity activities) throws ManifoldCFException, ServiceInterruption
removeDocument
in interface IOutputConnector
removeDocument
in class BaseOutputConnector
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 noteJobComplete(IOutputNotifyActivity activities) throws ManifoldCFException, ServiceInterruption
noteJobComplete
in interface IOutputConnector
noteJobComplete
in class BaseOutputConnector
ManifoldCFException
ServiceInterruption
protected void conditionallyFlushDocuments(IOutputHistoryActivity activities) throws ManifoldCFException, ServiceInterruption
protected void flushDocuments(IOutputHistoryActivity activities) throws ManifoldCFException, ServiceInterruption
public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException
viewConfiguration
in interface IConnector
viewConfiguration
in class BaseConnector
threadContext
- is the local thread context.out
- is the output to which any HTML should be sent.parameters
- are the configuration parameters, as they currently
exist, for this connection being configured.ManifoldCFException
IOException
public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException
outputConfigurationHeader
in interface IConnector
outputConfigurationHeader
in class BaseConnector
threadContext
- is the local thread context.out
- is the output to which any HTML should be sent.parameters
- are the configuration parameters, as they currently
exist, for this connection being configured.tabsArray
- is an array of tab names. Add to this array any tab
names that are specific to the connector.ManifoldCFException
IOException
public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName) throws ManifoldCFException, IOException
outputConfigurationBody
in interface IConnector
outputConfigurationBody
in class BaseConnector
ManifoldCFException
IOException
public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters) throws ManifoldCFException
processConfigurationPost
in class BaseConnector
threadContext
- is the local thread context.variableContext
- is the set of variables available from the post,
including binary file post information.parameters
- are the configuration parameters, as they currently
exist, for this connection being configured.ManifoldCFException
public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName
in interface IPipelineConnector
getFormCheckJavascriptMethodName
in class BaseOutputConnector
connectionSequenceNumber
- is the unique number of this connection within the job.public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName
in interface IPipelineConnector
getFormPresaveCheckJavascriptMethodName
in class BaseOutputConnector
connectionSequenceNumber
- is the unique number of this connection within the job.