public abstract class TorqueAbstractRoleManager extends AbstractRoleManager
ROLE| Constructor and Description |
|---|
TorqueAbstractRoleManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkExists(String roleName)
Determines if the
Role exists in the security system. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon Service lifecycle method
|
protected abstract <T extends Role> |
doSelectAllRoles(Connection con)
Get all specialized Roles
|
protected abstract <T extends Role> |
doSelectById(Integer id,
Connection con)
Get a specialized Role by id
|
protected abstract <T extends Role> |
doSelectByName(String name,
Connection con)
Get a specialized Role by name
|
RoleSet |
getAllRoles()
Retrieves all roles defined in the system.
|
Boolean |
getCustomPeer() |
String |
getPeerClassName() |
<T extends Role> |
getRoleById(Object id)
Retrieve a Role object with specified id.
|
<T extends Role> |
getRoleByName(String name)
Retrieve a Role object with specified name.
|
protected <T extends Role> |
persistNewRole(T role)
Creates a new role with specified attributes.
|
void |
removeRole(Role role)
Removes a Role from the system.
|
void |
renameRole(Role role,
String name)
Renames an existing Role.
|
void |
setCustomPeer(Boolean customPeer) |
void |
setPeerClassName(String peerClassName) |
addRole, checkExists, getRoleInstance, getRoleInstancegetClassName, setClassNamedispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, servicepublic void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractEntityManagerorg.apache.avalon.framework.configuration.ConfigurationExceptionpublic Boolean getCustomPeer()
public void setCustomPeer(Boolean customPeer)
public String getPeerClassName()
public void setPeerClassName(String peerClassName)
protected abstract <T extends Role> List<T> doSelectAllRoles(Connection con) throws org.apache.torque.TorqueException
con - a database connectionorg.apache.torque.TorqueException - if any database error occursprotected abstract <T extends Role> 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 Role> 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 occurspublic void renameRole(Role role, String name) throws DataBackendException, UnknownEntityException
role - The object describing the role to be renamed.name - the new name for the role.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the role does not exist.protected <T extends Role> T persistNewRole(T role) throws DataBackendException
persistNewRole in class AbstractRoleManagerrole - the object describing the role to be created.DataBackendException - if there was an error accessing the data
backend.EntityExistsException - if the role already exists.public void removeRole(Role role) throws DataBackendException, UnknownEntityException
role - The object describing the role to be removed.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the role does not exist.public boolean checkExists(String roleName) throws DataBackendException
Role exists in the security system.roleName - a Role valueDataBackendException - when more than one Role with
the same name exists.public RoleSet getAllRoles() throws DataBackendException
DataBackendException - if there was an error accessing the
data backend.public <T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException
getRoleById in interface RoleManagergetRoleById in class AbstractRoleManagerid - the id of the Role.DataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the role does not exist.public <T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException
getRoleByName in interface RoleManagergetRoleByName in class AbstractRoleManagername - the name of the Role.DataBackendException - if there was an error accessing the
data backend.UnknownEntityException - if the role does not exist.Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.