|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.offer.service.discount.domain.PromotableOrderImpl
public class PromotableOrderImpl
| Field Summary | |
|---|---|
protected List<PromotableOrderItem> |
allOrderItems
|
protected List<PromotableOrderAdjustment> |
candidateOrderOfferAdjustments
|
protected boolean |
currentSortParam
|
protected List<PromotableOrderItem> |
discountableOrderItems
|
protected List<PromotableFulfillmentGroup> |
fulfillmentGroups
|
protected boolean |
includeOrderAndItemAdjustments
|
protected PromotableItemFactory |
itemFactory
|
protected Order |
order
|
| Constructor Summary | |
|---|---|
PromotableOrderImpl(Order order,
PromotableItemFactory itemFactory,
boolean includeOrderAndItemAdjustments)
|
|
| Method Summary | |
|---|---|
void |
addCandidateOrderAdjustment(PromotableOrderAdjustment orderAdjustment)
Adds the adjustment to the order's adjustment list and discounts the order's adjustment price by the value of the adjustment. |
protected void |
addPromotableOrderItem(OrderItem orderItem,
List<PromotableOrderItem> discountableOrderItems)
|
protected List<PromotableOrderItem> |
buildPromotableOrderItemsList()
|
Money |
calculateItemAdjustmentTotal()
Calculates the total adjustment to be received from the item adjustments. |
Money |
calculateOrderAdjustmentTotal()
Calculates the total adjustment to be received from the order adjustments. |
Money |
calculateSubtotalWithAdjustments()
Returns the price of the order with adjustments. |
Money |
calculateSubtotalWithoutAdjustments()
Returns the price of the order without adjustments. |
boolean |
canApplyOrderOffer(PromotableCandidateOrderOffer offer)
Returns true if this order can apply another order promotion. |
protected void |
createExistingOrderAdjustments()
Bring over the order adjustments. |
List<PromotableOrderItem> |
getAllOrderItems()
Returns all OrderItems for the order wrapped with PromotableOrderItem |
List<PromotableOrderItemPriceDetail> |
getAllPromotableOrderItemPriceDetails()
Returns all of the price detail items for this order. |
List<PromotableOrderAdjustment> |
getCandidateOrderAdjustments()
Returns the list of orderAdjustments being proposed for the order. |
List<PromotableOrderItem> |
getDiscountableOrderItems()
Returns all OrderItems that can receive discounts. |
List<PromotableOrderItem> |
getDiscountableOrderItems(boolean applyDiscountToSalePrice)
Returns all OrderItems that can receive discounts. |
List<PromotableFulfillmentGroup> |
getFulfillmentGroups()
Returns the fulfillmentGroups associated with the order after converting them to promotableFulfillmentGroups. |
Order |
getOrder()
Returns the associated order. |
BroadleafCurrency |
getOrderCurrency()
Returns the BroadleafCurrency for the current order. |
boolean |
isHasOrderAdjustments()
Returns true if this promotableOrder has any order adjustments. |
boolean |
isIncludeOrderAndItemAdjustments()
Returns true if this order was created in a way that existing order and item adjustments were copied over to this item. |
protected boolean |
isNotCombinableOrderOfferApplied()
|
boolean |
isTotalitarianOfferApplied()
Returns true if a totalitarian offer has been applied. |
void |
removeAllCandidateFulfillmentOfferAdjustments()
Removes all adjustments from the order's fulfillment items and resets the adjustment price for each item. |
void |
removeAllCandidateItemOfferAdjustments()
Removes all adjustments from the order's order items and resets the adjustment price for each item. |
void |
removeAllCandidateOfferAdjustments()
Removes all order, order item, and fulfillment adjustments from the order and resets the adjustment price. |
void |
removeAllCandidateOrderOfferAdjustments()
Removes all order adjustments from the order and resets the adjustment price. |
void |
setOrderSubTotalToPriceWithAdjustments()
Sets the order subTotal to the sum of item total prices without adjustments. |
void |
setOrderSubTotalToPriceWithoutAdjustments()
Sets the order subTotal to the sum of item total prices without adjustments. |
void |
setTotalFufillmentCharges(Money totalFulfillmentCharges)
Sets the total fulfillmentCharges the order. |
void |
updateRuleVariables(Map<String,Object> ruleVars)
Adds the underlying order to the rule variable map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PromotableItemFactory itemFactory
protected Order order
protected List<PromotableOrderItem> allOrderItems
protected List<PromotableOrderItem> discountableOrderItems
protected boolean currentSortParam
protected List<PromotableFulfillmentGroup> fulfillmentGroups
protected List<PromotableOrderAdjustment> candidateOrderOfferAdjustments
protected boolean includeOrderAndItemAdjustments
| Constructor Detail |
|---|
public PromotableOrderImpl(Order order,
PromotableItemFactory itemFactory,
boolean includeOrderAndItemAdjustments)
| Method Detail |
|---|
protected void createExistingOrderAdjustments()
public void setOrderSubTotalToPriceWithoutAdjustments()
PromotableOrder
setOrderSubTotalToPriceWithoutAdjustments in interface PromotableOrderpublic void setOrderSubTotalToPriceWithAdjustments()
PromotableOrder
setOrderSubTotalToPriceWithAdjustments in interface PromotableOrderpublic List<PromotableOrderItem> getAllOrderItems()
PromotableOrder
getAllOrderItems in interface PromotableOrderpublic List<PromotableOrderItem> getDiscountableOrderItems()
PromotableOrder
getDiscountableOrderItems in interface PromotableOrderpublic List<PromotableOrderItem> getDiscountableOrderItems(boolean applyDiscountToSalePrice)
PromotableOrder
getDiscountableOrderItems in interface PromotableOrderprotected List<PromotableOrderItem> buildPromotableOrderItemsList()
protected void addPromotableOrderItem(OrderItem orderItem,
List<PromotableOrderItem> discountableOrderItems)
public List<PromotableFulfillmentGroup> getFulfillmentGroups()
PromotableOrder
getFulfillmentGroups in interface PromotableOrderpublic boolean isHasOrderAdjustments()
PromotableOrder
isHasOrderAdjustments in interface PromotableOrderpublic List<PromotableOrderAdjustment> getCandidateOrderAdjustments()
PromotableOrder
getCandidateOrderAdjustments in interface PromotableOrderpublic void addCandidateOrderAdjustment(PromotableOrderAdjustment orderAdjustment)
PromotableOrder
addCandidateOrderAdjustment in interface PromotableOrderpublic void removeAllCandidateOfferAdjustments()
PromotableOrder
removeAllCandidateOfferAdjustments in interface PromotableOrderpublic void removeAllCandidateOrderOfferAdjustments()
PromotableOrder
removeAllCandidateOrderOfferAdjustments in interface PromotableOrderpublic void removeAllCandidateItemOfferAdjustments()
PromotableOrder
removeAllCandidateItemOfferAdjustments in interface PromotableOrderpublic void removeAllCandidateFulfillmentOfferAdjustments()
PromotableOrder
removeAllCandidateFulfillmentOfferAdjustments in interface PromotableOrderpublic void updateRuleVariables(Map<String,Object> ruleVars)
PromotableOrder
updateRuleVariables in interface PromotableOrderpublic Order getOrder()
PromotableOrder
getOrder in interface PromotableOrderpublic boolean isTotalitarianOfferApplied()
PromotableOrder
isTotalitarianOfferApplied in interface PromotableOrderpublic Money calculateOrderAdjustmentTotal()
PromotableOrder
calculateOrderAdjustmentTotal in interface PromotableOrderpublic Money calculateItemAdjustmentTotal()
PromotableOrder
calculateItemAdjustmentTotal in interface PromotableOrderpublic List<PromotableOrderItemPriceDetail> getAllPromotableOrderItemPriceDetails()
PromotableOrder
getAllPromotableOrderItemPriceDetails in interface PromotableOrderpublic BroadleafCurrency getOrderCurrency()
PromotableOrderBroadleafCurrency for the current order.
getOrderCurrency in interface PromotableOrderpublic void setTotalFufillmentCharges(Money totalFulfillmentCharges)
PromotableOrder
setTotalFufillmentCharges in interface PromotableOrderprotected boolean isNotCombinableOrderOfferApplied()
public boolean canApplyOrderOffer(PromotableCandidateOrderOffer offer)
PromotableOrder
canApplyOrderOffer in interface PromotableOrderpublic Money calculateSubtotalWithoutAdjustments()
PromotableOrder
calculateSubtotalWithoutAdjustments in interface PromotableOrderpublic Money calculateSubtotalWithAdjustments()
PromotableOrder
calculateSubtotalWithAdjustments in interface PromotableOrderpublic boolean isIncludeOrderAndItemAdjustments()
PromotableOrder
isIncludeOrderAndItemAdjustments in interface PromotableOrder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||