Package org.apache.fulcrum.security.spi
Klasse AbstractRoleManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.spi.AbstractEntityManager
org.apache.fulcrum.security.spi.AbstractRoleManager
- Alle implementierten Schnittstellen:
Serializable,org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.configuration.Configurable,org.apache.avalon.framework.logger.LogEnabled,org.apache.avalon.framework.service.Serviceable,org.apache.avalon.framework.thread.ThreadSafe,RoleManager
This implementation keeps all objects in memory. This is mostly meant to help
with testing and prototyping of ideas.
- Version:
- $Id$
- Autor:
- Eric Pugh
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder org.apache.fulcrum.security.spi.AbstractManager
managerVon Schnittstelle geerbte Felder org.apache.fulcrum.security.RoleManager
ROLE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<T extends Role>
TaddRole(T role) Creates a new role with specified attributes.booleancheckExists(Role role) Check whether a specified role exists.<T extends Role>
TgetRoleById(Object id) Retrieve a Role object with specified Id.<T extends Role>
TgetRoleByName(String name) Retrieve a Role object with specified name.<T extends Role>
TConstruct a blank Role object.<T extends Role>
TgetRoleInstance(String roleName) Construct a blank Role object.protected abstract <T extends Role>
TpersistNewRole(T role) Von Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractEntityManager
configure, getClassName, setClassNameVon Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceVon Klasse geerbte Methoden org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.apache.fulcrum.security.RoleManager
checkExists, getAllRoles, removeRole, renameRole
-
Konstruktordetails
-
AbstractRoleManager
public AbstractRoleManager()
-
-
Methodendetails
-
persistNewRole
- Typparameter:
T- role type- Parameter:
role- to persist- Gibt zurück:
- the Role object
- Löst aus:
DataBackendException- if fail to connect to datasource
-
getRoleInstance
Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.- Angegeben von:
getRoleInstancein SchnittstelleRoleManager- Typparameter:
T- role type- Gibt zurück:
- an object implementing Role interface.
- Löst aus:
DataBackendException- if the object could not be instantiated.
-
getRoleInstance
Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.- Angegeben von:
getRoleInstancein SchnittstelleRoleManager- Typparameter:
T- type of role- Parameter:
roleName- The name of the role.- Gibt zurück:
- an object implementing Role interface.
- Löst aus:
DataBackendException- if the object could not be instantiated.
-
getRoleByName
public <T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException Retrieve a Role object with specified name.- Angegeben von:
getRoleByNamein SchnittstelleRoleManager- Typparameter:
T- type of role- Parameter:
name- the name of the Role.- Gibt zurück:
- an object representing the Role with specified name.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the role does not exist.- Siehe auch:
-
getRoleById
public <T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException Retrieve a Role object with specified Id.- Angegeben von:
getRoleByIdin SchnittstelleRoleManager- Typparameter:
T- the role type- Parameter:
id- the ID of the Role.- Gibt zurück:
- an object representing the Role with specified name.
- Löst aus:
UnknownEntityException- if the permission does not exist in the database.DataBackendException- if there is a problem accessing the storage.
-
addRole
Creates a new role with specified attributes.- Angegeben von:
addRolein SchnittstelleRoleManager- Typparameter:
T- role type- Parameter:
role- the object describing the role to be created.- Gibt zurück:
- a new Role object that has id set up properly.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.EntityExistsException- if the role already exists.
-
checkExists
Check whether a specified role exists. The name is used for looking up the role- Angegeben von:
checkExistsin SchnittstelleRoleManager- Parameter:
role- The role to be checked.- Gibt zurück:
- true if the specified role exists
- Löst aus:
DataBackendException- if there was an error accessing the data backend.
-