Package org.apache.fulcrum.security
Interface RoleManager
- 
- All Superinterfaces:
- Serializable
 - All Known Implementing Classes:
- AbstractRoleManager,- MemoryRoleManagerImpl,- PeerRoleManager,- TorqueAbstractRoleManager,- TorqueDynamicRoleManagerImpl,- TorqueTurbineRoleManagerImpl
 
 public interface RoleManager extends Serializable A RoleManager performsRoleobjects related tasks on behalf of theBaseSecurityService. The responsibilities of this class include loading data of a role from the storage and putting them into theRoleobjects, saving those data to the permanent storage.- Version:
- $Id$
- Author:
- Eric Pugh
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Role>
 TaddRole(T role)Creates a new role with specified attributes.booleancheckExists(String roleName)Determines if aRoleexists in the security system with the specified role name.booleancheckExists(Role role)Determines if theRoleexists in the security system.RoleSetgetAllRoles()Retrieves all roles defined in the system.<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>
 TgetRoleInstance()Construct a blank Role object This method calls getRoleClass, and then creates a new object using the default constructor.<T extends Role>
 TgetRoleInstance(String roleName)Construct a blank Role object.voidremoveRole(Role role)Removes a Role from the system.voidrenameRole(Role role, String name)Renames an existing Role.
 
- 
- 
- 
Method Detail- 
getRoleInstance<T extends Role> T getRoleInstance() throws DataBackendException Construct a blank Role object This method calls getRoleClass, and then creates a new object using the default constructor.- Type Parameters:
- T- role type
- Returns:
- an object implementing Role interface.
- Throws:
- DataBackendException- if the object could not be instantiated
 
 - 
getRoleInstance<T extends Role> T getRoleInstance(String roleName) throws DataBackendException Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.- Type Parameters:
- T- Role
- Parameters:
- roleName- The name of the Role
- Returns:
- an object implementing Role interface.
- Throws:
- DataBackendException- if the object could not be instantiated.
 
 - 
getRoleByName<T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException Retrieve a Role object with specified name.- Type Parameters:
- T- Role
- Parameters:
- name- the name of the Role.
- Returns:
- an object representing the Role with specified name.
- Throws:
- DataBackendException- if there was an error accessing the data backend.
- UnknownEntityException- if the role does not exist.
 
 - 
getRoleById<T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException Retrieve a Role object with specified Id.- Type Parameters:
- T- Role
- Parameters:
- id- the Id of the Role.
- Returns:
- an object representing the Role with specified name.
- Throws:
- UnknownEntityException- if the permission does not exist in the database.
- DataBackendException- if there is a problem accessing the storage.
 
 - 
getAllRolesRoleSet getAllRoles() throws DataBackendException Retrieves all roles defined in the system.- Returns:
- the names of all roles defined in the system.
- Throws:
- DataBackendException- if there was an error accessing the data backend.
 
 - 
addRole<T extends Role> T addRole(T role) throws DataBackendException, EntityExistsException Creates a new role with specified attributes.- Type Parameters:
- T- Role
- Parameters:
- role- The object describing the role to be created.
- Returns:
- the new Role object.
- Throws:
- DataBackendException- if there was an error accessing the data backend.
- EntityExistsException- if the role already exists.
 
 - 
removeRolevoid removeRole(Role role) throws DataBackendException, UnknownEntityException Removes a Role from the system.- Parameters:
- role- The object describing the role to be removed.
- Throws:
- DataBackendException- if there was an error accessing the data backend.
- UnknownEntityException- if the role does not exist.
 
 - 
renameRolevoid renameRole(Role role, String name) throws DataBackendException, UnknownEntityException Renames an existing Role.- Parameters:
- role- The object describing the role to be renamed.
- name- the new name for the role.
- Throws:
- DataBackendException- if there was an error accessing the data backend.
- UnknownEntityException- if the role does not exist.
 
 - 
checkExistsboolean checkExists(Role role) throws DataBackendException Determines if theRoleexists in the security system.- Parameters:
- role- a- Rolevalue
- Returns:
- true if the role exists in the system, false otherwise
- Throws:
- DataBackendException- when more than one Role with the same name exists.
 
 - 
checkExistsboolean checkExists(String roleName) throws DataBackendException Determines if aRoleexists in the security system with the specified role name.- Parameters:
- roleName- the name of a- Roleto check.
- Returns:
- true if the role exists in the system, false otherwise
- Throws:
- DataBackendException- when more than one Role with the same name exists.
 
 
- 
 
-