Class User
-
- All Implemented Interfaces:
@Serializable() public final class UserRepresents the user model returned from mobile server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUser.UserNamepublic final classUser.Email
-
Field Summary
Fields Modifier and Type Field Description public final static StringATTR_IDpublic final static StringATTR_USER_NAMEpublic final static StringATTR_ROLESpublic final static StringATTR_FAMILY_NAMEpublic final static StringATTR_GIVEN_NAMEpublic final static StringATTR_EMAILSpublic final static StringATTR_NAMEpublic final static StringATTR_EMAIL_VALUEpublic final static StringATTR_DETAILpublic final static StringATTR_REG_IDprivate final Stringidprivate final StringuserNameprivate final List<String>rolesprivate final User.UserNamenameprivate final List<User.Email>emailsprivate final JsonElementdetailprivate final StringregistrationId
-
Constructor Summary
Constructors Constructor Description User(String id, String userName, List<String> roles, User.UserName name, List<User.Email> emails, JsonElement detail, String registrationId)
-
Method Summary
Modifier and Type Method Description final StringgetId()The user id, mandatory. final StringgetUserName()The user name string, mandatory. final List<String>getRoles()The assigned roles of this user. final User.UserNamegetName()The UserName type user name property, which contains optional 'familyName' and 'givenName'. final List<User.Email>getEmails()The emails of this user. final JsonElementgetDetail()The detail information, it could be either a JsonPrimitive, JsonObject or JsonArray. final StringgetRegistrationId()The registration id of the user. StringtoString()final static UsercreateUserFromJsonString(String jsonString)Creates user instance from a json string -
-
Constructor Detail
-
User
User(String id, String userName, List<String> roles, User.UserName name, List<User.Email> emails, JsonElement detail, String registrationId)
-
-
Method Detail
-
getId
final String getId()
The user id, mandatory.
-
getUserName
final String getUserName()
The user name string, mandatory.
-
getRoles
final List<String> getRoles()
The assigned roles of this user.
-
getName
final User.UserName getName()
The UserName type user name property, which contains optional 'familyName' and 'givenName'.
-
getEmails
final List<User.Email> getEmails()
The emails of this user.
-
getDetail
final JsonElement getDetail()
The detail information, it could be either a JsonPrimitive, JsonObject or JsonArray. It's up to the client code to parse this information.
-
getRegistrationId
final String getRegistrationId()
The registration id of the user. This will not be included in the toString result.
-
toString
String toString()
-
createUserFromJsonString
final static User createUserFromJsonString(String jsonString)
Creates user instance from a json string
-
-
-
-