public static class ValidationResult.ValidationError extends Object
Constructor and Description |
---|
ValidationError(String errorCode)
Create a validation error with the given error code
|
ValidationError(String errorCode,
String details)
Create a validation error with the given error code and the error
explanation.
|
ValidationError(String errorCode,
String details,
Throwable cause)
Create a validation error with the given error code and the error
explanation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Throwable |
getCause()
Get the underlying cause if the ValidationError was caused by a
Throwable.
|
String |
getDetails() |
String |
getErrorCode() |
Integer |
getPageNumber()
Returns the page number, or null if not known.
|
Throwable |
getThrowable()
Get the place where the ValidationError was created, useful if the
ValidationError was not caused by a Throwable.
|
int |
hashCode() |
boolean |
isWarning() |
void |
setDetails(String details)
Set the error explanation
|
void |
setPageNumber(Integer pageNumber)
Sets or resets the page number.
|
void |
setWarning(boolean isWarning) |
public ValidationError(String errorCode)
errorCode
- public ValidationError(String errorCode, String details, Throwable cause)
errorCode
- the error codedetails
- the error explanationcause
- the error causepublic Throwable getThrowable()
public Throwable getCause()
public Integer getPageNumber()
public void setPageNumber(Integer pageNumber)
pageNumber
- zero based page number or null if none is known.public String getErrorCode()
public String getDetails()
public void setDetails(String details)
details
- public boolean isWarning()
public void setWarning(boolean isWarning)
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.