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 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 |
|---|---|
| public static class | ConfigurationDefinition.
Used to construct new |
| public static class | |
| private static class | ConfigurationDefinition.
Used to track configuration values converted by a handler |
| pack-priv static class | ConfigurationDefinition.
Used to track configuration values set by a default |
| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| private static final Pattern | |
| private static final String | |
| private boolean | |
| private final Class | |
| private DataType | |
| private String | |
| private String | |
| private boolean | |
| private final String | |
| private boolean | |
| private ConfigurationValueConverter | |
| private ConfigurationValueObfuscator |
| Access | Constructor and Description |
|---|---|
| private | ConfigurationDefinition(String key, Class<DataType> dataType)
Constructor private to force |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(ConfigurationDefinition<DataType>
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public boolean | |
| public Set | Returns: alternate configuration keys to check for values. Used for backwards compatibility.
|
| public boolean | |
| public ConfiguredValue | Returns: Full details on the current value for this definition. Will always return aConfiguredValue,
|
| public ConfiguredValue | Returns: Full details on the current value for this definition. Will always return aConfiguredValue,additional additionalValueProviders)ConfigurationValueProviders to use with higher priority than the ones registered in LiquibaseConfiguration. The higher the array index, the higher the priority.
|
| public DataType | getCurrentValue()
Convenience method around |
| public DataType | Returns: the obfuscated value, or the plain-text value if no obfuscator is defined for this definition.Convenience method around |
| public Class | |
| public DataType | |
| public String | |
| public String | |
| public String | |
| public ConfigurationValueConverter | |
| public int | |
| public boolean | isHidden()
Return true if this configuration should not be printed to the console for any help command. |
| public boolean |
| aliasKeys | back to summary |
|---|---|
| private final Set<String> aliasKeys | |
| ALLOWED_KEY_PATTERN | back to summary |
|---|---|
| private static final Pattern ALLOWED_KEY_PATTERN | |
| ALLOWED_KEY_REGEX | back to summary |
|---|---|
| private static final String ALLOWED_KEY_REGEX | |
| commonlyUsed | back to summary |
|---|---|
| private boolean commonlyUsed | |
| dataType | back to summary |
|---|---|
| private final Class<DataType> dataType | |
| defaultValue | back to summary |
|---|---|
| private DataType defaultValue | |
| defaultValueDescription | back to summary |
|---|---|
| private String defaultValueDescription | |
| description | back to summary |
|---|---|
| private String description | |
| internal | back to summary |
|---|---|
| private boolean internal | |
| key | back to summary |
|---|---|
| private final String key | |
| loggedUsingDefault | back to summary |
|---|---|
| private boolean loggedUsingDefault | |
| valueConverter | back to summary |
|---|---|
| private ConfigurationValueConverter<DataType> valueConverter | |
| valueObfuscator | back to summary |
|---|---|
| private ConfigurationValueObfuscator<DataType> valueObfuscator | |
| ConfigurationDefinition | back to summary |
|---|---|
| private ConfigurationDefinition(String key, Class<DataType> dataType) throws IllegalArgumentException Constructor private to force
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(ConfigurationDefinition<DataType> o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| equalsKey | back to summary |
|---|---|
| public boolean equalsKey(String key) Return true if the given key matches this definition. | |
| getAliasKeys | back to summary |
|---|---|
| public Set | |
| getCommonlyUsed | back to summary |
|---|---|
| public boolean getCommonlyUsed() Returns true if this is configuration users are often interested in setting. Used to simplify generated help by hiding less commonly used settings. | |
| getCurrentConfiguredValue | back to summary |
|---|---|
public ConfiguredValue
| |
| getCurrentConfiguredValue | back to summary |
|---|---|
public ConfiguredValue
| |
| getCurrentValue | back to summary |
|---|---|
| public DataType getCurrentValue() Convenience method around | |
| getCurrentValueObfuscated | back to summary |
|---|---|
| public DataType getCurrentValueObfuscated() Convenience method around
| |
| getDataType | back to summary |
|---|---|
public Class
| |
| getDefaultValue | back to summary |
|---|---|
| public DataType getDefaultValue() The default value used by this definition if no value is currently configured. Note this is only used if none of the | |
| getDefaultValueDescription | back to summary |
|---|---|
| public String getDefaultValueDescription() A description of the default value. Defaults to | |
| getDescription | back to summary |
|---|---|
| public String getDescription() A user-friendly description of this definition. This will be exposed to end-users in generated help. | |
| getKey | back to summary |
|---|---|
| public String getKey() The standard configuration key for this definition. See the | |
| getValueConverter | back to summary |
|---|---|
| public ConfigurationValueConverter | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isHidden | back to summary |
|---|---|
| public boolean isHidden() Return true if this configuration should not be printed to the console for any help command. | |
| isInternal | back to summary |
|---|---|
| public boolean isInternal() Return true if this configuration is for internal and/or programmatic use only. End-user facing integrations should not expose internal configurations directly. | |
ConfigurationDefinition instances.
| Modifier and Type | Field and Description |
|---|---|
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> ConfigurationDefinition. |
| defaultKeyPrefix | back to summary |
|---|---|
| private final String defaultKeyPrefix | |
| Builder | back to summary |
|---|---|
public Builder(String defaultKeyPrefix)
| |
| define | back to summary |
|---|---|
| public <T> ConfigurationDefinition. Starts a new definition with the given key. Always adds the defaultKeyPrefix. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final ConfigurationDefinition |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition | build()
Finishes building this definition AND registers it with |
| public ConfigurationDefinition | buildTemporary()
Finishes building this definition WITHOUT registering it with |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. | |
| public ConfigurationDefinition. |
| defaultKeyPrefix | back to summary |
|---|---|
| private final String defaultKeyPrefix | |
| definition | back to summary |
|---|---|
| private final ConfigurationDefinition<DataType> definition | |
| Building | back to summary |
|---|---|
| private Building(ConfigurationDefinition<DataType> definition, String defaultKeyPrefix) | |
| addAliases | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| addAliasKey | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| build | back to summary |
|---|---|
| public ConfigurationDefinition Finishes building this definition AND registers it with | |
| buildTemporary | back to summary |
|---|---|
| public ConfigurationDefinition Finishes building this definition WITHOUT registering it with | |
| setCommonlyUsed | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setDefaultValue | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setDefaultValue | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setDescription | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setHidden | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setInternal | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setValueHandler | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| setValueObfuscator | back to summary |
|---|---|
| public ConfigurationDefinition. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final DataType |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | getPrecedence()
Implements liquibase. Returns the precedence of values returned by this provider. |
| public ProvidedValue | getProvidedValue(String...
an array of keys to check, where the first element is the canonical key name, any aliases for that key as later elements. keyAndAliases)Implements liquibase. Lookup the given key(s) in this source. |
| actualKey | back to summary |
|---|---|
| private final String actualKey | |
| originalSource | back to summary |
|---|---|
| private final String originalSource | |
| value | back to summary |
|---|---|
| private final DataType value | |
| ConvertedValueProvider | back to summary |
|---|---|
| public ConvertedValueProvider(DataType value, ProvidedValue originalProvidedValue) | |
| getPrecedence | back to summary |
|---|---|
| public int getPrecedence() Implements liquibase. Doc from liquibase. Returns the precedence of values returned by this provider. Higher a provider with higher precedence overrides values from lower precedence providers.
| |
| getProvidedValue | back to summary |
|---|---|
| public ProvidedValue getProvidedValue(String... keyAndAliases) Implements liquibase. Doc from liquibase. Lookup the given key(s) in this source. It is up to the implementation to provide any "smoothing" or translation of key names. For example, an EnvironmentValueProvider will look check environment variables containing _'s rather than .'s.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | getPrecedence()
Implements liquibase. Returns the precedence of values returned by this provider. |
| public ProvidedValue | getProvidedValue(String...
an array of keys to check, where the first element is the canonical key name, any aliases for that key as later elements. keyAndAliases)Implements liquibase. Lookup the given key(s) in this source. |
| value | back to summary |
|---|---|
| private final Object value | |
| DefaultValueProvider | back to summary |
|---|---|
| public DefaultValueProvider(Object value) | |
| getPrecedence | back to summary |
|---|---|
| public int getPrecedence() Implements liquibase. Doc from liquibase. Returns the precedence of values returned by this provider. Higher a provider with higher precedence overrides values from lower precedence providers.
| |
| getProvidedValue | back to summary |
|---|---|
| public ProvidedValue getProvidedValue(String... keyAndAliases) Implements liquibase. Doc from liquibase. Lookup the given key(s) in this source. It is up to the implementation to provide any "smoothing" or translation of key names. For example, an EnvironmentValueProvider will look check environment variables containing _'s rather than .'s.
| |