Package io.domainlifecycles.spring.http
Class DefaultResponseEntityBuilder
java.lang.Object
io.domainlifecycles.spring.http.DefaultResponseEntityBuilder
- All Implemented Interfaces:
ResponseEntityBuilder
Default implementation of
ResponseEntityBuilder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> org.springframework.http.ResponseEntity<ResponseObject<T>>build(T data, org.springframework.http.HttpStatus responseState) Build aResponseEntitywith aResponseObjectas body.
-
Constructor Details
-
DefaultResponseEntityBuilder
public DefaultResponseEntityBuilder()
-
-
Method Details
-
build
public <T> org.springframework.http.ResponseEntity<ResponseObject<T>> build(T data, org.springframework.http.HttpStatus responseState) Build aResponseEntitywith aResponseObjectas body.- Specified by:
buildin interfaceResponseEntityBuilder- Type Parameters:
T- the type of the data- Parameters:
data- the data to be returnedresponseState- the http status to be returned- Returns:
- the response entity
-