Class Info
- java.lang.Object
-
- aero.panasonic.inflight.services.user.v2.Sync
-
- aero.panasonic.inflight.services.user.v2.info.Info
-
public class Info extends Sync
Entry point for accessing Passenger Profile Information.
This class provides methods to initialize the service and manage passenger-related information groups such as flight information, passenger details, demographic data, travel information, frequent flyer details, and personally identifiable information (PII).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class aero.panasonic.inflight.services.user.v2.Sync
Sync.SyncListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEMOGRAPHICstatic java.lang.StringFLIGHT_INFOstatic java.lang.StringFREQUENT_FLYER_INFOstatic java.lang.StringPASSENGER_INFOstatic java.lang.StringPERSONALLY_IDENTIFIABLE_INFOstatic java.lang.StringTRAVEL_INFO
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,JSONObject>getAllGroups()Retrieves all information groups as a map of key-value pairs.JSONObjectgetGroup(java.lang.String groupName)Retrieves the JSON object associated with the specified group key.static voidinitService(Context context, IInFlightCallback inFlightCallback, InFlight inFlight)Initializes the Info service, which is the starting point for retrieving various types of information such as FLIGHT_INFO, PASSENGER_INFO, PERSONALLY_IDENTIFIABLE_INFO, DEMOGRAPHIC, TRAVEL_INFO, and FREQUENT_FLYER_INFO.voidremoveGroup(java.lang.String keyName)Removes the information group associated with the specified key.voidsetConflictStrategy(ConflictStrategy strategy)Sets the strategy for resolving conflicts.voidsetGroup(java.lang.String keyName, JSONObject value)Adds a new information group with the specified key and JSON value.voidsetSyncListener(Sync.SyncListener syncListener)Sets a synchronization listener to handle synchronization events.voidsynchronize()Triggers the synchronization.Create new playlist with nameCreate new playlist with name-
Methods inherited from class aero.panasonic.inflight.services.user.v2.Sync
getConflicts
-
-
-
-
Field Detail
-
FLIGHT_INFO
public static final java.lang.String FLIGHT_INFO
- See Also:
- Constant Field Values
-
PASSENGER_INFO
public static final java.lang.String PASSENGER_INFO
- See Also:
- Constant Field Values
-
PERSONALLY_IDENTIFIABLE_INFO
public static final java.lang.String PERSONALLY_IDENTIFIABLE_INFO
- See Also:
- Constant Field Values
-
DEMOGRAPHIC
public static final java.lang.String DEMOGRAPHIC
- See Also:
- Constant Field Values
-
TRAVEL_INFO
public static final java.lang.String TRAVEL_INFO
- See Also:
- Constant Field Values
-
FREQUENT_FLYER_INFO
public static final java.lang.String FREQUENT_FLYER_INFO
- See Also:
- Constant Field Values
-
-
Method Detail
-
initService
public static void initService(Context context, IInFlightCallback inFlightCallback, InFlight inFlight)Initializes the Info service, which is the starting point for retrieving various types of information such as FLIGHT_INFO, PASSENGER_INFO, PERSONALLY_IDENTIFIABLE_INFO, DEMOGRAPHIC, TRAVEL_INFO, and FREQUENT_FLYER_INFO. It sets up a callback to notify whether the initialization was successful or failed.- Parameters:
context- Provides access to resources and classes to initialize the object.inFlightCallback-IInFlightCallbackReturns the instance or error message.inFlight- Initializes an InFlight instance.
-
setGroup
public void setGroup(java.lang.String keyName, JSONObject value)Adds a new information group with the specified key and JSON value.- Parameters:
keyName- the unique key name identifying the group.value- the JSON object containing group data.
-
removeGroup
public void removeGroup(java.lang.String keyName)
Removes the information group associated with the specified key.- Parameters:
keyName- the key identifying the group to be removed.
-
getAllGroups
public java.util.Map<java.lang.String,JSONObject> getAllGroups()
Retrieves all information groups as a map of key-value pairs.- Returns:
- a map containing all information groups, where the key is the group name, and the value is the associated JSON object.
-
getGroup
public JSONObject getGroup(java.lang.String groupName)
Retrieves the JSON object associated with the specified group key.- Parameters:
groupName- the key identifying the group.- Returns:
- the JSON object containing the group data, or null if the group does not exist.
-
setSyncListener
public void setSyncListener(Sync.SyncListener syncListener)
Sets a synchronization listener to handle synchronization events.- Overrides:
setSyncListenerin classSync- Parameters:
syncListener- the listener to handle synchronization events.
-
setConflictStrategy
public void setConflictStrategy(ConflictStrategy strategy)
Description copied from class:SyncSets the strategy for resolving conflicts.ConflictStrategy
Default isConflictStrategy.USER_DEFINED- Overrides:
setConflictStrategyin classSync
-
synchronize
public void synchronize()
Description copied from class:SyncTriggers the synchronization.Create new playlist with nameCreate new playlist with name- Overrides:
synchronizein classSync
-
-