Class FileConfigurationProvider
-
- All Implemented Interfaces:
-
com.sap.cloud.mobile.foundation.configurationprovider.ConfigurationProvider
public class FileConfigurationProvider implements ConfigurationProvider
One of the default ConfigurationProviders, it obtains JSON configuration data from the application\u0027s resource file.
Under normal usage, the FILE_CONFIGURATION_PROVIDER would not be instantiated directly, but consumed through the Loader.
-
-
Constructor Summary
Constructors Constructor Description FileConfigurationProvider(Context context)
Reads configuration data from the Default file reference. FileConfigurationProvider(Context context, String filename)
Reads configuration data from a custom configuration file.
-
Method Summary
Modifier and Type Method Description ProviderIdentifier
getProviderIdentifier()
Returns the unique identifier associated with this ConfigurationProvider. ProviderInputs
getExpectedInput()
Reports what input(s) are required for the operation. ProviderConfiguration
provideConfiguration(@NonNull() ProviderInputs input)
Used by the loader, normally not used directly. -
-
Constructor Detail
-
FileConfigurationProvider
FileConfigurationProvider(Context context)
Reads configuration data from the Default file reference.- Parameters:
context
- A context, providing access to the application specific resources; it should contain the Configuration File
-
FileConfigurationProvider
FileConfigurationProvider(Context context, String filename)
Reads configuration data from a custom configuration file.- Parameters:
context
- A context, providing access to the resources containing the custom Configuration Filefilename
- The file name of the custom Configuration File
-
-
Method Detail
-
getProviderIdentifier
@NonNull() ProviderIdentifier getProviderIdentifier()
Returns the unique identifier associated with this ConfigurationProvider.
- Returns:
-
getExpectedInput
@NonNull() ProviderInputs getExpectedInput()
Reports what input(s) are required for the operation. The value for this class is an empty Dictionary (no inputs expected) since the filename may be optionally supplied during object instantiation.
- Returns:
An empty ProviderInputs object.
-
provideConfiguration
@NonNull() ProviderConfiguration provideConfiguration(@NonNull() ProviderInputs input)
Used by the loader, normally not used directly.
-
-
-
-