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
    It is the result of the call to provideConfiguration()
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
    • Method Detail

      • getProviderSuccess

         boolean getProviderSuccess()

        Retrieves whether or not the provider was successful in getting configuration data.

        Returns:

        false when there is an input-related error, otherwise returns true. True does not indicate that configuration data is available.

      • getConfiguration

        @Nullable() JSONObject getConfiguration()

        Retrieves the configuration data as a JSONObject configuration object.

        Returns:

        A JSONObject configuration object containing the configuration data or null is there was an error. The JSONObject configuration will be empty if the provider could not retrieve the configuration data, but did not encounter an input-related error.

      • hasConfigurationData

         boolean hasConfigurationData()

        Reports whether or not this object contains valid configuration data.

        Returns:

        true if valid configuration data is present, otherwise false.