org.riotfamily.common.beans.override
Class BeanOverrideProcessor
java.lang.Object
org.riotfamily.common.beans.override.BeanOverrideProcessor
- All Implemented Interfaces:
- BeanFactoryPostProcessor, Ordered, PriorityOrdered
public class BeanOverrideProcessor
- extends Object
- implements BeanFactoryPostProcessor, PriorityOrdered
BeanFactoryPostProcessor that can be used to replace beans that have been
defined elsewhere. Use this class when you want to write a Riot module that
needs to replace a bean which is provided by another module.
Simply defining a bean with the same id would not work, because the order
in which the module configurations are processed is not defined.
- Since:
- 6.5
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanOverrideProcessor
public BeanOverrideProcessor()
setRef
public void setRef(String ref)
setBeanDefinition
public void setBeanDefinition(BeanDefinition beanDefinition)
setBeanReplacement
public void setBeanReplacement(org.riotfamily.common.beans.override.OverrideNamespaceHandler.BeanReplacement replacement)
setMerge
public void setMerge(boolean merge)
getOrder
public int getOrder()
- Specified by:
getOrder
in interface Ordered
setOrder
public void setOrder(int order)
postProcessBeanFactory
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException
- Specified by:
postProcessBeanFactory
in interface BeanFactoryPostProcessor
- Throws:
BeansException