public interface RoleManager
Group
objects related tasks on behalf of the
BaseSecurityService
.
The responsibilities of this class include loading data of an group from the
storage and putting them into the
Group
objects, saving those data
to the permanent storage.Modifier and Type | Field and Description |
---|---|
static String |
ROLE
Avalon role - used to id the component within the manager
|
Modifier and Type | Method and Description |
---|---|
<T extends Role> |
addRole(T role)
Creates a new role with specified attributes.
|
boolean |
checkExists(Role role)
Determines if the
Role exists in the security system. |
boolean |
checkExists(String roleName)
Determines if a
Role exists in the security system with the
specified role name. |
RoleSet |
getAllRoles()
Retrieves all roles defined in the system.
|
<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.
|
<T extends Role> |
getRoleInstance()
Construct a blank Role object.
|
<T extends Role> |
getRoleInstance(String roleName)
Construct a blank Role object.
|
void |
removeRole(Role role)
Removes a Role from the system.
|
void |
renameRole(Role role,
String name)
Renames an existing Role.
|
static final String ROLE
<T extends Role> T getRoleInstance() throws DataBackendException
DataBackendException
- if the object could not be instantiated.<T extends Role> T getRoleInstance(String roleName) throws DataBackendException
roleName
- The name of the RoleDataBackendException
- if the object could not be instantiated.<T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException
name
- the name of the Role.DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the role does not exist.<T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException
name
- the name of the Role.UnknownEntityException
- if the permission does not exist in the database.DataBackendException
- if there is a problem accessing the storage.RoleSet getAllRoles() throws DataBackendException
DataBackendException
- if there was an error accessing the data backend.<T extends Role> T addRole(T role) throws DataBackendException, EntityExistsException
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.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.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.boolean checkExists(Role role) throws DataBackendException
Role
exists in the security system.role
- a Role
valueDataBackendException
- when more than one Role with the same name exists.Exception
- A generic exception.boolean checkExists(String roleName) throws DataBackendException
Role
exists in the security system with the
specified role name.roleName
- the name of a Role
to check.DataBackendException
- when more than one Role with the same name exists.Exception
- A generic exception.Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.