Interface UserProfile


public interface UserProfile
Interface encapsulating a user's profile information. Any of the properties except for the username and the userKey may be null, which indicates either that the underlying application does not support that profile data, or that the user did not provide that profile data. Note: implementors of this interface should override the Object.equals(Object) method such that two users with the same userKey are considered equal.
Since:
2.2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the email address of the user associated with this profile
    Returns the full name of the user associated with this profile information
    Returns a URI for the user's profile page.
    Returns a URI for the user's profile picture.
    getProfilePictureUri(int width, int height)
    Returns a URI for the user's profile picture.
    Returns the key of the user associated with this profile information.
    Returns the username of the user associated with this profile information.
  • Method Details

    • getUserKey

      UserKey getUserKey()
      Returns the key of the user associated with this profile information. Note: the key is meant to uniquely identify a user, and be immutable for the duration of the life of the user. It is however not meant to be displayed: please use getUsername() or getFullName() for that purpose.
      Returns:
      the key of the user associated with this profile information.
      Since:
      2.10
      See Also:
    • getUsername

      String getUsername()
      Returns the username of the user associated with this profile information. Note: depending on the product, the username might change during the life of the user. If you need a stable identifier, please use getUserKey().
      Returns:
      the username of the user associated with this profile information
      See Also:
    • getFullName

      String getFullName()
      Returns the full name of the user associated with this profile information
      Returns:
      the full name of the user associated with this profile information, or null if a full name was not provided or the application does not support the full name as profile data
    • getEmail

      String getEmail()
      Returns the email address of the user associated with this profile
      Returns:
      the email address of the user associated with this profile, or null if an email address was not provided or the application does not support email addresses as profile data
    • getProfilePictureUri

      URI getProfilePictureUri(int width, int height)
      Returns a URI for the user's profile picture. The returned URI will point to an image of the user's profile picture no smaller than the requested size. The URI will either be relative to the application's base URI, or absolute if the profile picture is being served by an external server
      Parameters:
      width - the preferred width of the desired picture
      height - the preferred height of the desired picture
      Returns:
      a URI pointing to an image of the user's profile picture, or null if a profile picture was not provided, the application does not support profile pictures as profile data, or the application was unable to provide an image larger than or equal to the requested size
    • getProfilePictureUri

      URI getProfilePictureUri()
      Returns a URI for the user's profile picture. The returned URI will point to the largest possible unscaled image of the user's profile picture that the application can provide The URI will either be relative to the application's base URI, or absolute if the profile picture is being served by an external server
      Returns:
      a URI pointing to an image of the user's profile picture, or null if a profile picture was not provided or the application does not support profile pictures as profile data
    • getProfilePageUri

      URI getProfilePageUri()
      Returns a URI for the user's profile page. The URI will be relative to the application's base URI
      Returns:
      a relative URI pointing to the user's profile page, or null if the user does not have a profile page or the application does not support profile pages