airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1388667 - in /airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa: impl/ model/ resources/
Date Fri, 21 Sep 2012 20:30:54 GMT
Author: samindaw
Date: Fri Sep 21 20:30:53 2012
New Revision: 1388667

URL: http://svn.apache.org/viewvc?rev=1388667&view=rev
Log:
user workflow pk model class update, few typo fixes in api + jpa resource classa

Modified:
    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/model/User_Workflow_PK.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/PublishWorkflowResource.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserWorkflowResource.java

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=1388667&r1=1388666&r2=1388667&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
Fri Sep 21 20:30:53 2012
@@ -752,7 +752,7 @@ public class AiravataJPARegistry extends
 		if (!isWorkflowExists(workflowName)){
         	throw new UserWorkflowDoesNotExistsException(workflowName);
         }
-		UserWorkflowResource workflowResource = worker.createWorkflowTemplate(workflowName);
+		UserWorkflowResource workflowResource = worker.getWorkflowTemplate(workflowName);
 		workflowResource.setContent(workflowGraphXml);
 		workflowResource.save();
     }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java?rev=1388667&r1=1388666&r2=1388667&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
Fri Sep 21 20:30:53 2012
@@ -6,9 +6,10 @@ public class User_Workflow_PK {
     private String gateway_name;
     private String owner;
 
-    public User_Workflow_PK(String template_name, String gateway_name) {
+    public User_Workflow_PK(String template_name, String owner, String gateway_name) {
         this.template_name = template_name;
         this.gateway_name = gateway_name;
+        this.owner = owner;
     }
 
     public User_Workflow_PK() {

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/PublishWorkflowResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/PublishWorkflowResource.java?rev=1388667&r1=1388666&r2=1388667&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/PublishWorkflowResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/PublishWorkflowResource.java
Fri Sep 21 20:30:53 2012
@@ -239,7 +239,7 @@ public class PublishWorkflowResource ext
             existingWF.setPath(path);
             publishedWorkflow = em.merge(existingWF);
         }else {
-            em.merge(gateway);
+            em.merge(publishedWorkflow);
         }
 
         em.getTransaction().commit();

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserWorkflowResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserWorkflowResource.java?rev=1388667&r1=1388666&r2=1388667&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserWorkflowResource.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserWorkflowResource.java
Fri Sep 21 20:30:53 2012
@@ -126,7 +126,7 @@ public class UserWorkflowResource extend
 
     public void save() {
         EntityManager em = ResourceUtils.getEntityManager();
-        User_Workflow existingWF = em.find(User_Workflow.class, new User_Workflow_PK(gateway.getGatewayName(),
name));
+        User_Workflow existingWF = em.find(User_Workflow.class, new User_Workflow_PK(name,
worker.getUser(), gateway.getGatewayName()));
         em.close();
 
         em = ResourceUtils.getEntityManager();



Mime
View raw message