|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.configuration.AbstractConfigurationContainer
public abstract class AbstractConfigurationContainer
Base class for configuration classes used by LiquibaseConfiguration
.
Implementations must have a no-arg constructor for LiquibaseConfiguration to initialize them as needed.
AbstractConfigurationContainer implementations contain a "namespace" which can be used as the prefix to system properties or cases where there may be name conflicts.
Properties can be accessed by name using the getValue(String, Class)
method, but implementation should implement standard get/set methods for easier use.
Nested Class Summary | |
---|---|
protected static class |
AbstractConfigurationContainer.ConfigurationContainer
Like a java.util.Map, but with extra logic for working with ConfigurationProperties. |
Constructor Summary | |
---|---|
protected |
AbstractConfigurationContainer(String namespace)
Subclasses must call this constructor passing the namespace, but must themselves provide a no-arg public constructor. |
Method Summary | ||
---|---|---|
protected AbstractConfigurationContainer.ConfigurationContainer |
getContainer()
|
|
Set<ConfigurationProperty> |
getProperties()
Return all available properties. |
|
ConfigurationProperty |
getProperty(String propertyName)
Return the ConfigurationProperty object for the given property name. |
|
|
getValue(String propertyName,
Class<T> returnType)
Returns the value for the given property cast to the passed returnType. |
|
void |
init(ConfigurationValueProvider... configurationValueProviders)
Override default values for properties with the given ConfigurationProviders. |
|
void |
setValue(String propertyName,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractConfigurationContainer(String namespace)
Method Detail |
---|
protected AbstractConfigurationContainer.ConfigurationContainer getContainer()
public ConfigurationProperty getProperty(String propertyName)
getValue(String, Class)
is the easiest method to call.
getProperty
in interface ConfigurationContainer
public Set<ConfigurationProperty> getProperties()
getProperties
in interface ConfigurationContainer
public <T> T getValue(String propertyName, Class<T> returnType)
getValue
in interface ConfigurationContainer
public void init(ConfigurationValueProvider... configurationValueProviders)
init
in interface ConfigurationContainer
public void setValue(String propertyName, Object value)
setValue
in interface ConfigurationContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |