com.elasticpath.service.catalogview.impl
Class FilterFactoryImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.catalogview.impl.FilterFactoryImpl
All Implemented Interfaces:
FilterFactory, EpService

public class FilterFactoryImpl
extends AbstractEpServiceImpl
implements FilterFactory

Represet a default implementation of FilterFactory.


Constructor Summary
FilterFactoryImpl()
           
 
Method Summary
static AttributeValueFilter createAttributeFilter()
          Construct the Attribute Range Filter.
static AttributeRangeFilter createAttributeRangeFilter()
          Construct the Attribute Range Filter.
static PriceFilter createPriceFilter()
          Construct the Price Range Filter with the given currency code.
 Filter getFilter(Filter filter)
          Get the filter from the range filter cache with the given temporary filter.
 Filter getFilter(java.lang.String idStr)
          Creates and returns a Filter based on the given identifier string.
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

FilterFactoryImpl

public FilterFactoryImpl()
Method Detail

createAttributeFilter

public static AttributeValueFilter createAttributeFilter()
Construct the Attribute Range Filter.

Returns:
the attribute range filter.

createAttributeRangeFilter

public static AttributeRangeFilter createAttributeRangeFilter()
Construct the Attribute Range Filter.

Returns:
the attribute range filter.

createPriceFilter

public static PriceFilter createPriceFilter()
Construct the Price Range Filter with the given currency code.

Returns:
the price filter.

getFilter

public Filter getFilter(Filter filter)
Get the filter from the range filter cache with the given temporary filter.

Specified by:
getFilter in interface FilterFactory
Parameters:
filter - the temporary created filter.
Returns:
the cached range filter if exists, else return the temporary filter.

getFilter

public Filter getFilter(java.lang.String idStr)
                 throws EpCatalogViewRequestBindException
Creates and returns a Filter based on the given identifier string.

Specified by:
getFilter in interface FilterFactory
Parameters:
idStr - the identifier string
Returns:
a Filter
Throws:
EpCatalogViewRequestBindException - when the given identifier string is invalid