|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mindmatters.faces.spring.factory.VariableResolverProcessor
public final class VariableResolverProcessor
InstantiationAwareBeanPostProcessor that instantiates all
mananged beans with the original VariableResolver of
the underlying JSF implementation.
Usually Spring is used for bean creation - so if you want the original VariableResolver to create your managed beans put this processor into your ApplicationContext.
Note: The bean creation process will be short-circuited. E.g. no
BeanPostProcessors will be applied but beans will be initialized via
AutowireCapableBeanFactory.initializeBean(Object, String).
| Constructor Summary | |
|---|---|
VariableResolverProcessor()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
postProcessAfterInitialization(java.lang.Object bean,
java.lang.String beanName)
Apply this BeanPostProcessor to the given new bean instance after any bean initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method). |
boolean |
postProcessAfterInstantiation(java.lang.Object bean,
java.lang.String beanName)
Perform operations after the bean has been instantiated, via a constructor or factory method, but before Spring property population (from explicit properties or autowiring) occurs. |
java.lang.Object |
postProcessBeforeInitialization(java.lang.Object bean,
java.lang.String beanName)
Apply this BeanPostProcessor to the given new bean instance before any bean initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method). |
java.lang.Object |
postProcessBeforeInstantiation(java.lang.Class beanClass,
java.lang.String beanName)
Apply this BeanPostProcessor before the target bean gets instantiated. |
PropertyValues |
postProcessPropertyValues(PropertyValues pvs,
java.beans.PropertyDescriptor[] pds,
java.lang.Object bean,
java.lang.String beanName)
Post-process the given property values before the factory applies them to the given bean. |
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableResolverProcessor()
| Method Detail |
|---|
public void setBeanFactory(BeanFactory beanFactory)
Invoked after the population of normal bean properties but
before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (may not be null).
The bean can immediately call methods on the factory.BeanInitializationException
public java.lang.Object postProcessAfterInitialization(java.lang.Object bean,
java.lang.String beanName)
afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
In case of a FactoryBean, this callback will be invoked for both the FactoryBean
instance and the objects created by the FactoryBean (as of Spring 2.0). The
post-processor can decide whether to apply to either the FactoryBean or created
objects or both through corresponding bean instanceof FactoryBean checks.
This callback will also be invoked after a short-circuiting triggered by a
InstantiationAwareBeanPostProcessor.postProcessBeforeInstantiation(java.lang.Class, java.lang.String) method,
in contrast to all other BeanPostProcessor callbacks.
postProcessAfterInitialization in interface BeanPostProcessorbean - the new bean instancebeanName - the name of the bean
InitializingBean.afterPropertiesSet(),
FactoryBean
public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
java.lang.String beanName)
afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
postProcessBeforeInitialization in interface BeanPostProcessorbean - the new bean instancebeanName - the name of the bean
InitializingBean.afterPropertiesSet()
public boolean postProcessAfterInstantiation(java.lang.Object bean,
java.lang.String beanName)
postProcessAfterInstantiation in interface InstantiationAwareBeanPostProcessorbean - the bean instance created, but whose properties have not yet been setbeanName - the name of the bean
true if properties should be set on the bean; false
if property population should be skipped. Normal implementations should return true.
Returning false will also prevent any subsequent InstantiationAwareBeanPostProcessor
instances being invoked on this bean instance.
public PropertyValues postProcessPropertyValues(PropertyValues pvs,
java.beans.PropertyDescriptor[] pds,
java.lang.Object bean,
java.lang.String beanName)
Also allows for replacing the property values to apply, typically through creating a new MutablePropertyValues instance based on the original PropertyValues, adding or removing specific values.
postProcessPropertyValues in interface InstantiationAwareBeanPostProcessorpvs - the property values that the factory is about to apply (never null)pds - the relevant property descriptors for the target bean (with ignored
dependency types - which the factory handles specifically - already filtered out)bean - the bean instance created, but whose properties have not yet been setbeanName - the name of the bean
null
to skip property populationMutablePropertyValues
public java.lang.Object postProcessBeforeInstantiation(java.lang.Class beanClass,
java.lang.String beanName)
If a non-null object is returned by this method, the bean creation process
will be short-circuited. The only further processing applied is the
BeanPostProcessor.postProcessAfterInitialization(java.lang.Object, java.lang.String) callback from the configured
BeanPostProcessors.
This callback will only be applied to bean definitions with a bean class. In particular, it will not be applied to beans with a "factory-method".
postProcessBeforeInstantiation in interface InstantiationAwareBeanPostProcessorbeanClass - the class of the bean to be instantiatedbeanName - the name of the bean
null to proceed with default instantiationAbstractBeanDefinition.hasBeanClass(),
AbstractBeanDefinition.getFactoryMethodName()
|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||