com.opensymphony.xwork.validator
Class ValidationInterceptor

java.lang.Object
  extended bycom.opensymphony.xwork.interceptor.AroundInterceptor
      extended bycom.opensymphony.xwork.validator.ValidationInterceptor
All Implemented Interfaces:
Interceptor

public class ValidationInterceptor
extends AroundInterceptor

Validates an action. This interceptor extends the AroundInterceptor and implements only the AroundInterceptor.before(com.opensymphony.xwork.ActionInvocation) method. This class simply class the ActionValidatorManager.validate(java.lang.Object, java.lang.String) method with the given Action and its context.

Author:
Jason Carreira

Field Summary
 
Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
log
 
Constructor Summary
ValidationInterceptor()
           
 
Method Summary
protected  void after(ActionInvocation dispatcher, String result)
          Does nothing in this implementation.
protected  void before(ActionInvocation invocation)
          Gets the current action and its context and calls ActionValidatorManager.validate(java.lang.Object, java.lang.String).
 
Methods inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor
destroy, init, intercept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationInterceptor

public ValidationInterceptor()
Method Detail

after

protected void after(ActionInvocation dispatcher,
                     String result)
              throws Exception
Does nothing in this implementation.

Specified by:
after in class AroundInterceptor
Parameters:
result - the result value returned by the invocation
Throws:
Exception

before

protected void before(ActionInvocation invocation)
               throws Exception
Gets the current action and its context and calls ActionValidatorManager.validate(java.lang.Object, java.lang.String).

Specified by:
before in class AroundInterceptor
Parameters:
invocation - the execution state of the Action.
Throws:
Exception - if an error occurs validating the action.

XWork Project Page