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)
-
Field Summary
Fields inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND
-
Constructor Summary
ConstructorDescriptionExternalFulfillmentProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalFulfillmentProviderProperties externalFulfillmentProviderProperties) -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse
findFulfillmentOptions
(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aFulfillmentOptionResponse
, which containsPricedFulfillmentOptions
for a given request andContextInfo
.protected String
protected ExternalFulfillmentProviderProperties
protected String
protected String
com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig
readFulfillmentPricingConfig
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads theFulfillmentPricingConfig
for a givenContextInfo
.Methods inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
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
-
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 aFulfillmentOptionResponse
, which containsPricedFulfillmentOptions
for a given request andContextInfo
.- Specified by:
findFulfillmentOptions
in interfaceFulfillmentProvider
- 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
-
readFulfillmentPricingConfig
@NonNull public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig readFulfillmentPricingConfig(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:FulfillmentProvider
Reads theFulfillmentPricingConfig
for a givenContextInfo
.- Specified by:
readFulfillmentPricingConfig
in interfaceFulfillmentProvider
- Parameters:
contextInfo
- The application and user context of the request.- Returns:
- The
FulfillmentPricingConfig
for the givenContextInfo
.
-
getConfigUrl
-
getExternalFulfillmentProviderProperties
-