org.broadleafcommerce.core.offer.service
Interface OfferServiceExtensionHandler

All Superinterfaces:
ExtensionHandler
All Known Implementing Classes:
AbstractOfferServiceExtensionHandler

public interface OfferServiceExtensionHandler
extends ExtensionHandler

Author:
Andre Azzolini (apazzolini), bpolster

Method Summary
 ExtensionResultStatusType applyAdditionalFilters(List<Offer> offers)
           
 ExtensionResultStatusType applyItemOffer(PromotableOrder order, PromotableCandidateItemOffer itemOffer, Map<String,Object> contextMap)
          Modules may need to extend the applyItemOffer logic For example, a subscription module might creates future payment adjustments.
 ExtensionResultStatusType calculatePotentialSavings(PromotableCandidateItemOffer itemOffer, PromotableOrderItem item, int quantity, Map<String,Object> contextMap)
          Modules may extend the calculatePotentialSavings method.
 ExtensionResultStatusType chooseSaleOrRetailAdjustments(PromotableOrder order)
          Allows a module to finalize adjustments.
 ExtensionResultStatusType createOrderItemPriceDetailAdjustment(ExtensionResultHolder resultHolder, OrderItemPriceDetail itemDetail)
          Allows module extensions to add a create a new instance of OrderItemPriceDetailAdjustment.
 ExtensionResultStatusType resetPriceDetails(PromotableOrderItem item)
          Modules may need to clear additional offer details when resetPriceDetails is called.
 ExtensionResultStatusType synchronizeAdjustmentsAndPrices(PromotableOrder order)
          Allows a module to amend the data that synchronizes the PromotableOrder with the Order
 
Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
 

Method Detail

applyAdditionalFilters

ExtensionResultStatusType applyAdditionalFilters(List<Offer> offers)

calculatePotentialSavings

ExtensionResultStatusType calculatePotentialSavings(PromotableCandidateItemOffer itemOffer,
                                                    PromotableOrderItem item,
                                                    int quantity,
                                                    Map<String,Object> contextMap)
Modules may extend the calculatePotentialSavings method. Once the handlers run, the contextMap will be checked for an entry with a key of "savings". If that entry returns a non-null Money, that value will be returned from the calling method. Otherwise, the map will be checked for an entry with a key of "quantity". If a non-null Integer is returned, that value will replace the quantity call in the normal call to calculatePotentialSavings. This extension is utilized by one or more BLC enterprise modules including Subscription.

Parameters:
itemOffer -
item -
quantity -
contextMap -
Returns:

resetPriceDetails

ExtensionResultStatusType resetPriceDetails(PromotableOrderItem item)
Modules may need to clear additional offer details when resetPriceDetails is called.

Parameters:
item -
Returns:

applyItemOffer

ExtensionResultStatusType applyItemOffer(PromotableOrder order,
                                         PromotableCandidateItemOffer itemOffer,
                                         Map<String,Object> contextMap)
Modules may need to extend the applyItemOffer logic For example, a subscription module might creates future payment adjustments. The module add an attribute of type Boolean to the contextMap named "stopProcessing" indicating to the core offer engine that further adjustment processing is not needed.

Parameters:
order -
itemOffer -
contextMap -
Returns:

synchronizeAdjustmentsAndPrices

ExtensionResultStatusType synchronizeAdjustmentsAndPrices(PromotableOrder order)
Allows a module to amend the data that synchronizes the PromotableOrder with the Order

Parameters:
order -
Returns:

chooseSaleOrRetailAdjustments

ExtensionResultStatusType chooseSaleOrRetailAdjustments(PromotableOrder order)
Allows a module to finalize adjustments.

Parameters:
order -
Returns:

createOrderItemPriceDetailAdjustment

ExtensionResultStatusType createOrderItemPriceDetailAdjustment(ExtensionResultHolder resultHolder,
                                                               OrderItemPriceDetail itemDetail)
Allows module extensions to add a create a new instance of OrderItemPriceDetailAdjustment. The module should add the value to the resultHolder.getContextMap() with a key of "OrderItemPriceDetailAdjustment"

Parameters:
resultHolder -
Returns:


Copyright © 2013. All Rights Reserved.