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

java.lang.Object
  extended byorg.apache.cocoon.forms.validation.impl.JavaClassValidatorBuilder
All Implemented Interfaces:
BeanFactoryAware, WidgetValidatorBuilder

public class JavaClassValidatorBuilder
extends Object
implements WidgetValidatorBuilder, BeanFactoryAware

A WidgetValidatorBuilder that uses Spring beans.

The syntax for this validator is as follows :

   <java ref="spring-bean-id"/>
 

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

Field Summary
 
Fields inherited from interface org.apache.cocoon.forms.validation.WidgetValidatorBuilder
ROLE
 
Constructor Summary
JavaClassValidatorBuilder()
           
 
Method Summary
 WidgetValidator build(Element validationRuleElement, WidgetDefinition definition)
          Builds a WidgetValidator for a particular widget definition.
 void setBeanFactory(BeanFactory beanFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaClassValidatorBuilder

public JavaClassValidatorBuilder()
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException

build

public WidgetValidator build(Element validationRuleElement,
                             WidgetDefinition definition)
                      throws Exception
Description copied from interface: WidgetValidatorBuilder
Builds a WidgetValidator for a particular widget definition.

Specified by:
build in interface WidgetValidatorBuilder
Parameters:
validationRuleElement - the DOM element defining the validator
definition - the widget definition the validator will have to validate. This may be used to check applicability of the validator to the widget.
Returns:
A WidgetValidator
Throws:
Exception - if some problem occurs
See Also:
WidgetValidatorBuilder.build(org.w3c.dom.Element, org.apache.cocoon.forms.formmodel.WidgetDefinition)


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