Class 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
Author:
Graeme Rocher
  • Field Details

    • TYPE

      public static final Argument<JsonError> TYPE
      The argument type.
      Since:
      1.3.3
  • Constructor Details

    • JsonError

      public JsonError(String message)
      Parameters:
      message - The message
  • Method Details

    • setMessage

      public void setMessage(String message)
      Parameters:
      message - The message
    • getMessage

      public String getMessage()
      Returns:
      The message
    • getLogref

      public Optional<String> getLogref()
      Returns:
      The logref
    • getPath

      public Optional<String> getPath()
      Returns:
      The path
    • path

      public JsonError path(@Nullable @Nullable String path)
      Sets the path.
      Parameters:
      path - The path
      Returns:
      This error object
    • logref

      public JsonError logref(@Nullable @Nullable String logref)
      Sets the logref.
      Parameters:
      logref - The logref
      Returns:
      This error object
    • toString

      public String toString()
      Overrides:
      toString in class Object