org.springframework.rules
Interface RulesSource

All Known Implementing Classes:
AttributesRulesSource, DefaultRulesSource, PetClinicValidationRulesSource, SimpleValidationRulesSource

public interface RulesSource

Rules sources provide a mechanism for accessing rules associated with a bean class and specific bean properties. A rules source is effectively a "Rules" data access object.

Author:
Keith Donald

Method Summary
 PropertyConstraint getPropertyConstraint(Class beanClass, String propertyName)
          Return the validation rules for the provided bean property.
 PropertyConstraint getPropertyConstraint(Class beanClass, String propertyName, String contextId)
           
 Rules getRules(Class bean)
          Return the validation rules for the provided bean.
 Rules getRules(Class bean, String contextId)
           
 

Method Detail

getRules

Rules getRules(Class bean)
Return the validation rules for the provided bean.

Parameters:
beanClass - the bean class
Returns:
The validation rules, or null if none exist.

getRules

Rules getRules(Class bean,
               String contextId)

getPropertyConstraint

PropertyConstraint getPropertyConstraint(Class beanClass,
                                         String propertyName)
Return the validation rules for the provided bean property.

Parameters:
beanClass - the bean class
propertyName - the bean propertyName
Returns:
The validation rules, or null if none exist.

getPropertyConstraint

PropertyConstraint getPropertyConstraint(Class beanClass,
                                         String propertyName,
                                         String contextId)


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