Class SystemPropertiesConfigurationSource
- All Implemented Interfaces:
ConfigurationSource
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:
-
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
ConstructorDescriptionCreates a system properties configuration source.Creates a system properties configuration source with the specified string value decoder. -
Method Summary
Modifier and TypeMethodDescriptiongetPropertyValue
(String name) Returns the value of the property identified by the specified name.Returns the list of property names managed by the source.withParameters
(List<ConfigurationKey.Parameter> parameters) 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
-
Constructor Details
-
SystemPropertiesConfigurationSource
public SystemPropertiesConfigurationSource()Creates a system properties configuration source.
-
SystemPropertiesConfigurationSource
Creates a system properties configuration source with the specified string value decoder.
- Parameters:
decoder
- a string decoder
-
-
Method Details
-
withParameters
public SystemPropertiesConfigurationSource withParameters(List<ConfigurationKey.Parameter> parameters) throws IllegalArgumentException 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 interfaceConfigurationSource
- Specified by:
withParameters
in classio.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
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 classio.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
Description copied from class:io.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource
Returns the list of property names managed by the source.
- Specified by:
listProperties
in classio.inverno.mod.configuration.internal.AbstractPropertiesConfigurationSource<String,
SystemPropertiesConfigurationSource> - Returns:
- a set of configuration property names
-