Package liquibase.configuration
Class ConfiguredValue<DataType>
- java.lang.Object
-
- liquibase.configuration.ConfiguredValue<DataType>
-
public class ConfiguredValue<DataType> extends Object
This wraps all theProvidedValues to return the overall value returned from the collection ofConfigurationValueProviders. Returned byLiquibaseConfiguration.getCurrentConfiguredValue(ConfigurationValueConverter, ConfigurationValueObfuscator, String...)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConfiguredValue(String key, ConfigurationValueConverter<DataType> converter, ConfigurationValueObfuscator<DataType> obfuscator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfound()ProvidedValuegetProvidedValue()Returns the "winning" value across all the possibleConfigurationValueProvider.List<ProvidedValue>getProvidedValues()DataTypegetValue()DataTypegetValueObfuscated()voidoverride(Object newValue, String sourceDescription)Modifies the current configured value.voidoverride(ProvidedValue details)Replaces the current configured value with a higher-precedence one.booleanwasDefaultValueUsed()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. AProvidedValueis 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.
-
-