@Component public class ResponseMapper extends Object
| Constructor and Description |
|---|
ResponseMapper() |
| Modifier and Type | Method and Description |
|---|---|
<T> org.springframework.http.ResponseEntity |
accepted(ResponseObject<T> response)
Generates
ResponseEntity with the response body in response to a request that hasn't been processed yet |
<T> org.springframework.http.ResponseEntity |
created(ResponseObject<T> response)
Generates
ResponseEntity with the response body in response to a successful resource creation request |
<T,R> org.springframework.http.ResponseEntity<?> |
created(ResponseObject<T> response,
Function<T,R> mapper)
Generates
ResponseEntity with the response body in response to a successful resource creation request |
<T,R> org.springframework.http.ResponseEntity<?> |
created(ResponseObject<T> response,
Function<T,R> mapper,
ResponseHeaders responseHeaders)
Generates
ResponseEntity with the response body in response to a successful resource creation request |
<T> org.springframework.http.ResponseEntity |
created(ResponseObject<T> response,
ResponseHeaders responseHeaders)
Generates
ResponseEntity with the response body in response to a successful resource creation request |
<T> org.springframework.http.ResponseEntity |
delete(ResponseObject<T> response)
Generates
ResponseEntity with the response body in response to a successful resource deletion request |
<T,R> org.springframework.http.ResponseEntity<?> |
delete(ResponseObject<T> response,
Function<T,R> mapper)
Generates
ResponseEntity with the response body in response to a successful resource deletion request |
<T> org.springframework.http.ResponseEntity |
ok(ResponseObject<T> response)
Generates
ResponseEntity with the response body in response to a generic successful request |
<T,R> org.springframework.http.ResponseEntity<?> |
ok(ResponseObject<T> response,
Function<T,R> mapper)
Generates
ResponseEntity with the response body in response to a generic successful request |
<T,R> org.springframework.http.ResponseEntity<?> |
ok(ResponseObject<T> response,
Function<T,R> mapper,
ResponseHeaders responseHeaders)
Generates
ResponseEntity with the response body and headers in response to a generic successful request |
public <T,R> org.springframework.http.ResponseEntity<?> ok(ResponseObject<T> response, Function<T,R> mapper)
ResponseEntity with the response body in response to a generic successful requestT - type of the body in the response objectR - type of the transformed bodyresponse - response object from the service with the body insidemapper - function for transforming body into another typepublic <T,R> org.springframework.http.ResponseEntity<?> created(ResponseObject<T> response, Function<T,R> mapper)
ResponseEntity with the response body in response to a successful resource creation requestT - type of the body in the response objectR - type of the transformed bodyresponse - response object from the service with the body insidemapper - function for transforming body into another typepublic <T,R> org.springframework.http.ResponseEntity<?> delete(ResponseObject<T> response, Function<T,R> mapper)
ResponseEntity with the response body in response to a successful resource deletion requestT - type of the body in the response objectR - type of the transformed bodyresponse - response object from the service with the body insidemapper - function for transforming body into another typepublic <T,R> org.springframework.http.ResponseEntity<?> ok(ResponseObject<T> response, Function<T,R> mapper, ResponseHeaders responseHeaders)
ResponseEntity with the response body and headers in response to a generic successful requestT - type of the body in the response objectR - type of the body after applying mapperresponse - response object from the service with the body insidemapper - function for transforming body into another typeresponseHeaders - headers to be returned in the responsepublic <T,R> org.springframework.http.ResponseEntity<?> created(ResponseObject<T> response, Function<T,R> mapper, ResponseHeaders responseHeaders)
ResponseEntity with the response body in response to a successful resource creation requestT - type of the body in the response objectR - type of the body after applying mapperresponse - response object from the service with the body insidemapper - function for transforming body into another typeresponseHeaders - headers to be returned in the responsepublic <T> org.springframework.http.ResponseEntity created(ResponseObject<T> response, ResponseHeaders responseHeaders)
ResponseEntity with the response body in response to a successful resource creation requestT - type of the body in the response objectresponse - response object from the service with the body insideresponseHeaders - headers to be returned in the responsepublic <T> org.springframework.http.ResponseEntity ok(ResponseObject<T> response)
ResponseEntity with the response body in response to a generic successful requestT - type of the body in the response objectresponse - response object from the service with the body insidepublic <T> org.springframework.http.ResponseEntity created(ResponseObject<T> response)
ResponseEntity with the response body in response to a successful resource creation requestT - type of the body in the response objectresponse - response object from the service with the body insidepublic <T> org.springframework.http.ResponseEntity delete(ResponseObject<T> response)
ResponseEntity with the response body in response to a successful resource deletion requestT - type of the body in the response objectresponse - response object from the service with the body insidepublic <T> org.springframework.http.ResponseEntity accepted(ResponseObject<T> response)
ResponseEntity with the response body in response to a request that hasn't been processed yetT - type of the body in the response objectresponse - response object from the service with the body insideCopyright © 2019. All rights reserved.