org.apache.struts2.plexus

## Class PlexusObjectFactory

- java.lang.Object
- - com.opensymphony.xwork2.ObjectFactory
  - - org.apache.struts2.plexus.PlexusObjectFactory

- All Implemented Interfaces:
    Serializable

      public class PlexusObjectFactory
      extends ObjectFactory

  Plexus integration. 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>

  Author:
    Emmanuel Venisse
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlexusObjectFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `buildAction(String actionName, String namespace, ActionConfig config, Map extraContext)`
    `Object` | `buildBean(Class clazz, Map extraContext)`
    `Interceptor` | `buildInterceptor(InterceptorConfig interceptorConfig, Map interceptorRefParams)`
    `Result` | `buildResult(ResultConfig resultConfig, Map extraContext)`
    `Validator` | `buildValidator(String className, Map params, Map extraContext)`
    `Class` | `getClassInstance(String className)`
    `void` | `setReflectionProvider(ReflectionProvider reflectionProvider)`
    `void` | `setServletConfig(javax.servlet.ServletContext servletContext)`

    - ### Methods inherited from class com.opensymphony.xwork2.ObjectFactory

      `buildBean, buildBean, buildConverter, buildUnknownHandler, injectInternalBeans, isNoArgConstructorRequired, setActionFactory, setClassLoader, setContainer, setConverterFactory, setInterceptorFactory, setResultFactory, setUnknownHandlerFactory, setValidatorFactory`

    - ### 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

    - #### setReflectionProvider

          public void setReflectionProvider(ReflectionProvider reflectionProvider)

    - #### setServletConfig

          public void setServletConfig(javax.servlet.ServletContext servletContext)

    - #### buildAction

          public Object buildAction(String actionName,
                           String namespace,
                           ActionConfig config,
                           Map extraContext)
                             throws Exception

      Overrides:
        `buildAction` in class `ObjectFactory`
      Throws:
        `Exception`

    - #### buildInterceptor

          public Interceptor buildInterceptor(InterceptorConfig interceptorConfig,
                                     Map interceptorRefParams)
                                       throws ConfigurationException

      Overrides:
        `buildInterceptor` in class `ObjectFactory`
      Throws:
        `ConfigurationException`

    - #### buildResult

          public Result buildResult(ResultConfig resultConfig,
                           Map extraContext)
                             throws Exception

      Overrides:
        `buildResult` in class `ObjectFactory`
      Throws:
        `Exception`

    - #### buildValidator

          public Validator buildValidator(String className,
                                 Map params,
                                 Map extraContext)
                                   throws Exception

      Overrides:
        `buildValidator` in class `ObjectFactory`
      Throws:
        `Exception`

    - #### buildBean

          public Object buildBean(Class clazz,
                         Map extraContext)
                           throws Exception

      Overrides:
        `buildBean` in class `ObjectFactory`
      Throws:
        `Exception`

    - #### getClassInstance

          public Class getClassInstance(String className)
                                 throws ClassNotFoundException

      Overrides:
        `getClassInstance` in class `ObjectFactory`
      Throws:
        `ClassNotFoundException`

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.