Class DataTypeConstraintProcessor
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor<DataTypeConstraint>
org.kuali.rice.krad.datadictionary.validation.processor.DataTypeConstraintProcessor
- All Implemented Interfaces:
ConstraintProcessor<Object,DataTypeConstraint>
public class DataTypeConstraintProcessor
extends MandatoryElementConstraintProcessor<DataTypeConstraint>
DataTypeConstraintProcessor processes constraints of type
DataTypeConstraint- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor
dataDictionaryService, dateTimeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Constraint> gets the java class type of the constraint that this contraint processor handlesgetName()gets a descriptive name of this constraint processorprocess(DictionaryValidationResult result, Object value, DataTypeConstraint constraint, AttributeValueReader attributeValueReader) process the provided constraintprotected ConstraintValidationResultprocessDataTypeConstraint(DictionaryValidationResult result, DataType dataType, Object value, AttributeValueReader attributeValueReader) validates the value provided usingDataTypeConstraintMethods inherited from class org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor
getDataDictionaryService, getDateTimeService, isOptional, setDataDictionaryService, setDateTimeService
-
Constructor Details
-
DataTypeConstraintProcessor
public DataTypeConstraintProcessor()
-
-
Method Details
-
process
public ProcessorResult process(DictionaryValidationResult result, Object value, DataTypeConstraint constraint, AttributeValueReader attributeValueReader) throws AttributeValidationException Description copied from interface:ConstraintProcessorprocess the provided constraint- Parameters:
result- - holds dictionary validation resultsvalue- - the value of the attributeconstraint- - the constraint to processattributeValueReader- - - provides access to the attribute being validated- Returns:
- the result of the constraint processing
- Throws:
AttributeValidationException- See Also:
-
getName
Description copied from interface:ConstraintProcessorgets a descriptive name of this constraint processore.g. @see CollectionSizeConstraintProcessor.CONSTRAINT_NAME
- Returns:
- a descriptive name
-
getConstraintType
Description copied from interface:ConstraintProcessorgets the java class type of the constraint that this contraint processor handles- Returns:
- an instance of
Constraint - See Also:
-
processDataTypeConstraint
protected ConstraintValidationResult processDataTypeConstraint(DictionaryValidationResult result, DataType dataType, Object value, AttributeValueReader attributeValueReader) validates the value provided usingDataTypeConstraint- Parameters:
result- - a holder for any already run validation resultsdataType- - the expected data typevalue- - the value to validateattributeValueReader- - provides access to the attribute being validated- Returns:
- the passed in result, updated with the results of the processing
-