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
- Direct Known Subclasses:
MemoryModelManagerImpl
,TorqueDynamicModelManagerImpl
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:
- Serialized Form
-
-
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 Constructor Description AbstractDynamicModelManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
revokeAll(Group group)
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
revokeAll(Role role)
Revokes all permissions and groups from a Role.void
revokeAll(User user)
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 Detail
-
AbstractDynamicModelManager
public AbstractDynamicModelManager()
-
-
Method Detail
-
revokeAll
public void revokeAll(Permission permission) throws DataBackendException, UnknownEntityException
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
public void revokeAll(Group group) throws DataBackendException, UnknownEntityException
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
public void revokeAll(User user) throws DataBackendException, UnknownEntityException
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
public void revokeAll(Role role) throws DataBackendException, UnknownEntityException
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.
-
-