org.apache.cocoon.forms.validation.impl
Class AbstractJavaValidator

java.lang.Object
  extended byorg.apache.cocoon.forms.validation.impl.AbstractJavaValidator
All Implemented Interfaces:
ConfigurableWidgetValidator, WidgetValidator

public abstract class AbstractJavaValidator
extends Object
implements ConfigurableWidgetValidator

Abstract base class for implementing an own Java validator which gets build by the JavaClassValidatorBuilder.

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

Field Summary
protected  ValidationError validationError
           
 
Constructor Summary
AbstractJavaValidator()
           
 
Method Summary
protected  ValidationError buildFailMessage(Element validationRuleElement)
          Checks if the validation rule configuration contains a custom failmessage, and if so, sets it one the ValidationRule.
protected abstract  ValidationError getDefaultFailMessage()
           
 void setConfiguration(Element element)
          Set the configuration Element
 
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.validation.WidgetValidator
validate
 

Field Detail

validationError

protected ValidationError validationError
Constructor Detail

AbstractJavaValidator

public AbstractJavaValidator()
Method Detail

setConfiguration

public void setConfiguration(Element element)
                      throws Exception
Description copied from interface: ConfigurableWidgetValidator
Set the configuration Element

Specified by:
setConfiguration in interface ConfigurableWidgetValidator
Throws:
Exception

buildFailMessage

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


getDefaultFailMessage

protected abstract ValidationError getDefaultFailMessage()


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