com.atlassian.crowd.integration.atlassianuser
Class CrowdUser

java.lang.Object
  extended by com.atlassian.user.impl.DefaultEntity
      extended by com.atlassian.user.impl.DefaultUser
          extended by com.atlassian.crowd.integration.atlassianuser.CrowdUser
All Implemented Interfaces:
com.atlassian.user.Entity, com.atlassian.user.User, Serializable, Principal

public class CrowdUser
extends com.atlassian.user.impl.DefaultUser

Keeps a reference to the external Crowd principal. Lazy loads attrbutes as queried by the integrated application.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.user.impl.DefaultUser
email, fullName, password
 
Fields inherited from class com.atlassian.user.impl.DefaultEntity
created, name
 
Constructor Summary
CrowdUser()
          This constructor will be called upon deserialisation of a CrowdUser.
CrowdUser(SOAPPrincipal principal, UserManager userManager)
           
CrowdUser(String name, UserManager userManager)
          Creates a CrowdUser that only contains a username.
 
Method Summary
protected  void fetchPrincipal()
          Downloads the principal object from the Crowd security server (or cache).
 String getEmail()
          Gets the email of the principal.
 String getFullName()
          Gets the fullname of the principal.
protected  String[] getPropertyValues(String key)
          Gets a specific attribute from the Crowd security server.
protected  void processEmail()
          Processes the server attributes and constructs an email for a principal.
 
Methods inherited from class com.atlassian.user.impl.DefaultUser
equals, getPassword, hashCode, setEmail, setFullName, setPassword, toString
 
Methods inherited from class com.atlassian.user.impl.DefaultEntity
getCreated, getName, setCreated, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.user.Entity
getName
 
Methods inherited from interface java.security.Principal
getName
 

Constructor Detail

CrowdUser

public CrowdUser()
This constructor will be called upon deserialisation of a CrowdUser.


CrowdUser

public CrowdUser(String name,
                 UserManager userManager)
Creates a CrowdUser that only contains a username. Will lazy-load the user from the server if needs be.

Parameters:
name -
userManager -

CrowdUser

public CrowdUser(SOAPPrincipal principal,
                 UserManager userManager)
Method Detail

getFullName

public String getFullName()
Gets the fullname of the principal.

Specified by:
getFullName in interface com.atlassian.user.User
Overrides:
getFullName in class com.atlassian.user.impl.DefaultUser
Returns:
The fullname.

getEmail

public String getEmail()
Gets the email of the principal.

Specified by:
getEmail in interface com.atlassian.user.User
Overrides:
getEmail in class com.atlassian.user.impl.DefaultUser
Returns:
The email.

processEmail

protected void processEmail()
Processes the server attributes and constructs an email for a principal.


getPropertyValues

protected String[] getPropertyValues(String key)
Gets a specific attribute from the Crowd security server.

Parameters:
key - The attribute to lookup.
Returns:
The values for the key.

fetchPrincipal

protected void fetchPrincipal()
Downloads the principal object from the Crowd security server (or cache).



Copyright © 2013 Atlassian. All Rights Reserved.