|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.embedded.impl.ImmutableUser
public class ImmutableUser
A general purpose immutable implementation of the User interface. Note: This object does not allow null username or directoryId.
| Nested Class Summary | |
|---|---|
static class |
ImmutableUser.Builder
Used to aid in the construction of an Immutable User object. |
| Constructor Summary | |
|---|---|
ImmutableUser(long directoryId,
String name,
String displayName,
String emailAddress,
boolean active)
|
|
| Method Summary | |
|---|---|
int |
compareTo(User other)
CompareTo must be compatible with the equals() and hashCode() methods |
boolean |
equals(Object o)
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName(). |
long |
getDirectoryId()
|
String |
getDisplayName()
|
String |
getEmailAddress()
|
String |
getName()
|
int |
hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName(). |
boolean |
isActive()
|
static ImmutableUser.Builder |
newUser()
|
static ImmutableUser.Builder |
newUser(User user)
Creates a new User Builder by cloning the values from the supplied User. |
| 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 |
|---|
public ImmutableUser(long directoryId,
@NotNull
String name,
String displayName,
String emailAddress,
boolean active)
| Method Detail |
|---|
public boolean isActive()
isActive in interface Usertrue if and only if the user is allowed to authenticate.public long getDirectoryId()
getDirectoryId in interface Userpublic String getName()
getName in interface Principalpublic String getEmailAddress()
getEmailAddress in interface Userpublic String getDisplayName()
getDisplayName in interface Userpublic boolean equals(Object o)
User
equals in interface Userequals in interface Principalequals in class Objecto - object to compare to.
true if and only if the directoryId
and name.toLowerCase() of the directory entities match.public int hashCode()
User
hashCode in interface UserhashCode in interface PrincipalhashCode in class Objectpublic int compareTo(User other)
User
compareTo in interface UsercompareTo in interface Comparable<User>public static ImmutableUser.Builder newUser()
public static ImmutableUser.Builder newUser(User user)
user - user to be cloned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||