airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1420352 - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/impl/ registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ registry/airavata-jpa-registry/src/main/ja...
Date Tue, 11 Dec 2012 19:31:49 GMT
Author: chathuri
Date: Tue Dec 11 19:31:45 2012
New Revision: 1420352

URL: http://svn.apache.org/viewvc?rev=1420352&view=rev
Log:
direct access to WorkflowInstance from ExperimentData

Added:
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java
      - copied, changed from r1420318, airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    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/ProvenanceRegistry.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/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/ProvenanceRegistryResource.java
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java?rev=1420352&r1=1420351&r2=1420352&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
(original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
Tue Dec 11 19:31:45 2012
@@ -28,7 +28,6 @@ import java.util.Map;
 import org.apache.airavata.client.AiravataClient;
 import org.apache.airavata.client.api.AiravataAPIInvocationException;
 import org.apache.airavata.client.api.ProvenanceManager;
-import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.AiravataExperiment;
 import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1420352&r1=1420351&r2=1420352&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
Tue Dec 11 19:31:45 2012
@@ -68,27 +68,11 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.exception.gateway.MalformedDescriptorException;
 import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowAlreadyExistsException;
 import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.UserWorkflowAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.UserWorkflowDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkflowInstanceAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkflowInstanceDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkflowInstanceNodeAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkflowInstanceNodeDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkspaceProjectAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkspaceProjectDoesNotExistsException;
-import org.apache.airavata.registry.api.workflow.ExperimentData;
-import org.apache.airavata.registry.api.workflow.WorkflowIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstance;
+import org.apache.airavata.registry.api.exception.worker.*;
+import org.apache.airavata.registry.api.impl.WorkflowInstanceDataImpl;
+import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNode;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeGramData;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType;
 import org.apache.xmlbeans.XmlException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -1288,16 +1272,23 @@ public class AiravataJPARegistry extends
 		if (!isWorkflowInstanceExists(workflowInstanceId,true)){
 			throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
 		}
-		WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
-		WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(), resource.getWorkflowInstanceID());
-        workflowInstance.setTemplateName(resource.getTemplateName());
-		WorkflowInstanceData workflowInstanceData = new WorkflowInstanceData(null, workflowInstance,
new WorkflowInstanceStatus(workflowInstance, resource.getStatus()==null? null:ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()),
null);
-		List<NodeDataResource> nodeData = resource.getNodeData();
-		for (NodeDataResource nodeDataResource : nodeData) {
-			workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId,
nodeDataResource.getNodeID()));
-		}
-		return workflowInstanceData;
-	}
+		try{
+            WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
+            WorkflowInstance workflowInstance = new WorkflowInstance(resource.getExperimentID(),
resource.getWorkflowInstanceID());
+            workflowInstance.setTemplateName(resource.getTemplateName());
+            ExperimentData experimentData = getExperiment(workflowInstanceId);
+//            WorkflowInstanceData workflowInstanceData = experimentData.getWorkflowInstance(workflowInstanceId);
+            WorkflowInstanceData workflowInstanceData = new WorkflowInstanceDataImpl(null,
workflowInstance, new WorkflowInstanceStatus(workflowInstance, resource.getStatus()==null?
null:ExecutionStatus.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
+            List<NodeDataResource> nodeData = resource.getNodeData();
+            for (NodeDataResource nodeDataResource : nodeData) {
+                workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId,
nodeDataResource.getNodeID()));
+            }
+            return workflowInstanceData;
+        } catch (ExperimentLazyLoadedException e) {
+            throw new RegistryException(e);
+        }
+
+    }
 
 
 	@Override

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=1420352&r1=1420351&r2=1420352&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 19:31:45 2012
@@ -23,6 +23,7 @@ package org.apache.airavata.persistance.
 
 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.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
 import org.slf4j.Logger;
@@ -112,7 +113,7 @@ public class ExperimentDataRetriever {
             workflowInstances.add(workflowInstance);
             Date lastUpdateDate = getTime(rs.getString(9));
             String wdStatus = rs.getString(7);
-            workflowInstanceData = new WorkflowInstanceData(null,
+            workflowInstanceData = new WorkflowInstanceDataImpl(null,
                     workflowInstance, new WorkflowInstanceStatus(workflowInstance,
                     createExecutionStatus(wdStatus),lastUpdateDate), null);
             workflowInstanceData.setExperimentData((ExperimentDataImpl)experimentData);

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java?rev=1420352&r1=1420351&r2=1420352&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
Tue Dec 11 19:31:45 2012
@@ -25,18 +25,9 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.airavata.registry.api.exception.RegistryException;
-import org.apache.airavata.registry.api.workflow.ExperimentData;
-import org.apache.airavata.registry.api.workflow.WorkflowIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstance;
+import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNode;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeGramData;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
 
 public interface ProvenanceRegistry extends AiravataSubRegistry{
 

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=1420352&r1=1420351&r2=1420352&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 19:31:45 2012
@@ -22,14 +22,12 @@
 package org.apache.airavata.registry.api.impl;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.workflow.ExperimentData;
-import org.apache.airavata.registry.api.workflow.WorkflowIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
-import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
+import org.apache.airavata.registry.api.workflow.*;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -64,7 +62,38 @@ public class ExperimentDataImpl implemen
 	public String getExperimentId() {
 		return experimentId;
 	}
-	public void setExperimentId(String experimentId) {
+
+    @Override
+    public String getWorkflowInstanceId() throws ExperimentLazyLoadedException {
+           return getWorkflowInstanceData().get(0).getWorkflowInstanceId();
+    }
+
+    @Override
+    public String getTemplateName() throws ExperimentLazyLoadedException {
+        return getWorkflowInstanceData().get(0).getTemplateName();
+    }
+
+    @Override
+    public WorkflowInstanceStatus.ExecutionStatus getStatus() throws ExperimentLazyLoadedException
{
+        return getWorkflowInstanceData().get(0).getStatus();
+    }
+
+    @Override
+    public Date getStatusUpdateTime() throws ExperimentLazyLoadedException {
+        return getWorkflowInstanceData().get(0).getStatusUpdateTime();
+    }
+
+    @Override
+    public ExperimentDataImpl getExperimentData() throws ExperimentLazyLoadedException {
+        return getWorkflowInstanceData().get(0).getExperimentData();
+    }
+
+    @Override
+    public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException
{
+        getWorkflowInstanceData().get(0).setExperimentData(experimentData);
+    }
+
+    public void setExperimentId(String experimentId) {
 		this.experimentId = experimentId;
 	}
 	public String getTopic() {
@@ -147,4 +176,24 @@ public class ExperimentDataImpl implemen
 	public void setLazyLoaded(boolean lazyLoaded) {
 		this.lazyLoaded = lazyLoaded;
 	}
+
+    @Override
+    public WorkflowInstance getWorkflowInstance() throws ExperimentLazyLoadedException{
+        return getWorkflowInstanceData().get(0).getWorkflowInstance();
+    }
+
+    @Override
+    public List<WorkflowInstanceNodeData> getNodeDataList() throws ExperimentLazyLoadedException{
+        return getWorkflowInstanceData().get(0).getNodeDataList();
+    }
+
+    @Override
+    public void addNodeData(WorkflowInstanceNodeData... nodeData) throws ExperimentLazyLoadedException
{
+        getNodeDataList().addAll(Arrays.asList(nodeData));
+    }
+
+    @Override
+    public WorkflowInstanceNodeData getNodeData(String nodeId) throws ExperimentLazyLoadedException
{
+        return getWorkflowInstanceData().get(0).getNodeData(nodeId);
+    }
 }

Copied: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java
(from r1420318, 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/impl/WorkflowInstanceDataImpl.java?p2=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowInstanceDataImpl.java&p1=airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java&r1=1420318&r2=1420352&rev=1420352&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/impl/WorkflowInstanceDataImpl.java
Tue Dec 11 19:31:45 2012
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.registry.api.workflow;
+package org.apache.airavata.registry.api.impl;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -27,6 +27,7 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+import org.apache.airavata.registry.api.workflow.*;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -36,7 +37,7 @@ import javax.xml.bind.annotation.XmlTran
 
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlRootElement
-public class WorkflowInstanceData {
+public class WorkflowInstanceDataImpl implements WorkflowInstanceData {
 	private WorkflowInstance workflowInstance;
 
     @XmlTransient
@@ -45,10 +46,10 @@ public class WorkflowInstanceData {
 	
 	private List<WorkflowInstanceNodeData> nodeDataList;
 
-    public WorkflowInstanceData() {
+    public WorkflowInstanceDataImpl() {
     }
 
-    public WorkflowInstanceData(ExperimentData experimentData, WorkflowInstance workflowInstance,WorkflowInstanceStatus
workflowInstanceStatus,List<WorkflowInstanceNodeData> nodeDataList) {
+    public WorkflowInstanceDataImpl(ExperimentData experimentData, WorkflowInstance workflowInstance,
WorkflowInstanceStatus workflowInstanceStatus, List<WorkflowInstanceNodeData> nodeDataList)
{
 		this.experimentData= (ExperimentDataImpl)experimentData;
 		this.workflowInstance=workflowInstance;
 		this.workflowInstanceStatus=workflowInstanceStatus;

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=1420352&r1=1420351&r2=1420352&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 19:31:45 2012
@@ -31,7 +31,7 @@ import javax.xml.bind.annotation.XmlRoot
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.FIELD)
-public interface ExperimentData {
+public interface ExperimentData extends WorkflowInstanceData {
 
 	public String getExperimentId();
 	public String getTopic();

Added: 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=1420352&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
(added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceData.java
Tue Dec 11 19:31:45 2012
@@ -0,0 +1,40 @@
+package org.apache.airavata.registry.api.workflow;/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
+import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+
+import java.util.Date;
+import java.util.List;
+
+public interface WorkflowInstanceData {
+    public WorkflowInstance getWorkflowInstance() throws ExperimentLazyLoadedException;
+    public List<WorkflowInstanceNodeData> getNodeDataList() throws ExperimentLazyLoadedException;
+    public void addNodeData(WorkflowInstanceNodeData...nodeData) throws ExperimentLazyLoadedException;
+    public WorkflowInstanceNodeData getNodeData(String nodeId) throws ExperimentLazyLoadedException;
+    public String getExperimentId();
+    public String getWorkflowInstanceId() throws ExperimentLazyLoadedException;
+    public String getTemplateName() throws ExperimentLazyLoadedException;
+    public WorkflowInstanceStatus.ExecutionStatus getStatus() throws ExperimentLazyLoadedException;
+    public Date getStatusUpdateTime() throws ExperimentLazyLoadedException;
+    public ExperimentDataImpl getExperimentData() throws ExperimentLazyLoadedException;
+    public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException;
+}

Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java?rev=1420352&r1=1420351&r2=1420352&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
(original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
Tue Dec 11 19:31:45 2012
@@ -27,7 +27,6 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.registry.api.*;
 import org.apache.airavata.registry.api.exception.RegistryException;
-import org.apache.airavata.registry.api.exception.gateway.*;
 import org.apache.airavata.registry.api.exception.worker.*;
 import org.apache.airavata.registry.api.workflow.*;
 

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=1420352&r1=1420351&r2=1420352&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 19:31:45 2012
@@ -23,6 +23,7 @@ package org.apache.airavata.services.reg
 
 import org.apache.airavata.registry.api.AiravataRegistry2;
 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.workflow.*;
 import org.apache.airavata.rest.mappings.resourcemappings.ExperimentDataList;
@@ -473,6 +474,10 @@ 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);
@@ -538,6 +543,10 @@ 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);
@@ -572,6 +581,10 @@ 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);
@@ -910,6 +923,10 @@ 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);
@@ -946,6 +963,10 @@ 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);
@@ -980,6 +1001,10 @@ 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);
@@ -1223,6 +1248,10 @@ 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/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java?rev=1420352&r1=1420351&r2=1420352&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java
(original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflow.java
Tue Dec 11 19:31:45 2012
@@ -26,8 +26,8 @@ import java.util.List;
 
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.AiravataAPIInvocationException;
-import org.apache.airavata.registry.api.exception.RegistryException;
 //import org.apache.airavata.registry.api.AiravataRegistry2;
+import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
 import org.apache.airavata.registry.api.workflow.WorkflowInstance;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceData;
 import org.apache.airavata.registry.api.workflow.WorkflowInstanceNodeData;
@@ -53,8 +53,10 @@ public class XBayaWorkflow {
 				}
 			} catch (AiravataAPIInvocationException e) {
 				e.printStackTrace();
-			}
-		}
+			} catch (ExperimentLazyLoadedException e) {
+                e.printStackTrace();
+            }
+        }
 		return workflowServices;
 	}
 



Mime
View raw message