Class GroupServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.identity.v3.internal.BaseIdentityServices
-
- org.openstack4j.openstack.identity.v3.internal.GroupServiceImpl
-
- All Implemented Interfaces:
GroupService,RestService
public class GroupServiceImpl extends BaseIdentityServices implements GroupService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description GroupServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionResponseaddUserToGroup(String groupId, String userId)adds an existing user to a groupActionResponsecheckGroupUser(String groupId, String userId)check whether a user belongs to a groupGroupcreate(String domainId, String name, String description)creates a new groupGroupcreate(Group group)create a new groupActionResponsedelete(String groupId)delete a group by idGroupget(String groupId)gets detailed information about a specified group by idList<? extends Group>getByName(String groupName)get detailed information about groups matching specified by name and domainGroupgetByName(String groupName, String domainId)get detailed information about groups matching specified by name and domainList<? extends Group>list()lists groups.List<? extends Role>listDomainGroupRoles(String groupId, String domainId)list roles for a group on a domainList<? extends User>listGroupUsers(String groupId)lists the users that belong to a groupList<? extends Role>listProjectGroupRoles(String groupId, String projectId)list role for group on a projectActionResponseremoveUserFromGroup(String groupId, String userId)removes a user from a groupGroupupdate(Group group)updates an existing group-
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
-
get
public Group get(String groupId)
Description copied from interface:GroupServicegets detailed information about a specified group by id- Specified by:
getin interfaceGroupService- Parameters:
groupId- the group id- Returns:
- the group
-
getByName
public List<? extends Group> getByName(String groupName)
Description copied from interface:GroupServiceget detailed information about groups matching specified by name and domain- Specified by:
getByNamein interfaceGroupService- Parameters:
groupName- the group name- Returns:
- the of list groups matching the name across all domains
-
getByName
public Group getByName(String groupName, String domainId)
Description copied from interface:GroupServiceget detailed information about groups matching specified by name and domain- Specified by:
getByNamein interfaceGroupService- Parameters:
groupName- the group namedomainId- the domain id- Returns:
- the of list groups matching the name in a specific domain or null if not found
-
delete
public ActionResponse delete(String groupId)
Description copied from interface:GroupServicedelete a group by id- Specified by:
deletein interfaceGroupService- Parameters:
groupId- the group id- Returns:
- the action response
-
update
public Group update(Group group)
Description copied from interface:GroupServiceupdates an existing group- Specified by:
updatein interfaceGroupService- Parameters:
group- the group set to update- Returns:
- the updated group
-
create
public Group create(Group group)
Description copied from interface:GroupServicecreate a new group- Specified by:
createin interfaceGroupService- Parameters:
group- the group- Returns:
- the newly created group
-
create
public Group create(String domainId, String name, String description)
Description copied from interface:GroupServicecreates a new group- Specified by:
createin interfaceGroupService- Parameters:
domainId- the domain idname- the group namedescription- the description- Returns:
- the newly created group
-
list
public List<? extends Group> list()
Description copied from interface:GroupServicelists groups.- Specified by:
listin interfaceGroupService- Returns:
- list of groups
-
listGroupUsers
public List<? extends User> listGroupUsers(String groupId)
Description copied from interface:GroupServicelists the users that belong to a group- Specified by:
listGroupUsersin interfaceGroupService
-
checkGroupUser
public ActionResponse checkGroupUser(String groupId, String userId)
Description copied from interface:GroupServicecheck whether a user belongs to a group- Specified by:
checkGroupUserin interfaceGroupService- Parameters:
groupId- the group iduserId- the user id- Returns:
- the ActionResponse
-
addUserToGroup
public ActionResponse addUserToGroup(String groupId, String userId)
adds an existing user to a group- Specified by:
addUserToGroupin interfaceGroupService- Parameters:
groupId- the group iduserId- the user id- Returns:
- the ActionResponse
-
removeUserFromGroup
public ActionResponse removeUserFromGroup(String groupId, String userId)
removes a user from a group- Specified by:
removeUserFromGroupin interfaceGroupService- Parameters:
groupId- the group iduserId- the user id- Returns:
- the ActionResponse
-
listProjectGroupRoles
public List<? extends Role> listProjectGroupRoles(String groupId, String projectId)
Description copied from interface:GroupServicelist role for group on a project- Specified by:
listProjectGroupRolesin interfaceGroupService- Parameters:
groupId- the group idprojectId- the project id- Returns:
- the list of project roles for the group
-
listDomainGroupRoles
public List<? extends Role> listDomainGroupRoles(String groupId, String domainId)
Description copied from interface:GroupServicelist roles for a group on a domain- Specified by:
listDomainGroupRolesin interfaceGroupService- Parameters:
groupId- the group iddomainId- the domain id- Returns:
- the list of domain roles for a group
-
-