airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: gateway id to cpi - AIRAVATA-1608
Date Thu, 05 Mar 2015 16:24:01 GMT
Repository: airavata
Updated Branches:
  refs/heads/master c69d322b2 -> 38e7309ff


gateway id to cpi - AIRAVATA-1608


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

Branch: refs/heads/master
Commit: 38e7309ffb6d0f151b46a78f975007c2359f36a5
Parents: c69d322
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Thu Mar 5 11:23:49 2015 -0500
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Thu Mar 5 11:23:49 2015 -0500

----------------------------------------------------------------------
 .../api/server/handler/AiravataServerHandler.java     | 14 +++++++++++---
 .../catalog/data/impl/ApplicationDeploymentImpl.java  |  2 ++
 .../catalog/data/impl/ApplicationInterfaceImpl.java   |  4 ++++
 .../catalog/data/impl/WorkflowCatalogImpl.java        |  2 ++
 .../catalog/data/model/ApplicationModule.java         | 10 ++++++++++
 .../catalog/data/resources/AbstractResource.java      |  4 ++++
 .../catalog/data/resources/AppDeploymentResource.java |  1 +
 .../catalog/data/resources/AppInterfaceResource.java  |  1 +
 .../catalog/data/resources/AppModuleResource.java     | 12 ++++++++++++
 .../catalog/data/resources/WorkflowResource.java      |  2 ++
 .../catalog/data/util/AppCatalogJPAUtils.java         |  1 +
 .../src/main/resources/appcatalog-derby.sql           |  1 +
 .../src/main/resources/appcatalog-mysql.sql           |  1 +
 .../src/test/resources/appcatalog-derby.sql           |  1 +
 .../registry/jpa/impl/ProjectRegistry.java            |  2 ++
 15 files changed, 55 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 66e4c94..264243a 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -85,6 +85,7 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.utils.Constants;
 import org.apache.airavata.workflow.catalog.WorkflowCatalogFactory;
 import org.apache.thrift.TException;
+import org.python.antlr.ast.Str;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -371,7 +372,10 @@ public class AiravataServerHandler implements Airavata.Iface {
                 throw exception;
             }
             registry = RegistryFactory.getRegistry(gatewayId);
-            List<Object> list = registry.get(RegistryModelType.PROJECT, Constants.FieldConstants.ProjectConstants.OWNER,
userName);
+            Map<String, String> filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, userName);
+            filters.put(Constants.FieldConstants.ProjectConstants.GATEWAY_ID, gatewayId);
+            List<Object> list = registry.search(RegistryModelType.PROJECT,filters);
             if (list != null && !list.isEmpty()){
                 for (Object o : list){
                     projects.add((Project) o);
@@ -625,6 +629,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             Map<String, String> filters = new HashMap<String, String>();
             filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, userName);
             filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS, experimentState.toString());
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
             List<Object> results = registry.search(RegistryModelType.EXPERIMENT, filters);
             for (Object object : results) {
                 summaries.add((ExperimentSummary) object);
@@ -666,6 +671,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, userName);
             filters.put(Constants.FieldConstants.ExperimentConstants.FROM_DATE, String.valueOf(fromTime));
             filters.put(Constants.FieldConstants.ExperimentConstants.TO_DATE, String.valueOf(toTime));
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
             List<Object> results = registry.search(RegistryModelType.EXPERIMENT, filters);
             for (Object object : results) {
                 summaries.add((ExperimentSummary) object);
@@ -751,7 +757,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             }
             List<Experiment> experiments = new ArrayList<Experiment>();
             registry = RegistryFactory.getRegistry(gatewayId);
-            List<Object> list = registry.get(RegistryModelType.EXPERIMENT, Constants.FieldConstants.ExperimentConstants.USER_NAME,
userName);
+            Map<String, String> filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, userName);
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
+            List<Object> list = registry.search(RegistryModelType.EXPERIMENT, filters);
             if (list != null && !list.isEmpty()){
                 for (Object o : list){
                     experiments.add((Experiment)o);
@@ -806,7 +815,6 @@ public class AiravataServerHandler implements Airavata.Iface {
             }
             String experimentId = (String)registry.add(ParentDataType.EXPERIMENT, experiment,
gatewayId);
             if (ServerSettings.isRabbitMqPublishEnabled()){
-                gatewayId = ServerSettings.getDefaultUserGateway();
                 ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.CREATED,
                         experimentId,
                         gatewayId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
index a383a05..adace03 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
@@ -62,6 +62,7 @@ public class ApplicationDeploymentImpl implements ApplicationDeployment
{
             deploymentResource.setHostResource((ComputeResourceResource)computeHostResource.get(deploymentDescription.getComputeHostId()));
             deploymentResource.setAppDes(deploymentDescription.getAppDeploymentDescription());
             deploymentResource.setExecutablePath(deploymentDescription.getExecutablePath());
+            deploymentResource.setGatewayId(gatewayId);
             ApplicationParallelismType parallelism = deploymentDescription.getParallelism();
             if (parallelism != null){
                 deploymentResource.setParallelism(parallelism.toString());
@@ -364,6 +365,7 @@ public class ApplicationDeploymentImpl implements ApplicationDeployment
{
         List<ApplicationDeploymentDescription> deploymentDescriptions = new ArrayList<ApplicationDeploymentDescription>();
         try {
             AppDeploymentResource resource = new AppDeploymentResource();
+            resource.setGatewayId(gatewayId);
             List<Resource> resources = resource.getAll();
             if (resources != null && !resources.isEmpty()){
                 deploymentDescriptions = AppCatalogThriftConversion.getAppDepDescList(resources);

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
index 85b8b60..80a974c 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationInterfaceImpl.java
@@ -47,6 +47,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
         try {
             AppModuleResource moduleResource = new AppModuleResource();
             moduleResource.setModuleName(applicationModule.getAppModuleName());
+            moduleResource.setGatewayId(gatewayId);
             if (!applicationModule.getAppModuleId().equals("") && !applicationModule.getAppModuleId().equals(applicationInterfaceModelConstants.DEFAULT_ID)){
                 moduleResource.setModuleId(applicationModule.getAppModuleId());
             }else {
@@ -74,6 +75,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
                 resource.setInterfaceId(AppCatalogUtils.getID(applicationInterfaceDescription.getApplicationName()));
             }
             resource.setAppDescription(applicationInterfaceDescription.getApplicationDescription());
+            resource.setGatewayId(gatewayId);
             resource.save();
             applicationInterfaceDescription.setApplicationInterfaceId(resource.getInterfaceId());
 
@@ -319,6 +321,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface
{
         List<ApplicationModule> applicationModules = new ArrayList<ApplicationModule>();
         try {
             AppModuleResource resource = new AppModuleResource();
+            resource.setGatewayId(gatewayId);
             List<Resource> resources = resource.getAll();
             if (resources != null && !resources.isEmpty()){
                 applicationModules = AppCatalogThriftConversion.getAppModules(resources);
@@ -355,6 +358,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface
{
     public List<ApplicationInterfaceDescription> getAllApplicationInterfaces(String
gatewayId) throws AppCatalogException {
         try {
             AppInterfaceResource resource = new AppInterfaceResource();
+            resource.setGatewayId(gatewayId);
             List<Resource> resources = resource.getAll();
             return AppCatalogThriftConversion.getAppInterfaceDescList(resources);
         }catch (Exception e){

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/WorkflowCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/WorkflowCatalogImpl.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/WorkflowCatalogImpl.java
index f51b051..7aaf1bd 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/WorkflowCatalogImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/WorkflowCatalogImpl.java
@@ -45,6 +45,7 @@ public class WorkflowCatalogImpl implements WorkflowCatalog {
         List<String> workflowIds = new ArrayList<String>();
         try {
             WorkflowResource resource = new WorkflowResource();
+            resource.setGatewayId(gatewayId);
             workflowIds = resource.getAllIds();
         } catch (Exception e) {
             logger.error("Error while retrieving all the workflow template ids...", e);
@@ -83,6 +84,7 @@ public class WorkflowCatalogImpl implements WorkflowCatalog {
             resource.setWfTemplateId(AppCatalogUtils.getID(workflow.getName()));
             resource.setWfName(workflow.getName());
             resource.setGraph(workflow.getGraph());
+            resource.setGatewayId(gatewayId);
             if (workflow.getImage() != null){
                 resource.setImage(new String(workflow.getImage()));
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationModule.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationModule.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationModule.java
index ece8c87..b4bd8bc 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationModule.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationModule.java
@@ -42,6 +42,8 @@ public class ApplicationModule implements Serializable {
     private String moduleDesc;
     @Column(name = "CREATION_TIME")
     private Timestamp creationTime;
+    @Column(name = "GATEWAY_ID")
+    private String gatewayId;
 
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
@@ -94,4 +96,12 @@ public class ApplicationModule implements Serializable {
     public void setModuleDesc(String moduleDesc) {
         this.moduleDesc = moduleDesc;
     }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
index 9b6913a..5f55069 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
@@ -180,6 +180,7 @@ public abstract class AbstractResource implements Resource {
 
     public final class ApplicationModuleConstants {
         public static final String MODULE_ID = "moduleID";
+        public static final String GATEWAY_ID = "gatewayId";
         public static final String MODULE_NAME = "moduleName";
         public static final String MODULE_VERSION = "moduleVersion";
         public static final String MODULE_DESC = "moduleDesc";
@@ -189,6 +190,7 @@ public abstract class AbstractResource implements Resource {
         public static final String APP_MODULE_ID = "appModuleID";
         public static final String DEPLOYMENT_ID = "deploymentID";
         public static final String COMPUTE_HOST_ID = "hostID";
+        public static final String GATEWAY_ID = "gatewayId";
         public static final String EXECUTABLE_PATH = "executablePath";
         public static final String APPLICATION_DESC = "applicationDesc";
         public static final String ENV_MODULE_LOAD_CMD = "envModuleLoaString";
@@ -216,6 +218,7 @@ public abstract class AbstractResource implements Resource {
     public final class ApplicationInterfaceConstants {
         public static final String INTERFACE_ID = "interfaceID";
         public static final String APPLICATION_NAME = "appName";
+        public static final String GATEWAY_ID = "gatewayId";
     }
 
     public final class AppModuleMappingConstants {
@@ -368,5 +371,6 @@ public abstract class AbstractResource implements Resource {
         public static final String CREATED_USER = "createdUser";
         public static final String GRAPH = "graph";
         public static final String WF_TEMPLATE_ID = "wfTemplateId";
+        public static final String GATEWAY_ID = "gatewayId";
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppDeploymentResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppDeploymentResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppDeploymentResource.java
index 184d4af..a635666 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppDeploymentResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppDeploymentResource.java
@@ -250,6 +250,7 @@ public class AppDeploymentResource extends AbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_DEPLOYMENT);
+            generator.setParameter(ApplicationDeploymentConstants.GATEWAY_ID, gatewayId);
             Query q = generator.selectQuery(em);
             List results = q.getResultList();
                 if (results.size() != 0) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppInterfaceResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppInterfaceResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppInterfaceResource.java
index 89ad202..3f6b60d 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppInterfaceResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppInterfaceResource.java
@@ -199,6 +199,7 @@ public class AppInterfaceResource extends AbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_INTERFACE);
+            generator.setParameter(ApplicationInterfaceConstants.GATEWAY_ID, gatewayId);
             Query   q = generator.selectQuery(em);
             List results = q.getResultList();
                 if (results.size() != 0) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
index eabbef3..79803af 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AppModuleResource.java
@@ -45,6 +45,15 @@ public class AppModuleResource extends AbstractResource {
     private String moduleDesc;
     private Timestamp createdTime;
     private Timestamp updatedTime;
+    private String gatewayId;
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
 
     public Timestamp getCreatedTime() {
         return createdTime;
@@ -199,6 +208,7 @@ public class AppModuleResource extends AbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(APPLICATION_MODULE);
+            generator.setParameter(ApplicationModuleConstants.GATEWAY_ID, gatewayId);
             Query q = generator.selectQuery(em);
             List<?> results = q.getResultList();
             for (Object result : results) {
@@ -283,6 +293,7 @@ public class AppModuleResource extends AbstractResource {
                 existingModule.setModuleName(moduleName);
                 existingModule.setModuleVersion(moduleVersion);
                 existingModule.setModuleDesc(moduleDesc);
+                existingModule.setGatewayId(gatewayId);
                 existingModule.setUpdateTime(AiravataUtils.getCurrentTimestamp());
                 em.merge(existingModule);
             }else {
@@ -291,6 +302,7 @@ public class AppModuleResource extends AbstractResource {
                 applicationModule.setModuleName(moduleName);
                 applicationModule.setModuleVersion(moduleVersion);
                 applicationModule.setModuleDesc(moduleDesc);
+                applicationModule.setGatewayId(gatewayId);
                 applicationModule.setCreationTime(AiravataUtils.getCurrentTimestamp());
                 em.persist(applicationModule);
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
index a872fa4..3e52019 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
@@ -180,6 +180,7 @@ public class WorkflowResource extends AbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(WORKFLOW);
+            generator.setParameter(WorkflowConstants.GATEWAY_ID, gatewayId);
             Query q = generator.selectQuery(em);
             List results = q.getResultList();
             if (results.size() != 0) {
@@ -214,6 +215,7 @@ public class WorkflowResource extends AbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(WORKFLOW);
+            generator.setParameter(WorkflowConstants.GATEWAY_ID, gatewayId);
             Query q = generator.selectQuery(em);
             List results = q.getResultList();
             if (results.size() != 0) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index e416a40..3a9b6ed 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -684,6 +684,7 @@ public class AppCatalogJPAUtils {
         if (o != null){
             moduleResource.setModuleId(o.getModuleID());
             moduleResource.setModuleDesc(o.getModuleDesc());
+            moduleResource.setGatewayId(o.getGatewayId());
             moduleResource.setModuleName(o.getModuleName());
             moduleResource.setModuleVersion(o.getModuleVersion());
             moduleResource.setCreatedTime(o.getCreationTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 1addb44..4e28e04 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -182,6 +182,7 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+         GATEWAY_ID VARCHAR (255),
          CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
          UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(MODULE_ID)

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index 6a3d5c9..cfb8022 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -189,6 +189,7 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+         GATEWAY_ID VARCHAR (255),
 	       CREATION_TIME TIMESTAMP DEFAULT NOW(),
          UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ,
          PRIMARY KEY(MODULE_ID)

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
index 1addb44..4e28e04 100644
--- a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
@@ -182,6 +182,7 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+         GATEWAY_ID VARCHAR (255),
          CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
          UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(MODULE_ID)

http://git-wip-us.apache.org/repos/asf/airavata/blob/38e7309f/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
index 21980b2..ad2a32d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -190,6 +190,8 @@ public class ProjectRegistry {
                         fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
                     }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
                         fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+                        fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
                     }
                 }
                 List<ProjectResource> projectResources = workerResource.searchProjects(fil);


Mime
View raw message