org.broadleafcommerce.core.order.domain
Interface OrderItem

All Superinterfaces:
Serializable
All Known Subinterfaces:
BundleOrderItem, DiscreteOrderItem, DynamicPriceDiscreteOrderItem, GiftWrapOrderItem
All Known Implementing Classes:
BundleOrderItemImpl, DiscreteOrderItemDecorator, DiscreteOrderItemImpl, DynamicPriceDiscreteOrderItemImpl, GiftWrapOrderItemImpl, OrderItemImpl

public interface OrderItem
extends Serializable


Method Summary
 void accept(OrderItemVisitor visitor)
           
 void addCandidateItemOffer(CandidateItemOffer candidateItemOffer)
           
 void assignFinalPrice()
           
 OrderItem clone()
           
 Money getAdjustmentValue()
           
 List<CandidateItemOffer> getCandidateItemOffers()
           
 Category getCategory()
           
 Money getCurrentPrice()
           
 GiftWrapOrderItem getGiftWrapOrderItem()
           
 Long getId()
           
 boolean getIsDiscounted()
           
 boolean getIsOnSale()
           
 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()
           
 Money getPriceBeforeAdjustments(boolean allowSalesPrice)
           
 int getQuantity()
           
 Money getRetailPrice()
           
 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)
           
 void setQuantity(int quantity)
           
 void setRetailPrice(Money retailPrice)
           
 void setSalePrice(Money salePrice)
           
 void setSplitParentItemId(Long id)
           
 void setTaxable(Boolean taxable)
          Sets whether or not this item is taxable
 boolean updatePrices()
           
 

Method Detail

getId

Long getId()

setId

void setId(Long id)

getOrder

Order getOrder()

setOrder

void setOrder(Order order)

getRetailPrice

Money getRetailPrice()

setRetailPrice

void setRetailPrice(Money retailPrice)

getSalePrice

Money getSalePrice()

setSalePrice

void setSalePrice(Money salePrice)

getAdjustmentValue

Money getAdjustmentValue()

getPrice

Money getPrice()

setPrice

void setPrice(Money price)

getQuantity

int getQuantity()

setQuantity

void setQuantity(int quantity)

getCategory

Category getCategory()

setCategory

void setCategory(Category category)

getCandidateItemOffers

List<CandidateItemOffer> getCandidateItemOffers()

setCandidateItemOffers

void setCandidateItemOffers(List<CandidateItemOffer> candidateItemOffers)

getOrderItemAdjustments

List<OrderItemAdjustment> getOrderItemAdjustments()
Returns a unmodifiable List of OrderItemAdjustment. To modify the List of OrderItemAdjustment, please use the addOrderItemAdjustment or removeAllAdjustments methods.

Returns:
a unmodifiable List of OrderItemAdjustment

setOrderItemAdjustments

void setOrderItemAdjustments(List<OrderItemAdjustment> orderItemAdjustments)

getPersonalMessage

PersonalMessage getPersonalMessage()

setPersonalMessage

void setPersonalMessage(PersonalMessage personalMessage)

isInCategory

boolean isInCategory(String categoryName)

getGiftWrapOrderItem

GiftWrapOrderItem getGiftWrapOrderItem()

setGiftWrapOrderItem

void setGiftWrapOrderItem(GiftWrapOrderItem giftWrapOrderItem)

getOrderItemType

OrderItemType getOrderItemType()

setOrderItemType

void setOrderItemType(OrderItemType orderItemType)

getTaxablePrice

Money getTaxablePrice()

getIsOnSale

boolean getIsOnSale()

getIsDiscounted

boolean getIsDiscounted()

updatePrices

boolean updatePrices()

getName

String getName()

setName

void setName(String name)

clone

OrderItem clone()

assignFinalPrice

void assignFinalPrice()

getCurrentPrice

Money getCurrentPrice()

getPriceBeforeAdjustments

Money getPriceBeforeAdjustments(boolean allowSalesPrice)

addCandidateItemOffer

void addCandidateItemOffer(CandidateItemOffer candidateItemOffer)

removeAllCandidateItemOffers

void removeAllCandidateItemOffers()

removeAllAdjustments

int removeAllAdjustments()
Removes all adjustment for this order item and reset the adjustment price.


accept

void accept(OrderItemVisitor visitor)
            throws PricingException
Throws:
PricingException

getOrderItemAttributes

Map<String,OrderItemAttribute> getOrderItemAttributes()
A list of arbitrary attributes added to this item.


setOrderItemAttributes

void setOrderItemAttributes(Map<String,OrderItemAttribute> orderItemAttributes)
Sets the map of order item attributes.

Parameters:
orderItemAttributes -

isTaxable

Boolean isTaxable()
Returns whether or not this item is taxable. If this flag is not set, it returns true by default

Returns:
the taxable flag. If null, returns true

setTaxable

void setTaxable(Boolean taxable)
Sets whether or not this item is taxable

Parameters:
taxable -

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 © 2013. All Rights Reserved.