Interface User

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

public interface User extends Comparable<User>, Principal
Represents a user.
  • Method Details

    • 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>
    • isMarkedAsDeleted

      default boolean isMarkedAsDeleted()
      Returns if the user is already technically deleted. Products may decide to deactivate users rather than delete. This method is to let Crowd know that such user should not be deleted again.