Examples of queryParams()


Examples of com.sun.jersey.api.client.WebResource.queryParams()

    @Override
  public void delete(MultivaluedMap<String, String> queryString, String... pathElements) throws CreateSendException {
        WebResource resource = authorisedResourceFactory.getResource(client, pathElements);
       
        if( queryString != null )
          resource = resource.queryParams(queryString);
       
        try {
            resource.delete();
        } catch (UniformInterfaceException ue) {
            throw handleErrorResponse(ue, defaultDeserialiser);
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

        return rr;
    }

    public static RestResponse delete(String address, Map<String, Object> payload) {
        WebResource webResource = JERSEY_CLIENT.resource(address);
        ClientResponse cr = webResource.queryParams(buildMultivalueMap(payload))
                .cookie(new Cookie(REST_TOKEN_COOKIE, getRestToken()))
                .accept(RESPONSE_TYPE).delete(ClientResponse.class);
        checkStatusForSuccess(cr);
        return RestResponse.getRestResponse(cr);
    }
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

      MultivaluedMap<String, String> params = new MultivaluedMapImpl();
      for ( Map.Entry<String, String> paramEntry : options.getParams().entrySet() ) {
        params.putSingle( paramEntry.getKey(), paramEntry.getValue() );
      }

      viewPath = viewPath.queryParams( params );
    }

    return get( viewPath );
  }
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

      MultivaluedMap<String, String> params = new MultivaluedMapImpl();
      for ( Map.Entry<String, String> paramEntry : options.getParams().entrySet() ) {
        params.putSingle( paramEntry.getKey(), paramEntry.getValue() );
      }

      viewPath = viewPath.queryParams( params );
    }

    return get( viewPath );
  }
}
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

        ResourceFactory resourceFactory, ErrorDeserialiser<?> errorDeserialiser,
        String... pathElements) throws CreateSendException {
        WebResource resource = resourceFactory.getResource(client, pathElements);
       
        if(queryString != null) {
            resource = resource.queryParams(queryString);
        }
       
        try {
            return fixStringResult(klass, resource.get(klass));
        } catch (UniformInterfaceException ue) {
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

       
        addPagingParams(queryString, page, pageSize, orderField, orderDirection);
       
        try {
            if(queryString != null) {
                resource = resource.queryParams(queryString);
            }
           
            return resource.get(new GenericType<PagedResult<T>>(getGenericReturnType()));
        } catch (UniformInterfaceException ue) {
            throw handleErrorResponse(ue, defaultDeserialiser);
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

    private void put(Object entity, MultivaluedMap<String, String> queryString, ErrorDeserialiser<?> errorDeserialiser,
        String... pathElements) throws CreateSendException {
        WebResource resource = authorisedResourceFactory.getResource(client, pathElements);
       
        if(queryString != null) {
            resource = resource.queryParams(queryString);
        }
       
        try {
            resource.
                type(MediaType.APPLICATION_JSON_TYPE).
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

    @Override
  public void delete(MultivaluedMap<String, String> queryString, String... pathElements) throws CreateSendException {
        WebResource resource = authorisedResourceFactory.getResource(client, pathElements);
       
        if( queryString != null )
          resource = resource.queryParams(queryString);
       
        try {
            resource.delete();
        } catch (UniformInterfaceException ue) {
            throw handleErrorResponse(ue, defaultDeserialiser);
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

        return rr;
    }

    public static RestResponse delete(String address, Map<String, Object> payload) {
        WebResource webResource = JERSEY_CLIENT.resource(address);
        ClientResponse cr = webResource.queryParams(buildMultivalueMap(payload))
                .cookie(new Cookie(REST_TOKEN_COOKIE, getRestToken()))
                .accept(RESPONSE_TYPE).delete(ClientResponse.class);
        checkStatusForSuccess(cr);
        return RestResponse.getRestResponse(cr);
    }
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.queryParams()

    Collection<Integer> filterOpen(Collection<Integer> ids) {
        String url = SERVER_URL + RESOURCE_URL + "filter";
        WebResource webResource = client.resource(url);
        MultivaluedMap queryParams = new MultivaluedMapImpl();
        queryParams.add("ids", CommunicationHelper.pack(ids));
        String result = webResource.queryParams(queryParams).get(String.class);
       
        Integer[] filteredArray = CommunicationHelper.unpack(result);
        return  new HashSet(Arrays.asList(filteredArray));
    }
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.