|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.order.service.manipulation.DiscreteOrderItemDecorator
public class DiscreteOrderItemDecorator
| Constructor Summary | |
|---|---|
DiscreteOrderItemDecorator(DiscreteOrderItem discreteOrderItem,
int quantity)
|
|
| Method Summary | |
|---|---|
void |
accept(OrderItemVisitor visitor)
|
void |
addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
|
void |
assignFinalPrice()
|
OrderItem |
clone()
|
Map<String,String> |
getAdditionalAttributes()
|
Money |
getAdjustmentValue()
Summation of all of the adjustments associated with this OrderItem |
Money |
getBaseRetailPrice()
|
Money |
getBaseSalePrice()
|
BundleOrderItem |
getBundleOrderItem()
If this item is part of a bundle, this method will return the containing bundle item. |
List<CandidateItemOffer> |
getCandidateItemOffers()
|
Category |
getCategory()
|
Money |
getCurrentPrice()
|
List<DiscreteOrderItemFeePrice> |
getDiscreteOrderItemFeePrices()
|
GiftWrapOrderItem |
getGiftWrapOrderItem()
|
Long |
getId()
|
boolean |
getIsDiscounted()
Whethe or not this |
boolean |
getIsOnSale()
Default implementation uses OrderItem.getSalePrice() < OrderItem.getRetailPrice() |
String |
getName()
|
Order |
getOrder()
|
List<OrderItemAdjustment> |
getOrderItemAdjustments()
Returns a unmodifiable List of OrderItemAdjustment. |
Map<String,OrderItemAttribute> |
getOrderItemAttributes()
A list of arbitrary attributes added to this item. |
OrderItemType |
getOrderItemType()
|
PersonalMessage |
getPersonalMessage()
|
Money |
getPrice()
The final price associated with this OrderItem. |
Money |
getPriceBeforeAdjustments(boolean allowSalesPrice)
|
Product |
getProduct()
|
int |
getQuantity()
The quantity of this OrderItem. |
Money |
getRetailPrice()
The retail price of the item that was added to the Order at the time that this was added. |
Money |
getSalePrice()
|
Sku |
getSku()
|
SkuBundleItem |
getSkuBundleItem()
If this item is part of a bundle that was created via a ProductBundle, then this method returns a reference to the corresponding SkuBundleItem. |
Long |
getSplitParentItemId()
If the system automatically split an item to accommodate the promotion logic (e.g. |
Money |
getTaxablePrice()
|
boolean |
isInCategory(String categoryName)
|
Boolean |
isTaxable()
Returns whether or not this item is taxable. |
int |
removeAllAdjustments()
Removes all adjustment for this order item and reset the adjustment price. |
void |
removeAllCandidateItemOffers()
|
void |
setAdditionalAttributes(Map<String,String> additionalAttributes)
|
void |
setBaseRetailPrice(Money baseRetailPrice)
|
void |
setBaseSalePrice(Money baseSalePrice)
|
void |
setBundleOrderItem(BundleOrderItem bundleOrderItem)
Sets the parent bundle item. |
void |
setCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers)
|
void |
setCategory(Category category)
|
void |
setDiscreteOrderItemFeePrices(List<DiscreteOrderItemFeePrice> orderItemFeePrices)
|
void |
setGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem)
|
void |
setId(Long id)
|
void |
setName(String name)
|
void |
setOrder(Order order)
|
void |
setOrderItemAdjustments(List<OrderItemAdjustment> orderItemAdjustments)
|
void |
setOrderItemAttributes(Map<String,OrderItemAttribute> orderItemAttributes)
Sets the map of order item attributes. |
void |
setOrderItemType(OrderItemType orderItemType)
|
void |
setPersonalMessage(PersonalMessage personalMessage)
|
void |
setPrice(Money price)
Sets the price of this OrderItem while taking into account all taxes, fees, promotions and whether or not the
item is on sale. |
void |
setProduct(Product product)
|
void |
setQuantity(int quantity)
|
void |
setRetailPrice(Money retailPrice)
Sets the retail price of the item at the time that it is added to the Order |
void |
setSalePrice(Money salePrice)
|
void |
setSku(Sku sku)
|
void |
setSkuBundleItem(SkuBundleItem skuBundleItem)
Sets the associated skuBundleItem. |
void |
setSplitParentItemId(Long id)
|
void |
setTaxable(Boolean taxable)
Sets whether or not this item is taxable |
boolean |
updatePrices()
Post-condition should be that OrderItem.getPrice() should be the most up-to-date. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscreteOrderItemDecorator(DiscreteOrderItem discreteOrderItem,
int quantity)
| Method Detail |
|---|
public Sku getSku()
getSku in interface DiscreteOrderItemgetSku in interface SkuAccessorpublic void setSku(Sku sku)
setSku in interface DiscreteOrderItempublic Product getProduct()
getProduct in interface DiscreteOrderItempublic void setProduct(Product product)
setProduct in interface DiscreteOrderItempublic BundleOrderItem getBundleOrderItem()
DiscreteOrderItem
getBundleOrderItem in interface DiscreteOrderItempublic void setBundleOrderItem(BundleOrderItem bundleOrderItem)
DiscreteOrderItem
setBundleOrderItem in interface DiscreteOrderItempublic SkuBundleItem getSkuBundleItem()
getSkuBundleItem in interface DiscreteOrderItempublic void setSkuBundleItem(SkuBundleItem skuBundleItem)
setSkuBundleItem in interface DiscreteOrderItemskuBundleItem - public Money getTaxablePrice()
getTaxablePrice in interface DiscreteOrderItemgetTaxablePrice in interface OrderItempublic Map<String,String> getAdditionalAttributes()
getAdditionalAttributes in interface DiscreteOrderItempublic void setAdditionalAttributes(Map<String,String> additionalAttributes)
setAdditionalAttributes in interface DiscreteOrderItempublic Money getBaseRetailPrice()
getBaseRetailPrice in interface DiscreteOrderItempublic void setBaseRetailPrice(Money baseRetailPrice)
setBaseRetailPrice in interface DiscreteOrderItempublic Long getId()
getId in interface OrderItempublic void setId(Long id)
setId in interface OrderItempublic Money getBaseSalePrice()
getBaseSalePrice in interface DiscreteOrderItempublic Order getOrder()
getOrder in interface OrderItempublic void setBaseSalePrice(Money baseSalePrice)
setBaseSalePrice in interface DiscreteOrderItempublic void setOrder(Order order)
setOrder in interface OrderItempublic Money getRetailPrice()
OrderItemOrder at the time that this was added. This is preferable
to use as opposed to checking the price of the item that was added from the catalog domain (like in
DiscreteOrderItem, using DiscreteOrderItem.getSku()'s retail price) since the price in the catalog
domain could have changed since the item was added to the Order.
getRetailPrice in interface OrderItempublic List<DiscreteOrderItemFeePrice> getDiscreteOrderItemFeePrices()
getDiscreteOrderItemFeePrices in interface DiscreteOrderItempublic void setRetailPrice(Money retailPrice)
OrderItemOrder
setRetailPrice in interface OrderItempublic Money getSalePrice()
getSalePrice in interface OrderItempublic void setDiscreteOrderItemFeePrices(List<DiscreteOrderItemFeePrice> orderItemFeePrices)
setDiscreteOrderItemFeePrices in interface DiscreteOrderItempublic void setSalePrice(Money salePrice)
setSalePrice in interface OrderItempublic Money getAdjustmentValue()
OrderItemOrderItem
getAdjustmentValue in interface OrderItempublic Money getPrice()
OrderItemOrderItem. Note that this takes into account all of the taxes, fees and
promotions that are applied on this OrderItem. This will also use OrderItem.getSalePrice() as a base rather
than OrderItem.getRetailPrice() when OrderItem.getIsOnSale() is true.
getPrice in interface OrderItempublic void setPrice(Money price)
OrderItemOrderItem while taking into account all taxes, fees, promotions and whether or not the
item is on sale.
setPrice in interface OrderItempublic void assignFinalPrice()
assignFinalPrice in interface OrderItempublic Money getCurrentPrice()
getCurrentPrice in interface OrderItempublic int getQuantity()
OrderItemOrderItem.
getQuantity in interface OrderItempublic void setQuantity(int quantity)
setQuantity in interface OrderItempublic Category getCategory()
getCategory in interface OrderItempublic void setCategory(Category category)
setCategory in interface OrderItempublic List<CandidateItemOffer> getCandidateItemOffers()
getCandidateItemOffers in interface OrderItempublic void setCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers)
setCandidateItemOffers in interface OrderItempublic List<OrderItemAdjustment> getOrderItemAdjustments()
OrderItem
getOrderItemAdjustments in interface OrderItempublic PersonalMessage getPersonalMessage()
getPersonalMessage in interface OrderItempublic void setPersonalMessage(PersonalMessage personalMessage)
setPersonalMessage in interface OrderItempublic boolean isInCategory(String categoryName)
isInCategory in interface OrderItempublic GiftWrapOrderItem getGiftWrapOrderItem()
getGiftWrapOrderItem in interface OrderItempublic void setGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem)
setGiftWrapOrderItem in interface OrderItempublic OrderItemType getOrderItemType()
getOrderItemType in interface OrderItempublic void setOrderItemType(OrderItemType orderItemType)
setOrderItemType in interface OrderItempublic boolean getIsOnSale()
OrderItemOrderItem.getSalePrice() < OrderItem.getRetailPrice()
getIsOnSale in interface OrderItempublic boolean getIsDiscounted()
OrderItem
getIsDiscounted in interface OrderItempublic boolean updatePrices()
OrderItemOrderItem.getPrice() should be the most up-to-date.
updatePrices in interface OrderItempublic String getName()
getName in interface OrderItempublic void setName(String name)
setName in interface OrderItempublic Money getPriceBeforeAdjustments(boolean allowSalesPrice)
getPriceBeforeAdjustments in interface OrderItempublic OrderItem clone()
clone in interface OrderItemclone in class Objectpublic void setOrderItemAdjustments(List<OrderItemAdjustment> orderItemAdjustments)
setOrderItemAdjustments in interface OrderItempublic void addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
addCandidateItemOffer in interface OrderItempublic void removeAllCandidateItemOffers()
removeAllCandidateItemOffers in interface OrderItempublic int removeAllAdjustments()
OrderItem
removeAllAdjustments in interface OrderItem
public void accept(OrderItemVisitor visitor)
throws PricingException
accept in interface OrderItemPricingExceptionpublic Map<String,OrderItemAttribute> getOrderItemAttributes()
getOrderItemAttributes in interface OrderItempublic void setOrderItemAttributes(Map<String,OrderItemAttribute> orderItemAttributes)
setOrderItemAttributes in interface OrderItemorderItemAttributes - public Boolean isTaxable()
OrderItem
isTaxable in interface OrderItempublic void setTaxable(Boolean taxable)
OrderItem
setTaxable in interface OrderItempublic Long getSplitParentItemId()
getSplitParentItemId in interface OrderItempublic void setSplitParentItemId(Long id)
setSplitParentItemId in interface OrderItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||