Class UserProfileInfo


  • public class UserProfileInfo
    extends java.lang.Object
    Class holding the Light User Profile information, typically for an OAuth(2) authentication service provider.
    • Constructor Summary

      Constructors 
      Constructor Description
      UserProfileInfo​(java.lang.String id, java.lang.String title, java.lang.String fullName, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String email, java.lang.Boolean isEmailVerified, java.lang.String country, java.lang.String language, ProfilePictureInfo[] images)
      Creates a new instance to store the light user profile information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Checks if two objects are equal.
      java.lang.String getCountry()
      The preferred country code, null for none.
      java.lang.String getEmailAddress()
      Gets the email adress, null for none.
      java.lang.String getFirstName()
      The localized first name, null for none.
      java.lang.String getFullName()
      Gets the full name, null for none.
      java.lang.String getID()
      Gets the OAuth(2) provider's user ID, generally specific for the requesting app.
      java.lang.String getLanguage()
      The preferred language code, null for none.
      java.lang.String getLastName()
      The localized last name, null for none.
      java.lang.String getMiddleName()
      Gets the localized middle name, null for none.
      ProfilePictureInfo[] getProfilePictures()
      The list of profile pictures, null for none.
      ProfilePictureInfo[] getProfilePicturesLargestFirst()
      Gets the list of profile pictures, null for none.
      java.lang.String getTitle()
      Gets the title, e.g.
      int hashCode()
      Gets the hash code of this instance.
      java.lang.Boolean isEmailVerified()
      Gets the flag for if the authentication service provider has verified the email address.
      java.lang.String toString()
      Gets a String.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UserProfileInfo

        public UserProfileInfo​(java.lang.String id,
                               java.lang.String title,
                               java.lang.String fullName,
                               java.lang.String firstName,
                               java.lang.String middleName,
                               java.lang.String lastName,
                               java.lang.String email,
                               java.lang.Boolean isEmailVerified,
                               java.lang.String country,
                               java.lang.String language,
                               ProfilePictureInfo[] images)
        Creates a new instance to store the light user profile information.
        Parameters:
        id - The OAuth(2) provider's user ID, generally specific for the requesting app.
        title - The title, e.g. 'Baron, Princess, Dr.', null for none.
        fullName - The localized full name, null for none.
        firstName - The localized first name, null for none.
        lastName - The localized last name, null for none.
        email - The email address, null for none.
        isEmailVerified - Flag for email verified by authentication service provider, null for unknown state.
        country - The preferred country code, null for none.
        language - The preferred language code, null for none.
        images - An array of profile pictures, null for none.
        Throws:
        java.lang.NullPointerException - If id is null.
    • Method Detail

      • getID

        public java.lang.String getID()
        Gets the OAuth(2) provider's user ID, generally specific for the requesting app.
        Returns:
        The user ID, never null.
      • getTitle

        public java.lang.String getTitle()
        Gets the title, e.g. 'Baron, Princess, Dr.', null for none.
        Returns:
        The title.
      • getFullName

        public java.lang.String getFullName()
        Gets the full name, null for none.
        Returns:
        The full name.
      • getFirstName

        public java.lang.String getFirstName()
        The localized first name, null for none.
        Returns:
        The first name.
      • getMiddleName

        public java.lang.String getMiddleName()
        Gets the localized middle name, null for none.
        Returns:
        The middle name.
      • getLastName

        public java.lang.String getLastName()
        The localized last name, null for none.
        Returns:
        The last name.
      • getEmailAddress

        public java.lang.String getEmailAddress()
        Gets the email adress, null for none.
        Returns:
        The email address.
      • isEmailVerified

        public java.lang.Boolean isEmailVerified()
        Gets the flag for if the authentication service provider has verified the email address. This value is null if state is unknown.
        Returns:
        The email verified state, or null for unknown.
      • getCountry

        public java.lang.String getCountry()
        The preferred country code, null for none.
        Returns:
        The country code.
      • getLanguage

        public java.lang.String getLanguage()
        The preferred language code, null for none.
        Returns:
        The language code.
      • getProfilePictures

        public ProfilePictureInfo[] getProfilePictures()
        The list of profile pictures, null for none.
        Returns:
        The array of images, or null if there are none.
      • getProfilePicturesLargestFirst

        public ProfilePictureInfo[] getProfilePicturesLargestFirst()
        Gets the list of profile pictures, null for none. The array, if non-null, is sorted to get the largest images first. Images without size are always last.
        Returns:
        The sorted array of images, or null if there are none.
      • hashCode

        public int hashCode()
        Gets the hash code of this instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.
      • equals

        public boolean equals​(java.lang.Object obj)
        Checks if two objects are equal.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The other object to compare with.
        Returns:
        The equality flag.
      • toString

        public java.lang.String toString()
        Gets a String.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string.