public class HibernateRoleManagerImpl extends AbstractRoleManager
ROLE
Constructor and Description |
---|
HibernateRoleManagerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkExists(String roleName)
Determines if the
Role exists in the security system. |
RoleSet |
getAllRoles()
Retrieves all roles defined in the system.
|
PersistenceHelper |
getPersistenceHelper() |
Role |
getRoleById(Object id)
Retrieve a Role object with specified id.
|
protected Role |
persistNewRole(Role 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.
|
addRole, checkExists, getRoleByName, getRoleInstance, getRoleInstance
configure, getClassName, setClassName
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
public 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.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.protected Role persistNewRole(Role role) throws DataBackendException
persistNewRole
in class AbstractRoleManager
role
- 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 PersistenceHelper getPersistenceHelper()
public Role getRoleById(Object id) throws DataBackendException, UnknownEntityException
getRoleById
in interface RoleManager
getRoleById
in class AbstractRoleManager
id
- the id 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.