Class AuthorityGroupManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.authorities.authgroups.AuthorityGroupManager
-
- All Implemented Interfaces:
IAuthorityGroupManager
public class AuthorityGroupManager extends BaseTable implements IAuthorityGroupManager
Implementation of the authority group manager functionality.
authgroupsField Type Description groupname VARCHAR(32) Primary Key description VARCHAR(255)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAuthorityGroupManager.AuthorityGroupDescriptionThis is the object description for an authority group object.protected static classAuthorityGroupManager.AuthorityGroupExecutorThis is the executor object for locating authority group objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static java.lang.StringdescriptionFieldprotected static java.lang.StringnameField-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description AuthorityGroupManager(IThreadContext threadContext, IDBInterface database)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IAuthorityGroupcreate()Create a new authority group object.voiddeinstall()Uninstall the manager.voiddelete(java.lang.String name)Delete an authority group.voidexportConfiguration(java.io.OutputStream os)Export configurationIAuthorityGroup[]getAllGroups()Obtain a list of the authority grouops, ordered by name.protected static java.lang.StringgetAuthorityGroupKey(java.lang.String groupName)Construct a key which represents an individual authority group.protected voidgetAuthorityGroupsChunk(AuthorityGroup[] rval, java.util.Map returnIndex, java.util.ArrayList params)Read a chunk of authority groups.protected static java.lang.StringgetAuthorityGroupsKey()Construct a key which represents the general list of repository connectors.protected AuthorityGroup[]getAuthorityGroupsMultiple(java.lang.String[] groupNames)Fetch multiple authority groups at a single time.java.lang.StringgetGroupDescriptionColumn()Get the authority connection description column.java.lang.StringgetGroupNameColumn()Get the authority group name column.voidimportConfiguration(java.io.InputStream is)Import configurationvoidinstall()Install the manager.IAuthorityGroupload(java.lang.String name)Load an authority group by name.IAuthorityGroup[]loadMultiple(java.lang.String[] names)Load multiple authority groups by name.protected intmaxClauseGetAuthorityGroupsChunk()Find the maximum number of clauses for getAuthorityConnectionsChunk.booleansave(IAuthorityGroup object)Save an authority group 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.IAuthorityGroupManager
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
-
-
Constructor Detail
-
AuthorityGroupManager
public AuthorityGroupManager(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 interfaceIAuthorityGroupManager- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall the manager.- Specified by:
deinstallin interfaceIAuthorityGroupManager- Throws:
ManifoldCFException
-
exportConfiguration
public void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFExceptionExport configuration- Specified by:
exportConfigurationin interfaceIAuthorityGroupManager- Throws:
java.io.IOExceptionManifoldCFException
-
importConfiguration
public void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFExceptionImport configuration- Specified by:
importConfigurationin interfaceIAuthorityGroupManager- Throws:
java.io.IOExceptionManifoldCFException
-
getAllGroups
public IAuthorityGroup[] getAllGroups() throws ManifoldCFException
Obtain a list of the authority grouops, ordered by name.- Specified by:
getAllGroupsin interfaceIAuthorityGroupManager- Returns:
- an array of connection objects.
- Throws:
ManifoldCFException
-
load
public IAuthorityGroup load(java.lang.String name) throws ManifoldCFException
Load an authority group by name.- Specified by:
loadin interfaceIAuthorityGroupManager- Parameters:
name- is the name of the authority group.- Returns:
- the loaded group object, or null if not found.
- Throws:
ManifoldCFException
-
loadMultiple
public IAuthorityGroup[] loadMultiple(java.lang.String[] names) throws ManifoldCFException
Load multiple authority groups by name.- Specified by:
loadMultiplein interfaceIAuthorityGroupManager- Parameters:
names- are the names to load.- Returns:
- the loaded group objects.
- Throws:
ManifoldCFException
-
create
public IAuthorityGroup create() throws ManifoldCFException
Create a new authority group object.- Specified by:
createin interfaceIAuthorityGroupManager- Returns:
- the new object.
- Throws:
ManifoldCFException
-
save
public boolean save(IAuthorityGroup object) throws ManifoldCFException
Save an authority group object.- Specified by:
savein interfaceIAuthorityGroupManager- 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 group.- Specified by:
deletein interfaceIAuthorityGroupManager- Parameters:
name- is the name of the group to delete. If the name does not exist, no error is returned.- Throws:
ManifoldCFException
-
getGroupNameColumn
public java.lang.String getGroupNameColumn()
Get the authority group name column.- Specified by:
getGroupNameColumnin interfaceIAuthorityGroupManager- Returns:
- the name column.
-
getGroupDescriptionColumn
public java.lang.String getGroupDescriptionColumn()
Get the authority connection description column.- Specified by:
getGroupDescriptionColumnin interfaceIAuthorityGroupManager- Returns:
- the description column.
-
getAuthorityGroupsKey
protected static java.lang.String getAuthorityGroupsKey()
Construct a key which represents the general list of repository connectors.- Returns:
- the cache key.
-
getAuthorityGroupKey
protected static java.lang.String getAuthorityGroupKey(java.lang.String groupName)
Construct a key which represents an individual authority group.- Parameters:
groupName- is the name of the group.- Returns:
- the cache key.
-
getAuthorityGroupsMultiple
protected AuthorityGroup[] getAuthorityGroupsMultiple(java.lang.String[] groupNames) throws ManifoldCFException
Fetch multiple authority groups at a single time.- Parameters:
groupNames- are a list of group names.- Returns:
- the corresponding authority group objects.
- Throws:
ManifoldCFException
-
maxClauseGetAuthorityGroupsChunk
protected int maxClauseGetAuthorityGroupsChunk()
Find the maximum number of clauses for getAuthorityConnectionsChunk.
-
getAuthorityGroupsChunk
protected void getAuthorityGroupsChunk(AuthorityGroup[] rval, java.util.Map returnIndex, java.util.ArrayList params) throws ManifoldCFException
Read a chunk of authority groups.- 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
-
-