org.apache.cocoon.core.container.spring.avalon
Class AvalonBeanPostProcessor

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor
All Implemented Interfaces:
BeanFactoryAware, BeanPostProcessor, DestructionAwareBeanPostProcessor

public class AvalonBeanPostProcessor
extends org.apache.cocoon.util.AbstractLogEnabled
implements DestructionAwareBeanPostProcessor, BeanFactoryAware

This is a Spring BeanPostProcessor adding support for the Avalon lifecycle interfaces.

Since:
2.2
Version:
$Id: AvalonBeanPostProcessor.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  BeanFactory beanFactory
           
protected  ConfigurationInfo configurationInfo
           
protected  Context context
           
protected static Configuration EMPTY_CONFIG
           
protected  String location
           
protected  ResourceLoader resourceLoader
           
protected  org.apache.cocoon.configuration.Settings settings
           
 
Constructor Summary
AvalonBeanPostProcessor()
           
 
Method Summary
protected  Configuration getAndCreateConfiguration(Configuration config, String name)
           
protected  List getKeys(Properties mergedProps, String role)
           
 void init()
           
 Object postProcessAfterInitialization(Object bean, String beanName)
           
 void postProcessBeforeDestruction(Object bean, String beanName)
           
 Object postProcessBeforeInitialization(Object bean, String beanName)
           
 void setBeanFactory(BeanFactory factory)
           
 void setConfigurationInfo(ConfigurationInfo configurationInfo)
           
 void setContext(Context context)
           
 void setLocation(String value)
           
 void setResourceLoader(ResourceLoader loader)
           
 void setSettings(org.apache.cocoon.configuration.Settings settings)
           
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_CONFIG

protected static final Configuration EMPTY_CONFIG

context

protected Context context

beanFactory

protected BeanFactory beanFactory

configurationInfo

protected ConfigurationInfo configurationInfo

settings

protected org.apache.cocoon.configuration.Settings settings

resourceLoader

protected ResourceLoader resourceLoader

location

protected String location
Constructor Detail

AvalonBeanPostProcessor

public AvalonBeanPostProcessor()
Method Detail

setSettings

public void setSettings(org.apache.cocoon.configuration.Settings settings)

setResourceLoader

public void setResourceLoader(ResourceLoader loader)

setLocation

public void setLocation(String value)

setBeanFactory

public void setBeanFactory(BeanFactory factory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException
See Also:
BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)

setConfigurationInfo

public void setConfigurationInfo(ConfigurationInfo configurationInfo)

setContext

public void setContext(Context context)

init

public void init()

getKeys

protected List getKeys(Properties mergedProps,
                       String role)

getAndCreateConfiguration

protected Configuration getAndCreateConfiguration(Configuration config,
                                                  String name)

postProcessAfterInitialization

public Object postProcessAfterInitialization(Object bean,
                                             String beanName)
                                      throws BeansException
Specified by:
postProcessAfterInitialization in interface BeanPostProcessor
Throws:
BeansException
See Also:
BeanPostProcessor.postProcessAfterInitialization(Object, String)

postProcessBeforeInitialization

public Object postProcessBeforeInitialization(Object bean,
                                              String beanName)
                                       throws BeansException
Specified by:
postProcessBeforeInitialization in interface BeanPostProcessor
Throws:
BeansException
See Also:
BeanPostProcessor.postProcessBeforeInitialization(Object, String)

postProcessBeforeDestruction

public void postProcessBeforeDestruction(Object bean,
                                         String beanName)
                                  throws BeansException
Specified by:
postProcessBeforeDestruction in interface DestructionAwareBeanPostProcessor
Throws:
BeansException
See Also:
DestructionAwareBeanPostProcessor.postProcessBeforeDestruction(Object, String)


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.