Package liquibase.configuration.core
Class EnvironmentValueProvider
java.lang.Object
liquibase.configuration.AbstractConfigurationValueProvider
liquibase.configuration.AbstractMapConfigurationValueProvider
liquibase.configuration.core.EnvironmentValueProvider
- All Implemented Interfaces:
ConfigurationValueProvider
Searches for the configuration values in the system environment variables.
To handle shells that only allow underscores, it checks the following variations of a property:
- foo.bar - the original name
- foo_bar - with underscores for periods (if any)
- FOO.BAR - original, with upper case
- FOO_BAR - with underscores and upper case
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<?,?> getMap()intReturns the precedence of values returned by this provider.protected Stringprotected booleankeyMatches(String wantedKey, String storedKey) Used byConfigurationValueProvider.getProvidedValue(String[])to determine of a given map entry matches the wanted key.voidvalidate(CommandScope commandScope) Default implementation does no checkingMethods inherited from class liquibase.configuration.AbstractMapConfigurationValueProvider
getDescription, getMapHash, getProvidedValue, isValueSet, lookupProvidedValue
-
Constructor Details
-
EnvironmentValueProvider
public EnvironmentValueProvider()
-
-
Method Details
-
getPrecedence
public int getPrecedence()Description copied from interface:ConfigurationValueProviderReturns the precedence of values returned by this provider. Higher a provider with higher precedence overrides values from lower precedence providers.
Standard provider precedence:- 400
ScopeValueProvider - 350
DeprecatedConfigurationValueProvider - 250 Integration specific providers
- 300: TODO JNDI attributes
- 250: TODO Servlet Context
- 200
SystemPropertyValueProvider - 150 EnvironmentValueProvider
- 100: TODO profile/context specific properties files
- 50:
DefaultsFileValueProvider
- 400
-
getMap
- Specified by:
getMapin classAbstractMapConfigurationValueProvider
-
validate
Description copied from class:AbstractConfigurationValueProviderDefault implementation does no checking- Specified by:
validatein interfaceConfigurationValueProvider- Overrides:
validatein classAbstractConfigurationValueProvider- Throws:
IllegalArgumentException
-
getSourceDescription
- Specified by:
getSourceDescriptionin classAbstractMapConfigurationValueProvider
-
keyMatches
Description copied from class:AbstractMapConfigurationValueProviderUsed byConfigurationValueProvider.getProvidedValue(String[])to determine of a given map entry matches the wanted key. This implementation compares the values case-insensitively, and will replace camelCase words with kabob-case- Overrides:
keyMatchesin classAbstractMapConfigurationValueProvider- Parameters:
wantedKey- the configuration key requestedstoredKey- the key stored in the map
-