Class DefaultPersistenceMethod
-
- All Implemented Interfaces:
-
com.sap.cloud.mobile.foundation.configurationprovider.ConfigurationPersister
public class DefaultPersistenceMethod implements ConfigurationPersister
Default Persistence Method. Responsible for persisting the configuration data into the Default location
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
SHARED_PREFERENCES_NAME
public final static String
CONFIGURATION_DATA_KEY
-
Method Summary
Modifier and Type Method Description static JSONObject
getPersistedConfiguration(@NonNull() Context context)
Returns the last configuration stored by the Default Persistence Method. static void
resetPersistedConfiguration(@NonNull() Context context)
* Clears any configuration stored by the Default Persistence Method. void
persistConfiguration(@NonNull() JSONObject configuration)
Add configuration data to the default persistence location. void
resetPersistedConfiguration()
Clear any persisted data from the default location. -
-
Method Detail
-
getPersistedConfiguration
@NonNull() static JSONObject getPersistedConfiguration(@NonNull() Context context)
Returns the last configuration stored by the Default Persistence Method.
- Parameters:
context
- An android Context.- Returns:
JSONObject Contains the configuration data.
-
resetPersistedConfiguration
static void resetPersistedConfiguration(@NonNull() Context context)
* Clears any configuration stored by the Default Persistence Method.
- Parameters:
context
- An android Context.
-
persistConfiguration
void persistConfiguration(@NonNull() JSONObject configuration)
Add configuration data to the default persistence location.
- Parameters:
configuration
- The JSONObject configuration data that was returned by the provider
-
resetPersistedConfiguration
void resetPersistedConfiguration()
Clear any persisted data from the default location.
-
-
-
-