Interface PromotableOrder
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PromotableOrderImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCandidateOrderAdjustment(PromotableOrderAdjustment orderAdjustment) Adds the adjustment to the order's adjustment list and discounts the order's adjustment price by the value of the adjustment.Calculates the total adjustment to be received from the item adjustments.Calculates the total adjustment to be received from the order adjustments.Returns the price of the order with adjustments.Returns the price of the order without adjustments.booleanReturns true if this order can apply another order promotion.Returns all OrderItems for the order wrapped with PromotableOrderItemReturns all of the price detail items for this order.Returns the list of orderAdjustments being proposed for the order.Returns all OrderItems that can receive discounts.getDiscountableOrderItems(boolean sortBySalePrice) Returns all OrderItems that can receive discounts.Map available to implementations to store data needed for custom logic.Returns the fulfillmentGroups associated with the order after converting them to promotableFulfillmentGroups.getOrder()Returns the associated order.Returns theBroadleafCurrencyfor the current order.booleanReturns true if this promotableOrder has any order adjustments.booleanReturns true if this order was created in a way that existing order and item adjustments were copied over to this item.booleanbooleanbooleanReturns true if a totalitarian offer has been applied.booleanvoidRemoves all adjustments from the order's fulfillment items and resets the adjustment price for each item.voidRemoves all adjustments from the order's order items and resets the adjustment price for each item.voidRemoves all order, order item, and fulfillment adjustments from the order and resets the adjustment price.voidRemoves all order adjustments from the order and resets the adjustment price.voidSets the order subTotal to the sum of item total prices without adjustments.voidSets the order subTotal to the sum of item total prices without adjustments.voidsetTotalFufillmentCharges(Money totalFulfillmentCharges) Sets the total fulfillmentCharges the order.voidupdateRuleVariables(Map<String, Object> ruleVars) Adds the underlying order to the rule variable map.
-
Method Details
-
setOrderSubTotalToPriceWithoutAdjustments
void setOrderSubTotalToPriceWithoutAdjustments()Sets the order subTotal to the sum of item total prices without adjustments. -
setOrderSubTotalToPriceWithAdjustments
void setOrderSubTotalToPriceWithAdjustments()Sets the order subTotal to the sum of item total prices without adjustments. -
getAllOrderItems
List<PromotableOrderItem> getAllOrderItems()Returns all OrderItems for the order wrapped with PromotableOrderItem- Returns:
-
getDiscountableOrderItems
Returns all OrderItems that can receive discounts. Sorts the results by SalePrice or RetailPrice depending upon the passed in variable.- Parameters:
sortBySalePrice-- Returns:
-
getDiscountableOrderItems
List<PromotableOrderItem> getDiscountableOrderItems()Returns all OrderItems that can receive discounts.- Returns:
-
getFulfillmentGroups
List<PromotableFulfillmentGroup> getFulfillmentGroups()Returns the fulfillmentGroups associated with the order after converting them to promotableFulfillmentGroups.- Returns:
-
isHasOrderAdjustments
boolean isHasOrderAdjustments()Returns true if this promotableOrder has any order adjustments.- Returns:
-
getCandidateOrderAdjustments
List<PromotableOrderAdjustment> getCandidateOrderAdjustments()Returns the list of orderAdjustments being proposed for the order. This will be converted to actual order adjustments on completion of the offer processing.- Returns:
-
addCandidateOrderAdjustment
Adds the adjustment to the order's adjustment list and discounts the order's adjustment price by the value of the adjustment.- Parameters:
orderAdjustment-
-
removeAllCandidateOfferAdjustments
void removeAllCandidateOfferAdjustments()Removes all order, order item, and fulfillment adjustments from the order and resets the adjustment price. -
removeAllCandidateOrderOfferAdjustments
void removeAllCandidateOrderOfferAdjustments()Removes all order adjustments from the order and resets the adjustment price. -
removeAllCandidateItemOfferAdjustments
void removeAllCandidateItemOfferAdjustments()Removes all adjustments from the order's order items and resets the adjustment price for each item. -
removeAllCandidateFulfillmentOfferAdjustments
void removeAllCandidateFulfillmentOfferAdjustments()Removes all adjustments from the order's fulfillment items and resets the adjustment price for each item. -
updateRuleVariables
Adds the underlying order to the rule variable map. -
getOrder
Order getOrder()Returns the associated order. -
isTotalitarianOfferApplied
boolean isTotalitarianOfferApplied()Returns true if a totalitarian offer has been applied. A totalitarian offer is an offer that does not allow any other offers to be used at the same time. As opposed to a "non-combinable" offer which can't be used with other offers of the same type but can be used with other offers of a different type (e.g. a non-combinable order offer can be used with a non-combinable item offer).- Returns:
-
calculateOrderAdjustmentTotal
Money calculateOrderAdjustmentTotal()Calculates the total adjustment to be received from the order adjustments.- Returns:
-
calculateItemAdjustmentTotal
Money calculateItemAdjustmentTotal()Calculates the total adjustment to be received from the item adjustments.- Returns:
-
getAllPromotableOrderItemPriceDetails
List<PromotableOrderItemPriceDetail> getAllPromotableOrderItemPriceDetails()Returns all of the price detail items for this order.- Returns:
-
canApplyOrderOffer
Returns true if this order can apply another order promotion. Returns false if a totalitarian or not-combinable offer has already been applied Returns false if the passed in order is not-combinable or totalitarian and this order already has adjustments -
getOrderCurrency
BroadleafCurrency getOrderCurrency()Returns theBroadleafCurrencyfor the current order.- Returns:
-
setTotalFufillmentCharges
Sets the total fulfillmentCharges the order.- Parameters:
totalFulfillmentCharges-
-
calculateSubtotalWithoutAdjustments
Money calculateSubtotalWithoutAdjustments()Returns the price of the order without adjustments.- Returns:
-
calculateSubtotalWithAdjustments
Money calculateSubtotalWithAdjustments()Returns the price of the order with adjustments.- Returns:
-
isIncludeOrderAndItemAdjustments
boolean isIncludeOrderAndItemAdjustments()Returns true if this order was created in a way that existing order and item adjustments were copied over to this item.- Returns:
-
isTotalitarianOrderOfferApplied
boolean isTotalitarianOrderOfferApplied() -
isTotalitarianItemOfferApplied
boolean isTotalitarianItemOfferApplied() -
isTotalitarianFgOfferApplied
boolean isTotalitarianFgOfferApplied() -
getExtraDataMap
Map available to implementations to store data needed for custom logic.
-