public class SpringObjectFactory extends ObjectFactory implements org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description | 
|---|---|
protected org.springframework.context.ApplicationContext | 
appContext  | 
protected int | 
autowireStrategy  | 
protected org.springframework.beans.factory.config.AutowireCapableBeanFactory | 
autoWiringFactory  | 
| Constructor and Description | 
|---|
SpringObjectFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
autoWireBean(Object bean)  | 
Object | 
autoWireBean(Object bean,
            org.springframework.beans.factory.config.AutowireCapableBeanFactory autoWiringFactory)  | 
Object | 
buildBean(Class clazz,
         Map<String,Object> extraContext)
Build a generic Java object of the given type. 
 | 
Object | 
buildBean(String beanName,
         Map<String,Object> extraContext,
         boolean injectInternal)
Looks up beans using Spring's application context before falling back to the method defined in the  
ObjectFactory. | 
protected org.springframework.beans.factory.config.AutowireCapableBeanFactory | 
findAutoWiringBeanFactory(org.springframework.context.ApplicationContext context)
If the given context is assignable to AutowireCapbleBeanFactory or contains a parent or a factory that is, then
 set the autoWiringFactory appropriately. 
 | 
int | 
getAutowireStrategy()  | 
Class | 
getClassInstance(String className)
Utility method to obtain the class matched to className. 
 | 
void | 
initObjectFactory()
Deprecated. 
 
Since 2.1 as it isn't necessary 
 | 
boolean | 
isNoArgConstructorRequired()
Allows for ObjectFactory implementations that support
 Actions without no-arg constructors. 
 | 
void | 
setAlwaysRespectAutowireStrategy(boolean alwaysRespectAutowireStrategy)
Determines if the autowire strategy is always followed when creating beans 
 | 
void | 
setApplicationContext(org.springframework.context.ApplicationContext appContext)
Set the Spring ApplicationContext that should be used to look beans up with. 
 | 
void | 
setApplicationContextPath(String ctx)  | 
void | 
setAutowireStrategy(int autowireStrategy)
Sets the autowiring strategy 
 | 
void | 
setEnableAopSupport(String enableAopSupport)  | 
void | 
setUseClassCache(boolean useClassCache)
Enable / disable caching of classes loaded by Spring. 
 | 
buildAction, buildBean, buildConverter, buildInterceptor, buildResult, buildUnknownHandler, buildValidator, getObjectFactory, injectInternalBeans, setActionFactory, setClassLoader, setContainer, setConverterFactory, setInterceptorFactory, setResultFactory, setUnknownHandlerFactory, setValidatorFactoryprotected org.springframework.context.ApplicationContext appContext
protected org.springframework.beans.factory.config.AutowireCapableBeanFactory autoWiringFactory
protected int autowireStrategy
public void setApplicationContextPath(String ctx)
public void setEnableAopSupport(String enableAopSupport)
public void setApplicationContext(org.springframework.context.ApplicationContext appContext)
                           throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareappContext - The Spring ApplicationContext that should be used to look beans up with.org.springframework.beans.BeansExceptionpublic void setAutowireStrategy(int autowireStrategy)
autowireStrategy - public int getAutowireStrategy()
protected org.springframework.beans.factory.config.AutowireCapableBeanFactory findAutoWiringBeanFactory(org.springframework.context.ApplicationContext context)
context - public Object buildBean(String beanName, Map<String,Object> extraContext, boolean injectInternal) throws Exception
ObjectFactory.buildBean in class ObjectFactorybeanName - The name of the bean to look up in the application contextextraContext - Exceptionpublic Object buildBean(Class clazz, Map<String,Object> extraContext) throws Exception
ObjectFactorybuildBean in class ObjectFactoryclazz - extraContext - Exceptionpublic Object autoWireBean(Object bean, org.springframework.beans.factory.config.AutowireCapableBeanFactory autoWiringFactory)
bean - autoWiringFactory - public Class getClassInstance(String className) throws ClassNotFoundException
ObjectFactorygetClassInstance in class ObjectFactoryclassName - The fully qualified name of the class to returnClassNotFoundException@Deprecated public void initObjectFactory()
public boolean isNoArgConstructorRequired()
isNoArgConstructorRequired in class ObjectFactorypublic void setUseClassCache(boolean useClassCache)
useClassCache - public void setAlwaysRespectAutowireStrategy(boolean alwaysRespectAutowireStrategy)
alwaysRespectAutowireStrategy - True if the strategy is always usedCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.