Class TorqueDynamicModelManagerImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.model.dynamic.AbstractDynamicModelManager
org.apache.fulcrum.security.torque.dynamic.TorqueDynamicModelManagerImpl
- 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,DynamicModelManager,ModelManager
public class TorqueDynamicModelManagerImpl
extends AbstractDynamicModelManager
implements DynamicModelManager
This implementation persists to a database via Torque.
- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
-
Field Summary
Fields inherited from class org.apache.fulcrum.security.spi.AbstractManager
managerFields inherited from interface org.apache.fulcrum.security.ModelManager
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDelegate(User delegator, User delegatee) Allow B to assumes A's roles, groups and permissionsvoidGrants a Group a Rolevoidgrant(Role role, Permission permission) Grants a Role a PermissionvoidPuts a user in a group.voidremoveDelegate(User delegator, User delegatee) Stop A having B's roles, groups and permissionsvoidRevokes a Role from a Group.voidrevoke(Role role, Permission permission) Revokes a Permission from a Role.voidRemoves a user in a group.Methods inherited from class org.apache.fulcrum.security.model.dynamic.AbstractDynamicModelManager
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.dynamic.DynamicModelManager
revokeAll, revokeAll, revokeAll, revokeAll
-
Constructor Details
-
TorqueDynamicModelManagerImpl
public TorqueDynamicModelManagerImpl()
-
-
Method Details
-
revoke
Revokes a Role from a Group.- Specified by:
revokein interfaceDynamicModelManager- Parameters:
group- the Group.role- the Role.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if group or role is not present.
-
grant
public void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityException Grants a Role a Permission- Specified by:
grantin interfaceDynamicModelManager- 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:
revokein interfaceDynamicModelManager- 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
Puts a user in a group. This method is used when adding a user to a group- Specified by:
grantin interfaceDynamicModelManager- Parameters:
user- the User.group- the Group- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the account is not present.
-
revoke
Removes a user in a group. This method is used when removing a user to a group- Specified by:
revokein interfaceDynamicModelManager- 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.
-
grant
Grants a Group a Role- Specified by:
grantin interfaceDynamicModelManager- Parameters:
group- the Group.role- the Role.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if group or role is not present.
-
addDelegate
public void addDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException Allow B to assumes A's roles, groups and permissions- Specified by:
addDelegatein interfaceDynamicModelManager- Overrides:
addDelegatein classAbstractDynamicModelManager- Parameters:
delegator- Adelegatee- B- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if delegator or delagatee is not present.
-
removeDelegate
public void removeDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException Stop A having B's roles, groups and permissions- Specified by:
removeDelegatein interfaceDynamicModelManager- Overrides:
removeDelegatein classAbstractDynamicModelManager- Parameters:
delegator- Adelegatee- B- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if delegator or delagatee is not present.
-