org.apache.cocoon.forms.datatype.validationruleimpl
Class AbstractValidationRuleBuilder

java.lang.Object
  extended byorg.apache.cocoon.forms.datatype.validationruleimpl.AbstractValidationRuleBuilder
All Implemented Interfaces:
ValidationRuleBuilder
Direct Known Subclasses:
AssertValidationRuleBuilder, EmailValidationRuleBuilder, LengthValidationRuleBuilder, Mod10ValidationRuleBuilder, RangeValidationRuleBuilder, RegExpValidationRuleBuilder, ValueCountValidationRuleBuilder

public abstract class AbstractValidationRuleBuilder
extends Object
implements ValidationRuleBuilder

Abstract base class for ValidationRuleBuilder implementations.

Version:
$Id: AbstractValidationRuleBuilder.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  ExpressionManager expressionManager
           
 
Constructor Summary
AbstractValidationRuleBuilder()
           
 
Method Summary
protected  void buildFailMessage(Element validationRuleElement, AbstractValidationRule rule)
          Checks if the validation rule configuration contains a custom failmessage, and if so, sets it one the ValidationRule.
protected  org.outerj.expression.Expression parseExpression(String exprString, Element element, String attrName)
          Parses an expression and throws a nice error message if this fails.
 void setExpressionManager(ExpressionManager expressionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.forms.datatype.ValidationRuleBuilder
build
 

Field Detail

expressionManager

protected ExpressionManager expressionManager
Constructor Detail

AbstractValidationRuleBuilder

public AbstractValidationRuleBuilder()
Method Detail

buildFailMessage

protected void buildFailMessage(Element validationRuleElement,
                                AbstractValidationRule rule)
Checks if the validation rule configuration contains a custom failmessage, and if so, sets it one the ValidationRule.


parseExpression

protected org.outerj.expression.Expression parseExpression(String exprString,
                                                           Element element,
                                                           String attrName)
                                                    throws Exception
Parses an expression and throws a nice error message if this fails.

Throws:
Exception

setExpressionManager

public void setExpressionManager(ExpressionManager expressionManager)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.