public interface Problem extends Result
Problem instances are required to be immutable.| Modifier and Type | Field and Description |
|---|---|
static java.net.URI |
DEFAULT_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static yakworks.problem.ProblemBuilder |
builder()
Optional, additional attributes of the problem.
|
static yakworks.problem.ProblemException |
create() |
default java.lang.String |
getDetail()
A human readable explanation specific to this occurrence of the problem.
|
default java.net.URI |
getInstance()
An absolute URI that identifies the specific occurrence of the problem.
|
default yakworks.i18n.MsgKey |
getMsg() |
default java.lang.Boolean |
getOk()
success or fail? if ok is true then it still may mean that there are warnings and needs to be looked into
|
default java.net.URI |
getType()
An absolute URI that identifies the problem type.
|
default java.util.List<Violation> |
getViolations()
The list of constraint violations or any others
|
static yakworks.problem.ProblemException |
of(ApiStatus status) |
static yakworks.problem.ProblemException |
of(ApiStatus status,
java.lang.String detail) |
static yakworks.problem.ProblemException |
of(yakworks.i18n.MsgKey msg) |
static yakworks.problem.ProblemException |
of(java.lang.String code,
java.lang.Object args) |
default void |
setDetail(java.lang.String v) |
default void |
setType(java.net.URI v) |
default void |
setViolations(java.util.List<Violation> v) |
getDefaultCode, getPayload, getStatus, getTitle, OK, setPayload, setStatus, setTitledefault java.lang.Boolean getOk()
Resultdefault yakworks.i18n.MsgKey getMsg()
getMsg in interface yakworks.i18n.MsgKeyDecoratordefault java.net.URI getType()
default void setType(java.net.URI v)
default java.lang.String getDetail()
default void setDetail(java.lang.String v)
default java.util.List<Violation> getViolations()
default void setViolations(java.util.List<Violation> v)
@Nullable default java.net.URI getInstance()
static yakworks.problem.ProblemBuilder builder()
static yakworks.problem.ProblemException create()
static yakworks.problem.ProblemException of(ApiStatus status)
static yakworks.problem.ProblemException of(ApiStatus status, java.lang.String detail)
static yakworks.problem.ProblemException of(yakworks.i18n.MsgKey msg)
static yakworks.problem.ProblemException of(java.lang.String code,
java.lang.Object args)
of in interface yakworks.i18n.MsgKey