org.kuali.rice.krad.datadictionary.validation.result
Class DictionaryValidationResult

java.lang.Object
  extended by 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
DictionaryValidationResult()
          default constructor
 
Method Summary
 void addConstraintValidationResult(AttributeValueReader attributeValueReader, ConstraintValidationResult constraintValidationResult)
          adds the result of a constraint validation performed on an attribute
 ConstraintValidationResult addError(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters)
          provides information used to display error messages to the user concerning a constraint validation
 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
 ConstraintValidationResult addNoConstraint(AttributeValueReader attributeValueReader, String constraintName)
          indicates that a constraint validation processing has been skipped
 ConstraintValidationResult addSkipped(AttributeValueReader attributeValueReader, String constraintName)
          indicates that a constraint validation has been skipped
 ConstraintValidationResult addSuccess(AttributeValueReader attributeValueReader, String constraintName)
          indicates that a constraint validation has succeeded
 ConstraintValidationResult addWarning(AttributeValueReader attributeValueReader, String constraintName, String errorKey, String... errorParameters)
          provides information used to display warning messages to the user concerning a constraint validation
protected  EntryValidationResult getEntryValidationResult(String entryName)
          gets an entry validation result for the given entryName
 ErrorLevel getErrorLevel()
           
 int getNumberOfErrors()
           
 int getNumberOfWarnings()
           
 Iterator<ConstraintValidationResult> iterator()
          gets an iterator over the various ConstraintValidationResult's contained in this class
 void setErrorLevel(ErrorLevel errorLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryValidationResult

public DictionaryValidationResult()
default constructor

Method Detail

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 validated
constraintValidationResult - - 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 validated
constraintName - - a descriptive name of the current constraint processor
errorKey - - a key used to fetch an informational message to show the user
errorParameters - - 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 user
attributeValueReader - - provides access to the attribute being validated
constraintName - - a descriptive name of the current constraint processor
errorKey - - a key used to fetch an error message to show the user
errorParameters - - 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 validated
constraintName - - a descriptive name of the current constraint processor
errorKey - - a key used to fetch a warning message to show the user
errorParameters - - 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 validated
constraintName - - 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 validated
constraintName - - 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 validated
constraintName - - a descriptive name of the current constraint processor
Returns:
a constraint validation result encompassing the information provided

iterator

public Iterator<ConstraintValidationResult> iterator()
gets an iterator over the various ConstraintValidationResult's contained in this class

Specified by:
iterator in interface Iterable<ConstraintValidationResult>
Returns:
an iterator

getEntryValidationResult

protected EntryValidationResult getEntryValidationResult(String entryName)
gets an entry validation result for the given entryName

Parameters:
entryName - - the name that the data dictionary uses to store metadata about the attribute
Returns:
the existing EntryValidationResult for the given entryName or creates a new one if absent

getErrorLevel

public ErrorLevel getErrorLevel()
Returns:
the errorLevel

setErrorLevel

public void setErrorLevel(ErrorLevel errorLevel)
Parameters:
errorLevel - the errorLevel to set

getNumberOfErrors

public int getNumberOfErrors()
Returns:
the numberOfErrors

getNumberOfWarnings

public int getNumberOfWarnings()
Returns:
the numberOfWarnings


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.