public abstract class TorqueAbstractGroupManager extends AbstractGroupManager
ROLE
Constructor and Description |
---|
TorqueAbstractGroupManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkExists(String groupName)
Determines if the
Group exists in the security system. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon Service lifecycle method
|
protected abstract <T extends Group> |
doSelectAllGroups(Connection con)
Get all specialized Groups
|
protected abstract <T extends Group> |
doSelectById(Integer id,
Connection con)
Get a specialized Group by id
|
protected abstract <T extends Group> |
doSelectByName(String name,
Connection con)
Get a specialized Group by name
|
GroupSet |
getAllGroups()
Retrieves all groups defined in the system.
|
Boolean |
getCustomPeer() |
<T extends Group> |
getGroupById(Object id)
Retrieve a Group object with specified id.
|
<T extends Group> |
getGroupByName(String name)
Retrieve a Group object with specified name.
|
String |
getPeerClassName() |
protected <T extends Group> |
persistNewGroup(T group)
Creates a new group with specified attributes.
|
void |
removeGroup(Group group)
Removes a Group from the system.
|
void |
renameGroup(Group group,
String name)
Renames an existing Group.
|
void |
setCustomPeer(Boolean customPeer) |
void |
setPeerClassName(String peerClassName) |
addGroup, checkExists, getGroupInstance, getGroupInstance
getClassName, setClassName
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configure
in class AbstractEntityManager
org.apache.avalon.framework.configuration.ConfigurationException
public Boolean getCustomPeer()
public void setCustomPeer(Boolean customPeer)
public String getPeerClassName()
public void setPeerClassName(String peerClassName)
protected abstract <T extends Group> List<T> doSelectAllGroups(Connection con) throws org.apache.torque.TorqueException
con
- a database connectionorg.apache.torque.TorqueException
- if any database error occursprotected abstract <T extends Group> T doSelectByName(String name, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
name
- the name of the groupcon
- a database connectionorg.apache.torque.NoRowsException
- if no such group existsorg.apache.torque.TooManyRowsException
- if multiple groups with the given name existorg.apache.torque.TorqueException
- if any other database error occursprotected abstract <T extends Group> T doSelectById(Integer id, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
id
- the id of the groupcon
- a database connectionorg.apache.torque.NoRowsException
- if no such group existsorg.apache.torque.TooManyRowsException
- if multiple groups with the given id existorg.apache.torque.TorqueException
- if any other database error occursprotected <T extends Group> T persistNewGroup(T group) throws DataBackendException
persistNewGroup
in class AbstractGroupManager
group
- the object describing the group to be created.DataBackendException
- if there was an error accessing the data
backend.EntityExistsException
- if the group already exists.public void renameGroup(Group group, String name) throws DataBackendException, UnknownEntityException
group
- The object describing the group to be renamed.name
- the new name for the group.DataBackendException
- if there was an error accessing the data
backend.UnknownEntityException
- if the group does not exist.public void removeGroup(Group group) throws DataBackendException, UnknownEntityException
group
- The object describing the group to be removed.DataBackendException
- if there was an error accessing the data
backend.UnknownEntityException
- if the group does not exist.public <T extends Group> T getGroupByName(String name) throws DataBackendException, UnknownEntityException
getGroupByName
in interface GroupManager
getGroupByName
in class AbstractGroupManager
name
- the name of the Group.DataBackendException
- if there was an error accessing the
data backend.UnknownEntityException
- if the group does not exist.public GroupSet getAllGroups() throws DataBackendException
DataBackendException
- if there was an error accessing the
data backend.public boolean checkExists(String groupName) throws DataBackendException
Group
exists in the security system.groupName
- a Group
valueDataBackendException
- when more than one Group with
the same name exists.public <T extends Group> T getGroupById(Object id) throws DataBackendException, UnknownEntityException
getGroupById
in interface GroupManager
getGroupById
in class AbstractGroupManager
id
- the id of the Group.DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the group does not exist.Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.