Class GenericResponse
- java.lang.Object
-
- io.jans.ca.plugin.adminui.model.auth.GenericResponse
-
public class GenericResponse extends Object
-
-
Constructor Summary
Constructors Constructor Description GenericResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getResponseBytes()Provides the raw byte payload of this response.intgetResponseCode()StringgetResponseMessage()Gets the human-readable response message.com.fasterxml.jackson.databind.JsonNodegetResponseObject()booleanisSuccess()voidsetResponseBytes(byte[] responseBytes)Set the raw binary payload for the response.voidsetResponseCode(int responseCode)voidsetResponseMessage(String responseMessage)voidsetResponseObject(com.fasterxml.jackson.databind.JsonNode responseObject)Sets the JSON payload to include in this GenericResponse.voidsetSuccess(boolean success)Set whether this response indicates a successful outcome.StringtoString()Produce a string representation of this GenericResponse including its primary fields.
-
-
-
Method Detail
-
getResponseObject
public com.fasterxml.jackson.databind.JsonNode getResponseObject()
-
setResponseObject
public void setResponseObject(com.fasterxml.jackson.databind.JsonNode responseObject)
Sets the JSON payload to include in this GenericResponse.- Parameters:
responseObject- the JSON payload to store as the response object
-
getResponseMessage
public String getResponseMessage()
Gets the human-readable response message.- Returns:
- the response message, or `null` if none has been set
-
setResponseMessage
public void setResponseMessage(String responseMessage)
-
getResponseCode
public int getResponseCode()
-
setResponseCode
public void setResponseCode(int responseCode)
-
isSuccess
public boolean isSuccess()
-
setSuccess
public void setSuccess(boolean success)
Set whether this response indicates a successful outcome.- Parameters:
success- `true` if the response indicates success, `false` otherwise
-
getResponseBytes
public byte[] getResponseBytes()
Provides the raw byte payload of this response.- Returns:
- the raw response bytes, or
nullif no bytes are set
-
setResponseBytes
public void setResponseBytes(byte[] responseBytes)
Set the raw binary payload for the response.- Parameters:
responseBytes- the raw payload bytes to store, ornullif none
-
toString
public String toString()
Produce a string representation of this GenericResponse including its primary fields. The returned string contains the values of `success`, `responseMessage`, `responseCode`, and `responseObject`. The `responseBytes` field is intentionally omitted.
-
-