Class AuthorityConnectionManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.authorities.authority.AuthorityConnectionManager
-
- All Implemented Interfaces:
IAuthorityConnectionManager
public class AuthorityConnectionManager extends BaseTable implements IAuthorityConnectionManager
Implementation of the authority connection manager functionality.
authconnectionsField Type Description authorityname VARCHAR(32) Primary Key description VARCHAR(255) classname VARCHAR(255) maxcount BIGINT configxml LONGTEXT mappingname VARCHAR(32) authdomainname VARCHAR(255) groupname VARCHAR(32)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAuthorityConnectionManager.AuthorityConnectionDescriptionThis is the object description for a repository connection object.protected static classAuthorityConnectionManager.AuthorityConnectionExecutorThis is the executor object for locating repository connection objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static java.lang.StringauthDomainFieldprotected static java.lang.StringauthoritiesLockprotected ICacheManagercacheManagerprotected static java.lang.StringclassNameFieldprotected static java.lang.StringconfigFieldprotected static java.lang.StringdescriptionFieldprotected static intFETCH_MAXprotected static java.lang.StringgroupNameFieldprotected ILockManagerlockManagerprotected static java.lang.StringmappingFieldprotected 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 AuthorityConnectionManager(IThreadContext threadContext, IDBInterface database)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IAuthorityConnectioncreate()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 configurationIAuthorityConnection[]getAllConnections()Obtain a list of the authority connections, ordered by name.protected static java.lang.StringgetAuthorityConnectionKey(java.lang.String connectionName)Construct a key which represents an individual repository connection.protected voidgetAuthorityConnectionsChunk(AuthorityConnection[] rval, java.util.Map returnIndex, java.util.ArrayList params)Read a chunk of authority connections.protected static java.lang.StringgetAuthorityConnectionsKey()Construct a key which represents the general list of repository connectors.protected AuthorityConnection[]getAuthorityConnectionsMultiple(java.lang.String[] connectionNames)Fetch multiple repository connections at a single time.java.lang.StringgetAuthorityNameColumn()Get the authority connection name column.IAuthorityConnection[]getDomainConnections(java.lang.String authDomain)Obtain a list of the authority connections which correspond to an auth domain.voidimportConfiguration(java.io.InputStream is)Import configurationvoidinstall()Install the manager.booleanisGroupReferenced(java.lang.String groupName)Return true if the specified authority group name is referenced.booleanisMappingReferenced(java.lang.String mappingName)Return true if the specified mapping name is referenced.IAuthorityConnectionload(java.lang.String name)Load a repository connection by name.IAuthorityConnection[]loadMultiple(java.lang.String[] names)Load multiple repository connections by name.protected intloadMultipleInternal(IAuthorityConnection[] rval, int outputIndex, java.lang.String[] fetchNames, int inputIndex, int length)protected intmaxClauseGetAuthorityConnectionsChunk()Find the maximum number of clauses for getAuthorityConnectionsChunk.booleansave(IAuthorityConnection object)Save a repository 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.IAuthorityConnectionManager
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
-
authDomainField
protected static final java.lang.String authDomainField
- See Also:
- Constant Field Values
-
groupNameField
protected static final java.lang.String groupNameField
- See Also:
- Constant Field Values
-
cacheManager
protected final ICacheManager cacheManager
-
threadContext
protected final IThreadContext threadContext
-
lockManager
protected final ILockManager lockManager
-
authoritiesLock
protected static final java.lang.String authoritiesLock
- See Also:
- Constant Field Values
-
FETCH_MAX
protected static final int FETCH_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthorityConnectionManager
public AuthorityConnectionManager(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 interfaceIAuthorityConnectionManager- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall the manager.- Specified by:
deinstallin interfaceIAuthorityConnectionManager- Throws:
ManifoldCFException
-
exportConfiguration
public void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFExceptionExport configuration- Specified by:
exportConfigurationin interfaceIAuthorityConnectionManager- Throws:
java.io.IOExceptionManifoldCFException
-
importConfiguration
public void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFExceptionImport configuration- Specified by:
importConfigurationin interfaceIAuthorityConnectionManager- Throws:
java.io.IOExceptionManifoldCFException
-
isGroupReferenced
public boolean isGroupReferenced(java.lang.String groupName) throws ManifoldCFExceptionReturn true if the specified authority group name is referenced.- Specified by:
isGroupReferencedin interfaceIAuthorityConnectionManager- Parameters:
groupName- is the authority group name.- Returns:
- true if referenced, false otherwise.
- Throws:
ManifoldCFException
-
getDomainConnections
public IAuthorityConnection[] getDomainConnections(java.lang.String authDomain) throws ManifoldCFException
Obtain a list of the authority connections which correspond to an auth domain.- Specified by:
getDomainConnectionsin interfaceIAuthorityConnectionManager- Parameters:
authDomain- is the domain to get connections for.- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
getAllConnections
public IAuthorityConnection[] getAllConnections() throws ManifoldCFException
Obtain a list of the authority connections, ordered by name.- Specified by:
getAllConnectionsin interfaceIAuthorityConnectionManager- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
load
public IAuthorityConnection load(java.lang.String name) throws ManifoldCFException
Load a repository connection by name.- Specified by:
loadin interfaceIAuthorityConnectionManager- Parameters:
name- is the name of the repository connection.- Returns:
- the loaded connection object, or null if not found.
- Throws:
ManifoldCFException
-
loadMultiple
public IAuthorityConnection[] loadMultiple(java.lang.String[] names) throws ManifoldCFException
Load multiple repository connections by name.- Specified by:
loadMultiplein interfaceIAuthorityConnectionManager- Parameters:
names- are the names to load.- Returns:
- the loaded connection objects.
- Throws:
ManifoldCFException
-
loadMultipleInternal
protected int loadMultipleInternal(IAuthorityConnection[] rval, int outputIndex, java.lang.String[] fetchNames, int inputIndex, int length) throws ManifoldCFException
- Throws:
ManifoldCFException
-
create
public IAuthorityConnection create() throws ManifoldCFException
Create a new repository connection object.- Specified by:
createin interfaceIAuthorityConnectionManager- Returns:
- the new object.
- Throws:
ManifoldCFException
-
save
public boolean save(IAuthorityConnection object) throws ManifoldCFException
Save a repository connection object.- Specified by:
savein interfaceIAuthorityConnectionManager- 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 interfaceIAuthorityConnectionManager- Parameters:
name- is the name of the connection to delete. If the name does not exist, no error is returned.- Throws:
ManifoldCFException
-
getAuthorityNameColumn
public java.lang.String getAuthorityNameColumn()
Get the authority connection name column.- Specified by:
getAuthorityNameColumnin interfaceIAuthorityConnectionManager- Returns:
- the name column.
-
isMappingReferenced
public boolean isMappingReferenced(java.lang.String mappingName) throws ManifoldCFExceptionReturn true if the specified mapping name is referenced.- Specified by:
isMappingReferencedin interfaceIAuthorityConnectionManager- Parameters:
mappingName- is the mapping name.- Returns:
- true if referenced, false otherwise.
- Throws:
ManifoldCFException
-
getAuthorityConnectionsKey
protected static java.lang.String getAuthorityConnectionsKey()
Construct a key which represents the general list of repository connectors.- Returns:
- the cache key.
-
getAuthorityConnectionKey
protected static java.lang.String getAuthorityConnectionKey(java.lang.String connectionName)
Construct a key which represents an individual repository connection.- Parameters:
connectionName- is the name of the connector.- Returns:
- the cache key.
-
getAuthorityConnectionsMultiple
protected AuthorityConnection[] getAuthorityConnectionsMultiple(java.lang.String[] connectionNames) throws ManifoldCFException
Fetch multiple repository connections at a single time.- Parameters:
connectionNames- are a list of connection names.- Returns:
- the corresponding repository connection objects.
- Throws:
ManifoldCFException
-
maxClauseGetAuthorityConnectionsChunk
protected int maxClauseGetAuthorityConnectionsChunk()
Find the maximum number of clauses for getAuthorityConnectionsChunk.
-
getAuthorityConnectionsChunk
protected void getAuthorityConnectionsChunk(AuthorityConnection[] rval, java.util.Map returnIndex, java.util.ArrayList params) throws ManifoldCFException
Read a chunk of authority 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
-
-