public class ValidationResultInfo extends Object implements ValidationResult, Serializable
ValidationResult.ErrorLevel
Constructor and Description |
---|
ValidationResultInfo()
Constructs a new ValidationResultInfo.
|
ValidationResultInfo(String element)
convenience constructor carried over from R1
|
ValidationResultInfo(String element,
Object invalidData)
convenience constructor carried over from R1
|
ValidationResultInfo(ValidationResult result)
Constructs a new ValidationResultInfo from another
ValidationResult.
|
Modifier and Type | Method and Description |
---|---|
String |
getElement()
Identifies the element (field) that is the focus of the
validation.
|
ValidationResult.ErrorLevel |
getErrorLevel()
Deprecated.
|
Object |
getInvalidData()
not part of the contract but carried over from r1
|
ValidationResult.ErrorLevel |
getLevel()
convenience method carried over from R1
Use getErrorLevel () instead
|
String |
getMessage()
Message explaining this validation result
If an error it is an an error message.
|
static boolean |
hasValidationErrors(List<ValidationResultInfo> validationResults,
ValidationResult.ErrorLevel threshold,
List<String> ignoreFields) |
boolean |
isError()
convenience method carried over from R1
|
boolean |
isOk()
Convenience method from R1 to check if this is ok
|
boolean |
isWarn()
convenience method carried over from R1
|
void |
setElement(String element) |
void |
setError(String message)
Convenience method.
|
void |
setErrorLevel(ValidationResult.ErrorLevel errorLevel) |
void |
setInvalidData(Object invalidData)
not part of the contract but carried over from r1
|
void |
setLevel(ValidationResult.ErrorLevel level) |
void |
setMessage(String message) |
void |
setWarn(String message)
convenience method carried over from R1
|
void |
setWarning(String message)
Convenience method.
|
String |
toString() |
public ValidationResultInfo()
public ValidationResultInfo(String element)
public ValidationResultInfo(String element, Object invalidData)
public ValidationResultInfo(ValidationResult result)
result
- the ValidationResult to copy@Deprecated public ValidationResult.ErrorLevel getErrorLevel()
public void setErrorLevel(ValidationResult.ErrorLevel errorLevel)
public boolean isOk()
public boolean isWarn()
public boolean isError()
public String getMessage()
ValidationResult
getMessage
in interface ValidationResult
public void setMessage(String message)
public String getElement()
ValidationResult
getElement
in interface ValidationResult
public void setElement(String element)
public ValidationResult.ErrorLevel getLevel()
getLevel
in interface ValidationResult
public void setLevel(ValidationResult.ErrorLevel level)
public Object getInvalidData()
public void setInvalidData(Object invalidData)
public void setWarning(String message)
message
- the warning messagepublic void setError(String message)
message
- the error message to addpublic static boolean hasValidationErrors(List<ValidationResultInfo> validationResults, ValidationResult.ErrorLevel threshold, List<String> ignoreFields)
Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.