public class UserAccount
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCOUNT_NAME |
static java.lang.String |
AUTH_TOKEN |
static java.lang.String |
CLIENT_ID |
static java.lang.String |
COMMUNITY_ID |
static java.lang.String |
COMMUNITY_URL |
static java.lang.String |
CONTENT_DOMAIN |
static java.lang.String |
CONTENT_SID |
static java.lang.String |
COOKIE_CLIENT_SRC |
static java.lang.String |
COOKIE_SID_CLIENT |
static java.lang.String |
CSRF_TOKEN |
static java.lang.String |
DISPLAY_NAME |
static java.lang.String |
EMAIL |
static java.lang.String |
FIRST_NAME |
static java.lang.String |
ID_URL |
static java.lang.String |
INSTANCE_SERVER |
static java.lang.String |
INTERNAL_COMMUNITY_ID |
static java.lang.String |
INTERNAL_COMMUNITY_PATH |
static java.lang.String |
LANGUAGE |
static java.lang.String |
LAST_NAME |
static java.lang.String |
LIGHTNING_DOMAIN |
static java.lang.String |
LIGHTNING_SID |
static java.lang.String |
LOCALE |
static java.lang.String |
LOGIN_SERVER |
static java.lang.String |
NATIVE_LOGIN |
static java.lang.String |
ORG_ID |
static java.lang.String |
PHOTO_URL |
static java.lang.String |
REFRESH_TOKEN |
static java.lang.String |
SID_COOKIE_NAME |
static java.lang.String |
THUMBNAIL_URL |
static java.lang.String |
USER_ID |
static java.lang.String |
USERNAME |
static java.lang.String |
VF_DOMAIN |
static java.lang.String |
VF_SID |
Constructor and Description |
---|
UserAccount(Bundle bundle)
Construct UserAccount from Bundle
|
UserAccount(JSONObject object)
Construct UserAccount from JSON.
|
Modifier and Type | Method and Description |
---|---|
void |
downloadProfilePhoto()
Fetches this user's profile photo from the server and stores it in the cache.
|
boolean |
equals(java.lang.Object object) |
java.lang.String |
getAccountName()
Returns the account name for this user account.
|
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalOauthValues()
Returns the additional OAuth values for this user.
|
java.lang.String |
getAuthToken()
Returns the auth token for this user account.
|
java.lang.String |
getClientId()
Returns the oauth client id.
|
java.lang.String |
getCommunityId()
Returns the community ID for this user account.
|
java.lang.String |
getCommunityLevelFilenameSuffix()
Returns a unique suffix for this user account, that can be appended
to a file to uniquely identify this account, at a community level.
|
java.lang.String |
getCommunityLevelFilenameSuffix(java.lang.String communityId)
Returns a unique suffix for this user account, that can be appended
to a file to uniquely identify this account, at a community level.
|
java.lang.String |
getCommunityLevelStoragePath()
Returns the storage path for this user account, relative to the higher
level directory of app data.
|
java.lang.String |
getCommunityLevelStoragePath(java.lang.String communityId)
Returns the storage path for this user account, relative to the higher
level directory of app data.
|
java.lang.String |
getCommunityUrl()
Returns the community URL for this user account.
|
java.lang.String |
getContentDomain()
Returns the content domain for this user.
|
java.lang.String |
getContentSid()
Returns the content SID for this user.
|
java.lang.String |
getCookieClientSrc()
Returns the cookie client src.
|
java.lang.String |
getCookieSidClient()
Returns the cookie sid client.
|
java.lang.String |
getCSRFToken()
Returns the CSRF token for this user.
|
java.lang.String |
getDisplayName()
Returns the Display name for this user account.
|
java.lang.String |
getEmail()
Returns the email for this user account.
|
java.lang.String |
getFirstName()
Returns the first name for this user account.
|
java.lang.String |
getIdUrl()
Returns the identity URL for this user account.
|
java.lang.String |
getInstanceServer()
Returns the instance server for this user account.
|
java.lang.String |
getLanguage()
Returns the language for this user.
|
java.lang.String |
getLastName()
Returns the last name for this user account.
|
java.lang.String |
getLightningDomain()
Returns the Lightning domain for this user.
|
java.lang.String |
getLightningSid()
Returns the Lightning SID for this user.
|
java.lang.String |
getLocale()
Returns the locale for this user.
|
java.lang.String |
getLoginServer()
Returns the login server for this user account.
|
java.lang.Boolean |
getNativeLogin()
Whether or not the user was added through native headless authentication.
|
java.lang.String |
getOrgId()
Returns the org ID for this user account.
|
java.lang.String |
getOrgLevelFilenameSuffix()
Returns a unique suffix for this user account, that can be appended
to a file to uniquely identify this account, at an org level.
|
java.lang.String |
getOrgLevelStoragePath()
Returns the org level storage path for this user account, relative to
the higher level directory of app data.
|
java.lang.String |
getPhotoUrl()
Returns the photo url for this user.
|
Bitmap |
getProfilePhoto()
Fetches this user's profile photo from the cache.
|
java.lang.String |
getRefreshToken()
Returns the refresh token for this user account.
|
java.lang.String |
getSidCookieName()
Returns the sid cookie name.
|
java.lang.String |
getThumbnailUrl()
Returns the thumbnail for this user.
|
java.lang.String |
getUserId()
Returns the user ID for this user account.
|
java.lang.String |
getUserLevelFilenameSuffix()
Returns a unique suffix for this user account, that can be appended
to a file to uniquely identify this account, at a user level.
|
java.lang.String |
getUserLevelStoragePath()
Returns the user level storage path for this user account, relative to
the higher level directory of app data.
|
java.lang.String |
getUsername()
Returns the username for this user account.
|
java.lang.String |
getVFDomain()
Returns the VF domain for this user.
|
java.lang.String |
getVFSid()
Returns the VF SID for this user.
|
int |
hashCode() |
Bundle |
toBundle()
Returns a representation of this instance in a bundle.
|
JSONObject |
toJson()
Returns a JSON representation of this instance.
|
public static final java.lang.String AUTH_TOKEN
public static final java.lang.String REFRESH_TOKEN
public static final java.lang.String LOGIN_SERVER
public static final java.lang.String ID_URL
public static final java.lang.String INSTANCE_SERVER
public static final java.lang.String ORG_ID
public static final java.lang.String USER_ID
public static final java.lang.String USERNAME
public static final java.lang.String ACCOUNT_NAME
public static final java.lang.String COMMUNITY_ID
public static final java.lang.String COMMUNITY_URL
public static final java.lang.String INTERNAL_COMMUNITY_ID
public static final java.lang.String INTERNAL_COMMUNITY_PATH
public static final java.lang.String EMAIL
public static final java.lang.String FIRST_NAME
public static final java.lang.String DISPLAY_NAME
public static final java.lang.String LAST_NAME
public static final java.lang.String PHOTO_URL
public static final java.lang.String THUMBNAIL_URL
public static final java.lang.String LIGHTNING_DOMAIN
public static final java.lang.String LIGHTNING_SID
public static final java.lang.String VF_DOMAIN
public static final java.lang.String VF_SID
public static final java.lang.String CONTENT_DOMAIN
public static final java.lang.String CONTENT_SID
public static final java.lang.String CSRF_TOKEN
public static final java.lang.String NATIVE_LOGIN
public static final java.lang.String LANGUAGE
public static final java.lang.String LOCALE
public static final java.lang.String COOKIE_CLIENT_SRC
public static final java.lang.String COOKIE_SID_CLIENT
public static final java.lang.String SID_COOKIE_NAME
public static final java.lang.String CLIENT_ID
public UserAccount(JSONObject object)
object
- public UserAccount(Bundle bundle)
bundle
- public java.lang.String getAuthToken()
public java.lang.String getRefreshToken()
public java.lang.String getLoginServer()
public java.lang.String getIdUrl()
public java.lang.String getInstanceServer()
public java.lang.String getOrgId()
public java.lang.String getUserId()
public java.lang.String getUsername()
public java.lang.String getAccountName()
public java.lang.String getCommunityId()
public java.lang.String getCommunityUrl()
public java.lang.String getFirstName()
public java.lang.String getDisplayName()
public java.lang.String getLastName()
public java.lang.String getEmail()
public java.lang.String getPhotoUrl()
public java.lang.String getThumbnailUrl()
public java.lang.String getLightningDomain()
public java.lang.String getLightningSid()
public java.lang.String getVFDomain()
public java.lang.String getVFSid()
public java.lang.String getContentDomain()
public java.lang.String getContentSid()
public java.lang.String getCSRFToken()
public java.lang.Boolean getNativeLogin()
public java.lang.String getLanguage()
public java.lang.String getLocale()
public java.lang.String getCookieClientSrc()
public java.lang.String getCookieSidClient()
public java.lang.String getSidCookieName()
public java.lang.String getClientId()
public java.util.Map<java.lang.String,java.lang.String> getAdditionalOauthValues()
public Bitmap getProfilePhoto()
public void downloadProfilePhoto()
public java.lang.String getOrgLevelStoragePath()
public java.lang.String getUserLevelStoragePath()
public java.lang.String getCommunityLevelStoragePath()
public java.lang.String getCommunityLevelStoragePath(java.lang.String communityId)
communityId
- Community ID. Pass 'null' for internal community.public java.lang.String getOrgLevelFilenameSuffix()
public java.lang.String getUserLevelFilenameSuffix()
public java.lang.String getCommunityLevelFilenameSuffix()
public java.lang.String getCommunityLevelFilenameSuffix(java.lang.String communityId)
communityId
- Community ID. Pass 'null' for internal community.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public JSONObject toJson()
public Bundle toBundle()