Class ProviderConfiguration
-
- All Implemented Interfaces:
public class ProviderConfiguration
Providers all extend from this class and use it to provide.
- Result of the retrieval attempt
- Either the configuration data or the Error
-
-
Field Summary
Fields Modifier and Type Field Description public boolean
providerSuccess
public JSONObject
configuration
public ConfigurationProviderError
returnError
-
Constructor Summary
Constructors Constructor Description ProviderConfiguration()
Creates a no configuration data available ProviderConfiguration object. ProviderConfiguration(JSONObject configuration)
Creates a success ProviderConfiguration object which contains the specified configuration data. ProviderConfiguration(ConfigurationProviderError returnError)
Creates a failure ProviderConfiguration object which contains the specified ConfigurationProviderError.
-
Method Summary
Modifier and Type Method Description boolean
getProviderSuccess()
Retrieves whether or not the provider was successful in getting configuration data. JSONObject
getConfiguration()
Retrieves the configuration data as a JSONObject configuration object. ConfigurationProviderError
getReturnError()
Retrieves the input-related error, if any, encountered by the provider. boolean
hasConfigurationData()
Reports whether or not this object contains valid configuration data. -
-
Constructor Detail
-
ProviderConfiguration
ProviderConfiguration()
Creates a no configuration data available ProviderConfiguration object.
-
ProviderConfiguration
ProviderConfiguration(JSONObject configuration)
Creates a success ProviderConfiguration object which contains the specified configuration data.- Parameters:
configuration
- A JSONObject configuration object containing the configuration returned by the provider.
-
ProviderConfiguration
ProviderConfiguration(ConfigurationProviderError returnError)
Creates a failure ProviderConfiguration object which contains the specified ConfigurationProviderError.- Parameters:
returnError
- A ConfigurationProviderError object describing the error that was encountered by the provider.
-
-
Method Detail
-
getProviderSuccess
boolean getProviderSuccess()
Retrieves whether or not the provider was successful in getting configuration data.
-
getConfiguration
@Nullable() JSONObject getConfiguration()
Retrieves the configuration data as a JSONObject configuration object.
-
getReturnError
@Nullable() ConfigurationProviderError getReturnError()
Retrieves the input-related error, if any, encountered by the provider.
-
hasConfigurationData
boolean hasConfigurationData()
Reports whether or not this object contains valid configuration data.
-
-
-
-