airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1407479 - in /airavata/sandbox/airavata-registry-rest: ./ src/main/java/org/apache/airavata/services/registry/rest/client/ src/main/java/org/apache/airavata/services/registry/rest/utils/
Date Fri, 09 Nov 2012 15:00:51 GMT
Author: chathuri
Date: Fri Nov  9 15:00:50 2012
New Revision: 1407479

URL: http://svn.apache.org/viewvc?rev=1407479&view=rev
Log:
adding configuration resource client

Added:
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
Modified:
    airavata/sandbox/airavata-registry-rest/pom.xml
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/ResourcePathConstants.java

Modified: airavata/sandbox/airavata-registry-rest/pom.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/pom.xml?rev=1407479&r1=1407478&r2=1407479&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/pom.xml (original)
+++ airavata/sandbox/airavata-registry-rest/pom.xml Fri Nov  9 15:00:50 2012
@@ -82,10 +82,9 @@
 			<version>${jersey.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-client</artifactId>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-client</artifactId>
 			<version>${jersey.version}</version>
-			<scope>test</scope>
 		</dependency>
         <dependency>
             <groupId>mysql</groupId>

Added: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java?rev=1407479&view=auto
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
(added)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
Fri Nov  9 15:00:50 2012
@@ -0,0 +1,462 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.services.registry.rest.client;
+
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.config.ClientConfig;
+import com.sun.jersey.api.client.config.DefaultClientConfig;
+import com.sun.jersey.api.json.JSONConfiguration;
+import com.sun.jersey.core.util.MultivaluedMapImpl;
+import org.apache.airavata.services.registry.rest.resourcemappings.ConfigurationList;
+import org.apache.airavata.services.registry.rest.resourcemappings.URLList;
+import org.apache.airavata.services.registry.rest.utils.ResourcePathConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.UriBuilder;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConfigurationResourceClient {
+    private static WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(ConfigurationResourceClient.class);
+
+    private static URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private static WebResource getConfigurationBaseResource (){
+        ClientConfig config = new DefaultClientConfig();
+        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
+                Boolean.TRUE);
+        Client client = Client.create(config);
+        WebResource baseWebResource = client.resource(getBaseURI());
+        webResource = baseWebResource.path(ResourcePathConstants.ConfigResourcePathConstants.CONFIGURATION_REGISTRY_RESOURCE);
+        return webResource;
+    }
+
+
+    public static Object getConfiguration(String configKey) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_CONFIGURATION);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("key", configKey);
+        ClientResponse response = webResource.queryParams(queryParams).get(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+        String output = response.getEntity(String.class);
+        return output;
+    }
+
+    public static List<Object> getConfigurationList (String configKey) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_CONFIGURATION_LIST);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("key", configKey);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+        List<Object> configurationValueList = new ArrayList<Object>();
+        ConfigurationList entity = response.getEntity(ConfigurationList.class);
+        Object[] configValList = entity.getConfigValList();
+        for(Object configVal : configValList){
+            String[] strings = configVal.toString().split("=");
+            String configurationValue = strings[2].substring(0, strings[2].length() - 1);
+            System.out.println(configurationValue);
+            configurationValueList.add(configurationValue);
+        }
+
+        return configurationValueList;
+    }
+
+    public static void setConfiguration (String configKey, String configVal, String date){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.SAVE_CONFIGURATION);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("key", configKey);
+        formData.add("value", configVal);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void addConfiguration(String configKey, String configVal, String date){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.UPDATE_CONFIGURATION);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("key", configKey);
+        formData.add("value", configVal);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void removeAllConfiguration(String key){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_CONFIGURATION);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("key", key);
+        ClientResponse response = webResource.queryParams(queryParams).delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+
+    }
+
+    public static void removeConfiguration(String key, String value){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_CONFIGURATION);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("key", key);
+        queryParams.add("value", value);
+        ClientResponse response = webResource.queryParams(queryParams).delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static List<URI> getGFacURIs(){
+        List<URI> uriList = new ArrayList<URI>();
+        try{
+            webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_GFAC_URI_LIST);
+            ClientResponse response = webResource.get(ClientResponse.class);
+            int status = response.getStatus();
+
+            if (status != 200) {
+                logger.error("Failed : HTTP error code : " + status);
+                throw new RuntimeException("Failed : HTTP error code : "
+                        + status);
+            }
+
+            URLList urlList = response.getEntity(URLList.class);
+            String[] uris = urlList.getUris();
+            for (String url: uris){
+                URI uri = new URI(url);
+                uriList.add(uri);
+            }
+        } catch (URISyntaxException e) {
+            logger.error("URI syntax is not correct...");
+            return null;
+        }
+        return uriList;
+    }
+
+    public static List<URI> getWorkflowInterpreterURIs(){
+        List<URI> uriList = new ArrayList<URI>();
+        try{
+            webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_WFINTERPRETER_URI_LIST);
+            ClientResponse response = webResource.get(ClientResponse.class);
+            int status = response.getStatus();
+
+            if (status != 200) {
+                logger.error("Failed : HTTP error code : " + status);
+                throw new RuntimeException("Failed : HTTP error code : "
+                        + status);
+            }
+
+            URLList urlList = response.getEntity(URLList.class);
+            String[] uris = urlList.getUris();
+            for (String url: uris){
+                URI uri = new URI(url);
+                uriList.add(uri);
+            }
+        } catch (URISyntaxException e) {
+            return null;
+        }
+        return uriList;
+    }
+
+
+    public static URI getEventingURI(){
+        try{
+            webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_EVENTING_URI);
+            ClientResponse response = webResource.get(ClientResponse.class);
+            int status = response.getStatus();
+
+            if (status != 200) {
+                logger.error("Failed : HTTP error code : " + status);
+                throw new RuntimeException("Failed : HTTP error code : "
+                        + status);
+            }
+
+            String uri = response.getEntity(String.class);
+            URI eventingURI = new URI(uri);
+            return eventingURI;
+        } catch (URISyntaxException e) {
+            return null;
+        }
+    }
+
+    public static URI getMsgBoxURI(){
+        try{
+            webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.GET_MESSAGE_BOX_URI);
+            ClientResponse response = webResource.get(ClientResponse.class);
+            int status = response.getStatus();
+
+            if (status != 200) {
+                logger.error("Failed : HTTP error code : " + status);
+                throw new RuntimeException("Failed : HTTP error code : "
+                        + status);
+            }
+
+            String uri = response.getEntity(String.class);
+            URI msgBoxURI = new URI(uri);
+            return msgBoxURI;
+        } catch (URISyntaxException e) {
+            return null;
+        }
+    }
+
+    public static void addGFacURI(String uri) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_GFAC_URI);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void addWFInterpreterURI(String uri) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_WFINTERPRETER_URI);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void setEventingURI(String uri) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_EVENTING_URI);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void setMessageBoxURI(String uri) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_MESSAGE_BOX_URI);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void addGFacURIByDate(String uri, String date) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_GFAC_URI_DATE);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void addWorkflowInterpreterURI(String uri, String date) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_WFINTERPRETER_URI_DATE);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void setEventingURIByDate(String uri, String date) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_EVENTING_URI_DATE);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void setMessageBoxURIByDate(String uri, String date) {
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.ADD_MSG_BOX_URI_DATE);
+        MultivaluedMap formData = new MultivaluedMapImpl();
+        formData.add("uri", uri);
+        formData.add("date", date);
+
+        ClientResponse response = webResource.type(MediaType.TEXT_PLAIN).post(ClientResponse.class,
formData);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void removeGFacURI(String uri){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_GFAC_URI);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("uri", uri);
+        ClientResponse response = webResource.queryParams(queryParams).delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void removeAllGFacURI(){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_GFAC_URIS);
+        ClientResponse response = webResource.delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void removeWorkflowInterpreterURI(String uri){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_WFINTERPRETER_URI);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("uri", uri);
+        ClientResponse response = webResource.queryParams(queryParams).delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void removeAllWorkflowInterpreterURI(){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_WFINTERPRETER_URIS);
+        ClientResponse response = webResource.delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void unsetEventingURI(){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_EVENTING_URI);
+        ClientResponse response = webResource.delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public static void unsetMessageBoxURI(){
+        webResource = getConfigurationBaseResource().path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_MSG_BOX_URI);
+        ClientResponse response = webResource.delete(ClientResponse.class);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+}

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/ResourcePathConstants.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/ResourcePathConstants.java?rev=1407479&r1=1407478&r2=1407479&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/ResourcePathConstants.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/ResourcePathConstants.java
Fri Nov  9 15:00:50 2012
@@ -25,7 +25,7 @@ public class ResourcePathConstants {
 
 
     public final class ConfigResourcePathConstants {
-        public static final String CONFIGURATION_REGISTRY_RESOURCE = "/registry/api/congfigregistry";
+        public static final String CONFIGURATION_REGISTRY_RESOURCE = "/registry/api/congfigregistry/";
         public static final String GET_CONFIGURATION = "get/configuration";
         public static final String GET_CONFIGURATION_LIST = "get/configurationlist";
         public static final String SAVE_CONFIGURATION = "save/configuration";
@@ -53,7 +53,7 @@ public class ResourcePathConstants {
     }
 
     public final class DecResourcePathConstants {
-        public static final String DESC_RESOURCE_PATH = "/registry/api/descriptors";
+        public static final String DESC_RESOURCE_PATH = "/registry/api/descriptors/";
         public static final String HOST_DESC_EXISTS = "hostdescriptor/exist";
         public static final String HOST_DESC_SAVE = "hostdescriptor/save";
         public static final String HOST_DESC_UPDATE = "hostdescriptor/update";
@@ -79,7 +79,7 @@ public class ResourcePathConstants {
     }
 
     public final class ExperimentResourcePathConstants {
-        public static final String EXP_RESOURCE_PATH  =  "/registry/api/experimentregistry";
+        public static final String EXP_RESOURCE_PATH  =  "/registry/api/experimentregistry/";
         public static final String DELETE_EXP = "delete/experiment";
         public static final String GET_APP_EXPS = "get/experiments/all" ;
         public static final String GET_EXPS_BY_PROJECT = "get/experiments/project" ;
@@ -91,7 +91,7 @@ public class ResourcePathConstants {
     }
 
     public final class ProjectResourcePathConstants {
-        public static final String REGISTRY_API_PROJECTREGISTRY = "/registry/api/projectregistry";
+        public static final String REGISTRY_API_PROJECTREGISTRY = "/registry/api/projectregistry/";
         public static final String PROJECT_EXIST = "project/exist";
         public static final String PROJECT_EXIST_CREATE = "project/exist";
         public static final String ADD_PROJECT = "add/project";
@@ -103,7 +103,7 @@ public class ResourcePathConstants {
 
     public final class ProvenanceResourcePathConstants {
 
-        public static final String REGISTRY_API_PROVENANCEREGISTRY = "/registry/api/provenanceregistry";
+        public static final String REGISTRY_API_PROVENANCEREGISTRY = "/registry/api/provenanceregistry/";
         public static final String UPDATE_EXPERIMENT = "update/experiment";
         public static final String GET_EXPERIMENT_EXECUTIONUSER = "get/experiment/executionuser";
         public static final String GET_EXPERIMENT_NAME = "get/experiment/name";
@@ -143,7 +143,7 @@ public class ResourcePathConstants {
 
     public final class PublishedWFConstants {
 
-        public static final String REGISTRY_API_PUBLISHWFREGISTRY = "/registry/api/publishwfregistry";
+        public static final String REGISTRY_API_PUBLISHWFREGISTRY = "/registry/api/publishwfregistry/";
         public static final String PUBLISHWF_EXIST = "publishwf/exist";
         public static final String PUBLISH_WORKFLOW = "publish/workflow";
         public static final String PUBLISH_DEFAULT_WORKFLOW = "publish/default/workflow";
@@ -155,7 +155,7 @@ public class ResourcePathConstants {
 
     public final class UserWFConstants {
 
-        public static final String REGISTRY_API_USERWFREGISTRY = "/registry/api/userwfregistry";
+        public static final String REGISTRY_API_USERWFREGISTRY = "/registry/api/userwfregistry/";
         public static final String WORKFLOW_EXIST = "workflow/exist";
         public static final String ADD_WORKFLOW = "add/workflow";
         public static final String UPDATE_WORKFLOW = "update/workflow";



Mime
View raw message