Class MemoryTurbineModelManagerImpl
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.fulcrum.security.spi.AbstractManager
-
- org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
-
- org.apache.fulcrum.security.memory.turbine.MemoryTurbineModelManagerImpl
-
- 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
public class MemoryTurbineModelManagerImpl extends AbstractTurbineModelManager implements TurbineModelManager
This implementation keeps all objects in memory. This is mostly meant to help with testing and prototyping of ideas.- Version:
- $Id: MemoryTurbineModelManagerImpl.java,v 1.2 2004/07/07 16:51:27 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 MemoryTurbineModelManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
grant(Role role, Permission permission)
Grants a Role a Permissionvoid
grant(User user, Group group, Role role)
void
replace(User user, Role oldRole, Role newRole)
void
revoke(Role role, Permission permission)
Revokes a Permission from a Role.void
revoke(User user, Group group, Role role)
-
Methods inherited from class org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
configure, getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAll
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAll
-
-
-
-
Method Detail
-
grant
public void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityException
Grants a Role a Permission- Specified by:
grant
in interfaceTurbineModelManager
- Parameters:
role
- the Role.permission
- the Permission.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if role or permission is not present.
-
revoke
public void revoke(Role role, Permission permission) throws DataBackendException, UnknownEntityException
Revokes a Permission from a Role.- Specified by:
revoke
in interfaceTurbineModelManager
- Parameters:
role
- the Role.permission
- the Permission.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if role or permission is not present.
-
grant
public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityException
- Specified by:
grant
in interfaceTurbineModelManager
- Throws:
DataBackendException
UnknownEntityException
-
revoke
public void revoke(User user, Group group, Role role) throws DataBackendException, UnknownEntityException
- Specified by:
revoke
in interfaceTurbineModelManager
- Throws:
DataBackendException
UnknownEntityException
-
replace
public void replace(User user, Role oldRole, Role newRole) throws DataBackendException, UnknownEntityException
- Specified by:
replace
in interfaceTurbineModelManager
- Throws:
DataBackendException
UnknownEntityException
-
-