Package org.n52.iceland.config.spring
Class ConfiguringBeanPostProcessor
- java.lang.Object
-
- org.n52.iceland.config.spring.ConfiguringBeanPostProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class ConfiguringBeanPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
Bean post processor, that configures beans using aSettingsServicebean. Configuration takes place after all dependencies are injected, but before any initialization methods are called. Note that all beans that are required to create theSettingsServicebean can not be processed.- Since:
- 1.0.0
- See Also:
Configurable,Setting
-
-
Constructor Summary
Constructors Constructor Description ConfiguringBeanPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectpostProcessAfterInitialization(Object bean, String beanName)Noop implementation, will just returnbean.ObjectpostProcessBeforeInitialization(Object bean, String beanName)Configures thebeanusing the settings service.voidsetSettingsService(SettingsService settingsService)Sets theSettingsManagerused to configure the beans.
-
-
-
Method Detail
-
setSettingsService
@Inject public void setSettingsService(SettingsService settingsService)
Sets theSettingsManagerused to configure the beans.- Parameters:
settingsService- the settings service
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName)
Configures thebeanusing the settings service.- Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Parameters:
bean- the bean instancebeanName- the bean name- Returns:
- the bean
- Throws:
org.springframework.beans.factory.BeanInitializationException- if the configuration fails
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName)
Noop implementation, will just returnbean.- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Parameters:
bean- the bean instancebeanName- the bean name- Returns:
bean
-
-