@ExperimentalApi public final class

UserDetails

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

@ExperimentalApi

This class is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

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.

Summary

Public Constructors
UserDetails(String username, String displayName)
Public Methods
boolean equals(Object o)
Optional<Long> getDirectoryId()
Return the specified directory where the user should be created in, or empty() the user should be created in the default directory.
@Nonnull String getDisplayName()
Returns the user's display name.
String getEmailAddress()
Return the user's email address.
String getPassword()
Return the user's password.
@Nonnull String getUsername()
Return the user's username.
int hashCode()
String toString()
UserDetails withDirectory(Long directoryId)
UserDetails withEmail(String email)
UserDetails withPassword(String password)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UserDetails (String username, String displayName)

Public Methods

public boolean equals (Object o)

public Optional<Long> getDirectoryId ()

Return the specified directory where the user should be created in, or empty() the user should be created in the default directory.

Returns
  • the ID of the user directory for this user.

@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.

public String getEmailAddress ()

Return the user's email address.

Returns
  • email address of the user.

public String getPassword ()

Return the user's password.

Returns
  • user's password; this can be null.

@Nonnull public String getUsername ()

Return the user's username.

Returns
  • user's username; must never be null.

public int hashCode ()

public String toString ()

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.

public UserDetails withEmail (String email)

public UserDetails withPassword (String password)