ShoppingCartLine Interface

com.beasys.commerce.ebusiness.shoppingcart
ShoppingCartLine Interface

public interface ShoppingCartLine

    extends Belonging

This class combines a ProductItem, a Quantity and a Money object. The total price for the line is calculated using the getTotal() method, specifying the required total type.

Related Topics

ShoppingCartLineHome
ShoppingCart


All Known Implementing Classes
ShoppingCartLineImpl
All Superinterfaces
Belonging, BusinessSmartComponent, Cloneable, Comparable, Serializable

Method Summary

public Money
getBaseSavings()
Get the savings from the MSRP to the base unit price, exluding non-catalog discounts, i.e. quantity * (MSRP - Unit Price)
public Money
getBaseTotal()
Get the total excluing non-catalog discounts, i.e.
public Money
getDiscountedPrice()
get the Discounted Price for the line
public ArrayList
getDiscountPresentations()
get the Discount Description Array list of the discounts that apply to a particular shopping cart line
public Money
getLineTotal(int totalType)
Gets the line total for the given total type.
public ProductItem
getProductItem()
Get the value of productItem
public double
getQuantity()
Get the quantity of the item
public Money
getSavings()
Get the savings on this line (savings is the quantity times (msrp - unit price))
public Money
getShipping()
Get the value of shipping
public Money
getTax()
Get the value of tax
public Money
getUnitPrice()
Get the value of unitPrice
public void
setDiscountedPrice(Money discountedPrice)
Set the discount price for this line
public void
setDiscountPresentations(ArrayList discountPresentations)
Set the value of discount descriptions of the discounts that apply to a particular shopping cart line
public void
setProductItem(ProductItem productItem)
Set the value of productItem
public void
setQuantity(double quantity)
Set the value of quantity
public void
setShipping(Money shipping)
Set the value of shipping
public void
setTax(Money tax)
Set the value of tax
public void
setUnitPrice(Money unitPrice)
Set the value of unitPrice
 
Methods from interface com.beasys.commerce.foundation.Belonging
clone, equals, interfaceName, setByValue, value
 
Methods from interface java.lang.Comparable
compareTo
   

Method Detail

getBaseSavings() Method

public Money getBaseSavings()
Get the savings from the MSRP to the base unit price, exluding non-catalog discounts, i.e. quantity * (MSRP - Unit Price)

Returns

base savings

getBaseTotal() Method

public Money getBaseTotal()
Get the total excluing non-catalog discounts, i.e. the quantity * unit price for this line

Returns

baseTotal

getDiscountedPrice() Method

public Money getDiscountedPrice()
get the Discounted Price for the line

Returns

the price as discounted

getDiscountPresentations() Method

public ArrayList getDiscountPresentations()
get the Discount Description Array list of the discounts that apply to a particular shopping cart line

Returns

an ArrayList of DiscountDescription objects

getLineTotal(int) Method

public Money getLineTotal(int totalType)
throws InvalidArgumentException
Gets the line total for the given total type. Valid values are one or more of : These can be combined together using the OR operator '|' to get compound total types

Parameters

totalType
type

Exceptions

InvalidArgumentException

getProductItem() Method

public ProductItem getProductItem()
Get the value of productItem

Returns

productItem.

getQuantity() Method

public double getQuantity()
Get the quantity of the item

Returns

quantity.

getSavings() Method

public Money getSavings()
Get the savings on this line (savings is the quantity times (msrp - unit price))

Returns

savings.

getShipping() Method

public Money getShipping()
Get the value of shipping

Returns

shipping.

getTax() Method

public Money getTax()
Get the value of tax

Returns

tax.

getUnitPrice() Method

public Money getUnitPrice()
Get the value of unitPrice

Returns

unitPrice.

setDiscountedPrice(Money) Method

public void setDiscountedPrice(Money discountedPrice)
Set the discount price for this line

Parameters

discountedPrice
the price as discounted

setDiscountPresentations(ArrayList) Method

public void setDiscountPresentations(ArrayList discountPresentations)
Set the value of discount descriptions of the discounts that apply to a particular shopping cart line

Parameters

discountPresentations
an ArrayList of Presentation objects

setProductItem(ProductItem) Method

public void setProductItem(ProductItem productItem)
Set the value of productItem

Parameters

productItem
productItem to be added

setQuantity(double) Method

public void setQuantity(double quantity)
Set the value of quantity

Parameters

quantity
quantity to be added

setShipping(Money) Method

public void setShipping(Money shipping)
Set the value of shipping

Parameters

shipping
shipping to be set

setTax(Money) Method

public void setTax(Money tax)
Set the value of tax

Parameters

tax
tax to be set

setUnitPrice(Money) Method

public void setUnitPrice(Money unitPrice)
Set the value of unitPrice

Parameters

unitPrice
unitPrice to be set