com.opensymphony.webwork.pico
Class PicoObjectFactory

java.lang.Object
  extended by com.opensymphony.xwork.ObjectFactory
      extended by com.opensymphony.webwork.pico.PicoObjectFactory

public class PicoObjectFactory
extends com.opensymphony.xwork.ObjectFactory

XWork ObjectFactory which uses a PicoContainer to create component instances.

Author:
Cyrille Le Clerc, Jonas Engman, Mauro Talevi, Grégory Joseph

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, com.opensymphony.xwork.config.entities.ActionConfig config, Map extraContext)
           
 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.
 com.opensymphony.xwork.interceptor.Interceptor buildInterceptor(com.opensymphony.xwork.config.entities.InterceptorConfig interceptorConfig, Map interceptorRefParams)
           
 com.opensymphony.xwork.Result buildResult(com.opensymphony.xwork.config.entities.ResultConfig resultConfig, Map extraContext)
           
 com.opensymphony.xwork.validator.Validator buildValidator(String className, Map params, Map extraContext)
           
 Class getClassInstance(String className)
          Webwork-2.2 / XWork-1.1 method.
 boolean isNoArgConstructorRequired()
           
 
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

PicoObjectFactory

public PicoObjectFactory(org.picocontainer.defaults.ObjectReference objectReference)
Creates a PicoObjectFactory with given object reference, used to pass the http request to the factory

Parameters:
objectReference - the ObjectReference
Method Detail

isNoArgConstructorRequired

public boolean isNoArgConstructorRequired()
Overrides:
isNoArgConstructorRequired in class com.opensymphony.xwork.ObjectFactory

buildBean

public Object buildBean(Class clazz,
                        Map extraContext)
                 throws Exception
Webwork-2.2 / XWork-1.1 method. ExtraContext can be ignored.

Overrides:
buildBean in class com.opensymphony.xwork.ObjectFactory
Throws:
Exception

buildBean

public Object buildBean(String className,
                        Map extraContext)
                 throws Exception
Webwork-2.2 / XWork-1.1 method. ExtraContext can be ignored.

Overrides:
buildBean in class com.opensymphony.xwork.ObjectFactory
Throws:
Exception

getClassInstance

public Class getClassInstance(String className)
                       throws ClassNotFoundException
Webwork-2.2 / XWork-1.1 method. Used to validate a class be loaded. Using actionsContainerFactory for consistency with build methods.

Overrides:
getClassInstance in class com.opensymphony.xwork.ObjectFactory
Throws:
ClassNotFoundException

buildAction

public Object buildAction(String actionName,
                          String namespace,
                          com.opensymphony.xwork.config.entities.ActionConfig config,
                          Map extraContext)
                   throws Exception
Overrides:
buildAction in class com.opensymphony.xwork.ObjectFactory
Throws:
Exception

buildInterceptor

public com.opensymphony.xwork.interceptor.Interceptor buildInterceptor(com.opensymphony.xwork.config.entities.InterceptorConfig interceptorConfig,
                                                                       Map interceptorRefParams)
                                                                throws com.opensymphony.xwork.config.ConfigurationException
Overrides:
buildInterceptor in class com.opensymphony.xwork.ObjectFactory
Throws:
com.opensymphony.xwork.config.ConfigurationException

buildResult

public com.opensymphony.xwork.Result buildResult(com.opensymphony.xwork.config.entities.ResultConfig resultConfig,
                                                 Map extraContext)
                                          throws Exception
Overrides:
buildResult in class com.opensymphony.xwork.ObjectFactory
Throws:
Exception

buildValidator

public com.opensymphony.xwork.validator.Validator buildValidator(String className,
                                                                 Map params,
                                                                 Map extraContext)
                                                          throws Exception
Overrides:
buildValidator in class com.opensymphony.xwork.ObjectFactory
Throws:
Exception

buildBean

public Object buildBean(Class actionClass)
                 throws Exception
Instantiates an action using the PicoContainer found in the request scope.

Throws:
Exception

buildBean

public Object buildBean(String className)
                 throws Exception
Throws:
Exception


Copyright © 2013 OpenSymphony. All Rights Reserved.