Interface UserGroupApi
-
public interface UserGroupApi
Contains all api operations for handling user groups.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description UserGroup
addUserGroup(AddUserGroupRequest addUserGroupRequest)
Adds a new user group.List<UserGroup>
addUserGroups(AddUserGroupsRequest addUserGroupsRequest)
Adds multiple new user groups.List<User>
addUsersToUserGroup(AddUsersToUserGroupRequest addUsersToUserGroupRequest)
Adds users to the user group.UserGroup
changeUserGroup(ChangeUserGroupRequest changeUserGroupRequest)
Changes the user group with the information that is present in the request.boolean
exists(UUID groupId)
Returns true if a group with given ID exists.PagedResponse<UserGroup>
findUserGroups(FindUserGroupsRequest request)
Finds the user groups according to the criteria specified in the FindUserGroupsRequest.UserGroup
getUserGroup(UUID groupId)
Returns the user group with the given ID.UserGroup
getUserGroupByName(String groupName)
Returns the user group with the given name.PagedResponse<UserGroup>
getUserGroupsForUser(FindUserGroupsForUserRequest findUserGroupsForUserRequest)
Deprecated.Please usefindUserGroups(FindUserGroupsRequest)
insteadvoid
removeUserGroup(UUID userGroupId)
Removes a user group identified by given ID.void
removeUsersFromUserGroup(RemoveUsersFromUserGroupRequest removeUsersFromUserGroupRequest)
Removes users from given user group.void
setUsersForUserGroup(SetUsersForUserGroupRequest usersForUserGroupRequest)
Sets the list of users that belong to a group.
-
-
-
Method Detail
-
addUserGroup
UserGroup addUserGroup(AddUserGroupRequest addUserGroupRequest)
Adds a new user group.- Parameters:
addUserGroupRequest
- the properties of the user group to be added- Returns:
- the newly added user group
-
addUserGroups
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<UserGroup> addUserGroups(AddUserGroupsRequest addUserGroupsRequest)
Adds multiple new user groups.- Parameters:
addUserGroupsRequest
- the properties of each user group to be added- Returns:
- the list of newly added user groups
-
changeUserGroup
UserGroup changeUserGroup(ChangeUserGroupRequest changeUserGroupRequest)
Changes the user group with the information that is present in the request.- Parameters:
changeUserGroupRequest
- changes that to be performed on the user group- Returns:
- the changed user group
-
removeUserGroup
void removeUserGroup(UUID userGroupId)
Removes a user group identified by given ID.- Parameters:
userGroupId
- the ID of the user group to remove
-
addUsersToUserGroup
List<User> addUsersToUserGroup(AddUsersToUserGroupRequest addUsersToUserGroupRequest)
Adds users to the user group.- Parameters:
addUsersToUserGroupRequest
- the properties needed to add users to given user group- Returns:
- the list of users added to the user group
-
getUserGroupsForUser
@Deprecated @SecurityAuditMethod(resultFormatter=PagedResponseFormatter.class) PagedResponse<UserGroup> getUserGroupsForUser(FindUserGroupsForUserRequest findUserGroupsForUserRequest)
Deprecated.Please usefindUserGroups(FindUserGroupsRequest)
insteadReturns a list of Groups for the given User.- Parameters:
findUserGroupsForUserRequest
- the request object- Returns:
- A PagedResponse of UserGroups
-
getUserGroup
UserGroup getUserGroup(UUID groupId)
Returns the user group with the given ID.- Parameters:
groupId
- the ID of the user group- Returns:
- the found user group
-
getUserGroupByName
UserGroup getUserGroupByName(String groupName)
Returns the user group with the given name.- Parameters:
groupName
- the name of the user group- Returns:
- the found user group
-
exists
boolean exists(UUID groupId)
Returns true if a group with given ID exists.- Parameters:
groupId
- the ID of the group- Returns:
- true if a group with given ID exists,
false
otherwise
-
findUserGroups
@SecurityAuditMethod(resultFormatter=PagedResponseFormatter.class) PagedResponse<UserGroup> findUserGroups(FindUserGroupsRequest request)
Finds the user groups according to the criteria specified in the FindUserGroupsRequest.- Parameters:
request
- the criteria for which the user groups should match- Returns:
- a pagedResponse of the usergroups
-
removeUsersFromUserGroup
void removeUsersFromUserGroup(RemoveUsersFromUserGroupRequest removeUsersFromUserGroupRequest)
Removes users from given user group.- Parameters:
removeUsersFromUserGroupRequest
- the properties needed to remove users from given user group
-
setUsersForUserGroup
void setUsersForUserGroup(SetUsersForUserGroupRequest usersForUserGroupRequest)
Sets the list of users that belong to a group.- Parameters:
usersForUserGroupRequest
- the properties needed to set users for a user group
-
-