org.apache.cocoon.woody.validation.impl
Class ValidationRuleValidator

java.lang.Object
  extended by org.apache.cocoon.woody.validation.impl.ValidationRuleValidator
All Implemented Interfaces:
WidgetValidator

public class ValidationRuleValidator
extends Object
implements WidgetValidator

An adapter to transform a ValidationRule into a WidgetValidator.

Version:
CVS $Id: ValidationRuleValidator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Sylvain Wallez

Constructor Summary
ValidationRuleValidator(ValidationRule rule)
           
 
Method Summary
 boolean validate(Widget widget, FormContext context)
          Validate a widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationRuleValidator

public ValidationRuleValidator(ValidationRule rule)
Method Detail

validate

public boolean validate(Widget widget,
                        FormContext context)
Description copied from interface: WidgetValidator
Validate a widget.

Specified by:
validate in interface WidgetValidator
Parameters:
widget - the widget to validate
context - the form context
Returns:
true if validation was successful. If not, the validator must have set a ValidationError on the widget or one of its children.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.