com.elasticpath.service.catalogview.impl
Class SearchServiceImpl

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

public class SearchServiceImpl
extends AbstractEpServiceImpl
implements SearchService

Represents a default implementation of SearchService.


Constructor Summary
SearchServiceImpl()
           
 
Method Summary
 SfSearchLogService getSfSearchLogService()
          Gets the SfSearchLogService.
 SearchResult search(SearchRequest searchRequest, CatalogViewResultHistory previousSearchResultHistory, ShoppingCart shoppingCart, ProductLoadTuner productLoadTuner)
          Perform searching based on the given search request and returns the search result.
 void setCategoryService(CategoryService categoryService)
          Sets the CategoryService.
 void setIndexSearchService(IndexSearchService indexSearchService)
          Sets the index search service.
 void setProductRetrieveStrategy(ProductRetrieveStrategy productRetrieveStrategy)
          Sets the ProductRetrieveStrategy.
 void setSfSearchLogService(SfSearchLogService sfSearchLogService)
          Sets the SfSearchLogService.
 
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

SearchServiceImpl

public SearchServiceImpl()
Method Detail

getSfSearchLogService

public SfSearchLogService getSfSearchLogService()
Gets the SfSearchLogService.

Specified by:
getSfSearchLogService in interface SearchService
Returns:
the SfSearchLogService

search

public SearchResult search(SearchRequest searchRequest,
                           CatalogViewResultHistory previousSearchResultHistory,
                           ShoppingCart shoppingCart,
                           ProductLoadTuner productLoadTuner)
Perform searching based on the given search request and returns the search result.

By giving the previous search result history, you may get response quicker. If you don't have it, give a null. It doesn't affect search result.

By giving a shopping cart, promotion rules will be applied to the returned products.

By giving the product load tuner, you can fine control what data to be loaded for each product. It is used to improve performance.

Specified by:
search in interface SearchService
Parameters:
searchRequest - the search request
previousSearchResultHistory - the previous search results, give null if you don't have it
shoppingCart - the shopping cart, give null if you don't have it
productLoadTuner - the product load tuner, give null to populate all data
Returns:
a SearchResult instance

setCategoryService

public void setCategoryService(CategoryService categoryService)
Sets the CategoryService.

Parameters:
categoryService - the CategoryService to set

setIndexSearchService

public void setIndexSearchService(IndexSearchService indexSearchService)
Sets the index search service.

Parameters:
indexSearchService - the index search service.

setProductRetrieveStrategy

public void setProductRetrieveStrategy(ProductRetrieveStrategy productRetrieveStrategy)
Sets the ProductRetrieveStrategy.

Parameters:
productRetrieveStrategy - the product retrieve strategy

setSfSearchLogService

public void setSfSearchLogService(SfSearchLogService sfSearchLogService)
Sets the SfSearchLogService.

Specified by:
setSfSearchLogService in interface SearchService
Parameters:
sfSearchLogService - the SfSearchLogService