Package liquibase.configuration
Class ConfiguredValue<DataType>
- java.lang.Object
-
- liquibase.configuration.ConfiguredValue<DataType>
-
public class ConfiguredValue<DataType> extends Object
This wraps all theProvidedValue
s to return the overall value returned from the collection ofConfigurationValueProvider
s. Returned byLiquibaseConfiguration.getCurrentConfiguredValue(ConfigurationValueConverter, ConfigurationValueObfuscator, String...)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConfiguredValue(String key, ConfigurationValueConverter<DataType> converter, ConfigurationValueObfuscator<DataType> obfuscator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
found()
ProvidedValue
getProvidedValue()
Returns the "winning" value across all the possibleConfigurationValueProvider
.List<ProvidedValue>
getProvidedValues()
DataType
getValue()
DataType
getValueObfuscated()
void
override(Object newValue, String sourceDescription)
Modifies the current configured value.void
override(ProvidedValue details)
Replaces the current configured value with a higher-precedence one.boolean
wasDefaultValueUsed()
Return true if a default value was the "winning" value
-
-
-
Constructor Detail
-
ConfiguredValue
protected ConfiguredValue(String key, ConfigurationValueConverter<DataType> converter, ConfigurationValueObfuscator<DataType> obfuscator)
-
-
Method Detail
-
getValue
public DataType getValue()
-
getValueObfuscated
public DataType getValueObfuscated()
-
getProvidedValue
public ProvidedValue getProvidedValue()
Returns the "winning" value across all the possibleConfigurationValueProvider
. AProvidedValue
is always returned, even if the value was not configured.- See Also:
found()
-
wasDefaultValueUsed
public boolean wasDefaultValueUsed()
Return true if a default value was the "winning" value- Returns:
- boolean
-
override
public void override(ProvidedValue details)
Replaces the current configured value with a higher-precedence one. If a null value is passed, do nothing.
-
override
public void override(Object newValue, String sourceDescription)
Modifies the current configured value. If a new provider is overriding the old value, useoverride(ProvidedValue)
. This is for changing the value outside the "provider" infrastructure.
-
getProvidedValues
public List<ProvidedValue> getProvidedValues()
- Returns:
- a full list of where the configuration value was set and/or overridden.
-
found
public boolean found()
- Returns:
- true if a value was found across the providers.
-
-