public interface PromotableOrderItem extends Serializable
| Modifier and Type | Method and Description |
|---|---|
Money |
calculateTotalAdjustmentValue()
Returns the value of all adjustments.
|
Money |
calculateTotalWithAdjustments()
Returns the final total for this item taking into account the finalized
adjustments.
|
Money |
calculateTotalWithoutAdjustments()
Returns the total for this item if not adjustments applied.
|
PromotableOrderItemPriceDetail |
createNewDetail(int quantity)
Creates a new detail with the associated quantity.
|
BroadleafCurrency |
getCurrency()
Returns the currency of the related order.
|
Money |
getCurrentBasePrice()
Returns the basePrice of the item (baseSalePrice or baseRetailPrice)
|
Map<String,Object> |
getExtraDataMap()
Map available to implementations to store data needed for custom logic.
|
OrderItem |
getOrderItem()
Returns the underlying orderItem.
|
OrderItemContainer |
getOrderItemContainer()
Returns an OrderItemContainer for this OrderItem or null if this item is not
an instance of OrderItemContainer.
|
Long |
getOrderItemId()
Returns the id of the contained OrderItem
|
Money |
getPriceBeforeAdjustments(boolean applyToSalePrice)
Return the salePriceBeforeAdjustments if the passed in param is true.
|
List<PromotableOrderItemPriceDetail> |
getPromotableOrderItemPriceDetails()
Returns the list of priceDetails associated with this item.
|
int |
getQuantity()
Returns the quantity for this orderItem
|
Money |
getRetailPriceBeforeAdjustments()
Returns the retailPrice without adjustments
|
Money |
getSalePriceBeforeAdjustments()
Returns the salePrice without adjustments
|
boolean |
isDiscountingAllowed()
Returns true if this item can receive item level discounts.
|
boolean |
isOnSale()
Returns true if the item has a sale price that is lower than the retail price.
|
boolean |
isOrderItemContainer()
Returns true if this PromotableOrderItem contains other items
|
void |
mergeLikeDetails()
Merges any priceDetails that share the same adjustments.
|
void |
removeAllItemAdjustments()
Effectively deletes all priceDetails associated with this item and r
|
void |
resetPriceDetails()
Called by pricing engine to reset the state of this item.
|
void |
updateRuleVariables(Map<String,Object> ruleVars)
Adds the item to the rule variables map.
|
void updateRuleVariables(Map<String,Object> ruleVars)
ruleVars - void resetPriceDetails()
boolean isDiscountingAllowed()
boolean isOrderItemContainer()
OrderItemContainer getOrderItemContainer()
Money getSalePriceBeforeAdjustments()
Money getRetailPriceBeforeAdjustments()
boolean isOnSale()
List<PromotableOrderItemPriceDetail> getPromotableOrderItemPriceDetails()
Money getPriceBeforeAdjustments(boolean applyToSalePrice)
Money getCurrentBasePrice()
int getQuantity()
BroadleafCurrency getCurrency()
void removeAllItemAdjustments()
void mergeLikeDetails()
Long getOrderItemId()
Money calculateTotalAdjustmentValue()
Money calculateTotalWithAdjustments()
Money calculateTotalWithoutAdjustments()
PromotableOrderItemPriceDetail createNewDetail(int quantity)
quantity - OrderItem getOrderItem()
Copyright © 2014. All Rights Reserved.