Interface UserManagement
- All Known Implementing Classes:
MockUserManagement
public interface UserManagement
- Author:
- jonmv
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToRoles(UserId user, Collection<Role> roles) Ensures the given user exist, and are part of the given roles, or throws if the roles does not exist.voidaddUsers(Role role, Collection<UserId> users) Ensures the given users exist, and are part of the given role, or throws if the role does not exist.voidcreateRole(Role role) Creates the given role, or throws if the role already exists.voiddeleteRole(Role role) Ensures the given role does not exist.Returns all rolesReturns all roles of which the given user is part, or throws if the user does not existReturns all users in the given role, or throws if the role does not exist.voidremoveFromRoles(UserId user, Collection<Role> roles) Ensures the given users are not part of the given role, or throws if the roles does not exist.voidremoveUsers(Role role, Collection<UserId> users) Ensures none of the given users are part of the given role, or throws if the role does not exist.
-
Method Details
-
createRole
Creates the given role, or throws if the role already exists. -
deleteRole
Ensures the given role does not exist. -
addUsers
Ensures the given users exist, and are part of the given role, or throws if the role does not exist. -
addToRoles
Ensures the given user exist, and are part of the given roles, or throws if the roles does not exist. -
removeUsers
Ensures none of the given users are part of the given role, or throws if the role does not exist. -
removeFromRoles
Ensures the given users are not part of the given role, or throws if the roles does not exist. -
listUsers
Returns all users in the given role, or throws if the role does not exist. -
listRoles
Returns all roles of which the given user is part, or throws if the user does not exist -
listRoles
Returns all roles
-