airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Fixed - LocalProvider use parameter names instead parameter values
Date Tue, 25 Nov 2014 19:22:25 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 12cdde05c -> 4a79ee6ce


Fixed - LocalProvider use parameter names instead parameter values


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

Branch: refs/heads/master
Commit: 4a79ee6ce978077f5084ba11f98a92ba397068a2
Parents: 12cdde0
Author: shamrath <shameerainfo@gmail.com>
Authored: Tue Nov 25 14:22:27 2014 -0500
Committer: shamrath <shameerainfo@gmail.com>
Committed: Tue Nov 25 14:22:27 2014 -0500

----------------------------------------------------------------------
 .../gfac/core/provider/utils/ProviderUtils.java       | 14 ++++++++++++++
 .../gfac/local/provider/impl/LocalProvider.java       |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4a79ee6c/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
index dc8eb1c..7d8b39e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/utils/ProviderUtils.java
@@ -24,6 +24,7 @@ package org.apache.airavata.gfac.core.provider.utils;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -41,4 +42,17 @@ public class ProviderUtils {
         return parameters;
     }
 
+    public static List<String> getInputParameterValues(JobExecutionContext jobExecutionContext)
{
+        List<String> paramValues = new ArrayList<String>();
+        Map<String, Object> paramMap = jobExecutionContext.getInMessageContext().getParameters();
+        InputDataObjectType inputDataObjectType;
+        for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
+            if (entry.getValue() instanceof InputDataObjectType) {
+                inputDataObjectType = (InputDataObjectType) entry.getValue();
+                paramValues.add(inputDataObjectType.getValue());
+            }
+        }
+        return paramValues;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/4a79ee6c/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
index e28726d..f6ecc5f 100644
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
@@ -105,7 +105,7 @@ public class LocalProvider extends AbstractProvider {
     public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException
{
     	super.initialize(jobExecutionContext);
 
-        buildCommand(jobExecutionContext.getExecutablePath(), ProviderUtils.getInputParameters(jobExecutionContext));
+        buildCommand(jobExecutionContext.getExecutablePath(), ProviderUtils.getInputParameterValues(jobExecutionContext));
         initProcessBuilder(jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription());
 
         // extra environment variables


Mime
View raw message