Class ValidationErrorData
java.lang.Object
org.glassfish.jersey.server.validation.ValidationErrorData
- Direct Known Subclasses:
ValidationError
Validation error entity to be included in
Response
if JAX-B API is not available-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.Returns the string representation of the value failing to pass the constraint.Return the interpolated error message for this validation error.Return the non-interpolated error message for this validation error.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
Set the string representation of the property path to the value.
-
Field Details
-
message
-
messageTemplate
-
path
-
invalidValue
-
-
Method Details
-
getMessage
Return the interpolated error message for this validation error.- Returns:
- the interpolated error message for this validation error.
-
setMessage
Return the interpolated error message for this validation error.- Parameters:
message
- the interpolated error message for this validation error.
-
getPath
Return the string representation of the property path to the value.- Returns:
- the string representation of the property path to the value.
-
setPath
Set the string representation of the property path to the value.- Parameters:
path
- the string representation of the property path to the value.
-
getInvalidValue
Returns the string representation of the value failing to pass the constraint.- Returns:
- the value failing to pass the constraint.
-
setInvalidValue
Set the value failing to pass the constraint.- Parameters:
invalidValue
- the value failing to pass the constraint.
-
getMessageTemplate
Return the non-interpolated error message for this validation error.- Returns:
- the non-interpolated error message for this validation error.
-
setMessageTemplate
Set the non-interpolated error message for this validation error.- Parameters:
messageTemplate
- the non-interpolated error message for this validation error.
-
createValidationError
public 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.- Parameters:
message
- interpolated error message.messageTemplate
- non-interpolated error message.path
- property path.invalidValue
- value that failed to pass constraints.- Returns:
- ValidationErrorData subclass or itself
-