Class NoInventoryFulfillmentPricingProvider
java.lang.Object
com.broadleafcommerce.fulfillment.provider.NoInventoryFulfillmentPricingProvider
- All Implemented Interfaces:
FulfillmentOptionPricingProvider
,org.springframework.core.Ordered
public class NoInventoryFulfillmentPricingProvider
extends Object
implements FulfillmentOptionPricingProvider
Mechanism to set
PricedFulfillmentOption
with no price for groups that contain items with
InventoryType#NONE
.- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionNoInventoryFulfillmentPricingProvider
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
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
.final String
This is an arbitrary, but unique, descriptive ID (e.g.protected com.broadleafcommerce.common.extension.TypeFactory
protected void
setFulfillmentDates
(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption option, com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingGroup group, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig config, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.fulfillment.provider.FulfillmentOptionPricingProvider
getOrder, isRemoteProvider
-
Field Details
-
PROVIDER_ID
- See Also:
-
-
Constructor Details
-
NoInventoryFulfillmentPricingProvider
public NoInventoryFulfillmentPricingProvider(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
getProviderId
Description copied from interface:FulfillmentOptionPricingProvider
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.- Specified by:
getProviderId
in interfaceFulfillmentOptionPricingProvider
- Returns:
-
findFulfillmentOptions
public com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse findFulfillmentOptions(@NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig config, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:FulfillmentOptionPricingProvider
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).- Specified by:
findFulfillmentOptions
in interfaceFulfillmentOptionPricingProvider
- 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
-
setFulfillmentDates
protected void setFulfillmentDates(@NonNull com.broadleafcommerce.order.common.domain.PricedFulfillmentOption option, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingGroup group, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig config, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-