com.atlassian.crowd.integration.rest.entity
Class UserEntity

java.lang.Object
  extended by com.atlassian.crowd.integration.rest.entity.UserEntity
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.Attributes, com.atlassian.crowd.embedded.api.User, com.atlassian.crowd.embedded.api.UserWithAttributes, DirectoryEntity, Comparable<com.atlassian.crowd.embedded.api.User>, Principal

public class UserEntity
extends Object
implements UserWithAttributes

Represents a User entity (client side).

Since:
v2.1

Constructor Summary
UserEntity(String name, String firstName, String lastName, String displayName, String emailAddress, PasswordEntity password, boolean active)
           
UserEntity(String name, String firstName, String lastName, String displayName, String emailAddress, PasswordEntity password, boolean active, String key)
           
 
Method Summary
 int compareTo(com.atlassian.crowd.embedded.api.User user)
           
 boolean equals(Object o)
           
 MultiValuedAttributeEntityList getAttributes()
           
 long getDirectoryId()
          Deprecated. this method has never returned the directoryId and its existence violates the directory encapsulation. It will be removed in future versions.
 String getDisplayName()
           
 String getEmailAddress()
           
 String getExternalId()
          The user key at the server is the externalId at the client.
 String getFirstName()
           
 Set<String> getKeys()
           
 String getLastName()
           
 String getName()
           
 PasswordEntity getPassword()
           
 String getValue(String key)
           
 Set<String> getValues(String key)
           
 int hashCode()
           
 boolean isActive()
           
 boolean isEmpty()
           
static UserEntity newMinimalInstance(String username)
          Creates a new minimal user instance.
 void setAttributes(MultiValuedAttributeEntityList attributes)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserEntity

public UserEntity(String name,
                  String firstName,
                  String lastName,
                  String displayName,
                  String emailAddress,
                  PasswordEntity password,
                  boolean active,
                  String key)

UserEntity

public UserEntity(String name,
                  String firstName,
                  String lastName,
                  String displayName,
                  String emailAddress,
                  PasswordEntity password,
                  boolean active)
Method Detail

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface com.atlassian.crowd.embedded.api.User

getFirstName

public String getFirstName()

getLastName

public String getLastName()

getEmailAddress

public String getEmailAddress()
Specified by:
getEmailAddress in interface com.atlassian.crowd.embedded.api.User

getPassword

public PasswordEntity getPassword()

isActive

public boolean isActive()
Specified by:
isActive in interface com.atlassian.crowd.embedded.api.User

getName

public String getName()
Specified by:
getName in interface DirectoryEntity
Specified by:
getName in interface Principal

setAttributes

public void setAttributes(MultiValuedAttributeEntityList attributes)

getAttributes

public MultiValuedAttributeEntityList getAttributes()

getValues

public Set<String> getValues(String key)
Specified by:
getValues in interface com.atlassian.crowd.embedded.api.Attributes

getValue

public String getValue(String key)
Specified by:
getValue in interface com.atlassian.crowd.embedded.api.Attributes

getKeys

public Set<String> getKeys()
Specified by:
getKeys in interface com.atlassian.crowd.embedded.api.Attributes

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface com.atlassian.crowd.embedded.api.Attributes

getDirectoryId

@Deprecated
public long getDirectoryId()
Deprecated. this method has never returned the directoryId and its existence violates the directory encapsulation. It will be removed in future versions.

Specified by:
getDirectoryId in interface com.atlassian.crowd.embedded.api.User
Specified by:
getDirectoryId in interface DirectoryEntity
Returns:
always 0

compareTo

public int compareTo(com.atlassian.crowd.embedded.api.User user)
Specified by:
compareTo in interface com.atlassian.crowd.embedded.api.User
Specified by:
compareTo in interface Comparable<com.atlassian.crowd.embedded.api.User>

getExternalId

public String getExternalId()
The user key at the server is the externalId at the client.


equals

public boolean equals(Object o)
Specified by:
equals in interface com.atlassian.crowd.embedded.api.User
Specified by:
equals in interface DirectoryEntity
Specified by:
equals in interface Principal
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface com.atlassian.crowd.embedded.api.User
Specified by:
hashCode in interface DirectoryEntity
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object

newMinimalInstance

public static UserEntity newMinimalInstance(String username)
Creates a new minimal user instance.

Parameters:
username - username for the user
Returns:
minimal user instance


Copyright © 2014 Atlassian. All Rights Reserved.