|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor<RangeConstraint> org.kuali.rice.krad.datadictionary.validation.processor.RangeConstraintProcessor
public class RangeConstraintProcessor
RangeConstraintProcessor enforces range constraints - that is, constraints that keep a number or a date within a specific range
An attribute
that is RangeConstrainable
will expose a minimum and maximum value, and these will be validated against the
passed
value in the code below.
Field Summary |
---|
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor |
---|
dataDictionaryService, dateTimeService |
Constructor Summary | |
---|---|
RangeConstraintProcessor()
|
Method Summary | |
---|---|
Class<? extends Constraint> |
getConstraintType()
gets the java class type of the constraint that this contraint processor handles |
String |
getName()
gets a descriptive name of this constraint processor |
ProcessorResult |
process(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
process the provided constraint |
protected ConstraintValidationResult |
processSingleRangeConstraint(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
validates the value provided using RangeConstraint |
protected ConstraintValidationResult |
validateRange(DictionaryValidationResult result,
Date value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
validates the date value using the range constraint provided |
protected ConstraintValidationResult |
validateRange(DictionaryValidationResult result,
Number value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
validates the number value using the range constraint provided |
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor |
---|
getDataDictionaryService, getDateTimeService, isOptional, setDataDictionaryService, setDateTimeService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeConstraintProcessor()
Method Detail |
---|
public ProcessorResult process(DictionaryValidationResult result, Object value, RangeConstraint constraint, AttributeValueReader attributeValueReader) throws AttributeValidationException
ConstraintProcessor
result
- - holds dictionary validation resultsvalue
- - the value of the attributeconstraint
- - the constraint to processattributeValueReader
- - - provides access to the attribute being validated
AttributeValidationException
ConstraintProcessor.process(org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult,
Object, org.kuali.rice.krad.datadictionary.validation.constraint.Constraint,
org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
public String getName()
ConstraintProcessor
e.g. @see CollectionSizeConstraintProcessor.CONSTRAINT_NAME
public Class<? extends Constraint> getConstraintType()
ConstraintProcessor
Constraint
ConstraintProcessor.getConstraintType()
protected ConstraintValidationResult processSingleRangeConstraint(DictionaryValidationResult result, Object value, RangeConstraint constraint, AttributeValueReader attributeValueReader) throws AttributeValidationException
RangeConstraint
result
- - a holder for any already run validation resultsvalue
- - the value to validateconstraint
- - the range constraint to useattributeValueReader
- - provides access to the attribute being validated
AttributeValidationException
protected ConstraintValidationResult validateRange(DictionaryValidationResult result, Date value, RangeConstraint constraint, AttributeValueReader attributeValueReader) throws IllegalArgumentException
result
- - a holder for any already run validation resultsvalue
- - the value to validateconstraint
- - the range constraint to useattributeValueReader
- - provides access to the attribute being validated
IllegalArgumentException
protected ConstraintValidationResult validateRange(DictionaryValidationResult result, Number value, RangeConstraint constraint, AttributeValueReader attributeValueReader) throws IllegalArgumentException
result
- - a holder for any already run validation resultsvalue
- - the value to validateconstraint
- - the range constraint to useattributeValueReader
- - provides access to the attribute being validated
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |