Package javax.ws.rs.client

Examples of javax.ws.rs.client.WebTarget.queryParam()


    if (params != null) {
      for (Map.Entry<String, List<String>> param : params.entrySet()) {
        String key = param.getKey();
        List<String> value = param.getValue();
        if (value != null && !value.isEmpty() && value.get(0) != null) {
          target = target.queryParam(key, value.toArray());
          sigParams.put(key, value.get(0));
        }
      }
    }
View Full Code Here


    private Builder getInvocationBuilder() throws Exception {
        Client client = customizeClient(ClientBuilder.newClient());
        client.register(new HttpBasicAuthFilter(getUserName(), getPassword()));
        WebTarget target = client.target(getUrl());
        for (Map.Entry<String, String> e : getQueryParams().entrySet()) {
            target = target.queryParam(e.getKey(), e.getValue());
        }
        return target.request(getResponseBodyMediaType()).header("X-Include-Resource-Links", "true").header("X-Requested-By", "MyClient");
    }

    protected Client customizeClient(Client client) {
View Full Code Here

    Annotation[][] parameterAnnotations = method.getParameterAnnotations();
    for( int i = 0; i < parameterAnnotations.length; i++ ) {
      Annotation[] annotations = parameterAnnotations[ i ];
      String paramName = extractQueryParam( annotations );
      if( paramName != null ) {
        result = result.queryParam( paramName, parameter[ i ] );
      }
    }
    return result;
  }
View Full Code Here

  @Override
  public WebTarget getWebTarget(final NameServerSetListCommand command,
      final CommandMetaData commandMetaData) {
    WebTarget resolvedNameServerSetListTarget = nameServerSetListTarget;
    if (command.getSearchStatus() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchStatus", command.getSearchStatus());
    }
    if (command.getSearchName() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchName", command.getSearchName());
View Full Code Here

    if (command.getSearchStatus() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchStatus", command.getSearchStatus());
    }
    if (command.getSearchName() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchName", command.getSearchName());
    }
    if (command.getSearchNameServerInterfaceSetId() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchNameServerInterfaceSetId",
View Full Code Here

    if (command.getSearchName() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchName", command.getSearchName());
    }
    if (command.getSearchNameServerInterfaceSetId() != null) {
      resolvedNameServerSetListTarget = resolvedNameServerSetListTarget
          .queryParam("searchNameServerInterfaceSetId",
              command.getSearchNameServerInterfaceSetId());
    }
    return resolvedNameServerSetListTarget;
  }
View Full Code Here

  @Override
  public WebTarget getWebTarget(final UserListCommand command,
      final CommandMetaData commandMetaData) {
    WebTarget resolvedUserListTarget = userListTarget;
    if (command.getSearchUsername() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchUsername", command.getSearchUsername());
    }
    if (command.getSearchStatus() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchStatus", command.getSearchStatus());
View Full Code Here

    if (command.getSearchUsername() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchUsername", command.getSearchUsername());
    }
    if (command.getSearchStatus() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchStatus", command.getSearchStatus());
    }
    if (command.getSearchName() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchName", command.getSearchName());
View Full Code Here

    if (command.getSearchStatus() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchStatus", command.getSearchStatus());
    }
    if (command.getSearchName() != null) {
      resolvedUserListTarget = resolvedUserListTarget.queryParam(
          "searchName", command.getSearchName());
    }
    return resolvedUserListTarget;
  }
View Full Code Here

  @Override
  public WebTarget getWebTarget(final ZoneListCommand command,
      final CommandMetaData commandMetaData) {
    WebTarget resolvedZoneListTarget = zoneListTarget;
    if (command.getSearchName() != null) {
      resolvedZoneListTarget = resolvedZoneListTarget.queryParam(
          "searchName", command.getSearchName());
    }
    if (command.getSearchNameSearchType() != null) {
      resolvedZoneListTarget = resolvedZoneListTarget.queryParam(
          "searchNameSearchType", command.getSearchNameSearchType());
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.