You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/10/03 15:38:31 UTC

[11/50] [abbrv] airavata git commit: fixing gateway intialization issue

fixing gateway intialization issue


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

Branch: refs/heads/airavata-gov-registry
Commit: 83a0bf8795730d712449653af1f484d9cf152d3f
Parents: 264f616
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 12:54:39 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 12:54:39 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/resources/GatewayResource.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/83a0bf87/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 646594e..c745f4e 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
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -461,6 +462,9 @@ public class GatewayResource extends AbstractExpCatResource {
             Gateway existingGateway = em.find(Gateway.class, gatewayId);
             em.close();
 
+            if(gatewayApprovalStatus == null || gatewayApprovalStatus.isEmpty())
+                gatewayApprovalStatus = GatewayApprovalStatus.APPROVED.toString();
+
             em = ExpCatResourceUtils.getEntityManager();
             em.getTransaction().begin();
             Gateway gateway = new Gateway();