public static class ApiError.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ApiError |
build() |
ApiError.Builder |
copy(ApiError error) |
ApiError.Builder |
data(java.lang.Object data) |
ApiError.Builder |
details(java.lang.String details) |
ApiError.Builder |
errorCode(java.lang.Integer errorCode) |
ApiError.Builder |
errorCode(javax.ws.rs.core.Response.Status errorCode) |
java.lang.String |
getMessage() |
ApiError.Builder |
message(java.lang.String message) |
ApiError.Builder |
prefixMessage(java.lang.String prefix)
as
prefixMessage(String, String) with default separator of `: ` |
ApiError.Builder |
prefixMessage(java.lang.String prefix,
java.lang.String separatorIfMessageNotBlank)
puts a prefix in front of the message, with the given separator if there is already a message;
if there is no message, it simply sets the prefix as the message.
|
public ApiError.Builder message(java.lang.String message)
public ApiError.Builder details(java.lang.String details)
public ApiError.Builder data(java.lang.Object data)
public ApiError.Builder errorCode(javax.ws.rs.core.Response.Status errorCode)
public ApiError.Builder errorCode(java.lang.Integer errorCode)
public ApiError.Builder prefixMessage(java.lang.String prefix)
prefixMessage(String, String)
with default separator of `: `public ApiError.Builder prefixMessage(java.lang.String prefix, java.lang.String separatorIfMessageNotBlank)
public ApiError build()
public ApiError.Builder copy(ApiError error)
public java.lang.String getMessage()