|
||||||||||
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,
java.lang.String name,
java.lang.String displayName,
java.lang.String emailAddress,
boolean active)
|
Method Summary | |
---|---|
int |
compareTo(User other)
CompareTo must be compatible with the equals() and hashCode() methods |
boolean |
equals(java.lang.Object o)
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName(). |
long |
getDirectoryId()
|
java.lang.String |
getDisplayName()
|
java.lang.String |
getEmailAddress()
|
java.lang.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 java.lang.String name, java.lang.String displayName, java.lang.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 java.lang.String getName()
getName
in interface java.security.Principal
public java.lang.String getEmailAddress()
getEmailAddress
in interface User
public java.lang.String getDisplayName()
getDisplayName
in interface User
public boolean equals(java.lang.Object o)
User
equals
in interface User
equals
in interface java.security.Principal
equals
in class java.lang.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 java.security.Principal
hashCode
in class java.lang.Object
public int compareTo(User other)
User
compareTo
in interface User
compareTo
in interface java.lang.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 |