airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [30/31] airavata git commit: updating registry code to support new fields in the gateway model
Date Wed, 13 Jul 2016 05:33:37 GMT
updating registry code to support new fields in the gateway model


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

Branch: refs/heads/grouper-integration
Commit: 2c6d1d5e08cf6272f59ae279f0acb568cd522349
Parents: bafcebf
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Jul 13 01:05:10 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Jul 13 01:05:10 2016 -0400

----------------------------------------------------------------------
 .../catalog/impl/GatewayRegistry.java           | 10 ++++
 .../core/experiment/catalog/model/Gateway.java  | 49 +++++++++++++++++
 .../catalog/resources/GatewayResource.java      | 55 ++++++++++++++++++++
 .../utils/ThriftDataModelConversion.java        |  5 ++
 4 files changed, 119 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2c6d1d5e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
index 337b655..45e7d20 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
@@ -56,6 +56,11 @@ public class GatewayRegistry {
             resource.setGatewayUrl(gateway.getGatewayURL());
             resource.setGatewayPublicAbstract(gateway.getGatewayPublicAbstract());
             resource.setReviewProposalDescription(gateway.getReviewProposalDescription());
+            resource.setGatewayAdminFirstName(gateway.getGatewayAdminFirstName());
+            resource.setGetGatewayAdminLastName(gateway.getGatewayAdminLastName());
+            resource.setGatewayAdminEmail(gateway.getGatewayAdminEmail());
+            resource.setIdentityServerUserName(gateway.getIdentityServerUserName());
+            resource.setIdentityServerPasswordToken(gateway.getIdentityServerPasswordToken());
             resource.save();
             return gateway.getGatewayId();
         }catch (RegistryException e){
@@ -74,6 +79,11 @@ public class GatewayRegistry {
             existingGateway.setGatewayUrl(updatedGateway.getGatewayURL());
             existingGateway.setGatewayPublicAbstract(updatedGateway.getGatewayPublicAbstract());
             existingGateway.setReviewProposalDescription(updatedGateway.getReviewProposalDescription());
+            existingGateway.setGatewayAdminFirstName(updatedGateway.getGatewayAdminFirstName());
+            existingGateway.setGetGatewayAdminLastName(updatedGateway.getGatewayAdminLastName());
+            existingGateway.setGatewayAdminEmail(updatedGateway.getGatewayAdminEmail());
+            existingGateway.setIdentityServerUserName(updatedGateway.getIdentityServerUserName());
+            existingGateway.setIdentityServerPasswordToken(updatedGateway.getIdentityServerPasswordToken());
             existingGateway.save();
         }catch (RegistryException e){
             logger.error("Error while updating gateway to registry", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/2c6d1d5e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
index 2c301f1..aa5de59 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
@@ -39,6 +39,11 @@ public class Gateway {
     private String gatewayUrl;
     private String gatewayPublicAbstract;
     private String reviewProposalDescription;
+    private String gatewayAdminFirstName;
+    private String getGatewayAdminLastName;
+    private String gatewayAdminEmail;
+    private String identityServerUserName;
+    private String identityServerPasswordToken;
     private Collection<GatewayWorker> gatewayWorkers;
     private Collection<Project> projects;
 
@@ -124,6 +129,50 @@ public class Gateway {
         this.reviewProposalDescription = reviewProposalDescription;
     }
 
+    @Column(name = "GATEWAY_ADMIN_FIRST_NAME")
+    public String getGatewayAdminFirstName() {
+        return gatewayAdminFirstName;
+    }
+
+    public void setGatewayAdminFirstName(String gatewayAdminFirstName) {
+        this.gatewayAdminFirstName = gatewayAdminFirstName;
+    }
+
+    @Column(name = "GATEWAY_ADMIN_LAST_NAME")
+    public String getGetGatewayAdminLastName() {
+        return getGatewayAdminLastName;
+    }
+
+    public void setGetGatewayAdminLastName(String getGatewayAdminLastName) {
+        this.getGatewayAdminLastName = getGatewayAdminLastName;
+    }
+
+    @Column(name = "GATEWAY_ADMIN_EMAIL")
+    public String getGatewayAdminEmail() {
+        return gatewayAdminEmail;
+    }
+
+    public void setGatewayAdminEmail(String gatewayAdminEmail) {
+        this.gatewayAdminEmail = gatewayAdminEmail;
+    }
+
+    @Column(name = "IDENTITY_SERVER_USERNAME")
+    public String getIdentityServerUserName() {
+        return identityServerUserName;
+    }
+
+    public void setIdentityServerUserName(String identityServerUserName) {
+        this.identityServerUserName = identityServerUserName;
+    }
+
+    @Column(name = "IDENTITY_SERVER_PASSWORD_TOKEN")
+    public String getIdentityServerPasswordToken() {
+        return identityServerPasswordToken;
+    }
+
+    public void setIdentityServerPasswordToken(String identityServerPasswordToken) {
+        this.identityServerPasswordToken = identityServerPasswordToken;
+    }
 
     //    @Override
 //    public boolean equals(Object o) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/2c6d1d5e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index b5faa47..343b2d0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -46,6 +46,51 @@ public class GatewayResource extends AbstractExpCatResource {
     private String gatewayUrl;
     private String gatewayPublicAbstract;
     private String reviewProposalDescription;
+    private String gatewayAdminFirstName;
+    private String getGatewayAdminLastName;
+    private String gatewayAdminEmail;
+    private String identityServerUserName;
+    private String identityServerPasswordToken;
+
+    public String getGatewayAdminFirstName() {
+        return gatewayAdminFirstName;
+    }
+
+    public void setGatewayAdminFirstName(String gatewayAdminFirstName) {
+        this.gatewayAdminFirstName = gatewayAdminFirstName;
+    }
+
+    public String getGetGatewayAdminLastName() {
+        return getGatewayAdminLastName;
+    }
+
+    public void setGetGatewayAdminLastName(String getGatewayAdminLastName) {
+        this.getGatewayAdminLastName = getGatewayAdminLastName;
+    }
+
+    public String getGatewayAdminEmail() {
+        return gatewayAdminEmail;
+    }
+
+    public void setGatewayAdminEmail(String gatewayAdminEmail) {
+        this.gatewayAdminEmail = gatewayAdminEmail;
+    }
+
+    public String getIdentityServerUserName() {
+        return identityServerUserName;
+    }
+
+    public void setIdentityServerUserName(String identityServerUserName) {
+        this.identityServerUserName = identityServerUserName;
+    }
+
+    public String getIdentityServerPasswordToken() {
+        return identityServerPasswordToken;
+    }
+
+    public void setIdentityServerPasswordToken(String identityServerPasswordToken) {
+        this.identityServerPasswordToken = identityServerPasswordToken;
+    }
 
     public String getGatewayId() {
         return gatewayId;
@@ -381,6 +426,11 @@ public class GatewayResource extends AbstractExpCatResource {
             gateway.setGatewayUrl(gatewayUrl);
             gateway.setGatewayPublicAbstract(gatewayPublicAbstract);
             gateway.setReviewProposalDescription(reviewProposalDescription);
+            gateway.setGatewayAdminFirstName(gatewayAdminFirstName);
+            gateway.setGetGatewayAdminLastName(getGatewayAdminLastName);
+            gateway.setGatewayAdminEmail(gatewayAdminEmail);
+            gateway.setIdentityServerUserName(identityServerUserName);
+            gateway.setIdentityServerPasswordToken(identityServerPasswordToken);
             if (existingGateway != null) {
                 existingGateway.setDomain(domain);
                 existingGateway.setGatewayName(gatewayName);
@@ -389,6 +439,11 @@ public class GatewayResource extends AbstractExpCatResource {
                 existingGateway.setGatewayUrl(gatewayUrl);
                 existingGateway.setGatewayPublicAbstract(gatewayPublicAbstract);
                 existingGateway.setReviewProposalDescription(reviewProposalDescription);
+                existingGateway.setGatewayAdminFirstName(gatewayAdminFirstName);
+                existingGateway.setGetGatewayAdminLastName(getGatewayAdminLastName);
+                existingGateway.setGatewayAdminEmail(gatewayAdminEmail);
+                existingGateway.setIdentityServerUserName(identityServerUserName);
+                existingGateway.setIdentityServerPasswordToken(identityServerPasswordToken);
                 em.merge(existingGateway);
             } else {
                 em.persist(gateway);

http://git-wip-us.apache.org/repos/asf/airavata/blob/2c6d1d5e/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 54329d5..378daba 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
@@ -86,6 +86,11 @@ public class ThriftDataModelConversion {
         gateway.setGatewayURL(resource.getGatewayUrl());
         gateway.setGatewayPublicAbstract(resource.getGatewayPublicAbstract());
         gateway.setReviewProposalDescription(resource.getReviewProposalDescription());
+        gateway.setGatewayAdminFirstName(resource.getGatewayAdminFirstName());
+        gateway.setGatewayAdminLastName(resource.getGetGatewayAdminLastName());
+        gateway.setGatewayAdminEmail(resource.getGatewayAdminEmail());
+        gateway.setIdentityServerUserName(resource.getIdentityServerUserName());
+        gateway.setIdentityServerPasswordToken(resource.getIdentityServerPasswordToken());
         return gateway;
     }
 


Mime
View raw message