com.atlassian.crowd.integration.atlassianuser
Class CrowdUserManager

java.lang.Object
  extended by com.atlassian.crowd.integration.atlassianuser.CrowdUserManager

public class CrowdUserManager
extends Object


Constructor Summary
CrowdUserManager()
           
 
Method Summary
 void alterPassword(User user, String password)
          Alters the password on the Crowd security server.
 User createUser(String name)
          Creates a user through the Crowd security server.
protected  List findAllPrincipalNames()
           
 Repository getRepository()
          Returns information about the respository implementation.
 Repository getRepository(Entity entity)
          Returns information about the respository for a specific entity.
 User getUser(String name)
          Gets a user from the Crowd security server.
 Pager getUserNames()
          Gets the username for the integrated application.
 Pager getUsers()
          Gets the users for the integrated application.
 void init(HashMap args)
          Used for configuration by a config.
 boolean isCreative()
           
 boolean isReadOnly(User user)
          Determins if the user is read only.
 void removeUser(User user)
          Removes a user from the Crowd security server.
 void saveUser(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()
Method Detail

getUsers

public Pager getUsers()
               throws EntityException
Gets the users for the integrated application.

Returns:
a Pager holding all users being managed.
Throws:
EntityException

getUserNames

public Pager getUserNames()
                   throws EntityException
Gets the username for the integrated application.

Returns:
a Pager holding the names of all users being managed.
Throws:
EntityException

getUser

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

Parameters:
name - The username to lookup.
Returns:
- a null or a User if one could be found.
Throws:
EntityException - - representing a system error.

createUser

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

Parameters:
name - The username.
Returns:
a User object.
Throws:
EntityException - - representing a system error
UnsupportedOperationException - - if UserManager#isCreative() returns false.

alterPassword

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

Parameters:
user - The user.
password - The new password.
Throws:
EntityException - - representing a system error.
UnsupportedOperationException - - if UserManager#isCreative() returns false.

saveUser

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

Parameters:
user - The user to update.
Throws:
EntityException - - representing a system error.
UnsupportedOperationException - - if UserManager#isCreative() returns false.

removeUser

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

Parameters:
user - The user to remove.
Throws:
EntityException - - representing a system error.
UnsupportedOperationException - - if UserManager#isReadOnly(User) returns true.

isReadOnly

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

Parameters:
user - The user to check.
Returns:
true indicates that information on the user object cannot be altered in the storage system (see com.atlassian.user.repository.Repository), false indicates that the storage system will save changes or that this UserManager does not know about the User.
Throws:
EntityException

getRepository

public Repository getRepository()
Returns information about the respository implementation.

Returns:
The repository configuration.

getRepository

public Repository getRepository(Entity entity)
                         throws EntityException
Returns information about the respository for a specific entity.

Parameters:
entity - The entity.
Returns:
The repository configuration.
Throws:
EntityException

isCreative

public boolean isCreative()

init

public void init(HashMap args)
          throws ConfigurationException
Used for configuration by a config. file.

Parameters:
args -
Throws:
ConfigurationException

findAllPrincipalNames

protected List findAllPrincipalNames()
                              throws InvalidAuthorizationTokenException,
                                     RemoteException
Throws:
InvalidAuthorizationTokenException
RemoteException


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.