Interface IRepositoryConnectionManager
-
- All Known Implementing Classes:
RepositoryConnectionManager
public interface IRepositoryConnectionManager
Manager 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
_rcsid
static java.lang.String
ACTIVITY_JOBCONTINUE
Continue a jobstatic java.lang.String
ACTIVITY_JOBEND
Finish a jobstatic java.lang.String
ACTIVITY_JOBSTART
Start a jobstatic java.lang.String
ACTIVITY_JOBSTOP
Stop a jobstatic java.lang.String
ACTIVITY_JOBUNWAIT
Unwait due to schedulestatic java.lang.String
ACTIVITY_JOBWAIT
Wait due to schedulestatic java.lang.String[]
activitySet
The set of activity records.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkConnectorExists(java.lang.String name)
Check if underlying connector exists.void
cleanUpHistoryData(long timeCutoff)
Delete history rows older than a specified timestamp.void
cleanUpHistoryData(java.lang.String connectionName)
Delete history rows related to a specific connection, upon user request.long
countHistoryRows(java.lang.String connectionName, FilterCriteria criteria)
Count the number of rows specified by a given set of criteria.IRepositoryConnection
create()
Create a new repository connection object.void
deinstall()
Uninstall the manager.void
delete(java.lang.String name)
Delete a repository connection.void
exportConfiguration(java.io.OutputStream os)
Export configurationjava.lang.String[]
findConnectionsForConnector(java.lang.String className)
Get a list of repository connections that share the same connector.IResultSet
genHistoryActivityCount(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.IResultSet
genHistoryByteCount(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.IResultSet
genHistoryResultCodes(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.IResultSet
genHistorySimple(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.String
getConnectionNameColumn()
Return the name column.long
getMaxRows()
Get the maximum number of rows a window-based report can work with.java.lang.String
getTableName()
Return the primary table name.void
importConfiguration(java.io.InputStream is)
Import configurationvoid
install()
Install the manager.boolean
isGroupReferenced(java.lang.String authorityGroup)
Return true if the specified authority group name is referenced.IRepositoryConnection
load(java.lang.String name)
Load a repository connection by name.IRepositoryConnection[]
loadMultiple(java.lang.String[] names)
Load a set of repository connections.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)
Record time-stamped information about the activity of the connection.boolean
save(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 ManifoldCFException
Install the manager.- Throws:
ManifoldCFException
-
deinstall
void deinstall() throws ManifoldCFException
Uninstall the manager.- Throws:
ManifoldCFException
-
exportConfiguration
void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFException
Export configuration- Throws:
java.io.IOException
ManifoldCFException
-
importConfiguration
void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFException
Import configuration- Throws:
java.io.IOException
ManifoldCFException
-
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 ManifoldCFException
Delete 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 ManifoldCFException
Return 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 ManifoldCFException
Get 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 ManifoldCFException
Check 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 ManifoldCFException
Delete 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 ManifoldCFException
Delete 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 ManifoldCFException
Record 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 ManifoldCFException
Count 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 ManifoldCFException
Get 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
-
-