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 class
AuthorityGroupManager.AuthorityGroupDescription
This is the object description for an authority group object.protected static class
AuthorityGroupManager.AuthorityGroupExecutor
This is the executor object for locating authority group objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected static java.lang.String
descriptionField
protected static java.lang.String
nameField
-
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 IAuthorityGroup
create()
Create a new authority group object.void
deinstall()
Uninstall the manager.void
delete(java.lang.String name)
Delete an authority group.void
exportConfiguration(java.io.OutputStream os)
Export configurationIAuthorityGroup[]
getAllGroups()
Obtain a list of the authority grouops, ordered by name.protected static java.lang.String
getAuthorityGroupKey(java.lang.String groupName)
Construct a key which represents an individual authority group.protected void
getAuthorityGroupsChunk(AuthorityGroup[] rval, java.util.Map returnIndex, java.util.ArrayList params)
Read a chunk of authority groups.protected static java.lang.String
getAuthorityGroupsKey()
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.String
getGroupDescriptionColumn()
Get the authority connection description column.java.lang.String
getGroupNameColumn()
Get the authority group name column.void
importConfiguration(java.io.InputStream is)
Import configurationvoid
install()
Install the manager.IAuthorityGroup
load(java.lang.String name)
Load an authority group by name.IAuthorityGroup[]
loadMultiple(java.lang.String[] names)
Load multiple authority groups by name.protected int
maxClauseGetAuthorityGroupsChunk()
Find the maximum number of clauses for getAuthorityConnectionsChunk.boolean
save(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 ManifoldCFException
Install the manager.- Specified by:
install
in interfaceIAuthorityGroupManager
- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFException
Uninstall the manager.- Specified by:
deinstall
in interfaceIAuthorityGroupManager
- Throws:
ManifoldCFException
-
exportConfiguration
public void exportConfiguration(java.io.OutputStream os) throws java.io.IOException, ManifoldCFException
Export configuration- Specified by:
exportConfiguration
in interfaceIAuthorityGroupManager
- Throws:
java.io.IOException
ManifoldCFException
-
importConfiguration
public void importConfiguration(java.io.InputStream is) throws java.io.IOException, ManifoldCFException
Import configuration- Specified by:
importConfiguration
in interfaceIAuthorityGroupManager
- Throws:
java.io.IOException
ManifoldCFException
-
getAllGroups
public IAuthorityGroup[] getAllGroups() throws ManifoldCFException
Obtain a list of the authority grouops, ordered by name.- Specified by:
getAllGroups
in 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:
load
in 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:
loadMultiple
in 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:
create
in interfaceIAuthorityGroupManager
- Returns:
- the new object.
- Throws:
ManifoldCFException
-
save
public boolean save(IAuthorityGroup object) throws ManifoldCFException
Save an authority group object.- Specified by:
save
in 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 ManifoldCFException
Delete an authority group.- Specified by:
delete
in 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:
getGroupNameColumn
in interfaceIAuthorityGroupManager
- Returns:
- the name column.
-
getGroupDescriptionColumn
public java.lang.String getGroupDescriptionColumn()
Get the authority connection description column.- Specified by:
getGroupDescriptionColumn
in 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
-
-