Class CustomerOrderInfoFulfillmentContributor

java.lang.Object
com.broadleafcommerce.order.service.hydration.CustomerOrderInfoFulfillmentContributor
All Implemented Interfaces:
CustomerOrderInfoContributor, org.springframework.core.Ordered

public class CustomerOrderInfoFulfillmentContributor extends Object implements CustomerOrderInfoContributor
Contributor is responsible for populating the CustomerOrderInfo.getFulfillments() for the Orders.
Author:
Dima Myroniuk (dmyroniuk)
  • Field Details

  • Constructor Details

    • CustomerOrderInfoFulfillmentContributor

      public CustomerOrderInfoFulfillmentContributor(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService)
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • canHandle

      public boolean canHandle(ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CustomerOrderInfoContributor
      Determines if this contributor can handle the request
      Specified by:
      canHandle in interface CustomerOrderInfoContributor
      Parameters:
      request - the request to read the Orders and the related data
      contextInfo - context information around sandbox and multitenant state
      Returns:
      true if this contributor can handle the request, false otherwise
    • contribute

      public org.springframework.data.domain.Page<CustomerOrderInfo> contribute(@NonNull @NonNull org.springframework.data.domain.Page<CustomerOrderInfo> customerOrderInfos, @NonNull @NonNull ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CustomerOrderInfoContributor
      Reads the additional data for the Orders requested in the ReadCustomerOrdersRequest and populates for the Orders in the specified page of CustomerOrderInfo
      Specified by:
      contribute in interface CustomerOrderInfoContributor
      Parameters:
      customerOrderInfos - the page of the CustomerOrderInfo
      request - the request to read the Orders and the related data
      contextInfo - context information around sandbox and multitenant state
      Returns:
      the page of the CustomerOrderInfo with the additional requested data if any
    • getOrderFulfillmentService

      protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService()