public class MemoryRoleManagerImpl extends AbstractRoleManager
manager
ROLE
Constructor and Description |
---|
MemoryRoleManagerImpl() |
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.
|
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.
|
addRole, checkExists, getRoleById, 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)
Role
exists in the security system.permission
- a String
valueDataBackendException
- when more than one Role with the same name exists.Exception
- A generic exception.public RoleSet getAllRoles() throws DataBackendException
DataBackendException
- if there was an error accessing the data backend.protected <T extends Role> T persistNewRole(T 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.Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.