org.springframework.richclient.samples.simple.domain
Class SimpleValidationRulesSource

java.lang.Object
  extended by org.springframework.core.closure.support.AlgorithmsAccessor
      extended by org.springframework.rules.constraint.ConstraintsAccessor
          extended by org.springframework.rules.support.DefaultRulesSource
              extended by org.springframework.richclient.samples.simple.domain.SimpleValidationRulesSource
All Implemented Interfaces:
RulesSource

public class SimpleValidationRulesSource
extends DefaultRulesSource

This class is a source for validation rules associated with the domain objects in this application. This clas is wired into application via the application context configuration like this:

    <bean id="rulesSource" 
        class="org.springframework.richclient.samples.simple.domain.SimpleValidationRulesSource"/>
 
With this configuration, validating forms will interrogate the rules source for rules that apply to the class of a form object (in this case, that's objects of type Contact.

Author:
Larry Streepy

Field Summary
 
Fields inherited from class org.springframework.rules.support.DefaultRulesSource
logger
 
Constructor Summary
SimpleValidationRulesSource()
          Construct the rules source.
 
Method Summary
 
Methods inherited from class org.springframework.rules.support.DefaultRulesSource
addRules, addRules, getPropertyConstraint, getPropertyConstraint, getRules, getRules, setRules, toString
 
Methods inherited from class org.springframework.rules.constraint.ConstraintsAccessor
all, all, and, any, any, bind, bind, bind, bind, bind, conjunction, disjunction, eq, eq, eq, eq, eq, eqProperty, eqProperty, getConstraints, gt, gt, gt, gt, gt, gt, gt, gte, gte, gte, gte, gte, gte, gte, gteProperty, gteProperty, gtProperty, gtProperty, ifTrue, ifTrueElse, inGroup, inGroup, inGroup, inRange, inRange, inRangeProperties, inRangeProperties, like, like, lt, lt, lt, lt, lt, lt, lt, lte, lte, lte, lte, lte, lte, lte, lteProperty, lteProperty, ltProperty, ltProperty, maxLength, method, minLength, not, not, or, present, present, range, range, range, range, range, range, range, regexp, regexp, required, required, testResultOf, unique, value
 
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleValidationRulesSource

public SimpleValidationRulesSource()
Construct the rules source. Just add all the rules for each class that will be validated.



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