Interface ExternalConfigurationModel<CONFIG>

Type Parameters:
CONFIG - type of an external config
All Superinterfaces:
Configuration, ExtendedConfig
All Known Implementing Classes:
ConfigurationModel, SystemPropertiesConfigurationModel

public interface ExternalConfigurationModel<CONFIG> extends ExtendedConfig
Model of configuration for external properties. Requires certain utilities methods to be implemented
  • Method Details

    • as

      <T> T as(String name, Class<T> clazz)
      Get value of a property as a definite type property shall exist in order for this method to be used. Otherwise exception is thrown
      Type Parameters:
      T - type of an expected value
      Parameters:
      name - property name
      clazz - class type of an expected value
      Returns:
      value of an expected type
    • getOptionalProperty

      <T> Optional<T> getOptionalProperty(String name, Class<T> clazz)
      Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty property
      Type Parameters:
      T - type of an expected value
      Parameters:
      name - property name
      clazz - class type of an expected value
      Returns:
      Optional object filled by a value of an expected type or by the NULL value (
    • mergeProperties

      ExternalConfigurationModel mergeProperties(Map<String,Object> inputProperties)
      Merge properties from other (found) external configuration.
      Parameters:
      inputProperties - those properties will be merged into ours
      Returns:
      current instance of the model
    • getConfig

      CONFIG getConfig()
      Obtain config object
      Returns:
      external config provider