Package com.sun.jersey.api.client

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


    }

    @Override
    public AssigneeList listAccountAssignees( String accountId, boolean includeProfile ) {
        WebResource resource = getAdminResource().path( "accounts/" + accountId + "/identities" );
        if ( includeProfile ) resource = resource.queryParam( "show_profile", "true" );
        return resource.get( AssigneeList.class );
    }

    @Override
    public Assignee getAccountAssignee( String accountId, String identityId, boolean includeProfile ) {
View Full Code Here


    }

    @Override
    public Assignee getAccountAssignee( String accountId, String identityId, boolean includeProfile ) {
        WebResource resource = getAdminResource().path( "accounts/" + accountId + "/identities/" + identityId );
        if ( includeProfile ) resource = resource.queryParam( "show_profile", "true" );
        return resource.get( Assignee.class );
    }

    @Override
    public void editAccountAssignee( String accountId, String identityId, String newRole ) {
View Full Code Here

                                      boolean showFullInfo ) {
        WebResource resource = getAdminResource().path(
                "accounts/" + accountId + "/storage/" + subscriptionId + "/tokengroups/" + tokenGroupId + "/tokens/"
                + tokenId );
        if ( showFullInfo )
            resource = resource.queryParam( "show_full_info", "true" );
        return resource.get( Token.class );
    }

    @Override
    public void unassignAccountIdentity( String accountId, String identityId ) {
View Full Code Here

    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 ).put( ClientResponse.class, content );
    return ActionResponse.create( clientResponse );
  }
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 ).put( ClientResponse.class, attachment );
    return ActionResponse.create( clientResponse );
  }
View Full Code Here

  @NotNull
  public InputStream query( @NotNull @NonNls String designDocumentId, @NotNull @NonNls String viewId, boolean includeDocs, @Nullable String startKey, @Nullable String endKey ) throws ActionFailedException {
    WebResource viewPath = dbRoot.path( "_design" ).path( designDocumentId ).path( "_view" ).path( viewId );

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

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

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

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

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

    return get( viewPath );
  }
View Full Code Here

        GenericType<JAXBElement<SearchResult>> searchResultType = new GenericType<JAXBElement<SearchResult>>() {
        };

        WebResource workflows = myExperiment.path(WORKFLOWS_PATH);
        if (tag != null) {
            workflows = workflows.queryParam("tag", tag);
        }
        LOG.debug("Querying myExperiments for workflows with tag [{}]", tag);
        return workflows.queryParam("elements", QUERY_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE)
            .get(searchResultType).getValue().getWorkflows();
    }
View Full Code Here

        WebResource workflows = myExperiment.path(WORKFLOWS_PATH);
        if (tag != null) {
            workflows = workflows.queryParam("tag", tag);
        }
        LOG.debug("Querying myExperiments for workflows with tag [{}]", tag);
        return workflows.queryParam("elements", QUERY_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE)
            .get(searchResultType).getValue().getWorkflows();
    }

    /**
     * Lists all workflows.
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.