List of usage examples for org.springframework.web.util UriComponentsBuilder queryParam
@Override
public UriComponentsBuilder queryParam(String name, @Nullable Collection<?> values)
From source file:com.pepaproch.gtswsdlclient.impl.AvailabilityCheckByPhoneQueryBuilderImpl.java
@Override public UriComponents buildQuery(String phoneNumber) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url); if (phoneNumber != null) { builder.queryParam(PHONE_FIELD_NAME, phoneNumber); }/*from ww w .j a va 2s . c o m*/ return builder.build(); }
From source file:com.pepaproch.gtswsdlclient.impl.AvailabilityCheckQueryBuilderImpl.java
@Override public UriComponents buildQuery(String addrId) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url); if (addrId != null && !addrId.isEmpty()) { builder.queryParam("uirAdr", addrId); }// w w w . j a va2 s . c o m return builder.build(); }
From source file:net.shibboleth.idp.cas.protocol.ServiceTicketResponse.java
public String getRedirectUrl() { final UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(service); if (saml) {/* ww w. j a va2 s . c om*/ builder.queryParam(SamlParam.SAMLart.name(), ticket); } else { builder.queryParam(ProtocolParam.Ticket.id(), ticket); } return builder.build().toUriString(); }
From source file:com.orange.clara.cloud.cf.servicebroker.log.infrastructure.SplunkDashboardUrlFactory.java
@Override public String getAllAppsDashboardUrl() { UriComponentsBuilder urlBuilder = UriComponentsBuilder.fromHttpUrl(logServerUrl); urlBuilder.path(SEARCH_PATH);// ww w . j a va2s . c o m urlBuilder.queryParam("q", "search index=\"*\" source=\"tcp:12345\""); return urlBuilder.build().encode().toUriString(); }
From source file:org.kamranzafar.spring.wpapi.client.BaseService.java
protected URI buildUri(String uri, Map<String, String> params) { UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(uri); params.forEach((k, v) -> uriComponentsBuilder.queryParam(k, v)); return uriComponentsBuilder.build().toUri(); }
From source file:com.github.tddts.jet.rest.client.esi.impl.RouteClientImpl.java
@Override @Retry/*from www. j ava2s . c o m*/ public RestResponse<List<Integer>> getRoute(int origin, int destination, int[] avoid, int[] connections, RouteOption routeOption) { UriComponentsBuilder builder = client.apiUriBuilder(addressRoutes); if (connections.length > 0) builder = builder.queryParam("avoid", StringUtils.join(avoid, ',')); if (avoid.length > 0) builder = builder.queryParam("connections", StringUtils.join(connections, ',')); String url = builder.queryParam("flag", routeOption.getValue()).build().toString(); Map<String, ?> uriVariables = ImmutableMap.of("origin", origin, "destination", destination); return RestResponse .fromArrayResponse(client.restOperations().getForEntity(url, Integer[].class, uriVariables)); }
From source file:com.playhaven.android.req.CustomEventRequest.java
@Override protected UriComponentsBuilder createUrl(Context context) throws PlayHavenException { UriComponentsBuilder builder = super.createUrl(context); String json = customEvents.toJSONString(); builder.queryParam(PARAM_DATA, json); builder.queryParam(PARAM_TYPE, PARAM_TYPE_VALUE); builder.queryParam(PARAM_VERSION, PARAM_VERSION_VALUE); try {/*from w w w .ja v a2 s. com*/ SharedPreferences pref = PlayHaven.getPreferences(context); builder.queryParam(PARAM_DATA_SIG, createHmac(pref, json, true)); } catch (Exception e) { throw new PlayHavenException("Unable to create signature for events", e); } return builder; }
From source file:org.openlmis.notification.web.BaseWebIntegrationTest.java
private URI buildUri(String url, Map<String, ?> params) { UriComponentsBuilder builder = UriComponentsBuilder.newInstance().uri(URI.create(url)); params.entrySet().forEach(e -> builder.queryParam(e.getKey(), e.getValue())); return builder.build(true).toUri(); }
From source file:com.pepaproch.gtswsdlclient.impl.AddrCheckQueryBuilderImpl.java
@Override public UriComponents buildQuery(AddressQuery addresQuery) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url); if (addresQuery.getCity() != null && !addresQuery.getCity().isEmpty()) { builder.queryParam("city", addresQuery.getCity()); }//from w ww . j a v a 2 s.c om if (addresQuery.getHouseNumberReg() != null) { builder.queryParam("houseNumberReg", addresQuery.getHouseNumberReg()); } if (addresQuery.getHouseNumberOr() != null) { builder.queryParam("houseNumberOr", addresQuery.getHouseNumberOr()); } if (addresQuery.getStreet() != null && !addresQuery.getStreet().isEmpty()) { builder.queryParam("street", addresQuery.getStreet()); } if (addresQuery.getZipCode() != null) { builder.queryParam("zipCode", addresQuery.getZipCode()); } return builder.build(); }
From source file:ca.qhrtech.services.implementations.BGGServiceImpl.java
private URI buildUriForLink(long bggId) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(BASE_BGG_URL + END_POINT_LINK); builder.queryParam("id", bggId); builder.queryParam("type", "boardgame"); return builder.build().encode().toUri(); }