com.elasticpath.domain.catalogview.impl
Class FeaturedProductSorterImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.catalogview.impl.FeaturedProductSorterImpl
All Implemented Interfaces:
Sorter, EpDomain, Transient, java.io.Serializable

public class FeaturedProductSorterImpl
extends AbstractTransientImpl
implements Sorter

The default implementation of PriceSorter.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from interface com.elasticpath.domain.catalogview.Sorter
ASC, DSC
 
Constructor Summary
FeaturedProductSorterImpl()
          Default Constructer.
 
Method Summary
 java.lang.String getId()
          Returns the id of the sorter.
 void initialize(java.lang.String sorterId)
          Sets the sorter id and initialize the sorter.
 void setFeaturedProductOrderComparator(FeaturedProductOrderComparator featuredProductOrderComparator)
          Sets the featured Product Order Comparator.
 java.util.List sort(java.util.List products)
          Sorts the given list of products and return the sorted list.
 
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

FeaturedProductSorterImpl

public FeaturedProductSorterImpl()
Default Constructer.

Method Detail

getId

public java.lang.String getId()
Returns the id of the sorter. Every sorter has a unique id.

Specified by:
getId in interface Sorter
Returns:
the id of the sorter

initialize

public void initialize(java.lang.String sorterId)
                throws EpCatalogViewRequestBindException
Sets the sorter id and initialize the sorter.

Specified by:
initialize in interface Sorter
Parameters:
sorterId - the id to set
Throws:
EpCatalogViewRequestBindException - when the given sorter id is invalid

setFeaturedProductOrderComparator

public void setFeaturedProductOrderComparator(FeaturedProductOrderComparator featuredProductOrderComparator)
Sets the featured Product Order Comparator.

Parameters:
featuredProductOrderComparator - the featured Product Order Comparator

sort

public java.util.List sort(java.util.List products)
Sorts the given list of products and return the sorted list.

Specified by:
sort in interface Sorter
Parameters:
products - the list of products to sort
Returns:
the sorted list