Package com.sun.jersey.api.client

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


    WebResource resource = dbRoot
      .path( docId.asString() );

    //Add the revision is necessary
    if ( revision != null ) {
      resource = resource.queryParam( PARAM_REV, revision.asString() );
    }

    ClientResponse clientResponse = resource
      .type( mediaType ).accept( JSON_TYPE )
      .put( ClientResponse.class, content );
View Full Code Here


      .path( docId.asString() )
      .path( attachmentId.asString() );

    //Add the revision is necessary
    if ( revision != null ) {
      resource = resource.queryParam( PARAM_REV, revision.asString() );
    }

    ClientResponse clientResponse = resource
      .type( mediaType )
      .accept( JSON_TYPE )
View Full Code Here

  public InputStream query( @Nonnull ViewDescriptor viewDescriptor, boolean includeDocs, @Nullable Key startKey, @Nullable Key endKey ) throws ActionFailedException {
    WebResource viewPath = dbRoot.path( "_design" ).path( viewDescriptor.getDesignDocumentId() ).path( "_view" ).path( viewDescriptor.getViewId() );

    if ( startKey != null ) {
      viewPath = viewPath.queryParam( "startkey", startKey.getJson() );
    }
    if ( endKey != null ) {
      viewPath = viewPath.queryParam( "endkey", endKey.getJson() );
    }
View Full Code Here

    if ( startKey != null ) {
      viewPath = viewPath.queryParam( "startkey", startKey.getJson() );
    }
    if ( endKey != null ) {
      viewPath = viewPath.queryParam( "endkey", endKey.getJson() );
    }

    if ( includeDocs ) {
      viewPath = viewPath.queryParam( "include_docs", "true" );
    }
View Full Code Here

    if ( endKey != null ) {
      viewPath = viewPath.queryParam( "endkey", endKey.getJson() );
    }

    if ( includeDocs ) {
      viewPath = viewPath.queryParam( "include_docs", "true" );
    }

    return get( viewPath );
  }
View Full Code Here

        webResource = addOptionalQueryParam(webResource, "marker",
                options.getMarker());
        webResource = addOptionalQueryParam(webResource, "maxresults",
                options.getMaxResults(), 0);
        if (options.isIncludeMetadata()) {
            webResource = webResource.queryParam("include", "metadata");
        }

        Builder builder = webResource.header("x-ms-version", API_VERSION);

        return builder.get(ListQueuesResult.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.