com.elasticpath.domain.catalogview
Interface Filter

All Superinterfaces:
java.lang.Comparable, EpDomain, java.io.Serializable, Transient
All Known Subinterfaces:
AttributeFilter, AttributeRangeFilter, AttributeValueFilter, BrandFilter, PriceFilter, RangeFilter
All Known Implementing Classes:
AbstractFilterImpl, AbstractRangeFilterImpl, AttributeRangeFilterImpl, AttributeValueFilterImpl, BrandFilterImpl, CategoryFilterImpl, PriceFilterImpl

public interface Filter
extends Transient, java.lang.Comparable

Represents a filter in a CatalogViewRequest.


Field Summary
static java.lang.String ERROR_MSG
          Error Message when parse the range.
static char SEPARATOR
          Define the separator used in price filter id string.
static java.lang.String SEPARATOR_IN_REGEX
          Define the regular expression of the given separator.
 
Method Summary
 java.util.List filter(java.util.List products)
          Filter on the given product list and returns a filtered product list.
 java.lang.String getDisplayName(java.util.Locale locale)
          Returns the display name of the filter with the given locale.
 java.lang.String getId()
          Returns the id of the filter.
 java.lang.String getSeoId()
          Returns the SEO identifier of the filter with the given locale.
 java.lang.String getSeoName(java.util.Locale locale)
          Returns the SEO name of the filter with the given locale.
 void initialize(java.lang.String filterId)
          Sets the filter id and initialize the filter.
 boolean isLocalized()
          Check the filter is localized.
 boolean match(java.lang.Object obj)
          Check whether the given object matchs this filter.
 void setId(java.lang.String filterId)
          Set the id of the filter.
 void setLocalized(boolean localized)
          Set the filter is localized.
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

ERROR_MSG

static final java.lang.String ERROR_MSG
Error Message when parse the range.

See Also:
Constant Field Values

SEPARATOR

static final char SEPARATOR
Define the separator used in price filter id string.

See Also:
Constant Field Values

SEPARATOR_IN_REGEX

static final java.lang.String SEPARATOR_IN_REGEX
Define the regular expression of the given separator.

See Also:
Constant Field Values
Method Detail

filter

java.util.List filter(java.util.List products)
Filter on the given product list and returns a filtered product list.

Parameters:
products - the product list to filter
Returns:
a filtered product list

getDisplayName

java.lang.String getDisplayName(java.util.Locale locale)
Returns the display name of the filter with the given locale.

Parameters:
locale - the locale
Returns:
the display name of the filter with the given locale.

getId

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

Returns:
the id of the filter

getSeoId

java.lang.String getSeoId()
Returns the SEO identifier of the filter with the given locale.

Returns:
the SEO identifier of the filter with the given locale.

getSeoName

java.lang.String getSeoName(java.util.Locale locale)
Returns the SEO name of the filter with the given locale.

Parameters:
locale - the locale
Returns:
the SEO name of the filter with the given locale.

initialize

void initialize(java.lang.String filterId)
                throws EpCatalogViewRequestBindException
Sets the filter id and initialize the filter.

Parameters:
filterId - the id to set
Throws:
EpCatalogViewRequestBindException - when the given filter id is invalid

isLocalized

boolean isLocalized()
Check the filter is localized.

Returns:
the localized

match

boolean match(java.lang.Object obj)
Check whether the given object matchs this filter. Generally, the given object should be a product.

Parameters:
obj - the given object.
Returns:
true: the given object matchs with the filter.

setId

void setId(java.lang.String filterId)
Set the id of the filter. Every filter has a unique id.

Parameters:
filterId - the id of the filter

setLocalized

void setLocalized(boolean localized)
Set the filter is localized.

Parameters:
localized - the localized to set