org.springmodules.validation.bean.context
Class DefaultValidationContext

java.lang.Object
  extended by org.springmodules.validation.bean.context.DefaultValidationContext
All Implemented Interfaces:
ValidationContext
Direct Known Subclasses:
ExtendingValidationContext

public class DefaultValidationContext
extends Object
implements ValidationContext

A simple and default implemenation of the ValidationContext interface.

Author:
Uri Boness

Constructor Summary
DefaultValidationContext(String token)
          Construsts a new DefaultValidationContext with a given supported validation token.
DefaultValidationContext(String[] tokens)
          Construsts a new DefaultValidationContext with given supported validation tokens.
 
Method Summary
 String[] getTokens()
           
 boolean supportsTokens(String token)
           
 boolean supportsTokens(String[] tokens)
          Returns whether this validation context supports the given validation tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValidationContext

public DefaultValidationContext(String token)
Construsts a new DefaultValidationContext with a given supported validation token.

Parameters:
token - The validation token supported by this context.

DefaultValidationContext

public DefaultValidationContext(String[] tokens)
Construsts a new DefaultValidationContext with given supported validation tokens.

Parameters:
tokens - The validation tokens supported by this context.
Method Detail

supportsTokens

public boolean supportsTokens(String token)
See Also:
supportsTokens(String[])

supportsTokens

public boolean supportsTokens(String[] tokens)
Description copied from interface: ValidationContext
Returns whether this validation context supports the given validation tokens.

Specified by:
supportsTokens in interface ValidationContext
Parameters:
tokens - The given validation tokens.
Returns:
true if this context supports the given validation tokens, false otherwise.
See Also:
ValidationContext.supportsTokens(String[])

getTokens

public String[] getTokens()


Copyright © 2009. All Rights Reserved.