com.elasticpath.domain.shoppingcart.impl
Class ViewHistoryImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.shoppingcart.impl.ViewHistoryImpl
All Implemented Interfaces:
EpDomain, ViewHistory, Transient, java.io.Serializable

public class ViewHistoryImpl
extends AbstractTransientImpl
implements ViewHistory

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

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
ViewHistoryImpl()
           
 
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 class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

ViewHistoryImpl

public ViewHistoryImpl()
Method Detail

addProduct

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

Specified by:
addProduct in interface ViewHistory
Parameters:
product - the Product to be added

getLastViewedHistoryProduct

public ViewHistoryProduct getLastViewedHistoryProduct()
Get the most recently viewed product.

Specified by:
getLastViewedHistoryProduct in interface ViewHistory
Returns:
a ViewHistoryProduct representing the most recently viewed product

getViewedProducts

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

Specified by:
getViewedProducts in interface ViewHistory
Returns:
a List of ViewHistoryProducts