Package io.jans.as.model.error
Class ErrorResponse
java.lang.Object
io.jans.as.model.error.ErrorResponse
- Direct Known Subclasses:
DefaultErrorResponse
Base class for error responses.
- Version:
- August 20, 2019
- Author:
- Javier Rojas Blum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the error code of the response.Returns a human-readable UTF-8 encoded text providing additional information, used to assist the client developer in understanding the error that occurred.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.getState()If a valid state parameter was present in the request, it returns the exact value received from the client.intReturn the HTTP response status code.voidsetErrorCode(String errorCode) voidsetErrorDescription(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.voidsetErrorUri(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.voidvoidvoidsetStatus(int status) Sets the HTTP response status code.Return a JSon string representation of the object.Returns a query string representation of the object.
-
Constructor Details
-
ErrorResponse
public ErrorResponse()
-
-
Method Details
-
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
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
-
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
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
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
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
-
setReason
-
getErrorCode
Returns the error code of the response.- Returns:
- The error code.
-
setErrorCode
-
toQueryString
Returns a query string representation of the object.- Returns:
- The object represented in a query string.
-
toJSonString
Return a JSon string representation of the object.- Returns:
- The object represented in a JSon string.
-