public class MongodbOutputConnector
extends org.apache.manifoldcf.agents.output.BaseOutputConnector
| Modifier and Type | Class and Description |
|---|---|
protected class |
MongodbOutputConnector.CheckConnectionThread |
protected class |
MongodbOutputConnector.DestroySessionThread |
protected class |
MongodbOutputConnector.GetSessionThread |
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ACTIVITY_DELETE
Delete activity
|
protected static java.lang.String |
ACTIVITY_INJECTION
Save activity
|
protected java.lang.String |
collection
Name of the target collection that belongs to the database specified above
|
protected java.lang.String |
database
Name of the target database
|
protected java.lang.String |
host
Location of host where MongoDB server is hosted
|
protected long |
lastSessionFetch
Last session fetch time.
|
protected java.lang.String |
password |
protected java.lang.String |
port
port number associated with MongoDB server process
|
protected static long |
timeToRelease
Session expiration time in milliseconds.
|
protected java.lang.String |
username
username and password associated with the target database
|
| Constructor and Description |
|---|
MongodbOutputConnector()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
addOrReplaceDocumentWithException(java.lang.String documentURI,
org.apache.manifoldcf.core.interfaces.VersionContext pipelineDescription,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities) |
java.lang.String |
check()
Test the connection.
|
protected void |
checkConnection() |
void |
connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
This method creates a new MongoDB Session for a MongoDB repository,
|
void |
disconnect()
Close the connection.
|
java.lang.String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e.
|
protected void |
getSession()
Set up a session
|
boolean |
isConnected()
This method is called to assess whether to count this connector instance
should actually be counted as being connected.
|
void |
outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName) |
void |
outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.List<java.lang.String> tabsArray)
Output the configuration header section.
|
void |
poll()
This method is periodically called for all connectors that are connected
but not in active use.
|
java.lang.String |
processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Process a configuration post.
|
protected void |
releaseCheck()
Release the session, if it's time.
|
void |
removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities) |
void |
viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
View configuration.
|
checkDateIndexable, checkDocumentIndexable, checkLengthIndexable, checkMimeTypeIndexable, checkURLIndexable, getFormCheckJavascriptMethodName, getFormPresaveCheckJavascriptMethodName, getPipelineDescription, noteAllRecordsRemoved, noteJobComplete, outputSpecificationBody, outputSpecificationHeader, processSpecificationPost, requestInfo, viewSpecificationclearThreadContext, deinstall, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfigurationprotected static final java.lang.String ACTIVITY_INJECTION
protected static final java.lang.String ACTIVITY_DELETE
protected java.lang.String host
protected java.lang.String port
protected java.lang.String database
protected java.lang.String collection
protected java.lang.String username
protected java.lang.String password
protected static final long timeToRelease
protected long lastSessionFetch
public java.lang.String[] getActivitiesList()
getActivitiesList in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectorgetActivitiesList in class org.apache.manifoldcf.agents.output.BaseOutputConnectorpublic void poll()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
poll in interface org.apache.manifoldcf.core.interfaces.IConnectorpoll in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic boolean isConnected()
isConnected in interface org.apache.manifoldcf.core.interfaces.IConnectorisConnected in class org.apache.manifoldcf.core.connector.BaseConnectorpublic void viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
viewConfiguration in interface org.apache.manifoldcf.core.interfaces.IConnectorviewConfiguration in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - 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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic void outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.List<java.lang.String> tabsArray)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputConfigurationHeader in interface org.apache.manifoldcf.core.interfaces.IConnectoroutputConfigurationHeader in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - 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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic void outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputConfigurationBody in interface org.apache.manifoldcf.core.interfaces.IConnectoroutputConfigurationBody in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic java.lang.String processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
processConfigurationPost in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - 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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void disconnect()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
disconnect in interface org.apache.manifoldcf.core.interfaces.IConnectordisconnect in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
connect in interface org.apache.manifoldcf.core.interfaces.IConnectorconnect in class org.apache.manifoldcf.core.connector.BaseConnectorconfigParams - is the set of configuration parameters, which in this case
describe the target, basic auth configuration, etc.public java.lang.String check()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
check in interface org.apache.manifoldcf.core.interfaces.IConnectorcheck in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected void getSession()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected void releaseCheck()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected void checkConnection()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionpublic int addOrReplaceDocumentWithException(java.lang.String documentURI,
org.apache.manifoldcf.core.interfaces.VersionContext pipelineDescription,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption,
java.io.IOException
addOrReplaceDocumentWithException in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectoraddOrReplaceDocumentWithException in class org.apache.manifoldcf.agents.output.BaseOutputConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionjava.io.IOExceptionpublic void removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
removeDocument in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectorremoveDocument in class org.apache.manifoldcf.agents.output.BaseOutputConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption