|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractTransientImpl
com.elasticpath.domain.catalogview.impl.AbstractCatalogViewResultImpl
public abstract class AbstractCatalogViewResultImpl
This is an abstract implementation of CatalogViewResult. It can be extended to create a concrete catalog view result for a search
request or a catalog browsing request.
| Field Summary | |
|---|---|
static long |
serialVersionUID
Serial version id. |
| Constructor Summary | |
|---|---|
AbstractCatalogViewResultImpl()
Default Constructor. |
|
| Method Summary | |
|---|---|
java.util.Map |
getAttributeFilterOptions()
Returns a list of filter options on attribute. |
java.util.List |
getAttributeRangeFilterOptions(Attribute attribute)
Return a list of attribute range filters for the given attribute. |
java.util.List |
getAttributeValueFilterOptions(Attribute attribute)
Returns a list of filter options on the given Attribute. |
java.util.List |
getBrandFilterOptions()
Returns a list of filter options on brand. |
CatalogViewRequest |
getCatalogViewRequest()
Returns the catalog view request which generated this search result. |
Category |
getCategory()
Returns the category. |
java.util.Map |
getDiversedAttributeValueFilters(java.util.List products,
Attribute attribute)
This method traverse the given products and try to find the diversed values with the given attribute. |
java.util.Map |
getDiversedBrands(java.util.List products)
This method traverse the given products and try to find the diversed brands with the number of products belongs to each brand. |
java.util.List |
getFeaturedProducts()
Returns a list of featured products, this list is by default sorted by featured product order. |
FilterFactory |
getFilterFactory()
Returns the search filter factory. |
java.util.List |
getPriceFilterOptions()
Returns a list of filter options on price range. |
java.util.List |
getProducts()
Returns a list of products as the search result. |
java.util.List |
getSortedProducts()
Returns a list of products as the search result. |
java.util.Map |
getTopBranchNodes(java.util.List leafNodes)
This method traverse the given leaf nodes and will try to find the top branches with the number of leaf nodes falling in each branch. |
void |
replicateData(CatalogViewResult catalogViewResult)
Replicate the data to this CatalogViewResult from the given CatalogViewResult. |
void |
setCatalogViewRequest(CatalogViewRequest catalogViewRequest)
Sets the catalog view request which generated this search result. |
void |
setCategory(Category category)
Sets the category. |
void |
setFeaturedProducts(java.util.List featuredProducts)
Sets a list of featured products. |
void |
setFilterFactory(FilterFactory filterFactory)
Sets the search filter factory. |
void |
setProducts(java.util.List products)
Sets a list of products as the search result. |
| 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 |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public AbstractCatalogViewResultImpl()
| Method Detail |
|---|
public java.util.Map getAttributeFilterOptions()
public java.util.List getAttributeRangeFilterOptions(Attribute attribute)
attribute - the given attribute.
public java.util.List getAttributeValueFilterOptions(Attribute attribute)
attribute - the given attribute object.
public java.util.List getBrandFilterOptions()
getBrandFilterOptions in interface CatalogViewResultpublic CatalogViewRequest getCatalogViewRequest()
getCatalogViewRequest in interface CatalogViewResultpublic Category getCategory()
getCategory in interface CatalogViewResult
public java.util.Map getDiversedAttributeValueFilters(java.util.List products,
Attribute attribute)
products - a products listattribute - the given attribute
Map contains attribute values. Attribute Value is the key, and the number of products with same value.public java.util.Map getDiversedBrands(java.util.List products)
products - a products list
Map contains brands. Brand is the key, and the number of products under that Brand as
value.public java.util.List getFeaturedProducts()
getFeaturedProducts in interface CatalogViewResultpublic FilterFactory getFilterFactory()
public java.util.List getPriceFilterOptions()
getPriceFilterOptions in interface CatalogViewResultpublic java.util.List getProducts()
getProducts in interface CatalogViewResultpublic java.util.List getSortedProducts()
CatalogViewRequest.
getSortedProducts in interface CatalogViewResultpublic java.util.Map getTopBranchNodes(java.util.List leafNodes)
leafNodes - a leaf nodes list
Map contains branch nodes. BranchNode is the key, and the number of leaf nodes under that
BranchNode as value.public void replicateData(CatalogViewResult catalogViewResult)
CatalogViewResult from the given CatalogViewResult.
replicateData in interface CatalogViewResultcatalogViewResult - the CatalogViewResult to be replicatedpublic void setCatalogViewRequest(CatalogViewRequest catalogViewRequest)
setCatalogViewRequest in interface CatalogViewResultcatalogViewRequest - the catalog view requestpublic void setCategory(Category category)
setCategory in interface CatalogViewResultcategory - the category to setpublic void setFeaturedProducts(java.util.List featuredProducts)
setFeaturedProducts in interface CatalogViewResultfeaturedProducts - a list of featured productspublic void setFilterFactory(FilterFactory filterFactory)
filterFactory - the search filter factory.public void setProducts(java.util.List products)
setProducts in interface CatalogViewResultproducts - a list of products as the search result.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||