com.elasticpath.domain.catalogview
Interface CatalogViewResultHistory

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

public interface CatalogViewResultHistory
extends Transient

Represents a list of catalog view results that a user has performed. The catalog view results are stored as a stack. The catalog view requests are getting more and more specific from the bottom to the top.

E.g.

Top => Search Result of request : keywords "digital camera", belongs to canon category, price is between 250 - 300

2nd => Search Result of request : keywords "digital camera", belongs to canon category, price is less than 500

3rd => Search Result of request : keywords "digital camera", belongs to canon category
Bottom => Search Result of request : keywords "digital camera"


Method Summary
 CatalogViewResult addRequest(CatalogViewRequest request)
          Add the given catalog view request and returns a catalog view result.
 CatalogViewResult getLastResult()
          Returns the last catalog view result.
 java.util.List getResultList()
          Returns the catalog view results as a List.
 int size()
          Returns the size of catalog view results.
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

addRequest

CatalogViewResult addRequest(CatalogViewRequest request)
Add the given catalog view request and returns a catalog view result. If we can find similear catalog view request in the history stack, products in the returned catalog view result will be populated so you don't need to load them again.

Parameters:
request - the catalog view request to add
Returns:
a catalog view result of the given catalog view request

getLastResult

CatalogViewResult getLastResult()
Returns the last catalog view result.

Returns:
the last catalog view result

getResultList

java.util.List getResultList()
Returns the catalog view results as a List. The most recent catalog view result is at the tail.

Returns:
the catalog view result as a List.

size

int size()
Returns the size of catalog view results.

Returns:
the size of catalog view results