Package com.atlassian.crowd.model.user
Class BaseImmutableUser
java.lang.Object
com.atlassian.crowd.model.user.BaseImmutableUser
- All Implemented Interfaces:
User
,DirectoryEntity
,User
,Serializable
,Comparable<User>
,Principal
- Direct Known Subclasses:
ImmutableTimestampedUser
,ImmutableTimestampedUserWithAttributes
,ImmutableUser
,ImmutableUserWithAttributes
- See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionBaseImmutableUser
(long directoryId, String name, String displayName, String emailAddress, boolean active, String firstName, String lastName, String externalId) protected
BaseImmutableUser
(BaseImmutableUser.Builder<? extends BaseImmutableUser> builder) -
Method Summary
Modifier and TypeMethodDescriptionint
CompareTo must be compatible with the equals() and hashCode() methodsboolean
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().long
getName()
int
hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().boolean
isActive()
toString()
abstract BaseImmutableUser
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.embedded.api.User
isMarkedAsDeleted
-
Constructor Details
-
BaseImmutableUser
-
BaseImmutableUser
-
-
Method Details
-
isActive
public boolean isActive() -
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryId
in interfaceDirectoryEntity
- Specified by:
getDirectoryId
in interfaceUser
- Returns:
- id of the directory in which the DirectoryEntity is stored.
-
getName
- Specified by:
getName
in interfaceDirectoryEntity
- Specified by:
getName
in interfacePrincipal
- Returns:
- name of the entity.
-
getEmailAddress
- Specified by:
getEmailAddress
in interfaceUser
- Returns:
- email address of the user.
-
getDisplayName
- Specified by:
getDisplayName
in interfaceUser
- Returns:
- display name (eg. full name) of the user, must never be null.
-
getFirstName
- Specified by:
getFirstName
in interfaceUser
-
getLastName
- Specified by:
getLastName
in interfaceUser
-
getExternalId
- Specified by:
getExternalId
in interfaceUser
-
equals
Description copied from interface:DirectoryEntity
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equals
in interfaceDirectoryEntity
- Specified by:
equals
in interfacePrincipal
- Specified by:
equals
in interfaceUser
- Overrides:
equals
in classObject
- 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(). -
compareTo
Description copied from interface:User
CompareTo must be compatible with the equals() and hashCode() methods- Specified by:
compareTo
in interfaceComparable<User>
- Specified by:
compareTo
in interfaceUser
-
withName
-
toString
-