Class MappingConnectionManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.authorities.mapping.MappingConnectionManager
-
- All Implemented Interfaces:
IMappingConnectionManager
public class MappingConnectionManager extends BaseTable implements IMappingConnectionManager
Implementation of the authority connection manager functionality.
mapconnectionsField Type Description mappingname VARCHAR(32) Primary Key description VARCHAR(255) classname VARCHAR(255) maxcount BIGINT configxml LONGTEXT
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMappingConnectionManager.MappingConnectionDescriptionThis is the object description for a mapping connection object.protected static classMappingConnectionManager.MappingConnectionExecutorThis is the executor object for locating mapping connection objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected ICacheManagercacheManagerprotected static java.lang.StringclassNameFieldprotected static java.lang.StringconfigFieldprotected static java.lang.StringdescriptionFieldprotected static intFETCH_MAXprotected ILockManagerlockManagerprotected static java.lang.StringmappingFieldprotected static java.lang.StringmappingsLockprotected static java.lang.StringmaxCountFieldprotected static java.lang.StringnameFieldprotected IThreadContextthreadContext-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description MappingConnectionManager(IThreadContext threadContext, IDBInterface database)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IMappingConnectioncreate()Create a new repository connection object.voiddeinstall()Uninstall the manager.voiddelete(java.lang.String name)Delete an authority connection.voidexportConfiguration(java.io.OutputStream os)Export configurationIMappingConnection[]getAllConnections()Obtain a list of the repository connections, ordered by name.IMappingConnection[]getAllNonLoopingConnections(java.lang.String startingConnectionName)Obtain a list of the mapping connections, ordered by name, excluding those that would form a prerequisite loop if chosen.protected static java.lang.StringgetMappingConnectionKey(java.lang.String connectionName)Construct a key which represents an individual mapping connection.protected voidgetMappingConnectionsChunk(MappingConnection[] rval, java.util.Map returnIndex, java.util.ArrayList params)Read a chunk of mapping connections.protected static java.lang.StringgetMappingConnectionsKey()Construct a key which represents the general list of mapping connectors.protected MappingConnection[]getMappingConnectionsMultiple(java.lang.String[] connectionNames)Fetch multiple mapping connections at a single time.java.lang.StringgetMappingNameColumn()Get the mapping connection name column.voidimportConfiguration(java.io.InputStream is)Import configurationvoidinstall()Install the manager.protected booleanisReferenced(java.lang.String mappingName)Return true if the specified mapping name is referenced.IMappingConnectionload(java.lang.String name)Load a mapping connection by name.IMappingConnection[]loadMultiple(java.lang.String[] names)Load multiple mapping connections by name.protected intloadMultipleInternal(IMappingConnection[] rval, int outputIndex, java.lang.String[] fetchNames, int inputIndex, int length)protected intmaxClauseGetMappingConnectionsChunk()Find the maximum number of clauses for getMappingConnectionsChunk.booleansave(IMappingConnection object)Save a mapping connection object.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.manifoldcf.authorities.interfaces.IMappingConnectionManager
getTableName
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
nameField
protected static final java.lang.String nameField
- 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
-
maxCountField
protected static final java.lang.String maxCountField
- See Also:
- Constant Field Values
-
configField
protected static final java.lang.String configField
- See Also:
- Constant Field Values
-
mappingField
protected static final java.lang.String mappingField
- See Also:
- Constant Field Values
-
cacheManager
protected final ICacheManager cacheManager
-
threadContext
protected final IThreadContext threadContext
-
lockManager
protected final ILockManager lockManager
-
mappingsLock
protected static final java.lang.String mappingsLock
- See Also:
- Constant Field Values
-
FETCH_MAX
protected static final int FETCH_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MappingConnectionManager
public MappingConnectionManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
threadContext- is the thread context.- Throws:
ManifoldCFException
-
-
Method Detail
-
install
public void install() throws ManifoldCFExceptionInstall the manager.- Specified by:
installin interfaceIMappingConnectionManager- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall the manager.- Specified by:
deinstallin interfaceIMappingConnectionManager- Throws:
ManifoldCFException
-
exportConfiguration
public void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFExceptionExport configuration- Specified by:
exportConfigurationin interfaceIMappingConnectionManager- Throws:
java.io.IOExceptionManifoldCFException
-
importConfiguration
public void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFExceptionImport configuration- Specified by:
importConfigurationin interfaceIMappingConnectionManager- Throws:
java.io.IOExceptionManifoldCFException
-
getAllNonLoopingConnections
public IMappingConnection[] getAllNonLoopingConnections(java.lang.String startingConnectionName) throws ManifoldCFException
Obtain a list of the mapping connections, ordered by name, excluding those that would form a prerequisite loop if chosen.- Specified by:
getAllNonLoopingConnectionsin interfaceIMappingConnectionManager- Parameters:
startingConnectionName- is the name of the connection we would be starting with. Pass null for all connections.- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
getAllConnections
public IMappingConnection[] getAllConnections() throws ManifoldCFException
Obtain a list of the repository connections, ordered by name.- Specified by:
getAllConnectionsin interfaceIMappingConnectionManager- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
load
public IMappingConnection load(java.lang.String name) throws ManifoldCFException
Load a mapping connection by name.- Specified by:
loadin interfaceIMappingConnectionManager- Parameters:
name- is the name of the mapping connection.- Returns:
- the loaded connection object, or null if not found.
- Throws:
ManifoldCFException
-
loadMultiple
public IMappingConnection[] loadMultiple(java.lang.String[] names) throws ManifoldCFException
Load multiple mapping connections by name.- Specified by:
loadMultiplein interfaceIMappingConnectionManager- Parameters:
names- are the names to load.- Returns:
- the loaded connection objects.
- Throws:
ManifoldCFException
-
loadMultipleInternal
protected int loadMultipleInternal(IMappingConnection[] rval, int outputIndex, java.lang.String[] fetchNames, int inputIndex, int length) throws ManifoldCFException
- Throws:
ManifoldCFException
-
create
public IMappingConnection create() throws ManifoldCFException
Create a new repository connection object.- Specified by:
createin interfaceIMappingConnectionManager- Returns:
- the new object.
- Throws:
ManifoldCFException
-
save
public boolean save(IMappingConnection object) throws ManifoldCFException
Save a mapping connection object.- Specified by:
savein interfaceIMappingConnectionManager- Parameters:
object- is the object to save.- Returns:
- true if the object is created, false otherwise.
- Throws:
ManifoldCFException
-
delete
public void delete(java.lang.String name) throws ManifoldCFExceptionDelete an authority connection.- Specified by:
deletein interfaceIMappingConnectionManager- Parameters:
name- is the name of the connection to delete. If the name does not exist, no error is returned.- Throws:
ManifoldCFException
-
getMappingNameColumn
public java.lang.String getMappingNameColumn()
Get the mapping connection name column.- Specified by:
getMappingNameColumnin interfaceIMappingConnectionManager- Returns:
- the name column.
-
isReferenced
protected boolean isReferenced(java.lang.String mappingName) throws ManifoldCFExceptionReturn true if the specified mapping name is referenced.- Parameters:
mappingName- is the mapping name.- Returns:
- true if referenced, false otherwise.
- Throws:
ManifoldCFException
-
getMappingConnectionsKey
protected static java.lang.String getMappingConnectionsKey()
Construct a key which represents the general list of mapping connectors.- Returns:
- the cache key.
-
getMappingConnectionKey
protected static java.lang.String getMappingConnectionKey(java.lang.String connectionName)
Construct a key which represents an individual mapping connection.- Parameters:
connectionName- is the name of the connector.- Returns:
- the cache key.
-
getMappingConnectionsMultiple
protected MappingConnection[] getMappingConnectionsMultiple(java.lang.String[] connectionNames) throws ManifoldCFException
Fetch multiple mapping connections at a single time.- Parameters:
connectionNames- are a list of connection names.- Returns:
- the corresponding mapping connection objects.
- Throws:
ManifoldCFException
-
maxClauseGetMappingConnectionsChunk
protected int maxClauseGetMappingConnectionsChunk()
Find the maximum number of clauses for getMappingConnectionsChunk.
-
getMappingConnectionsChunk
protected void getMappingConnectionsChunk(MappingConnection[] rval, java.util.Map returnIndex, java.util.ArrayList params) throws ManifoldCFException
Read a chunk of mapping connections.- Parameters:
rval- is the place to put the read policies.returnIndex- is a map from the object id (resource id) and the rval index.params- is the set of parameters.- Throws:
ManifoldCFException
-
-