Class ExternalFulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>

java.lang.Object
com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.orderoperation.service.provider.external.ExternalFulfillmentProvider<F>
All Implemented Interfaces:
FulfillmentProvider<F>

public class ExternalFulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment> extends AbstractExternalProvider implements FulfillmentProvider<F>
  • Field Details

  • Constructor Details

    • ExternalFulfillmentProvider

      public ExternalFulfillmentProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalOrderProperties properties)
  • Method Details

    • readAll

      public 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)
      Description copied from interface: FulfillmentProvider
      Retrieve all OrderFulfillments.
      Specified by:
      readAll in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      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

      public F readById(@NonNull @NonNull String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Retrieve the OrderFulfillment with the given ID.
      Specified by:
      readById in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      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

      public F readByIdMatchingTenant(@NonNull @NonNull String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Retrieve the OrderFulfillment with the given ID, ignoring its application as long as it's in the current tenant context.
      Specified by:
      readByIdMatchingTenant in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      Parameters:
      fulfillmentId - the ID of the fulfillment to retrieve
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the fulfillment with the given ID
    • replace

      public F replace(F fulfillment, String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Replace the OrderFulfillment with the given ID.
      Specified by:
      replace in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      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
    • create

      public F create(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Creates a OrderFulfillment.
      Specified by:
      create in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      Parameters:
      fulfillment - the fulfillment to create
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the fulfillment with the given ID
    • delete

      public void delete(String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Deletes a OrderFulfillment with the given ID.
      Specified by:
      delete in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      Parameters:
      fulfillmentId - the ID of the fulfillment to delete
      contextInfo - context information around sandbox and multitenant state.
    • replaceOrCreateAll

      public List<F> replaceOrCreateAll(Collection<F> fulfillments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Replace all of the given OrderFulfillment which already exist, or create them.
      Specified by:
      replaceOrCreateAll in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      Parameters:
      fulfillments - the fulfillments to replace or create
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the replaced and created fulfillments
    • readAllByOrderId

      public List<F> readAllByOrderId(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Retrieve all of the OrderFulfillments with the given order ID.
      Specified by:
      readAllByOrderId in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      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
    • readAllByOrderFulfillmentLink

      public org.springframework.data.domain.Page<F> readAllByOrderFulfillmentLink(@NonNull @NonNull String orderFulfillmentLink, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Retrieve all of the OrderFulfillments using the provided API URL.
      Specified by:
      readAllByOrderFulfillmentLink in interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
      Parameters:
      orderFulfillmentLink - the API URL to read the Order fulfillments
      page - the requested page of results from the database
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the fulfillments for the provided API URL
    • getBaseUri

      protected org.springframework.web.util.UriComponentsBuilder getBaseUri()
      Gets the base URI common to all direct requests for fulfillments.
      Returns:
      a URI components builder with the base URI set up
    • getMatchingTenantUri

      protected org.springframework.web.util.UriComponentsBuilder getMatchingTenantUri()
      Gets the URI for requesting a fulfillment matching tenant.
      Returns:
      a URI components builder with the fulfillment matching tenant URI
    • getOrderOwnedBaseUri

      protected org.springframework.web.util.UriComponentsBuilder getOrderOwnedBaseUri()
      Gets the base URI common to requests for order-owned fulfillments.
      Returns:
      a URI components builder with the base URI set up
    • getServiceClient

      protected String getServiceClient()
    • getProperties

      protected ExternalOrderProperties getProperties()