Class RoleServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.identity.v3.internal.BaseIdentityServices
-
- org.openstack4j.openstack.identity.v3.internal.RoleServiceImpl
-
- All Implemented Interfaces:
RoleService,RestService
public class RoleServiceImpl extends BaseIdentityServices implements RoleService
Identity Role based Operations Implementation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description RoleServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionResponsecheckDomainGroupRole(String domainId, String groupId, String roleId)checks if a group has a specific role in a given domainActionResponsecheckDomainUserRole(String domainId, String userId, String roleId)checks if a user has a specific role in a given domain-contextActionResponsecheckProjectGroupRole(String projectId, String groupId, String roleId)check if a group has a specific role in a given projectActionResponsecheckProjectUserRole(String projectId, String userId, String roleId)checks if a user has a specific role in a given project-contextRolecreate(String name)Create a new roleRolecreate(Role role)Create a new roleActionResponsedelete(String roleId)Delete a roleRoleget(String roleId)Get details for a roleList<? extends Role>getByName(String name)Get Role(s) filtering by NameActionResponsegrantDomainGroupRole(String domainId, String groupId, String roleId)grant a role to a specified group in domain contextActionResponsegrantDomainUserRole(String domainId, String userId, String roleId)grants a role to a specified user in domain contextActionResponsegrantProjectGroupRole(String projectId, String groupId, String roleId)grants a role to a specified group in project contextActionResponsegrantProjectUserRole(String projectId, String userId, String roleId)grants a role to a specified user in project contextList<? extends Role>list()Lists the global rolesList<? extends RoleAssignment>listRoleAssignments(String projectId)list a role assignment list in project contextActionResponserevokeDomainGroupRole(String domainId, String groupId, String roleId)revoke a role from a specified group in domain contextActionResponserevokeDomainUserRole(String domainId, String userId, String roleId)revokes a role to a specified user in domain contextActionResponserevokeProjectGroupRole(String projectId, String groupId, String roleId)revokes a role from a specified group in project contextActionResponserevokeProjectUserRole(String projectId, String userId, String roleId)revokes a role to a specified user in project contextRoleupdate(Role role)Update a role-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
delete, deleteWithResponse, get, getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, putWithResponse, request, toList, uri
-
-
-
-
Method Detail
-
grantProjectUserRole
public ActionResponse grantProjectUserRole(String projectId, String userId, String roleId)
grants a role to a specified user in project context- Specified by:
grantProjectUserRolein interfaceRoleService- Parameters:
projectId- the project iduserId- the user idroleId- the role id- Returns:
- the action response
-
revokeProjectUserRole
public ActionResponse revokeProjectUserRole(String projectId, String userId, String roleId)
revokes a role to a specified user in project context- Specified by:
revokeProjectUserRolein interfaceRoleService- Parameters:
projectId- the project iduserId- the user idroleId- the role id- Returns:
- the action response
-
checkProjectUserRole
public ActionResponse checkProjectUserRole(String projectId, String userId, String roleId)
checks if a user has a specific role in a given project-context- Specified by:
checkProjectUserRolein interfaceRoleService- Parameters:
projectId- the project iduserId- the user idroleId- the role id- Returns:
- the ActionResponse
-
grantDomainUserRole
public ActionResponse grantDomainUserRole(String domainId, String userId, String roleId)
grants a role to a specified user in domain context- Specified by:
grantDomainUserRolein interfaceRoleService- Parameters:
domainId- the domain iduserId- the user idroleId- the role id- Returns:
- the action response
-
revokeDomainUserRole
public ActionResponse revokeDomainUserRole(String domainId, String userId, String roleId)
revokes a role to a specified user in domain context- Specified by:
revokeDomainUserRolein interfaceRoleService- Parameters:
domainId- the domain iduserId- the user idroleId- the role id- Returns:
- the action response
-
checkDomainUserRole
public ActionResponse checkDomainUserRole(String domainId, String userId, String roleId)
checks if a user has a specific role in a given domain-context- Specified by:
checkDomainUserRolein interfaceRoleService- Parameters:
domainId- the domain iduserId- the user idroleId- the role id- Returns:
- the ActionResponse
-
list
public List<? extends Role> list()
Lists the global roles- Specified by:
listin interfaceRoleService- Returns:
- the list extends role>
-
getByName
public List<? extends Role> getByName(String name)
Get Role(s) filtering by Name- Specified by:
getByNamein interfaceRoleService- Parameters:
name- the name of the Role to filter by- Returns:
- the list extends Role>
-
create
public Role create(Role role)
Description copied from interface:RoleServiceCreate a new role- Specified by:
createin interfaceRoleService- Parameters:
role- the role- Returns:
- the newly created role
-
create
public Role create(String name)
Description copied from interface:RoleServiceCreate a new role- Specified by:
createin interfaceRoleService- Parameters:
name- the role name- Returns:
- the newly created role
-
update
public Role update(Role role)
Description copied from interface:RoleServiceUpdate a role- Specified by:
updatein interfaceRoleService- Parameters:
role- the role set to update- Returns:
- the updated role
-
delete
public ActionResponse delete(String roleId)
Description copied from interface:RoleServiceDelete a role- Specified by:
deletein interfaceRoleService- Parameters:
roleId- the role id- Returns:
- the ActionResponse
-
get
public Role get(String roleId)
Description copied from interface:RoleServiceGet details for a role- Specified by:
getin interfaceRoleService- Parameters:
roleId- the role id- Returns:
- the role
-
listRoleAssignments
public List<? extends RoleAssignment> listRoleAssignments(String projectId)
Description copied from interface:RoleServicelist a role assignment list in project context- Specified by:
listRoleAssignmentsin interfaceRoleService- Parameters:
projectId- the project id- Returns:
- the list extends RoleAssignment>
-
grantProjectGroupRole
public ActionResponse grantProjectGroupRole(String projectId, String groupId, String roleId)
Description copied from interface:RoleServicegrants a role to a specified group in project context- Specified by:
grantProjectGroupRolein interfaceRoleService- Parameters:
projectId- the project idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
revokeProjectGroupRole
public ActionResponse revokeProjectGroupRole(String projectId, String groupId, String roleId)
Description copied from interface:RoleServicerevokes a role from a specified group in project context- Specified by:
revokeProjectGroupRolein interfaceRoleService- Parameters:
projectId- the project idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
checkProjectGroupRole
public ActionResponse checkProjectGroupRole(String projectId, String groupId, String roleId)
Description copied from interface:RoleServicecheck if a group has a specific role in a given project- Specified by:
checkProjectGroupRolein interfaceRoleService- Parameters:
projectId- the project idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
grantDomainGroupRole
public ActionResponse grantDomainGroupRole(String domainId, String groupId, String roleId)
Description copied from interface:RoleServicegrant a role to a specified group in domain context- Specified by:
grantDomainGroupRolein interfaceRoleService- Parameters:
domainId- the domain idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
revokeDomainGroupRole
public ActionResponse revokeDomainGroupRole(String domainId, String groupId, String roleId)
Description copied from interface:RoleServicerevoke a role from a specified group in domain context- Specified by:
revokeDomainGroupRolein interfaceRoleService- Parameters:
domainId- the domain idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
checkDomainGroupRole
public ActionResponse checkDomainGroupRole(String domainId, String groupId, String roleId)
Description copied from interface:RoleServicechecks if a group has a specific role in a given domain- Specified by:
checkDomainGroupRolein interfaceRoleService- Parameters:
domainId- the domain idgroupId- the group idroleId- the role id- Returns:
- the ActionResponse
-
-