Class MockUserManagement
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.stubs.MockUserManagement
- All Implemented Interfaces:
UserManagement
- Author:
- jonmv
-
Constructor Summary
Constructors -
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 existList<com.yahoo.jdisc.http.filter.security.misc.User>Returns 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.
-
Constructor Details
-
MockUserManagement
public MockUserManagement()
-
-
Method Details
-
createRole
Description copied from interface:UserManagementCreates the given role, or throws if the role already exists.- Specified by:
createRolein interfaceUserManagement
-
deleteRole
Description copied from interface:UserManagementEnsures the given role does not exist.- Specified by:
deleteRolein interfaceUserManagement
-
addUsers
Description copied from interface:UserManagementEnsures the given users exist, and are part of the given role, or throws if the role does not exist.- Specified by:
addUsersin interfaceUserManagement
-
addToRoles
Description copied from interface:UserManagementEnsures the given user exist, and are part of the given roles, or throws if the roles does not exist.- Specified by:
addToRolesin interfaceUserManagement
-
removeUsers
Description copied from interface:UserManagementEnsures none of the given users are part of the given role, or throws if the role does not exist.- Specified by:
removeUsersin interfaceUserManagement
-
removeFromRoles
Description copied from interface:UserManagementEnsures the given users are not part of the given role, or throws if the roles does not exist.- Specified by:
removeFromRolesin interfaceUserManagement
-
listUsers
Description copied from interface:UserManagementReturns all users in the given role, or throws if the role does not exist.- Specified by:
listUsersin interfaceUserManagement
-
listRoles
Description copied from interface:UserManagementReturns all roles of which the given user is part, or throws if the user does not exist- Specified by:
listRolesin interfaceUserManagement
-
listRoles
Description copied from interface:UserManagementReturns all roles- Specified by:
listRolesin interfaceUserManagement
-