You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2012/11/14 22:33:24 UTC
svn commit: r1409423 - in
/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest:
client/PublishedWorkflowResourceClient.java
resources/PublishWorkflowRegistryResource.java
Author: chathuri
Date: Wed Nov 14 21:33:24 2012
New Revision: 1409423
URL: http://svn.apache.org/viewvc?rev=1409423&view=rev
Log:
updating publish workflow client methods
Modified:
airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java
airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/PublishWorkflowRegistryResource.java
Modified: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java?rev=1409423&r1=1409422&r2=1409423&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java (original)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java Wed Nov 14 21:33:24 2012
@@ -111,8 +111,8 @@ public class PublishedWorkflowResourceCl
public String getPublishedWorkflowGraphXML(String workflowName){
webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.GET_PUBLISHWORKFLOWGRAPH);
MultivaluedMap queryParams = new MultivaluedMapImpl();
- queryParams.add("workflowname", workflowName);
- ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).get(ClientResponse.class);
+ queryParams.add("workflowName", workflowName);
+ ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.APPLICATION_FORM_URLENCODED).get(ClientResponse.class);
int status = response.getStatus();
if (status != 200) {
@@ -167,7 +167,7 @@ public class PublishedWorkflowResourceCl
public void removePublishedWorkflow(String workflowName){
webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.REMOVE_PUBLISHWORKFLOW);
MultivaluedMap queryParams = new MultivaluedMapImpl();
- queryParams.add("workflowname", workflowName);
+ queryParams.add("workflowName", workflowName);
ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).delete(ClientResponse.class);
int status = response.getStatus();
Modified: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/PublishWorkflowRegistryResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/PublishWorkflowRegistryResource.java?rev=1409423&r1=1409422&r2=1409423&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/PublishWorkflowRegistryResource.java (original)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/PublishWorkflowRegistryResource.java Wed Nov 14 21:33:24 2012
@@ -151,7 +151,7 @@ public class PublishWorkflowRegistryReso
*/
@GET
@Path(ResourcePathConstants.PublishedWFConstants.GET_PUBLISHWORKFLOWGRAPH)
- @Produces(MediaType.TEXT_PLAIN)
+ @Produces(MediaType.APPLICATION_FORM_URLENCODED)
public Response getPublishedWorkflowGraphXML(@QueryParam("workflowName") String workflowName) {
airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
try{
@@ -211,7 +211,7 @@ public class PublishWorkflowRegistryReso
*/
@GET
@Path(ResourcePathConstants.PublishedWFConstants.GET_PUBLISHWORKFLOWS)
- @Produces(MediaType.TEXT_PLAIN)
+ @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response getPublishedWorkflows() {
airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
try{
@@ -247,7 +247,7 @@ public class PublishWorkflowRegistryReso
* @param workflowName published workflow name
* @return HTTP response
*/
- @GET
+ @DELETE
@Path(ResourcePathConstants.PublishedWFConstants.REMOVE_PUBLISHWORKFLOW)
@Produces(MediaType.TEXT_PLAIN)
public Response removePublishedWorkflow(@QueryParam("workflowName") String workflowName) {