airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [5/5] airavata git commit: changing GATEWAY_EXECUTION_ID to GATEWAY_ID where appropriate
Date Mon, 22 Jun 2015 16:07:33 GMT
changing GATEWAY_EXECUTION_ID to GATEWAY_ID where appropriate


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

Branch: refs/heads/master
Commit: 9ee0df7c1a2f7deac5cd6438a749034cdc4b9f51
Parents: 56d132d
Author: Supun Nakandala <scnakandala@apache.org>
Authored: Mon Jun 22 21:36:32 2015 +0530
Committer: Supun Nakandala <scnakandala@apache.org>
Committed: Mon Jun 22 21:36:32 2015 +0530

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentRegistry.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/9ee0df7c/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 3918dc6..76dfc31 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
@@ -832,6 +832,8 @@ public class ExperimentRegistry {
                 return ThriftDataModelConversion.getExperiment(resource);
             } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME))
{
                 return resource.getUserName();
+            }else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_ID))
{
+                return resource.getGatewayId();
             }else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_EXECUTION_ID))
{
                 return resource.getGatewayExecutionId();
             } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME))
{
@@ -983,7 +985,7 @@ public class ExperimentRegistry {
                     experiments.add(experiment);
                 }
                 return experiments;
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_EXECUTION_ID))
{
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_ID))
{
                 List<ExperimentResource> resources = gatewayResource.getExperiments();
                 for (ExperimentResource resource : resources) {
                     ExperimentModel experiment = ThriftDataModelConversion.getExperiment(resource);
@@ -1057,7 +1059,7 @@ public class ExperimentRegistry {
                         fil.put(AbstractExpCatResource.ExperimentConstants.EXPERIMENT_NAME,
filters.get(field));
                     } else if (field.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME))
{
                         fil.put(AbstractExpCatResource.ExperimentConstants.USER_NAME, filters.get(field));
-                    }else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_EXECUTION_ID))
{
+                    }else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_ID))
{
                         fil.put(AbstractExpCatResource.ExperimentConstants.GATEWAY_ID, filters.get(field));
                     } else if (field.equals(Constants.FieldConstants.ExperimentConstants.DESCRIPTION))
{
                         fil.put(AbstractExpCatResource.ExperimentConstants.DESCRIPTION, filters.get(field));
@@ -1098,7 +1100,7 @@ public class ExperimentRegistry {
         try {
             ExperimentStatistics experimentStatistics = new ExperimentStatistics();
             ExperimentStatisticsResource experimentStatisticsResource = workerResource.getExperimentStatistics(
-                    filters.get(Constants.FieldConstants.ExperimentConstants.GATEWAY_EXECUTION_ID),
+                    filters.get(Constants.FieldConstants.ExperimentConstants.GATEWAY_ID),
                     new Timestamp(Long.parseLong(filters.get(Constants.FieldConstants.ExperimentConstants.FROM_DATE))),
                     new Timestamp(Long.parseLong(filters.get(Constants.FieldConstants.ExperimentConstants.TO_DATE)))
             );
@@ -1143,7 +1145,7 @@ public class ExperimentRegistry {
     public List<String> getExperimentIDs(String fieldName, Object value) throws RegistryException
{
         List<String> expIDs = new ArrayList<String>();
         try {
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_EXECUTION_ID))
{
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY_ID))
{
                 if (gatewayResource == null) {
                     logger.error("You should use an existing gateway in order to retrieve
experiments..");
                     return null;


Mime
View raw message