|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ShoppingCart is used to contain a list of ShoppingCartLines
. Each ShoppingCartLine
contains
a unique item. If the customer adds a ProductItem
that is already in the shopping cart, the quantity of the
existing ShoppingCartLine
is increased.
ShoppingCartHome
,
ShoppingCartLine
Method Summary | |
void |
addItemsFromShoppingCart(ShoppingCart items)
Add the ShoppingCartLines from the specified ShoppingCart to this ShoppingCart. |
ShoppingCartLine |
addProductItem(ProductItem item,
double quantity)
Add an Item to the ShoppingCart. |
ShoppingCartLine |
addProductItem(ProductItem item,
double quantity,
Money unitMoney)
Add an Item to the ShoppingCart. |
boolean |
addShoppingCartLine(ShoppingCartLine element)
Ensures that this collection contains the specified element (optional operation). |
boolean |
addShoppingCartLineCollection(Collection collection)
Adds all of the elements in the specified collection to this collection (optional operation). |
void |
clearShoppingCartLineCollection()
Removes all of the elements from this collection (optional operation). |
boolean |
containsShoppingCartLine(ShoppingCartLine element)
Returns true if this collection contains the specified element. |
boolean |
containsShoppingCartLineCollection(Collection c)
Returns true if this collection contains all of the elements in the specified collection. |
ShoppingCartLine |
createShoppingCartLine()
Used internally by the ShoppingCart to create ShoppingCartLines. |
boolean |
equalsShoppingCartLineCollection(Object object)
Compares the specified object with this collection for equality. |
ShoppingCartLine |
findShoppingCartLine(String productIdentifier)
Find the ShoppingCartLine associated with the specified Item. |
double |
getCategoryQuantity(String categoryId)
Count the number of products that belong to a category. |
double |
getNumberOfUnits()
Count the total quantity of items by summing the quantity on each line. |
ArrayList |
getOrderDiscountPresentations()
Gets the order level discount list |
Money |
getShipping()
Get the value of shipping |
ArrayList |
getShippingDiscountPresentations()
Accessor method for the presentation of the discounts applied to the shipping, used by JSP pages for instance |
Collection |
getShoppingCartLineCollection()
Returns the entire collection |
Money |
getSubtotal()
Get the value of Subtotal |
Money |
getTotal()
Get the value of total |
Money |
getTotal(int totalType)
Gets the shopping cart total for the given total type. |
Money |
getTotalPrice()
Gets the overal shopping cart total |
boolean |
isEmpty()
Returns true if the shopping cart has no items |
boolean |
isShoppingCartLineCollectionEmpty()
Returns true if this collection contains no elements. |
void |
removeAllProductItems()
Removes all ShoppingCartLines. |
ProductItem |
removeProductItem(String productIdentifier)
Remove the ShoppingCartLine associated with the Item specified. |
boolean |
removeShoppingCartLine(ShoppingCartLine element)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
boolean |
removeShoppingCartLineCollection(Collection collection)
Removes all this collection's elements that are also contained in the specified collection (optional operation). |
boolean |
retainShoppingCartLineCollection(Collection collection)
Retains only the elements in this collection that are contained in the specified collection (optional operation). |
void |
setOrderDiscountPresentations(ArrayList discountPresentations)
sets the order level discount list |
void |
setProductItemQuantity(ProductItem item,
double quantity)
Sets the Quantity of the ShoppingCartLine associated with this Item. |
void |
setShipping(Money shipping)
Set the value of shipping |
void |
setShippingDiscountPresentations(ArrayList discountPresentations)
sets Order Discount Description |
void |
setShoppingCartLineCollection(Collection collection)
Sets the entire collection |
void |
setSubtotal(Money subtotal)
Set the value of subtotal |
void |
setTotal(Money total)
Set the value of total |
int |
shoppingCartLineCollectionHashCode()
Returns the hash code value for this collection. |
Iterator |
shoppingCartLineCollectionIterator()
Returns an iterator over the elements in this collection. |
int |
shoppingCartLineCollectionSize()
Returns the number of elements in this collection. |
Methods inherited from interface com.beasys.commerce.foundation.Belonging |
clone, equals, interfaceName, setByValue, value |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public void addItemsFromShoppingCart(ShoppingCart items) throws InvalidArgumentException
InvalidArgumentException
public ShoppingCartLine addProductItem(ProductItem item, double quantity) throws InvalidArgumentException
InvalidArgumentException
public ShoppingCartLine addProductItem(ProductItem item, double quantity, Money unitMoney) throws InvalidArgumentException
InvalidArgumentException
public boolean addShoppingCartLine(ShoppingCartLine element)
public boolean addShoppingCartLineCollection(Collection collection)
public void clearShoppingCartLineCollection()
public boolean containsShoppingCartLine(ShoppingCartLine element)
public boolean containsShoppingCartLineCollection(Collection c)
public ShoppingCartLine createShoppingCartLine()
public boolean equalsShoppingCartLineCollection(Object object)
public ShoppingCartLine findShoppingCartLine(String productIdentifier) throws ItemNotInShoppingCartException, InvalidArgumentException
ItemNotInShoppingCartException
InvalidArgumentException
public double getCategoryQuantity(String categoryId) throws RemoteException
RemoteException
public double getNumberOfUnits()
public ArrayList getOrderDiscountPresentations()
public Money getShipping()
public ArrayList getShippingDiscountPresentations()
public Collection getShoppingCartLineCollection()
public Money getSubtotal()
public Money getTotal()
public Money getTotal(int totalType) throws InvalidArgumentException
InvalidArgumentException
public Money getTotalPrice()
public boolean isEmpty()
public boolean isShoppingCartLineCollectionEmpty()
public void removeAllProductItems()
public ProductItem removeProductItem(String productIdentifier) throws InvalidArgumentException
InvalidArgumentException
public boolean removeShoppingCartLine(ShoppingCartLine element)
public boolean removeShoppingCartLineCollection(Collection collection)
public boolean retainShoppingCartLineCollection(Collection collection)
public void setOrderDiscountPresentations(ArrayList discountPresentations)
public void setProductItemQuantity(ProductItem item, double quantity) throws InvalidArgumentException
InvalidArgumentException
public void setShipping(Money shipping)
shipping
- shipping to be setpublic void setShippingDiscountPresentations(ArrayList discountPresentations)
public void setShoppingCartLineCollection(Collection collection)
public void setSubtotal(Money subtotal)
subtotal
- subtotal to be setpublic void setTotal(Money total)
public int shoppingCartLineCollectionHashCode()
public Iterator shoppingCartLineCollectionIterator()
public int shoppingCartLineCollectionSize()
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |