Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.pepaproch.gtswsdlclient.impl; import com.pepaproch.gtswsdl.QueryBuilder; import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; /** * * @author pepa */ public class AvailabilityCheckQueryBuilderImpl implements QueryBuilder<String> { private final String url; public AvailabilityCheckQueryBuilderImpl(String url) { this.url = url; } @Override public UriComponents buildQuery(String addrId) { UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url); if (addrId != null && !addrId.isEmpty()) { builder.queryParam("uirAdr", addrId); } return builder.build(); } }