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
OpenID Connect REST helper exception.
- Author:
- Mauro Mugnaini
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOpenIdConnectRESTHelperException(String message) Constructor.OpenIdConnectRESTHelperException(String message, Exception cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of the exception.Returns the content type.Returns the response string.intReturns the status.booleanChecks 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 Details
-
OpenIdConnectRESTHelperException
Constructor.- Parameters:
message- the message.
-
OpenIdConnectRESTHelperException
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
Sets the content type.- Parameters:
contentType- the content type.
-
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
Sets the response string.- Parameters:
responseString- the response string.
-
getResponseString
Returns the response string.- Returns:
- the response string.
-