com.elasticpath.sfweb.viewbean.impl
Class ProductViewBeanImpl

java.lang.Object
  extended by com.elasticpath.sfweb.viewbean.impl.EpViewBeanImpl
      extended by com.elasticpath.sfweb.viewbean.impl.ProductViewBeanImpl
All Implemented Interfaces:
EpViewBean, ProductViewBean, java.io.Serializable

public class ProductViewBeanImpl
extends EpViewBeanImpl
implements ProductViewBean

Represents a bean for catalog view.

See Also:
Serialized Form

Constructor Summary
ProductViewBeanImpl()
           
 
Method Summary
 CatalogViewResult getCurrentCatalogViewResult()
          Returns the current catalog view result.
 Product getProduct()
          Get the product to be displayed.
 int getUpdateCartItemQty()
          Get the Qty of the cart item being updated.
 long getUpdateCartItemUid()
          Get the UID of the cart item being updated.
 java.lang.String getUpdatePage()
          Returns the page that is being updated if isUpdate is true.
 boolean isFromBrowsing()
          Returns true if the product view page is reached from browsing.
 boolean isFromSearch()
          Returns true if the product view page is reached from search.
 boolean isUpdate()
          Returns true if the product is being displayed for updating rather than the initial add to cart.
 void setCurrentCatalogViewResult(CatalogViewResult catalogViewResult)
          Sets the current catalog view result.
 void setProduct(Product product)
          Set the product to be displayed.
 void setUpdateCartItemQty(int updateCartItemQty)
          Set the Qty of the cart item to be updated.
 void setUpdateCartItemUid(long updateCartItemUid)
          Set the UID of the cart item to be updated.
 void setUpdatePage(java.lang.String updatePage)
          Set the page that is being updated.
 
Methods inherited from class com.elasticpath.sfweb.viewbean.impl.EpViewBeanImpl
getElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.sfweb.viewbean.EpViewBean
getElasticPath
 

Constructor Detail

ProductViewBeanImpl

public ProductViewBeanImpl()
Method Detail

getCurrentCatalogViewResult

public CatalogViewResult getCurrentCatalogViewResult()
Returns the current catalog view result.

Specified by:
getCurrentCatalogViewResult in interface ProductViewBean
Returns:
the current catalog view result

getProduct

public Product getProduct()
Get the product to be displayed.

Specified by:
getProduct in interface ProductViewBean
Returns:
the product

getUpdateCartItemQty

public int getUpdateCartItemQty()
Get the Qty of the cart item being updated.

Specified by:
getUpdateCartItemQty in interface ProductViewBean
Returns:
the Qty of the cart item if a cart item is being updated.

getUpdateCartItemUid

public long getUpdateCartItemUid()
Get the UID of the cart item being updated.

Specified by:
getUpdateCartItemUid in interface ProductViewBean
Returns:
the UID of the cart item if a cart item is being updated.

getUpdatePage

public java.lang.String getUpdatePage()
Returns the page that is being updated if isUpdate is true.

Specified by:
getUpdatePage in interface ProductViewBean
Returns:
a constant String corresponding to the page being updated.

isFromBrowsing

public boolean isFromBrowsing()
Returns true if the product view page is reached from browsing.

Specified by:
isFromBrowsing in interface ProductViewBean
Returns:
true if the product view page is reached from browsing.

isFromSearch

public boolean isFromSearch()
Returns true if the product view page is reached from search.

Specified by:
isFromSearch in interface ProductViewBean
Returns:
true if the product view page is reached from search.

isUpdate

public boolean isUpdate()
Returns true if the product is being displayed for updating rather than the initial add to cart.

Specified by:
isUpdate in interface ProductViewBean
Returns:
see above.

setCurrentCatalogViewResult

public void setCurrentCatalogViewResult(CatalogViewResult catalogViewResult)
Sets the current catalog view result.

Specified by:
setCurrentCatalogViewResult in interface ProductViewBean
Parameters:
catalogViewResult - the current catalog view result

setProduct

public void setProduct(Product product)
Set the product to be displayed.

Specified by:
setProduct in interface ProductViewBean
Parameters:
product - the product

setUpdateCartItemQty

public void setUpdateCartItemQty(int updateCartItemQty)
Set the Qty of the cart item to be updated.

Specified by:
setUpdateCartItemQty in interface ProductViewBean
Parameters:
updateCartItemQty - the cart item Qty

setUpdateCartItemUid

public void setUpdateCartItemUid(long updateCartItemUid)
Set the UID of the cart item to be updated.

Specified by:
setUpdateCartItemUid in interface ProductViewBean
Parameters:
updateCartItemUid - the cart item UID

setUpdatePage

public void setUpdatePage(java.lang.String updatePage)
Set the page that is being updated. If a product is being updated, this will indicate which page the user should return to upon updating.

Specified by:
setUpdatePage in interface ProductViewBean
Parameters:
updatePage - the page being updated, use a constant in WebConstants