Class DictionaryValidationResult
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult
- All Implemented Interfaces:
Iterable<ConstraintValidationResult>
public class DictionaryValidationResult
extends Object
implements Iterable<ConstraintValidationResult>
DictionaryValidationResult holds dictionary validation results
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraintValidationResult(AttributeValueReader attributeValueReader, ConstraintValidationResult constraintValidationResult) adds the result of a constraint validation performed on an attributeaddError(String constraintLabelKey, AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display error messages to the user concerning a constraint validationaddError(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display error messages to the user concerning a constraint validationaddNoConstraint(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation processing has been skippedaddSkipped(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation has been skippedaddSuccess(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation has succeededaddWarning(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display warning messages to the user concerning a constraint validationprotected EntryValidationResultgetEntryValidationResult(String entryName) gets an entry validation result for the givenentryNameintintiterator()gets an iterator over the variousConstraintValidationResult's contained in this classvoidsetErrorLevel(ErrorLevel errorLevel) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DictionaryValidationResult
public DictionaryValidationResult()default constructor
-
-
Method Details
-
addConstraintValidationResult
public void addConstraintValidationResult(AttributeValueReader attributeValueReader, ConstraintValidationResult constraintValidationResult) adds the result of a constraint validation performed on an attribute- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintValidationResult- - the result of processing a constraint
-
addError
public ConstraintValidationResult addError(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display error messages to the user concerning a constraint validation- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processorerrorKey- - a key used to fetch an informational message to show the usererrorParameters- - parameters to substitute into the informational message- Returns:
- a constraint validation result encompassing the information provided
-
addError
public ConstraintValidationResult addError(String constraintLabelKey, AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display error messages to the user concerning a constraint validation- Parameters:
constraintLabelKey- - a key used to fetch an information message to show the userattributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processorerrorKey- - a key used to fetch an error message to show the usererrorParameters- - parameters to substitute into the error message- Returns:
- a constraint validation result encompassing the information provided
-
addWarning
public ConstraintValidationResult addWarning(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters) provides information used to display warning messages to the user concerning a constraint validation- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processorerrorKey- - a key used to fetch a warning message to show the usererrorParameters- - parameters to substitute into the warning message- Returns:
- a constraint validation result encompassing the information provided
-
addSuccess
public ConstraintValidationResult addSuccess(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation has succeeded- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processor- Returns:
- a constraint validation result encompassing the information provided
-
addSkipped
public ConstraintValidationResult addSkipped(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation has been skipped- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processor- Returns:
- a constraint validation result encompassing the information provided
-
addNoConstraint
public ConstraintValidationResult addNoConstraint(AttributeValueReader attributeValueReader, String constraintName) indicates that a constraint validation processing has been skipped- Parameters:
attributeValueReader- - provides access to the attribute being validatedconstraintName- - a descriptive name of the current constraint processor- Returns:
- a constraint validation result encompassing the information provided
-
iterator
gets an iterator over the variousConstraintValidationResult's contained in this class- Specified by:
iteratorin interfaceIterable<ConstraintValidationResult>- Returns:
- an iterator
-
getEntryValidationResult
gets an entry validation result for the givenentryName- Parameters:
entryName- - the name that the data dictionary uses to store metadata about the attribute- Returns:
- the existing
EntryValidationResultfor the givenentryNameor creates a new one if absent
-
getErrorLevel
- Returns:
- the errorLevel
-
setErrorLevel
- Parameters:
errorLevel- the errorLevel to set
-
getNumberOfErrors
public int getNumberOfErrors()- Returns:
- the numberOfErrors
-
getNumberOfWarnings
public int getNumberOfWarnings()- Returns:
- the numberOfWarnings
-