org.springframework.binding.validation.support
Class ValangRichValidator

java.lang.Object
  extended by org.springframework.binding.validation.support.ValangRichValidator
All Implemented Interfaces:
RichValidator, Validator

public class ValangRichValidator
extends Object
implements RichValidator

Implementation of RichValidator that delegates to a ValangValidator for validation.

Author:
Oliver Hutchison
See Also:
ValangValidator

Constructor Summary
ValangRichValidator(FormModel formModel, org.springmodules.validation.valang.ValangValidator validator)
           
 
Method Summary
 MessageSourceAccessor getMessageSourceAccessor()
           
protected  Collection getRulesEffectedByProperty(String propertyName)
           
protected  Object getSourceObject()
           
protected  ValidationMessage getValidationMessage(org.springmodules.validation.valang.predicates.BasicValidationRule rule)
           
protected  void ruleSatisfied(org.springmodules.validation.valang.predicates.BasicValidationRule rule)
           
protected  void ruleViolated(org.springmodules.validation.valang.predicates.BasicValidationRule rule)
           
 void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)
           
 ValidationResults validate(Object object)
          Validates the provided object.
 ValidationResults validate(Object object, String propertyName)
          Validates the given property of the provided object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValangRichValidator

public ValangRichValidator(FormModel formModel,
                           org.springmodules.validation.valang.ValangValidator validator)
Method Detail

getMessageSourceAccessor

public MessageSourceAccessor getMessageSourceAccessor()

setMessageSourceAccessor

public void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)

validate

public ValidationResults validate(Object object)
Description copied from interface: Validator
Validates the provided object.

Specified by:
validate in interface Validator
Parameters:
object - the object to validate
Returns:
the results on the validation

validate

public ValidationResults validate(Object object,
                                  String propertyName)
Description copied from interface: RichValidator
Validates the given property of the provided object.

Specified by:
validate in interface RichValidator
Parameters:
object - the object to validate (may be an implementation of
propertyName - the name of the only property that has changed since the last call to validate.
Returns:
the results on the validation

getRulesEffectedByProperty

protected Collection getRulesEffectedByProperty(String propertyName)

ruleSatisfied

protected void ruleSatisfied(org.springmodules.validation.valang.predicates.BasicValidationRule rule)

ruleViolated

protected void ruleViolated(org.springmodules.validation.valang.predicates.BasicValidationRule rule)

getValidationMessage

protected ValidationMessage getValidationMessage(org.springmodules.validation.valang.predicates.BasicValidationRule rule)

getSourceObject

protected Object getSourceObject()


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.