public class ParameterRemoverInterceptor extends AbstractInterceptor
<action name="sample" class="org.martingilday.Sample"> <interceptor-ref name="paramRemover"> <param name="paramNames">aParam,anotherParam</param> <param name="paramValues">--,-1</param> </interceptor-ref> <interceptor-ref name="defaultStack" /> ... </action>
Constructor and Description |
---|
ParameterRemoverInterceptor() |
Modifier and Type | Method and Description |
---|---|
String |
intercept(ActionInvocation invocation)
Decide if the parameter should be removed from the parameter map based on
paramNames and paramValues . |
void |
setParamNames(String paramNames)
Allows
paramNames attribute to be set as comma-separated-values (csv). |
void |
setParamValues(String paramValues)
Allows
paramValues attribute to be set as a comma-separated-values (csv). |
destroy, init
public String intercept(ActionInvocation invocation) throws Exception
paramNames
and paramValues
.intercept
in interface Interceptor
intercept
in class AbstractInterceptor
invocation
- the action invocationActionInvocation.invoke()
, or from the interceptor itself.Exception
- any system-level error, as defined in Action.execute()
.AbstractInterceptor
public void setParamNames(String paramNames)
paramNames
attribute to be set as comma-separated-values (csv).paramNames
- the paramNames to setpublic void setParamValues(String paramValues)
paramValues
attribute to be set as a comma-separated-values (csv).paramValues
- the paramValues to setCopyright © 2000–2020 Apache Software Foundation. All rights reserved.