Repository: airavata
Updated Branches:
  refs/heads/develop 83a0bf879 -> 43b3757d6


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/43b3757d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/43b3757d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/43b3757d

Branch: refs/heads/develop
Commit: 43b3757d6c1b759a47603189e0ac0ad97339fd8b
Parents: 83a0bf8
Author: scnakandala <supun.nakand...@gmail.com>
Authored: Thu Sep 22 13:20:55 2016 -0400
Committer: scnakandala <supun.nakand...@gmail.com>
Committed: Thu Sep 22 13:20:55 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentCatalogImpl.java      | 3 ---
 .../core/experiment/catalog/resources/GatewayResource.java       | 4 ----
 .../registry/api/service/util/ExperimentCatalogInitUtil.java     | 2 ++
 3 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 53bd52b..5264158 100644
--- 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -38,7 +38,6 @@ import org.apache.airavata.model.status.ProcessStatus;
 import org.apache.airavata.model.status.TaskStatus;
 import org.apache.airavata.model.task.TaskModel;
 import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.model.workspace.Notification;
 import org.apache.airavata.model.workspace.Project;
 import 
org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
@@ -66,7 +65,6 @@ public class ExperimentCatalogImpl implements 
ExperimentCatalog {
             if 
(!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
                 gatewayResource = (GatewayResource) 
ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
                 
gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
-                
gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
                 gatewayResource.save();
             }else {
                 gatewayResource = (GatewayResource) 
ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
@@ -92,7 +90,6 @@ public class ExperimentCatalogImpl implements 
ExperimentCatalog {
         if (!ExpCatResourceUtils.isGatewayExist(gateway)){
             gatewayResource = (GatewayResource) 
ExpCatResourceUtils.createGateway(gateway);
             gatewayResource.setGatewayName(gateway);
-            
gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
             gatewayResource.save();
         }else {
             gatewayResource = (GatewayResource) 
ExpCatResourceUtils.getGateway(gateway);

http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/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 c745f4e..646594e 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,7 +20,6 @@
 */
 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;
@@ -462,9 +461,6 @@ 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();

http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
 
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
index 1ae5448..6f9fdb4 100644
--- 
a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
+++ 
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
@@ -23,6 +23,7 @@ package org.apache.airavata.registry.api.service.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import 
org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
 import 
org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource;
@@ -87,6 +88,7 @@ public class ExperimentCatalogInitUtil {
                 GatewayResource gateway;
                 if 
(!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
                     gateway = 
(GatewayResource)ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
+                    
gateway.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
                     gateway.save();
                 }else {
                     gateway = 
(GatewayResource)ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());

Reply via email to