Class MemoryModelManagerImpl
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.fulcrum.security.spi.AbstractManager
-
- org.apache.fulcrum.security.memory.basic.MemoryModelManagerImpl
-
- 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
,BasicModelManager
,ModelManager
public class MemoryModelManagerImpl extends AbstractManager implements BasicModelManager
This implementation keeps all objects in memory. This is mostly meant to help with testing and prototyping of ideas.- Version:
- $Id$
- Author:
- Eric Pugh
- 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 MemoryModelManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
grant(User user, Group group)
Puts a user in a group.void
revoke(User user, Group group)
Removes a user in a group.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
-
-
-
-
Constructor Detail
-
MemoryModelManagerImpl
public MemoryModelManagerImpl()
-
-
Method Detail
-
grant
public void grant(User user, Group group) throws DataBackendException, UnknownEntityException
Puts a user in a group. This method is used when adding a user to a group- Specified by:
grant
in interfaceBasicModelManager
- Parameters:
user
- the Usergroup
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revoke
public void revoke(User user, Group group) throws DataBackendException, UnknownEntityException
Removes a user in a group. This method is used when removing a user to a group- Specified by:
revoke
in interfaceBasicModelManager
- Parameters:
user
- the User.group
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the user or group 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 interfaceBasicModelManager
- Parameters:
user
- the User.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
-