Class ExternalFulfillmentProvider

java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.cartoperation.service.provider.external.ExternalFulfillmentProvider
All Implemented Interfaces:
FulfillmentProvider

public class ExternalFulfillmentProvider extends AbstractExternalProvider implements FulfillmentProvider
Implementation of FulfillmentProvider that makes external (web) calls to a FulfillmentService to fetch PricedFulfillmentOptions and FulfillmentPricingConfig
Author:
Kelly Tisdell (ktisdell)
  • 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, ExternalFulfillmentProviderProperties externalFulfillmentProviderProperties)
  • Method Details

    • getServiceClient

      protected String getServiceClient()
    • findFulfillmentOptions

      public com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse findFulfillmentOptions(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Returns a FulfillmentOptionResponse, which contains PricedFulfillmentOptions for a given request and ContextInfo.
      Specified by:
      findFulfillmentOptions in interface FulfillmentProvider
      Parameters:
      request - Cart data needed by FulfillmentServices to produce fulfillment options.
      contextInfo - The application and user context of the request.
      Returns:
      Response containing PricedFulfillmentOptions
    • getOptionsUrl

      protected String getOptionsUrl()
    • readFulfillmentPricingConfig

      @NonNull public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig readFulfillmentPricingConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: FulfillmentProvider
      Reads the FulfillmentPricingConfig for a given ContextInfo.
      Specified by:
      readFulfillmentPricingConfig in interface FulfillmentProvider
      Parameters:
      contextInfo - The application and user context of the request.
      Returns:
      The FulfillmentPricingConfig for the given ContextInfo.
    • getConfigUrl

      protected String getConfigUrl()
    • getExternalFulfillmentProviderProperties

      protected ExternalFulfillmentProviderProperties getExternalFulfillmentProviderProperties()