public class LiquibaseConfiguration extends Object
This class is the top level container used to access ConfigurationContainer
implementations which contain the actual configuration properties.
Normal use is to call LiquibaseConfiguration.getInstance().getConfiguration(NEEDED_CONFIGURATION.class).getYOUR_PROPERTY()
This class is implemented as a singleton with a single global set of configuration objects, but the setInstance(LiquibaseConfiguration)
method can be used to replace
the singleton with an alternate implementation that uses ThreadLocal objects or any other way of managing configurations.
Modifier | Constructor and Description |
---|---|
protected |
LiquibaseConfiguration()
Constructor protected to prevent construction outside getInstance()
|
Modifier and Type | Method and Description |
---|---|
protected <T extends ConfigurationContainer> |
createConfiguration(Class<T> type) |
String |
describeValueLookupLogic(Class<? extends ConfigurationContainer> config,
String property)
Convenience method for
describeValueLookupLogic(ConfigurationProperty) |
String |
describeValueLookupLogic(ConfigurationProperty property)
Generates a human consumable description of how the configured ConfigurationValueProvider(s) will attempt to set a default value.
|
<T extends ConfigurationContainer> |
getConfiguration(Class<T> type)
Return an instance of the passed AbstractConfigurationContainer type.
|
static LiquibaseConfiguration |
getInstance()
Returns the singleton instance, creating it if necessary.
|
ConfigurationProperty |
getProperty(Class<? extends ConfigurationContainer> type,
String property)
Convenience method for liquibaseConfiguration.getConfiguration(type).getProperty(property)
|
void |
init(ConfigurationValueProvider... configurationValueProviders)
Re-initialize the configuration with the given ConfigurationProviders.
|
void |
reset()
Resets existing AbstractConfigurationContainer instances to their default values.
|
static void |
setInstance(LiquibaseConfiguration instance)
Overrides the standard singleton instance created by getInstance().
|
protected LiquibaseConfiguration()
public static LiquibaseConfiguration getInstance()
SystemPropertyProvider
public static void setInstance(LiquibaseConfiguration instance)
public void init(ConfigurationValueProvider... configurationValueProviders)
public void reset()
public <T extends ConfigurationContainer> T getConfiguration(Class<T> type)
public ConfigurationProperty getProperty(Class<? extends ConfigurationContainer> type, String property)
protected <T extends ConfigurationContainer> T createConfiguration(Class<T> type)
public String describeValueLookupLogic(Class<? extends ConfigurationContainer> config, String property)
describeValueLookupLogic(ConfigurationProperty)
public String describeValueLookupLogic(ConfigurationProperty property)
Copyright © 2017 Liquibase.org. All rights reserved.