public abstract class AbstractRoleManager extends AbstractEntityManager implements RoleManager
ROLE
Constructor and Description |
---|
AbstractRoleManager() |
Modifier and Type | Method and Description |
---|---|
<T extends Role> |
addRole(T role)
Creates a new role with specified attributes.
|
boolean |
checkExists(Role role)
Check whether a specified role exists.
|
<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.
|
protected abstract <T extends Role> |
persistNewRole(T role) |
configure, getClassName, setClassName
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkExists, getAllRoles, removeRole, renameRole
protected abstract <T extends Role> T persistNewRole(T role) throws DataBackendException
DataBackendException
public <T extends Role> T getRoleInstance() throws DataBackendException
getRoleInstance
in interface RoleManager
DataBackendException
- if the object could not be instantiated.public <T extends Role> T getRoleInstance(String roleName) throws DataBackendException
getRoleInstance
in interface RoleManager
roleName
- The name of the role.DataBackendException
- if the object could not be instantiated.public <T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException
getRoleByName
in interface RoleManager
name
- the name 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 getRoleById(Object id) throws DataBackendException, UnknownEntityException
getRoleById
in interface RoleManager
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.public <T extends Role> T addRole(T role) throws DataBackendException, EntityExistsException
addRole
in interface RoleManager
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 boolean checkExists(Role role) throws DataBackendException
checkExists
in interface RoleManager
role
- The role to be checked.DataBackendException
- if there was an error accessing the data backend.Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.