public class ConfigurationProviderImpl extends Object implements ConfigurationProvider, org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
ConfigurationProviderImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Responsible to register additional configurations for the injected
configurationMappings.
|
org.apache.commons.configuration.HierarchicalConfiguration |
getConfiguration(String name)
Load and return the configuration for the bean with the given name.
|
void |
registerConfiguration(String beanName,
org.apache.commons.configuration.HierarchicalConfiguration conf)
Register a
HierarchicalConfiguration for a bean name.It is not mandatory to use the registerConfiguration to have the configuration available as the ConfigurationProvider.getConfiguration(String) method may load
it based on conventions (naming,...). |
void |
setConfigurationMappings(Map<String,String> configurationMappings)
Inject the needed configuration mappings.
|
void |
setResourceLoader(org.springframework.core.io.ResourceLoader loader) |
public void setConfigurationMappings(Map<String,String> configurationMappings)
configurationMappings
- public void registerConfiguration(String beanName, org.apache.commons.configuration.HierarchicalConfiguration conf)
ConfigurationProvider
HierarchicalConfiguration
for a bean name.ConfigurationProvider.getConfiguration(String)
method may load
it based on conventions (naming,...).registerConfiguration
in interface ConfigurationProvider
beanName
- The bean name for which the configuration has to be
registered.conf
- The hierarchical configuration to register for the bean name.ConfigurationProvider.registerConfiguration(String, HierarchicalConfiguration)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public org.apache.commons.configuration.HierarchicalConfiguration getConfiguration(String name) throws org.apache.commons.configuration.ConfigurationException
ConfigurationProvider
ConfigurationProvider.registerConfiguration(String, HierarchicalConfiguration)
.getConfiguration
in interface ConfigurationProvider
org.apache.commons.configuration.ConfigurationException
ConfigurationProvider.getConfiguration(java.lang.String)
public void setResourceLoader(org.springframework.core.io.ResourceLoader loader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.