public class ActionMappingParametersInterceptor 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:
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>
ConditionalInterceptor.LegacyAdapter
ordered, PARAM_NAME_MAX_LENGTH, requireAnnotations, requireAnnotationsTransitionMode, threadAllowlist
excludeMethods, includeMethods
Constructor and Description |
---|
ActionMappingParametersInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParametersToContext(ActionContext ac,
Map<String,?> newParams)
Adds the parameters into the current ActionContext's parameter map.
|
protected HttpParameters |
retrieveParameters(ActionContext actionContext)
Get the parameter map from ActionMapping associated with the provided ActionContext.
|
acceptableName, acceptableValue, allowlistClass, allowlistFieldIfParameterized, allowlistParameterizedTypeArg, allowlistParamType, allowlistReturnTypeIfParameterized, applyMemberAccessProperties, applyParameters, applyParametersOnStack, batchApplyReflectionContextState, doIntercept, getBeanInfo, getOrderedComparator, getParameterAnnotation, getParameterLogMap, getPermittedInjectionDepth, hasValidAnnotatedField, hasValidAnnotatedMember, hasValidAnnotatedPropertyDescriptor, 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, setParameters, setParamNameMaxLength, setRequireAnnotations, setRequireAnnotationsTransitionMode, setThreadAllowlist, setValueStackFactory, toAcceptableParameters, toNewStack
applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods
intercept, shouldIntercept, shouldIntercept
destroy, init, setDisabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adapt
adapt
destroy, init
protected HttpParameters retrieveParameters(ActionContext actionContext)
retrieveParameters
in class ParametersInterceptor
actionContext
- The action contextprotected void addParametersToContext(ActionContext ac, Map<String,?> newParams)
addParametersToContext
in class ParametersInterceptor
ac
- The action contextnewParams
- The parameter map to applyCopyright © 2000–2024 Apache Software Foundation. All rights reserved.