|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.rules.closure.support.AlgorithmsAccessor
org.springframework.rules.constraint.ConstraintsAccessor
org.springframework.rules.support.DefaultRulesSource
public class DefaultRulesSource
A default rules source implementation which is simply a in-memory registry for bean validation rules backed by a map.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
DefaultRulesSource()
|
Method Summary | |
---|---|
void |
addRules(Rules rules)
Add or update the rules for a single bean class. |
void |
addRules(String contextId,
Rules rules)
|
PropertyConstraint |
getPropertyConstraint(Class bean,
String propertyName)
Return the validation rules for the provided bean property. |
PropertyConstraint |
getPropertyConstraint(Class bean,
String propertyName,
String contextId)
|
Rules |
getRules(Class bean)
Return the validation rules for the provided bean. |
Rules |
getRules(Class beanType,
String contextId)
|
void |
setRules(List rules)
Set the list of rules retrievable by this source, where each item in the list is a Rules object
which maintains validation rules for a bean class. |
String |
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.rules.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 |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public DefaultRulesSource()
Method Detail |
---|
public void addRules(Rules rules)
rules
- The rules.public void addRules(String contextId, Rules rules)
public void setRules(List rules)
Rules
object
which maintains validation rules for a bean class.
rules
- The list of rules.public Rules getRules(Class bean)
RulesSource
getRules
in interface RulesSource
bean
- the bean class
null
if none exist.public Rules getRules(Class beanType, String contextId)
getRules
in interface RulesSource
public PropertyConstraint getPropertyConstraint(Class bean, String propertyName)
RulesSource
getPropertyConstraint
in interface RulesSource
bean
- the bean classpropertyName
- the bean propertyName
null
if none exist.public PropertyConstraint getPropertyConstraint(Class bean, String propertyName, String contextId)
getPropertyConstraint
in interface RulesSource
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |