com.elasticpath.domain.catalogview.impl
Class AbstractCatalogViewRequestImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.catalogview.impl.AbstractCatalogViewRequestImpl
All Implemented Interfaces:
CatalogViewRequest, EpDomain, Transient, java.io.Serializable
Direct Known Subclasses:
BrowsingRequestImpl, SearchRequestImpl

public abstract class AbstractCatalogViewRequestImpl
extends AbstractTransientImpl
implements CatalogViewRequest

This is an abstract implementation of CatalogViewRequest. It can be extended to create a concrete catalog view request, such as a search request or a catalog browsing request.

See Also:
Serialized Form

Nested Class Summary
static class AbstractCatalogViewRequestImpl.FilterQueryStringImpl
          Represent a simple bean which aggregate some query strings for a filter.
 
Nested classes/interfaces inherited from interface com.elasticpath.domain.catalogview.CatalogViewRequest
CatalogViewRequest.FilterQueryString
 
Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
AbstractCatalogViewRequestImpl()
          Default Constructor.
 
Method Summary
 java.util.List filterProducts(CatalogViewRequest previousSearchRequest, java.util.List products)
          Filter the given products list and returns the filtered products.
 long getCategoryUid()
          Returns the keywords specified in the search request.
 java.util.Currency getCurrency()
          Returns the currency.
 java.lang.String getFilterIds()
          Returns a String of the list of Filter.
 java.util.List getFilterQueryStrings()
          Composes and returns a list of FilterQueryStrings for all filters specified in this catalog view request.
 java.util.List getFilters()
          Returns the list of Filter specified in the search request.
 java.util.Locale getLocale()
          Returns the locale.
 int getMaxReturnNumber()
          Returns the maximum return number specified in the search request.
 Sorter getSorter()
          Returns the sorter specified in the search request.
 SorterFactory getSorterFactory()
          Get the sorter factoy SorterFactory.
 void setCategoryUid(long categoryUid)
          Sets the keywords.
 void setCurrency(java.util.Currency currency)
          Sets the currency.
 void setFilterFactory(FilterFactory filterFactory)
          Sets the search filter factory.
 void setFiltersIdStr(java.lang.String filtersIdStr)
          Sets the filters identifier strings.
 void setLocale(java.util.Locale locale)
          Sets the locale.
 void setMaxReturnNumber(int maxReturnNumber)
          Sets the maximum return number.
 void setSorterFactory(SorterFactory sorterFactory)
          Sets the search sorter factory.
 void setSorterIdStr(java.lang.String sorterIdStr)
          Sets the sorter identifier string.
 
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.catalogview.CatalogViewRequest
addFilter, compare, getQueryString
 
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

AbstractCatalogViewRequestImpl

public AbstractCatalogViewRequestImpl()
Default Constructor.

Method Detail

filterProducts

public java.util.List filterProducts(CatalogViewRequest previousSearchRequest,
                                     java.util.List products)
Filter the given products list and returns the filtered products. If you give a previous SearchRequest which has already being applied to the given products, we won't do the filterings again for those filters also in previous SearchRequest.

Specified by:
filterProducts in interface CatalogViewRequest
Parameters:
previousSearchRequest - previous search request
products - the products to filter
Returns:
the filtered products

getCategoryUid

public long getCategoryUid()
Returns the keywords specified in the search request.

Specified by:
getCategoryUid in interface CatalogViewRequest
Returns:
the keywords

getCurrency

public java.util.Currency getCurrency()
Returns the currency.

Specified by:
getCurrency in interface CatalogViewRequest
Returns:
the curreny

getFilterIds

public java.lang.String getFilterIds()
Returns a String of the list of Filter.

Specified by:
getFilterIds in interface CatalogViewRequest
Returns:
a String of the list of Filter

getFilterQueryStrings

public java.util.List getFilterQueryStrings()
Composes and returns a list of FilterQueryStrings for all filters specified in this catalog view request.

Specified by:
getFilterQueryStrings in interface CatalogViewRequest
Returns:
a list of FilterQueryStrings

getFilters

public java.util.List getFilters()
Returns the list of Filter specified in the search request.

Specified by:
getFilters in interface CatalogViewRequest
Returns:
the list of Filter

getLocale

public java.util.Locale getLocale()
Returns the locale.

Specified by:
getLocale in interface CatalogViewRequest
Returns:
the locale

getMaxReturnNumber

public int getMaxReturnNumber()
Returns the maximum return number specified in the search request.

Specified by:
getMaxReturnNumber in interface CatalogViewRequest
Returns:
the maximum return number

getSorter

public Sorter getSorter()
Returns the sorter specified in the search request.

Specified by:
getSorter in interface CatalogViewRequest
Returns:
the sorter

getSorterFactory

public SorterFactory getSorterFactory()
Get the sorter factoy SorterFactory.

Specified by:
getSorterFactory in interface CatalogViewRequest
Returns:
the sorter factoy

setCategoryUid

public void setCategoryUid(long categoryUid)
                    throws EpCatalogViewRequestBindException
Sets the keywords.

Specified by:
setCategoryUid in interface CatalogViewRequest
Parameters:
categoryUid - the keywords to set
Throws:
EpCatalogViewRequestBindException - in case the given keywords is invalid

setCurrency

public void setCurrency(java.util.Currency currency)
Sets the currency.

Specified by:
setCurrency in interface CatalogViewRequest
Parameters:
currency - the currency to set

setFilterFactory

public void setFilterFactory(FilterFactory filterFactory)
Sets the search filter factory.

Parameters:
filterFactory - the search filter factory

setFiltersIdStr

public void setFiltersIdStr(java.lang.String filtersIdStr)
                     throws EpCatalogViewRequestBindException
Sets the filters identifier strings.

Specified by:
setFiltersIdStr in interface CatalogViewRequest
Parameters:
filtersIdStr - the filters identifier strings
Throws:
EpCatalogViewRequestBindException - in case the given filters identifier strings are invalid

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale.

Specified by:
setLocale in interface CatalogViewRequest
Parameters:
locale - the locale to set

setMaxReturnNumber

public void setMaxReturnNumber(int maxReturnNumber)
Sets the maximum return number.

Specified by:
setMaxReturnNumber in interface CatalogViewRequest
Parameters:
maxReturnNumber - the page number to set

setSorterFactory

public void setSorterFactory(SorterFactory sorterFactory)
Sets the search sorter factory.

Parameters:
sorterFactory - the search sorter factory

setSorterIdStr

public void setSorterIdStr(java.lang.String sorterIdStr)
                    throws EpCatalogViewRequestBindException
Sets the sorter identifier string.

Specified by:
setSorterIdStr in interface CatalogViewRequest
Parameters:
sorterIdStr - the sorter identifier string.
Throws:
EpCatalogViewRequestBindException - in case the given sorter identifier is invalid