Interface UserGroupApi
public interface UserGroupApi
Contains all api operations for handling user groups.
-
Method Summary
Modifier and TypeMethodDescriptionaddUserGroup
(AddUserGroupRequest addUserGroupRequest) Adds a new user group.addUserGroups
(AddUserGroupsRequest addUserGroupsRequest) Adds multiple new user groups.addUsersToUserGroup
(AddUsersToUserGroupRequest addUsersToUserGroupRequest) Adds users to the user group.changeUserGroup
(ChangeUserGroupRequest changeUserGroupRequest) Changes the user group with the information that is present in the request.boolean
Returns true if a group with given ID exists.findUserGroups
(FindUserGroupsRequest request) Finds the user groups according to the criteria specified in the FindUserGroupsRequest.getUserGroup
(UUID groupId) Returns the user group with the given ID.getUserGroupByName
(String groupName) Returns the user group with the given name.getUserGroupsForUser
(FindUserGroupsForUserRequest findUserGroupsForUserRequest) Deprecated.void
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 Details
-
addUserGroup
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
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
Removes a user group identified by given ID.- Parameters:
userGroupId
- the ID of the user group to remove
-
addUsersToUserGroup
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=com.collibra.dgc.core.api.internal.security.audit.formatter.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
Returns the user group with the given ID.- Parameters:
groupId
- the ID of the user group- Returns:
- the found user group
-
getUserGroupByName
Returns the user group with the given name.- Parameters:
groupName
- the name of the user group- Returns:
- the found user group
-
exists
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=com.collibra.dgc.core.api.internal.security.audit.formatter.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
Removes users from given user group.- Parameters:
removeUsersFromUserGroupRequest
- the properties needed to remove users from given user group
-
setUsersForUserGroup
Sets the list of users that belong to a group.- Parameters:
usersForUserGroupRequest
- the properties needed to set users for a user group
-
findUserGroups(FindUserGroupsRequest)
instead