com.elasticpath.sfweb.ajax.bean.impl
Class ShoppingCartBeanImpl
java.lang.Object
com.elasticpath.sfweb.ajax.bean.impl.ShoppingCartBeanImpl
- All Implemented Interfaces:
- ShoppingCartBean
public class ShoppingCartBeanImpl
- extends java.lang.Object
- implements ShoppingCartBean
A convenience wrapper for sending the ShoppingCart
and a List
of CartItemBean
objects via dwr.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShoppingCartBeanImpl
public ShoppingCartBeanImpl(ShoppingCart shoppingCart,
java.util.List cartItems,
java.lang.String orderSummary)
- Parameters:
shoppingCart
- the ShoppingCart
objectcartItems
- a list of CartItemBean
objectsorderSummary
- a String
of the html for order summary display
getCartItems
public java.util.List getCartItems()
- Specified by:
getCartItems
in interface ShoppingCartBean
- Returns:
- the cartItems
getCustomer
public Customer getCustomer()
- Specified by:
getCustomer
in interface ShoppingCartBean
- Returns:
- the customer
getOrderSummary
public java.lang.String getOrderSummary()
- Specified by:
getOrderSummary
in interface ShoppingCartBean
- Returns:
- the orderSummary
getSelectedBillingAddressUidPk
public long getSelectedBillingAddressUidPk()
- Specified by:
getSelectedBillingAddressUidPk
in interface ShoppingCartBean
- Returns:
- the uidPk of the selected billing address
getSelectedShippingAddressUidPk
public long getSelectedShippingAddressUidPk()
- Specified by:
getSelectedShippingAddressUidPk
in interface ShoppingCartBean
- Returns:
- the uidPk of the selected shipping address
getSelectedShippingServiceLevelUidPk
public long getSelectedShippingServiceLevelUidPk()
- Specified by:
getSelectedShippingServiceLevelUidPk
in interface ShoppingCartBean
- Returns:
- the uidPk of the selected shipping service level
getShippingServiceLevelList
public java.util.List getShippingServiceLevelList()
- Return the list of shippingServiceLevel list available based on the current shopping cart info.
- Specified by:
getShippingServiceLevelList
in interface ShoppingCartBean
- Returns:
- the list of shippingServiceLevel list available based on the current shopping cart info.
getShoppingCart
public ShoppingCart getShoppingCart()
- Specified by:
getShoppingCart
in interface ShoppingCartBean
- Returns:
- the shoppingCart
getTotal
public java.lang.String getTotal()
- Specified by:
getTotal
in interface ShoppingCartBean
- Returns:
- the total cost of the order as a
String
including the currency symbol.
isCustomerSignedIn
public boolean isCustomerSignedIn()
- Specified by:
isCustomerSignedIn
in interface ShoppingCartBean
- Returns:
- true if the customer is currently signed in
isShippingRequired
public boolean isShippingRequired()
- Returns true if the cart contains items that must be shipped to the customer.
- Specified by:
isShippingRequired
in interface ShoppingCartBean
- Returns:
- true if the cart contains items that must be shipped to the customer.
setCartItems
public void setCartItems(java.util.List cartItems)
- Specified by:
setCartItems
in interface ShoppingCartBean
- Parameters:
cartItems
- the cartItems to set
setOrderSummary
public void setOrderSummary(java.lang.String orderSummary)
- Specified by:
setOrderSummary
in interface ShoppingCartBean
- Parameters:
orderSummary
- the orderSummary to set
setShoppingCart
public void setShoppingCart(ShoppingCart shoppingCart)
- Specified by:
setShoppingCart
in interface ShoppingCartBean
- Parameters:
shoppingCart
- the shoppingCart to set