public class ActionMappingParametersInteceptor extends ParametersInterceptor
ParametersInterceptor, only the parameters come from the ActionMapping, not the
ActionContext.getParameters() method.
Interceptor parameters:
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>
ordered, PARAM_NAME_MAX_LENGTHexcludeMethods, includeMethods, log| Constructor and Description |
|---|
ActionMappingParametersInteceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParametersToContext(ActionContext ac,
Map newParams)
Adds the parameters into context's ParameterMap
|
protected Map<String,Object> |
retrieveParameters(ActionContext ac) |
acceptableName, doIntercept, getOrderedComparator, getParameterLogMap, isAcceptableParameter, isAcceptableValue, isAccepted, isExcluded, isOrdered, isWithinLengthLimit, notifyDeveloperParameterException, setAcceptedPatterns, setAcceptParamNames, setDevMode, setExcludedPatterns, setExcludeParams, setOrdered, setParameters, setParamNameMaxLength, setValueStackFactoryapplyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethodsdestroy, initprotected Map<String,Object> retrieveParameters(ActionContext ac)
retrieveParameters in class ParametersInterceptorac - The action contextprotected void addParametersToContext(ActionContext ac, Map newParams)
addParametersToContext in class ParametersInterceptorac - The action contextnewParams - 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.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.