public class GridFSRepositoryConnector extends BaseRepositoryConnector
| Modifier and Type | Field and Description |
|---|---|
protected String |
acl
Endpoint acl.
|
protected static String |
ACTIVITY_FETCH
Activity name for the activity record.
|
protected String |
bucket
Endpoint bucket.
|
protected String |
db
Endpoint db.
|
protected String |
denyAcl
Endpoint denyAcl.
|
protected static HashMap |
documentKnownColumns
Special column names, as far as document queries are concerned
|
protected String |
host
Endpoint host.
|
protected long |
lastSessionFetch
Last session fetch time.
|
protected String |
password
Endpoint password.
|
protected String |
port
Endpoint port.
|
protected static String |
SERVER
Server name for declaring bin name.
|
protected com.mongodb.DB |
session
MongoDB session.
|
protected static long |
SESSION_EXPIRATION_MILLISECONDS
Session expiration milliseconds.
|
protected String |
url
Endpoint url.
|
protected String |
username
Endpoint username.
|
_rcsidcurrentContext, paramsGLOBAL_DENY_TOKEN, JOBMODE_CONTINUOUS, JOBMODE_ONCEONLY, MODEL_ADD, MODEL_ADD_CHANGE, MODEL_ADD_CHANGE_DELETE, MODEL_ALL, MODEL_CHAINED_ADD, MODEL_CHAINED_ADD_CHANGE, MODEL_CHAINED_ADD_CHANGE_DELETE, MODEL_PARTIAL| Constructor and Description |
|---|
GridFSRepositoryConnector()
Constructer.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addSeedDocuments(ISeedingActivity activities,
Specification spec,
String lastSeedVersion,
long seedTime,
int jobMode)
Queue "seed" documents.
|
protected void |
applyMetadata(RepositoryDocument rd,
com.mongodb.DBObject metadataMap)
Apply metadata to a repository document.
|
String |
check()
Test the connection.
|
void |
connect(ConfigParams configParams)
Connect.
|
void |
disconnect()
Close the connection.
|
void |
fillInServerParameters(Map<String,String> paramMap,
IPasswordMapperActivity mapper,
ConfigParams parameters)
Fill in a Server tab configuration parameter map for calling a Velocity
template.
|
String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e.
|
String[] |
getBinNames(String documentIdentifier)
Tell the world what model this connector uses for addSeedDocuments().
|
int |
getConnectorModel()
Tell the world what model this connector uses for addSeedDocuments().
|
int |
getMaxDocumentRequest()
Get the maximum number of documents to amalgamate together into one
batch, for this connector.
|
String[] |
getRelationshipTypes()
Return the list of relationship types that this connector recognizes.
|
protected void |
getSession()
Setup a session.
|
protected static void |
handleIOException(IOException e) |
boolean |
isConnected()
This method is called to assess whether to count this connector instance
should actually be counted as being connected.
|
void |
outputConfigurationBody(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
String tabName)
Output the configuration body section.
|
void |
outputConfigurationHeader(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
List<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.
|
String |
processConfigurationPost(IThreadContext threadContext,
IPostParameters variableContext,
Locale locale,
ConfigParams parameters)
Process a configuration post.
|
void |
processDocuments(String[] documentIdentifiers,
IExistingVersions statuses,
Specification spec,
IProcessActivity activities,
int jobMode,
boolean usesDefaultAuthority)
Process a set of documents.
|
void |
viewConfiguration(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters)
View configuration.
|
addSeedDocuments, addSeedDocuments, addSeedDocuments, getDocumentIdentifiers, getDocumentIdentifiers, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getFormCheckJavascriptMethodName, getFormPresaveCheckJavascriptMethodName, getRemainingDocumentIdentifiers, outputSpecificationBody, outputSpecificationBody, outputSpecificationBody, outputSpecificationHeader, outputSpecificationHeader, outputSpecificationHeader, outputSpecificationHeader, processDocuments, processDocuments, processDocuments, processDocuments, processSpecificationPost, processSpecificationPost, processSpecificationPost, releaseDocumentVersions, releaseDocumentVersions, requestInfo, viewSpecification, viewSpecification, viewSpecificationclearThreadContext, deinstall, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearThreadContext, deinstall, getConfiguration, install, setThreadContextprotected static final String ACTIVITY_FETCH
protected static final String SERVER
protected static final long SESSION_EXPIRATION_MILLISECONDS
protected String username
protected String password
protected String host
protected String port
protected String db
protected String bucket
protected String url
protected String acl
protected String denyAcl
protected com.mongodb.DB session
protected long lastSessionFetch
protected static HashMap documentKnownColumns
public String[] getBinNames(String documentIdentifier)
getBinNames in interface IRepositoryConnectorgetBinNames in class BaseRepositoryConnectorpublic int getConnectorModel()
getConnectorModel in interface IRepositoryConnectorgetConnectorModel in class BaseRepositoryConnectorpublic String[] getActivitiesList()
getActivitiesList in interface IRepositoryConnectorgetActivitiesList in class BaseRepositoryConnectorpublic void connect(ConfigParams configParams)
connect in interface IConnectorconnect in class BaseConnectorconfigParams - is the set of configuration parameters, which in this
case describe the root directory.public String check() throws ManifoldCFException
check in interface IConnectorcheck in class BaseConnectorManifoldCFExceptionpublic void disconnect()
throws ManifoldCFException
disconnect in interface IConnectordisconnect in class BaseConnectorManifoldCFExceptionpublic void poll()
throws ManifoldCFException
poll in interface IConnectorpoll in class BaseConnectorManifoldCFExceptionpublic boolean isConnected()
isConnected in interface IConnectorisConnected in class BaseConnectorpublic int getMaxDocumentRequest()
getMaxDocumentRequest in interface IRepositoryConnectorgetMaxDocumentRequest in class BaseRepositoryConnectorpublic String[] getRelationshipTypes()
getRelationshipTypes in interface IRepositoryConnectorgetRelationshipTypes in class BaseRepositoryConnectorpublic String addSeedDocuments(ISeedingActivity activities, Specification spec, String lastSeedVersion, long seedTime, int jobMode) throws ManifoldCFException, ServiceInterruption
addSeedDocuments in interface IRepositoryConnectoraddSeedDocuments in class BaseRepositoryConnectoractivities - is the interface this method should use to perform whatever framework actions are desired.spec - is a document specification (that comes from the job).seedTime - is the end of the time range of documents to consider, exclusive.lastSeedVersionString - is the last seeding version string for this job, or null if the job has no previous seeding version string.jobMode - is an integer describing how the job is being run, whether continuous or once-only.ManifoldCFExceptionServiceInterruptionpublic void processDocuments(String[] documentIdentifiers, IExistingVersions statuses, Specification spec, IProcessActivity activities, int jobMode, boolean usesDefaultAuthority) throws ManifoldCFException, ServiceInterruption
processDocuments in interface IRepositoryConnectorprocessDocuments in class BaseRepositoryConnectordocumentIdentifiers - is the set of document identifiers to process.statuses - are the currently-stored document versions for each document in the set of document identifiers
passed in above.activities - is the interface this method should use to queue up new document references
and ingest documents.jobMode - is an integer describing how the job is being run, whether continuous or once-only.usesDefaultAuthority - will be true only if the authority in use for these documents is the default one.ManifoldCFExceptionServiceInterruptionprotected static void handleIOException(IOException e) throws ManifoldCFException, ServiceInterruption
public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException
outputConfigurationHeader in interface IConnectoroutputConfigurationHeader in class 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.ManifoldCFExceptionIOExceptionpublic void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName) throws ManifoldCFException, IOException
outputConfigurationBody in interface IConnectoroutputConfigurationBody in class 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.tabName - is the current tab name.ManifoldCFExceptionIOExceptionpublic String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, Locale locale, ConfigParams parameters) throws ManifoldCFException
processConfigurationPost in interface IConnectorprocessConfigurationPost in class 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.ManifoldCFExceptionpublic void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException
viewConfiguration in interface IConnectorviewConfiguration in class 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.ManifoldCFExceptionIOExceptionprotected void getSession()
throws ManifoldCFException
ManifoldCFExceptionpublic void fillInServerParameters(Map<String,String> paramMap, IPasswordMapperActivity mapper, ConfigParams parameters)
paramMap - is the map to fill inparameters - is the current set of configuration parametersprotected void applyMetadata(RepositoryDocument rd, com.mongodb.DBObject metadataMap) throws ManifoldCFException
rd - is the repository document to apply the metadata to.metadataMap - is the resultset row to use to get the metadata. All
non-special columns from this row will be considered to be metadata.ManifoldCFException