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
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionNoInventoryFulfillmentPricingProvider(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponsefindFulfillmentOptions(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 StringThis is an arbitrary, but unique, descriptive ID (e.g.protected com.broadleafcommerce.common.extension.TypeFactoryprotected voidsetFulfillmentDates(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, waitMethods 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:FulfillmentOptionPricingProviderThis 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:
getProviderIdin 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:FulfillmentOptionPricingProviderGiven 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 aFulfillmentOptionResponsewith an empty list ofPriced Fulfillment Options. The items in theFulfillmentPricingGroupsare assumed to have the sameFulfillmentPricingGroup.getFulfillmentType(). The results of this method may containPricedFulfillmentOptionsthat 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:
findFulfillmentOptionsin 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()
-