Class AbstractDynamicModelManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.model.dynamic.AbstractDynamicModelManager
- All Implemented Interfaces:
Serializable
,org.apache.avalon.framework.activity.Disposable
,org.apache.avalon.framework.logger.LogEnabled
,org.apache.avalon.framework.service.Serviceable
,org.apache.avalon.framework.thread.ThreadSafe
,DynamicModelManager
,ModelManager
public abstract class AbstractDynamicModelManager
extends AbstractManager
implements DynamicModelManager
Holds shared functionality between different implementations of
DyanamicModelManager's.
- Version:
- $Id: AbstractDynamicModelManager.java,v 1.2 2004/07/07 18:18:09 epugh Exp $
- Author:
- Eric Pugh , Ben Gidley
- See Also:
-
Field Summary
Fields inherited from class org.apache.fulcrum.security.spi.AbstractManager
manager
Fields inherited from interface org.apache.fulcrum.security.ModelManager
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDelegate
(User delegator, User delegatee) It is expected the real implementation will overide this and save either side of the function.void
removeDelegate
(User delegator, User delegatee) Implementors should overide this to save and call super if they want the base class to do the workvoid
Revokes all users and roles from a group This method is used when deleting a group.void
revokeAll
(Permission permission) Revokes all roles from a permission This method is used when deleting a permission.void
Revokes all permissions and groups from a Role.void
Revokes all groups from a user This method is used when deleting an account.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 Details
-
AbstractDynamicModelManager
public AbstractDynamicModelManager()
-
-
Method Details
-
revokeAll
Revokes all roles from a permission This method is used when deleting a permission.- Specified by:
revokeAll
in interfaceDynamicModelManager
- Parameters:
permission
- the permission.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revokeAll
Revokes all users and roles from a group This method is used when deleting a group.- Specified by:
revokeAll
in interfaceDynamicModelManager
- Parameters:
group
- the Group.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revokeAll
Revokes all groups from a user This method is used when deleting an account.- Specified by:
revokeAll
in interfaceDynamicModelManager
- Parameters:
user
- the User.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revokeAll
Revokes all permissions and groups from a Role. This method is used when deleting a Role.- Specified by:
revokeAll
in interfaceDynamicModelManager
- Parameters:
role
- the Role- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Role is not present.
-
addDelegate
public void addDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException It is expected the real implementation will overide this and save either side of the function. It is not abstract as a in memory implementation would not need to do anything.- Specified by:
addDelegate
in interfaceDynamicModelManager
- Parameters:
delegator
- Adelegatee
- B- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-
removeDelegate
public void removeDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException Implementors should overide this to save and call super if they want the base class to do the work- Specified by:
removeDelegate
in interfaceDynamicModelManager
- Parameters:
delegator
- Adelegatee
- B- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-