public interface MembershipService
Modifier and Type | Method and Description |
---|---|
BatchResult<BatchResultEntityWithCause> |
addUsersToGroup(long directoryId,
List<String> usernames,
String groupName)
Adds multiple users to single supplied group
|
BatchResult<BatchResultEntityWithCause> |
addUserToGroups(long directoryId,
String username,
List<String> groupNames)
Adds single supplied user to multiple groups
|
Collection<User> |
getDirectUsersFromGroup(long directoryId,
String groupName,
int startIndex,
int maxResults)
Returns direct members of a group (excluding nested members)
|
DirectoryGroup |
getGroupDetails(long directoryId,
String groupName)
Returns details of specific group
|
BatchResult<BatchResultEntityWithCause> |
removeUserFromGroups(long directoryId,
String username,
List<String> groupNames)
Removes single supplied user from multiple groups
|
BatchResult<BatchResultEntityWithCause> |
removeUsersFromGroup(long directoryId,
List<String> usernames,
String groupName)
Removes multiple users from the supplied group
|
BatchResult<BatchResultEntityWithCause> addUsersToGroup(long directoryId, List<String> usernames, String groupName) throws GroupNotFoundException, DirectoryNotFoundException, DirectoryPermissionException, OperationFailedException, FeatureInaccessibleException
directoryId
- ID of the directory, where supplied users and group are placedusernames
- List of usernames to add to groupgroupName
- Name of the target groupGroupNotFoundException
- if the group cannot be foundDirectoryNotFoundException
- if the directory cannot be found * @throws DirectoryPermissionException ifDirectoryPermissionException
- if the directory is not allowed to perform operations of type OperationType.UPDATE_GROUP
.OperationFailedException
- if underlying directory implementation failed to execute the operation.FeatureInaccessibleException
- If the feature is not available under the current licenseBatchResult<BatchResultEntityWithCause> addUserToGroups(long directoryId, String username, List<String> groupNames) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
directoryId
- ID of the directory, where supplied user and groups are placedusername
- Name of the user to addgroupNames
- List of target group namesUserNotFoundException
- if the user cannot be foundDirectoryNotFoundException
- if the directory cannot be foundOperationFailedException
- if underlying directory implementation failed to execute the operation.FeatureInaccessibleException
- If the feature is not available under the current licenseBatchResult<BatchResultEntityWithCause> removeUsersFromGroup(long directoryId, List<String> usernames, String groupName) throws GroupNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
directoryId
- ID of the directory, where the supplied users and group are placedusernames
- List of usernames to remove from groupgroupName
- Name of the target groupGroupNotFoundException
- if the group cannot be foundDirectoryNotFoundException
- if the directory cannot be foundOperationFailedException
- if underlying directory implementation failed to execute the operation.\FeatureInaccessibleException
- If the feature is not available under the current licenseBatchResult<BatchResultEntityWithCause> removeUserFromGroups(long directoryId, String username, List<String> groupNames) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
directoryId
- ID of directory, where supplied user and groups are placedusername
- Name of the user to remove from the groupgroupNames
- List of the target group namesUserNotFoundException
- if the user cannot be foundDirectoryNotFoundException
- if the directory cannot be foundOperationFailedException
- if underlying directory implementation failed to execute the operation.FeatureInaccessibleException
- If the feature is not available under the current licenseDirectoryGroup getGroupDetails(long directoryId, String groupName) throws DirectoryNotFoundException, GroupNotFoundException, OperationFailedException, FeatureInaccessibleException
directoryId
- ID of directory, where group is placedgroupName
- Name of group to look forDirectoryNotFoundException
- if the directory cannot be foundGroupNotFoundException
- if the group cannot be foundOperationFailedException
- if underlying directory implementation failed to execute the operation.FeatureInaccessibleException
- If the feature is not available under the current licenseCollection<User> getDirectUsersFromGroup(long directoryId, String groupName, int startIndex, int maxResults) throws DirectoryNotFoundException, OperationFailedException, GroupNotFoundException, FeatureInaccessibleException
directoryId
- ID of directory, where group is placedgroupName
- The group name to look for usersstartIndex
- Starting index of the resultsmaxResults
- Maximum number of results returnedDirectoryNotFoundException
- if the directory cannot be foundOperationFailedException
- if underlying directory implementation failed to execute the operation.GroupNotFoundException
- if the group cannot be foundFeatureInaccessibleException
- If the feature is not available under the current licenseCopyright © 2021 Atlassian. All rights reserved.