Class SystemPropertiesConfigurationSource

java.lang.Object
io.inverno.mod.configuration.internal.AbstractConfigurationSource<io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyConfigurationQuery<String,SystemPropertiesConfigurationSource>,io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyExecutableConfigurationQuery<String,SystemPropertiesConfigurationSource>,io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyListConfigurationQuery<String,SystemPropertiesConfigurationSource>,String,SystemPropertiesConfigurationSource>
io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<String,SystemPropertiesConfigurationSource>
io.inverno.mod.configuration.source.SystemPropertiesConfigurationSource
All Implemented Interfaces:
ConfigurationSource

public class SystemPropertiesConfigurationSource extends io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<String,SystemPropertiesConfigurationSource>

A configuration source that looks up properties from the system properties.

Note that this source doesn't support parameterized queries, regardless of the parameters specified in a query, only the configuration key name is considered when resolving a value.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • AbstractPropertiesConfigurationSource
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource

    io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyConfigurationQuery<A,B extends io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<A,B>>, io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyConfigurationQueryResult, io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyExecutableConfigurationQuery<A,B extends io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<A,B>>, io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyListConfigurationQuery<A,B extends io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<A,B>>
  • Field Summary

    Fields inherited from class io.inverno.mod.configuration.internal.AbstractConfigurationSource

    decoder, defaultParameters, original
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a system properties configuration source.
    Creates a system properties configuration source with the specified string value decoder.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Optional<String>
    Returns the value of the property identified by the specified name.
    protected Set<String>
    Returns the list of property names managed by the source.
    The system properties source doesn't support parameterized queries, regardless of the parameters specified in a query, only the configuration key name is considered when resolving a value.

    Methods inherited from class io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource

    get, list

    Methods inherited from class io.inverno.mod.configuration.internal.AbstractConfigurationSource

    getDecoder, setDecoder, unwrap, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SystemPropertiesConfigurationSource

      public SystemPropertiesConfigurationSource()

      Creates a system properties configuration source.

    • SystemPropertiesConfigurationSource

      public SystemPropertiesConfigurationSource(SplittablePrimitiveDecoder<String> decoder)

      Creates a system properties configuration source with the specified string value decoder.

      Parameters:
      decoder - a string decoder
  • Method Details

    • withParameters

      The system properties source doesn't support parameterized queries, regardless of the parameters specified in a query, only the configuration key name is considered when resolving a value.

      Specified by:
      withParameters in interface ConfigurationSource
      Specified by:
      withParameters in class io.inverno.mod.configuration.internal.AbstractConfigurationSource<io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyConfigurationQuery<String,SystemPropertiesConfigurationSource>,io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyExecutableConfigurationQuery<String,SystemPropertiesConfigurationSource>,io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource.PropertyListConfigurationQuery<String,SystemPropertiesConfigurationSource>,String,SystemPropertiesConfigurationSource>
      Parameters:
      parameters - a list of parameters
      Returns:
      the executable configuration query
      Throws:
      IllegalArgumentException - if parameters were specified more than once
    • getPropertyValue

      protected Optional<String> getPropertyValue(String name)
      Description copied from class: io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource

      Returns the value of the property identified by the specified name.

      This methods should rely on an underlying synchronous property accessor.

      Specified by:
      getPropertyValue in class io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<String,SystemPropertiesConfigurationSource>
      Parameters:
      name - the configuration property name
      Returns:
      an optional returning the configuration property value, or an empty optional if there's no value defined for the specified key
    • listProperties

      protected Set<String> listProperties()
      Description copied from class: io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource

      Returns the list of property names managed by the source.

      Specified by:
      listProperties in class io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<String,SystemPropertiesConfigurationSource>
      Returns:
      a set of configuration property names