Package com.iizix.user
Class UserProfileInfo
java.lang.Object
com.iizix.user.UserProfileInfo
Class holding the User Profile information, when signing in externally typically for an OAuth(2) authentication service provider, or when signing up internally (and externally).
- Constructor SummaryConstructorsConstructorDescription- UserProfileInfo- (String id, String title, String fullName, String firstName, String middleName, String lastName, String email, Boolean isEmailVerified, String country, String language, ProfilePictureInfo[] images) Creates a new instance to store the light user profile information.
- Method SummaryModifier and TypeMethodDescription- voidAdds additional details information.- void- close()Closes a potentially open input stream of the image data in any of the- ProfilePictureInfoinstances.- booleanChecks if two objects are equal.The preferred country code, null for none.Gets all details as an unmodifiable map.Gets the email adress, null for none.The localized first name, null for none.Gets the full name, null for none.- getID()Gets the OAuth(2) provider's user ID, generally specific for the requesting app, or the user name when this instance is used for internal login.The preferred language code, null for none.The localized last name, null for none.Gets the localized middle name, null for none.The list of profile pictures, null for none.Gets the list of profile pictures, null for none.- getTitle()Gets the title, e.g.- int- hashCode()Gets the hash code of this instance.Gets the flag for if the authentication service provider has verified the email address.- toString()Gets a String.
- Constructor Details- UserProfileInfopublic UserProfileInfo- (String id, String title, String fullName, String firstName, String middleName, String lastName, String email, Boolean isEmailVerified, String country, 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, or the user name when this instance is used for internal login.
- 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:
- NullPointerException- If- idis- null.
 
 
- Method Details- addDetailAdds additional details information. This method is not thread safe, and should not be called once the user profile has been passed as return value or parameter in the API.- Parameters:
- detail- The- IBasicUserInfoDetailNamesdetail string, e.g.- IBasicUserInfoDetailNames.DETAIL_JobTitle.
- value- The value.
- Throws:
- NullPointerException- If the- detailor- valueis- null.
 
- getDetailsGets all details as an unmodifiable map. The keys are normally strings from- IBasicUserInfoDetailNameswith their values.- Returns:
- The unmodifiable map of details and their values, or nullfor none.
 
- getIDGets the OAuth(2) provider's user ID, generally specific for the requesting app, or the user name when this instance is used for internal login.- Returns:
- The user ID (or user name), never null.
 
- getTitleGets the title, e.g. 'Baron, Princess, Dr.', null for none.- Returns:
- The title.
 
- getFullNameGets the full name, null for none.- Returns:
- The full name.
 
- getFirstNameThe localized first name, null for none.- Returns:
- The first name.
 
- getMiddleNameGets the localized middle name, null for none.- Returns:
- The middle name.
 
- getLastNameThe localized last name, null for none.- Returns:
- The last name.
 
- getEmailAddressGets the email adress, null for none.- Returns:
- The email address.
 
- isEmailVerifiedGets the flag for if the authentication service provider has verified the email address. This value is- nullif state is unknown.- Returns:
- The email verified state, or null for unknown.
 
- getCountryThe preferred country code, null for none.- Returns:
- The country code.
 
- getLanguageThe preferred language code, null for none.- Returns:
- The language code.
 
- getProfilePicturesThe list of profile pictures, null for none.- Returns:
- The array of images, or nullif there are none.
 
- getProfilePicturesLargestFirstGets 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 nullif there are none.
 
- hashCodepublic int hashCode()Gets the hash code of this instance.
- equalsChecks if two objects are equal.
- toStringGets a String.
- closepublic void close()Closes a potentially open input stream of the image data in any of the- ProfilePictureInfoinstances.