airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1420463 - in /airavata/trunk/modules: registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ registry/registry-api/src...
Date Tue, 11 Dec 2012 22:22:02 GMT
Author: chathuri
Date: Tue Dec 11 22:21:58 2012
New Revision: 1420463

URL: http://svn.apache.org/viewvc?rev=1420463&view=rev
Log:
fixing issues in registry browser view

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
    airavata/trunk/modules/rest/webapp/pom.xml
    airavata/trunk/modules/rest/webapp/src/main/webapp/WEB-INF/web.xml

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
Tue Dec 11 22:21:58 2012
@@ -104,7 +104,7 @@ public class ExperimentDataRetriever {
     private void fillWorkflowInstanceData (ExperimentData experimentData,
                                                            ResultSet rs,
                                                            List<WorkflowInstance> workflowInstances)
throws SQLException, ExperimentLazyLoadedException, ParseException {
-        WorkflowInstanceData workflowInstanceData = experimentData.getWorkflowInstance(rs.getString(5));
+        WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)experimentData.getWorkflowInstance(rs.getString(5));
         if (workflowInstanceData == null){
             WorkflowInstance workflowInstance = new WorkflowInstance(experimentData.getExperimentId(),
rs.getString(5));
             workflowInstance.setTemplateName(rs.getString(6));

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
Tue Dec 11 22:21:58 2012
@@ -42,7 +42,7 @@ public class ExperimentDataImpl implemen
 	private String experimentId;
 	private String metadata;
 	private String workflowInstanceName;
-	private List<WorkflowInstanceData> workflowInstanceDataList=new ArrayList<WorkflowInstanceData>();
+	private List<WorkflowInstanceDataImpl> workflowInstanceDataList=new ArrayList<WorkflowInstanceDataImpl>();
 	private boolean lazyLoaded=false;
 
     public ExperimentDataImpl() {
@@ -162,7 +162,7 @@ public class ExperimentDataImpl implemen
     }
 
     @Override
-	public List<WorkflowInstanceData> getWorkflowInstanceData() throws ExperimentLazyLoadedException{
+	public List<WorkflowInstanceDataImpl> getWorkflowInstanceData() throws ExperimentLazyLoadedException{
 		if (isLazyLoaded()){
 			throw new ExperimentLazyLoadedException(getExperimentId());
 		}

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
Tue Dec 11 22:21:58 2012
@@ -24,6 +24,7 @@ package org.apache.airavata.registry.api
 import java.util.List;
 
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
+import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -45,7 +46,7 @@ public interface ExperimentData extends 
 //	public WorkflowIOData getOutput(String nodeId);
 	public String getMetadata();
 	public String getExperimentName();
-	public List<WorkflowInstanceData> getWorkflowInstanceData() throws ExperimentLazyLoadedException;
+	public List<WorkflowInstanceDataImpl> getWorkflowInstanceData() throws ExperimentLazyLoadedException;
 	
 	public void setExperimentId(String experimentId);
 	public void setTopic(String topic);

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
Tue Dec 11 22:21:58 2012
@@ -22,9 +22,14 @@ package org.apache.airavata.registry.api
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
 import java.util.Date;
 import java.util.List;
 
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
 public interface WorkflowInstanceData {
     public WorkflowInstance getWorkflowInstance() throws ExperimentLazyLoadedException;
     public List<WorkflowInstanceNodeData> getNodeDataList() throws ExperimentLazyLoadedException;

Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java
(original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/ProvenanceResourceClient.java
Tue Dec 11 22:21:58 2012
@@ -30,6 +30,7 @@ import com.sun.jersey.api.json.JSONConfi
 import com.sun.jersey.core.util.MultivaluedMapImpl;
 import org.apache.airavata.registry.api.PasswordCallback;
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
 import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.rest.mappings.resourcemappings.ExperimentDataList;
 import org.apache.airavata.rest.mappings.resourcemappings.ExperimentIDList;
@@ -1282,7 +1283,7 @@ public class ProvenanceResourceClient {
             }
         }
 
-        WorkflowInstanceData workflowInstanceData = response.getEntity(WorkflowInstanceData.class);
+        WorkflowInstanceDataImpl workflowInstanceData = response.getEntity(WorkflowInstanceDataImpl.class);
         return workflowInstanceData;
     }
 

Modified: airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
(original)
+++ airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
Tue Dec 11 22:21:58 2012
@@ -25,6 +25,7 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
 import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.rest.mappings.resourcemappings.ExperimentDataList;
 import org.apache.airavata.rest.mappings.resourcemappings.ExperimentIDList;
@@ -459,7 +460,8 @@ public class ProvenanceRegistryResource 
         try {
             DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             Date formattedDate = dateFormat.parse(statusUpdateTime);
-            WorkflowInstance workflowInstance = airavataRegistry.getWorkflowInstanceData(workflowInstanceId).getWorkflowInstance();
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
+            WorkflowInstance workflowInstance = workflowInstanceData.getWorkflowInstance();
             WorkflowInstanceStatus.ExecutionStatus status = WorkflowInstanceStatus.ExecutionStatus.valueOf(executionStatus);
             WorkflowInstanceStatus workflowInstanceStatus = new WorkflowInstanceStatus(workflowInstance,
status, formattedDate);
             airavataRegistry.updateWorkflowInstanceStatus(workflowInstanceStatus);
@@ -474,10 +476,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
@@ -533,7 +531,7 @@ public class ProvenanceRegistryResource 
                                             @FormParam("data") String data) {
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceID);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceID);
             WorkflowInstanceNode workflowInstanceNode = workflowInstanceData.getNodeData(nodeID).getWorkflowInstanceNode();
             airavataRegistry.updateWorkflowNodeInput(workflowInstanceNode, data);
             Response.ResponseBuilder builder = Response.status(Response.Status.OK);
@@ -543,11 +541,7 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
-        } finally {
+        }  finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
             }
@@ -571,7 +565,7 @@ public class ProvenanceRegistryResource 
                                              @FormParam("data") String data) {
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceID);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceID);
             WorkflowInstanceNode workflowInstanceNode = workflowInstanceData.getNodeData(nodeID).getWorkflowInstanceNode();
             airavataRegistry.updateWorkflowNodeOutput(workflowInstanceNode, data);
             Response.ResponseBuilder builder = Response.status(Response.Status.OK);
@@ -581,10 +575,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
@@ -908,7 +898,7 @@ public class ProvenanceRegistryResource 
                                           @QueryParam("nodeId") String nodeId) {
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
             WorkflowInstanceNode workflowInstanceNode = workflowInstanceData.getNodeData(nodeId).getWorkflowInstanceNode();
             WorkflowInstanceNodeStatus workflowNodeStatus = airavataRegistry.getWorkflowNodeStatus(workflowInstanceNode);
             if (workflowNodeStatus != null) {
@@ -923,10 +913,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
@@ -948,7 +934,7 @@ public class ProvenanceRegistryResource 
                                              @QueryParam("nodeId") String nodeId) {
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
             WorkflowInstanceNode workflowInstanceNode = workflowInstanceData.getNodeData(nodeId).getWorkflowInstanceNode();
             Date workflowNodeStartTime = airavataRegistry.getWorkflowNodeStartTime(workflowInstanceNode);
             if (workflowNodeStartTime != null) {
@@ -963,10 +949,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
@@ -986,7 +968,7 @@ public class ProvenanceRegistryResource 
     public Response getWorkflowStartTime(@QueryParam("workflowInstanceId") String workflowInstanceId)
{
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
             WorkflowInstance workflowInstance = workflowInstanceData.getWorkflowInstance();
             Date workflowStartTime = airavataRegistry.getWorkflowStartTime(workflowInstance);
             if (workflowStartTime != null) {
@@ -1001,10 +983,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);
@@ -1053,7 +1031,7 @@ public class ProvenanceRegistryResource 
     public Response getWorkflowInstanceData(@QueryParam("workflowInstanceId") String workflowInstanceId)
{
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
-            WorkflowInstanceData workflowInstanceData = airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
             if (workflowInstanceData != null) {
                 Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                 builder.entity(workflowInstanceData);
@@ -1231,8 +1209,9 @@ public class ProvenanceRegistryResource 
                                            @FormParam("nodeType") String nodeType) {
         AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
         try {
+            WorkflowInstanceDataImpl workflowInstanceData = (WorkflowInstanceDataImpl)airavataRegistry.getWorkflowInstanceData(workflowInstanceId);
             WorkflowInstanceNodeData workflowInstanceNodeData =
-                    airavataRegistry.getWorkflowInstanceData(workflowInstanceId).getNodeData(nodeId);
+                    workflowInstanceData.getNodeData(nodeId);
             WorkflowInstanceNode workflowInstanceNode =
                     workflowInstanceNodeData.getWorkflowInstanceNode();
             WorkflowNodeType workflowNodeType = new WorkflowNodeType();
@@ -1248,10 +1227,6 @@ public class ProvenanceRegistryResource 
             Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
             builder.entity(e.getMessage());
             return builder.build();
-        } catch (ExperimentLazyLoadedException e) {
-            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
-            builder.entity(e.getMessage());
-            return builder.build();
         } finally {
             if (airavataRegistry != null) {
                 RegPoolUtils.releaseRegistry(context, airavataRegistry);

Modified: airavata/trunk/modules/rest/webapp/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/webapp/pom.xml?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/rest/webapp/pom.xml (original)
+++ airavata/trunk/modules/rest/webapp/pom.xml Tue Dec 11 22:21:58 2012
@@ -204,7 +204,7 @@
 	<properties>
 		<jersey.version>1.13</jersey.version>
 		<grizzly.version>2.0.0-M3</grizzly.version>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<!--project.build.sourceEncoding>UTF-8</project.build.sourceEncoding-->
 		<cargo.version>1.2.1</cargo.version>
 		<!-- if you want a remote debugging on a different a address override on 
 			command line with -Dcargo.debug.addres=xxxx -->

Modified: airavata/trunk/modules/rest/webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/webapp/src/main/webapp/WEB-INF/web.xml?rev=1420463&r1=1420462&r2=1420463&view=diff
==============================================================================
--- airavata/trunk/modules/rest/webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ airavata/trunk/modules/rest/webapp/src/main/webapp/WEB-INF/web.xml Tue Dec 11 22:21:58
2012
@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- This web.xml file is not required when using Servlet 3.0 container,
      see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html#d4e194
-->
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="WebApp_ID" version="2.5">
     <listener>
       <listener-class>org.apache.airavata.rest.mappings.utils.RegistryListener</listener-class>
     </listener>



Mime
View raw message