|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.ObjectFactory
com.opensymphony.webwork.pico.PicoObjectFactory
public class PicoObjectFactory
XWork ObjectFactory which uses a PicoContainer to create component instances.
Constructor Summary | |
---|---|
PicoObjectFactory(org.picocontainer.defaults.ObjectReference objectReference)
Creates a PicoObjectFactory with given object reference, used to pass the http request to the factory |
Method Summary | |
---|---|
Object |
buildAction(String actionName,
String namespace,
ActionConfig config,
Map extraContext)
Build an instance of the action class to handle a web request |
Object |
buildBean(Class actionClass)
Instantiates an action using the PicoContainer found in the request scope. |
Object |
buildBean(Class clazz,
Map extraContext)
Webwork-2.2 / XWork-1.1 method. |
Object |
buildBean(String className)
|
Object |
buildBean(String className,
Map extraContext)
Webwork-2.2 / XWork-1.1 method. |
Interceptor |
buildInterceptor(InterceptorConfig interceptorConfig,
Map interceptorRefParams)
Builds an Interceptor from the InterceptorConfig and the Map of parameters from the interceptor reference. |
Result |
buildResult(ResultConfig resultConfig,
Map extraContext)
Build a Result using the type in the ResultConfig and set the parameters in the ResultConfig. |
Validator |
buildValidator(String className,
Map params,
Map extraContext)
Build a Validator of the given type and set the parameters on it |
Class |
getClassInstance(String className)
Webwork-2.2 / XWork-1.1 method. |
boolean |
isNoArgConstructorRequired()
Allows for ObjectFactory implementations that support Actions without no-arg constructors. |
Methods inherited from class com.opensymphony.xwork.ObjectFactory |
---|
getContinuationPackage, getObjectFactory, setContinuationPackage, setObjectFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PicoObjectFactory(org.picocontainer.defaults.ObjectReference objectReference)
objectReference
- the ObjectReferenceMethod Detail |
---|
public boolean isNoArgConstructorRequired()
ObjectFactory
isNoArgConstructorRequired
in class ObjectFactory
public Object buildBean(Class clazz, Map extraContext) throws Exception
buildBean
in class ObjectFactory
clazz
- the type of Object to buildextraContext
- a Map of extra context which uses the same keys as the ActionContext
Exception
public Object buildBean(String className, Map extraContext) throws Exception
buildBean
in class ObjectFactory
className
- the type of Object to buildextraContext
- a Map of extra context which uses the same keys as the ActionContext
Exception
public Class getClassInstance(String className) throws ClassNotFoundException
getClassInstance
in class ObjectFactory
className
- The fully qualified name of the class to return
ClassNotFoundException
public Object buildAction(String actionName, String namespace, ActionConfig config, Map extraContext) throws Exception
ObjectFactory
buildAction
in class ObjectFactory
actionName
- the name the action configuration is set up with in the configurationnamespace
- the namespace the action is configured inconfig
- the action configuration found in the config for the actionName / namespaceextraContext
- a Map of extra context which uses the same keys as the ActionContext
Exception
public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map interceptorRefParams) throws ConfigurationException
ObjectFactory
buildInterceptor
in class ObjectFactory
interceptorConfig
- the InterceptorConfig from the configurationinterceptorRefParams
- a Map of params provided in the Interceptor reference in the
Action mapping or InterceptorStack definition
ConfigurationException
public Result buildResult(ResultConfig resultConfig, Map extraContext) throws Exception
ObjectFactory
buildResult
in class ObjectFactory
resultConfig
- the ResultConfig found for the action with the result code returnedextraContext
- a Map of extra context which uses the same keys as the ActionContext
Exception
public Validator buildValidator(String className, Map params, Map extraContext) throws Exception
ObjectFactory
buildValidator
in class ObjectFactory
className
- the type of Validator to buildparams
- property name -> value Map to set onto the Validator instanceextraContext
- a Map of extra context which uses the same keys as the ActionContext
Exception
public Object buildBean(Class actionClass) throws Exception
Exception
public Object buildBean(String className) throws Exception
Exception
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |