Package com.atlassian.crowd.model.user
Class InternalUserWithAttributes
java.lang.Object
com.atlassian.crowd.model.EntityWithAttributes
com.atlassian.crowd.model.user.InternalUserWithAttributes
- All Implemented Interfaces:
Attributes,User,UserWithAttributes,DirectoryEntity,TimestampedEntity,TimestampedUser,User,UserWithAttributes,Comparable<User>,Principal
public class InternalUserWithAttributes
extends EntityWithAttributes
implements UserWithAttributes, TimestampedUser
Encapsulates the concept of user which has attributes.
-
Constructor Summary
ConstructorsConstructorDescriptionInternalUserWithAttributes(InternalUser user, Map<String, Set<String>> attributes) -
Method Summary
Modifier and TypeMethodDescriptionintCompareTo must be compatible with the equals() and hashCode() methodsbooleanImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().Returns the date the entity was created.longgetName()Returns the date the entity was last updated.inthashCode()Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().booleanisActive()Methods inherited from class com.atlassian.crowd.model.EntityWithAttributes
getKeys, getValue, getValues, isEmpty, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.crowd.embedded.api.Attributes
getKeys, getValue, getValues, isEmptyMethods inherited from interface com.atlassian.crowd.embedded.api.User
isMarkedAsDeleted
-
Constructor Details
-
InternalUserWithAttributes
-
InternalUserWithAttributes
-
-
Method Details
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceDirectoryEntity- Specified by:
getDirectoryIdin interfaceUser- Returns:
- id of the directory in which the DirectoryEntity is stored.
-
getName
- Specified by:
getNamein interfaceDirectoryEntity- Specified by:
getNamein interfacePrincipal- Returns:
- name of the entity.
-
isActive
public boolean isActive() -
getEmailAddress
- Specified by:
getEmailAddressin interfaceUser- Returns:
- email address of the user.
-
getFirstName
- Specified by:
getFirstNamein interfaceUser
-
getLastName
- Specified by:
getLastNamein interfaceUser
-
getDisplayName
- Specified by:
getDisplayNamein interfaceUser- Returns:
- display name (eg. full name) of the user, must never be null.
-
getInternalUser
-
getCredential
-
getExternalId
- Specified by:
getExternalIdin interfaceUser
-
getCreatedDate
Description copied from interface:TimestampedEntityReturns the date the entity was created.- Specified by:
getCreatedDatein interfaceTimestampedEntity- Returns:
- date the entity was created
-
getUpdatedDate
Description copied from interface:TimestampedEntityReturns the date the entity was last updated.- Specified by:
getUpdatedDatein interfaceTimestampedEntity- Returns:
- date the entity was last updated.
-
equals
Description copied from interface:DirectoryEntityImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equalsin interfaceDirectoryEntity- Specified by:
equalsin interfacePrincipal- Specified by:
equalsin interfaceUser- Overrides:
equalsin classObject- Parameters:
o- object to compare to.- Returns:
trueif and only if the directoryId and the lowercase names of the directory entities match.
-
hashCode
public int hashCode()Description copied from interface:DirectoryEntityImplementations must produce a hashcode based on getDirectoryId() and case-insensitive getName(). -
compareTo
Description copied from interface:UserCompareTo must be compatible with the equals() and hashCode() methods- Specified by:
compareToin interfaceComparable<User>- Specified by:
compareToin interfaceUser
-