Class UserDetails

java.lang.Object
com.atlassian.jira.user.UserDetails

@ExperimentalApi public final class UserDetails extends Object
Contains the details that is required to represent a ApplicationUser they may or may not exist. Mainly used as transfer object during create and update to avoid overloading methods.
Since:
v7.0
  • Constructor Details

    • UserDetails

      public UserDetails(String username, String displayName)
  • Method Details

    • withPassword

      public UserDetails withPassword(String password)
    • withEmail

      public UserDetails withEmail(String email)
    • withDirectory

      public UserDetails withDirectory(Long directoryId)
      Parameters:
      directoryId - directory where the user should be created in, if not specified the user should be created in the default directory.
    • getUsername

      @Nonnull public String getUsername()
      Return the user's username.
      Returns:
      user's username; must never be null.
    • getPassword

      public String getPassword()
      Return the user's password.
      Returns:
      user's password; this can be null.
    • getDisplayName

      @Nonnull public String getDisplayName()
      Returns the user's display name. This is sometimes referred to as "full name".
      Returns:
      user's display name, must never be null.
    • getEmailAddress

      public String getEmailAddress()
      Return the user's email address.
      Returns:
      email address of the user.
    • getDirectoryId

      public Optional<Long> getDirectoryId()
      Return the specified directory where the user should be created in, or Optional.empty() the user should be created in the default directory.
      Returns:
      the ID of the user directory for this user.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object