Class ErrorEntity


  • @StableMinor(version="16.1",
                 sinceVersion="8.0")
    public class ErrorEntity
    extends java.lang.Object
    A JAXB entity used for standard error responses.
    Since:
    8.0.0
    Version:
    $Revision: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorEntity​(java.lang.String message)
      Creates an error entity with a message but without status code.
      ErrorEntity​(java.lang.String message, int statusCode)
      Creates an error entity with a message and status.
      ErrorEntity​(java.lang.String message, Response.Status status)
      Creates an error entity with a message and status.
      ErrorEntity​(Response.Status status)
      Creates an error entity with a status but without a message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()
      Returns the message stored in this error entity.
      java.lang.Integer getStatusCode()
      Returns the status code stored in this error entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorEntity

        public ErrorEntity​(java.lang.String message)
        Creates an error entity with a message but without status code.
        Parameters:
        message - the message.
        Since:
        8.0.0
      • ErrorEntity

        public ErrorEntity​(Response.Status status)
        Creates an error entity with a status but without a message.
        Parameters:
        status - the status.
        Since:
        8.0.0
      • ErrorEntity

        public ErrorEntity​(java.lang.String message,
                           Response.Status status)
        Creates an error entity with a message and status.
        Parameters:
        message - the message.
        status - the status.
        Since:
        8.0.0
      • ErrorEntity

        public ErrorEntity​(java.lang.String message,
                           int statusCode)
        Creates an error entity with a message and status.
        Parameters:
        message - the message.
        status - the status.
        Since:
        8.0.0
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns the message stored in this error entity.
        Returns:
        the message, or null if it was not specified.
        Since:
        8.0.0
      • getStatusCode

        public java.lang.Integer getStatusCode()
        Returns the status code stored in this error entity.
        Returns:
        the status code, or null if it was not specified.
        Since:
        8.0.0