Enum ConflictStrategy
- java.lang.Object
-
- java.lang.Enum<ConflictStrategy>
-
- aero.panasonic.inflight.services.user.v2.ConflictStrategy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ConflictStrategy>
public enum ConflictStrategy extends java.lang.Enum<ConflictStrategy>
ConflictStrategy can used to indicate how the app developer handles the conflicts for each of the Personal Data Integration (PDI) data, such as Playlist, Bookmark, Favorites, Profile and Preferences.
The two options are: KEEP_LATEST - If app developers want the SDK to handle the conflicts, they can specify the KEEP_LATEST option.
In this case, the SDK will resolve the conflicts based on latest updates and no conflicts will be triggred in the app for given dataset.
USER_DEFINED - If app developers want to handle the conflicts themselves, they can specify the USER_DEFINED option.
In this case, the SDK will trigger onConflict(List) with conflicts in the app for given dataset and app developers will call resolve() on each conflict item. The SDK will perform a synchronization once all the conflict have been resolved.Lists the strategies that can be used to resolve conflict.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description KEEP_LATESTConflicts will be resolved automatically using latest updated item.USER_DEFINEDUser chooses to resolve the conflict of each item.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConflictStrategyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ConflictStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USER_DEFINED
public static final ConflictStrategy USER_DEFINED
User chooses to resolve the conflict of each item.
-
KEEP_LATEST
public static final ConflictStrategy KEEP_LATEST
Conflicts will be resolved automatically using latest updated item.
-
-
Method Detail
-
values
public static ConflictStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConflictStrategy c : ConflictStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConflictStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-