Method Summary
All Methods Instance Methods Abstract Methods
Returns the value of all adjustments.
Returns the final total for this item taking into account the finalized
adjustments.
Returns the total for this item if not adjustments applied.
Creates a new detail with the associated quantity.
Returns the currency of the related order.
Returns the basePrice of the item (baseSalePrice or baseRetailPrice)
Map available to implementations to store data needed for custom logic.
Returns the underlying orderItem.
Returns an OrderItemContainer for this OrderItem or null if this item is not
an instance of OrderItemContainer.
Returns the id of the contained OrderItem
Return the salePriceBeforeAdjustments if the passed in param is true.
Returns the list of priceDetails associated with this item.
int
Returns the quantity for this orderItem
Returns the retailPrice without adjustments
Returns the salePrice without adjustments
boolean
Returns true if this item can receive item level discounts.
boolean
Returns true if the item has a sale price that is lower than the retail price.
boolean
Returns true if this PromotableOrderItem contains other items
void
Merges any priceDetails that share the same adjustments.
void
Effectively deletes all priceDetails associated with this item and r
void
Called by pricing engine to reset the state of this item.
void
Adds the item to the rule variables map.
Method Details
updateRuleVariables
Adds the item to the rule variables map.
Parameters:
ruleVars -
resetPriceDetails
void resetPriceDetails ()
Called by pricing engine to reset the state of this item.
isDiscountingAllowed
boolean isDiscountingAllowed ()
Returns true if this item can receive item level discounts.
Returns:
isOrderItemContainer
boolean isOrderItemContainer ()
Returns true if this PromotableOrderItem contains other items
getOrderItemContainer
Returns an OrderItemContainer for this OrderItem or null if this item is not
an instance of OrderItemContainer.
getSalePriceBeforeAdjustments
Money getSalePriceBeforeAdjustments ()
Returns the salePrice without adjustments
getRetailPriceBeforeAdjustments
Money getRetailPriceBeforeAdjustments ()
Returns the retailPrice without adjustments
isOnSale
boolean isOnSale ()
Returns true if the item has a sale price that is lower than the retail price.
getPriceBeforeAdjustments
Money getPriceBeforeAdjustments (boolean applyToSalePrice)
Return the salePriceBeforeAdjustments if the passed in param is true.
Otherwise return the retailPriceBeforeAdjustments.
Returns:
getCurrentBasePrice
Money getCurrentBasePrice ()
Returns the basePrice of the item (baseSalePrice or baseRetailPrice)
Returns:
getQuantity
int getQuantity ()
Returns the quantity for this orderItem
Returns:
getCurrency
Returns the currency of the related order.
Returns:
removeAllItemAdjustments
void removeAllItemAdjustments ()
Effectively deletes all priceDetails associated with this item and r
mergeLikeDetails
void mergeLikeDetails ()
Merges any priceDetails that share the same adjustments.
getOrderItemId
Returns the id of the contained OrderItem
calculateTotalAdjustmentValue
Money calculateTotalAdjustmentValue ()
Returns the value of all adjustments.
calculateTotalWithAdjustments
Money calculateTotalWithAdjustments ()
Returns the final total for this item taking into account the finalized
adjustments. Intended to be called after the adjustments have been
finalized.
calculateTotalWithoutAdjustments
Money calculateTotalWithoutAdjustments ()
Returns the total for this item if not adjustments applied.
createNewDetail
Creates a new detail with the associated quantity. Intended for use as part of the PriceDetail split.
Parameters:
quantity -
Returns:
getOrderItem
Returns the underlying orderItem. Manipulation of the underlying orderItem is not recommended.
This method is intended for unit test and read only access although that is not strictly enforced.
Returns: