org.apache.manifoldcf.agents.outputconnmgr
Class OutputConnectorManager

java.lang.Object
  extended by org.apache.manifoldcf.core.database.BaseTable
      extended by org.apache.manifoldcf.agents.outputconnmgr.OutputConnectorManager
All Implemented Interfaces:
IOutputConnectorManager

public class OutputConnectorManager
extends BaseTable
implements IOutputConnectorManager

Implementation of IOutputConnectorManager.


Field Summary
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
OutputConnectorManager(IThreadContext threadContext, IDBInterface database)
          Constructor.
 
Method Summary
 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, constructDistinctOnClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getTableIndexes, getTableName, getTableSchema, getTransactionID, makeTableKey, noteModifications, performAddIndex, performAlter, performCreate, performDelete, performDrop, performInsert, performLock, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

OutputConnectorManager

public OutputConnectorManager(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 interface IOutputConnectorManager
Throws:
ManifoldCFException

deinstall

public void deinstall()
               throws ManifoldCFException
Uninstall. This also unregisters all connectors.

Specified by:
deinstall in interface IOutputConnectorManager
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 interface IOutputConnectorManager
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 interface IOutputConnectorManager
Parameters:
className - is the class name 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 interface IOutputConnectorManager
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 interface IOutputConnectorManager
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 interface IOutputConnectorManager
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 interface IOutputConnectorManager
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