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

java.lang.Object
  extended by 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 Summary
ConstraintValidationResult(String constraintName)
          creates a constraint validation result with the given constraint name
ConstraintValidationResult(String constraintName, ErrorLevel level)
          creates a constraint validation result with the given constraint name and error level
 
Method Summary
 void addChild(ConstraintValidationResult child)
          allows a constraint validation result to be added as a child of the current one
 String getAttributeName()
           
 String getAttributePath()
           
 List<ConstraintValidationResult> getChildren()
           
 String getConstraintLabelKey()
           
 String getConstraintName()
           
 String getEntryName()
           
 String getErrorKey()
          the error key is used to retrieve a message to display to the user
 String[] getErrorParameters()
           
 ErrorLevel getStatus()
           
 void setAttributeName(String attributeName)
           
 void setAttributePath(String attributePath)
           
 void setConstraintLabelKey(String constraintLabelKey)
           
 void setConstraintName(String constraintName)
           
 void setEntryName(String entryName)
           
 void setError(String errorKey, String... errorParameters)
          provides information used to display error messages to the user concerning a constraint validation
 void setErrorKey(String errorKey)
           
 void setErrorParameters(String[] errorParameters)
           
 void setStatus(ErrorLevel level)
           
 void setWarning(String errorKey, String... errorParameters)
          provides information used to display warning messages to the user concerning a constraint validation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.