Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.interceptor
Class ActionMappingParametersInteceptor

    java.lang.Object
      com.opensymphony.xwork2.interceptor.AbstractInterceptor
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
              com.opensymphony.xwork2.interceptor.ParametersInterceptor
                  org.apache.struts2.interceptor.ActionMappingParametersInteceptor

All Implemented Interfaces:
  Interceptor, java.io.Serializable

    public class ActionMappingParametersInteceptor

extends ParametersInterceptor

This interceptor sets all parameters from the action mapping, for this request, on the value stack. It operates exactly like `ParametersInterceptor`, only the parameters come from the `ActionMapping`, not the `ActionContext.getParameters()` method.

Interceptor parameters:

- ordered - set to true if you want the top-down property setter behaviour

Extending the interceptor:

The best way to add behavior to this interceptor is to utilize the `ParameterNameAware` interface in your actions. However, if you wish to apply a global rule that isn't implemented in your action, then you could extend this interceptor and override the `ParametersInterceptor.acceptableName(String)` method.

Example code:

     <action name="someAction" class="com.examples.SomeAction">
         <interceptor-ref name="mappingParams"/>
         <result name="success">good_result.ftl</result>
     </action>

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
`excludeMethods, includeMethods, log`

Constructor Summary
`ActionMappingParametersInteceptor()`

Method Summary
`protected void` | `addParametersToContext(ActionContext ac, java.util.Map newParams)` Adds the parameters into context's ParameterMap
`protected java.util.Map<java.lang.String,java.lang.Object>` | `retrieveParameters(ActionContext ac)`

Methods inherited from class com.opensymphony.xwork2.interceptor.ParametersInterceptor
`acceptableName, doIntercept, getExcludeParamsSet, getOrderedComparator, isAccepted, isExcluded, isOrdered, setAcceptParamNames, setDevMode, setExcludeParams, setOrdered, setParameters, setValueStackFactory`

Methods inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
`applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods`

Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
`destroy, init`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ActionMappingParametersInteceptor

    public ActionMappingParametersInteceptor()

Method Detail

### retrieveParameters

    protected java.util.Map<java.lang.String,java.lang.Object> retrieveParameters(ActionContext ac)

  Overrides:
    `retrieveParameters` in class `ParametersInterceptor`
  Parameters:
    `ac` - The action context
  Returns:
    the parameters from the action mapping in the context. If none found, returns an empty map.

### addParametersToContext

    protected void addParametersToContext(ActionContext ac,
                                          java.util.Map newParams)

  Adds the parameters into context's ParameterMap

  Overrides:
    `addParametersToContext` in class `ParametersInterceptor`
  Parameters:
    `ac` - The action context
    `newParams` - The parameter map to apply

    In this class this is a no-op, since the parameters were fetched from the same location. In subclasses both retrieveParameters() and addParametersToContext() should be overridden.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.