Class ErrorEntity


  • @StableMinor(version="14.0",
                 sinceVersion="8.0")
    public class ErrorEntity
    extends Object
    A JAXB entity used for standard error responses.
    Since:
    8.0.0
    Version:
    $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    • Constructor Detail

      • ErrorEntity

        public ErrorEntity​(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​(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​(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 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 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