Class ResponsePageGenerator<T>
java.lang.Object
com.broadleafcommerce.orderoperation.service.provider.external.page.ResponsePageGenerator<T>
Generates a Page representing the data and page data received as a response from another service.
This is necessary since the page and corresponding pageable are interfaces, and their
implementations need to be determined based off the data provided in the response.
- Author:
- Jacob Mitash
-
Constructor Summary
ConstructorDescriptionResponsePageGenerator
(List<T> content, Long total, com.fasterxml.jackson.databind.JsonNode rawPageable) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<T>
getPage()
protected org.springframework.data.domain.Pageable
resolvePageable
(com.fasterxml.jackson.databind.JsonNode rawPageable) Generates an appropriate pageable based off of the pageable data received.
-
Constructor Details
-
ResponsePageGenerator
-
-
Method Details
-
resolvePageable
protected org.springframework.data.domain.Pageable resolvePageable(com.fasterxml.jackson.databind.JsonNode rawPageable) Generates an appropriate pageable based off of the pageable data received.- Parameters:
rawPageable
- the raw pageable data to base the pageable implementation off of- Returns:
- a pageable representing the response data's pageable
-
getPage
-