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 interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
GLOBAL_GROUP_ATTR_NAME, GLOBAL_GROUP_NAME -
Constructor Summary
Constructors Constructor Description MemoryTurbineModelManagerImpl() -
Method Summary
Modifier and Type Method Description voidgrant(Role role, Permission permission)Grants a Role a Permissionvoidgrant(User user, Group group, Role role)voidreplace(User user, Role oldRole, Role newRole)voidrevoke(Role role, Permission permission)Revokes a Permission from a Role.voidrevoke(User user, Group group, Role role)Methods inherited from class org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
configure, getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAllMethods inherited from class org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAll
-
Constructor Details
-
MemoryTurbineModelManagerImpl
public MemoryTurbineModelManagerImpl()
-
-
Method Details
-
grant
public void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityExceptionGrants a Role a Permission- Specified by:
grantin 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, UnknownEntityExceptionRevokes a Permission from a Role.- Specified by:
revokein 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:
grantin interfaceTurbineModelManager- Throws:
DataBackendExceptionUnknownEntityException
-
revoke
public void revoke(User user, Group group, Role role) throws DataBackendException, UnknownEntityException- Specified by:
revokein interfaceTurbineModelManager- Throws:
DataBackendExceptionUnknownEntityException
-
replace
public void replace(User user, Role oldRole, Role newRole) throws DataBackendException, UnknownEntityException- Specified by:
replacein interfaceTurbineModelManager- Throws:
DataBackendExceptionUnknownEntityException
-