EchoPoint
1.0

echopoint.validation
Class ValidationKit

java.lang.Object
  extended byechopoint.validation.ValidationKit

public class ValidationKit
extends java.lang.Object

ValidationKit contains methods that help with processing Validateables and Component heierachies that have Validateables in them.


Nested Class Summary
static interface ValidationKit.ValidationCallback
          ValidationCallback is used by ValidationKit.validate() as a call back mechanism when validating a hierarchy of Validateable components.
 
Method Summary
static void validate(nextapp.echo.Component c, ValidationKit.ValidationCallback validationCallback)
          This method will traverse the component hierarchy starting at c and find all componentsthat implement Validateable.
static boolean validate(Validateable validateable, ValidationKit.ValidationCallback validationCallback)
          This method will validate a given Validateable and return true if its valid.
static echopoint.validation.ValidationKit.DualResult validateIt(Validateable validateable, ValidationKit.ValidationCallback validationCallback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static void validate(nextapp.echo.Component c,
                            ValidationKit.ValidationCallback validationCallback)
This method will traverse the component hierarchy starting at c and find all componentsthat implement Validateable. It will then validate these objects via their ValidationRule.isValid() methods.

The validationCallback is then informed each time a rule fails and when a Validateable is invalid or valid.

Parameters:
c - - the component to start checking
validationCallback - -the call back interface for Validateable's
See Also:
ValidationKit.ValidationCallback

validate

public static boolean validate(Validateable validateable,
                               ValidationKit.ValidationCallback validationCallback)
This method will validate a given Validateable and return true if its valid.

The validationCallback is then informed each time a rule fails and when the Validateable is invalid or valid.

Parameters:
validateable - - the Validateable to validate
validationCallback - - the callback that will be informed
Returns:
true if the the Validateable is valid or false if not

validateIt

public static echopoint.validation.ValidationKit.DualResult validateIt(Validateable validateable,
                                                                       ValidationKit.ValidationCallback validationCallback)

EchoPoint
1.0