@Test public void testCreateFilterMap() { searchResultsModel = context.request().adaptTo(SearchResultsImpl.class); Map<String, String[]> queryParameters = new HashMap<>(); queryParameters.put("search_query", new String[] { "ok" }); Map<String, String> filterMap = searchResultsModel.createFilterMap(queryParameters); Assert.assertEquals("filters query string parameter out correctly", 0, filterMap.size()); }
protected Map<String, String> createFilterMap(final Map<String, String[]> parameterMap) { Map<String, String> filters = super.createFilterMap(parameterMap); filters.remove(SearchOptionsImpl.SEARCH_QUERY_PARAMETER_ID); return filters; }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { protected Map<String, String> createFilterMap(final Map<String, String[]> parameterMap) { Map<String, String> filters = super.createFilterMap(parameterMap); filters.remove(SearchOptionsImpl.SEARCH_QUERY_PARAMETER_ID); return filters; } }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { protected Map<String, String> createFilterMap(final Map<String, String[]> parameterMap) { Map<String, String> filters = super.createFilterMap(parameterMap); filters.remove(SearchOptionsImpl.SEARCH_QUERY_PARAMETER_ID); return filters; }  }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { protected Map<String, String> createFilterMap(final Map<String, String[]> parameterMap) { Map<String, String> filters = super.createFilterMap(parameterMap); filters.remove(SearchOptionsImpl.SEARCH_QUERY_PARAMETER_ID); return filters; }  @Nonnull @Override Collection<ProductListItem> getProducts(); @Nonnull @Override SearchResultsSet getSearchResultsSet(); }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { protected Map<String, String> createFilterMap(final Map<String, String[]> parameterMap) { Map<String, String> filters = super.createFilterMap(parameterMap); filters.remove(SearchOptionsImpl.SEARCH_QUERY_PARAMETER_ID); return filters; }  @Nonnull @Override Collection<ProductListItem> getProducts(); @Nonnull @Override SearchResultsSet getSearchResultsSet();  }