org.broadleafcommerce.core.offer.service.discount.domain
Interface PromotableOrderItem

All Known Implementing Classes:
PromotableOrderItemImpl

public interface PromotableOrderItem


Method Summary
 void addCandidateItemOffer(PromotableCandidateItemOffer candidateItemOffer)
           
 void addOrderItemAdjustment(PromotableOrderItemAdjustment orderItemAdjustment)
          Adds the adjustment to the order item's adjustment list and discounts the order item's adjustment price by the value of the adjustment.
 void addPromotionDiscount(PromotableCandidateItemOffer candidatePromotion, Set<OfferItemCriteria> itemCriteria, int quantity)
           
 void addPromotionQualifier(PromotableCandidateItemOffer candidatePromotion, OfferItemCriteria itemCriteria, int quantity)
           
 void assignFinalPrice()
           
 void clearAllDiscount()
           
 void clearAllNonFinalizedDiscounts()
           
 void clearAllNonFinalizedQualifiers()
           
 void clearAllNonFinalizedQuantities()
           
 void clearAllQualifiers()
           
 PromotableOrderItem clone()
           
 void computeAdjustmentPrice()
           
 void finalizeQuantities()
           
 int fixAdjustments(boolean useSaleAdjustments)
          Removes all zero based adjustments and sets the adjusted price on the delegate.
 Money getCurrentPrice()
           
 DiscreteOrderItem getDelegate()
           
 Money getPriceBeforeAdjustments(boolean allowSalesPrice)
           
 int getPromotionDiscountMismatchQuantity()
           
 List<PromotionDiscount> getPromotionDiscounts()
           
 List<PromotionQualifier> getPromotionQualifiers()
           
 int getQuantity()
           
 int getQuantityAvailableToBeUsedAsQualifier(Offer promotion)
           
 int getQuantityAvailableToBeUsedAsTarget(Offer promotion)
           
 Money getRetailAdjustmentPrice()
          The price after discounts if all applicable discounts are applied to the retail price.
 Money getRetailPrice()
           
 Money getSaleAdjustmentPrice()
          The price after discounts if all applicable discounts are applied to the sale price.
 Money getSalePrice()
           
 Sku getSku()
           
 Long getSplitParentItemId()
          If the system automatically split an item to accommodate the promotion logic (e.g.
 boolean isHasOrderItemAdjustments()
           
 boolean isNotCombinableOfferApplied()
           
 PromotionDiscount lookupOrCreatePromotionDiscount(PromotableCandidateItemOffer candidatePromotion)
           
 PromotionQualifier lookupOrCreatePromotionQualifier(PromotableCandidateItemOffer candidatePromotion)
           
 int removeAllAdjustments()
           
 void reset()
           
 void resetAdjustmentPrice()
           
 void setDelegate(DiscreteOrderItem discreteOrderItem)
           
 void setPromotionDiscounts(List<PromotionDiscount> promotionDiscounts)
           
 void setPromotionQualifiers(List<PromotionQualifier> promotionQualifiers)
           
 void setQuantity(int quantity)
           
 void setRetailAdjustmentPrice(Money adjustmentPrice)
           
 void setSaleAdjustmentPrice(Money adjustmentPrice)
           
 void setSplitParentItemId(Long id)
           
 List<PromotableOrderItem> split()
           
 

Method Detail

addOrderItemAdjustment

void addOrderItemAdjustment(PromotableOrderItemAdjustment orderItemAdjustment)
Adds the adjustment to the order item's adjustment list and discounts the order item's adjustment price by the value of the adjustment.

Parameters:
orderItemAdjustment -

getRetailAdjustmentPrice

Money getRetailAdjustmentPrice()
The price after discounts if all applicable discounts are applied to the retail price.

Returns:

setRetailAdjustmentPrice

void setRetailAdjustmentPrice(Money adjustmentPrice)

getSaleAdjustmentPrice

Money getSaleAdjustmentPrice()
The price after discounts if all applicable discounts are applied to the sale price.


setSaleAdjustmentPrice

void setSaleAdjustmentPrice(Money adjustmentPrice)

isNotCombinableOfferApplied

boolean isNotCombinableOfferApplied()

isHasOrderItemAdjustments

boolean isHasOrderItemAdjustments()

getPromotionDiscounts

List<PromotionDiscount> getPromotionDiscounts()

setPromotionDiscounts

void setPromotionDiscounts(List<PromotionDiscount> promotionDiscounts)

getPromotionQualifiers

List<PromotionQualifier> getPromotionQualifiers()

setPromotionQualifiers

void setPromotionQualifiers(List<PromotionQualifier> promotionQualifiers)

getQuantityAvailableToBeUsedAsQualifier

int getQuantityAvailableToBeUsedAsQualifier(Offer promotion)

getQuantityAvailableToBeUsedAsTarget

int getQuantityAvailableToBeUsedAsTarget(Offer promotion)

addPromotionQualifier

void addPromotionQualifier(PromotableCandidateItemOffer candidatePromotion,
                           OfferItemCriteria itemCriteria,
                           int quantity)

addPromotionDiscount

void addPromotionDiscount(PromotableCandidateItemOffer candidatePromotion,
                          Set<OfferItemCriteria> itemCriteria,
                          int quantity)

clearAllNonFinalizedQuantities

void clearAllNonFinalizedQuantities()

clearAllDiscount

void clearAllDiscount()

clearAllQualifiers

void clearAllQualifiers()

finalizeQuantities

void finalizeQuantities()

split

List<PromotableOrderItem> split()

getDelegate

DiscreteOrderItem getDelegate()

setDelegate

void setDelegate(DiscreteOrderItem discreteOrderItem)

reset

void reset()

lookupOrCreatePromotionQualifier

PromotionQualifier lookupOrCreatePromotionQualifier(PromotableCandidateItemOffer candidatePromotion)

lookupOrCreatePromotionDiscount

PromotionDiscount lookupOrCreatePromotionDiscount(PromotableCandidateItemOffer candidatePromotion)

clearAllNonFinalizedDiscounts

void clearAllNonFinalizedDiscounts()

clearAllNonFinalizedQualifiers

void clearAllNonFinalizedQualifiers()

getPromotionDiscountMismatchQuantity

int getPromotionDiscountMismatchQuantity()

computeAdjustmentPrice

void computeAdjustmentPrice()

removeAllAdjustments

int removeAllAdjustments()

assignFinalPrice

void assignFinalPrice()

getCurrentPrice

Money getCurrentPrice()

getQuantity

int getQuantity()

setQuantity

void setQuantity(int quantity)

getSku

Sku getSku()

getPriceBeforeAdjustments

Money getPriceBeforeAdjustments(boolean allowSalesPrice)

getSalePrice

Money getSalePrice()

getRetailPrice

Money getRetailPrice()

addCandidateItemOffer

void addCandidateItemOffer(PromotableCandidateItemOffer candidateItemOffer)

clone

PromotableOrderItem clone()

fixAdjustments

int fixAdjustments(boolean useSaleAdjustments)
Removes all zero based adjustments and sets the adjusted price on the delegate.

Parameters:
useSaleAdjustments -
Returns:

resetAdjustmentPrice

void resetAdjustmentPrice()

getSplitParentItemId

Long getSplitParentItemId()
If the system automatically split an item to accommodate the promotion logic (e.g. buy one get one free), then this value is set to the originalItemId. Returns null otherwise.

Returns:

setSplitParentItemId

void setSplitParentItemId(Long id)


Copyright © 2012. All Rights Reserved.