Class TravelSearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,SEARCH_RESULT_TYPE,ITEM>
java.lang.Object
de.hybris.platform.commerceservices.search.solrfacetsearch.populators.SearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,SEARCH_RESULT_TYPE,ITEM>
de.hybris.platform.travelservices.search.solrfacetsearch.populators.TravelSearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,SEARCH_RESULT_TYPE,ITEM>
- Type Parameters:
FACET_SEARCH_CONFIG_TYPE-INDEXED_TYPE_TYPE-INDEXED_PROPERTY_TYPE-SEARCH_RESULT_TYPE-ITEM-
- All Implemented Interfaces:
de.hybris.platform.converters.Populator<SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE>, SearchPageData<ITEM>>
public class TravelSearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,SEARCH_RESULT_TYPE,ITEM>
extends de.hybris.platform.commerceservices.search.solrfacetsearch.populators.SearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,SEARCH_RESULT_TYPE,ITEM>
implements de.hybris.platform.converters.Populator<SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE,INDEXED_PROPERTY_TYPE,de.hybris.platform.solrfacetsearch.search.SearchQuery,IndexedTypeSort,SEARCH_RESULT_TYPE>,SearchPageData<ITEM>>
This populator will populate the sorts of the target element with the visible sorts taken from solr and with the
custom sorts taken from a property in project.properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCustomSorts(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source) This method returns the list of SortData corresponding to the custom sorts.buildSorts(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source) This method returns a list of the sorts taken from solr, filtering out the not visible onesprotected de.hybris.platform.servicelayer.config.ConfigurationServiceThis method will return a list of Strings taken from theTravelservicesConstants.ACCOMMODATION_LISTING_CUSTOM_SORT_ORDERSproperty, where the delimiter between the codes is a comma ","voidpopulate(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source, SearchPageData<ITEM> target) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Methods inherited from class de.hybris.platform.commerceservices.search.solrfacetsearch.populators.SearchResponseSortsPopulator
addSortData, createSortData
-
Constructor Details
-
TravelSearchResponseSortsPopulator
public TravelSearchResponseSortsPopulator()
-
-
Method Details
-
populate
public void populate(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source, SearchPageData<ITEM> target) - Specified by:
populatein interfacede.hybris.platform.converters.Populator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE> - Overrides:
populatein classde.hybris.platform.commerceservices.search.solrfacetsearch.populators.SearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, SEARCH_RESULT_TYPE, ITEM>
-
buildSorts
protected List<SortData> buildSorts(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source) This method returns a list of the sorts taken from solr, filtering out the not visible ones- Overrides:
buildSortsin classde.hybris.platform.commerceservices.search.solrfacetsearch.populators.SearchResponseSortsPopulator<FACET_SEARCH_CONFIG_TYPE,INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, SEARCH_RESULT_TYPE, ITEM>
-
buildCustomSorts
protected List<SortData> buildCustomSorts(SolrSearchResponse<FACET_SEARCH_CONFIG_TYPE, INDEXED_TYPE_TYPE, INDEXED_PROPERTY_TYPE, de.hybris.platform.solrfacetsearch.search.SearchQuery, IndexedTypeSort, SEARCH_RESULT_TYPE> source) This method returns the list of SortData corresponding to the custom sorts. The SortData has the string taken from the property as code, while the name will be empty- Parameters:
source-- Returns:
- the list of SortData corresponding to the custom sorts
-
getCustomSorts
This method will return a list of Strings taken from theTravelservicesConstants.ACCOMMODATION_LISTING_CUSTOM_SORT_ORDERSproperty, where the delimiter between the codes is a comma ","- Returns:
- list of String
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-