@Test public void isSelectionSpecified() { Map<String, String[]> parameterMap = new HashMap<>(); when(this.request.getParameterMap()).thenReturn(parameterMap); assertFalse(this.documentSelectionResolver.isSelectionSpecified()); parameterMap.put("pages", new String[] {""}); assertTrue(this.documentSelectionResolver.isSelectionSpecified()); parameterMap.remove("pages"); parameterMap.put("filter", new String[] {""}); assertFalse(this.documentSelectionResolver.isSelectionSpecified()); parameterMap.put("filter", new String[] {"test"}); assertTrue(this.documentSelectionResolver.isSelectionSpecified()); }
public boolean isSelectionSpecified() { Map<String, String[]> parameters = this.xcontextProvider.get().getRequest().getParameterMap(); return parameters.containsKey(REQUEST_PARAMETER_PAGES) || !parameters.getOrDefault(REQUEST_PARAMETER_FILTER, new String[] {""})[0].isEmpty(); }
DocumentSelectionResolver { public boolean isSelectionSpecified() { Map<String, String[]> parameters = this.xcontextProvider.get().getRequest().getParameterMap(); return parameters.containsKey(REQUEST_PARAMETER_PAGES) || !parameters.getOrDefault(REQUEST_PARAMETER_FILTER, new String[] {""})[0].isEmpty(); } }
DocumentSelectionResolver { public boolean isSelectionSpecified() { Map<String, String[]> parameters = this.xcontextProvider.get().getRequest().getParameterMap(); return parameters.containsKey(REQUEST_PARAMETER_PAGES) || !parameters.getOrDefault(REQUEST_PARAMETER_FILTER, new String[] {""})[0].isEmpty(); }  }
DocumentSelectionResolver { public boolean isSelectionSpecified() { Map<String, String[]> parameters = this.xcontextProvider.get().getRequest().getParameterMap(); return parameters.containsKey(REQUEST_PARAMETER_PAGES) || !parameters.getOrDefault(REQUEST_PARAMETER_FILTER, new String[] {""})[0].isEmpty(); }  boolean isSelectionSpecified(); Collection<DocumentReference> getSelectedDocuments(); }
DocumentSelectionResolver { public boolean isSelectionSpecified() { Map<String, String[]> parameters = this.xcontextProvider.get().getRequest().getParameterMap(); return parameters.containsKey(REQUEST_PARAMETER_PAGES) || !parameters.getOrDefault(REQUEST_PARAMETER_FILTER, new String[] {""})[0].isEmpty(); }  boolean isSelectionSpecified(); Collection<DocumentReference> getSelectedDocuments();  }