|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.core.io.support.PropertiesLoaderSupport
org.springframework.beans.factory.config.PropertyResourceConfigurer
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.apache.cocoon.spring.configurator.impl.AbstractSettingsBeanFactoryPostProcessor
This is a bean factory post processor which handles all the settings stuff for Cocoon. It reads in all properties files and replaces references to them in the spring configuration files. In addition this bean acts as a factory bean providing the settings object.
SettingsBeanFactoryPostProcessor
,
ChildSettingsBeanFactoryPostProcessor
Nested Class Summary | |
protected class |
AbstractSettingsBeanFactoryPostProcessor.CocoonSettingsResolvingBeanDefinitionVisitor
|
Field Summary | |
protected Properties |
additionalProperties
Additional properties. |
protected BeanFactory |
beanFactory
|
protected List |
directories
List of additional property directories. |
protected Log |
logger
Logger (we use the same logging mechanism as Spring!) |
protected ResourceLoader |
resourceLoader
|
protected ServletContext |
servletContext
|
protected org.apache.cocoon.configuration.MutableSettings |
settings
|
Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer |
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE |
Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport |
XML_FILE_EXTENSION |
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
AbstractSettingsBeanFactoryPostProcessor()
|
Method Summary | |
protected org.apache.cocoon.configuration.MutableSettings |
createMutableSettingsInstance()
Create a new settings object. |
protected org.apache.cocoon.configuration.MutableSettings |
createSettings()
Create a settings object. |
protected void |
dumpSettings()
Dump the settings object |
protected String |
getNameForPropertyProvider()
|
Object |
getObject()
|
Class |
getObjectType()
|
protected org.apache.cocoon.configuration.Settings |
getParentSettings()
Return a parent settings object if available. |
protected ResourceLoader |
getResourceLoader()
|
protected abstract String |
getRunningMode()
Get the running mode. |
protected String |
getSystemProperty(String key)
|
protected String |
getSystemProperty(String key,
String defaultValue)
|
void |
init()
Initialize this processor. |
boolean |
isSingleton()
|
protected void |
postInit(org.apache.cocoon.configuration.MutableSettings s,
Properties properties)
This method can be used by subclasses to initialize the settings and/or the properties after createSettings() did it's work. |
protected void |
preInit(org.apache.cocoon.configuration.MutableSettings s,
Properties properties)
This method can be used by subclasses to initialize the settings and/or the properties before createSettings() does it's work. |
protected void |
processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
|
protected String |
resolvePlaceholder(String placeholder,
Properties props)
|
void |
setAdditionalProperties(Properties props)
|
void |
setBeanFactory(BeanFactory factory)
|
void |
setDirectories(List directories)
|
void |
setResourceLoader(ResourceLoader loader)
|
void |
setServletContext(ServletContext sContext)
|
Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer |
parseStringValue, resolvePlaceholder, resolveSystemProperty, setBeanName, setIgnoreUnresolvablePlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName |
Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer |
convertProperties, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder |
Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport |
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Log logger
protected ServletContext servletContext
protected org.apache.cocoon.configuration.MutableSettings settings
protected BeanFactory beanFactory
protected ResourceLoader resourceLoader
protected Properties additionalProperties
protected List directories
Constructor Detail |
public AbstractSettingsBeanFactoryPostProcessor()
Method Detail |
public void setBeanFactory(BeanFactory factory)
setBeanFactory
in interface BeanFactoryAware
PropertyPlaceholderConfigurer.setBeanFactory(org.springframework.beans.factory.BeanFactory)
public void setServletContext(ServletContext sContext)
setServletContext
in interface ServletContextAware
ServletContextAware.setServletContext(javax.servlet.ServletContext)
public void setResourceLoader(ResourceLoader loader)
setResourceLoader
in interface ResourceLoaderAware
ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
public void setDirectories(List directories)
public void setAdditionalProperties(Properties props)
public void init() throws Exception
Exception
protected abstract String getRunningMode()
protected org.apache.cocoon.configuration.Settings getParentSettings()
protected org.apache.cocoon.configuration.MutableSettings createMutableSettingsInstance()
protected void preInit(org.apache.cocoon.configuration.MutableSettings s, Properties properties)
createSettings()
does it's work.
protected void postInit(org.apache.cocoon.configuration.MutableSettings s, Properties properties)
createSettings()
did it's work.
protected String getNameForPropertyProvider()
protected org.apache.cocoon.configuration.MutableSettings createSettings()
createMutableSettingsInstance()
.
preInit(MutableSettings, Properties)
.
PropertyProvider
if configured in the same application context (or its parent)
directories
.
additionalProperties
postInit(MutableSettings, Properties)
.
protected ResourceLoader getResourceLoader()
protected String getSystemProperty(String key)
protected String getSystemProperty(String key, String defaultValue)
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException
BeansException
PropertyPlaceholderConfigurer.processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
protected String resolvePlaceholder(String placeholder, Properties props)
PropertyPlaceholderConfigurer.resolvePlaceholder(java.lang.String, java.util.Properties)
protected void dumpSettings()
public Object getObject() throws Exception
getObject
in interface FactoryBean
Exception
FactoryBean.getObject()
public Class getObjectType()
getObjectType
in interface FactoryBean
FactoryBean.getObjectType()
public boolean isSingleton()
isSingleton
in interface FactoryBean
FactoryBean.isSingleton()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |