Package org.springframework.web.util

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


        .getBean(HateoasPageableHandlerMethodArgumentResolver.class);

    UriComponentsBuilder builder = UriComponentsBuilder.newInstance();
    resolver.enhance(builder, null, new PageRequest(0, 9000, Direction.ASC, "firstname"));

    MultiValueMap<String, String> params = builder.build().getQueryParams();

    assertThat(params.containsKey("myPage"), is(true));
    assertThat(params.containsKey("mySort"), is(true));

    assertThat(params.get("mySize"), hasSize(1));
View Full Code Here


      if (pageable != null) {
        resolver.enhance(builder, null, pageable);
      }

      href = builder.build().toString();

      variables = variables.concat(resolver.getPaginationTemplateVariables(null, builder.build()));
    }

    ProjectionDefinitionConfiguration projectionConfiguration = config.projectionConfiguration();
View Full Code Here

        resolver.enhance(builder, null, pageable);
      }

      href = builder.build().toString();

      variables = variables.concat(resolver.getPaginationTemplateVariables(null, builder.build()));
    }

    ProjectionDefinitionConfiguration projectionConfiguration = config.projectionConfiguration();

    if (projectionConfiguration.hasProjectionFor(type)) {
View Full Code Here

        if (tags.length > 0) {
            String tagsString = StringUtils.arrayToDelimitedString(tags, ";");
            builder = builder.queryParam(TAGGED_PARAM, tagsString);
        }

        UriComponents uriComponents = builder.build();

        Questions result = restClient.get(restOperations, uriComponents.toUriString(), Questions.class);

        return result.items;
    }
View Full Code Here

      Object value = iterator.hasNext() ? iterator.next() : null;
      appendToBuilder(builder, variable, value);
    }

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

  /**
   * Expands the {@link UriTemplate} using the given parameters.
   *
 
View Full Code Here

    for (TemplateVariable variable : variables) {
      appendToBuilder(builder, variable, parameters.get(variable.getName()));
    }

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

  /*
   * (non-Javadoc)
   * @see java.lang.Iterable#iterator()
View Full Code Here

    if(null != params) {
      UriComponentsBuilder urib = UriComponentsBuilder.fromUri(requestUri);
      for(Object key : params.keySet()) {
        urib.queryParam(key.toString(), params.get(key));
      }
      requestUri = urib.build().toUri();
    }

    ExtractLinksHelper elh = new ExtractLinksHelper();
    List<Link> links = client.execute(requestUri, HttpMethod.GET, elh, elh);
View Full Code Here

      for (Object key : params.keySet()) {
        Object o = params.get(key);
        ucb.queryParam(key.toString(), encode(o.toString()));
      }
    }
    requestUri = ucb.build().toUri();

    return execute(HttpMethod.GET, null, follow, outputPath);
  }

  /**
 
View Full Code Here

      for (Object key : params.keySet()) {
        Object o = params.get(key);
        ucb.queryParam(key.toString(), encode(o.toString()));
      }
    }
    requestUri = ucb.build().toUri();

    Object obj = null;
    if (null != data) {
      if (data.contains("#{")) {
        obj = contextCmds.eval(data);
View Full Code Here

      for (Object key : params.keySet()) {
        Object o = params.get(key);
        ucb.queryParam(key.toString(), encode(o.toString()));
      }
    }
    requestUri = ucb.build().toUri();

    Object obj;
    if (null != data) {
      if (data.contains("#{")) {
        obj = contextCmds.eval(data);
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.