Package io.jans.as.model.error
Class ErrorResponse
- java.lang.Object
-
- io.jans.as.model.error.ErrorResponse
-
- Direct Known Subclasses:
DefaultErrorResponse
public class ErrorResponse extends java.lang.Object
Base class for error responses.- Version:
- August 20, 2019
- Author:
- Javier Rojas Blum
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getErrorCode()
Returns the error code of the response.java.lang.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.java.lang.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.java.lang.String
getReason()
java.lang.String
getState()
If a valid state parameter was present in the request, it returns the exact value received from the client.int
getStatus()
Return the HTTP response status code.void
setErrorCode(java.lang.String errorCode)
void
setErrorDescription(java.lang.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.void
setErrorUri(java.lang.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.void
setReason(java.lang.String reason)
void
setState(java.lang.String state)
void
setStatus(int status)
Sets the HTTP response status code.java.lang.String
toJSonString()
Return a JSon string representation of the object.java.lang.String
toQueryString()
Returns a query string representation of the object.
-
-
-
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 java.lang.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(java.lang.String state)
-
getErrorDescription
public java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.String getReason()
-
setReason
public void setReason(java.lang.String reason)
-
getErrorCode
public java.lang.String getErrorCode()
Returns the error code of the response.- Returns:
- The error code.
-
setErrorCode
public void setErrorCode(java.lang.String errorCode)
-
toQueryString
public java.lang.String toQueryString()
Returns a query string representation of the object.- Returns:
- The object represented in a query string.
-
toJSonString
public java.lang.String toJSonString()
Return a JSon string representation of the object.- Returns:
- The object represented in a JSon string.
-
-