Interface OrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>

All Known Implementing Classes:
ExternalOrderProvider

public interface OrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>
Provider for interfacing with operations involving orders. Typically utilizes WebClient to make requests to an external REST API.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(O order, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Creates a Order.
    void
    delete(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deletes a Order with the given ID.
    org.springframework.data.domain.Page<O>
    readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve all Orders.
    readByCartId(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order with the given cart ID.
    readById(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order with the given ID.
    readByIdMatchingTenant(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order with the given ID, ignoring its application as long as it's in the current tenant context.
    readByOrderLink(String orderLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order using the provided API URL.
    readByOrderNumber(String orderNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order with the given order number.
    org.springframework.data.domain.Page<CustomerOrderInfo>
    readCustomerOrderInfo(ReadCustomerOrdersRequest request, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads the Orders and additional related data for the ReadCustomerOrdersRequest.
    readOwnedById(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the Order with the given ID, validating ownership if necessary.
    update(O order, String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Update the Order with the given ID.
  • Method Details

    • readAll

      org.springframework.data.domain.Page<O> 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 Orders.
      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 order with the given ID
    • readCustomerOrderInfo

      org.springframework.data.domain.Page<CustomerOrderInfo> readCustomerOrderInfo(ReadCustomerOrdersRequest request, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads the Orders and additional related data for the ReadCustomerOrdersRequest.
      Parameters:
      request - the request to read the Orders and the related data
      page - the requested page of results from the database
      contextInfo - context information related to multitenancy
      Returns:
      the page of the CustomerOrderInfo with the additional requested data if any
    • readById

      O readById(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the Order with the given ID.
      Parameters:
      orderId - the ID of the order to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the order with the given ID
    • readByOrderLink

      O readByOrderLink(String orderLink, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the Order using the provided API URL.
      Parameters:
      orderLink - the API URL to read the Order
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the Order for the provided API URL
    • readByIdMatchingTenant

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

      O readOwnedById(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the Order with the given ID, validating ownership if necessary.
      Parameters:
      orderId - the ID of the order to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the order with the given ID
    • readByCartId

      Optional<O> readByCartId(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the Order with the given cart ID.
      Parameters:
      cartId - the cart ID of the order to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the order with the given cart ID
    • readByOrderNumber

      O readByOrderNumber(String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the Order with the given order number.
      Parameters:
      orderNumber - the order number of the order to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the order with the given order number
    • create

      O create(O order, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Creates a Order.
      Parameters:
      order - the order to replace with
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the created order
    • update

      O update(O order, String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Update the Order with the given ID.
      Parameters:
      order - the order to update with
      orderId - the ID of the order to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the updated order with the given ID
    • delete

      void delete(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deletes a Order with the given ID.
      Parameters:
      orderId - the ID of the order to delete
      contextInfo - context information around sandbox and multitenant state.