Class ConnectorManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.connmgr.ConnectorManager
-
- All Implemented Interfaces:
IConnectorManager
public class ConnectorManager extends BaseTable implements IConnectorManager
Implementation of IConnectorManager.
connectorsField Type Description description VARCHAR(255) classname VARCHAR(255) Primary Key
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected static java.lang.String
classNameField
protected static java.lang.String
descriptionField
protected IThreadContext
threadContext
-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description ConnectorManager(IThreadContext threadContext, IDBInterface database)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deinstall()
Uninstall.protected java.lang.String
getCacheKey()
Get the cache key for the connector manager table.IResultSet
getConnectors()
Get ordered list of connectors.java.lang.String
getDescription(java.lang.String className)
Get a description given a class name.void
install()
Install or upgrade.boolean
isInstalled(java.lang.String className)
Check if a particular connector is installed or not.void
registerConnector(java.lang.String description, java.lang.String className)
Register a new connector.void
removeConnector(java.lang.String className)
Remove a connector.void
unregisterConnector(java.lang.String className)
Unregister a connector.-
Methods inherited from class org.apache.manifoldcf.core.database.BaseTable
addTableIndex, analyzeTable, beginTransaction, buildConjunctionClause, constructCountClause, constructDistinctOnClause, constructDoubleCastClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, findConjunctionClauseMax, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getSleepAmt, getTableIndexes, getTableName, getTableSchema, getTransactionID, getWindowedReportMaxRows, makeTableKey, noteModifications, performAddIndex, performAlter, performCommit, performCreate, performDelete, performDrop, performInsert, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback, sleepFor
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
descriptionField
protected static final java.lang.String descriptionField
- See Also:
- Constant Field Values
-
classNameField
protected static final java.lang.String classNameField
- See Also:
- Constant Field Values
-
threadContext
protected IThreadContext threadContext
-
-
Constructor Detail
-
ConnectorManager
public ConnectorManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
threadContext
- is the thread context.database
- is the database handle.- Throws:
ManifoldCFException
-
-
Method Detail
-
install
public void install() throws ManifoldCFException
Install or upgrade.- Specified by:
install
in interfaceIConnectorManager
- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFException
Uninstall. This also unregisters all connectors.- Specified by:
deinstall
in interfaceIConnectorManager
- Throws:
ManifoldCFException
-
registerConnector
public void registerConnector(java.lang.String description, java.lang.String className) throws ManifoldCFException
Register a new connector. The connector's install method will also be called.- Specified by:
registerConnector
in interfaceIConnectorManager
- Parameters:
description
- is the description to use in the UI.className
- is the class name.- Throws:
ManifoldCFException
-
unregisterConnector
public void unregisterConnector(java.lang.String className) throws ManifoldCFException
Unregister a connector. The connector's deinstall method will also be called.- Specified by:
unregisterConnector
in interfaceIConnectorManager
- Parameters:
className
- is the class of the connector to unregister.- Throws:
ManifoldCFException
-
removeConnector
public void removeConnector(java.lang.String className) throws ManifoldCFException
Remove a connector. Use this method when the connector doesn't seem to be in the classpath, so deregistration cannot occur.- Specified by:
removeConnector
in interfaceIConnectorManager
- Parameters:
className
- is the connector class to remove.- Throws:
ManifoldCFException
-
getConnectors
public IResultSet getConnectors() throws ManifoldCFException
Get ordered list of connectors.- Specified by:
getConnectors
in interfaceIConnectorManager
- Returns:
- a resultset with the columns "description" and "classname". These will be ordered by description.
- Throws:
ManifoldCFException
-
getDescription
public java.lang.String getDescription(java.lang.String className) throws ManifoldCFException
Get a description given a class name.- Specified by:
getDescription
in interfaceIConnectorManager
- Parameters:
className
- is the class name.- Returns:
- the description, or null if the class is not registered.
- Throws:
ManifoldCFException
-
isInstalled
public boolean isInstalled(java.lang.String className) throws ManifoldCFException
Check if a particular connector is installed or not.- Specified by:
isInstalled
in interfaceIConnectorManager
- Parameters:
className
- is the class name of the connector.- Returns:
- true if installed, false otherwise.
- Throws:
ManifoldCFException
-
getCacheKey
protected java.lang.String getCacheKey()
Get the cache key for the connector manager table.- Returns:
- the cache key
-
-