Class ErrorResponse

  • Direct Known Subclasses:
    DefaultErrorResponse

    public class ErrorResponse
    extends Object
    Base class for error responses.
    Version:
    August 20, 2019
    Author:
    Javier Rojas Blum
    • Constructor Detail

      • ErrorResponse

        public ErrorResponse()
    • Method Detail

      • getStatus

        public int getStatus()
        Return the HTTP response status code.
        Returns:
        The response status.
      • setStatus

        public void setStatus​(int status)
        Sets the HTTP response status code.
        Parameters:
        status - The response status.
      • getState

        public String getState()
        If a valid state parameter was present in the request, it returns the exact value received from the client.
        Returns:
        The state value of the request.
      • setState

        public void setState​(String state)
      • getErrorDescription

        public String getErrorDescription()
        Returns a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.
        Returns:
        Description about the error.
      • setErrorDescription

        public void setErrorDescription​(String errorDescription)
        Sets a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.
        Parameters:
        errorDescription - Description about the error.
      • getErrorUri

        public String getErrorUri()
        Return an URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
        Returns:
        URI with more information about the error.
      • setErrorUri

        public void setErrorUri​(String errorUri)
        Sets an URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
        Parameters:
        errorUri - URI with more information about the error.
      • getReason

        public String getReason()
      • setReason

        public void setReason​(String reason)
      • getErrorCode

        public String getErrorCode()
        Returns the error code of the response.
        Returns:
        The error code.
      • setErrorCode

        public void setErrorCode​(String errorCode)
      • toQueryString

        public String toQueryString()
        Returns a query string representation of the object.
        Returns:
        The object represented in a query string.
      • toJSonString

        public String toJSonString()
        Return a JSon string representation of the object.
        Returns:
        The object represented in a JSon string.