com.atlassian.crowd.integration.atlassianuser
Class DirectCrowdUserManager

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

public class DirectCrowdUserManager
extends AbstractCrowdUserManager


Field Summary
protected  com.atlassian.crowd.service.client.CrowdClient crowdClient
           
 
Constructor Summary
DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)
           
DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier, com.atlassian.crowd.service.client.CrowdClient crowdClient)
           
 
Method Summary
 void alterPassword(com.atlassian.user.User user, java.lang.String password)
          Alters the password on the Crowd security server.
 com.atlassian.user.User createUser(java.lang.String name)
          Creates a user through the Crowd security server.
 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.
 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 com.atlassian.crowd.integration.atlassianuser.AbstractCrowdUserManager
getIdentifier, getRepository, isCreative, isReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crowdClient

protected final com.atlassian.crowd.service.client.CrowdClient crowdClient
Constructor Detail

DirectCrowdUserManager

public DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier,
                              com.atlassian.crowd.service.client.CrowdClient crowdClient)

DirectCrowdUserManager

public DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)
Method Detail

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.

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.

getUsers

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

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

getUserNames

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

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.

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.

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.

saveUser

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

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

removeUser

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

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


Copyright © 2011 Atlassian. All Rights Reserved.