Interface IRepositoryConnectionManager
-
- All Known Implementing Classes:
RepositoryConnectionManager
public interface IRepositoryConnectionManagerManager classes of this kind use the database to contain a human description of a repository connection.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringACTIVITY_JOBCONTINUEContinue a jobstatic java.lang.StringACTIVITY_JOBENDFinish a jobstatic java.lang.StringACTIVITY_JOBSTARTStart a jobstatic java.lang.StringACTIVITY_JOBSTOPStop a jobstatic java.lang.StringACTIVITY_JOBUNWAITUnwait due to schedulestatic java.lang.StringACTIVITY_JOBWAITWait due to schedulestatic java.lang.String[]activitySetThe set of activity records.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckConnectorExists(java.lang.String name)Check if underlying connector exists.voidcleanUpHistoryData(long timeCutoff)Delete history rows older than a specified timestamp.voidcleanUpHistoryData(java.lang.String connectionName)Delete history rows related to a specific connection, upon user request.longcountHistoryRows(java.lang.String connectionName, FilterCriteria criteria)Count the number of rows specified by a given set of criteria.IRepositoryConnectioncreate()Create a new repository connection object.voiddeinstall()Uninstall the manager.voiddelete(java.lang.String name)Delete a repository connection.voidexportConfiguration(java.io.OutputStream os)Export configurationjava.lang.String[]findConnectionsForConnector(java.lang.String className)Get a list of repository connections that share the same connector.IResultSetgenHistoryActivityCount(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount)Generate a report, listing the start time, activity count, and identifier bucket, given a time slice (interval) size.IResultSetgenHistoryByteCount(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount)Generate a report, listing the start time, bytes processed, and identifier bucket, given a time slice (interval) size.IResultSetgenHistoryResultCodes(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription resultCodeBucket, BucketDescription idBucket, int startRow, int maxRowCount)Generate a report, listing the result bucket and identifier bucket.IResultSetgenHistorySimple(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, int startRow, int maxRowCount)Generate a report, listing the start time, elapsed time, result code and description, number of bytes, and entity identifier.IRepositoryConnection[]getAllConnections()Obtain a list of the repository connections, ordered by name.java.lang.StringgetConnectionNameColumn()Return the name column.longgetMaxRows()Get the maximum number of rows a window-based report can work with.java.lang.StringgetTableName()Return the primary table name.voidimportConfiguration(java.io.InputStream is)Import configurationvoidinstall()Install the manager.booleanisGroupReferenced(java.lang.String authorityGroup)Return true if the specified authority group name is referenced.IRepositoryConnectionload(java.lang.String name)Load a repository connection by name.IRepositoryConnection[]loadMultiple(java.lang.String[] names)Load a set of repository connections.voidrecordHistory(java.lang.String connectionName, java.lang.Long startTime, java.lang.String activityType, java.lang.Long dataSize, java.lang.String entityIdentifier, java.lang.String resultCode, java.lang.String resultDescription, java.lang.String[] childIdentifiers)Record time-stamped information about the activity of the connection.booleansave(IRepositoryConnection object)Save a repository connection object.
-
-
-
Field Detail
-
_rcsid
static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
ACTIVITY_JOBSTART
static final java.lang.String ACTIVITY_JOBSTART
Start a job- See Also:
- Constant Field Values
-
ACTIVITY_JOBEND
static final java.lang.String ACTIVITY_JOBEND
Finish a job- See Also:
- Constant Field Values
-
ACTIVITY_JOBSTOP
static final java.lang.String ACTIVITY_JOBSTOP
Stop a job- See Also:
- Constant Field Values
-
ACTIVITY_JOBCONTINUE
static final java.lang.String ACTIVITY_JOBCONTINUE
Continue a job- See Also:
- Constant Field Values
-
ACTIVITY_JOBWAIT
static final java.lang.String ACTIVITY_JOBWAIT
Wait due to schedule- See Also:
- Constant Field Values
-
ACTIVITY_JOBUNWAIT
static final java.lang.String ACTIVITY_JOBUNWAIT
Unwait due to schedule- See Also:
- Constant Field Values
-
activitySet
static final java.lang.String[] activitySet
The set of activity records.
-
-
Method Detail
-
install
void install() throws ManifoldCFExceptionInstall the manager.- Throws:
ManifoldCFException
-
deinstall
void deinstall() throws ManifoldCFExceptionUninstall the manager.- Throws:
ManifoldCFException
-
exportConfiguration
void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFExceptionExport configuration- Throws:
java.io.IOExceptionManifoldCFException
-
importConfiguration
void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFExceptionImport configuration- Throws:
java.io.IOExceptionManifoldCFException
-
getAllConnections
IRepositoryConnection[] getAllConnections() throws ManifoldCFException
Obtain a list of the repository connections, ordered by name.- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
load
IRepositoryConnection load(java.lang.String name) throws ManifoldCFException
Load a repository connection by name.- Parameters:
name- is the name of the repository connection.- Returns:
- the loaded connection object, or null if not found.
- Throws:
ManifoldCFException
-
loadMultiple
IRepositoryConnection[] loadMultiple(java.lang.String[] names) throws ManifoldCFException
Load a set of repository connections.- Parameters:
names- are the names of the repository connections.- Returns:
- the descriptors of the repository connections, with null values for those not found.
- Throws:
ManifoldCFException
-
create
IRepositoryConnection create() throws ManifoldCFException
Create a new repository connection object.- Returns:
- the new object.
- Throws:
ManifoldCFException
-
save
boolean save(IRepositoryConnection object) throws ManifoldCFException
Save a repository connection object.- Parameters:
object- is the object to save.- Returns:
- true if the object is created, false otherwise.
- Throws:
ManifoldCFException
-
delete
void delete(java.lang.String name) throws ManifoldCFExceptionDelete a repository connection.- Parameters:
name- is the name of the connection to delete. If the name does not exist, no error is returned.- Throws:
ManifoldCFException
-
isGroupReferenced
boolean isGroupReferenced(java.lang.String authorityGroup) throws ManifoldCFExceptionReturn true if the specified authority group name is referenced.- Parameters:
authorityGroup- is the authority group name.- Returns:
- true if referenced, false otherwise.
- Throws:
ManifoldCFException
-
findConnectionsForConnector
java.lang.String[] findConnectionsForConnector(java.lang.String className) throws ManifoldCFExceptionGet a list of repository connections that share the same connector.- Parameters:
className- is the class name of the connector.- Returns:
- the repository connections that use that connector.
- Throws:
ManifoldCFException
-
checkConnectorExists
boolean checkConnectorExists(java.lang.String name) throws ManifoldCFExceptionCheck if underlying connector exists.- Parameters:
name- is the name of the connection to check.- Returns:
- true if the underlying connector is registered.
- Throws:
ManifoldCFException
-
getTableName
java.lang.String getTableName()
Return the primary table name.- Returns:
- the table name.
-
getConnectionNameColumn
java.lang.String getConnectionNameColumn()
Return the name column.- Returns:
- the name column.
-
cleanUpHistoryData
void cleanUpHistoryData(java.lang.String connectionName) throws ManifoldCFExceptionDelete history rows related to a specific connection, upon user request.- Parameters:
connectionName- is the connection whose history records should be removed.- Throws:
ManifoldCFException
-
cleanUpHistoryData
void cleanUpHistoryData(long timeCutoff) throws ManifoldCFExceptionDelete history rows older than a specified timestamp.- Parameters:
timeCutoff- is the timestamp to delete older rows before.- Throws:
ManifoldCFException
-
recordHistory
void recordHistory(java.lang.String connectionName, java.lang.Long startTime, java.lang.String activityType, java.lang.Long dataSize, java.lang.String entityIdentifier, java.lang.String resultCode, java.lang.String resultDescription, java.lang.String[] childIdentifiers) throws ManifoldCFExceptionRecord time-stamped information about the activity of the connection. This information can originate from either the connector or from the framework. The reason it is here is that it is viewed as 'belonging' to an individual connection, and is segregated accordingly.- Parameters:
connectionName- is the connection to which the record belongs. If the connection is deleted, the corresponding records will also be deleted. Cannot be null.startTime- is either null or the time since the start of epoch in milliseconds (Jan 1, 1970). Every activity has an associated time; the startTime field records when the activity began. A null value indicates that the start time and the finishing time are the same.activityType- is a string which is fully interpretable only in the context of the connector involved, which is used to categorize what kind of activity is being recorded. For example, a web connector might record a "fetch document" activity, while the framework might record "ingest document", "job start", "job finish", "job abort", etc. Cannot be null.dataSize- is the number of bytes of data involved in the activity, or null if not applicable.entityIdentifier- is a (possibly long) string which identifies the object involved in the history record. The interpretation of this field will differ from connector to connector. May be null.resultCode- contains a terse description of the result of the activity. The description is limited in size to 255 characters, and can be interpreted only in the context of the current connector. May be null.resultDescription- is a (possibly long) human-readable string which adds detail, if required, to the result described in the resultCode field. This field is not meant to be queried on. May be null.childIdentifiers- is a set of child entity identifiers associated with this activity. May be null.- Throws:
ManifoldCFException
-
genHistorySimple
IResultSet genHistorySimple(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, int startRow, int maxRowCount) throws ManifoldCFException
Generate a report, listing the start time, elapsed time, result code and description, number of bytes, and entity identifier. The records selected for this report are based on the filtering criteria object passed into this method. The record order is based on the sorting criteria object passed into this method. The resultset returned should have the following columns: "activity","starttime","elapsedtime","resultcode","resultdesc","bytes","identifier".- Parameters:
connectionName- is the name of the connection.criteria- is the filtering criteria, which selects the records of interest.sort- is the sorting order, which can specify sort based on the result columns.startRow- is the first row to include (beginning with 0)maxRowCount- is the maximum number of rows to include.- Throws:
ManifoldCFException
-
countHistoryRows
long countHistoryRows(java.lang.String connectionName, FilterCriteria criteria) throws ManifoldCFExceptionCount the number of rows specified by a given set of criteria. This can be used to make decisions as to whether a query based on those rows will complete in an acceptable amount of time.- Parameters:
connectionName- is the name of the connection.criteria- is the filtering criteria, which selects the records of interest.- Returns:
- the number of rows included by the criteria.
- Throws:
ManifoldCFException
-
getMaxRows
long getMaxRows() throws ManifoldCFExceptionGet the maximum number of rows a window-based report can work with.- Returns:
- the maximum rows.
- Throws:
ManifoldCFException
-
genHistoryActivityCount
IResultSet genHistoryActivityCount(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount) throws ManifoldCFException
Generate a report, listing the start time, activity count, and identifier bucket, given a time slice (interval) size. The records selected for this report are based on the filtering criteria object passed into this method. The record order is based on the sorting criteria object passed into this method. The identifier bucket description is specified by the bucket description object. The resultset returned should have the following columns: "starttime","endtime","activitycount","idbucket".- Parameters:
connectionName- is the name of the connection.criteria- is the filtering criteria, which selects the records of interest.sort- is the sorting order, which can specify sort based on the result columns.idBucket- is the description of the bucket based on processed entity identifiers.interval- is the time interval, in milliseconds, to locate. There will be one row in the resultset for each distinct idBucket value, and the returned activity count will the maximum found over the specified interval size.startRow- is the first row to include (beginning with 0)maxRowCount- is the maximum number of rows to include.- Throws:
ManifoldCFException
-
genHistoryByteCount
IResultSet genHistoryByteCount(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket, long interval, int startRow, int maxRowCount) throws ManifoldCFException
Generate a report, listing the start time, bytes processed, and identifier bucket, given a time slice (interval) size. The records selected for this report are based on the filtering criteria object passed into this method. The record order is based on the sorting criteria object passed into this method. The identifier bucket description is specified by the bucket description object. The resultset returned should have the following columns: "starttime","endtime","bytecount","idbucket".- Parameters:
connectionName- is the name of the connection.criteria- is the filtering criteria, which selects the records of interest.sort- is the sorting order, which can specify sort based on the result columns.idBucket- is the description of the bucket based on processed entity identifiers.interval- is the time interval, in milliseconds, to locate. There will be one row in the resultset for each distinct idBucket value, and the returned activity count will the maximum found over the specified interval size.startRow- is the first row to include (beginning with 0)maxRowCount- is the maximum number of rows to include.- Throws:
ManifoldCFException
-
genHistoryResultCodes
IResultSet genHistoryResultCodes(java.lang.String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription resultCodeBucket, BucketDescription idBucket, int startRow, int maxRowCount) throws ManifoldCFException
Generate a report, listing the result bucket and identifier bucket. The records selected for this report are based on the filtering criteria object passed into this method. The record order is based on the sorting criteria object passed into this method. The result code bucket description is specified by a bucket description object. The identifier bucket description is specified by a bucket description object. The resultset returned should have the following columns: "eventcount","resultcodebucket","idbucket".- Parameters:
connectionName- is the name of the connection.criteria- is the filtering criteria, which selects the records of interest.sort- is the sorting order, which can specify sort based on the result columns.resultCodeBucket- is the description of the bucket based on processed result codes.idBucket- is the description of the bucket based on processed entity identifiers.startRow- is the first row to include (beginning with 0)maxRowCount- is the maximum number of rows to include.- Throws:
ManifoldCFException
-
-