Package org.springframework.web.util

Examples of org.springframework.web.util.UriComponentsBuilder.queryParam()


    return null;
  }

  public static String getAddUrl(Section section, String tag) {
    UriComponentsBuilder builder = UriComponentsBuilder.fromPath("/add-section.jsp");
    builder.queryParam("section", section.getId());
    builder.queryParam("tag", tag);

    return builder.build().toUriString();
  }
View Full Code Here


  }

  public static String getAddUrl(Section section, String tag) {
    UriComponentsBuilder builder = UriComponentsBuilder.fromPath("/add-section.jsp");
    builder.queryParam("section", section.getId());
    builder.queryParam("tag", tag);

    return builder.build().toUriString();
  }

  public static String getAddUrl(Section section) {
View Full Code Here

    return builder.build().toUriString();
  }

  public static String getAddUrl(Section section) {
    UriComponentsBuilder builder = UriComponentsBuilder.fromPath("/add-section.jsp");
    builder.queryParam("section", section.getId());

    return builder.build().toUriString();
  }
}
View Full Code Here

          type = "data";
        }

        // Content-type is a special case
        if ( StringUtils.startsWithIgnoreCase( type, "query" ) ) {
          uri.queryParam( name, value );
        }
        else if ( StringUtils.equalsIgnoreCase( type, "header" ) ) {
          if ( StringUtils.equalsIgnoreCase( "content-type", name ) ) {
            headers.setContentType( MediaType.valueOf( value ) );
          }
View Full Code Here

            case POST:
            case PUT:
              values.add( name, value );
              break;
            default:
              uri.queryParam( name, value );
              break;
          }
        }
        else if ( StringUtils.equalsIgnoreCase( type, "resource" ) ) {
          final FileResource fileResource = fileResourceResolver.resolve( value );
View Full Code Here

      }

      // Build request
      for ( Map.Entry<String, String> parameter : parameters.entrySet() ) {
        if ( !IGNORED_PARAMETERS.contains( parameter.getKey() ) ) {
          uri.queryParam( parameter.getKey(), parameter.getValue() );
        }
      }

      RestTemplate template = new RestTemplate();
      template.setErrorHandler( new LoggingResponseErrorHandler() );
View Full Code Here

  public IResponse geocode(IGeocodeRequest request) {

    UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(ADDRESS_URL);

    for (Map.Entry<String, String> entry : request.getParameters().entrySet())
      builder.queryParam(entry.getKey(), entry.getValue());

    URI uri = builder.build().toUri();

    return restTemplate.getForObject(uri, Response.class);
  }
View Full Code Here

  public IResponse reverseGeocode(IReverseGeocodeRequest request) {

    UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(REVERSE_URL);

    for (Map.Entry<String, String> entry : request.getParameters().entrySet())
      builder.queryParam(entry.getKey(), entry.getValue());

    URI uri = builder.build().toUri();

    return restTemplate.getForObject(uri, Response.class);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.