org.springmodules.validation.bean.context.aop
Class SimpleValidationContextInterceptor

java.lang.Object
  extended by org.springmodules.validation.bean.context.aop.AbstractValidationContextInterceptor
      extended by org.springmodules.validation.bean.context.aop.SimpleValidationContextInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class SimpleValidationContextInterceptor
extends AbstractValidationContextInterceptor

A simple implementaion of AbstractValidationContextInterceptor that is configured with a list of tokens which are always returned regardless of the specific method invocation.

Author:
Uri Boness

Constructor Summary
SimpleValidationContextInterceptor()
           
 
Method Summary
 String[] getTokens()
          Returns the validation context tokens that are always returned by this advice.
protected  String[] getValidationContextTokens(org.aopalliance.intercept.MethodInvocation methodInvocation)
          Will be implemented by all subclasses to determine what validation context tokens will be supported by the validation context associated with the given method invocation.
 void setTokens(String[] tokens)
          Sets the validation context tokens to be returned.
 
Methods inherited from class org.springmodules.validation.bean.context.aop.AbstractValidationContextInterceptor
invoke, setExtendExistingContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleValidationContextInterceptor

public SimpleValidationContextInterceptor()
Method Detail

getValidationContextTokens

protected String[] getValidationContextTokens(org.aopalliance.intercept.MethodInvocation methodInvocation)
Description copied from class: AbstractValidationContextInterceptor
Will be implemented by all subclasses to determine what validation context tokens will be supported by the validation context associated with the given method invocation.

Specified by:
getValidationContextTokens in class AbstractValidationContextInterceptor
Parameters:
methodInvocation - The given method invocation.
Returns:
The tokens supported by the validation context associated with the given method invocation.
See Also:
AbstractValidationContextInterceptor.getValidationContextTokens(org.aopalliance.intercept.MethodInvocation)

getTokens

public String[] getTokens()
Returns the validation context tokens that are always returned by this advice.

Returns:
The validation context tokens that are always returned by this advice.

setTokens

public void setTokens(String[] tokens)
Sets the validation context tokens to be returned.

Parameters:
tokens - The validation context tokens to be returned.


Copyright © 2009. All Rights Reserved.