|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.utils.LoginPreferences
public class LoginPreferences
Store various preferences used during login in a preferences file. TODO: Requires some refactoring to clear up underutilised variables.
Field Summary | |
---|---|
private static java.lang.String |
LAST_LOGIN_SCREEN
|
private static java.lang.String |
MOBILE_NUMBER
|
private static java.lang.String |
PASSWORD
|
private static java.lang.String |
PREFS_PATH
|
private static java.util.GregorianCalendar |
sDateOfBirth
|
private static java.lang.String |
SIGNUP_DOB_DAY
|
private static java.lang.String |
SIGNUP_DOB_MONTH
|
private static java.lang.String |
SIGNUP_DOB_YEAR
|
private static java.lang.String |
SIGNUP_EMAIL_ADDRESS
|
private static java.lang.String |
SIGNUP_FIRSTNAME
|
private static java.lang.String |
SIGNUP_LASTNAME
|
private static LoginDetails |
sLoginDetails
|
private static java.lang.String |
sMobileNumber
|
private static java.lang.String |
sPassword
|
private static java.lang.String |
sSignupEmailAddress
|
private static java.lang.String |
sSignupFirstName
|
private static java.lang.String |
sSignupLastName
|
static java.lang.String |
STORE_PROGRESS
|
private static java.lang.String |
sUsername
|
private static java.lang.String |
USERNAME
|
private static java.lang.String |
XML_FILE_EXTENSION
|
Constructor Summary | |
---|---|
LoginPreferences()
|
Method Summary | |
---|---|
static void |
clearCachedLoginDetails()
Clear cached login details. |
static void |
clearPreferencesFile(Context context)
Clears all details stored in the preferences. |
static java.lang.String |
getCurrentLoginActivity(Context context)
Retrieves the name of the current login activity. |
static LoginDetails |
getLoginDetails()
Gets the current set of login parameters. |
static java.lang.String |
getMobileNumber()
Gets the current login mobile number. |
static java.lang.String |
getPassword()
Gets the current login password. |
static java.util.GregorianCalendar |
getSignupDateOfBirth()
Return the date of birth from current account details. |
static java.lang.String |
getSignupEmailAddress()
Retrieves the current account creation email address. |
static java.lang.String |
getSignupFirstName()
Retrieves the current account creation first name. |
static java.lang.String |
getSignupLastName()
Retrieves the current account creation last name. |
static java.lang.String |
getUsername()
Gets the current login user name. |
static void |
initLoginDetails()
Re-initialise login details currently held in application cache. |
static void |
setCurrentLoginActivity(java.lang.String loginScreenName,
Context context)
Stores the name of the current login activity. |
static void |
setLoginDetails(LoginDetails loginDetails)
Store current login details. |
static void |
setMobileNumber(java.lang.String mobileNumber)
Sets the current login mobile number. |
static void |
setPassword(java.lang.String aPassword)
Sets the current login password. |
static void |
setSignupDateOfBirth(int day,
int month,
int year)
Set date of birth for current account. |
static void |
setSignupEmailAddress(java.lang.String aEmailAddress)
Sets the current account creation email address. |
static void |
setSignupFirstName(java.lang.String aFirstName)
Sets the current account creation first name. |
static void |
setSignupLastName(java.lang.String aLastName)
Sets the current account creation last name. |
static void |
setUsername(java.lang.String username)
Sets the current login user name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STORE_PROGRESS
private static final java.lang.String PREFS_PATH
private static final java.lang.String SIGNUP_EMAIL_ADDRESS
private static final java.lang.String SIGNUP_FIRSTNAME
private static final java.lang.String SIGNUP_LASTNAME
private static final java.lang.String SIGNUP_DOB_DAY
private static final java.lang.String SIGNUP_DOB_MONTH
private static final java.lang.String SIGNUP_DOB_YEAR
private static final java.lang.String MOBILE_NUMBER
private static final java.lang.String USERNAME
private static final java.lang.String PASSWORD
private static final java.lang.String LAST_LOGIN_SCREEN
private static final java.lang.String XML_FILE_EXTENSION
private static java.lang.String sSignupFirstName
private static java.lang.String sSignupLastName
private static java.lang.String sSignupEmailAddress
private static volatile java.util.GregorianCalendar sDateOfBirth
private static java.lang.String sMobileNumber
private static java.lang.String sPassword
private static java.lang.String sUsername
private static LoginDetails sLoginDetails
Constructor Detail |
---|
public LoginPreferences()
Method Detail |
---|
public static java.lang.String getCurrentLoginActivity(Context context)
context
- - Android context.
public static void setCurrentLoginActivity(java.lang.String loginScreenName, Context context)
loginScreenName
- The name of the current login wizard activity.public static void clearCachedLoginDetails()
public static void setLoginDetails(LoginDetails loginDetails)
loginDetails
- Current login details.public static void initLoginDetails()
public static LoginDetails getLoginDetails()
public static java.lang.String getPassword()
public static void setPassword(java.lang.String aPassword)
aPassword
- login passwordpublic static java.lang.String getUsername()
public static void setUsername(java.lang.String username)
username
- login user namepublic static java.lang.String getMobileNumber()
public static void setMobileNumber(java.lang.String mobileNumber)
mobileNumber
- login mobile numberpublic static void setSignupEmailAddress(java.lang.String aEmailAddress)
aEmailAddress
- account signup email addresspublic static java.lang.String getSignupEmailAddress()
public static void setSignupFirstName(java.lang.String aFirstName)
aFirstName
- account creation first namepublic static void setSignupLastName(java.lang.String aLastName)
aLastName
- account creation last namepublic static java.lang.String getSignupFirstName()
public static java.lang.String getSignupLastName()
public static java.util.GregorianCalendar getSignupDateOfBirth()
public static void setSignupDateOfBirth(int day, int month, int year)
day
- Date of birth within month.month
- Month of birthyear
- Year of birthpublic static void clearPreferencesFile(Context context)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc