airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1408798 [2/7] - in /airavata/trunk/modules/airavata-rest-services: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/airavata/ src/main/java/org/apache/airavata/services/ src/main/java/o...
Date Tue, 13 Nov 2012 15:52:19 GMT
Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ExperimentResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ExperimentResourceClient.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ExperimentResourceClient.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ExperimentResourceClient.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,228 @@
+/*
+ *
+ * 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.registry.api.AiravataExperiment;
+import org.apache.airavata.services.registry.rest.resourcemappings.ExperimentList;
+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.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ExperimentResourceClient {
+    private WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentResourceClient.class);
+
+    private URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private WebResource getExperimentRegistryBaseResource (){
+        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.ExperimentResourcePathConstants.EXP_RESOURCE_PATH);
+        return webResource;
+    }
+
+    public void addExperiment(String projectName, AiravataExperiment experiment){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.ADD_EXP);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("projectName", projectName);
+        formParams.add("experimentID", experiment.getExperimentId());
+        formParams.add("submittedDate", experiment.getSubmittedDate().toString());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void removeExperiment(String experimentId){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.DELETE_EXP);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        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 List<AiravataExperiment> getExperiments(){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.GET_ALL_EXPS);
+        ClientResponse response = webResource.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);
+        }
+
+        ExperimentList experimentList = response.getEntity(ExperimentList.class);
+        AiravataExperiment[] experiments = experimentList.getExperiments();
+        List<AiravataExperiment>  airavataExperiments = new ArrayList<AiravataExperiment>();
+        for (AiravataExperiment airavataExperiment : experiments){
+            airavataExperiments.add(airavataExperiment);
+        }
+        return airavataExperiments;
+    }
+
+    public List<AiravataExperiment> getExperiments(String projectName){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.GET_EXPS_BY_PROJECT);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("projectName", projectName);
+
+        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);
+        }
+
+        ExperimentList experimentList = response.getEntity(ExperimentList.class);
+        AiravataExperiment[] experiments = experimentList.getExperiments();
+
+        List<AiravataExperiment>  airavataExperiments = new ArrayList<AiravataExperiment>();
+        for (AiravataExperiment airavataExperiment : experiments){
+            airavataExperiments.add(airavataExperiment);
+        }
+        return airavataExperiments;
+    }
+
+    public List<AiravataExperiment> getExperiments(Date from, Date to){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.GET_EXPS_BY_DATE);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("fromDate", from.toString());
+        queryParams.add("toDate", to.toString());
+
+        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);
+        }
+
+        ExperimentList experimentList = response.getEntity(ExperimentList.class);
+        AiravataExperiment[] experiments = experimentList.getExperiments();
+
+        List<AiravataExperiment>  airavataExperiments = new ArrayList<AiravataExperiment>();
+        for (AiravataExperiment airavataExperiment : experiments){
+            airavataExperiments.add(airavataExperiment);
+        }
+        return airavataExperiments;
+    }
+
+    public List<AiravataExperiment> getExperiments(String projectName, Date from, Date to){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.GET_EXPS_PER_PROJECT_BY_DATE);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("projectName", projectName);
+        queryParams.add("fromDate", from.toString());
+        queryParams.add("toDate", to.toString());
+
+        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);
+        }
+
+        ExperimentList experimentList = response.getEntity(ExperimentList.class);
+        AiravataExperiment[] experiments = experimentList.getExperiments();
+
+        List<AiravataExperiment>  airavataExperiments = new ArrayList<AiravataExperiment>();
+        for (AiravataExperiment airavataExperiment : experiments){
+            airavataExperiments.add(airavataExperiment);
+        }
+        return airavataExperiments;
+    }
+
+    public boolean isExperimentExists(String experimentId){
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.EXP_EXISTS);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        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);
+        }else {
+            return true;
+        }
+    }
+
+    public boolean isExperimentExists(String experimentId, boolean createIfNotPresent){
+        String createStatus = "false";
+        webResource = getExperimentRegistryBaseResource().path(ResourcePathConstants.ExperimentResourcePathConstants.EXP_EXISTS_CREATE);
+        if (createIfNotPresent){
+            createStatus = "true";
+        }
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("experimentId", experimentId );
+        formParams.add("createIfNotPresent", createStatus );
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }else {
+            return true;
+        }
+    }
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProjectResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProjectResourceClient.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProjectResourceClient.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProjectResourceClient.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,182 @@
+/*
+ *
+ * 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.registry.api.WorkspaceProject;
+import org.apache.airavata.services.registry.rest.resourcemappings.WorkspaceProjectList;
+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.util.ArrayList;
+import java.util.List;
+
+public class ProjectResourceClient {
+    private WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(ProjectResourceClient.class);
+
+    private URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private WebResource getProjectRegistryBaseResource (){
+        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.ProjectResourcePathConstants.REGISTRY_API_PROJECTREGISTRY);
+        return webResource;
+    }
+
+    public boolean isWorkspaceProjectExists(String projectName){
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.PROJECT_EXIST);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("projectName", projectName);
+        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);
+        } else {
+            return true;
+        }
+    }
+
+    public boolean isWorkspaceProjectExists(String projectName, boolean createIfNotExists){
+        String createStatus = "false";
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.PROJECT_EXIST);
+        if (createIfNotExists){
+            createStatus = "true";
+        }
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("projectName", projectName );
+        formParams.add("createIfNotExists", createStatus );
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }else {
+            return true;
+        }
+    }
+
+    public void addWorkspaceProject(String projectName){
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.ADD_PROJECT);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("projectName", projectName );
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkspaceProject(String projectName){
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.UPDATE_PROJECT);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("projectName", projectName );
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void  deleteWorkspaceProject(String projectName){
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.DELETE_PROJECT);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("projectName", projectName);
+        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 WorkspaceProject getWorkspaceProject(String projectName) {
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.GET_PROJECT);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("projectName", projectName);
+        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);
+        }
+
+        WorkspaceProject workspaceProject = response.getEntity(WorkspaceProject.class);
+        return workspaceProject;
+    }
+
+    public List<WorkspaceProject> getWorkspaceProjects(){
+        webResource = getProjectRegistryBaseResource().path(ResourcePathConstants.ProjectResourcePathConstants.GET_PROJECTS);
+        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);
+        }
+
+        WorkspaceProjectList workspaceProjectList = response.getEntity(WorkspaceProjectList.class);
+        WorkspaceProject[] workspaceProjects = workspaceProjectList.getWorkspaceProjects();
+        List<WorkspaceProject> workspaceProjectsList = new ArrayList<WorkspaceProject>();
+        for (WorkspaceProject workspaceProject : workspaceProjects){
+            workspaceProjectsList.add(workspaceProject);
+        }
+        return workspaceProjectsList;
+    }
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProvenanceResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProvenanceResourceClient.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProvenanceResourceClient.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/ProvenanceResourceClient.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,688 @@
+/*
+ *
+ * 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.registry.api.impl.ExperimentDataImpl;
+import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.services.registry.rest.resourcemappings.ExperimentDataList;
+import org.apache.airavata.services.registry.rest.resourcemappings.ExperimentIDList;
+import org.apache.airavata.services.registry.rest.resourcemappings.WorkflowInstancesList;
+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.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ProvenanceResourceClient {
+    private WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(ProvenanceResourceClient.class);
+
+    private URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private WebResource getProvenanceRegistryBaseResource (){
+        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.ProvenanceResourcePathConstants.REGISTRY_API_PROVENANCEREGISTRY);
+        return webResource;
+    }
+
+    public void updateExperimentExecutionUser(String experimentId, String user){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_EXPERIMENT_EXECUTIONUSER);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("experimentId", experimentId);
+        formParams.add("user", user);
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public String getExperimentExecutionUser(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_EXECUTIONUSER);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 executionUser = response.getEntity(String.class);
+        return executionUser;
+    }
+
+    public boolean isExperimentNameExist(String experimentName){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.EXPERIMENTNAME_EXISTS);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentName", experimentName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+        return true;
+    }
+
+    public String getExperimentName(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_NAME);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 experimentName = response.getEntity(String.class);
+        return experimentName;
+    }
+
+    public void updateExperimentName(String experimentId, String experimentName){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_EXPERIMENTNAME);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("experimentId", experimentId);
+        formParams.add("experimentName", experimentName);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+
+    }
+
+    public String getExperimentMetadata(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENTMETADATA);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 experimentMetadata = response.getEntity(String.class);
+        return experimentMetadata;
+    }
+
+    public void updateExperimentMetadata(String experimentId, String metadata){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_EXPERIMENTMETADATA);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("experimentId", experimentId);
+        formParams.add("metadata", metadata);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public String getWorkflowExecutionTemplateName(String workflowInstanceId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWTEMPLATENAME);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstanceId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 workflowTemplateName = response.getEntity(String.class);
+        return workflowTemplateName;
+    }
+
+    public void setWorkflowInstanceTemplateName(String workflowInstanceId, String templateName){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWINSTANCETEMPLATENAME);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowInstanceId);
+        formParams.add("templateName", templateName);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public List<WorkflowInstance> getExperimentWorkflowInstances(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENTWORKFLOWINSTANCES);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        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);
+        }
+
+        WorkflowInstancesList workflowInstancesList = response.getEntity(WorkflowInstancesList.class);
+        WorkflowInstance[] workflowInstances = workflowInstancesList.getWorkflowInstances();
+        List<WorkflowInstance> workflowInstanceList = new ArrayList<WorkflowInstance>();
+
+        for (WorkflowInstance workflowInstance : workflowInstances){
+            workflowInstanceList.add(workflowInstance);
+        }
+
+        return workflowInstanceList;
+    }
+
+    public boolean isWorkflowInstanceExists(String instanceId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.WORKFLOWINSTANCE_EXIST_CHECK);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("instanceId", instanceId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+        return true;
+    }
+
+    public boolean isWorkflowInstanceExists(String instanceId, boolean createIfNotPresent){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.WORKFLOWINSTANCE_NODE_EXIST_CREATE);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("instanceId", instanceId);
+        formParams.add("createIfNotPresent", createIfNotPresent);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+        return true;
+    }
+
+    public void updateWorkflowInstanceStatus(String instanceId, WorkflowInstanceStatus.ExecutionStatus executionStatus){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWINSTANCESTATUS_INSTANCEID);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("instanceId", instanceId);
+        formParams.add("executionStatus", executionStatus.name());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflowInstanceStatus(WorkflowInstanceStatus workflowInstanceStatus){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWINSTANCESTATUS);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowInstanceStatus.getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("executionStatus", workflowInstanceStatus.getExecutionStatus().name());
+        formParams.add("statusUpdateTime", workflowInstanceStatus.getStatusUpdateTime().toString());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public WorkflowInstanceStatus getWorkflowInstanceStatus(String instanceId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWINSTANCESTATUS);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("instanceId", instanceId);
+        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);
+        }
+
+        WorkflowInstanceStatus workflowInstanceStatus = response.getEntity(WorkflowInstanceStatus.class);
+        return workflowInstanceStatus;
+    }
+
+    public void updateWorkflowNodeInput(WorkflowInstanceNode node, String data){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODEINPUT);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("nodeID", node.getNodeId());
+        formParams.add("workflowInstanceId", node.getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("data", data);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflowNodeOutput(WorkflowInstanceNode node, String data){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODEOUTPUT);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("nodeID", node.getNodeId());
+        formParams.add("workflowInstanceId", node.getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("data", data);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public ExperimentData getExperiment(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        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);
+        }
+
+        ExperimentDataImpl experimentData = response.getEntity(ExperimentDataImpl.class);
+        return experimentData;
+    }
+
+    public ExperimentData getExperimentMetaInformation(String experimentId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_METAINFORMATION);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("experimentId", experimentId);
+        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);
+        }
+
+        ExperimentDataImpl experimentData = response.getEntity(ExperimentDataImpl.class);
+        return experimentData;
+    }
+
+    public List<ExperimentData> getAllExperimentMetaInformation(String user){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_ALL_EXPERIMENT_METAINFORMATION);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("user", user);
+        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);
+        }
+
+        ExperimentDataList experimentDataList = response.getEntity(ExperimentDataList.class);
+        List<ExperimentDataImpl> dataList = experimentDataList.getExperimentDataList();
+        List<ExperimentData> experimentDatas = new ArrayList<ExperimentData>();
+        for (ExperimentDataImpl experimentData : dataList){
+            experimentDatas.add(experimentData);
+        }
+        return experimentDatas;
+    }
+
+    public List<ExperimentData> searchExperiments(String user, String experimentNameRegex){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.SEARCH_EXPERIMENTS);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("user", user);
+        queryParams.add("experimentNameRegex", experimentNameRegex);
+        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);
+        }
+
+        ExperimentDataList experimentDataList = response.getEntity(ExperimentDataList.class);
+        List<ExperimentDataImpl> dataList = experimentDataList.getExperimentDataList();
+        List<ExperimentData> experimentDatas = new ArrayList<ExperimentData>();
+        for (ExperimentDataImpl experimentData : dataList){
+            experimentDatas.add(experimentData);
+        }
+        return experimentDatas;
+    }
+
+    public List<String> getExperimentIdByUser(String user){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_ID_USER);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("username", user);
+        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);
+        }
+
+        ExperimentIDList experimentIDList = response.getEntity(ExperimentIDList.class);
+        List<String> experimentIDs = experimentIDList.getExperimentIDList();
+        return experimentIDs;
+    }
+
+    public List<ExperimentData> getExperimentByUser(String user){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_USER);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("username", user);
+        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);
+        }
+        ExperimentDataList experimentDataList = response.getEntity(ExperimentDataList.class);
+        List<ExperimentDataImpl> dataList = experimentDataList.getExperimentDataList();
+        List<ExperimentData> experimentDatas = new ArrayList<ExperimentData>();
+        for (ExperimentDataImpl experimentData : dataList){
+            experimentDatas.add(experimentData);
+        }
+        return experimentDatas;
+    }
+
+    public void updateWorkflowNodeStatus(WorkflowInstanceNodeStatus workflowStatusNode){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODE_STATUS);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("nodeId", workflowStatusNode.getWorkflowInstanceNode().getNodeId());
+        formParams.add("executionStatus", workflowStatusNode.getExecutionStatus().name());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflowNodeStatus(String workflowInstanceId, String nodeId, WorkflowInstanceStatus.ExecutionStatus executionStatus){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODE_STATUS);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowInstanceId);
+        formParams.add("nodeId", nodeId);
+        formParams.add("executionStatus", executionStatus.name());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode, WorkflowInstanceStatus.ExecutionStatus executionStatus){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODE_STATUS);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowNode.getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("nodeId", workflowNode.getNodeId());
+        formParams.add("executionStatus", executionStatus.name());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public WorkflowInstanceNodeStatus getWorkflowNodeStatus(WorkflowInstanceNode workflowNode){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWNODE_STATUS);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowNode.getWorkflowInstance().getWorkflowInstanceId());
+        queryParams.add("nodeId", workflowNode.getNodeId());
+        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);
+        }
+
+        WorkflowInstanceNodeStatus workflowInstanceNodeStatus = response.getEntity(WorkflowInstanceNodeStatus.class);
+        return workflowInstanceNodeStatus;
+    }
+
+    public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWNODE_STARTTIME);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowNode.getWorkflowInstance().getWorkflowInstanceId());
+        queryParams.add("nodeId", workflowNode.getNodeId());
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 wfNodeStartTime = response.getEntity(String.class);
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date formattedDate = dateFormat.parse(wfNodeStartTime);
+            return formattedDate;
+        } catch (ParseException e) {
+            logger.error("Error in date format...", e);
+            return null;
+        }
+    }
+
+    public Date getWorkflowStartTime(WorkflowInstance workflowInstance){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOW_STARTTIME);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstance.getWorkflowInstanceId());
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 wfStartTime = response.getEntity(String.class);
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date formattedDate = dateFormat.parse(wfStartTime);
+            return formattedDate;
+        } catch (ParseException e) {
+            logger.error("Error in date format...", e);
+            return null;
+        }
+    }
+
+    public void updateWorkflowNodeGramData(WorkflowNodeGramData workflowNodeGramData){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODE_GRAMDATA);
+        ClientResponse response = webResource.type(MediaType.APPLICATION_JSON).accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, workflowNodeGramData);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public WorkflowInstanceData getWorkflowInstanceData(String workflowInstanceId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_WORKFLOWINSTANCEDATA);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstanceId);
+        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);
+        }
+
+        WorkflowInstanceData workflowInstanceData = response.getEntity(WorkflowInstanceData.class);
+        return workflowInstanceData;
+    }
+
+    public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.WORKFLOWINSTANCE_NODE_EXIST);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstanceId);
+        queryParams.add("nodeId", nodeId);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+        return true;
+    }
+
+    public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId, boolean createIfNotPresent){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.WORKFLOWINSTANCE_NODE_EXIST_CREATE);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstanceId);
+        queryParams.add("nodeId", nodeId);
+        queryParams.add("createIfNotPresent", createIfNotPresent);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+        return true;
+    }
+
+    public WorkflowInstanceNodeData getWorkflowInstanceNodeData(String workflowInstanceId, String nodeId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.WORKFLOWINSTANCE_NODE_DATA);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowInstanceId", workflowInstanceId);
+        queryParams.add("nodeId", nodeId);
+        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);
+        }
+
+        WorkflowInstanceNodeData workflowInstanceNodeData = response.getEntity(WorkflowInstanceNodeData.class);
+        return workflowInstanceNodeData;
+    }
+
+    public void addWorkflowInstance(String experimentId, String workflowInstanceId, String templateName){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.ADD_WORKFLOWINSTANCE);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("experimentId", experimentId);
+        formParams.add("workflowInstanceId", workflowInstanceId);
+        formParams.add("templateName", templateName);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODETYPE);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", node.getWorkflowInstance().getWorkflowInstanceId());
+        formParams.add("nodeId", node.getNodeId());
+        formParams.add("nodeType", type.getNodeType().name());
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void addWorkflowInstanceNode(String workflowInstance, String nodeId){
+        webResource = getProvenanceRegistryBaseResource().path(ResourcePathConstants.ProvenanceResourcePathConstants.ADD_WORKFLOWINSTANCENODE);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowInstanceId", workflowInstance);
+        formParams.add("nodeId", nodeId);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+}

Added: 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=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/PublishedWorkflowResourceClient.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,181 @@
+/*
+ *
+ * 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.PublishWorkflowNamesList;
+import org.apache.airavata.services.registry.rest.resourcemappings.Workflow;
+import org.apache.airavata.services.registry.rest.resourcemappings.WorkflowList;
+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.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PublishedWorkflowResourceClient {
+    private WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(PublishedWorkflowResourceClient.class);
+
+    private URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private WebResource getPublishedWFRegistryBaseResource (){
+        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.PublishedWFConstants.REGISTRY_API_PUBLISHWFREGISTRY);
+        return webResource;
+    }
+
+    public boolean isPublishedWorkflowExists(String workflowName){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.PUBLISHWF_EXIST);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowname", workflowName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+
+        return true;
+    }
+
+    public void publishWorkflow(String workflowName, String publishWorkflowName){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.PUBLISH_WORKFLOW);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowName", workflowName);
+        formParams.add("publishWorkflowName", publishWorkflowName);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void publishWorkflow(String workflowName){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.PUBLISH_DEFAULT_WORKFLOW);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowName", workflowName);
+
+        ClientResponse response = webResource.accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+
+    }
+
+    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);
+        int status = response.getStatus();
+
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+
+        String wfGraph = response.getEntity(String.class);
+        return wfGraph;
+
+    }
+
+    public List<String> getPublishedWorkflowNames(){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.GET_PUBLISHWORKFLOWNAMES);
+        ClientResponse response = webResource.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);
+        }
+
+        PublishWorkflowNamesList workflowNamesList = response.getEntity(PublishWorkflowNamesList.class);
+        List<String> publishWorkflowNames = workflowNamesList.getPublishWorkflowNames();
+        return publishWorkflowNames;
+    }
+
+    public Map<String, String> getPublishedWorkflows(){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.GET_PUBLISHWORKFLOWS);
+        ClientResponse response = webResource.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);
+        }
+
+        Map<String, String> publishWFmap = new HashMap<String, String>();
+        WorkflowList workflowList = response.getEntity(WorkflowList.class);
+        List<Workflow> workflows = workflowList.getWorkflowList();
+
+        for (Workflow workflow : workflows){
+            publishWFmap.put(workflow.getWorkflowName(), workflow.getWorkflowGraph());
+        }
+
+        return publishWFmap;
+    }
+
+    public void removePublishedWorkflow(String workflowName){
+        webResource = getPublishedWFRegistryBaseResource().path(ResourcePathConstants.PublishedWFConstants.REMOVE_PUBLISHWORKFLOW);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowname", workflowName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/UserWorkflowResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/UserWorkflowResourceClient.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/UserWorkflowResourceClient.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/client/UserWorkflowResourceClient.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,163 @@
+/*
+ *
+ * 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.Workflow;
+import org.apache.airavata.services.registry.rest.resourcemappings.WorkflowList;
+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.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class UserWorkflowResourceClient {
+    private WebResource webResource;
+    private final static Logger logger = LoggerFactory.getLogger(UserWorkflowResourceClient.class);
+
+    private URI getBaseURI() {
+        logger.info("Creating Base URI");
+        return UriBuilder.fromUri("http://localhost:9080/airavata-services/").build();
+    }
+
+    private com.sun.jersey.api.client.WebResource getUserWFRegistryBaseResource (){
+        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.UserWFConstants.REGISTRY_API_USERWFREGISTRY);
+        return webResource;
+    }
+
+    public boolean isWorkflowExists(String workflowName){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.WORKFLOW_EXIST);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowname", workflowName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+
+        return true;
+    }
+
+    public void addWorkflow(String workflowName, String workflowGraphXml){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.ADD_WORKFLOW);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowName", workflowName);
+        formParams.add("workflowGraphXml", workflowGraphXml);
+
+        ClientResponse response = webResource.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public void updateWorkflow(String workflowName, String workflowGraphXml){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.UPDATE_WORKFLOW);
+        MultivaluedMap formParams = new MultivaluedMapImpl();
+        formParams.add("workflowName", workflowName);
+        formParams.add("workflowGraphXml", workflowGraphXml);
+
+        ClientResponse response = webResource.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.TEXT_PLAIN).post(ClientResponse.class, formParams);
+        int status = response.getStatus();
+        if (status != 200) {
+            logger.error("Failed : HTTP error code : " + status);
+            throw new RuntimeException("Failed : HTTP error code : "
+                    + status);
+        }
+    }
+
+    public String getWorkflowGraphXML(String workflowName){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.GET_WORKFLOWGRAPH);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowname", workflowName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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 worlflowGraph = response.getEntity(String.class);
+        return worlflowGraph;
+    }
+
+    public Map<String, String> getWorkflows(){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.GET_WORKFLOWS);
+        ClientResponse response = webResource.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);
+        }
+
+        Map<String, String> userWFMap = new HashMap<String, String>();
+        WorkflowList workflowList = response.getEntity(WorkflowList.class);
+        List<Workflow> workflows = workflowList.getWorkflowList();
+
+        for (Workflow workflow : workflows){
+            userWFMap.put(workflow.getWorkflowName(), workflow.getWorkflowGraph());
+        }
+
+        return userWFMap;
+    }
+
+    public void removeWorkflow(String workflowName){
+        webResource = getUserWFRegistryBaseResource().path(ResourcePathConstants.UserWFConstants.REMOVE_WORKFLOW);
+        MultivaluedMap queryParams = new MultivaluedMapImpl();
+        queryParams.add("workflowname", workflowName);
+        ClientResponse response = webResource.queryParams(queryParams).accept(MediaType.TEXT_PLAIN).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);
+        }
+    }
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptor.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptor.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptor.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,173 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "application")
+public class ApplicationDescriptor {
+    private String name;
+    private String hostdescName;
+//    private String serviceName;
+    private String executablePath;
+    private String workingDir;
+    private String jobType;
+    private String projectNumber;
+    private String queueName;
+    private int maxWallTime;
+    private int cpuCount;
+    private int nodeCount;
+    private int processorsPerNode;
+    private int minMemory;
+    private int maxMemory;
+    private String applicationDescType;
+    private ServiceDescriptor serviceDescriptor;
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getHostdescName() {
+        return hostdescName;
+    }
+
+    public void setHostdescName(String hostdescName) {
+        this.hostdescName = hostdescName;
+    }
+
+//    public String getServiceName() {
+//        return serviceName;
+//    }
+//
+//    public void setServiceName(String serviceName) {
+//        this.serviceName = serviceName;
+//    }
+
+    public String getExecutablePath() {
+        return executablePath;
+    }
+
+    public void setExecutablePath(String executablePath) {
+        this.executablePath = executablePath;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public String getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(String jobType) {
+        this.jobType = jobType;
+    }
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+
+    public String getQueueName() {
+        return queueName;
+    }
+
+    public void setQueueName(String queueName) {
+        this.queueName = queueName;
+    }
+
+    public int getMaxWallTime() {
+        return maxWallTime;
+    }
+
+    public void setMaxWallTime(int maxWallTime) {
+        this.maxWallTime = maxWallTime;
+    }
+
+    public int getCpuCount() {
+        return cpuCount;
+    }
+
+    public void setCpuCount(int cpuCount) {
+        this.cpuCount = cpuCount;
+    }
+
+    public int getNodeCount() {
+        return nodeCount;
+    }
+
+    public void setNodeCount(int nodeCount) {
+        this.nodeCount = nodeCount;
+    }
+
+    public int getProcessorsPerNode() {
+        return processorsPerNode;
+    }
+
+    public void setProcessorsPerNode(int processorsPerNode) {
+        this.processorsPerNode = processorsPerNode;
+    }
+
+    public int getMinMemory() {
+        return minMemory;
+    }
+
+    public void setMinMemory(int minMemory) {
+        this.minMemory = minMemory;
+    }
+
+    public int getMaxMemory() {
+        return maxMemory;
+    }
+
+    public void setMaxMemory(int maxMemory) {
+        this.maxMemory = maxMemory;
+    }
+
+    public String getApplicationDescType() {
+        return applicationDescType;
+    }
+
+    public void setApplicationDescType(String applicationDescType) {
+        this.applicationDescType = applicationDescType;
+    }
+
+    public ServiceDescriptor getServiceDescriptor() {
+        return serviceDescriptor;
+    }
+
+    public void setServiceDescriptor(ServiceDescriptor serviceDescriptor) {
+        this.serviceDescriptor = serviceDescriptor;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptorList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptorList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptorList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ApplicationDescriptorList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,20 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ApplicationDescriptorList {
+    private ApplicationDescriptor[] applicationDescriptors = new ApplicationDescriptor[]{};
+
+    public ApplicationDescriptorList() {
+    }
+
+    public ApplicationDescriptor[] getApplicationDescriptors() {
+        return applicationDescriptors;
+    }
+
+    public void setApplicationDescriptors(ApplicationDescriptor[] applicationDescriptors) {
+        this.applicationDescriptors = applicationDescriptors;
+    }
+}
+

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ConfigurationList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ConfigurationList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ConfigurationList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ConfigurationList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,17 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ConfigurationList {
+
+    private Object[] configValList = new Object[]{};
+
+    public Object[] getConfigValList() {
+        return configValList;
+    }
+
+    public void setConfigValList(Object[] configValList) {
+        this.configValList = configValList;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/DescriptorNameList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/DescriptorNameList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/DescriptorNameList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/DescriptorNameList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class DescriptorNameList {
+    private List<String> descriptorNames = new ArrayList<String>();
+
+    public DescriptorNameList() {
+    }
+
+    public List<String> getDescriptorNames() {
+        return descriptorNames;
+    }
+
+    public void setDescriptorNames(List<String> descriptorNames) {
+        this.descriptorNames = descriptorNames;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentDataList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentDataList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentDataList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentDataList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class ExperimentDataList {
+    private List<ExperimentDataImpl> experimentDataList = new ArrayList<ExperimentDataImpl>();
+
+    public ExperimentDataList() {
+    }
+
+    public List<ExperimentDataImpl> getExperimentDataList() {
+        return experimentDataList;
+    }
+
+    public void setExperimentDataList(List<ExperimentDataImpl> experimentDataList) {
+        this.experimentDataList = experimentDataList;
+    }
+}
+

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentIDList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentIDList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentIDList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentIDList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement(name = "experiments")
+public class ExperimentIDList {
+    List<String> experimentIDList = new ArrayList<String>();
+
+    public ExperimentIDList() {
+    }
+
+    public List<String> getExperimentIDList() {
+        return experimentIDList;
+    }
+
+    public void setExperimentIDList(List<String> experimentIDList) {
+        this.experimentIDList = experimentIDList;
+    }
+}



Mime
View raw message