Class ResponsePageGenerator<T>
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.provider.external.page.ResponsePageGenerator<T>
-
public class ResponsePageGenerator<T> extends Object
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
Constructors Constructor Description ResponsePageGenerator(List<T> content, Long total, com.fasterxml.jackson.databind.JsonNode rawPageable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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.
-
-
-
Method Detail
-
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
public org.springframework.data.domain.Page<T> getPage()
-
-