public class MeridioConnector extends BaseRepositoryConnector
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MeridioConnector.MutableInteger
Helper class for keeping track of metadata index for each document
|
| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
protected URL |
DmwsURL |
protected MeridioWrapper |
meridio_ |
protected SSLSocketFactory |
mySSLFactory |
protected URL |
RmwsURL |
protected String |
urlBase |
protected String |
urlVersionBase |
currentContext, 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 |
|---|
MeridioConnector()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addSeedDocuments(ISeedingActivity activities,
Specification spec,
String lastSeedVersion,
long seedTime,
int jobMode)
Queue "seed" documents.
|
String |
check()
Test the connection.
|
void |
disconnect()
Close the connection.
|
protected DMSearchResults |
documentSpecificationSearch(Specification docSpec,
long startTime,
long endTime,
int startPositionOfHits,
int maxHitsToReturn,
long[] restrictDocumentId,
org.apache.manifoldcf.crawler.connectors.meridio.MeridioConnector.ReturnMetadata[] returnMetadata)
Returns objects from the Meridio repository matching the document specification,
and constrained by the start/end object addition times, and the subset of the total
results to return (startPositionOfHits and maxHitsToReturn)
The search method can return the results in "batches" results, based on the start position
and maximum hits to return.
|
protected static String[] |
getAcls(Specification spec)
Grab forced acl out of document specification.
|
String[] |
getBinNames(String documentIdentifier)
Get the bin name string for a document identifier.
|
MeridioClassContents[] |
getClassOrFolderContents(int classOrFolderId) |
int |
getConnectorModel()
Tell the world what model this connector uses for getDocumentIdentifiers().
|
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.
|
int |
getMaxDocumentRequest()
Get the maximum number of documents to amalgamate together into one batch, for this connector.
|
String[] |
getMeridioCategories()
Returns the categories set up in the Meridio system; these are used by the UI for two
purposes
1) To populate the "SearchCategory"
Use "getPROP_title()" on the list of CATEGORIES object in
the return ArrayList
2) To assist with population of the metadata values to return.
|
String[] |
getMeridioDocumentProperties() |
protected void |
getSession()
Set up the session with Meridio
|
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 |
outputSpecificationBody(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber,
int actualSequenceNumber,
String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber,
List<String> tabsArray)
Output the specification header section.
|
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.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
Specification ds,
int connectionSequenceNumber)
Process a specification post.
|
boolean |
requestInfo(Configuration output,
String command)
Request arbitrary connector information.
|
void |
viewConfiguration(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters)
View configuration.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber)
View specification.
|
addSeedDocuments, addSeedDocuments, addSeedDocuments, getActivitiesList, getDocumentIdentifiers, getDocumentIdentifiers, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getDocumentVersions, getRelationshipTypes, getRemainingDocumentIdentifiers, outputSpecificationBody, outputSpecificationBody, outputSpecificationHeader, outputSpecificationHeader, outputSpecificationHeader, processDocuments, processDocuments, processDocuments, processDocuments, processSpecificationPost, processSpecificationPost, releaseDocumentVersions, releaseDocumentVersions, viewSpecification, viewSpecificationclearThreadContext, connect, deinstall, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearThreadContext, connect, deinstall, getConfiguration, install, isConnected, poll, setThreadContextpublic static final String _rcsid
protected String urlBase
protected String urlVersionBase
protected URL DmwsURL
protected URL RmwsURL
protected SSLSocketFactory mySSLFactory
protected MeridioWrapper meridio_
public int getConnectorModel()
getConnectorModel in interface IRepositoryConnectorgetConnectorModel in class BaseRepositoryConnectorprotected void getSession()
throws ManifoldCFException,
ServiceInterruption
public String[] getBinNames(String documentIdentifier)
getBinNames in interface IRepositoryConnectorgetBinNames in class BaseRepositoryConnectordocumentIdentifier - is the document identifier.public String check() throws ManifoldCFException
check in interface IConnectorcheck in class BaseConnectorManifoldCFExceptionpublic void disconnect()
throws ManifoldCFException
disconnect in interface IConnectordisconnect in class BaseConnectorManifoldCFExceptionpublic int getMaxDocumentRequest()
getMaxDocumentRequest in interface IRepositoryConnectorgetMaxDocumentRequest in class BaseRepositoryConnectorpublic boolean requestInfo(Configuration output, String command) throws ManifoldCFException
requestInfo in interface IRepositoryConnectorrequestInfo in class BaseRepositoryConnectoroutput - is the response object, to be filled in by this method.command - is the command, which is taken directly from the API request.ManifoldCFExceptionpublic 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.ManifoldCFExceptionServiceInterruptionpublic 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.ManifoldCFExceptionIOExceptionpublic String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName in interface IRepositoryConnectorgetFormCheckJavascriptMethodName in class BaseRepositoryConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName in interface IRepositoryConnectorgetFormPresaveCheckJavascriptMethodName in class BaseRepositoryConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public void outputSpecificationHeader(IHTTPOutput out, Locale locale, Specification ds, int connectionSequenceNumber, List<String> tabsArray) throws ManifoldCFException, IOException
outputSpecificationHeader in interface IRepositoryConnectoroutputSpecificationHeader in class BaseRepositoryConnectorout - is the output to which any HTML should be sent.locale - is the locale the output is preferred to be in.ds - is the current document specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFExceptionIOExceptionpublic void outputSpecificationBody(IHTTPOutput out, Locale locale, Specification ds, int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException
outputSpecificationBody in interface IRepositoryConnectoroutputSpecificationBody in class BaseRepositoryConnectorout - is the output to which any HTML should be sent.locale - is the locale the output is preferred to be in.ds - is the current document specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.actualSequenceNumber - is the connection within the job that has currently been selected.tabName - is the current tab name. (actualSequenceNumber, tabName) form a unique tuple within
the job.ManifoldCFExceptionIOExceptionpublic String processSpecificationPost(IPostParameters variableContext, Locale locale, Specification ds, int connectionSequenceNumber) throws ManifoldCFException
processSpecificationPost in interface IRepositoryConnectorprocessSpecificationPost in class BaseRepositoryConnectorvariableContext - contains the post data, including binary file-upload information.locale - is the locale the output is preferred to be in.ds - is the current document specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.ManifoldCFExceptionpublic void viewSpecification(IHTTPOutput out, Locale locale, Specification ds, int connectionSequenceNumber) throws ManifoldCFException, IOException
viewSpecification in interface IRepositoryConnectorviewSpecification in class BaseRepositoryConnectorout - is the output to which any HTML should be sent.locale - is the locale the output is preferred to be in.ds - is the current document specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.ManifoldCFExceptionIOExceptionprotected static String[] getAcls(Specification spec)
spec - is the document specification.protected DMSearchResults documentSpecificationSearch(Specification docSpec, long startTime, long endTime, int startPositionOfHits, int maxHitsToReturn, long[] restrictDocumentId, org.apache.manifoldcf.crawler.connectors.meridio.MeridioConnector.ReturnMetadata[] returnMetadata) throws RemoteException, MeridioDataSetException
docSpec - the criteria to determine if an object should be returnedstartTime - the date/time after which the object must have been added (inclusive)endTime - the date/time before which the object must have been added (exclusive)startPositionOfHits - the starting position in the hits to begin returning results frommaxHitsToReturn - the maximum number of hits to returnrestrictDocumentId - if the array is empty then return all matching objects, otherwise
Search results are returned in the SEARCHRESULTS_DOCUMENTS DataTable.RemoteException - if an error is encountered call the Meridio web service method(s)MeridioDataSetException - if an error is encountered manipulating the Meridio DataSetpublic String[] getMeridioCategories() throws ManifoldCFException, ServiceInterruption
ManifoldCFExceptionServiceInterruptionpublic String[] getMeridioDocumentProperties() throws ManifoldCFException, ServiceInterruption
public MeridioClassContents[] getClassOrFolderContents(int classOrFolderId) throws ManifoldCFException, ServiceInterruption