Interface OrderHydrationService
- All Known Implementing Classes:
DefaultOrderHydrationService
public interface OrderHydrationService
Service to provide optional hook points for hydrating orders with associated entities.
The default implementation of this service does not perform any hydration.
- Author:
- mariestandeven
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<com.broadleafcommerce.order.client.domain.Order>
hydrate
(org.springframework.data.domain.Page<com.broadleafcommerce.order.client.domain.Order> orders, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Hook point to hydrate entities fetched from the internal search endpoint.
-
Method Details
-
hydrate
org.springframework.data.domain.Page<com.broadleafcommerce.order.client.domain.Order> hydrate(org.springframework.data.domain.Page<com.broadleafcommerce.order.client.domain.Order> orders, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Hook point to hydrate entities fetched from the internal search endpoint. SeeOrderEndpoint.readAllOrders(HttpServletRequest, ContextInfo, String, Pageable, boolean, Node)
.By default, the internal search does not require hydration since the displayed fields exist on the
Order
entity. However, this method can be overridden to hydrate and display fields from sub-entities.- Parameters:
orders
- the page of orders to hydratecontext
- context information around sandbox and multitenant state- Returns:
- The page of hydrated orders
-