com.opensymphony.xwork2.config.entities

## Class ActionConfig.Builder

- java.lang.Object
- - com.opensymphony.xwork2.config.entities.ActionConfig.Builder

- All Implemented Interfaces:
    InterceptorListHolder
  Enclosing class:
    ActionConfig

      public static class ActionConfig.Builder
      extends Object
      implements InterceptorListHolder

  The builder for this object. An instance of this object is the only way to construct a new instance. The purpose is to enforce the immutability of the object. The methods are structured in a way to support chaining. After setting any values you need, call the `build()` method to create the object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `allowedMethods`
    `protected ActionConfig` | `target`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActionConfig.Builder(ActionConfig toClone)`
    `ActionConfig.Builder(String packageName, String name, String className)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ActionConfig.Builder` | `addAllowedMethod(Collection<String> methods)`
    `ActionConfig.Builder` | `addAllowedMethod(String methodName)`
    `ActionConfig.Builder` | `addExceptionMapping(ExceptionMappingConfig exceptionMapping)`
    `ActionConfig.Builder` | `addExceptionMappings(Collection<? extends ExceptionMappingConfig> mappings)`
    `ActionConfig.Builder` | `addInterceptor(InterceptorMapping interceptor)`
    `ActionConfig.Builder` | `addInterceptors(List<InterceptorMapping> interceptors)`
    `ActionConfig.Builder` | `addParam(String name, String value)`
    `ActionConfig.Builder` | `addParams(Map<String,String> params)`
    `ActionConfig.Builder` | `addResultConfig(ResultConfig resultConfig)`
    `ActionConfig.Builder` | `addResultConfigs(Collection<ResultConfig> configs)`
    `ActionConfig.Builder` | `addResultConfigs(Map<String,ResultConfig> configs)`
    `ActionConfig` | `build()`
    `ActionConfig.Builder` | `className(String name)`
    `ActionConfig.Builder` | `defaultClassName(String name)`
    `ActionConfig.Builder` | `exceptionMappings(Collection<? extends ExceptionMappingConfig> mappings)`
    `ActionConfig.Builder` | `interceptors(List<InterceptorMapping> interceptors)`
    `ActionConfig.Builder` | `location(Location loc)`
    `ActionConfig.Builder` | `methodName(String method)`
    `ActionConfig.Builder` | `name(String name)`
    `ActionConfig.Builder` | `packageName(String name)`
    `ActionConfig.Builder` | `setDefaultMethodRegex(String methodRegex)`
    `ActionConfig.Builder` | `setStrictMethodInvocation(boolean strictMethodInvocation)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### target

          protected ActionConfig target

    - #### allowedMethods

          protected Set<String> allowedMethods

  - ### Constructor Detail

    - #### ActionConfig.Builder

          public ActionConfig.Builder(ActionConfig toClone)

    - #### ActionConfig.Builder

          public ActionConfig.Builder(String packageName,
                              String name,
                              String className)

  - ### Method Detail

    - #### packageName

          public ActionConfig.Builder packageName(String name)

    - #### name

          public ActionConfig.Builder name(String name)

    - #### className

          public ActionConfig.Builder className(String name)

    - #### defaultClassName

          public ActionConfig.Builder defaultClassName(String name)

    - #### methodName

          public ActionConfig.Builder methodName(String method)

    - #### addExceptionMapping

          public ActionConfig.Builder addExceptionMapping(ExceptionMappingConfig exceptionMapping)

    - #### addExceptionMappings

          public ActionConfig.Builder addExceptionMappings(Collection<? extends ExceptionMappingConfig> mappings)

    - #### exceptionMappings

          public ActionConfig.Builder exceptionMappings(Collection<? extends ExceptionMappingConfig> mappings)

    - #### addInterceptor

          public ActionConfig.Builder addInterceptor(InterceptorMapping interceptor)

      Specified by:
        `addInterceptor` in interface `InterceptorListHolder`

    - #### addInterceptors

          public ActionConfig.Builder addInterceptors(List<InterceptorMapping> interceptors)

      Specified by:
        `addInterceptors` in interface `InterceptorListHolder`

    - #### interceptors

          public ActionConfig.Builder interceptors(List<InterceptorMapping> interceptors)

    - #### addParam

          public ActionConfig.Builder addParam(String name,
                                      String value)

    - #### addParams

          public ActionConfig.Builder addParams(Map<String,String> params)

    - #### addResultConfig

          public ActionConfig.Builder addResultConfig(ResultConfig resultConfig)

    - #### addResultConfigs

          public ActionConfig.Builder addResultConfigs(Collection<ResultConfig> configs)

    - #### addResultConfigs

          public ActionConfig.Builder addResultConfigs(Map<String,ResultConfig> configs)

    - #### addAllowedMethod

          public ActionConfig.Builder addAllowedMethod(String methodName)

    - #### addAllowedMethod

          public ActionConfig.Builder addAllowedMethod(Collection<String> methods)

    - #### location

          public ActionConfig.Builder location(Location loc)

    - #### setStrictMethodInvocation

          public ActionConfig.Builder setStrictMethodInvocation(boolean strictMethodInvocation)

    - #### setDefaultMethodRegex

          public ActionConfig.Builder setDefaultMethodRegex(String methodRegex)

    - #### build

          public ActionConfig build()

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