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:
- 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 TorqueTurbineModelManagerImpl()
-
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)
Grant an User a Role in a Group.void
replace(User user, Role oldRole, Role newRole)
Replaces the assigned old Role to new role in the #global group for User user.void
revoke(Role role, Permission permission)
Revokes a Permission from a Role.void
revoke(User user, Group group, Role role)
Revoke a Role in a Group from an User.-
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 Detail
-
TorqueTurbineModelManagerImpl
public TorqueTurbineModelManagerImpl()
-
-
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
Description copied from interface:TurbineModelManager
Grant an User a Role in a Group.- Specified by:
grant
in interfaceTurbineModelManager
- Parameters:
user
- the user.group
- the group.role
- the role.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if user account, group or role is not present.
-
revoke
public void revoke(User user, Group group, Role role) throws DataBackendException, UnknownEntityException
Description copied from interface:TurbineModelManager
Revoke a Role in a Group from an User.- Specified by:
revoke
in interfaceTurbineModelManager
- Parameters:
user
- the user.group
- the group.role
- the role.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if user account, group or role is not present.
-
replace
public void replace(User user, Role oldRole, Role newRole) throws DataBackendException, UnknownEntityException
Description copied from interface:TurbineModelManager
Replaces the assigned old Role to new role in the #global group for User user.- Specified by:
replace
in interfaceTurbineModelManager
- Parameters:
user
- the User.oldRole
- the old RolenewRole
- the new Role- Throws:
DataBackendException
- generic exceptionUnknownEntityException
- generic exception
-
-