Interface FulfillmentOptionPricingProvider
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
NoInventoryFulfillmentPricingProvider
public interface FulfillmentOptionPricingProvider
extends org.springframework.core.Ordered
Interface to define an integration with a specific fulfillment pricing provider. Consider that
these providers are often 3rd party systems (e.g. USPS, UPS, FedEx, ShipEngine, etc.) The can
also be integrated with DB or JSON data (e.g. a banded fulfillment pricing provider).
- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse
findFulfillmentOptions
(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig config, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentOptionRequest
, this method attempts to provide a list of appropriatePriced Fulfillment Options
.default int
getOrder()
Provides order - or priority - to a collection ofFulfillment Option Pricing Providers
.This is an arbitrary, but unique, descriptive ID (e.g.default boolean
Indicates if calls to this provider require a network call, especially to a 1st or 3rd party system.
-
Method Details
-
getProviderId
String getProviderId()This is an arbitrary, but unique, descriptive ID (e.g. 'BLC_BANDED_PRICING_PROVIDER'). This could be a class name too, but often something with a prefix and a descriptive name is enough. All providers offered by Broadleaf will have a name starting with "BLC_". Client and 3rd party providers should not use "BLC_" as a prefix.- Returns:
-
findFulfillmentOptions
@Nullable com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse findFulfillmentOptions(@NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig config, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentOptionRequest
, this method attempts to provide a list of appropriatePriced Fulfillment Options
. If this provider can't handle the request, it should return null or aFulfillmentOptionResponse
with an empty list ofPriced Fulfillment Options
. The items in theFulfillmentPricingGroups
are assumed to have the sameFulfillmentPricingGroup.getFulfillmentType()
. The results of this method may containPricedFulfillmentOptions
that may not have been requested. Those may affect the way that Fulfillment Groups are re-grouped or re-organized (e.g. based on inventory, or store availability, for example).- Parameters:
request
- which represents a lightweight Cart for the purpose of determining shippingconfig
- the FulfillmentPricingConfig associated with the given contextInfocontextInfo
- the context info providing tenancy and application data among other things- Returns:
- FulfillmentOptionResponse containing a list of PricedFulfillmentOptions
-
getOrder
default int getOrder()Provides order - or priority - to a collection ofFulfillment Option Pricing Providers
. The default value is zero (0). Implementors that wish a higher priority should ensure that this method returns a value less than 0 (lower value == higher priority). Note that, by default, this property does not affect logic because all providers will get executed. However, this is here in case there is a creative need for orderingFulfillment Option Pricing Providers
.- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
- Returns:
- See Also:
-
Ordered
-
isRemoteProvider
default boolean isRemoteProvider()Indicates if calls to this provider require a network call, especially to a 1st or 3rd party system. If the provider talks directly to a database or to a file system resource, then that is generally considered to not be remote. This affects whether aCircuitBreaker
may be used, if available.- Returns:
-