public class LiquibaseConfiguration extends Object implements SingletonObject
Because this class focuses on raw/untyped access to what is actually configured, it is usually best to interact with ConfigurationDefinition instances
which provide type safety, standardized key naming, default values, and more.
"Registered" configuration definitions will be available for generated help.
This class will search through the configured ConfigurationValueProviders. Standard value providers are auto-loaded on startup, but more can be added/removed at runtime.
| Modifier | Constructor and Description |
|---|---|
protected |
LiquibaseConfiguration() |
public static LiquibaseConfiguration getInstance()
Scope.getSingleton(Class)public void init(Scope scope)
public void registerProvider(ConfigurationValueProvider valueProvider)
ConfigurationValueProvider to the active collection of providers.public boolean unregisterProvider(ConfigurationValueProvider valueProvider)
ConfigurationValueProvider from the active collection of providers.public boolean removeProvider(ConfigurationValueProvider provider)
ConfigurationValueProvider from the active collection of providers.public <T extends ConfigurationContainer> T getConfiguration(Class<T> type)
ConfigurationDefinition instances directlypublic SortedSet<ConfigurationValueProvider> getProviders()
public <DataType> ConfiguredValue<DataType> getCurrentConfiguredValue(ConfigurationValueConverter<DataType> converter, ConfigurationValueObfuscator<DataType> obfuscator, String... keyAndAliases)
keyAndAliases - The first element should be the canonical key name, with later elements being aliases. At least one element must be provided.public void registerDefinition(ConfigurationDefinition<?> definition)
ConfigurationDefinition so it will be returned by getRegisteredDefinitions(boolean)public SortedSet<ConfigurationDefinition<?>> getRegisteredDefinitions(boolean includeInternal)
ConfigurationDefinitions. Registered definitions are used for generated help documentation.includeInternal - if true, include ConfigurationDefinition.isInternal() definitions.public ConfigurationDefinition<?> getRegisteredDefinition(String key)
ConfigurationDefinition asssociated with this key. Null if none match.Copyright © 2022 Liquibase.org. All rights reserved.