com.atlassian.crowd.embedded.impl
Class ImmutableUser
java.lang.Object
com.atlassian.crowd.embedded.impl.ImmutableUser
- All Implemented Interfaces:
- User, java.io.Serializable, java.lang.Comparable<User>, java.security.Principal
public class ImmutableUser
- extends java.lang.Object
- implements User, java.io.Serializable
A general purpose immutable implementation of the User interface.
Note: This object does not allow null username or directoryId.
- See Also:
- Serialized Form
|
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)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.security.Principal |
toString |
ImmutableUser
public ImmutableUser(long directoryId,
@NotNull
java.lang.String name,
java.lang.String displayName,
java.lang.String emailAddress,
boolean active)
isActive
public boolean isActive()
- Specified by:
isActive in interface User
getDirectoryId
public long getDirectoryId()
- Specified by:
getDirectoryId in interface User
getName
public java.lang.String getName()
- Specified by:
getName in interface java.security.Principal
getEmailAddress
public java.lang.String getEmailAddress()
- Specified by:
getEmailAddress in interface User
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface User
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface User- Specified by:
equals in interface java.security.Principal- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface User- Specified by:
hashCode in interface java.security.Principal- Overrides:
hashCode in class java.lang.Object
compareTo
public int compareTo(User other)
- Specified by:
compareTo in interface User- Specified by:
compareTo in interface java.lang.Comparable<User>
newUser
public static ImmutableUser.Builder newUser()
newUser
public static ImmutableUser.Builder newUser(User user)
- Creates a new User Builder by cloning the values from the supplied User.
- Parameters:
user - user to be cloned.
- Returns:
- a User Builder containing the values from the supplied User.
Copyright © 2012 Atlassian. All Rights Reserved.