com.opensymphony.xwork.interceptor
Class MethodFilterInterceptor
java.lang.Object
com.opensymphony.xwork.interceptor.MethodFilterInterceptor
- All Implemented Interfaces:
- Interceptor, Serializable
- Direct Known Subclasses:
- DefaultWorkflowInterceptor, TokenInterceptor, ValidationInterceptor
public abstract class MethodFilterInterceptor - extends Object
- implements Interceptor
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-05-15 09:42:45 +0200 (Mon, 15 May 2006) $ $Id: MethodFilterInterceptor.java 1017 2006-05-15 09:42:45 +0200 (Mon, 15 May 2006) tmjee $
- Author:
- Alexandru Popescu, Rainer Hermanns
- See Also:
TokenInterceptor,
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 Set excludeMethods
includeMethods
protected Set includeMethods
MethodFilterInterceptor
public MethodFilterInterceptor()
setExcludeMethods
public void setExcludeMethods(String excludeMethods)
getExcludeMethodsSet
public Set getExcludeMethodsSet()
setIncludeMethods
public void setIncludeMethods(String includeMethods)
getIncludeMethodsSet
public Set getIncludeMethodsSet()
intercept
public String intercept(ActionInvocation invocation)
throws Exception
- Description copied from interface:
Interceptor
- Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the
request by the
ActionInvocation or to short-circuit the processing and just return a String return code.
- Specified by:
intercept in interface Interceptor
- Returns:
- the return code, either returned from
ActionInvocation.invoke(), or from the interceptor itself.
- Throws:
Exception - any system-level error, as defined in Action.execute().
applyInterceptor
protected boolean applyInterceptor(ActionInvocation invocation)
doIntercept
protected abstract String doIntercept(ActionInvocation invocation)
throws Exception
- Subclasses must override to implement the interceptor logic.
- Parameters:
invocation - the action invocation
- Returns:
- the result of invocation
- Throws:
Exception
destroy
public void destroy()
- Description copied from interface:
Interceptor
- Called to let an interceptor clean up any resources it has allocated.
- Specified by:
destroy in interface Interceptor
init
public void init()
- Description copied from interface:
Interceptor
- Called after an interceptor is created, but before any requests are processed using
intercept , giving
the Interceptor a chance to initialize any needed resources.
- Specified by:
init in interface Interceptor
|