|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OrderItem
| Method Summary | |
|---|---|
void |
accept(OrderItemVisitor visitor)
|
void |
addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
|
void |
assignFinalPrice()
|
OrderItem |
clone()
|
Money |
getAdjustmentValue()
Summation of all of the adjustments associated with this OrderItem |
List<CandidateItemOffer> |
getCandidateItemOffers()
|
Category |
getCategory()
|
Money |
getCurrentPrice()
|
GiftWrapOrderItem |
getGiftWrapOrderItem()
|
Long |
getId()
|
boolean |
getIsDiscounted()
Whethe or not this |
boolean |
getIsOnSale()
Default implementation uses getSalePrice() < 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)
|
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()
|
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 |
setCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers)
|
void |
setCategory(Category category)
|
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 |
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 |
setSplitParentItemId(Long id)
|
void |
setTaxable(Boolean taxable)
Sets whether or not this item is taxable |
boolean |
updatePrices()
Post-condition should be that getPrice() should be the most up-to-date. |
| Method Detail |
|---|
Long getId()
void setId(Long id)
Order getOrder()
void setOrder(Order order)
Money getRetailPrice()
Order 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.
void setRetailPrice(Money retailPrice)
Order
retailPrice - Money getSalePrice()
void setSalePrice(Money salePrice)
Money getAdjustmentValue()
OrderItem
Money getPrice()
OrderItem. Note that this takes into account all of the taxes, fees and
promotions that are applied on this OrderItem. This will also use getSalePrice() as a base rather
than getRetailPrice() when getIsOnSale() is true.
void setPrice(Money price)
OrderItem while taking into account all taxes, fees, promotions and whether or not the
item is on sale.
price - int getQuantity()
OrderItem.
void setQuantity(int quantity)
Category getCategory()
void setCategory(Category category)
List<CandidateItemOffer> getCandidateItemOffers()
void setCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers)
List<OrderItemAdjustment> getOrderItemAdjustments()
void setOrderItemAdjustments(List<OrderItemAdjustment> orderItemAdjustments)
PersonalMessage getPersonalMessage()
void setPersonalMessage(PersonalMessage personalMessage)
boolean isInCategory(String categoryName)
GiftWrapOrderItem getGiftWrapOrderItem()
void setGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem)
OrderItemType getOrderItemType()
void setOrderItemType(OrderItemType orderItemType)
Money getTaxablePrice()
boolean getIsOnSale()
getSalePrice() < getRetailPrice()
boolean getIsDiscounted()
boolean updatePrices()
getPrice() should be the most up-to-date.
String getName()
void setName(String name)
OrderItem clone()
void assignFinalPrice()
Money getCurrentPrice()
Money getPriceBeforeAdjustments(boolean allowSalesPrice)
void addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
void removeAllCandidateItemOffers()
int removeAllAdjustments()
void accept(OrderItemVisitor visitor)
throws PricingException
PricingExceptionMap<String,OrderItemAttribute> getOrderItemAttributes()
void setOrderItemAttributes(Map<String,OrderItemAttribute> orderItemAttributes)
orderItemAttributes - Boolean isTaxable()
void setTaxable(Boolean taxable)
taxable - Long getSplitParentItemId()
void setSplitParentItemId(Long id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||