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 Details

  • Method Details

    • getDirectoryId

      public long getDirectoryId()
      Specified by:
      getDirectoryId in interface DirectoryEntity
      Specified by:
      getDirectoryId in interface User
      Returns:
      id of the directory in which the DirectoryEntity is stored.
    • getName

      public String getName()
      Specified by:
      getName in interface DirectoryEntity
      Specified by:
      getName in interface Principal
      Returns:
      name of the entity.
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface User
      Returns:
      true if and only if the user is allowed to authenticate.
    • getEmailAddress

      public String getEmailAddress()
      Specified by:
      getEmailAddress in interface User
      Returns:
      email address of the user.
    • getFirstName

      public String getFirstName()
      Specified by:
      getFirstName in interface User
    • getLastName

      public String getLastName()
      Specified by:
      getLastName in interface User
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface User
      Returns:
      display name (eg. full name) of the user, must never be null.
    • getInternalUser

      public InternalUser getInternalUser()
    • getCredential

      public PasswordCredential getCredential()
    • getExternalId

      public String getExternalId()
      Specified by:
      getExternalId in interface User
    • getCreatedDate

      public Date getCreatedDate()
      Description copied from interface: TimestampedEntity
      Returns the date the entity was created.
      Specified by:
      getCreatedDate in interface TimestampedEntity
      Returns:
      date the entity was created
    • getUpdatedDate

      public Date getUpdatedDate()
      Description copied from interface: TimestampedEntity
      Returns the date the entity was last updated.
      Specified by:
      getUpdatedDate in interface TimestampedEntity
      Returns:
      date the entity was last updated.
    • equals

      public boolean equals(Object o)
      Description copied from interface: DirectoryEntity
      Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().
      Specified by:
      equals in interface DirectoryEntity
      Specified by:
      equals in interface Principal
      Specified by:
      equals in interface User
      Overrides:
      equals in class Object
      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().
      Specified by:
      hashCode in interface DirectoryEntity
      Specified by:
      hashCode in interface Principal
      Specified by:
      hashCode in interface User
      Overrides:
      hashCode in class Object
      Returns:
      hashcode.
    • compareTo

      public int compareTo(User o)
      Description copied from interface: User
      CompareTo must be compatible with the equals() and hashCode() methods
      Specified by:
      compareTo in interface Comparable<User>
      Specified by:
      compareTo in interface User