Class AbstractTurbineModelManager
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.fulcrum.security.spi.AbstractManager
-
- org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
-
- All Implemented Interfaces:
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
,TurbineModelManager
,ModelManager
- Direct Known Subclasses:
MemoryTurbineModelManagerImpl
,TorqueTurbineModelManagerImpl
public abstract class AbstractTurbineModelManager extends AbstractManager implements TurbineModelManager, org.apache.avalon.framework.configuration.Configurable
Holds shared functionality between different implementations of TurbineModelManager's.- Version:
- $Id: AbstractDynamicModelManager.java,v 1.2 2004/07/07 18:18:09 epugh Exp $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
TurbineModelManager.Privilege
-
-
Field Summary
-
Fields inherited from class org.apache.fulcrum.security.spi.AbstractManager
manager
-
Fields inherited from interface org.apache.fulcrum.security.ModelManager
ROLE
-
Fields inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
GLOBAL_GROUP_ATTR_NAME, GLOBAL_GROUP_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractTurbineModelManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon component lifecycle methodGroup
getGlobalGroup()
Provides a reference to the Group object that represents the global group .String
getGlobalGroupName()
void
revokeAll(Group group)
Revokes all roles and users from a Group.void
revokeAll(Role role)
Revokes all permissions from a Role.void
revokeAll(Role role, boolean cascadeDelete)
Revokes by default all permissions from a Role and if flag is set all groups and users for this role This method is used when deleting a Role.void
revokeAll(User user)
Revokes all roles and groups from a User.-
Methods inherited from class org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
AbstractTurbineModelManager
public AbstractTurbineModelManager()
-
-
Method Detail
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon component lifecycle method- Specified by:
configure
in interfaceorg.apache.avalon.framework.configuration.Configurable
-
getGlobalGroup
public Group getGlobalGroup() throws DataBackendException
Provides a reference to the Group object that represents the global group .- Specified by:
getGlobalGroup
in interfaceTurbineModelManager
- Returns:
- A Group object that represents the global group.
- Throws:
DataBackendException
- generic exception
-
revokeAll
public void revokeAll(Role role) throws DataBackendException, UnknownEntityException
Revokes all permissions from a Role. This method is used when deleting a Role.- Specified by:
revokeAll
in interfaceTurbineModelManager
- Parameters:
role
- the Role- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Role is not present.
-
revokeAll
public void revokeAll(Role role, boolean cascadeDelete) throws DataBackendException, UnknownEntityException
Revokes by default all permissions from a Role and if flag is set all groups and users for this role This method is used when deleting a Role.- Specified by:
revokeAll
in interfaceTurbineModelManager
- Parameters:
role
- the RolecascadeDelete
- iftrue
removes all groups and user for this role.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Role is not present.
-
revokeAll
public void revokeAll(User user) throws DataBackendException, UnknownEntityException
Revokes all roles and groups from a User. This method is used when deleting a User.- Specified by:
revokeAll
in interfaceTurbineModelManager
- Parameters:
user
- the User- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Role is not present.
-
revokeAll
public void revokeAll(Group group) throws DataBackendException, UnknownEntityException
Revokes all roles and users from a Group. This method is used when deleting a User.- Specified by:
revokeAll
in interfaceTurbineModelManager
- Parameters:
group
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-
getGlobalGroupName
public String getGlobalGroupName()
- Specified by:
getGlobalGroupName
in interfaceTurbineModelManager
- Returns:
- the configured global group name, by default
TurbineModelManager.GLOBAL_GROUP_ATTR_NAME
-
-