public abstract class TorqueAbstractRoleManager extends AbstractRoleManager implements LazyLoadable
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
lazyLoading |
managerROLE| 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 |
getLazyLoading() |
<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 |
setLazyLoading(Boolean lazyLoading) |
addRole, checkExists, getRoleInstance, getRoleInstancegetClassName, setClassNamedispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceprotected Boolean lazyLoading
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.Configurableconfigure in class AbstractEntityManagerorg.apache.avalon.framework.configuration.ConfigurationExceptionprotected 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 database error occurs 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 database error occurs if any other database error occurspublic void renameRole(Role role, String name) throws DataBackendException, UnknownEntityException
renameRole in interface RoleManagerrole - 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.public void removeRole(Role role) throws DataBackendException, UnknownEntityException
removeRole in interface RoleManagerrole - 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.checkExists in interface RoleManagerroleName - a Role valueDataBackendException - when more than one Role with
the same name exists.public RoleSet getAllRoles() throws DataBackendException
getAllRoles in interface RoleManagerDataBackendException - 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.public Boolean getLazyLoading()
getLazyLoading in interface LazyLoadablepublic void setLazyLoading(Boolean lazyLoading)
setLazyLoading in interface LazyLoadableCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.