public class ValidationError extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
MESSAGE_INVALID_VALUE
A generic invalid value message.
|
Constructor and Description |
---|
ValidationError(String validatorId,
String inputHint,
String message) |
ValidationError(String validatorId,
String inputHint,
String message,
Object... messageParameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
formatMessage(BiFunction<String,Object[],String> formatter)
Formats the current
ValidationError with the given formatter Function . |
String |
getInputHint() |
Object[] |
getInputHintWithMessageParameters()
Returns an array where the first element is the
inputHint follwed by the messageParameters . |
String |
getMessage() |
Object[] |
getMessageParameters()
Returns the raw message parameters, e.g.
|
javax.ws.rs.core.Response.Status |
getStatusCode() |
String |
getValidatorId() |
int |
hashCode() |
ValidationError |
setStatusCode(javax.ws.rs.core.Response.Status statusCode) |
String |
toString() |
public static final String MESSAGE_INVALID_VALUE
public String getValidatorId()
public String getInputHint()
public String getMessage()
public Object[] getMessageParameters()
getInputHintWithMessageParameters()
public String formatMessage(BiFunction<String,Object[],String> formatter)
ValidationError
with the given formatter Function
.
The formatter Function
will be called with the message
and
getInputHintWithMessageParameters()
to render the error message.
formatter
- public Object[] getInputHintWithMessageParameters()
inputHint
follwed by the messageParameters
.public ValidationError setStatusCode(javax.ws.rs.core.Response.Status statusCode)
public javax.ws.rs.core.Response.Status getStatusCode()
Copyright © 2021 JBoss by Red Hat. All rights reserved.