public interface PromotableOrderItemPriceDetail
| Modifier and Type | Method and Description |
|---|---|
void |
addCandidateItemPriceDetailAdjustment(PromotableOrderItemPriceDetailAdjustment itemAdjustment)
Adds the adjustment to the item's adjustment list and discounts the
item's prices by the value of the adjustment.
|
void |
addPromotionDiscount(PromotableCandidateItemOffer itemOffer,
OfferItemCriteria itemCriteria,
int qtyToMarkAsTarget)
Adds a promotionDiscount entry to this itemDetail.
|
void |
addPromotionQualifier(PromotableCandidateItemOffer itemOffer,
OfferItemCriteria itemCriteria,
int qtyToMarkAsQualifier)
Adds a promotionQualifier entry to this itemDetail.
|
String |
buildDetailKey()
Creates a key that represents a unique priceDetail
|
Money |
calculateItemUnitPriceWithAdjustments(boolean allowSalePrice)
Returns the price to be used for this priceDetail taking into account whether or not the
sales price can be used.
|
Money |
calculateTotalAdjustmentValue()
Returns the total adjustment value as the sum of the adjustments times the
quantity represented by this PriceDetail
|
void |
chooseSaleOrRetailAdjustments()
This method will check to see if the salePriceAdjustments or retailPriceAdjustments are better
and remove those that should not apply.
|
void |
clearAllNonFinalizedQuantities()
Clears target and qualifier quantities that were marked for a promotion that did not have
enough qualifiers or targets to get applied.
|
void |
finalizeQuantities()
Updates the target and qualifier quantities to indicate the number that are being used.
|
List<PromotableOrderItemPriceDetailAdjustment> |
getCandidateItemAdjustments() |
Money |
getFinalizedTotalWithAdjustments()
Returns the final total for this item taking into account the finalized
adjustments.
|
PromotableOrderItem |
getPromotableOrderItem()
Return the parent promotableOrderItem
|
List<PromotionDiscount> |
getPromotionDiscounts()
Returns the promotion discounts applied to this detail object.
|
List<PromotionQualifier> |
getPromotionQualifiers()
Returns the times this item is being used as a promotionQualifier
|
int |
getQuantity()
Returns the quantity associated with this priceDetail.
|
int |
getQuantityAvailableToBeUsedAsQualifier(PromotableCandidateItemOffer itemOffer)
Returns the quantity of this item that can be used as a qualifier for the passed in itemOffer
|
int |
getQuantityAvailableToBeUsedAsTarget(PromotableCandidateItemOffer itemOffer)
Returns the quantity of this item that can be used as a target for the passed in itemOffer
|
boolean |
hasNonCombinableAdjustments()
Returns true if this detail has nonCombinable adjustments.
|
boolean |
isAdjustmentsFinalized() |
boolean |
isNonCombinableOfferApplied()
Returns true if a non-combinable offer has been applied to this item.
|
boolean |
isTotalitarianOfferApplied()
Returns true if a notCombinableOffer or totalitarian offer was applied to this priceDetail.
|
void |
removeAllAdjustments()
Removes all adjustments from this detail.
|
void |
setAdjustmentsFinalized(boolean adjustmentsFinalized) |
void |
setQuantity(int quantity)
Sets the quantity for this price detail.
|
PromotableOrderItemPriceDetail |
splitIfNecessary()
Checks to see that the discount quantities match the target quantities.
|
boolean |
useSaleAdjustments()
Returns true if the sale adjustments should be used.
|
void addCandidateItemPriceDetailAdjustment(PromotableOrderItemPriceDetailAdjustment itemAdjustment)
itemAdjustment - List<PromotableOrderItemPriceDetailAdjustment> getCandidateItemAdjustments()
boolean hasNonCombinableAdjustments()
boolean isTotalitarianOfferApplied()
boolean isNonCombinableOfferApplied()
void chooseSaleOrRetailAdjustments()
void removeAllAdjustments()
List<PromotionDiscount> getPromotionDiscounts()
List<PromotionQualifier> getPromotionQualifiers()
int getQuantity()
void setQuantity(int quantity)
quantity - PromotableOrderItem getPromotableOrderItem()
int getQuantityAvailableToBeUsedAsQualifier(PromotableCandidateItemOffer itemOffer)
itemOffer - int getQuantityAvailableToBeUsedAsTarget(PromotableCandidateItemOffer itemOffer)
itemOffer - void addPromotionQualifier(PromotableCandidateItemOffer itemOffer, OfferItemCriteria itemCriteria, int qtyToMarkAsQualifier)
itemOffer - itemCriteria - qtyToMarkAsQualifier - void addPromotionDiscount(PromotableCandidateItemOffer itemOffer, OfferItemCriteria itemCriteria, int qtyToMarkAsTarget)
itemOffer - itemCriteria - qtyToMarkAsTarget - Money calculateItemUnitPriceWithAdjustments(boolean allowSalePrice)
allowSalePrice - void finalizeQuantities()
void clearAllNonFinalizedQuantities()
String buildDetailKey()
Money getFinalizedTotalWithAdjustments()
chooseSaleOrRetailAdjustments().Money calculateTotalAdjustmentValue()
PromotableOrderItemPriceDetail splitIfNecessary()
boolean useSaleAdjustments()
boolean isAdjustmentsFinalized()
void setAdjustmentsFinalized(boolean adjustmentsFinalized)
Copyright © 2014. All Rights Reserved.