Class TorqueTurbineModelManagerImpl
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.torque.turbine.TorqueTurbineModelManagerImpl
- 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 TorqueTurbineModelManagerImpl
extends AbstractTurbineModelManager
implements TurbineModelManager
This implementation persists to a database via Torque.
- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
grant
(Role role, Permission permission) Grants a Role a Permissionvoid
void
void
revoke
(Role role, Permission permission) Revokes a Permission from a Role.void
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
-
Constructor Details
-
TorqueTurbineModelManagerImpl
public TorqueTurbineModelManagerImpl()
-
-
Method Details
-
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
-