Package org.gcube.oidc.rest
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OpenIdConnectRESTHelperException(String message)Constructor.OpenIdConnectRESTHelperException(String message, Exception cause)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpenIdConnectRESTHelperExceptioncreate(String message, int status, String contentType, String textResponse)Creates a new instance of the exception.StringgetContentType()Returns the content type.StringgetResponseString()Returns the response string.intgetStatus()Returns the status.booleanhasJSONPayload()Checks if the content type is JSON.voidsetContentType(String contentType)Sets the content type.voidsetResponseString(String responseString)Sets the response string.voidsetStatus(int status)Sets the status.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OpenIdConnectRESTHelperException
public OpenIdConnectRESTHelperException(String message)
Constructor.- Parameters:
message- the message.
-
-
Method Detail
-
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.
-
-