Interface OrderFulfillmentService<P extends com.broadleafcommerce.search.fulfillment.core.domain.OrderFulfillment>

  • All Known Implementing Classes:
    DefaultOrderFulfillmentService

    public interface OrderFulfillmentService<P extends com.broadleafcommerce.search.fulfillment.core.domain.OrderFulfillment>
    Service to interact with Order service to retrieve order fulfillments for indexing.
    Author:
    Dima Myroniuk (dmyroniuk)
    • Method Detail

      • readBatchOfOrderFulfillmentIds

        List<String> readBatchOfOrderFulfillmentIds​(String startId,
                                                    int batchSize)
                                             throws com.broadleafcommerce.search.api.SearchIndexException
        Reads a batch of IDs to be placed in a queue for processing.
        Parameters:
        startId - The starting ID
        batchSize - The size of the batch
        Returns:
        A list of order fulfillment IDs.
        Throws:
        com.broadleafcommerce.search.api.SearchIndexException - if reading the order fulfillment ids fails.
      • readBatchOfOrderFulfillments

        List<P> readBatchOfOrderFulfillments​(List<String> ids)
                                      throws com.broadleafcommerce.search.api.SearchIndexException
        Reads a batch of Order fulfillments by their IDs.
        Parameters:
        ids - A list of order fulfillment IDs.
        Returns:
        A list of order fulfillments or an empty list.
        Throws:
        com.broadleafcommerce.search.api.SearchIndexException - if reading the order fulfillment fails.
      • readOrderFulfillmentsByOrderId

        List<P> readOrderFulfillmentsByOrderId​(String orderId)
                                        throws com.broadleafcommerce.search.api.SearchIndexException
        Reads a batch of Order fulfillments by order ID.
        Parameters:
        orderId - an order ID.
        Returns:
        A list of order fulfillments or an empty list.
        Throws:
        com.broadleafcommerce.search.api.SearchIndexException - if reading the order fulfillment fails.
      • readOrderFulfillmentByContextId

        Optional<P> readOrderFulfillmentByContextId​(String contextId)
                                             throws com.broadleafcommerce.search.api.SearchIndexException
        Reads an OrderFulfillment by its ID.
        Parameters:
        contextId - An order fulfillment id
        Returns:
        An order fulfillment optional or Optional.empty()
        Throws:
        com.broadleafcommerce.search.api.SearchIndexException - if reading the order fulfillment fails.