Interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>

  • All Known Implementing Classes:
    ExternalFulfillmentProvider

    public interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
    Provider for interfacing with operations involving fulfillments. Typically utilizes WebClient to make requests to an external REST API.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      F create​(F fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Creates a OrderFulfillment.
      void delete​(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deletes a OrderFulfillment with the given ID.
      org.springframework.data.domain.Page<F> readAll​(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve all OrderFulfillments.
      List<F> readAllByOrderId​(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve all of the OrderFulfillments with the given order ID.
      F readById​(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the OrderFulfillment with the given ID.
      F readByIdMatchingTenant​(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the OrderFulfillment with the given ID, ignoring its application as long as it's in the current tenant context.
      F replace​(F fulfillment, String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Replace the OrderFulfillment with the given ID.
      List<F> replaceOrCreateAll​(Collection<F> fulfillments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Replace all of the given OrderFulfillment which already exist, or create them.
    • Method Detail

      • readAll

        org.springframework.data.domain.Page<F> readAll​(cz.jirutka.rsql.parser.ast.Node filters,
                                                        @Nullable
                                                        org.springframework.data.domain.Pageable page,
                                                        @Nullable
                                                        com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve all OrderFulfillments.
        Parameters:
        filters - the list of filters to apply to this query
        page - the requested page of results from the database
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillment with the given ID
      • readById

        F readById​(String fulfillmentId,
                   @Nullable
                   com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the OrderFulfillment with the given ID.
        Parameters:
        fulfillmentId - the ID of the fulfillment to retrieve
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillment with the given ID
      • readByIdMatchingTenant

        F readByIdMatchingTenant​(String fulfillmentId,
                                 @Nullable
                                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the OrderFulfillment with the given ID, ignoring its application as long as it's in the current tenant context.
        Parameters:
        fulfillmentId - the ID of the fulfillment to retrieve
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillment with the given ID
      • create

        F create​(F fulfillment,
                 @Nullable
                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Creates a OrderFulfillment.
        Parameters:
        fulfillment - the fulfillment to create
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillment with the given ID
      • replace

        F replace​(F fulfillment,
                  String fulfillmentId,
                  @Nullable
                  com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Replace the OrderFulfillment with the given ID.
        Parameters:
        fulfillment - the fulfillment to replace with
        fulfillmentId - the ID of the fulfillment to retrieve
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillment with the given ID
      • delete

        void delete​(String fulfillmentId,
                    @Nullable
                    com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deletes a OrderFulfillment with the given ID.
        Parameters:
        fulfillmentId - the ID of the fulfillment to delete
        contextInfo - context information around sandbox and multitenant state.
      • replaceOrCreateAll

        List<F> replaceOrCreateAll​(Collection<F> fulfillments,
                                   @Nullable
                                   com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Replace all of the given OrderFulfillment which already exist, or create them.
        Parameters:
        fulfillments - the fulfillments to replace or create
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the replaced and created fulfillments
      • readAllByOrderId

        List<F> readAllByOrderId​(String orderId,
                                 @Nullable
                                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve all of the OrderFulfillments with the given order ID.
        Parameters:
        orderId - the order ID of the fulfillments to retrieve
        contextInfo - context information around sandbox and multitenant state.
        Returns:
        the fulfillments with the given order ID