Class GenericResponse
java.lang.Object
io.jans.ca.plugin.adminui.model.auth.GenericResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Provides the raw byte payload of this response.intGets the human-readable response message.com.fasterxml.jackson.databind.JsonNodebooleanvoidsetResponseBytes(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.toString()Produce a string representation of this GenericResponse including its primary fields.
-
Constructor Details
-
GenericResponse
public GenericResponse()
-
-
Method Details
-
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
Gets the human-readable response message.- Returns:
- the response message, or `null` if none has been set
-
setResponseMessage
-
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
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.
-