airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1188182 - in /incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api: Registry.java impl/JCRRegistry.java
Date Mon, 24 Oct 2011 15:54:47 GMT
Author: lahiru
Date: Mon Oct 24 15:54:46 2011
New Revision: 1188182

URL: http://svn.apache.org/viewvc?rev=1188182&view=rev
Log:
implementing https://issues.apache.org/jira/browse/AIRAVATA-160.

Modified:
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java?rev=1188182&r1=1188181&r2=1188182&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
Mon Oct 24 15:54:46 2011
@@ -227,4 +227,6 @@ public interface Registry {
      * @return
      */
     public String getName();
+
+    public boolean saveWorkflowData(String data,String experimentId,String nodeId);
 }

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java?rev=1188182&r1=1188181&r2=1188182&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java
Mon Oct 24 15:54:46 2011
@@ -79,6 +79,8 @@ public class JCRRegistry extends Observa
     public static final String PUBLIC = "PUBLIC";
     public static final String REGISTRY_TYPE_WORKFLOW = "workflow";
     public static final int GFAC_URL_UPDATE_INTERVAL = 1000 * 60 * 60 * 3;
+    public static final String WORKFLOW_DATA = "WorkflowData";
+
 
     private Repository repository;
     private Credentials credentials;
@@ -849,4 +851,19 @@ public class JCRRegistry extends Observa
     public String getName() {
         return repository.getDescriptor(Repository.REP_NAME_DESC);
     }
+
+    public boolean saveWorkflowData(String data, String experimentId,String nodeId) {
+        Session session = null;
+        try {
+            session = getSession();
+            Node workflowDataNode = getOrAddNode(getOrAddNode(getOrAddNode(session.getRootNode(),
WORKFLOW_DATA),experimentId),nodeId);
+            workflowDataNode.setProperty("content",data);
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            closeSession(session);
+            return true;
+        }
+
+    }
 }



Mime
View raw message