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
manager
Von 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.boolean
checkExists
(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, setClassName
Von Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
Von Klasse geerbte Methoden org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von 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:
getRoleInstance
in 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:
getRoleInstance
in 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:
getRoleByName
in 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:
getRoleById
in 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:
addRole
in 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:
checkExists
in 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.
-