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
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NoInventoryFulfillmentPricingProvider(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.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 the FulfillmentOptionRequest, this method attempts to provide a list of appropriate Priced 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

  • Constructor Details

    • NoInventoryFulfillmentPricingProvider

      public NoInventoryFulfillmentPricingProvider(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • getProviderId

      public final String 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 interface FulfillmentOptionPricingProvider
      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 the FulfillmentOptionRequest, this method attempts to provide a list of appropriate Priced Fulfillment Options. If this provider can't handle the request, it should return null or a FulfillmentOptionResponse with an empty list of Priced Fulfillment Options. The items in the FulfillmentPricingGroups are assumed to have the same FulfillmentPricingGroup.getFulfillmentType(). The results of this method may contain PricedFulfillmentOptions 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 interface FulfillmentOptionPricingProvider
      Parameters:
      request - which represents a lightweight Cart for the purpose of determining shipping
      config - the FulfillmentPricingConfig associated with the given contextInfo
      contextInfo - 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()