|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor
public class DefaultWorkflowInterceptor
An interceptor that does some basic validation workflow before allowing the interceptor chain to continue.
This interceptor does nothing if the name of the method being invoked is specified in the excludeMethods parameter. excludeMethods accepts a comma-delimited list of method names. For example, requests to foo!input.action and foo!back.action will be skipped by this interceptor if you set the excludeMethods parameter to "input, back". The order of execution in the workflow is:Validateable, the action's validate method is called.ValidationAware, the action's hasErrors method is called. If this method returns true, this interceptor stops the chain from continuing and
immediately returns Action.INPUT
<action name="someAction" class="com.examples.SomeAction">
<interceptor-ref name="params"/>
<interceptor-ref name="validation"/>
<interceptor-ref name="workflow"/>
<result name="success">good_result.ftl</result>
</action>
| Constructor Summary | |
|---|---|
DefaultWorkflowInterceptor()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Called to let an interceptor clean up any resources it has allocated. |
void |
init()
Called after an interceptor is created, but before any requests are processed using intercept , giving
the Interceptor a chance to initialize any needed resources. |
String |
intercept(ActionInvocation invocation)
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. |
void |
setExcludeMethods(String excludeMethods)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultWorkflowInterceptor()
| Method Detail |
|---|
public void setExcludeMethods(String excludeMethods)
public String intercept(ActionInvocation invocation)
throws Exception
InterceptorActionInvocation or to short-circuit the processing and just return a String return code.
intercept in interface InterceptorActionInvocation.invoke(), or from the interceptor itself.
Exception - any system-level error, as defined in Action.execute().public void destroy()
Interceptor
destroy in interface Interceptorpublic void init()
Interceptorintercept , giving
the Interceptor a chance to initialize any needed resources.
init in interface Interceptor
|
XWork Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||