airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hes...@apache.org
Subject svn commit: r1331013 - /incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
Date Thu, 26 Apr 2012 18:27:58 GMT
Author: heshan
Date: Thu Apr 26 18:27:57 2012
New Revision: 1331013

URL: http://svn.apache.org/viewvc?rev=1331013&view=rev
Log:
Fix for AIRAVATA-399

Modified:
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java?rev=1331013&r1=1331012&r2=1331013&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
Thu Apr 26 18:27:57 2012
@@ -335,7 +335,11 @@ public class GramProvider extends Abstra
                                 if (paramValue.startsWith("gsiftp")) {
                                     ftp.uploadFile(gridftpURL, destURI, gssCred);
                                     ((URIParameterType) actualParameter.getType()).setValue(destURI.getPath());
-                                } else if (paramValue.startsWith("http")) {
+                                } else if (paramValue.startsWith("file")) {
+                                    String localFile = paramValue.substring(paramValue.indexOf(":")+1,
paramValue.length());
+                                    ftp.uploadFile(destURI, gssCred, new FileInputStream(localFile));
+                                    ((URIParameterType) actualParameter.getType()).setValue(destURI.getPath());
+                                }else if (paramValue.startsWith("http")) {
                                     ftp.uploadFile(destURI,
                                             gssCred, (gridftpURL.toURL().openStream()));
                                     ((URIParameterType) actualParameter.getType()).setValue(destURI.getPath());



Mime
View raw message