Package org.openstack4j.api.identity.v2
Interface RoleService
-
- All Superinterfaces:
RestService
- All Known Implementing Classes:
RoleServiceImpl
public interface RoleService extends RestService
Identity Role based Operations- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActionResponseaddUserRole(String userId, String roleId)Adds a global role to a userActionResponseaddUserRole(String tenantId, String userId, String roleId)Adds a tenant based role to a userRolecreate(String name)Creates a new RoleActionResponsedelete(String roleId)Delete a role by it's IDRoleget(String roleId)Gets a role by IDRolegetByName(String name)Gets a Role by NameList<? extends Role>list()Lists the global rolesList<? extends Role>listRolesForUser(String userId)List roles for user.List<? extends Role>listRolesForUser(String userId, String tenantId)List roles for user.ActionResponseremoveUserRole(String userId, String roleId)Removes a global role from a userActionResponseremoveUserRole(String tenantId, String userId, String roleId)Removes the user role from a user and the associated tenant
-
-
-
Method Detail
-
addUserRole
ActionResponse addUserRole(String userId, String roleId)
Adds a global role to a user- Parameters:
userId- the user idroleId- the role id to add- Returns:
- the action response
-
addUserRole
ActionResponse addUserRole(String tenantId, String userId, String roleId)
Adds a tenant based role to a user- Parameters:
tenantId- the tenant iduserId- the user idroleId- the role id- Returns:
- the action response
-
removeUserRole
ActionResponse removeUserRole(String userId, String roleId)
Removes a global role from a user- Parameters:
userId- the user idroleId- the role id- Returns:
- the action response
-
removeUserRole
ActionResponse removeUserRole(String tenantId, String userId, String roleId)
Removes the user role from a user and the associated tenant- Parameters:
tenantId- the tenant iduserId- the user idroleId- the role id- Returns:
- the action response
-
listRolesForUser
List<? extends Role> listRolesForUser(String userId)
List roles for user.- Parameters:
userId- the user id- Returns:
- the list extends role>
-
listRolesForUser
List<? extends Role> listRolesForUser(String userId, String tenantId)
List roles for user.- Parameters:
userId- the user idtenantId- the tenant id- Returns:
- the list extends role>
-
delete
ActionResponse delete(String roleId)
Delete a role by it's ID- Parameters:
roleId- the role idthe- action response
-
getByName
Role getByName(String name)
Gets a Role by Name- Parameters:
name- the name of the Role- Returns:
- the Role or null if not found
-
-