public abstract class BaseRepositoryConnector extends BaseConnector implements IRepositoryConnector
| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
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 |
|---|
BaseRepositoryConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSeedDocuments(ISeedingActivity activities,
DocumentSpecification spec,
long startTime,
long endTime)
Queue "seed" documents.
|
void |
addSeedDocuments(ISeedingActivity activities,
DocumentSpecification spec,
long startTime,
long endTime,
int jobMode) |
void |
addSeedDocuments(ISeedingActivity activities,
Specification spec,
long startTime,
long endTime,
int jobMode)
Queue "seed" documents.
|
String |
addSeedDocuments(ISeedingActivity activities,
Specification spec,
String lastSeedVersion,
long seedTime,
int jobMode)
Queue "seed" documents.
|
String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e.
|
String[] |
getBinNames(String documentIdentifier)
Get the bin name strings for a document identifier.
|
int |
getConnectorModel()
Tell the world what model this connector uses for getDocumentIdentifiers().
|
IDocumentIdentifierStream |
getDocumentIdentifiers(DocumentSpecification spec,
long startTime,
long endTime)
The short version of getDocumentIdentifiers.
|
IDocumentIdentifierStream |
getDocumentIdentifiers(ISeedingActivity activities,
DocumentSpecification spec,
long startTime,
long endTime)
The long version of getDocumentIdentifiers.
|
void |
getDocumentVersions(DocumentVersions documentVersions,
String[] documentIdentifiers,
String[] oldVersions,
IVersionActivity activities,
Specification spec,
int jobMode,
boolean usesDefaultAuthority)
Get document versions given an array of document identifiers.
|
String[] |
getDocumentVersions(String[] documentIdentifiers,
DocumentSpecification spec)
The short version of getDocumentVersions.
|
String[] |
getDocumentVersions(String[] documentIdentifiers,
IVersionActivity activities,
DocumentSpecification spec)
The long version of getDocumentIdentifiers.
|
String[] |
getDocumentVersions(String[] documentIdentifiers,
String[] oldVersions,
IVersionActivity activities,
DocumentSpecification spec)
Get document versions given an array of document identifiers.
|
String[] |
getDocumentVersions(String[] documentIdentifiers,
String[] oldVersions,
IVersionActivity activities,
DocumentSpecification spec,
int jobMode)
Get document versions given an array of document identifiers.
|
String[] |
getDocumentVersions(String[] documentIdentifiers,
String[] oldVersions,
IVersionActivity activities,
DocumentSpecification spec,
int jobMode,
boolean usesDefaultAuthority) |
String[] |
getDocumentVersions(String[] documentIdentifiers,
String[] oldVersions,
IVersionActivity activities,
Specification spec,
int jobMode,
boolean usesDefaultAuthority)
Get document versions given an array of document identifiers.
|
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[] |
getRelationshipTypes()
Return the list of relationship types that this connector recognizes.
|
IDocumentIdentifierStream |
getRemainingDocumentIdentifiers(ISeedingActivity activities,
DocumentSpecification spec,
long startTime,
long endTime)
This method returns the document identifiers that should be considered part of the seeds, but do not need to be
queued for processing at this time.
|
void |
outputSpecificationBody(IHTTPOutput out,
DocumentSpecification ds,
String tabName)
Output the specification body section.
|
void |
outputSpecificationBody(IHTTPOutput out,
Locale locale,
DocumentSpecification ds,
String tabName)
Output the specification body section.
|
void |
outputSpecificationBody(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber,
int actualSequenceNumber,
String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
DocumentSpecification ds,
ArrayList<Object> tabsArray) |
void |
outputSpecificationHeader(IHTTPOutput out,
DocumentSpecification ds,
List<String> tabsArray)
Output the specification header section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
DocumentSpecification ds,
List<String> tabsArray)
Output the specification header section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber,
List<String> tabsArray)
Output the specification header section.
|
void |
processDocuments(String[] documentIdentifiers,
DocumentVersions versions,
IProcessActivity activities,
boolean[] scanOnly,
int jobMode)
Process a set of documents.
|
void |
processDocuments(String[] documentIdentifiers,
IExistingVersions statuses,
Specification spec,
IProcessActivity activities,
int jobMode,
boolean usesDefaultAuthority)
Process a set of documents.
|
void |
processDocuments(String[] documentIdentifiers,
String[] versions,
IProcessActivity activities,
DocumentSpecification spec,
boolean[] scanOnly)
Process a set of documents.
|
void |
processDocuments(String[] documentIdentifiers,
String[] versions,
IProcessActivity activities,
DocumentSpecification spec,
boolean[] scanOnly,
int jobMode) |
void |
processDocuments(String[] documentIdentifiers,
String[] versions,
IProcessActivity activities,
Specification spec,
boolean[] scanOnly,
int jobMode)
Process a set of documents.
|
String |
processSpecificationPost(IPostParameters variableContext,
DocumentSpecification ds)
Process a specification post.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
DocumentSpecification ds)
Process a specification post.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
Specification ds,
int connectionSequenceNumber)
Process a specification post.
|
void |
releaseDocumentVersions(String[] documentIdentifiers,
DocumentVersions versions)
Free a set of documents.
|
void |
releaseDocumentVersions(String[] documentIdentifiers,
String[] versions)
Free a set of documents.
|
boolean |
requestInfo(Configuration output,
String command)
Request arbitrary connector information.
|
void |
viewSpecification(IHTTPOutput out,
DocumentSpecification ds)
View specification.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
DocumentSpecification ds)
View specification.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
Specification ds,
int connectionSequenceNumber)
View specification.
|
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheck, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfigurationpublic static final String _rcsid
public int getConnectorModel()
getConnectorModel in interface IRepositoryConnectorpublic String[] getActivitiesList()
getActivitiesList in interface IRepositoryConnectorpublic String[] getRelationshipTypes()
getRelationshipTypes in interface IRepositoryConnectorpublic String[] getBinNames(String documentIdentifier)
getBinNames in interface IRepositoryConnectordocumentIdentifier - is the document identifier.public boolean requestInfo(Configuration output, String command) throws ManifoldCFException
requestInfo in interface IRepositoryConnectoroutput - 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 IRepositoryConnectoractivities - 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 addSeedDocuments(ISeedingActivity activities, Specification spec, long startTime, long endTime, int jobMode) throws ManifoldCFException, ServiceInterruption
activities - is the interface this method should use to perform whatever framework actions are desired.spec - is a document specification (that comes from the job).startTime - is the beginning of the time range to consider, inclusive.endTime - is the end of the time range to consider, exclusive.jobMode - is an integer describing how the job is being run, whether continuous or once-only.ManifoldCFExceptionServiceInterruptionpublic void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec, long startTime, long endTime, int jobMode) throws ManifoldCFException, ServiceInterruption
public void addSeedDocuments(ISeedingActivity activities, DocumentSpecification spec, long startTime, long endTime) throws ManifoldCFException, ServiceInterruption
activities - is the interface this method should use to perform whatever framework actions are desired.spec - is a document specification (that comes from the job).startTime - is the beginning of the time range to consider, inclusive.endTime - is the end of the time range to consider, exclusive.ManifoldCFExceptionServiceInterruptionpublic IDocumentIdentifierStream getDocumentIdentifiers(ISeedingActivity activities, DocumentSpecification spec, long startTime, long endTime) throws ManifoldCFException, ServiceInterruption
activities - is the interface this method should use to perform whatever framework actions are desired.spec - is a document specification (that comes from the job).startTime - is the beginning of the time range to consider, inclusive.endTime - is the end of the time range to consider, exclusive.ManifoldCFExceptionServiceInterruptionpublic IDocumentIdentifierStream getDocumentIdentifiers(DocumentSpecification spec, long startTime, long endTime) throws ManifoldCFException, ServiceInterruption
spec - is a document specification (that comes from the job).startTime - is the beginning of the time range to consider, inclusive.endTime - is the end of the time range to consider, exclusive.ManifoldCFExceptionServiceInterruptionpublic IDocumentIdentifierStream getRemainingDocumentIdentifiers(ISeedingActivity activities, DocumentSpecification spec, long startTime, long endTime) throws ManifoldCFException, ServiceInterruption
activities - is the interface this method should use to perform whatever framework actions are desired.spec - is a document specification (that comes from the job).startTime - is the beginning of the time range that was passed to getDocumentIdentifiers().endTime - is the end of the time range to passed to getDocumentIdentifiers().ManifoldCFExceptionServiceInterruptionpublic void processDocuments(String[] documentIdentifiers, IExistingVersions statuses, Specification spec, IProcessActivity activities, int jobMode, boolean usesDefaultAuthority) throws ManifoldCFException, ServiceInterruption
processDocuments in interface IRepositoryConnectordocumentIdentifiers - 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 getDocumentVersions(DocumentVersions documentVersions, String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities, Specification spec, int jobMode, boolean usesDefaultAuthority) throws ManifoldCFException, ServiceInterruption
documentVersions - is the versions object, to be filled in by this method.documentIdentifiers - is the array of local document identifiers, as understood by this connector.oldVersions - is the corresponding array of version strings that have been saved for the document identifiers.
A null value indicates that this is a first-time fetch, while an empty string indicates that the previous document
had an empty version string.activities - is the interface this method should use to perform whatever framework actions are desired.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.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 String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities, Specification spec, int jobMode, boolean usesDefaultAuthority) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the array of local document identifiers, as understood by this connector.oldVersions - is the corresponding array of version strings that have been saved for the document identifiers.
A null value indicates that this is a first-time fetch, while an empty string indicates that the previous document
had an empty version string.activities - is the interface this method should use to perform whatever framework actions are desired.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.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 String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities, DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority) throws ManifoldCFException, ServiceInterruption
public String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities, DocumentSpecification spec, int jobMode) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the array of local document identifiers, as understood by this connector.oldVersions - is the corresponding array of version strings that have been saved for the document identifiers.
A null value indicates that this is a first-time fetch, while an empty string indicates that the previous document
had an empty version string.activities - is the interface this method should use to perform whatever framework actions are desired.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.jobMode - is an integer describing how the job is being run, whether continuous or once-only.ManifoldCFExceptionServiceInterruptionpublic String[] getDocumentVersions(String[] documentIdentifiers, String[] oldVersions, IVersionActivity activities, DocumentSpecification spec) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the array of local document identifiers, as understood by this connector.oldVersions - is the corresponding array of version strings that have been saved for the document identifiers.
A null value indicates that this is a first-time fetch, while an empty string indicates that the previous document
had an empty version string.activities - is the interface this method should use to perform whatever framework actions are desired.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.ManifoldCFExceptionServiceInterruptionpublic String[] getDocumentVersions(String[] documentIdentifiers, IVersionActivity activities, DocumentSpecification spec) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the array of local document identifiers, as understood by this connector.activities - is the interface this method should use to perform whatever framework actions are desired.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.ManifoldCFExceptionServiceInterruptionpublic String[] getDocumentVersions(String[] documentIdentifiers, DocumentSpecification spec) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the array of local document identifiers, as understood by this connector.spec - is the current document specification for the current job. If there is a dependency on this
specification, then the version string should include the pertinent data, so that reingestion will occur
when the specification changes. This is primarily useful for metadata.ManifoldCFExceptionServiceInterruptionpublic void releaseDocumentVersions(String[] documentIdentifiers, DocumentVersions versions) throws ManifoldCFException
documentIdentifiers - is the set of document identifiers.versions - is the corresponding set of version strings (individual identifiers may have no version).ManifoldCFExceptionpublic void releaseDocumentVersions(String[] documentIdentifiers, String[] versions) throws ManifoldCFException
documentIdentifiers - is the set of document identifiers.versions - is the corresponding set of version identifiers (individual identifiers may be null).ManifoldCFExceptionpublic int getMaxDocumentRequest()
getMaxDocumentRequest in interface IRepositoryConnectorpublic void processDocuments(String[] documentIdentifiers, DocumentVersions versions, IProcessActivity activities, boolean[] scanOnly, int jobMode) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the set of document identifiers to process.versions - are the version strings returned by getDocumentVersions() above.activities - is the interface this method should use to queue up new document references
and ingest documents.scanOnly - is an array corresponding to the document identifiers. It is set to true to indicate when the processing
should only find other references, and should not actually call the ingestion methods.jobMode - is an integer describing how the job is being run, whether continuous or once-only.ManifoldCFExceptionServiceInterruptionpublic void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, Specification spec, boolean[] scanOnly, int jobMode) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the set of document identifiers to process.versions - is the corresponding document versions to process, as returned by getDocumentVersions() above.
The implementation may choose to ignore this parameter and always process the current version.activities - is the interface this method should use to queue up new document references
and ingest documents.spec - is the document specification.scanOnly - is an array corresponding to the document identifiers. It is set to true to indicate when the processing
should only find other references, and should not actually call the ingestion methods.jobMode - is an integer describing how the job is being run, whether continuous or once-only.ManifoldCFExceptionServiceInterruptionpublic void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly, int jobMode) throws ManifoldCFException, ServiceInterruption
public void processDocuments(String[] documentIdentifiers, String[] versions, IProcessActivity activities, DocumentSpecification spec, boolean[] scanOnly) throws ManifoldCFException, ServiceInterruption
documentIdentifiers - is the set of document identifiers to process.versions - is the corresponding document versions to process, as returned by getDocumentVersions() above.
The implementation may choose to ignore this parameter and always process the current version.activities - is the interface this method should use to queue up new document references
and ingest documents.spec - is the document specification.scanOnly - is an array corresponding to the document identifiers. It is set to true to indicate when the processing
should only find other references, and should not actually call the ingestion methods.ManifoldCFExceptionServiceInterruptionpublic String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName in interface IRepositoryConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName in interface IRepositoryConnectorconnectionSequenceNumber - 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 IRepositoryConnectorout - 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 outputSpecificationHeader(IHTTPOutput out, Locale locale, DocumentSpecification ds, List<String> tabsArray) throws ManifoldCFException, IOException
out - 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.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFExceptionIOExceptionpublic void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, List<String> tabsArray) throws ManifoldCFException, IOException
out - is the output to which any HTML should be sent.ds - is the current document specification for this job.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFExceptionIOExceptionpublic void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, ArrayList<Object> tabsArray) throws ManifoldCFException, IOException
ManifoldCFExceptionIOExceptionpublic void outputSpecificationBody(IHTTPOutput out, Locale locale, Specification ds, int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException
outputSpecificationBody in interface IRepositoryConnectorout - 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 void outputSpecificationBody(IHTTPOutput out, Locale locale, DocumentSpecification ds, String tabName) throws ManifoldCFException, IOException
out - 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.tabName - is the current tab name.ManifoldCFExceptionIOExceptionpublic void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName) throws ManifoldCFException, IOException
out - is the output to which any HTML should be sent.ds - is the current document specification for this job.tabName - is the current tab name.ManifoldCFExceptionIOExceptionpublic String processSpecificationPost(IPostParameters variableContext, Locale locale, Specification ds, int connectionSequenceNumber) throws ManifoldCFException
processSpecificationPost in interface IRepositoryConnectorvariableContext - 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 String processSpecificationPost(IPostParameters variableContext, Locale locale, DocumentSpecification ds) throws ManifoldCFException
variableContext - 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.ManifoldCFExceptionpublic String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds) throws ManifoldCFException
variableContext - contains the post data, including binary file-upload information.ds - is the current document specification for this job.ManifoldCFExceptionpublic void viewSpecification(IHTTPOutput out, Locale locale, Specification ds, int connectionSequenceNumber) throws ManifoldCFException, IOException
viewSpecification in interface IRepositoryConnectorout - 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.ManifoldCFExceptionIOExceptionpublic void viewSpecification(IHTTPOutput out, Locale locale, DocumentSpecification ds) throws ManifoldCFException, IOException
out - 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.ManifoldCFExceptionIOExceptionpublic void viewSpecification(IHTTPOutput out, DocumentSpecification ds) throws ManifoldCFException, IOException
out - is the output to which any HTML should be sent.ds - is the current document specification for this job.ManifoldCFExceptionIOException