org.broadleafcommerce.core.offer.service.processor
Interface OrderOfferProcessor

All Superinterfaces:
BaseProcessor
All Known Subinterfaces:
FulfillmentGroupOfferProcessor, ItemOfferProcessor
All Known Implementing Classes:
FulfillmentGroupOfferProcessorImpl, ItemOfferProcessorImpl, OrderOfferProcessorImpl

public interface OrderOfferProcessor
extends BaseProcessor

Author:
jfischer

Method Summary
 void applyAllOrderOffers(List<PromotableCandidateOrderOffer> orderOffers, PromotableOrder promotableOrder)
          Takes a list of sorted CandidateOrderOffers and determines if each offer can be applied based on the restrictions (stackable and/or combinable) on that offer.
 boolean couldOfferApplyToOrder(Offer offer, PromotableOrder promotableOrder)
          Executes the appliesToOrderRules in the Offer to determine if this offer can be applied to the Order, OrderItem, or FulfillmentGroup.
 Boolean executeExpression(String expression, Map<String,Object> vars)
           
 void filterOrderLevelOffer(PromotableOrder promotableOrder, List<PromotableCandidateOrderOffer> qualifiedOrderOffers, Offer offer)
           
 PromotableItemFactory getPromotableItemFactory()
           
 List<PromotableCandidateOrderOffer> removeTrailingNotCombinableOrderOffers(List<PromotableCandidateOrderOffer> candidateOffers)
           
 void setOfferDao(OfferDao offerDao)
          Set the offerDao (primarily for unit testing)
 void setOrderItemDao(OrderItemDao orderItemDao)
          Set the orderItemDao (primarily for unit testing)
 void setPromotableItemFactory(PromotableItemFactory promotableItemFactory)
           
 void synchronizeAdjustmentsAndPrices(PromotableOrder promotableOrder)
          Takes the adjustments and PriceDetails from the passed in PromotableOrder and transfers them to the actual order first checking to see if they already exist.
 
Methods inherited from interface org.broadleafcommerce.core.offer.service.processor.BaseProcessor
filterOffers
 

Method Detail

filterOrderLevelOffer

void filterOrderLevelOffer(PromotableOrder promotableOrder,
                           List<PromotableCandidateOrderOffer> qualifiedOrderOffers,
                           Offer offer)

executeExpression

Boolean executeExpression(String expression,
                          Map<String,Object> vars)

couldOfferApplyToOrder

boolean couldOfferApplyToOrder(Offer offer,
                               PromotableOrder promotableOrder)
Executes the appliesToOrderRules in the Offer to determine if this offer can be applied to the Order, OrderItem, or FulfillmentGroup.

Parameters:
offer -
order -
Returns:
true if offer can be applied, otherwise false

removeTrailingNotCombinableOrderOffers

List<PromotableCandidateOrderOffer> removeTrailingNotCombinableOrderOffers(List<PromotableCandidateOrderOffer> candidateOffers)

applyAllOrderOffers

void applyAllOrderOffers(List<PromotableCandidateOrderOffer> orderOffers,
                         PromotableOrder promotableOrder)
Takes a list of sorted CandidateOrderOffers and determines if each offer can be applied based on the restrictions (stackable and/or combinable) on that offer. OrderAdjustments are create on the Order for each applied CandidateOrderOffer. An offer with stackable equals false cannot be applied to an Order that already contains an OrderAdjustment. An offer with combinable equals false cannot be applied to the Order if the Order already contains an OrderAdjustment.

Parameters:
orderOffers - a sorted list of CandidateOrderOffer
order - the Order to apply the CandidateOrderOffers

getPromotableItemFactory

PromotableItemFactory getPromotableItemFactory()

setPromotableItemFactory

void setPromotableItemFactory(PromotableItemFactory promotableItemFactory)

synchronizeAdjustmentsAndPrices

void synchronizeAdjustmentsAndPrices(PromotableOrder promotableOrder)
Takes the adjustments and PriceDetails from the passed in PromotableOrder and transfers them to the actual order first checking to see if they already exist.

Parameters:
promotableOrder -

setOfferDao

void setOfferDao(OfferDao offerDao)
Set the offerDao (primarily for unit testing)


setOrderItemDao

void setOrderItemDao(OrderItemDao orderItemDao)
Set the orderItemDao (primarily for unit testing)



Copyright © 2013. All Rights Reserved.