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 TypeMethodDescriptionint
CompareTo must be compatible with the equals() and hashCode() methodsboolean
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().Returns the date the entity was created.long
getName()
Returns the date the entity was last updated.int
hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().boolean
isActive()
Methods inherited from class com.atlassian.crowd.model.EntityWithAttributes
getKeys, getValue, getValues, isEmpty, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.embedded.api.Attributes
getKeys, getValue, getValues, isEmpty
Methods inherited from interface com.atlassian.crowd.embedded.api.User
isMarkedAsDeleted
-
Constructor Details
-
InternalUserWithAttributes
-
InternalUserWithAttributes
-
-
Method Details
-
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.
-
isActive
public boolean isActive() -
getEmailAddress
- Specified by:
getEmailAddress
in interfaceUser
- Returns:
- email address of the user.
-
getFirstName
- Specified by:
getFirstName
in interfaceUser
-
getLastName
- Specified by:
getLastName
in interfaceUser
-
getDisplayName
- Specified by:
getDisplayName
in interfaceUser
- Returns:
- display name (eg. full name) of the user, must never be null.
-
getInternalUser
-
getCredential
-
getExternalId
- Specified by:
getExternalId
in interfaceUser
-
getCreatedDate
Description copied from interface:TimestampedEntity
Returns the date the entity was created.- Specified by:
getCreatedDate
in interfaceTimestampedEntity
- Returns:
- date the entity was created
-
getUpdatedDate
Description copied from interface:TimestampedEntity
Returns the date the entity was last updated.- Specified by:
getUpdatedDate
in interfaceTimestampedEntity
- Returns:
- date the entity was last updated.
-
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
-