Interface Configuration

All Known Implementing Classes:
DefaultConfiguration

public interface Configuration
Application configuration.
  • Method Details

    • getPropertyValue

      <T> Optional<T> getPropertyValue(String propertyName, Class<T> type)
      Get the value of a configuration property.
      Type Parameters:
      T - Type of the property value
      Parameters:
      propertyName - Name of the property
      type - Type of the property value
      Returns:
      Value of the property or empty if the property is missing
    • getPropertyValue

      <T> T getPropertyValue(String propertyName, Class<T> type, T defaultValue)
      Get the value of a configuration property.
      Type Parameters:
      T - Type of the property value
      Parameters:
      propertyName - Name of the property
      type - Type of the property value
      defaultValue - Default value if the property is missing
      Returns:
      Value of the property or the default value if the property is missing
    • getRequiredPropertyValue

      <T> T getRequiredPropertyValue(String propertyName, Class<T> type) throws MissingConfigurationPropertyException
      Get a required value of a configuration property.
      Type Parameters:
      T - Type of the property value
      Parameters:
      propertyName - Name of the property
      type - Type of the property value
      Returns:
      Value of the property
      Throws:
      MissingConfigurationPropertyException - If the property is missing