|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 User
true if and only if the user is allowed to authenticate.
public long getDirectoryId()
getDirectoryId
in interface User
public String getName()
getName
in interface Principal
public String getEmailAddress()
getEmailAddress
in interface User
public String getDisplayName()
getDisplayName
in interface User
public boolean equals(Object o)
User
equals
in interface User
equals
in interface Principal
equals
in class Object
o
- 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 User
hashCode
in interface Principal
hashCode
in class Object
public int compareTo(User other)
User
compareTo
in interface User
compareTo
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 |