com.opensymphony.webwork.plexus
Class PlexusObjectFactory

java.lang.Object
  extended by com.opensymphony.xwork.ObjectFactory
      extended by com.opensymphony.webwork.plexus.PlexusObjectFactory
All Implemented Interfaces:
ObjectFactoryInitializable

public class PlexusObjectFactory
extends ObjectFactory
implements ObjectFactoryInitializable

Plexus integartion. You need three optional files: plexus-request.xml, plexus-session.xml, and plexus-application.xml. The syntax of these files is:

 <plexus>
 <components>
  <component>
      <role>com.acme.MyBean</role>
      <implementation>com.acme.MyBean|com.acme.MyBeanImpl</implementation>
      <componentComposer>field|setter|?</componentComposer>
      <requirements>
          <requirement>
              <role>com.acme.MyOtherBean</role>
          </requirement>
      </requirements>
      <configuration>
          <foo>123</foo>
          <bar>hello, world</bar>
      </configuration>
      </component>
  </components>
 </plexus>
 


Constructor Summary
PlexusObjectFactory()
           
 
Method Summary
 Object buildBean(String className, Map extraContext)
          Build a generic Java object of the given type.
 void init(ServletContext servletContext)
           
 
Methods inherited from class com.opensymphony.xwork.ObjectFactory
buildAction, buildBean, buildInterceptor, buildResult, buildValidator, getClassInstance, getContinuationPackage, getObjectFactory, isNoArgConstructorRequired, setContinuationPackage, setObjectFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlexusObjectFactory

public PlexusObjectFactory()
Method Detail

init

public void init(ServletContext servletContext)
Specified by:
init in interface ObjectFactoryInitializable

buildBean

public Object buildBean(String className,
                        Map extraContext)
                 throws Exception
Description copied from class: ObjectFactory
Build a generic Java object of the given type.

Overrides:
buildBean in class ObjectFactory
Parameters:
className - the type of Object to build
extraContext - a Map of extra context which uses the same keys as the ActionContext
Throws:
Exception

WebWork Project Page