com.atlassian.crowd.embedded.api
Interface User

All Superinterfaces:
Comparable<User>, Principal
All Known Subinterfaces:
TimestampedUser, User, UserWithAttributes, UserWithAttributes
All Known Implementing Classes:
DelegatingUserWithAttributes, DelegatingUserWithAttributes, DemoUser, ImmutableUser, ImmutableUser, InternalUser, InternalUserWithAttributes, LDAPUserWithAttributes, UserEntity, UserTemplate, UserTemplateWithAttributes, UserTemplateWithCredentialAndAttributes

public interface User
extends Comparable<User>, Principal

Represents a user.


Method Summary
 int compareTo(User user)
          CompareTo must be compatible with the equals() and hashCode() methods
 boolean equals(Object o)
          Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().
 long getDirectoryId()
           
 String getDisplayName()
           
 String getEmailAddress()
           
 int hashCode()
          Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().
 boolean isActive()
           
 
Methods inherited from interface java.security.Principal
getName, toString
 

Method Detail

getDirectoryId

long getDirectoryId()
Returns:
id of the directory in which the User is stored.

isActive

boolean isActive()
Returns:
true if and only if the user is allowed to authenticate.

getEmailAddress

String getEmailAddress()
Returns:
email address of the user.

getDisplayName

String getDisplayName()
Returns:
display name (eg. full name) of the user, must never be null.

equals

boolean equals(Object o)
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
o - object to compare to.
Returns:
true if and only if the directoryId and name.toLowerCase() of the directory entities match.

hashCode

int hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
hashcode.

compareTo

int compareTo(User user)
CompareTo must be compatible with the equals() and hashCode() methods

Specified by:
compareTo in interface Comparable<User>


Copyright © 2013 Atlassian. All Rights Reserved.