org.broadleafcommerce.core.offer.service.discount.domain
Class PromotableOrderImpl

java.lang.Object
  extended by org.broadleafcommerce.core.offer.service.discount.domain.PromotableOrderImpl
All Implemented Interfaces:
PromotableOrder

public class PromotableOrderImpl
extends java.lang.Object
implements PromotableOrder


Field Summary
protected  java.math.BigDecimal adjustmentPrice
           
protected  boolean currentSortParam
           
protected  Order delegate
           
protected  java.util.List<PromotableOrderItem> discountableDiscreteOrderItems
           
protected  java.util.List<PromotableOrderItem> discreteOrderItems
           
protected  java.util.List<PromotableFulfillmentGroup> fulfillmentGroups
           
protected  boolean hasOrderAdjustments
           
protected  PromotableItemFactory itemFactory
           
protected  boolean notCombinableOfferApplied
           
protected  boolean notCombinableOfferAppliedAtAnyLevel
           
protected  java.util.List<OrderItemSplitContainer> splitItems
           
protected  boolean totalitarianOfferApplied
           
 
Constructor Summary
PromotableOrderImpl(Order order, PromotableItemFactory itemFactory)
           
 
Method Summary
 void addCandidateOrderOffer(PromotableCandidateOrderOffer candidateOrderOffer)
           
 void addOrderAdjustments(PromotableOrderAdjustment orderAdjustment)
          Adds the adjustment to the order's adjustment list and discounts the order's adjustment price by the value of the adjustment.
 void assignOrderItemsFinalPrice()
           
 Money calculateOrderItemsCurrentPrice()
           
 Money calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)
           
 Money calculateOrderItemsPriceWithoutAdjustments()
           
 boolean containsNotStackableFulfillmentGroupOffer()
           
 boolean containsNotStackableOrderOffer()
           
 Money getAdjustmentPrice()
          Returns the price of the order with the order offers applied (item offers are not applied).
 java.util.List<PromotableOrderItem> getAllSplitItems()
           
 Customer getCustomer()
           
 Order getDelegate()
           
 java.util.List<PromotableOrderItem> getDiscountableDiscreteOrderItems()
           
 java.util.List<PromotableOrderItem> getDiscountableDiscreteOrderItems(boolean applyDiscountToSalePrice)
           
 java.util.List<PromotableOrderItem> getDiscreteOrderItems()
           
 java.util.List<PromotableFulfillmentGroup> getFulfillmentGroups()
           
 java.util.List<OrderItemSplitContainer> getSplitItems()
           
 Money getSubTotal()
           
 boolean isHasOrderAdjustments()
           
 boolean isNotCombinableOfferApplied()
           
 boolean isNotCombinableOfferAppliedAtAnyLevel()
           
 boolean isTotalitarianOfferApplied()
           
 void removeAllAddedOfferCodes()
           
 void removeAllAdjustments()
          Removes all order, order item, and fulfillment adjustments from the order and resets the adjustment price.
 void removeAllCandidateFulfillmentGroupOffers()
           
 void removeAllCandidateOffers()
           
 void removeAllCandidateOrderOffers()
           
 void removeAllFulfillmentAdjustments()
           
 void removeAllItemAdjustments()
          Removes all adjustments from the order's order items and resets the adjustment price for each item.
 void removeAllOrderAdjustments()
          Removes all order adjustments from the order and resets the adjustment price.
 void reset()
           
 void resetDiscreteOrderItems()
           
 void resetFulfillmentGroups()
           
 void resetTotalitarianOfferApplied()
           
 java.util.List<PromotableOrderItem> searchSplitItems(PromotableOrderItem key)
           
 void setAdjustmentPrice(Money adjustmentPrice)
           
 void setNotCombinableOfferAppliedAtAnyLevel(boolean notCombinableOfferAppliedAtAnyLevel)
           
 void setSplitItems(java.util.List<OrderItemSplitContainer> splitItems)
           
 void setSubTotal(Money subTotal)
           
 void setTotalitarianOfferApplied(boolean totalitarianOfferApplied)
           
 void setTotalShipping(Money totalShipping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalitarianOfferApplied

protected boolean totalitarianOfferApplied

notCombinableOfferAppliedAtAnyLevel

protected boolean notCombinableOfferAppliedAtAnyLevel

notCombinableOfferApplied

protected boolean notCombinableOfferApplied

hasOrderAdjustments

protected boolean hasOrderAdjustments

splitItems

protected java.util.List<OrderItemSplitContainer> splitItems

adjustmentPrice

protected java.math.BigDecimal adjustmentPrice

delegate

protected Order delegate

fulfillmentGroups

protected java.util.List<PromotableFulfillmentGroup> fulfillmentGroups

discreteOrderItems

protected java.util.List<PromotableOrderItem> discreteOrderItems

discountableDiscreteOrderItems

protected java.util.List<PromotableOrderItem> discountableDiscreteOrderItems

currentSortParam

protected boolean currentSortParam

itemFactory

protected PromotableItemFactory itemFactory
Constructor Detail

PromotableOrderImpl

public PromotableOrderImpl(Order order,
                           PromotableItemFactory itemFactory)
Method Detail

reset

public void reset()

resetFulfillmentGroups

public void resetFulfillmentGroups()
Specified by:
resetFulfillmentGroups in interface PromotableOrder

resetDiscreteOrderItems

public void resetDiscreteOrderItems()
Specified by:
resetDiscreteOrderItems in interface PromotableOrder

resetTotalitarianOfferApplied

public void resetTotalitarianOfferApplied()
Specified by:
resetTotalitarianOfferApplied in interface PromotableOrder

addOrderAdjustments

public void addOrderAdjustments(PromotableOrderAdjustment orderAdjustment)
Description copied from interface: PromotableOrder
Adds the adjustment to the order's adjustment list and discounts the order's adjustment price by the value of the adjustment.

Specified by:
addOrderAdjustments in interface PromotableOrder

removeAllAdjustments

public void removeAllAdjustments()
Description copied from interface: PromotableOrder
Removes all order, order item, and fulfillment adjustments from the order and resets the adjustment price.

Specified by:
removeAllAdjustments in interface PromotableOrder

removeAllOrderAdjustments

public void removeAllOrderAdjustments()
Description copied from interface: PromotableOrder
Removes all order adjustments from the order and resets the adjustment price. This method does not remove order item or fulfillment adjustments from the order.

Specified by:
removeAllOrderAdjustments in interface PromotableOrder

removeAllItemAdjustments

public void removeAllItemAdjustments()
Description copied from interface: PromotableOrder
Removes all adjustments from the order's order items and resets the adjustment price for each item. This method does not remove order or fulfillment adjustments from the order.

Specified by:
removeAllItemAdjustments in interface PromotableOrder

removeAllFulfillmentAdjustments

public void removeAllFulfillmentAdjustments()
Specified by:
removeAllFulfillmentAdjustments in interface PromotableOrder

getAdjustmentPrice

public Money getAdjustmentPrice()
Description copied from interface: PromotableOrder
Returns the price of the order with the order offers applied (item offers are not applied).

Specified by:
getAdjustmentPrice in interface PromotableOrder
Returns:
the order price with the order offers applied (item offers are not applied)

setAdjustmentPrice

public void setAdjustmentPrice(Money adjustmentPrice)
Specified by:
setAdjustmentPrice in interface PromotableOrder

isNotCombinableOfferApplied

public boolean isNotCombinableOfferApplied()
Specified by:
isNotCombinableOfferApplied in interface PromotableOrder

isHasOrderAdjustments

public boolean isHasOrderAdjustments()
Specified by:
isHasOrderAdjustments in interface PromotableOrder

isTotalitarianOfferApplied

public boolean isTotalitarianOfferApplied()
Specified by:
isTotalitarianOfferApplied in interface PromotableOrder

setTotalitarianOfferApplied

public void setTotalitarianOfferApplied(boolean totalitarianOfferApplied)
Specified by:
setTotalitarianOfferApplied in interface PromotableOrder

isNotCombinableOfferAppliedAtAnyLevel

public boolean isNotCombinableOfferAppliedAtAnyLevel()
Specified by:
isNotCombinableOfferAppliedAtAnyLevel in interface PromotableOrder

setNotCombinableOfferAppliedAtAnyLevel

public void setNotCombinableOfferAppliedAtAnyLevel(boolean notCombinableOfferAppliedAtAnyLevel)
Specified by:
setNotCombinableOfferAppliedAtAnyLevel in interface PromotableOrder

getSplitItems

public java.util.List<OrderItemSplitContainer> getSplitItems()
Specified by:
getSplitItems in interface PromotableOrder

setSplitItems

public void setSplitItems(java.util.List<OrderItemSplitContainer> splitItems)
Specified by:
setSplitItems in interface PromotableOrder

searchSplitItems

public java.util.List<PromotableOrderItem> searchSplitItems(PromotableOrderItem key)
Specified by:
searchSplitItems in interface PromotableOrder

removeAllCandidateOffers

public void removeAllCandidateOffers()
Specified by:
removeAllCandidateOffers in interface PromotableOrder

removeAllCandidateFulfillmentGroupOffers

public void removeAllCandidateFulfillmentGroupOffers()
Specified by:
removeAllCandidateFulfillmentGroupOffers in interface PromotableOrder

removeAllCandidateOrderOffers

public void removeAllCandidateOrderOffers()
Specified by:
removeAllCandidateOrderOffers in interface PromotableOrder

containsNotStackableFulfillmentGroupOffer

public boolean containsNotStackableFulfillmentGroupOffer()
Specified by:
containsNotStackableFulfillmentGroupOffer in interface PromotableOrder

containsNotStackableOrderOffer

public boolean containsNotStackableOrderOffer()
Specified by:
containsNotStackableOrderOffer in interface PromotableOrder

removeAllAddedOfferCodes

public void removeAllAddedOfferCodes()
Specified by:
removeAllAddedOfferCodes in interface PromotableOrder

addCandidateOrderOffer

public void addCandidateOrderOffer(PromotableCandidateOrderOffer candidateOrderOffer)
Specified by:
addCandidateOrderOffer in interface PromotableOrder

calculateOrderItemsCurrentPrice

public Money calculateOrderItemsCurrentPrice()
Specified by:
calculateOrderItemsCurrentPrice in interface PromotableOrder

calculateOrderItemsPriceWithoutAdjustments

public Money calculateOrderItemsPriceWithoutAdjustments()
Specified by:
calculateOrderItemsPriceWithoutAdjustments in interface PromotableOrder

getAllSplitItems

public java.util.List<PromotableOrderItem> getAllSplitItems()
Specified by:
getAllSplitItems in interface PromotableOrder

getSubTotal

public Money getSubTotal()
Specified by:
getSubTotal in interface PromotableOrder

getFulfillmentGroups

public java.util.List<PromotableFulfillmentGroup> getFulfillmentGroups()
Specified by:
getFulfillmentGroups in interface PromotableOrder

setTotalShipping

public void setTotalShipping(Money totalShipping)
Specified by:
setTotalShipping in interface PromotableOrder

calculateOrderItemsFinalPrice

public Money calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)
Specified by:
calculateOrderItemsFinalPrice in interface PromotableOrder

setSubTotal

public void setSubTotal(Money subTotal)
Specified by:
setSubTotal in interface PromotableOrder

assignOrderItemsFinalPrice

public void assignOrderItemsFinalPrice()
Specified by:
assignOrderItemsFinalPrice in interface PromotableOrder

getCustomer

public Customer getCustomer()
Specified by:
getCustomer in interface PromotableOrder

getDiscreteOrderItems

public java.util.List<PromotableOrderItem> getDiscreteOrderItems()
Specified by:
getDiscreteOrderItems in interface PromotableOrder

getDiscountableDiscreteOrderItems

public java.util.List<PromotableOrderItem> getDiscountableDiscreteOrderItems()
Specified by:
getDiscountableDiscreteOrderItems in interface PromotableOrder

getDiscountableDiscreteOrderItems

public java.util.List<PromotableOrderItem> getDiscountableDiscreteOrderItems(boolean applyDiscountToSalePrice)
Specified by:
getDiscountableDiscreteOrderItems in interface PromotableOrder

getDelegate

public Order getDelegate()
Specified by:
getDelegate in interface PromotableOrder


Copyright © 2012. All Rights Reserved.