org.kuali.rice.krad.datadictionary.validation.processor
Class ValidCharactersConstraintProcessor
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.processor.MandatoryElementConstraintProcessor<ValidCharactersConstraint>
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)
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()
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,
ValidCharactersConstraint constraint,
AttributeValueReader attributeValueReader)
process the provided constraint |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALIDATE_METHOD
public static final String VALIDATE_METHOD
- See Also:
- Constant Field Values
ValidCharactersConstraintProcessor
public ValidCharactersConstraintProcessor()
process
public ProcessorResult process(DictionaryValidationResult result,
Object value,
ValidCharactersConstraint constraint,
AttributeValueReader attributeValueReader)
throws AttributeValidationException
- Description copied from interface:
ConstraintProcessor
- process 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:
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()
- Description copied from interface:
ConstraintProcessor
- gets a descriptive name of this constraint processor
e.g. @see CollectionSizeConstraintProcessor.CONSTRAINT_NAME
- Returns:
- a descriptive name
getConstraintType
public Class<? extends Constraint> getConstraintType()
- Description copied from interface:
ConstraintProcessor
- gets the java class type of the constraint that this contraint processor handles
- Returns:
- an instance of
Constraint
- 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-2013 The Kuali Foundation. All Rights Reserved.