com.atlassian.crowd.model.user
Class ImmutableUser

java.lang.Object
  extended by com.atlassian.crowd.model.user.ImmutableUser
All Implemented Interfaces:
User, DirectoryEntity, Comparable<User>, Principal

public final class ImmutableUser
extends Object
implements User


Constructor Summary
ImmutableUser(long directoryId, String name, String displayName, String emailAddress, boolean active, String firstName, String lastName, String externalId)
           
ImmutableUser(User user)
           
 
Method Summary
 int compareTo(User user)
           
 boolean equals(Object o)
          Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().
 long getDirectoryId()
           
 String getDisplayName()
           
 String getEmailAddress()
           
 String getExternalId()
           
 String getFirstName()
           
 String getLastName()
           
 String getName()
           
 int hashCode()
          Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().
 boolean isActive()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Constructor Detail

ImmutableUser

public ImmutableUser(User user)

ImmutableUser

public ImmutableUser(long directoryId,
                     String name,
                     String displayName,
                     String emailAddress,
                     boolean active,
                     String firstName,
                     String lastName,
                     String externalId)
Method Detail

isActive

public boolean isActive()
Specified by:
isActive in interface User

getDirectoryId

public long getDirectoryId()
Specified by:
getDirectoryId in interface User
Specified by:
getDirectoryId in interface DirectoryEntity
Returns:
id of the directory in which the DirectoryEntity is stored.

getName

public String getName()
Specified by:
getName in interface DirectoryEntity
Specified by:
getName in interface Principal
Returns:
name of the entity.

getEmailAddress

public String getEmailAddress()
Specified by:
getEmailAddress in interface User

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface User

getFirstName

public String getFirstName()

getLastName

public String getLastName()

getExternalId

public String getExternalId()

equals

public boolean equals(Object o)
Description copied from interface: DirectoryEntity
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().

Specified by:
equals in interface User
Specified by:
equals in interface DirectoryEntity
Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
o - object to compare to.
Returns:
true if and only if the directoryId and the lowercase names of the directory entities match.

hashCode

public int hashCode()
Description copied from interface: DirectoryEntity
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().

Specified by:
hashCode in interface User
Specified by:
hashCode in interface DirectoryEntity
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
hashcode.

compareTo

public int compareTo(User user)
Specified by:
compareTo in interface User
Specified by:
compareTo in interface Comparable<User>


Copyright © 2013 Atlassian. All Rights Reserved.