@Test void testFromCurrentRequestDecodedQueryNoWithoutQuery() { when(request.getRequestURI()).thenReturn("/api/data/EntityType"); when(request.getScheme()).thenReturn("http"); when(request.getServerName()).thenReturn("localhost"); when(request.getServerPort()).thenReturn(80); assertEquals( "http: MolgenisServletUriComponentsBuilder.fromCurrentRequestDecodedQuery().build().toUriString()); }
@SuppressWarnings("RedundantCast") public static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery() { ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentRequest(); Map<String, String[]> params = getCurrentRequest().getParameterMap(); for (Entry<String, String[]> param : params.entrySet()) { builder.replaceQueryParam(param.getKey(), (Object[]) param.getValue()); } return builder; }
MolgenisServletUriComponentsBuilder extends ServletUriComponentsBuilder { @SuppressWarnings("RedundantCast") public static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery() { ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentRequest(); Map<String, String[]> params = getCurrentRequest().getParameterMap(); for (Entry<String, String[]> param : params.entrySet()) { builder.replaceQueryParam(param.getKey(), (Object[]) param.getValue()); } return builder; } }
MolgenisServletUriComponentsBuilder extends ServletUriComponentsBuilder { @SuppressWarnings("RedundantCast") public static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery() { ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentRequest(); Map<String, String[]> params = getCurrentRequest().getParameterMap(); for (Entry<String, String[]> param : params.entrySet()) { builder.replaceQueryParam(param.getKey(), (Object[]) param.getValue()); } return builder; }  }
MolgenisServletUriComponentsBuilder extends ServletUriComponentsBuilder { @SuppressWarnings("RedundantCast") public static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery() { ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentRequest(); Map<String, String[]> params = getCurrentRequest().getParameterMap(); for (Entry<String, String[]> param : params.entrySet()) { builder.replaceQueryParam(param.getKey(), (Object[]) param.getValue()); } return builder; }  @SuppressWarnings("RedundantCast") static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery(); }
MolgenisServletUriComponentsBuilder extends ServletUriComponentsBuilder { @SuppressWarnings("RedundantCast") public static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery() { ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentRequest(); Map<String, String[]> params = getCurrentRequest().getParameterMap(); for (Entry<String, String[]> param : params.entrySet()) { builder.replaceQueryParam(param.getKey(), (Object[]) param.getValue()); } return builder; }  @SuppressWarnings("RedundantCast") static ServletUriComponentsBuilder fromCurrentRequestDecodedQuery();  }