|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.service.cache.CachingUserManager
public class CachingUserManager
| Constructor Summary | |
|---|---|
CachingUserManager(SecurityServerClient securityServerClient,
BasicCache basicCache)
|
|
| Method Summary | |
|---|---|
void |
addAllUsers(java.util.Collection<SOAPPrincipalWithCredential> users)
Adds all users to Crowd. |
SOAPPrincipal |
addUser(SOAPPrincipal user,
PasswordCredential credential)
Adds a user to Crowd. |
java.util.List |
getAllUserNames()
This optimises the background getAllUserNames() call. |
SOAPPrincipal |
getUser(java.lang.String userName)
Given a userName, fetches the user's details, either from cache or from the Crowd server. |
SOAPPrincipal |
getUserFromToken(java.lang.String token)
Note: the lookup is not currently cached - it will always hit the server. |
SOAPPrincipal |
getUserWithAttributes(java.lang.String userName)
Given a userName, fetches the user's details and their associated attributes, either from cache or from the Crowd server. |
boolean |
isUser(java.lang.String userName)
With JIRA we're guaranteed that if there are any names in the user list, all the names are in the user list. |
void |
removeUser(java.lang.String userName)
Removes a user from Crowd. |
java.util.List |
searchUsers(SearchRestriction[] restrictions)
Searches the list of all available users based on the passed-in restrictions and returns a list
of users that match. |
void |
updatePassword(java.lang.String userName,
PasswordCredential credential)
Changes the password for the user specified by userName. |
void |
updateUser(SOAPPrincipal user)
Updates a user's details in Crowd. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingUserManager(SecurityServerClient securityServerClient,
BasicCache basicCache)
| Method Detail |
|---|
public SOAPPrincipal getUser(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
UserNotFoundException,
InvalidAuthenticationException
UserManageruserName, fetches the user's details, either from cache or from the Crowd server.
getUser in interface UserManageruserName - The user's identifier
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
UserNotFoundException - Could not find the user.
InvalidAuthenticationException - if the application name/password combination is invalid
public SOAPPrincipal getUserWithAttributes(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
UserNotFoundException,
InvalidAuthenticationException
UserManageruserName, fetches the user's details and their associated attributes, either from cache or from the Crowd server.
getUserWithAttributes in interface UserManageruserName - The user's identifier
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
UserNotFoundException - Could not find the user.
InvalidAuthenticationException - if the application name/password combination is invalid
public SOAPPrincipal getUserFromToken(java.lang.String token)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidTokenException,
InvalidAuthenticationException
getUserFromToken in interface UserManagertoken - The token presented by the client browser to the webserver.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidTokenException - The token presented was not a valid Crowd token.
InvalidAuthenticationException - if the application name/password combination is invalid
public java.util.List searchUsers(SearchRestriction[] restrictions)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException
UserManagerrestrictions and returns a list
of users that match.
searchUsers in interface UserManagerrestrictions - search restrictions
List of SOAPPrincipals that match the criteria.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - if the application name/password combination is invalid
public SOAPPrincipal addUser(SOAPPrincipal user,
PasswordCredential credential)
throws java.rmi.RemoteException,
ApplicationPermissionException,
InvalidCredentialException,
InvalidUserException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException
UserManager
addUser in interface UserManageruser - The user to add to Crowdcredential - The credential (eg. password) for the user. May be null.
SOAPPrincipal, as returned by the Crowd server.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
ApplicationPermissionException - The application does not have rights to add users.
InvalidCredentialException - The credentials were malformed or did not meet directory complexity
requirements.
InvalidUserException - The user was malformed or already exists.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - if the application name/password combination is invalid
public void addAllUsers(java.util.Collection<SOAPPrincipalWithCredential> users)
throws InvalidAuthorizationTokenException,
BulkAddFailedException,
java.rmi.RemoteException,
ApplicationPermissionException,
InvalidAuthenticationException
UserManager
addAllUsers in interface UserManagerusers - The users to add to Crowd
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
BulkAddFailedException - Thrown if it failed to create a user in of the directories.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
ApplicationPermissionException - The application does not have rights to add users.
InvalidAuthenticationException - if the application name/password combination is invalid
public void updateUser(SOAPPrincipal user)
throws java.rmi.RemoteException,
ApplicationPermissionException,
InvalidAuthorizationTokenException,
UserNotFoundException,
InvalidAuthenticationException
UserManager
updateUser in interface UserManageruser - The user to update
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
ApplicationPermissionException - This application does not have the rights to update the user.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
UserNotFoundException - The user to update could not be found.
InvalidAuthenticationException - if the application name/password combination is invalid
public void updatePassword(java.lang.String userName,
PasswordCredential credential)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidCredentialException,
ApplicationPermissionException,
UserNotFoundException,
InvalidAuthenticationException
UserManageruserName.
updatePassword in interface UserManageruserName - The identifier of the usercredential - The new credentials for the user.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidCredentialException - The credentials were malformed or did not meet directory complexity
requirements.
ApplicationPermissionException - This application does not have the rights to update the user's password.
UserNotFoundException - The user could not be found in any directory mapped to this application.
InvalidAuthenticationException - if the application name/password combination is invalid
public void removeUser(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ApplicationPermissionException,
UserNotFoundException,
InvalidAuthenticationException
UserManager
removeUser in interface UserManageruserName - The name of the user to remove.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ApplicationPermissionException - This application is not allowed to remove this user.
UserNotFoundException - The user to remove could not be found.
InvalidAuthenticationException - if the application name/password combination is invalid
public java.util.List getAllUserNames()
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException
getAllUserNames in interface UserManagerList of Strings that list all the users visible to this application.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - if the application name/password combination is invalid
public boolean isUser(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException
isUser in interface UserManageruserName - name of the user
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - if the application name/password combination is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||