org.kuali.rice.krad.datadictionary.validation.processor
Class ValidCharactersConstraintProcessor

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor<ValidCharactersConstraint>
      extended by org.kuali.rice.krad.datadictionary.validation.processor.ValidCharactersConstraintProcessor
All Implemented Interfaces:
ConstraintProcessor<Object,ValidCharactersConstraint>

public class ValidCharactersConstraintProcessor
extends MandatoryElementConstraintProcessor<ValidCharactersConstraint>

This class defines a constraint processor to ensure that attribute values are constrained to valid characters, as defined by some regular expression. Of the constraint processors written for this version, this one is potentially the most difficult to understand because it holds on to a lot of legacy processing.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String VALIDATE_METHOD
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor
dataDictionaryService, dateTimeService
 
Constructor Summary
ValidCharactersConstraintProcessor()
           
 
Method Summary
protected  ConstraintValidationResult doProcessFormattableValidCharConstraint(DictionaryValidationResult result, ValidCharactersConstraint validCharsConstraint, Formatable definition, Object value, AttributeValueReader attributeValueReader)
           
protected  ConstraintValidationResult doProcessValidCharConstraint(ValidCharactersConstraint validCharsConstraint, Object value)
           
 Class<? extends Constraint> getConstraintType()
           
 String getName()
           
 ProcessorResult process(DictionaryValidationResult result, Object value, ValidCharactersConstraint constraint, AttributeValueReader attributeValueReader)
           
protected  ConstraintValidationResult processFormatterValidation(DictionaryValidationResult result, Class<?> formatterClass, String entryName, String attributeName, String parsedAttributeValue, String errorKeyPrefix)
           
protected  ConstraintValidationResult processSingleValidCharacterConstraint(DictionaryValidationResult result, Object value, ValidCharactersConstraint constraint, AttributeValueReader attributeValueReader)
           
protected  ConstraintValidationResult validateDateOrder(String firstDateTime, String secondDateTime, String entryName, String attributeName)
           
 
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
 

Field Detail

VALIDATE_METHOD

public static final String VALIDATE_METHOD
See Also:
Constant Field Values
Constructor Detail

ValidCharactersConstraintProcessor

public ValidCharactersConstraintProcessor()
Method Detail

process

public ProcessorResult process(DictionaryValidationResult result,
                               Object value,
                               ValidCharactersConstraint 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()

processSingleValidCharacterConstraint

protected ConstraintValidationResult processSingleValidCharacterConstraint(DictionaryValidationResult result,
                                                                           Object value,
                                                                           ValidCharactersConstraint constraint,
                                                                           AttributeValueReader attributeValueReader)
                                                                    throws AttributeValidationException
Throws:
AttributeValidationException

doProcessFormattableValidCharConstraint

protected ConstraintValidationResult doProcessFormattableValidCharConstraint(DictionaryValidationResult result,
                                                                             ValidCharactersConstraint validCharsConstraint,
                                                                             Formatable definition,
                                                                             Object value,
                                                                             AttributeValueReader attributeValueReader)
                                                                      throws AttributeValidationException
Throws:
AttributeValidationException

doProcessValidCharConstraint

protected ConstraintValidationResult doProcessValidCharConstraint(ValidCharactersConstraint validCharsConstraint,
                                                                  Object value)

processFormatterValidation

protected ConstraintValidationResult processFormatterValidation(DictionaryValidationResult result,
                                                                Class<?> formatterClass,
                                                                String entryName,
                                                                String attributeName,
                                                                String parsedAttributeValue,
                                                                String errorKeyPrefix)

validateDateOrder

protected ConstraintValidationResult validateDateOrder(String firstDateTime,
                                                       String secondDateTime,
                                                       String entryName,
                                                       String attributeName)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.