Interface DynamicModelManager
-
- All Superinterfaces:
ModelManager
,Serializable
- All Known Implementing Classes:
AbstractDynamicModelManager
public interface DynamicModelManager extends ModelManager
Describes all the relationships between entities in the "Dynamic" model.- Version:
- $Id$
- Author:
- Eric Pugh, Ben Gidley
-
-
Field Summary
-
Fields inherited from interface org.apache.fulcrum.security.ModelManager
ROLE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDelegate(User delegator, User delegatee)
Allow B to assumes A's roles, groups and permissionsvoid
grant(Group group, Role role)
Puts a role into a group This method is used when adding a role to a group.void
grant(Role role, Permission permission)
Puts a permission in a role This method is used when adding a permission to a rolevoid
grant(User user, Group group)
Puts a user in a group.void
removeDelegate(User delegator, User delegatee)
Stop A having B's roles, groups and permissionsvoid
revoke(Group group, Role role)
Remove a role from a group This method is used when removeing a role to a group.void
revoke(Role role, Permission permission)
Removes a permission from a rolevoid
revoke(User user, Group group)
Removes a user from a groupvoid
revokeAll(Group group)
Revokes all roles and users from a Group This method is typically used when deleting a Group.void
revokeAll(Permission permission)
Revoke from a permission all roles This method is typically used when deleting a Permissionvoid
revokeAll(Role role)
Revokes all permissions from a Role.void
revokeAll(User user)
Revokes all roles from an User.
-
-
-
Method Detail
-
grant
void grant(Group group, Role role) throws DataBackendException, UnknownEntityException
Puts a role into a group This method is used when adding a role to a group.- Parameters:
group
- the group to userole
- the role that will join the group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the group or role is not present.
-
revoke
void revoke(Group group, Role role) throws DataBackendException, UnknownEntityException
Remove a role from a group This method is used when removeing a role to a group.- Parameters:
group
- the group to userole
- the role that will join the group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the group or role is not present.
-
grant
void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityException
Puts a permission in a role This method is used when adding a permission to a role- Parameters:
role
- the Rolepermission
- the Permission- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revoke
void revoke(Role role, Permission permission) throws DataBackendException, UnknownEntityException
Removes a permission from a role- Parameters:
role
- the Rolepermission
- the Permission- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the user or group is not present.
-
grant
void grant(User user, Group group) throws DataBackendException, UnknownEntityException
Puts a user in a group. This method is used when adding a user to a group- Parameters:
user
- the Usergroup
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revoke
void revoke(User user, Group group) throws DataBackendException, UnknownEntityException
Removes a user from a group- Parameters:
user
- the Usergroup
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the user or group is not present.
-
revokeAll
void revokeAll(User user) throws DataBackendException, UnknownEntityException
Revokes all roles from an User. This method is typically used when deleting an account.- Parameters:
user
- the User- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the account is not present.
-
revokeAll
void revokeAll(Permission permission) throws DataBackendException, UnknownEntityException
Revoke from a permission all roles This method is typically used when deleting a Permission- Parameters:
permission
- the Permission.- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the permission is not present.
-
revokeAll
void revokeAll(Role role) throws DataBackendException, UnknownEntityException
Revokes all permissions from a Role. This method is typically used when deleting a Role.- Parameters:
role
- the Role- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Role is not present.
-
revokeAll
void revokeAll(Group group) throws DataBackendException, UnknownEntityException
Revokes all roles and users from a Group This method is typically used when deleting a Group.- Parameters:
group
- the Group- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-
addDelegate
void addDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException
Allow B to assumes A's roles, groups and permissions- Parameters:
delegator
- Adelegatee
- B- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-
removeDelegate
void removeDelegate(User delegator, User delegatee) throws DataBackendException, UnknownEntityException
Stop A having B's roles, groups and permissions- Parameters:
delegator
- Adelegatee
- B- Throws:
DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the Group is not present.
-
-