com.elasticpath.sfweb.ajax.bean.impl
Class ShoppingCartBeanImpl

java.lang.Object
  extended by 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.


Constructor Summary
ShoppingCartBeanImpl(ShoppingCart shoppingCart, java.util.List cartItems, java.lang.String orderSummary)
           
 
Method Summary
 java.util.List getCartItems()
           
 Customer getCustomer()
           
 java.lang.String getOrderSummary()
           
 long getSelectedBillingAddressUidPk()
           
 long getSelectedShippingAddressUidPk()
           
 long getSelectedShippingServiceLevelUidPk()
           
 java.util.List getShippingServiceLevelList()
          Return the list of shippingServiceLevel list available based on the current shopping cart info.
 ShoppingCart getShoppingCart()
           
 java.lang.String getTotal()
           
 boolean isCustomerSignedIn()
           
 boolean isShippingRequired()
          Returns true if the cart contains items that must be shipped to the customer.
 void setCartItems(java.util.List cartItems)
           
 void setOrderSummary(java.lang.String orderSummary)
           
 void setShoppingCart(ShoppingCart shoppingCart)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingCartBeanImpl

public ShoppingCartBeanImpl(ShoppingCart shoppingCart,
                            java.util.List cartItems,
                            java.lang.String orderSummary)
Parameters:
shoppingCart - the ShoppingCart object
cartItems - a list of CartItemBean objects
orderSummary - a String of the html for order summary display
Method Detail

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