com.opensymphony.xwork2.interceptor
Class MethodFilterInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
- All Implemented Interfaces:
- Interceptor, java.io.Serializable
- Direct Known Subclasses:
- DefaultWorkflowInterceptor, ValidationInterceptor
public abstract class MethodFilterInterceptor
- extends AbstractInterceptor
An abstract Interceptor
that is applied to selectively according
to specified included/excluded method lists.
Setable parameters are as follows:
- excludeMethods - methods name to be excluded
- includeMethods - methods name to be included
NOTE: If method name are available in both includeMethods and
excludeMethods, it will still be considered as an included method. In short
includeMethods takes precedence over excludeMethods.
Interceptors that extends this capability would be :-
- TokenInterceptor
- TokenSessionStoreInterceptor
- DefaultWorkflowInterceptor
- ValidationInterceptor
- Version:
- $Date: 2006-09-23 23:45:01 -0500 (Sat, 23 Sep 2006) $ $Id: MethodFilterInterceptor.java 1138 2006-09-24 04:45:01Z mrdon $
- Author:
- Alexandru Popescu, Rainer Hermanns
- See Also:
org.apache.struts2.interceptor.TokenInterceptor
,
org.apache.struts2.interceptor.TokenSessionStoreInterceptor
,
DefaultWorkflowInterceptor
,
ValidationInterceptor
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected transient org.apache.commons.logging.Log log
excludeMethods
protected java.util.Set excludeMethods
includeMethods
protected java.util.Set includeMethods
MethodFilterInterceptor
public MethodFilterInterceptor()
setExcludeMethods
public void setExcludeMethods(java.lang.String excludeMethods)
getExcludeMethodsSet
public java.util.Set getExcludeMethodsSet()
setIncludeMethods
public void setIncludeMethods(java.lang.String includeMethods)
getIncludeMethodsSet
public java.util.Set getIncludeMethodsSet()
intercept
public java.lang.String intercept(ActionInvocation invocation)
throws java.lang.Exception
- Description copied from class:
AbstractInterceptor
- Override to handle interception
- Specified by:
intercept
in interface Interceptor
- Specified by:
intercept
in class AbstractInterceptor
- Returns:
- the return code, either returned from
ActionInvocation.invoke()
, or from the interceptor itself.
- Throws:
java.lang.Exception
- any system-level error, as defined in Action.execute()
.
applyInterceptor
protected boolean applyInterceptor(ActionInvocation invocation)
doIntercept
protected abstract java.lang.String doIntercept(ActionInvocation invocation)
throws java.lang.Exception
- Subclasses must override to implement the interceptor logic.
- Parameters:
invocation
- the action invocation
- Returns:
- the result of invocation
- Throws:
java.lang.Exception
Copyright © 2006 OpenSymphony. All Rights Reserved.