com.elasticpath.domain.shoppingcart
Interface ViewHistory

All Superinterfaces:
EpDomain, java.io.Serializable, Transient
All Known Implementing Classes:
ViewHistoryImpl

public interface ViewHistory
extends Transient

This class represents a collection of products viewed by a user.


Method Summary
 void addProduct(Product product)
          Adds a product to the viewHistory.
 ViewHistoryProduct getLastViewedHistoryProduct()
          Get the most recently viewed product.
 java.util.List getViewedProducts()
          Get a list of the most recently viewed products in the view history.
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

addProduct

void addProduct(Product product)
Adds a product to the viewHistory.

Parameters:
product - the Product to be added

getLastViewedHistoryProduct

ViewHistoryProduct getLastViewedHistoryProduct()
Get the most recently viewed product.

Returns:
a ViewHistoryProduct representing the most recently viewed product

getViewedProducts

java.util.List getViewedProducts()
Get a list of the most recently viewed products in the view history.

Returns:
a List of ViewHistoryProducts