com.elasticpath.domain.shoppingcart.impl
Class ViewHistoryImpl
java.lang.Object
com.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractTransientImpl
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- Serial version id.
- See Also:
- Constant Field Values
ViewHistoryImpl
public ViewHistoryImpl()
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 ViewHistoryProduct
s