Class ProfileV1
- java.lang.Object
-
- aero.panasonic.inflight.services.user.profile.ProfileV1
-
public class ProfileV1 extends java.lang.ObjectPackage Starting Point - This class is responsible for holding and persisting user profile information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFirstName()Gets the first name of the userjava.lang.StringgetGender()Gets the gender types, such as female, male or unknownjava.lang.StringgetLastName()Gets the last name of the userjava.lang.StringgetMiddleName()Gets the middle name of the userjava.lang.StringgetPrefix()Gets the prefix of the user, such as Mr, Mrs or Msjava.lang.StringgetSuffix()Gets the suffix of the user, such as III, Sr or MDbooleanrestoreFromDisk(Context appContext)restore list from disk that was previouslyvoidsaveToDisk(Context appContext)Saves the user preferences to disk so that it maybe restored later.voidsetFirstName(java.lang.String firstName)Sets the first name of the uservoidsetGender(java.lang.String gender)Sets the gender types, such as female, male or unknownvoidsetLastName(java.lang.String lastName)Sets the last name of the uservoidsetMiddleName(java.lang.String middleName)Sets the middle name of the uservoidsetPrefix(java.lang.String prefix)Sets the prefix of the user, such as Mr, Mrs or MsvoidsetSuffix(java.lang.String suffix)Sets the suffix of the user, such as III, Sr or MDJSONObjecttoJson()Exports the user's profile to a JSON format, which can be used to update the user profile on the seatback monitor.
-
-
-
Method Detail
-
toJson
public JSONObject toJson()
Exports the user's profile to a JSON format, which can be used to update the user profile on the seatback monitor.- Returns:
- JSONObject containing Profile data
-
getFirstName
public java.lang.String getFirstName()
Gets the first name of the user- Returns:
- java.lang.String
-
setFirstName
public void setFirstName(java.lang.String firstName)
Sets the first name of the user- Parameters:
firstName- java.lang.String the firstName to set
-
getLastName
public java.lang.String getLastName()
Gets the last name of the user- Returns:
- java.lang.String
-
setLastName
public void setLastName(java.lang.String lastName)
Sets the last name of the user- Parameters:
lastName- java.lang.String the LastName to set
-
getMiddleName
public java.lang.String getMiddleName()
Gets the middle name of the user- Returns:
- java.lang.String
-
setMiddleName
public void setMiddleName(java.lang.String middleName)
Sets the middle name of the user- Parameters:
middleName- java.lang.String the middleName to set
-
getSuffix
public java.lang.String getSuffix()
Gets the suffix of the user, such as III, Sr or MD- Returns:
- java.lang.String
-
setSuffix
public void setSuffix(java.lang.String suffix)
Sets the suffix of the user, such as III, Sr or MD- Parameters:
suffix- java.lang.String the suffix to set
-
getPrefix
public java.lang.String getPrefix()
Gets the prefix of the user, such as Mr, Mrs or Ms- Returns:
- java.lang.String
-
setPrefix
public void setPrefix(java.lang.String prefix)
Sets the prefix of the user, such as Mr, Mrs or Ms- Parameters:
prefix- java.lang.String the prefix to set
-
getGender
public java.lang.String getGender()
Gets the gender types, such as female, male or unknown- Returns:
- java.lang.String
-
setGender
public void setGender(java.lang.String gender)
Sets the gender types, such as female, male or unknown- Parameters:
gender- java.lang.String the gender to set
-
saveToDisk
public void saveToDisk(Context appContext)
Saves the user preferences to disk so that it maybe restored later.
-
restoreFromDisk
public boolean restoreFromDisk(Context appContext)
restore list from disk that was previously- Parameters:
appContext-- Returns:
- true if file was found and restored succesfully
-
-