Class ConstraintValidationResult
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.result.ConstraintValidationResult
ConstraintValidationResult is a composite class for all the different members that need to be returned when a
ConstraintProcessor
processes a Constraint.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintValidationResult(String constraintName) creates a constraint validation result with the given constraint nameConstraintValidationResult(String constraintName, ErrorLevel level) creates a constraint validation result with the given constraint name and error level -
Method Summary
Modifier and TypeMethodDescriptionvoidallows a constraint validation result to be added as a child of the current onethe error key is used to retrieve a message to display to the userString[]voidsetAttributeName(String attributeName) voidsetAttributePath(String attributePath) voidsetConstraintLabelKey(String constraintLabelKey) voidsetConstraintName(String constraintName) voidsetEntryName(String entryName) voidprovides information used to display error messages to the user concerning a constraint validationvoidsetErrorKey(String errorKey) voidsetErrorParameters(String[] errorParameters) voidsetStatus(ErrorLevel level) voidsetWarning(String errorKey, String... errorParameters) provides information used to display warning messages to the user concerning a constraint validation
-
Constructor Details
-
ConstraintValidationResult
creates a constraint validation result with the given constraint name- Parameters:
constraintName- - a descriptive name of the current constraint processor
-
ConstraintValidationResult
creates a constraint validation result with the given constraint name and error level- Parameters:
constraintName- - a descriptive name of the current constraint processorlevel- - the applicable error level - selected fromErrorLevel
-
-
Method Details
-
addChild
allows a constraint validation result to be added as a child of the current one- Parameters:
child- - the 'child' constraint validation result
-
setError
provides information used to display error messages to the user concerning a constraint validation- Parameters:
errorKey- - a key used to fetch an error message to show the usererrorParameters- - parameters to substitute into the error message
-
setWarning
provides information used to display warning messages to the user concerning a constraint validation- Parameters:
errorKey- - a key used to fetch an warning message to show the usererrorParameters- - parameters to substitute into the warning message
-
getStatus
- Returns:
- the level
-
setStatus
- Parameters:
level- the level to set
-
getErrorKey
the error key is used to retrieve a message to display to the user- Returns:
- the errorKey
- See Also:
-
setErrorKey
- Parameters:
errorKey- the errorKey to set
-
getErrorParameters
- Returns:
- the errorParameters
-
setErrorParameters
- Parameters:
errorParameters- the errorParameters to set
-
getEntryName
- Returns:
- the entryName
-
setEntryName
- Parameters:
entryName- the entryName to set
-
getAttributeName
- Returns:
- the attributeName
-
setAttributeName
- Parameters:
attributeName- the attributeName to set
-
getConstraintName
- Returns:
- the constraintName
-
setConstraintName
- Parameters:
constraintName- the constraintName to set
-
getChildren
- Returns:
- the children
-
getConstraintLabelKey
- Returns:
- the constraintLabelKey
-
setConstraintLabelKey
- Parameters:
constraintLabelKey- the constraintLabelKey to set
-
getAttributePath
- Returns:
- the attributePath
-
setAttributePath
- Parameters:
attributePath- the attributePath to set
-