info.magnolia.init
Class AbstractMagnoliaConfigurationProperties
java.lang.Object
info.magnolia.init.AbstractMagnoliaConfigurationProperties
- All Implemented Interfaces:
- MagnoliaConfigurationProperties, PropertySource
- Direct Known Subclasses:
- DefaultMagnoliaConfigurationProperties
public abstract class AbstractMagnoliaConfigurationProperties
- extends Object
- implements MagnoliaConfigurationProperties
Abstract implementation, providing the basic behavior expected from a MagnoliaConfigurationProperties
implementation.
TODO: cache results.
log
protected static final org.slf4j.Logger log
sources
protected List<PropertySource> sources
PLACEHOLDER_PREFIX
protected static final String PLACEHOLDER_PREFIX
- See Also:
- Constant Field Values
PLACEHOLDER_SUFFIX
protected static final String PLACEHOLDER_SUFFIX
- See Also:
- Constant Field Values
AbstractMagnoliaConfigurationProperties
protected AbstractMagnoliaConfigurationProperties(List<PropertySource> propertySources)
init
public void init()
throws Exception
- Specified by:
init
in interface MagnoliaConfigurationProperties
- Throws:
Exception
getKeys
public Set<String> getKeys()
- Specified by:
getKeys
in interface PropertySource
getPropertySource
public PropertySource getPropertySource(String key)
- Specified by:
getPropertySource
in interface MagnoliaConfigurationProperties
getProperty
public String getProperty(String key)
- Description copied from interface:
PropertySource
- Returns a value corresponding to the given key, or null if not known.
- Specified by:
getProperty
in interface PropertySource
getBooleanProperty
public boolean getBooleanProperty(String property)
- Specified by:
getBooleanProperty
in interface PropertySource
hasProperty
public boolean hasProperty(String key)
- Specified by:
hasProperty
in interface PropertySource
describe
public String describe()
- Description copied from interface:
PropertySource
- Provides a description of this source, typically the location of the file
that was used to load the properties this source holds.
Useful for debugging / logging.
- Specified by:
describe
in interface PropertySource
toString
public String toString()
- Overrides:
toString
in class Object
parseStringValue
protected String parseStringValue(String strVal,
Set<String> visitedPlaceholders)
- Parse the given String value recursively, to be able to resolve nested placeholders. Partly borrowed from
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer (original author: Juergen Hoeller)
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.