@Test public void testAdditionalOffsetWithoutDefaults() { parameters.put("f.PROVIDER.facet.offset", new String[]{"0"}); Map<String, Integer> resultMap = FacetParameterUtils.getSolrFacetParams("offset", facets, parameters, false); assertNotNull(resultMap); assertEquals(1, resultMap.size()); assertTrue(resultMap.containsKey("f.proxy_dc_contributor.facet.offset")); assertEquals(new Integer(0), resultMap.get("f.proxy_dc_contributor.facet.offset")); }
public static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets, Map<String, String[]> parameters, boolean defaultFacetsRequested) { Map<String, Integer> solrFacetParams = new HashMap<>(); if (defaultFacetsRequested) { for (SolrFacetType solrFacet : SolrFacetType.values()) { saveNumericFacetParam(type, solrFacet.name(), parameters, true, false, solrFacetParams); } } if (ArrayUtils.isNotEmpty(solrFacets)) { for (String solrFacetName : solrFacets) { if (!(defaultFacetsRequested && defaultSolrFacetList.contains(solrFacetName))) { saveNumericFacetParam(type, solrFacetName, parameters, defaultSolrFacetList.contains(solrFacetName), false, solrFacetParams); } } } return solrFacetParams; }
FacetParameterUtils { public static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets, Map<String, String[]> parameters, boolean defaultFacetsRequested) { Map<String, Integer> solrFacetParams = new HashMap<>(); if (defaultFacetsRequested) { for (SolrFacetType solrFacet : SolrFacetType.values()) { saveNumericFacetParam(type, solrFacet.name(), parameters, true, false, solrFacetParams); } } if (ArrayUtils.isNotEmpty(solrFacets)) { for (String solrFacetName : solrFacets) { if (!(defaultFacetsRequested && defaultSolrFacetList.contains(solrFacetName))) { saveNumericFacetParam(type, solrFacetName, parameters, defaultSolrFacetList.contains(solrFacetName), false, solrFacetParams); } } } return solrFacetParams; } }
FacetParameterUtils { public static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets, Map<String, String[]> parameters, boolean defaultFacetsRequested) { Map<String, Integer> solrFacetParams = new HashMap<>(); if (defaultFacetsRequested) { for (SolrFacetType solrFacet : SolrFacetType.values()) { saveNumericFacetParam(type, solrFacet.name(), parameters, true, false, solrFacetParams); } } if (ArrayUtils.isNotEmpty(solrFacets)) { for (String solrFacetName : solrFacets) { if (!(defaultFacetsRequested && defaultSolrFacetList.contains(solrFacetName))) { saveNumericFacetParam(type, solrFacetName, parameters, defaultSolrFacetList.contains(solrFacetName), false, solrFacetParams); } } } return solrFacetParams; }  }
FacetParameterUtils { public static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets, Map<String, String[]> parameters, boolean defaultFacetsRequested) { Map<String, Integer> solrFacetParams = new HashMap<>(); if (defaultFacetsRequested) { for (SolrFacetType solrFacet : SolrFacetType.values()) { saveNumericFacetParam(type, solrFacet.name(), parameters, true, false, solrFacetParams); } } if (ArrayUtils.isNotEmpty(solrFacets)) { for (String solrFacetName : solrFacets) { if (!(defaultFacetsRequested && defaultSolrFacetList.contains(solrFacetName))) { saveNumericFacetParam(type, solrFacetName, parameters, defaultSolrFacetList.contains(solrFacetName), false, solrFacetParams); } } } return solrFacetParams; }  static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets,
                                                          Map<String, String[]> parameters,
                                                          boolean defaultFacetsRequested); static Map<String, Integer> getTechnicalFacetParams(String type, String[] technicalFacets, Map<String,
            String[]> parameters, boolean defaultFacetsRequested); static Map<String, String> getDateRangeParams(Map<String, String[]> parameters); static String getLimitForDataProvider(); }
FacetParameterUtils { public static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets, Map<String, String[]> parameters, boolean defaultFacetsRequested) { Map<String, Integer> solrFacetParams = new HashMap<>(); if (defaultFacetsRequested) { for (SolrFacetType solrFacet : SolrFacetType.values()) { saveNumericFacetParam(type, solrFacet.name(), parameters, true, false, solrFacetParams); } } if (ArrayUtils.isNotEmpty(solrFacets)) { for (String solrFacetName : solrFacets) { if (!(defaultFacetsRequested && defaultSolrFacetList.contains(solrFacetName))) { saveNumericFacetParam(type, solrFacetName, parameters, defaultSolrFacetList.contains(solrFacetName), false, solrFacetParams); } } } return solrFacetParams; }  static Map<String, Integer> getSolrFacetParams(String type, String[] solrFacets,
                                                          Map<String, String[]> parameters,
                                                          boolean defaultFacetsRequested); static Map<String, Integer> getTechnicalFacetParams(String type, String[] technicalFacets, Map<String,
            String[]> parameters, boolean defaultFacetsRequested); static Map<String, String> getDateRangeParams(Map<String, String[]> parameters); static String getLimitForDataProvider();  }