com.atlassian.crowd.integration.atlassianuser
Class CrowdUserManager

java.lang.Object
  extended by com.atlassian.crowd.integration.atlassianuser.CrowdUserManager
All Implemented Interfaces:
com.atlassian.user.EntityManager, com.atlassian.user.UserManager

public class CrowdUserManager
extends java.lang.Object
implements com.atlassian.user.UserManager


Constructor Summary
CrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)
           
CrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier, UserManager userManager)
           
 
Method Summary
 void alterPassword(com.atlassian.user.User user, java.lang.String password)
          Alters the password on the Crowd security server.
protected  void buildAttribute(java.lang.String key, java.lang.String value, java.util.List attributes)
           
protected  java.util.List convertStringsToUsers(java.util.List userNames)
           
protected  SOAPPrincipal convertUserToSOAPPrincipal(com.atlassian.user.User user)
           
 com.atlassian.user.User createUser(java.lang.String name)
          Creates a user through the Crowd security server.
 com.atlassian.user.repository.RepositoryIdentifier getIdentifier()
          Returns information about the respository implementation.
 com.atlassian.user.repository.RepositoryIdentifier getRepository(com.atlassian.user.Entity entity)
          Returns information about the respository for a specific entity.
 com.atlassian.user.User getUser(java.lang.String name)
          Gets a user from the Crowd security server.
 com.atlassian.user.search.page.Pager getUserNames()
          Gets the username for the integrated application.
 com.atlassian.user.search.page.Pager getUsers()
          Gets the users for the integrated application.
 boolean isCreative()
           
 boolean isReadOnly(com.atlassian.user.User user)
          Determines if the user is read only.
 void removeUser(com.atlassian.user.User user)
          Removes a user from the Crowd security server.
 void saveUser(com.atlassian.user.User user)
          Updates the Principal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrowdUserManager

public CrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)

CrowdUserManager

public CrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier,
                        UserManager userManager)
Method Detail

getUsers

public com.atlassian.user.search.page.Pager getUsers()
                                              throws com.atlassian.user.EntityException
Gets the users for the integrated application.

Specified by:
getUsers in interface com.atlassian.user.UserManager
Returns:
a Pager holding all users being managed.
Throws:
com.atlassian.user.EntityException

convertStringsToUsers

protected java.util.List convertStringsToUsers(java.util.List userNames)

getUserNames

public com.atlassian.user.search.page.Pager getUserNames()
                                                  throws com.atlassian.user.EntityException
Gets the username for the integrated application.

Specified by:
getUserNames in interface com.atlassian.user.UserManager
Returns:
a Pager holding the names of all users being managed.
Throws:
com.atlassian.user.EntityException

getUser

public com.atlassian.user.User getUser(java.lang.String name)
                                throws com.atlassian.user.EntityException
Gets a user from the Crowd security server.

Specified by:
getUser in interface com.atlassian.user.UserManager
Parameters:
name - The username to lookup.
Returns:
- a null or a User if one could be found.
Throws:
com.atlassian.user.EntityException - - representing a system error.

createUser

public com.atlassian.user.User createUser(java.lang.String name)
                                   throws com.atlassian.user.EntityException
Creates a user through the Crowd security server.

Specified by:
createUser in interface com.atlassian.user.UserManager
Parameters:
name - The username.
Returns:
a User object.
Throws:
com.atlassian.user.EntityException - - representing a system error
java.lang.UnsupportedOperationException - - if EntityManager.isCreative() returns false.

alterPassword

public void alterPassword(com.atlassian.user.User user,
                          java.lang.String password)
                   throws com.atlassian.user.EntityException
Alters the password on the Crowd security server.

Specified by:
alterPassword in interface com.atlassian.user.UserManager
Parameters:
user - The user.
password - The new password.
Throws:
com.atlassian.user.EntityException - - representing a system error.
java.lang.UnsupportedOperationException - - if EntityManager.isCreative() returns false.

saveUser

public void saveUser(com.atlassian.user.User user)
              throws com.atlassian.user.EntityException
Updates the Principal. Crowd does not currently support this method.

Specified by:
saveUser in interface com.atlassian.user.UserManager
Parameters:
user - The user to update.
Throws:
com.atlassian.user.EntityException - - representing a system error.
java.lang.UnsupportedOperationException - - if EntityManager.isCreative() returns false.

convertUserToSOAPPrincipal

protected SOAPPrincipal convertUserToSOAPPrincipal(com.atlassian.user.User user)

buildAttribute

protected void buildAttribute(java.lang.String key,
                              java.lang.String value,
                              java.util.List attributes)

removeUser

public void removeUser(com.atlassian.user.User user)
                throws com.atlassian.user.EntityException
Removes a user from the Crowd security server.

Specified by:
removeUser in interface com.atlassian.user.UserManager
Parameters:
user - The user to remove.
Throws:
com.atlassian.user.EntityException - - representing a system error.
java.lang.UnsupportedOperationException - - if UserManager.isReadOnly(User) returns true.

isReadOnly

public boolean isReadOnly(com.atlassian.user.User user)
                   throws com.atlassian.user.EntityException
Determines if the user is read only. Always returns false.

Specified by:
isReadOnly in interface com.atlassian.user.UserManager
Parameters:
user - The user to check.
Returns:
true indicates that information on the user object cannot be altered in the storage system false indicates that the storage system will save changes or that this UserManager does not know about the User.
Throws:
com.atlassian.user.EntityException

getIdentifier

public com.atlassian.user.repository.RepositoryIdentifier getIdentifier()
Returns information about the respository implementation.

Specified by:
getIdentifier in interface com.atlassian.user.EntityManager
Returns:
The repository configuration.

getRepository

public com.atlassian.user.repository.RepositoryIdentifier getRepository(com.atlassian.user.Entity entity)
                                                                 throws com.atlassian.user.EntityException
Returns information about the respository for a specific entity.

Specified by:
getRepository in interface com.atlassian.user.EntityManager
Parameters:
entity - The entity.
Returns:
The repository configuration.
Throws:
com.atlassian.user.EntityException

isCreative

public boolean isCreative()
Specified by:
isCreative in interface com.atlassian.user.EntityManager


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.