public class ConfigurationDefinition<DataType> extends Object implements Comparable<ConfigurationDefinition<DataType>>
LiquibaseConfiguration
ConfigurationDefinitions that are registered with LiquibaseConfiguration.registerDefinition(ConfigurationDefinition) will
be available in generated help etc.
These objects are immutable, so to construct definitions, use ConfigurationDefinition.Builder
The definition keys should be dot-separated, camelCased names, using a unique "namespace" as part of it. For example:
yourCorp.yourPropertyor
yourCorp.sub.otherProperty. Liquibase uses "liquibase" as the base namespace like
liquibase.shouldRun
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurationDefinition.Builder
Used to construct new
ConfigurationDefinition instances. |
static class |
ConfigurationDefinition.Building<DataType> |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ConfigurationDefinition o) |
boolean |
equals(Object o) |
boolean |
equalsKey(String key)
Return true if the given key matches this definition.
|
Set<String> |
getAliasKeys() |
boolean |
getCommonlyUsed()
Returns true if this is configuration users are often interested in setting.
|
ConfiguredValue<DataType> |
getCurrentConfiguredValue() |
DataType |
getCurrentValue()
Convenience method around
getCurrentConfiguredValue() to return the value. |
DataType |
getCurrentValueObfuscated()
Convenience method around
getCurrentConfiguredValue() to return the obfuscated version of the value. |
Class<DataType> |
getDataType() |
DataType |
getDefaultValue()
The default value used by this definition if no value is currently configured.
|
String |
getDefaultValueDescription()
A description of the default value.
|
String |
getDescription()
A user-friendly description of this definition.
|
String |
getKey()
The standard configuration key for this definition.
|
ConfigurationValueConverter<DataType> |
getValueConverter() |
int |
hashCode() |
boolean |
isInternal()
Return true if this configuration is for internal and/or programmatic use only.
|
public DataType getCurrentValue()
getCurrentConfiguredValue() to return the value.public ConfigurationValueConverter<DataType> getValueConverter()
public DataType getCurrentValueObfuscated()
getCurrentConfiguredValue() to return the obfuscated version of the value.public ConfiguredValue<DataType> getCurrentConfiguredValue()
ConfiguredValue,public String getKey()
ConfigurationDefinition class-level docs on key format.public Set<String> getAliasKeys()
public String getDescription()
public DataType getDefaultValue()
NOTE: this is only used if none of the ConfigurationValueProviders have a configuration for the property.
Even if some return "null", that is still considered a provided value to use rather than this default.
public String getDefaultValueDescription()
String.valueOf(Object) of getDefaultValue() but
can be explicitly with CommandArgumentDefinition.Building#defaultValue(Object, String).public boolean getCommonlyUsed()
public boolean isInternal()
public int compareTo(ConfigurationDefinition o)
compareTo in interface Comparable<ConfigurationDefinition<DataType>>public boolean equalsKey(String key)
Copyright © 2022 Liquibase.org. All rights reserved.