Interface ManagedConfigToJsonConverter
-
- All Implemented Interfaces:
public interface ManagedConfigToJsonConverter
Defines the contract for converting managed configuration data to Json. This data consists of the application restrictions Bundle, with possible influence from the entries in the manifest restrictions. A default implementation is provided by DefaultManagedConfigToJsonConverter, however the developer is free to provide their own implementation as needed. The custom implementation is to be supplied to the com.sap.cloud.mobile.foundation.configurationprovider.ManagedConfigurationProvider constructor.
-
-
Method Summary
Modifier and Type Method Description abstract ConfigurationProviderError
getLastError()
Returns the last error (if any) that was encountered by ConvertManagedConfigToJson. abstract JSONObject
convertManagedConfigToJson(@Nullable() Bundle appRestrictions, @Nullable() List<RestrictionEntry> manifestRestrictions)
Converts managed configuration data to json. -
-
Method Detail
-
getLastError
@Nullable() abstract ConfigurationProviderError getLastError()
Returns the last error (if any) that was encountered by ConvertManagedConfigToJson.
- Returns:
The com.sap.cloud.mobile.foundation.configurationprovider.ConfigurationProviderError that represents the last error (if any) that was encountered by ConvertManagedConfigToJson.
-
convertManagedConfigToJson
@Nullable() abstract JSONObject convertManagedConfigToJson(@Nullable() Bundle appRestrictions, @Nullable() List<RestrictionEntry> manifestRestrictions)
Converts managed configuration data to json.
- Parameters:
appRestrictions
- a Bundle representing managed configuration data that is to be converted to JSON.manifestRestrictions
- a list of the application restriction (Managed Configuration) entries that are in the application manifest.- Returns:
a JSONObject representing the configuration information contained in the appRestrictions, possibly using default values found in the manifestRestrictions. If an error is encountered, null is returned and the last error is set to describe the error.
-
-
-
-