Class ResponseChain<T,R>
- java.lang.Object
-
- org.gbif.api.model.common.messaging.Response<T>
-
- org.gbif.api.model.common.messaging.ResponseChain<T,R>
-
- Type Parameters:
T
- Content type of the root responseR
- Content type of each individual related response
public class ResponseChain<T,R> extends Response<T>
Response that can contain a list of related responses.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.gbif.api.model.common.messaging.Response
Response.Builder<T>, Response.Status, Response.StatusCode
-
-
Constructor Summary
Constructors Constructor Description ResponseChain()
ResponseChain(Response.Status status)
ResponseChain(Response.Status status, String messageKey)
ResponseChain(Response.Status status, T content, String messageKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(Response<R> response)
Adds a response to the list of related response.List<Response<R>>
getRelatedResponses()
void
setRelatedResponses(List<Response<R>> relatedResponses)
-
Methods inherited from class org.gbif.api.model.common.messaging.Response
copyTo, getContent, getMessage, getMessageKey, getRootException, getStatus, getStatusCode, setContent, setMessage, setMessageKey, setRootException, setStatus, setStatusCode, statusReason, toString
-
-
-
-
Constructor Detail
-
ResponseChain
public ResponseChain()
-
ResponseChain
public ResponseChain(Response.Status status)
-
ResponseChain
public ResponseChain(Response.Status status, String messageKey)
-
ResponseChain
public ResponseChain(Response.Status status, T content, String messageKey)
-
-
Method Detail
-
getRelatedResponses
public List<Response<R>> getRelatedResponses()
- Returns:
- the relatedResponses
-
setRelatedResponses
public void setRelatedResponses(List<Response<R>> relatedResponses)
- Parameters:
relatedResponses
- the relatedResponses to set
-
-