Interface DefaultableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends DefaultableConfigurationSource<A,B,C,D>>

Type Parameters:
A - source specific query type
B - source specific executable query type
C - source specific list query type
D - defaulting strategy type
All Superinterfaces:
ConfigurationSource<A,B,C>
All Known Implementing Classes:
AbstractHashConfigurationSource, CommandLineConfigurationSource, CPropsFileConfigurationSource, MapConfigurationSource, PropertiesConfigurationSource, PropertyFileConfigurationSource, RedisConfigurationSource, VersionedRedisConfigurationSource

public interface DefaultableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends DefaultableConfigurationSource<A,B,C,D>> extends ConfigurationSource<A,B,C>

A defaultable configuration source has the ability to search for default properties if no exact result exist for a given query.

Such source relies on DefaultingStrategy to obtain the list of queries to execute from the original query (see DefaultingStrategy.getDefaultingKeys(io.inverno.mod.configuration.ConfigurationKey)).

Since:
1.5
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the original configuration source.
    Returns a proxy of the defaultable configuration source instance using the specified defaulting strategy.

    Methods inherited from interface io.inverno.mod.configuration.ConfigurationSource

    get, list
  • Method Details

    • withDefaultingStrategy

      D withDefaultingStrategy(DefaultingStrategy defaultingStrategy)

      Returns a proxy of the defaultable configuration source instance using the specified defaulting strategy.

      Parameters:
      defaultingStrategy - a defaulting strategy
      Returns:
      a new defaultable configuration source
    • unwrap

      D unwrap()

      Returns the original configuration source.

      Returns:
      a configuration source