public class RestCrowdClient extends Object implements CrowdClient
| Constructor and Description |
|---|
RestCrowdClient(ClientProperties clientProperties)
Deprecated.
use the
RestCrowdClientFactory methods |
RestCrowdClient(RestExecutor executor)
Please do not call this constructor directly.
|
@Deprecated public RestCrowdClient(ClientProperties clientProperties)
RestCrowdClientFactory methodsclientProperties - crowd properties for the clientpublic RestCrowdClient(RestExecutor executor)
RestCrowdClientFactory instead.public User getUser(String name) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic UserWithAttributes getUserWithAttributes(String name) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getUserWithAttributes in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic User getUserByKey(String key) throws UserNotFoundException, OperationFailedException, ApplicationPermissionException, InvalidAuthenticationException
getUserByKey in interface CrowdClientUserNotFoundExceptionOperationFailedExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionpublic User authenticateUser(String username, String password) throws UserNotFoundException, InactiveAccountException, ExpiredCredentialException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
public User userAuthenticated(String username) throws ApplicationPermissionException, OperationFailedException, InvalidAuthenticationException, UserNotFoundException, InactiveAccountException
userAuthenticated in interface CrowdClientApplicationPermissionExceptionOperationFailedExceptionInvalidAuthenticationExceptionUserNotFoundExceptionInactiveAccountExceptionpublic UserWithAttributes addUser(UserWithAttributes user, PasswordCredential passwordCredential) throws ApplicationPermissionException, InvalidUserException, InvalidCredentialException, InvalidAuthenticationException, OperationFailedException
addUser in interface CrowdClientApplicationPermissionExceptionInvalidUserExceptionInvalidCredentialExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic UserWithAttributes addUser(User user, PasswordCredential passwordCredential) throws ApplicationPermissionException, InvalidUserException, InvalidCredentialException, InvalidAuthenticationException, OperationFailedException
addUser in interface CrowdClientApplicationPermissionExceptionInvalidUserExceptionInvalidCredentialExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void updateUser(User user) throws InvalidUserException, UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
updateUser in interface CrowdClientInvalidUserExceptionUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic User renameUser(String oldUsername, String newUsername) throws InvalidUserException, UserNotFoundException, OperationFailedException, ApplicationPermissionException, InvalidAuthenticationException
renameUser in interface CrowdClientInvalidUserExceptionUserNotFoundExceptionOperationFailedExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionpublic void updateUserCredential(String username, String password) throws InvalidCredentialException, UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
updateUserCredential in interface CrowdClientInvalidCredentialExceptionUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void requestPasswordReset(String username) throws UserNotFoundException, InvalidEmailAddressException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
requestPasswordReset in interface CrowdClientUserNotFoundExceptionInvalidEmailAddressExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void requestUsernames(String email) throws InvalidEmailAddressException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
requestUsernames in interface CrowdClientInvalidEmailAddressExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void storeUserAttributes(String username, Map<String,Set<String>> attributes) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
storeUserAttributes in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void removeUserAttributes(String username, String attributeName) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
removeUserAttributes in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void removeUser(String username) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
removeUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic Group getGroup(String name) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getGroup in interface CrowdClientname - name of the group to retrieve.GroupNotFoundException - The group does not exist on the remote server.OperationFailedException - For any other communication errors.ApplicationPermissionExceptionInvalidAuthenticationExceptionpublic GroupWithAttributes getGroupWithAttributes(String name) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getGroupWithAttributes in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void addGroup(Group group) throws InvalidGroupException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
addGroup in interface CrowdClientInvalidGroupExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void updateGroup(Group group) throws InvalidGroupException, GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
updateGroup in interface CrowdClientInvalidGroupExceptionGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void storeGroupAttributes(String groupName, Map<String,Set<String>> attributes) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
storeGroupAttributes in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void removeGroupAttributes(String groupName, String attributeName) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
removeGroupAttributes in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void removeGroup(String groupName) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
removeGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic boolean isUserDirectGroupMember(String username, String groupName) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
isUserDirectGroupMember in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic boolean isUserNestedGroupMember(String username, String groupName) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
isUserNestedGroupMember in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic boolean isGroupDirectGroupMember(String childName, String parentName) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
isGroupDirectGroupMember in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void addUserToGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, MembershipAlreadyExistsException
public void addGroupToGroup(String childGroup, String parentGroup) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, MembershipAlreadyExistsException
addGroupToGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionMembershipAlreadyExistsExceptionpublic void removeUserFromGroup(String username, String groupName) throws MembershipNotFoundException, GroupNotFoundException, UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
public void removeGroupFromGroup(String childGroup, String parentGroup) throws MembershipNotFoundException, GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
removeGroupFromGroup in interface CrowdClientMembershipNotFoundExceptionGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void testConnection()
throws ApplicationPermissionException,
InvalidAuthenticationException,
OperationFailedException
testConnection in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<User> searchUsers(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchUsers in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<UserWithAttributes> searchUsersWithAttributes(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchUsersWithAttributes in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> searchUserNames(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchUserNames in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> searchGroups(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchGroups in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<GroupWithAttributes> searchGroupsWithAttributes(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchGroupsWithAttributes in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> searchGroupNames(SearchRestriction searchRestriction, int startIndex, int maxResults) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
searchGroupNames in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<User> getUsersOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getUsersOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfUsersOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfUsersOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getChildGroupsOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getChildGroupsOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfChildGroupsOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfChildGroupsOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getGroupsForUser(String userName, int startIndex, int maxResults) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getGroupsForUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<GroupWithAttributes> getGroupsWithAttributesForUser(String userName, int startIndex, int maxResults) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getGroupsWithAttributesForUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfGroupsForUser(String userName, int startIndex, int maxResults) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfGroupsForUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getParentGroupsForGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getParentGroupsForGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfParentGroupsForGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfParentGroupsForGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<User> getNestedUsersOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNestedUsersOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfNestedUsersOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfNestedUsersOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getNestedChildGroupsOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNestedChildGroupsOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfNestedChildGroupsOfGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfNestedChildGroupsOfGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getGroupsForNestedUser(String userName, int startIndex, int maxResults) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getGroupsForNestedUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfGroupsForNestedUser(String userName, int startIndex, int maxResults) throws UserNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfGroupsForNestedUser in interface CrowdClientUserNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<Group> getParentGroupsForNestedGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getParentGroupsForNestedGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic List<String> getNamesOfParentGroupsForNestedGroup(String groupName, int startIndex, int maxResults) throws GroupNotFoundException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNamesOfParentGroupsForNestedGroup in interface CrowdClientGroupNotFoundExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic Iterable<Membership> getMemberships() throws OperationFailedException, ApplicationPermissionException, InvalidAuthenticationException, UnsupportedCrowdApiException
getMemberships in interface CrowdClientOperationFailedExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionUnsupportedCrowdApiExceptionpublic User findUserFromSSOToken(String token) throws InvalidTokenException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
findUserFromSSOToken in interface CrowdClientInvalidTokenExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic String authenticateSSOUser(UserAuthenticationContext userAuthenticationContext) throws ApplicationAccessDeniedException, ExpiredCredentialException, InactiveAccountException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
public String authenticateSSOUser(UserAuthenticationContext userAuthenticationContext, long duration) throws ApplicationAccessDeniedException, ExpiredCredentialException, InactiveAccountException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
public String authenticateSSOUserWithoutValidatingPassword(UserAuthenticationContext userAuthenticationContext) throws ApplicationAccessDeniedException, InactiveAccountException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
public void validateSSOAuthentication(String token, List<ValidationFactor> validationFactors) throws InvalidTokenException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
validateSSOAuthentication in interface CrowdClientInvalidTokenExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic Session validateSSOAuthenticationAndGetSession(String token, List<ValidationFactor> validationFactors) throws InvalidTokenException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
validateSSOAuthenticationAndGetSession in interface CrowdClientInvalidTokenExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void invalidateSSOToken(String token) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
invalidateSSOToken in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void invalidateSSOTokensForUser(String username) throws OperationFailedException, ApplicationPermissionException, InvalidAuthenticationException, UnsupportedCrowdApiException
invalidateSSOTokensForUser in interface CrowdClientOperationFailedExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionUnsupportedCrowdApiExceptionpublic void invalidateSSOTokensForUser(String username, String exclude) throws OperationFailedException, ApplicationPermissionException, InvalidAuthenticationException, UnsupportedCrowdApiException
invalidateSSOTokensForUser in interface CrowdClientOperationFailedExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionUnsupportedCrowdApiExceptionpublic CookieConfiguration getCookieConfiguration() throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getCookieConfiguration in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void shutdown()
shutdown in interface CrowdClientpublic String getCurrentEventToken() throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, IncrementalSynchronisationNotAvailableException
public Events getNewEvents(String eventToken) throws EventTokenExpiredException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
getNewEvents in interface CrowdClientEventTokenExpiredExceptionApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic String getWebhook(long webhookId) throws InvalidAuthenticationException, ApplicationPermissionException, OperationFailedException, WebhookNotFoundException
getWebhook in interface CrowdClientInvalidAuthenticationExceptionApplicationPermissionExceptionOperationFailedExceptionWebhookNotFoundExceptionpublic long registerWebhook(String endpointUrl, @Nullable String token) throws ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException
registerWebhook in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionpublic void unregisterWebhook(long webhookId)
throws ApplicationPermissionException,
InvalidAuthenticationException,
OperationFailedException,
WebhookNotFoundException
unregisterWebhook in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionWebhookNotFoundExceptionpublic void expireAllPasswords()
throws ApplicationPermissionException,
InvalidAuthenticationException,
OperationFailedException
expireAllPasswords in interface CrowdClientApplicationPermissionExceptionInvalidAuthenticationExceptionOperationFailedExceptionCopyright © 2023 Atlassian. All rights reserved.