Package com.rubensgomes.reqresp
Class BaseResponse
java.lang.Object
com.rubensgomes.reqresp.BaseResponse
Base Response Object
A base type that should be part of all microservice responses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic enumThe status of the response. -
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationBaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, List<Error> errors) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanThe application client Id.The list of errors.The status of the response.A text to correlate the request across the system.inthashCode()voidsetAdditionalProperty(String name, Object value) voidsetClientId(String clientId) The application client Id.voidThe list of errors.voidsetResponseStatus(BaseResponse.ResponseStatus responseStatus) The status of the response.voidsetTransactionId(String transactionId) A text to correlate the request across the system.toString()
-
Constructor Details
-
BaseResponse
public BaseResponse()No args constructor for use in serialization -
BaseResponse
public BaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, List<Error> errors) - Parameters:
clientId- The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request.responseStatus- The status of the response.transactionId- A text to correlate the request across the system.errors- The list of errors.
-
-
Method Details
-
builder
-
getClientId
The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request. (Required) -
setClientId
The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request. (Required) -
getTransactionId
A text to correlate the request across the system. (Required) -
setTransactionId
A text to correlate the request across the system. (Required) -
getResponseStatus
The status of the response. (Required) -
setResponseStatus
The status of the response. (Required) -
getErrors
The list of errors. -
setErrors
The list of errors. -
getAdditionalProperties
-
setAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-