Class DefaultOrderHydrationService

java.lang.Object
com.broadleafcommerce.order.service.hydration.DefaultOrderHydrationService
All Implemented Interfaces:
OrderHydrationService

public class DefaultOrderHydrationService extends Object implements OrderHydrationService
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultOrderHydrationService

      public DefaultOrderHydrationService()
  • Method Details

    • hydrate

      public 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)
      Description copied from interface: OrderHydrationService
      Hook point to hydrate entities fetched from the internal search endpoint. See OrderEndpoint.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.

      Specified by:
      hydrate in interface OrderHydrationService
      Parameters:
      orders - the page of orders to hydrate
      context - context information around sandbox and multitenant state
      Returns:
      The page of hydrated orders