EchoPoint
1.0

echopoint.validation
Interface ValidationKit.ValidationCallback

Enclosing interface:
ValidationKit

public static interface ValidationKit.ValidationCallback

ValidationCallback is used by ValidationKit.validate() as a call back mechanism when validating a hierarchy of Validateable components.


Method Summary
 boolean onInvalid(Validateable validateable)
          This method is called when a Validateable is found to be invalid, ie it failed some or all its rules.
 boolean onInvalidRule(Validateable validateable, ValidationRule rule)
          This method is called when a ValidationRule of the Validateable's ValidationRuleSet is found to be invalid.
 void onValid(Validateable validateable)
          This method is called when a Validateable is found to be valid, ie it passed all its rules (or it has not rules).
 

Method Detail

onValid

public void onValid(Validateable validateable)
This method is called when a Validateable is found to be valid, ie it passed all its rules (or it has not rules).

Parameters:
validateable - - the Validateable that is valid

onInvalid

public boolean onInvalid(Validateable validateable)
This method is called when a Validateable is found to be invalid, ie it failed some or all its rules.

You should return true if all validation is to continue or false if it should stop abruptly.

Parameters:
validateable - - the Validateable that is invalid
Returns:
true if all validation is to continue or false if it should stop abruptly.

onInvalidRule

public boolean onInvalidRule(Validateable validateable,
                             ValidationRule rule)
This method is called when a ValidationRule of the Validateable's ValidationRuleSet is found to be invalid.

You should return true if validation of the any following ValidationRule's is to continue or false if it should stop.

Parameters:
validateable - - the Validateable that is invalid
rule - - the ValidationRule that failed.
Returns:
true if validation of this Validateable is to continue or false if it should stop.

EchoPoint
1.0