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: DynamicModelManager.java 1845858 2018-11-05 21:14:02Z painter $
- Author:
- Eric Pugh, Ben Gidley
-
Field Summary
-
Method Summary
Modifier and Type Method Description voidaddDelegate(User delegator, User delegatee)Allow B to assumes A's roles, groups and permissionsvoidgrant(Group group, Role role)Puts a role into a group This method is used when adding a role to a group.voidgrant(Role role, Permission permission)Puts a permission in a role This method is used when adding a permission to a rolevoidgrant(User user, Group group)Puts a user in a group.voidremoveDelegate(User delegator, User delegatee)Stop A having B's roles, groups and permissionsvoidrevoke(Group group, Role role)Remove a role from a group This method is used when removeing a role to a group.voidrevoke(Role role, Permission permission)Removes a permission from a rolevoidrevoke(User user, Group group)Removes a user from a groupvoidrevokeAll(Group group)Revokes all roles and users from a Group This method is typically used when deleting a Group.voidrevokeAll(Permission permission)Revoke from a permission all roles This method is typically used when deleting a PermissionvoidrevokeAll(Role role)Revokes all permissions from a Role.voidrevokeAll(User user)Revokes all roles from an User.
-
Method Details
-
grant
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
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
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
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
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
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
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
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
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
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, UnknownEntityExceptionAllow 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, UnknownEntityExceptionStop 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.
-