Package org.apache.struts2.interceptor
Class ActionMappingParametersInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.MethodFilterInterceptor
org.apache.struts2.interceptor.parameter.ParametersInterceptor
org.apache.struts2.interceptor.ActionMappingParametersInterceptor
- All Implemented Interfaces:
- Serializable,- ConditionalInterceptor,- Interceptor
 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.isAcceptableName(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:
- 
Field SummaryFields inherited from class org.apache.struts2.interceptor.parameter.ParametersInterceptorordered, PARAM_NAME_MAX_LENGTH, requireAnnotations, requireAnnotationsTransitionMode, threadAllowlistFields inherited from class org.apache.struts2.interceptor.MethodFilterInterceptorexcludeMethods, includeMethods
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddParametersToContext(ActionContext ac, Map<String, ?> newParams) Adds the parameters into the current ActionContext's parameter map.protected HttpParametersretrieveParameters(ActionContext actionContext) Get the parameter map from ActionMapping associated with the provided ActionContext.Methods inherited from class org.apache.struts2.interceptor.parameter.ParametersInterceptorallowlistClass, allowlistFieldIfParameterized, allowlistParameterizedTypeArg, allowlistParamType, allowlistReturnTypeIfParameterized, applyMemberAccessProperties, applyParameters, applyParametersOnStack, batchApplyReflectionContextState, doIntercept, getBeanInfo, getOrderedComparator, getParameterAnnotation, getParameterLogMap, getPermittedInjectionDepth, hasValidAnnotatedField, hasValidAnnotatedMember, hasValidAnnotatedPropertyDescriptor, initNewHttpParameters, initParameterMap, isAcceptableName, isAcceptableParameter, isAcceptableParameterNameAware, isAcceptableParameterValue, isAcceptableParameterValueAware, isAcceptableValue, isAccepted, isExcluded, isOrdered, isParameterAnnotatedAndAllowlist, isParamValueAccepted, isParamValueExcluded, isWithinLengthLimit, notifyDeveloperParameterException, setAcceptedPatterns, setAcceptedValuePatterns, setAcceptParamNames, setDevMode, setDynamicMethodInvocation, setExcludedPatterns, setExcludedValuePatterns, setExcludeParams, setOrdered, setParamNameMaxLength, setRequireAnnotations, setRequireAnnotationsTransitionMode, setThreadAllowlist, setValueStackFactory, toAcceptableParameters, toNewStackMethods inherited from class org.apache.struts2.interceptor.MethodFilterInterceptorapplyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethodsMethods inherited from class org.apache.struts2.interceptor.AbstractInterceptordestroy, init, setDisabled, shouldIntercept
- 
Constructor Details- 
ActionMappingParametersInterceptorpublic ActionMappingParametersInterceptor()
 
- 
- 
Method Details- 
retrieveParametersGet the parameter map from ActionMapping associated with the provided ActionContext.- Overrides:
- retrieveParametersin class- ParametersInterceptor
- Parameters:
- actionContext- The action context
- Returns:
- the parameters from the action mapping in the context. If none found, returns an empty map.
 
- 
addParametersToContextAdds the parameters into the current ActionContext's parameter map. Note: The method should avoid re-wrapping values which are already of type Parameter.- Overrides:
- addParametersToContextin class- ParametersInterceptor
- Parameters:
- ac- The action context
- newParams- The parameter map to apply
 
 
-