Top Description Fields Constructors Methods
liquibase.configuration.core

public Class EnvironmentValueProvider

extends AbstractMapConfigurationValueProvider
Class Inheritance
Imports
liquibase.GlobalConfiguration, .Scope, liquibase.command.CommandArgumentDefinition, .CommandDefinition, .CommandFactory, .CommandScope, liquibase.configuration.AbstractMapConfigurationValueProvider, .ConfigurationDefinition, .LiquibaseConfiguration, liquibase.util.StringUtil, java.util.*, java.util.concurrent.atomic.AtomicBoolean

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:

Any hyphen variant of the above would work as well, or even mix dot/hyphen variants.

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
private static final AtomicBoolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Map<?, ?>
public int
getPrecedence()

Implements liquibase.configuration.ConfigurationValueProvider.getPrecedence.

Returns the precedence of values returned by this provider.

protected String
protected boolean
keyMatches(String
the configuration key requested
wantedKey
,
String
the key stored in the map
storedKey
)

Overrides liquibase.configuration.AbstractMapConfigurationValueProvider.keyMatches.

Used by ConfigurationValueProvider#getProvidedValue(String[]) to determine of a given map entry matches the wanted key.

public void
Inherited from liquibase.configuration.AbstractMapConfigurationValueProvider:
getMapHashgetProvidedValueisValueSetlookupProvidedValue

Field Detail

environmentback to summary
private final Map<String, String> environment
printedInvalidEnvironmentVariablesMessageback to summary
private static final AtomicBoolean printedInvalidEnvironmentVariablesMessage

Constructor Detail

EnvironmentValueProviderback to summary
public EnvironmentValueProvider()

Method Detail

getMapback to summary
protected Map<?, ?> getMap()

Implements abstract liquibase.configuration.AbstractMapConfigurationValueProvider.getMap.

Annotations
@Override
getPrecedenceback to summary
public int getPrecedence()

Implements liquibase.configuration.ConfigurationValueProvider.getPrecedence.

Doc from liquibase.configuration.ConfigurationValueProvider.getPrecedence.

Returns the precedence of values returned by this provider. Higher a provider with higher precedence overrides values from lower precedence providers.

Standard provider precedence:

Annotations
@Override
getSourceDescriptionback to summary
protected String getSourceDescription()

Implements abstract liquibase.configuration.AbstractMapConfigurationValueProvider.getSourceDescription.

Annotations
@Override
keyMatchesback to summary
protected boolean keyMatches(String wantedKey, String storedKey)

Overrides liquibase.configuration.AbstractMapConfigurationValueProvider.keyMatches.

Doc from liquibase.configuration.AbstractMapConfigurationValueProvider.keyMatches.

Used by ConfigurationValueProvider#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

Parameters
wantedKey:String

the configuration key requested

storedKey:String

the key stored in the map

Annotations
@Override
validateback to summary
public void validate(CommandScope commandScope) throws IllegalArgumentException

Overrides liquibase.configuration.AbstractConfigurationValueProvider.validate.

Implements liquibase.configuration.ConfigurationValueProvider.validate.

Doc from liquibase.configuration.AbstractConfigurationValueProvider.validate.

Default implementation does no checking

Annotations
@Override