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 Details

    • 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 -
      promotableOrder -
      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
      promotableOrder - 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)