Class ConstraintValidationResult

java.lang.Object
org.kuali.rice.krad.datadictionary.validation.result.ConstraintValidationResult

public class ConstraintValidationResult extends Object
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 Details

    • ConstraintValidationResult

      public ConstraintValidationResult(String constraintName)
      creates a constraint validation result with the given constraint name
      Parameters:
      constraintName - - a descriptive name of the current constraint processor
    • ConstraintValidationResult

      public ConstraintValidationResult(String constraintName, ErrorLevel level)
      creates a constraint validation result with the given constraint name and error level
      Parameters:
      constraintName - - a descriptive name of the current constraint processor
      level - - the applicable error level - selected from ErrorLevel
  • Method Details

    • addChild

      public void addChild(ConstraintValidationResult child)
      allows a constraint validation result to be added as a child of the current one
      Parameters:
      child - - the 'child' constraint validation result
    • setError

      public void setError(String errorKey, String... errorParameters)
      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 user
      errorParameters - - parameters to substitute into the error message
    • setWarning

      public void setWarning(String errorKey, String... errorParameters)
      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 user
      errorParameters - - parameters to substitute into the warning message
    • getStatus

      public ErrorLevel getStatus()
      Returns:
      the level
    • setStatus

      public void setStatus(ErrorLevel level)
      Parameters:
      level - the level to set
    • getErrorKey

      public String getErrorKey()
      the error key is used to retrieve a message to display to the user
      Returns:
      the errorKey
      See Also:
      • RiceKeyConstants
    • setErrorKey

      public void setErrorKey(String errorKey)
      Parameters:
      errorKey - the errorKey to set
    • getErrorParameters

      public String[] getErrorParameters()
      Returns:
      the errorParameters
    • setErrorParameters

      public void setErrorParameters(String[] errorParameters)
      Parameters:
      errorParameters - the errorParameters to set
    • getEntryName

      public String getEntryName()
      Returns:
      the entryName
    • setEntryName

      public void setEntryName(String entryName)
      Parameters:
      entryName - the entryName to set
    • getAttributeName

      public String getAttributeName()
      Returns:
      the attributeName
    • setAttributeName

      public void setAttributeName(String attributeName)
      Parameters:
      attributeName - the attributeName to set
    • getConstraintName

      public String getConstraintName()
      Returns:
      the constraintName
    • setConstraintName

      public void setConstraintName(String constraintName)
      Parameters:
      constraintName - the constraintName to set
    • getChildren

      public List<ConstraintValidationResult> getChildren()
      Returns:
      the children
    • getConstraintLabelKey

      public String getConstraintLabelKey()
      Returns:
      the constraintLabelKey
    • setConstraintLabelKey

      public void setConstraintLabelKey(String constraintLabelKey)
      Parameters:
      constraintLabelKey - the constraintLabelKey to set
    • getAttributePath

      public String getAttributePath()
      Returns:
      the attributePath
    • setAttributePath

      public void setAttributePath(String attributePath)
      Parameters:
      attributePath - the attributePath to set