Class OpenIdConnectRESTHelperException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.gcube.oidc.rest.OpenIdConnectRESTHelperException
All Implemented Interfaces:
Serializable

public class OpenIdConnectRESTHelperException extends Exception
OpenID Connect REST helper exception.
Author:
Mauro Mugnaini
See Also:
  • Constructor Details

    • OpenIdConnectRESTHelperException

      public OpenIdConnectRESTHelperException(String message)
      Constructor.
      Parameters:
      message - the message.
    • OpenIdConnectRESTHelperException

      public OpenIdConnectRESTHelperException(String message, Exception cause)
      Constructor.
      Parameters:
      message - the message.
      cause - the cause.
  • Method Details

    • create

      public static OpenIdConnectRESTHelperException create(String message, int status, String contentType, String textResponse)
      Creates a new instance of the exception.
      Parameters:
      message - the message.
      status - the status.
      contentType - the content type.
      textResponse - the text response.
      Returns:
      the exception.
    • setStatus

      public void setStatus(int status)
      Sets the status.
      Parameters:
      status - the status.
    • getStatus

      public int getStatus()
      Returns the status.
      Returns:
      the status.
    • setContentType

      public void setContentType(String contentType)
      Sets the content type.
      Parameters:
      contentType - the content type.
    • getContentType

      public String getContentType()
      Returns the content type.
      Returns:
      the content type.
    • hasJSONPayload

      public boolean hasJSONPayload()
      Checks if the content type is JSON.
      Returns:
      true if it is JSON, false otherwise.
    • setResponseString

      public void setResponseString(String responseString)
      Sets the response string.
      Parameters:
      responseString - the response string.
    • getResponseString

      public String getResponseString()
      Returns the response string.
      Returns:
      the response string.