org.kuali.rice.krad.datadictionary.validation.processor
Class RangeConstraintProcessor
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor<RangeConstraint>
org.kuali.rice.krad.datadictionary.validation.processor.RangeConstraintProcessor
- All Implemented Interfaces:
- ConstraintProcessor<Object,RangeConstraint>
public class RangeConstraintProcessor
- extends MandatoryElementConstraintProcessor<RangeConstraint>
This class 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.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Method Summary |
Class<? extends Constraint> |
getConstraintType()
|
String |
getName()
|
ProcessorResult |
process(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
|
protected ConstraintValidationResult |
processSingleRangeConstraint(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
|
protected ConstraintValidationResult |
validateRange(DictionaryValidationResult result,
Date value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
|
protected ConstraintValidationResult |
validateRange(DictionaryValidationResult result,
Number value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangeConstraintProcessor
public RangeConstraintProcessor()
process
public ProcessorResult process(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
throws AttributeValidationException
- Throws:
AttributeValidationException
- See Also:
org.kuali.rice.krad.datadictionary.validation.processor.ConstraintProcessor#process(DictionaryValidationResult, Object, org.kuali.rice.krad.datadictionary.validation.capability.Validatable, org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
getName
public String getName()
getConstraintType
public Class<? extends Constraint> getConstraintType()
- See Also:
ConstraintProcessor.getConstraintType()
processSingleRangeConstraint
protected ConstraintValidationResult processSingleRangeConstraint(DictionaryValidationResult result,
Object value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
throws AttributeValidationException
- Throws:
AttributeValidationException
validateRange
protected ConstraintValidationResult validateRange(DictionaryValidationResult result,
Date value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
validateRange
protected ConstraintValidationResult validateRange(DictionaryValidationResult result,
Number value,
RangeConstraint constraint,
AttributeValueReader attributeValueReader)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.