Class DelegatingUserWithAttributes
java.lang.Object
com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
com.atlassian.crowd.embedded.impl.DelegatingUserWithAttributes
- All Implemented Interfaces:
Attributes
,User
,UserWithAttributes
,Comparable<User>
,Principal
- Direct Known Subclasses:
DelegatingUserWithAttributes
public class DelegatingUserWithAttributes
extends AbstractDelegatingEntityWithAttributes
implements UserWithAttributes
Implementation of UserWithAttributes that simply delegates to an underlying User and Attributes object.
Instances of this class will be effectively immutable so long as either:
- It is constructed with immutable objects.
- Or, the mutable objects it is constructed with are not "leaked".
-
Constructor Summary
Constructors -
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()
Methods inherited from class com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
getKeys, getValue, getValues, isEmpty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, 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
-
DelegatingUserWithAttributes
-
-
Method Details
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryId
in interfaceUser
- Returns:
- id of the directory in which the User is stored.
-
isActive
public boolean isActive() -
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.
-
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
-
getName
-
equals
Description copied from interface:User
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName(). -
hashCode
public int hashCode()Description copied from interface:User
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().
-