public class ValidationErrorData extends Object
Response if JAX-B API is not available| Modifier and Type | Field and Description |
|---|---|
protected String |
invalidValue |
protected String |
message |
protected String |
messageTemplate |
protected String |
path |
| Modifier and Type | Method and Description |
|---|---|
static ValidationErrorData |
createValidationError(String message,
String messageTemplate,
String path,
String invalidValue)
A factory method that creates either JAX-B annotated data if JAX-B is available or POJO data otherwise.
|
String |
getInvalidValue()
Returns the string representation of the value failing to pass the constraint.
|
String |
getMessage()
Return the interpolated error message for this validation error.
|
String |
getMessageTemplate()
Return the non-interpolated error message for this validation error.
|
String |
getPath()
Return the string representation of the property path to the value.
|
void |
setInvalidValue(String invalidValue)
Set the value failing to pass the constraint.
|
void |
setMessage(String message)
Return the interpolated error message for this validation error.
|
void |
setMessageTemplate(String messageTemplate)
Set the non-interpolated error message for this validation error.
|
void |
setPath(String path)
Set the string representation of the property path to the value.
|
protected String message
protected String messageTemplate
protected String path
protected String invalidValue
public String getMessage()
public void setMessage(String message)
message - the interpolated error message for this validation error.public String getPath()
public void setPath(String path)
path - the string representation of the property path to the value.public String getInvalidValue()
public void setInvalidValue(String invalidValue)
invalidValue - the value failing to pass the constraint.public String getMessageTemplate()
public void setMessageTemplate(String messageTemplate)
messageTemplate - the non-interpolated error message for this validation error.public static ValidationErrorData createValidationError(String message, String messageTemplate, String path, String invalidValue)
message - interpolated error message.messageTemplate - non-interpolated error message.path - property path.invalidValue - value that failed to pass constraints.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.