public class RoleServiceImpl extends BaseOpenStackService implements RoleService
BaseOpenStackService.Invocation<R>
Constructor and Description |
---|
RoleServiceImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResponse |
addUserRole(String userId,
String roleId)
Adds a global role to a user
|
ActionResponse |
addUserRole(String tenantId,
String userId,
String roleId)
Adds a tenant based role to a user
|
Role |
create(String name)
Creates a new Role
|
ActionResponse |
delete(String roleId)
Delete a role by it's ID
|
Role |
get(String roleId)
Gets a role by ID
|
Role |
getByName(String name)
Gets a Role by Name
|
List<? extends Role> |
list()
Lists the global roles
|
List<? extends Role> |
listRolesForUser(String userId)
List roles for user.
|
List<? extends Role> |
listRolesForUser(String userId,
String tenantId)
List roles for user.
|
ActionResponse |
removeUserRole(String userId,
String roleId)
Removes a global role from a user
|
ActionResponse |
removeUserRole(String tenantId,
String userId,
String roleId)
Removes the user role from a user and the associated tenant
|
delete, deleteWithResponse, get, getProvider, getServiceVersion, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, request, toList, uri
public ActionResponse addUserRole(String userId, String roleId)
addUserRole
in interface RoleService
userId
- the user idroleId
- the role id to addpublic ActionResponse addUserRole(String tenantId, String userId, String roleId)
addUserRole
in interface RoleService
tenantId
- the tenant iduserId
- the user idroleId
- the role idpublic ActionResponse removeUserRole(String userId, String roleId)
removeUserRole
in interface RoleService
userId
- the user idroleId
- the role idpublic ActionResponse removeUserRole(String tenantId, String userId, String roleId)
removeUserRole
in interface RoleService
tenantId
- the tenant iduserId
- the user idroleId
- the role idpublic List<? extends Role> list()
list
in interface RoleService
public List<? extends Role> listRolesForUser(String userId)
listRolesForUser
in interface RoleService
userId
- the user idpublic List<? extends Role> listRolesForUser(String userId, String tenantId)
listRolesForUser
in interface RoleService
userId
- the user idtenantId
- the tenant idpublic ActionResponse delete(String roleId)
delete
in interface RoleService
roleId
- the role idpublic Role get(String roleId)
get
in interface RoleService
roleId
- the role idpublic Role create(String name)
create
in interface RoleService
name
- the name of the rolepublic Role getByName(String name)
getByName
in interface RoleService
name
- the name of the RoleCopyright © 2017. All rights reserved.