Package io.micronaut.http.hateoas
Class JsonError
- java.lang.Object
-
- io.micronaut.http.hateoas.AbstractResource<JsonError>
-
- io.micronaut.http.hateoas.JsonError
-
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
VndError
@Produces("application/json") public class JsonError extends AbstractResource<JsonError>
A class that can be used to represent JSON errors that complies to Vnd.Error without the content type requirements.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description JsonError(java.lang.String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getLogref()
java.lang.String
getMessage()
java.util.Optional<java.lang.String>
getPath()
JsonError
logref(java.lang.String logref)
Sets the logref.JsonError
path(java.lang.String path)
Sets the path.void
setMessage(java.lang.String message)
java.lang.String
toString()
-
Methods inherited from class io.micronaut.http.hateoas.AbstractResource
embedded, embedded, embedded, getEmbedded, getLinks, link, link, setEmbedded, setLinks
-
-
-
-
Field Detail
-
TYPE
public static final io.micronaut.core.type.Argument<JsonError> TYPE
The argument type.- Since:
- 1.3.3
-
-
Method Detail
-
setMessage
public void setMessage(java.lang.String message)
- Parameters:
message
- The message
-
getMessage
public java.lang.String getMessage()
- Returns:
- The message
-
getLogref
public java.util.Optional<java.lang.String> getLogref()
- Returns:
- The logref
-
getPath
public java.util.Optional<java.lang.String> getPath()
- Returns:
- The path
-
path
public JsonError path(@Nullable java.lang.String path)
Sets the path.- Parameters:
path
- The path- Returns:
- This error object
-
logref
public JsonError logref(@Nullable java.lang.String logref)
Sets the logref.- Parameters:
logref
- The logref- Returns:
- This error object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-