airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [04/16] airavata git commit: Added registry level code for archive flag
Date Fri, 11 Mar 2016 06:57:20 GMT
Added registry level code for archive flag


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/97ea70c8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/97ea70c8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/97ea70c8

Branch: refs/heads/master
Commit: 97ea70c8b5dacc6d1a1ba7c5e7404a79bab5da25
Parents: 44bd69c
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Fri Mar 4 15:30:42 2016 -0500
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Fri Mar 4 15:30:42 2016 -0500

----------------------------------------------------------------------
 .../experiment/catalog/impl/ExperimentRegistry.java     |  2 ++
 .../core/experiment/catalog/model/Experiment.java       | 12 ++++++++++++
 .../catalog/resources/ExperimentResource.java           |  9 +++++++++
 .../core/experiment/catalog/resources/Utils.java        |  1 +
 .../catalog/utils/ThriftDataModelConversion.java        |  1 +
 .../src/main/resources/expcatalog-derby.sql             |  1 +
 .../src/main/resources/expcatalog-mysql.sql             |  1 +
 7 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index 98dfe91..7a7538a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -91,6 +91,7 @@ public class ExperimentRegistry {
             experimentResource.setExecutionId(experiment.getExecutionId());
             experimentResource.setGatewayExecutionId(experiment.getGatewayExecutionId());
             experimentResource.setGatewayInstanceId(experiment.getGatewayInstanceId());
+            experimentResource.setArchive(experiment.isArchive());
             if(experiment.isEnableEmailNotification()){
                 experimentResource.setEnableEmailNotification(true);
                 if(experiment.getEmailAddresses() != null){
@@ -587,6 +588,7 @@ public class ExperimentRegistry {
             existingExperiment.setDescription(experiment.getDescription());
             existingExperiment.setExecutionId(experiment.getExecutionId());
             existingExperiment.setEnableEmailNotification(experiment.isEnableEmailNotification());
+            existingExperiment.setArchive(experiment.isArchive());
 
             existingExperiment.save();
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
index 666d11c..55505e5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
@@ -44,6 +44,7 @@ public class Experiment {
     private String gatewayInstanceId;
 
     private Boolean enableEmailNotification;
+    private Boolean archive;
     private String emailAddresses;
     private Users user;
     private Project project;
@@ -163,6 +164,15 @@ public class Experiment {
         this.enableEmailNotification = enableEmailNotification;
     }
 
+    @Column(name = "ARCHIVE")
+    public Boolean getArchive() {
+        return archive;
+    }
+
+    public void setArchive(Boolean archive) {
+        this.archive = archive;
+    }
+
     @Lob
     @Column(name = "EMAIL_ADDRESSES")
     public String getEmailAddresses() {
@@ -281,4 +291,6 @@ public class Experiment {
     public void setUserConfigurationData(UserConfigurationData userConfigurationDataByExperimentId)
{
         this.userConfigurationData = userConfigurationDataByExperimentId;
     }
+
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
index 721ec05..b059706 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
@@ -53,6 +53,7 @@ public class ExperimentResource extends AbstractExpCatResource {
     private String gatewayInstanceId;
     private boolean enableEmailNotification;
     private String emailAddresses;
+    private boolean archive;
 
     public String getExperimentId() {
         return experimentId;
@@ -158,6 +159,13 @@ public class ExperimentResource extends AbstractExpCatResource {
         this.emailAddresses = emailAddresses;
     }
 
+    public boolean isArchive() {
+        return archive;
+    }
+
+    public void setArchive(boolean archive) {
+        this.archive = archive;
+    }
 
     public ExperimentCatResource create(ResourceType type) throws RegistryException{
        switch (type){
@@ -520,6 +528,7 @@ public class ExperimentResource extends AbstractExpCatResource {
             experiment.setGatewayExecutionId(gatewayExecutionId);
             experiment.setEnableEmailNotification(enableEmailNotification);
             experiment.setEmailAddresses(emailAddresses);
+            experiment.setArchive(archive);
             if (existingExp == null){
                 em.persist(experiment);
             }else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index d7b15b4..75215d0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -425,6 +425,7 @@ public class Utils {
             experimentResource.setGatewayInstanceId(o.getGatewayInstanceId());
             experimentResource.setEnableEmailNotification(o.getEnableEmailNotification());
             experimentResource.setEmailAddresses(o.getEmailAddresses());
+            experimentResource.setArchive(o.getArchive());
         }
         return experimentResource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index 1eea10d..36b1e1e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -124,6 +124,7 @@ public class ThriftDataModelConversion {
             experiment.setEnableEmailNotification(experimentResource.getEnableEmailNotification());
             experiment.setGatewayExecutionId(experimentResource.getGatewayExecutionId());
             experiment.setGatewayInstanceId(experimentResource.getGatewayInstanceId());
+            experiment.setArchive(experimentResource.isArchive());
             if (experiment.isEnableEmailNotification()){
                 String notificationEmails = experimentResource.getEmailAddresses();
                 experiment.setEmailAddresses(getEmailAddresses(notificationEmails.split(",")));

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 904d37a..d229b06 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -78,6 +78,7 @@ CREATE TABLE EXPERIMENT (
   GATEWAY_INSTANCE_ID varchar(255),
   ENABLE_EMAIL_NOTIFICATION SMALLINT,
   EMAIL_ADDRESSES CLOB,
+  ARCHIVE SMALLINT,
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/97ea70c8/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index 2a2ba01..e06f4b0 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -79,6 +79,7 @@ CREATE TABLE EXPERIMENT (
   GATEWAY_EXECUTION_ID varchar(255),
   ENABLE_EMAIL_NOTIFICATION tinyint(1),
   EMAIL_ADDRESSES text,
+  ARCHIVE TINYINT(1),
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
 );


Mime
View raw message