com.atlassian.crowd.service.client
Interface CrowdClient

All Known Implementing Classes:
RestCrowdClient

public interface CrowdClient

Atlassian Crowd client interface.


Method Summary
 void addGroup(Group group)
          Adds a group to the remote Crowd server.
 void addGroupToGroup(java.lang.String childGroup, java.lang.String parentGroup)
          Adds a group to a group.
 void addUser(User user, PasswordCredential passwordCredential)
          Adds a new User to the remote Crowd server.
 void addUserToGroup(java.lang.String username, java.lang.String groupName)
          Adds a user to a group.
 java.lang.String authenticateSSOUser(UserAuthenticationContext userAuthenticationContext)
          Authenticates a Single-Sign-On (SSO) User.
 java.lang.String authenticateSSOUserWithoutValidatingPassword(UserAuthenticationContext userAuthenticationContext)
          Authenticates a Single-Sign-On (SSO) User without validating password.
 User authenticateUser(java.lang.String username, java.lang.String password)
          Authenticates a user with the server.
 User findUserFromSSOToken(java.lang.String token)
          Returns the user from the specified user token.
 java.util.List<Group> getChildGroupsOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups who are direct members of a group.
 CookieConfiguration getCookieConfiguration()
          Returns the cookie configuration.
 Group getGroup(java.lang.String name)
          Gets a group by name.
 java.util.List<Group> getGroupsForNestedUser(java.lang.String userName, int startIndex, int maxResults)
          Searches for groups that a user is a nested member of.
 java.util.List<Group> getGroupsForUser(java.lang.String userName, int startIndex, int maxResults)
          Searches for groups that a user is a direct member of.
 GroupWithAttributes getGroupWithAttributes(java.lang.String name)
          Gets a group with attributes by name.
 java.util.List<java.lang.String> getNamesOfChildGroupsOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups who are direct members of a group, returning the group names.
 java.util.List<java.lang.String> getNamesOfGroupsForNestedUser(java.lang.String userName, int startIndex, int maxResults)
          Searches for groups that a user is a nested member of, returning the group names.
 java.util.List<java.lang.String> getNamesOfGroupsForUser(java.lang.String userName, int startIndex, int maxResults)
          Searches for groups that a user is a direct member of, returning the group names.
 java.util.List<java.lang.String> getNamesOfNestedChildGroupsOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups who are nested members of a group, returning the group names.
 java.util.List<java.lang.String> getNamesOfNestedUsersOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for users who are nested members of a group, returning the user names.
 java.util.List<java.lang.String> getNamesOfParentGroupsForGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups that a group is a direct member of, returning the group names.
 java.util.List<java.lang.String> getNamesOfParentGroupsForNestedGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups that a group is a nested member of, returning the group names.
 java.util.List<java.lang.String> getNamesOfUsersOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for users who are direct members of a group, returning the user names.
 java.util.List<Group> getNestedChildGroupsOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups who are nested members of a group.
 java.util.List<User> getNestedUsersOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for users who are nested members of a group.
 java.util.List<Group> getParentGroupsForGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups that a group is a direct member of.
 java.util.List<Group> getParentGroupsForNestedGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for groups that a group is a nested member of.
 User getUser(java.lang.String name)
          Gets a User by user name.
 java.util.List<User> getUsersOfGroup(java.lang.String groupName, int startIndex, int maxResults)
          Searches for users who are direct members of a group.
 UserWithAttributes getUserWithAttributes(java.lang.String name)
          Gets a User with Attributes by user name.
 void invalidateSSOToken(java.lang.String token)
          Invalidates a token.
 boolean isGroupDirectGroupMember(java.lang.String childName, java.lang.String parentName)
          Tests if a group is a direct member of a group.
 boolean isUserDirectGroupMember(java.lang.String username, java.lang.String groupName)
          Tests if a user is a direct member of a group.
 void removeGroup(java.lang.String groupName)
          Removes a group from the remote Crowd server
 void removeGroupAttributes(java.lang.String groupName, java.lang.String attributeName)
          Removes a group attribute (set) from the server.
 void removeGroupFromGroup(java.lang.String childGroup, java.lang.String parentGroup)
          Removes a group to a group.
 void removeUser(java.lang.String username)
          Removes a user from the remote Crowd server
 void removeUserAttributes(java.lang.String username, java.lang.String attributeName)
          Removes a user attribute from the server.
 void removeUserFromGroup(java.lang.String username, java.lang.String groupName)
          Removes a user from a group.
 java.util.List<java.lang.String> searchGroupNames(SearchRestriction searchRestriction, int startIndex, int maxResults)
          Searches for group names matching the searchRestriction criteria.
 java.util.List<Group> searchGroups(SearchRestriction searchRestriction, int startIndex, int maxResults)
          Searches for groups matching the following criteria.
 java.util.List<java.lang.String> searchUserNames(SearchRestriction searchRestriction, int startIndex, int maxResults)
          Searches for usernames matching the searchRestriction criteria.
 java.util.List<User> searchUsers(SearchRestriction searchRestriction, int startIndex, int maxResults)
          Searches for users matching the following criteria.
 void storeGroupAttributes(java.lang.String groupName, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
          Stores the group's attributes on the remote Crowd server.
 void storeUserAttributes(java.lang.String username, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
          Stores the user's attributes on the remote Crowd server.
 boolean testConnection()
          Tests if the connection is OK.
 void updateGroup(Group group)
          Updates a group on the remote Crowd server.
 void updateUser(User user)
          Updates a user on the remote Crowd server.
 void updateUserCredential(java.lang.String username, java.lang.String password)
          Updates the user's password on the remote Crowd server.
 void validateSSOAuthentication(java.lang.String token, java.util.List<ValidationFactor> validationFactors)
          Validates the SSO authentication.
 

Method Detail

getUser

User getUser(java.lang.String name)
             throws UserNotFoundException,
                    OperationFailedException
Gets a User by user name.

Parameters:
name - Name of the user to retrieve
Returns:
A User.
Throws:
UserNotFoundException - if the user is not found.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getUserWithAttributes

UserWithAttributes getUserWithAttributes(java.lang.String name)
                                         throws UserNotFoundException,
                                                OperationFailedException
Gets a User with Attributes by user name.

Parameters:
name - Name of the user to retrieve
Returns:
A User.
Throws:
UserNotFoundException - if the user is not found.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

authenticateUser

User authenticateUser(java.lang.String username,
                      java.lang.String password)
                      throws OperationFailedException
Authenticates a user with the server.

Parameters:
username - Name of the user to authenticate.
password - Password of the user to authenticate.
Returns:
user if the user is correctly authenticated
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid or the username and password are not valid, or the username does not exist.
OperationFailedException - if the operation has failed for an unknown reason

addUser

void addUser(User user,
             PasswordCredential passwordCredential)
             throws InvalidUserException,
                    InvalidCredentialException,
                    OperationFailedException
Adds a new User to the remote Crowd server.

Parameters:
user - The user to add
passwordCredential - user password
Throws:
InvalidUserException - The user is invalid. This may be because a user of the same name already exists, or does not pass the server side validation rules.
InvalidCredentialException - The password is invalid. It must conform to the rules set on the server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

updateUser

void updateUser(User user)
                throws InvalidUserException,
                       UserNotFoundException,
                       InvalidCredentialException,
                       OperationFailedException
Updates a user on the remote Crowd server.

Parameters:
user - The user to update
Throws:
InvalidUserException - the details of the user to be updated are invalid. This may be because the user details do not pass the server side validation rules.
UserNotFoundException - the user does not exist on the remote Crowd server
InvalidCredentialException - The password is invalid. It must conform to the rules set on the server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

updateUserCredential

void updateUserCredential(java.lang.String username,
                          java.lang.String password)
                          throws UserNotFoundException,
                                 InvalidCredentialException,
                                 OperationFailedException
Updates the user's password on the remote Crowd server.

Parameters:
username - Name of the user to update.
password - New password.
Throws:
UserNotFoundException - the user does not exist on the remote Crowd server
InvalidCredentialException - The password is invalid. It must conform to the rules set on the server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

storeUserAttributes

void storeUserAttributes(java.lang.String username,
                         java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
                         throws UserNotFoundException,
                                OperationFailedException
Stores the user's attributes on the remote Crowd server.

Parameters:
username - Name of the user.
attributes - Set of Attributes to store. Attributes will be added or if an attribute with the same key exists will be replaced.
Throws:
UserNotFoundException - the user does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeUserAttributes

void removeUserAttributes(java.lang.String username,
                          java.lang.String attributeName)
                          throws UserNotFoundException,
                                 OperationFailedException
Removes a user attribute from the server. If the attribute to be removed does not exist, no error is reported.

Parameters:
username - Name of the user
attributeName - Attribute key.
Throws:
UserNotFoundException - the user does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeUser

void removeUser(java.lang.String username)
                throws UserNotFoundException,
                       OperationFailedException
Removes a user from the remote Crowd server

Parameters:
username - Name of the user to remove.
Throws:
UserNotFoundException - the user does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getGroup

Group getGroup(java.lang.String name)
               throws GroupNotFoundException,
                      OperationFailedException
Gets a group by name.

Parameters:
name - name of the group to retrieve.
Returns:
A Group
Throws:
GroupNotFoundException - The group does not exist on the remote server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getGroupWithAttributes

GroupWithAttributes getGroupWithAttributes(java.lang.String name)
                                           throws GroupNotFoundException,
                                                  OperationFailedException
Gets a group with attributes by name.

Parameters:
name - name of the group to retrieve.
Returns:
A Group with attributes.
Throws:
GroupNotFoundException - The group does not exist on the remote server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

addGroup

void addGroup(Group group)
              throws InvalidGroupException,
                     OperationFailedException
Adds a group to the remote Crowd server.

Parameters:
group - Group to add.
Throws:
InvalidGroupException - The group is invalid. This may be because a group of the same name already exists, or does not pass the server side validation rules.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

updateGroup

void updateGroup(Group group)
                 throws InvalidGroupException,
                        GroupNotFoundException,
                        OperationFailedException
Updates a group on the remote Crowd server.

Parameters:
group - Group to update.
Throws:
InvalidGroupException - The group is invalid. This may be because the group does not pass the server side validation rules.
GroupNotFoundException - The group does not exist on the remote server.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

storeGroupAttributes

void storeGroupAttributes(java.lang.String groupName,
                          java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
                          throws GroupNotFoundException,
                                 OperationFailedException
Stores the group's attributes on the remote Crowd server.

Parameters:
groupName - Name of the group.
attributes - Set of Attributes to store. Attributes will be added or if an attribute with the same key exists will be replaced.
Throws:
GroupNotFoundException - the group does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeGroupAttributes

void removeGroupAttributes(java.lang.String groupName,
                           java.lang.String attributeName)
                           throws GroupNotFoundException,
                                  OperationFailedException
Removes a group attribute (set) from the server. If the attribute to be removed does not exist, no error is reported.

Parameters:
groupName - Name of the group
attributeName - Attribute key.
Throws:
GroupNotFoundException - the group does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeGroup

void removeGroup(java.lang.String groupName)
                 throws GroupNotFoundException,
                        OperationFailedException
Removes a group from the remote Crowd server

Parameters:
groupName - Name of the group to remove.
Throws:
GroupNotFoundException - the group does not exist on the remote Crowd server
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

isUserDirectGroupMember

boolean isUserDirectGroupMember(java.lang.String username,
                                java.lang.String groupName)
                                throws OperationFailedException
Tests if a user is a direct member of a group.

Parameters:
username - User name
groupName - Group Name
Returns:
True if the member is a direct member of the group.
Throws:
UserNotFoundException - if the user does not exist.
GroupNotFoundException - if the group does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

isGroupDirectGroupMember

boolean isGroupDirectGroupMember(java.lang.String childName,
                                 java.lang.String parentName)
                                 throws OperationFailedException
Tests if a group is a direct member of a group.

Parameters:
childName - Name of the child group
parentName - Name of the Parent group
Returns:
True if the child group is a direct member of the parent group.
Throws:
GroupNotFoundException - if either group does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

addUserToGroup

void addUserToGroup(java.lang.String username,
                    java.lang.String groupName)
                    throws GroupNotFoundException,
                           UserNotFoundException,
                           OperationFailedException
Adds a user to a group.

Parameters:
username - Name of the user to add to the group.
groupName - Name of the group to be added to.
Throws:
GroupNotFoundException - if the group does not exist.
UserNotFoundException - if the user does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

addGroupToGroup

void addGroupToGroup(java.lang.String childGroup,
                     java.lang.String parentGroup)
                     throws GroupNotFoundException,
                            UserNotFoundException,
                            OperationFailedException
Adds a group to a group.

Parameters:
childGroup - Name of the group to add to the parent group.
parentGroup - Name of the group the child will be added to.
Throws:
GroupNotFoundException - if either group does not exist.
UserNotFoundException - if the user does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeUserFromGroup

void removeUserFromGroup(java.lang.String username,
                         java.lang.String groupName)
                         throws GroupNotFoundException,
                                UserNotFoundException,
                                OperationFailedException
Removes a user from a group.

Parameters:
username - Name of the user to add to the group.
groupName - Name of the group to be added to.
Throws:
GroupNotFoundException - if the group does not exist.
UserNotFoundException - if the user does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

removeGroupFromGroup

void removeGroupFromGroup(java.lang.String childGroup,
                          java.lang.String parentGroup)
                          throws GroupNotFoundException,
                                 OperationFailedException
Removes a group to a group.

Parameters:
childGroup - Name of the group to be removed from the parent group.
parentGroup - Name of the group the child group will be removed from.
Throws:
GroupNotFoundException - if either group does not exist.
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if for some reason the operation has failed

testConnection

boolean testConnection()
                       throws OperationFailedException
Tests if the connection is OK. This test uses a user search to validate the connection. It will fail if the application does not have permission to perform this very basic operation.

Returns:
true if the connection works.
Throws:
OperationFailedException - if the test fails.

searchUsers

java.util.List<User> searchUsers(SearchRestriction searchRestriction,
                                 int startIndex,
                                 int maxResults)
                                 throws OperationFailedException
Searches for users matching the following criteria.

Parameters:
searchRestriction - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of users satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

searchUserNames

java.util.List<java.lang.String> searchUserNames(SearchRestriction searchRestriction,
                                                 int startIndex,
                                                 int maxResults)
                                                 throws OperationFailedException
Searches for usernames matching the searchRestriction criteria.

Parameters:
searchRestriction - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of usernames satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

searchGroups

java.util.List<Group> searchGroups(SearchRestriction searchRestriction,
                                   int startIndex,
                                   int maxResults)
                                   throws OperationFailedException
Searches for groups matching the following criteria.

Parameters:
searchRestriction - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

searchGroupNames

java.util.List<java.lang.String> searchGroupNames(SearchRestriction searchRestriction,
                                                  int startIndex,
                                                  int maxResults)
                                                  throws OperationFailedException
Searches for group names matching the searchRestriction criteria.

Parameters:
searchRestriction - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getUsersOfGroup

java.util.List<User> getUsersOfGroup(java.lang.String groupName,
                                     int startIndex,
                                     int maxResults)
                                     throws OperationFailedException
Searches for users who are direct members of a group.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of users satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfUsersOfGroup

java.util.List<java.lang.String> getNamesOfUsersOfGroup(java.lang.String groupName,
                                                        int startIndex,
                                                        int maxResults)
                                                        throws OperationFailedException
Searches for users who are direct members of a group, returning the user names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of user names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getChildGroupsOfGroup

java.util.List<Group> getChildGroupsOfGroup(java.lang.String groupName,
                                            int startIndex,
                                            int maxResults)
                                            throws OperationFailedException
Searches for groups who are direct members of a group.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restrictions
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfChildGroupsOfGroup

java.util.List<java.lang.String> getNamesOfChildGroupsOfGroup(java.lang.String groupName,
                                                              int startIndex,
                                                              int maxResults)
                                                              throws OperationFailedException
Searches for groups who are direct members of a group, returning the group names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getGroupsForUser

java.util.List<Group> getGroupsForUser(java.lang.String userName,
                                       int startIndex,
                                       int maxResults)
                                       throws OperationFailedException
Searches for groups that a user is a direct member of.

Parameters:
userName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfGroupsForUser

java.util.List<java.lang.String> getNamesOfGroupsForUser(java.lang.String userName,
                                                         int startIndex,
                                                         int maxResults)
                                                         throws OperationFailedException
Searches for groups that a user is a direct member of, returning the group names.

Parameters:
userName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getParentGroupsForGroup

java.util.List<Group> getParentGroupsForGroup(java.lang.String groupName,
                                              int startIndex,
                                              int maxResults)
                                              throws OperationFailedException
Searches for groups that a group is a direct member of.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfParentGroupsForGroup

java.util.List<java.lang.String> getNamesOfParentGroupsForGroup(java.lang.String groupName,
                                                                int startIndex,
                                                                int maxResults)
                                                                throws OperationFailedException
Searches for groups that a group is a direct member of, returning the group names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNestedUsersOfGroup

java.util.List<User> getNestedUsersOfGroup(java.lang.String groupName,
                                           int startIndex,
                                           int maxResults)
                                           throws OperationFailedException
Searches for users who are nested members of a group.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of users satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfNestedUsersOfGroup

java.util.List<java.lang.String> getNamesOfNestedUsersOfGroup(java.lang.String groupName,
                                                              int startIndex,
                                                              int maxResults)
                                                              throws OperationFailedException
Searches for users who are nested members of a group, returning the user names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of user names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNestedChildGroupsOfGroup

java.util.List<Group> getNestedChildGroupsOfGroup(java.lang.String groupName,
                                                  int startIndex,
                                                  int maxResults)
                                                  throws OperationFailedException
Searches for groups who are nested members of a group.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfNestedChildGroupsOfGroup

java.util.List<java.lang.String> getNamesOfNestedChildGroupsOfGroup(java.lang.String groupName,
                                                                    int startIndex,
                                                                    int maxResults)
                                                                    throws OperationFailedException
Searches for groups who are nested members of a group, returning the group names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getGroupsForNestedUser

java.util.List<Group> getGroupsForNestedUser(java.lang.String userName,
                                             int startIndex,
                                             int maxResults)
                                             throws OperationFailedException
Searches for groups that a user is a nested member of.

Parameters:
userName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfGroupsForNestedUser

java.util.List<java.lang.String> getNamesOfGroupsForNestedUser(java.lang.String userName,
                                                               int startIndex,
                                                               int maxResults)
                                                               throws OperationFailedException
Searches for groups that a user is a nested member of, returning the group names.

Parameters:
userName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getParentGroupsForNestedGroup

java.util.List<Group> getParentGroupsForNestedGroup(java.lang.String groupName,
                                                    int startIndex,
                                                    int maxResults)
                                                    throws OperationFailedException
Searches for groups that a group is a nested member of.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of groups satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

getNamesOfParentGroupsForNestedGroup

java.util.List<java.lang.String> getNamesOfParentGroupsForNestedGroup(java.lang.String groupName,
                                                                      int startIndex,
                                                                      int maxResults)
                                                                      throws OperationFailedException
Searches for groups that a group is a nested member of, returning the group names.

Parameters:
groupName - restriction on the search
startIndex - starting index of the search results
maxResults - maximum number of results returned from the search
Returns:
List of group names satisfying the search restriction.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

findUserFromSSOToken

User findUserFromSSOToken(java.lang.String token)
                          throws OperationFailedException
Returns the user from the specified user token.

Parameters:
token - user token used to find the authenticated user.
Returns:
User associated with the token.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

authenticateSSOUser

java.lang.String authenticateSSOUser(UserAuthenticationContext userAuthenticationContext)
                                     throws OperationFailedException
Authenticates a Single-Sign-On (SSO) User.

Parameters:
userAuthenticationContext - the user's authentication details.
Returns:
SSO token if successful.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

authenticateSSOUserWithoutValidatingPassword

java.lang.String authenticateSSOUserWithoutValidatingPassword(UserAuthenticationContext userAuthenticationContext)
Authenticates a Single-Sign-On (SSO) User without validating password.

Parameters:
userAuthenticationContext - the user's authentication details.
Returns:
SSO token if successful.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

validateSSOAuthentication

void validateSSOAuthentication(java.lang.String token,
                               java.util.List<ValidationFactor> validationFactors)
                               throws OperationFailedException
Validates the SSO authentication. Throws InvalidAuthenticationException if the SSO authentication is not valid.

Parameters:
token - Crowd SSO token
validationFactors - Details of where the user's come from. If presented, must match those presented during authentication.
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason

invalidateSSOToken

void invalidateSSOToken(java.lang.String token)
                        throws OperationFailedException
Invalidates a token. If the token does not exist, the token should still return silently.

Parameters:
token - token to invalidate
Throws:
OperationFailedException - if the operation has failed for an unknown reason

getCookieConfiguration

CookieConfiguration getCookieConfiguration()
                                           throws OperationFailedException
Returns the cookie configuration.

Returns:
cookie configuration
Throws:
OperationNotPermittedException - if the application is not permitted to perform the requested operation on the server.
InvalidAuthenticationException - if the application and password are not valid.
OperationFailedException - if the operation has failed for an unknown reason


Copyright © 2010 Atlassian. All Rights Reserved.