Class ModifyPopulatorListBeanPostProcessor
java.lang.Object
de.hybris.platform.converters.impl.ModifyPopulatorListBeanPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.config.BeanPostProcessor
public class ModifyPopulatorListBeanPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware
This is BeanPostProcessor for adding populators into existing populatorList or any parent in spring declaration.
It process all instances of ModifyPopulatorList beans and applies modification stored in those beans to given
objects. If for some reasons (lazyInit) ModifyPopulatorList is not instanciated then this post processor will
not get triggered which may lead to some nasty bugs.
Forcing this BeanPostProcessor to load all ModifyPopulatorList instances during its initialization (via
dependency injection or by extracting them form ApplicationContext) will lead to change in order in which beans are
intialized. Especially some beans will be instanciated before other BeanPostProcessors which may highly affect
stability of the system, so its a bad idea.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpostProcessAfterInitialization(Object bean, String beanName) postProcessBeforeInitialization(Object bean, String beanName) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Constructor Details
-
ModifyPopulatorListBeanPostProcessor
public ModifyPopulatorListBeanPostProcessor()
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
initialize
@PostConstruct public void initialize() -
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-