airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1471096 - in /airavata/trunk/modules/gfac-core/src: main/java/org/apache/airavata/gfac/ main/java/org/apache/airavata/gfac/handler/ main/java/org/apache/airavata/gfac/provider/ main/java/org/apache/airavata/gfac/provider/impl/ test/java/or...
Date Tue, 23 Apr 2013 19:03:11 GMT
Author: lahiru
Date: Tue Apr 23 19:03:10 2013
New Revision: 1471096

URL: http://svn.apache.org/r1471096
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-831.

Added:
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandlerConfig.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProviderConfig.java
Modified:
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacAPI.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AppDescriptorCheckHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HDFSDataMovementHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HadoopDeploymentHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/LocalDirectorySetupHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPInputHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPOutputHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
    airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/ParamChemTest.java
    airavata/trunk/modules/gfac-core/src/test/resources/gfac-config.xml

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacAPI.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacAPI.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacAPI.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacAPI.java Tue Apr 23 19:03:10 2013
@@ -23,6 +23,7 @@ package org.apache.airavata.gfac;
 
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.handler.GFacHandler;
+import org.apache.airavata.gfac.handler.GFacHandlerConfig;
 import org.apache.airavata.gfac.handler.GFacHandlerException;
 import org.apache.airavata.gfac.notification.events.ExecutionFailEvent;
 import org.apache.airavata.gfac.notification.events.FinishExecutionEvent;
@@ -113,12 +114,12 @@ public class GFacAPI {
     }
 
     private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<String> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
-        for (String handlerClassName : handlers) {
+        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
+        for (GFacHandlerConfig handlerClassName : handlers) {
             Class<? extends GFacHandler> handlerClass;
             GFacHandler handler;
             try {
-                handlerClass = Class.forName(handlerClassName.trim()).asSubclass(GFacHandler.class);
+                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
                 handler = handlerClass.newInstance();
             } catch (ClassNotFoundException e) {
                 throw new GFacException("Cannot load handler class " + handlerClassName, e);
@@ -136,13 +137,13 @@ public class GFacAPI {
     }
 
     private void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<String> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
+        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
 
-        for (String handlerClassName : handlers) {
+        for (GFacHandlerConfig handlerClassName : handlers) {
             Class<? extends GFacHandler> handlerClass;
             GFacHandler handler;
             try {
-                 handlerClass = Class.forName(handlerClassName.trim()).asSubclass(GFacHandler.class);
+                 handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
                 handler = handlerClass.newInstance();
             } catch (ClassNotFoundException e) {
                 log.error(e.getMessage());

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java Tue Apr 23 19:03:10 2013
@@ -23,12 +23,7 @@ package org.apache.airavata.gfac;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -43,13 +38,12 @@ import org.apache.airavata.client.api.Ai
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.exception.UnspecifiedApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.context.security.GSISecurityContext;
+import org.apache.airavata.gfac.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.provider.GFacProviderConfig;
 import org.apache.airavata.gfac.utils.GridConfigurationHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
+import org.w3c.dom.*;
 import org.xml.sax.SAXException;
 
 public class GFacConfiguration {
@@ -61,11 +55,11 @@ public class GFacConfiguration {
     private static Document handlerDoc;
     // Keep list of full qualified class names of GFac handlers which should invoked before
     // the provider
-    private List<String> inHandlers = new ArrayList<String>();
+    private List<GFacHandlerConfig> inHandlers = new ArrayList<GFacHandlerConfig>();
 
     // Keep list of full qualified class names of GFac handlers which should invoked after
     // the provider
-    private List<String> outHandlers = new ArrayList<String>();
+    private List<GFacHandlerConfig> outHandlers = new ArrayList<GFacHandlerConfig>();
 
     private static List<GridConfigurationHandler> gridConfigurationHandlers;
 
@@ -106,35 +100,35 @@ public class GFacConfiguration {
     }
 
 
-    public List<String> getInHandlers() {
+    public List<GFacHandlerConfig> getInHandlers() {
         //This will avoid the misconfiguration done by user in gfac-config.xml
         return removeDuplicateWithOrder(inHandlers);
     }
 
-    public List<String> getOutHandlers() {
+    public List<GFacHandlerConfig> getOutHandlers() {
         //This will avoid the misconfiguration done by user in gfac-config.xml
         return removeDuplicateWithOrder(outHandlers);
     }
-    public void setInHandlers(List<String> inHandlers) {
+    public void setInHandlers(List<GFacHandlerConfig> inHandlers) {
         this.inHandlers = inHandlers;
     }
 
-    public void setOutHandlers(List<String> outHandlers) {
+    public void setOutHandlers(List<GFacHandlerConfig> outHandlers) {
         this.outHandlers = outHandlers;
     }
 
     public void setInHandlers(String providerName, String applicationName) {
         try {
-            this.inHandlers = xpathGetAttributeValueList(handlerDoc, Constants.XPATH_EXPR_GLOBAL_INFLOW_HANDLERS, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
+            this.inHandlers = getHandlerConfig(handlerDoc, Constants.XPATH_EXPR_GLOBAL_INFLOW_HANDLERS, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
             if (applicationName != null) {
                 String xPath = Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + Constants.XPATH_EXPR_APPLICATION_INFLOW_HANDLERS_END;
-                List<String> strings = xpathGetAttributeValueList(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
-                this.inHandlers.addAll(strings);
+                List<GFacHandlerConfig> handlers = getHandlerConfig(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
+                this.inHandlers.addAll(handlers);
             }
             if (providerName != null) {
                 String xPath = Constants.XPATH_EXPR_PROVIDER_HANDLERS_START + providerName + Constants.XPATH_EXPR_PROVIDER_INFLOW_HANDLERS_END;
-                List<String> strings = xpathGetAttributeValueList(handlerDoc, xPath, Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
-                this.inHandlers.addAll(strings);
+                List<GFacHandlerConfig> handlers = getHandlerConfig(handlerDoc, xPath, Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
+                this.inHandlers.addAll(handlers);
             }
         } catch (XPathExpressionException e) {
             new GFacException("Error parsing Handler Configuration", e);
@@ -143,16 +137,16 @@ public class GFacConfiguration {
 
     public void setOutHandlers(String providerName, String applicationName) {
         try {
-            this.outHandlers = xpathGetAttributeValueList(handlerDoc, Constants.XPATH_EXPR_GLOBAL_OUTFLOW_HANDLERS, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
+            this.outHandlers = getHandlerConfig(handlerDoc, Constants.XPATH_EXPR_GLOBAL_OUTFLOW_HANDLERS, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
             if (applicationName != null) {
                 String xPath = Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + Constants.XPATH_EXPR_APPLICATION_OUTFLOW_HANDLERS_END;
-                List<String> strings = xpathGetAttributeValueList(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
-                this.outHandlers.addAll(strings);
+                List<GFacHandlerConfig> handlers = getHandlerConfig(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
+                this.outHandlers.addAll(handlers);
             }
             if(providerName != null) {
                 String xPath = Constants.XPATH_EXPR_PROVIDER_HANDLERS_START + providerName + Constants.XPATH_EXPR_PROVIDER_OUTFLOW_HANDLERS_END;
-                List<String> strings = xpathGetAttributeValueList(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
-                this.outHandlers.addAll(strings);
+                List<GFacHandlerConfig> handlers = getHandlerConfig(handlerDoc, xPath, Constants.GFAC_CONFIG_HANDLER_CLASS_ATTRIBUTE);
+                this.outHandlers.addAll(handlers);
             }
         } catch (XPathExpressionException e) {
             new GFacException("Error parsing Handler Configuration", e);
@@ -218,20 +212,54 @@ public class GFacConfiguration {
      * @return list of attribute values.
      * @throws XPathExpressionException
      */
-    public static List<String> xpathGetAttributeValueList(Document doc, String expression, String attribute) throws XPathExpressionException {
+    public static List<GFacHandlerConfig> getHandlerConfig(Document doc, String expression, String attribute) throws XPathExpressionException {
         XPathFactory xPathFactory = XPathFactory.newInstance();
         XPath xPath = xPathFactory.newXPath();
         XPathExpression expr = xPath.compile(expression);
 
         NodeList nl = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
+        List<GFacHandlerConfig> gFacHandlerConfigs = new ArrayList<GFacHandlerConfig>();
+        Map<String, String> properties = new HashMap<String, String>();
+        String className = "";
+        for (int i = 0; i < nl.getLength(); i++) {
+            className = ((Element) nl.item(i)).getAttribute(attribute);
+            NodeList childNodes = (nl.item(i)).getChildNodes();
+            for(int j = 0;j < childNodes.getLength();j++){
+               if("property".equals(childNodes.item(j).getNodeName())) {
+                   String name = ((Element) childNodes.item(j)).getAttribute("name");
+                   String value = ((Element) childNodes.item(j)).getAttribute("value");
+                   properties.put(name, value);
+               }
+            }
+            GFacHandlerConfig gFacHandlerConfig = new GFacHandlerConfig(properties,className);
+            gFacHandlerConfigs.add(gFacHandlerConfig);
+        }
+        return gFacHandlerConfigs;
+    }
 
-        List<String> attributeValues = new ArrayList<String>();
+    public static List<GFacProviderConfig> getProviderConfig(Document doc, String expression, String attribute) throws XPathExpressionException {
+        XPathFactory xPathFactory = XPathFactory.newInstance();
+        XPath xPath = xPathFactory.newXPath();
+        XPathExpression expr = xPath.compile(expression);
 
+        NodeList nl = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
+        List<GFacProviderConfig> gFacProviderConfigs = new ArrayList<GFacProviderConfig>();
+        Map<String, String> properties = new HashMap<String, String>();
+        String className = "";
         for (int i = 0; i < nl.getLength(); i++) {
-            attributeValues.add(((Element) nl.item(i)).getAttribute(attribute));
+            className = ((Element) nl.item(i)).getAttribute(attribute);
+            NodeList childNodes = (nl.item(i)).getChildNodes();
+            for (int j = 0; j < childNodes.getLength(); j++) {
+                if ("property".equals(childNodes.item(j).getNodeName())) {
+                    String name = ((Element) childNodes.item(j)).getAttribute("name");
+                    String value = ((Element) childNodes.item(j)).getAttribute("value");
+                    properties.put(name, value);
+                }
+            }
+            GFacProviderConfig gFacProviderConfig = new GFacProviderConfig(properties,className);
+            gFacProviderConfigs.add(gFacProviderConfig);
         }
-
-        return attributeValues;
+        return gFacProviderConfigs;
     }
 
     public static GFacConfiguration create(Properties configProps) {

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java Tue Apr 23 19:03:10 2013
@@ -23,7 +23,10 @@ package org.apache.airavata.gfac;
 
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.context.JobExecutionContext;
+import org.apache.airavata.gfac.handler.GFacHandlerConfig;
 import org.apache.airavata.gfac.provider.GFacProvider;
+import org.apache.airavata.gfac.provider.GFacProviderConfig;
+import org.apache.airavata.gfac.provider.GFacProviderException;
 import org.apache.airavata.gfac.provider.impl.BESProvider;
 import org.apache.airavata.gfac.provider.impl.EC2Provider;
 import org.apache.airavata.gfac.provider.impl.GramProvider;
@@ -68,15 +71,17 @@ public class Scheduler {
         HostDescription hostDescription = jobExecutionContext.getApplicationContext().getHostDescription();
         String applicationName = jobExecutionContext.getApplicationContext().
                 getApplicationDeploymentDescription().getType().getApplicationName().getStringValue();
-        String s = "";
+        GFacProviderConfig s = null;
+        GFacProvider provider = null;
+        List<GFacProviderConfig> aClass = null;
         try {
-            List<String> aClass = GFacConfiguration.xpathGetAttributeValueList(GFacConfiguration.getHandlerDoc(),
+             aClass = GFacConfiguration.getProviderConfig(GFacConfiguration.getHandlerDoc(),
                     Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + "']", Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
             // This should be have a single element only.
             if (!aClass.isEmpty()) {
                 s = aClass.get(0);
-                Class<? extends GFacProvider> aClass1 = Class.forName(s).asSubclass(GFacProvider.class);
-                return aClass1.newInstance();
+                Class<? extends GFacProvider> aClass1 = Class.forName(s.getClassName()).asSubclass(GFacProvider.class);
+                provider = aClass1.newInstance();
             }
         } catch (XPathExpressionException e) {
            log.error("Error configuring gfac-config.xml for application specific configuration");
@@ -92,20 +97,34 @@ public class Scheduler {
             throw new GFacException("Error initializing application specific Handler", e);
         }
         if(hostDescription.getType() instanceof GlobusHostType){
-            return new GramProvider();
+            provider = new GramProvider();
         }
         else if (hostDescription.getType() instanceof UnicoreHostType) {
-        	return new BESProvider();
+        	provider = new BESProvider();
         }
         else if (hostDescription.getType() instanceof Ec2HostType) {
-            return new EC2Provider();
+            provider = new EC2Provider();
         }
         else if (hostDescription.getType() instanceof SSHHostType) {
-            return new SSHProvider();
+            provider = new SSHProvider();
         }
         else {
-            return new LocalProvider();
+            provider = new LocalProvider();
         }
+        String providerName = provider.getClass().getName();
+        try {
+            aClass = GFacConfiguration.getProviderConfig(GFacConfiguration.getHandlerDoc(), Constants.XPATH_EXPR_PROVIDER_HANDLERS_START +
+                    providerName + "']", Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
+            if(!aClass.isEmpty()){
+                provider.initProperties(aClass.get(0).getProperties());
+            }
+        } catch (XPathExpressionException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        } catch (GFacProviderException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        return provider;
+
     }
 
 

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AppDescriptorCheckHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AppDescriptorCheckHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AppDescriptorCheckHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AppDescriptorCheckHandler.java Tue Apr 23 19:03:10 2013
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.handler;
 
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.slf4j.Logger;
@@ -28,6 +29,7 @@ import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.util.Date;
+import java.util.Map;
 import java.util.UUID;
 
 public class AppDescriptorCheckHandler implements GFacHandler {
@@ -78,4 +80,8 @@ public class AppDescriptorCheckHandler i
         }
         jobExecutionContext.getApplicationContext().setApplicationDeploymentDescription(app);
     }
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandler.java Tue Apr 23 19:03:10 2013
@@ -24,7 +24,11 @@ package org.apache.airavata.gfac.handler
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 
+import java.util.Map;
+
 public interface GFacHandler {
 
+    public void init(Map<String,String> properties) throws GFacHandlerException,GFacException;
+
     public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException,GFacException;
 }

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandlerConfig.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandlerConfig.java?rev=1471096&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandlerConfig.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GFacHandlerConfig.java Tue Apr 23 19:03:10 2013
@@ -0,0 +1,51 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gfac.handler;
+
+import java.util.Map;
+
+public class GFacHandlerConfig {
+
+    public GFacHandlerConfig(Map<String, String> properties, String className) {
+        this.properties = properties;
+        this.className = className;
+    }
+
+    private Map<String,String> properties;
+
+    private String className;
+
+    public void setProperties(Map<String, String> properties) {
+        this.properties = properties;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public Map<String, String> getProperties() {
+        return properties;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+}

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java Tue Apr 23 19:03:10 2013
@@ -41,6 +41,7 @@ import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Date;
+import java.util.Map;
 import java.util.UUID;
 
 public class GramDirectorySetupHandler implements GFacHandler {
@@ -120,4 +121,8 @@ public class GramDirectorySetupHandler i
             throw new GFacHandlerException(e.getMessage(), e, jobExecutionContext);
         }
     }
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java Tue Apr 23 19:03:10 2013
@@ -26,10 +26,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.MappingFactory;
@@ -163,7 +160,7 @@ public class GridFTPInputHandler impleme
         return destURI.getPath();
     }
 
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
 
-
-
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java Tue Apr 23 19:03:10 2013
@@ -293,4 +293,7 @@ public class GridFTPOutputHandler implem
         return outputFileStagingPath + File.separator + fileName;
     }
 
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HDFSDataMovementHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HDFSDataMovementHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HDFSDataMovementHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HDFSDataMovementHandler.java Tue Apr 23 19:03:10 2013
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.gfac.handler;
 
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.gfac.handler.GFacHandler;
@@ -38,6 +39,7 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.util.Map;
 
 public class HDFSDataMovementHandler implements GFacHandler {
     private static final Logger logger = LoggerFactory.getLogger(HDFSDataMovementHandler.class);
@@ -96,4 +98,8 @@ public class HDFSDataMovementHandler imp
     }
 
     private void handleOutPath(JobExecutionContext jobExecutionContext){}
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }
\ No newline at end of file

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HadoopDeploymentHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HadoopDeploymentHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HadoopDeploymentHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/HadoopDeploymentHandler.java Tue Apr 23 19:03:10 2013
@@ -23,6 +23,7 @@ package org.apache.airavata.gfac.handler
 
 import com.google.common.io.Files;
 import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.schemas.gfac.HadoopHostType;
@@ -267,5 +268,7 @@ public class HadoopDeploymentHandler imp
         return ((HadoopHostType)hostDescription.getType()).getHadoopConfigurationDirectory();
     }
 
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
 
+    }
 }
\ No newline at end of file

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/LocalDirectorySetupHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/LocalDirectorySetupHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/LocalDirectorySetupHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/LocalDirectorySetupHandler.java Tue Apr 23 19:03:10 2013
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.handler;
 
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
@@ -28,6 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.util.Map;
 
 public class LocalDirectorySetupHandler implements GFacHandler{
     private static final Logger log = LoggerFactory.getLogger(LocalDirectorySetupHandler.class);
@@ -52,6 +54,9 @@ public class LocalDirectorySetupHandler 
            } else if (!new File(dir).mkdir()) {
                throw new GFacHandlerException("Cannot make directory "+dir, jobExecutionContext);
            }
-       }
+    }
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
 
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java Tue Apr 23 19:03:10 2013
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.handler;
 
 import java.io.IOException;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import net.schmizz.sshj.connection.ConnectionException;
@@ -38,7 +39,7 @@ import org.slf4j.LoggerFactory;
 
 public class SCPDirectorySetupHandler implements GFacHandler{
     private static final Logger log = LoggerFactory.getLogger(SCPDirectorySetupHandler.class);
-	@Override
+
 	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException,GFacException {
 		log.info("Setup SSH job directorties");
 		makeDirectory(jobExecutionContext);
@@ -77,4 +78,8 @@ public class SCPDirectorySetupHandler im
 			securityContext.closeSession(session);
 		}
 	}
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPInputHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPInputHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPInputHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPInputHandler.java Tue Apr 23 19:03:10 2013
@@ -22,10 +22,7 @@ package org.apache.airavata.gfac.handler
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import net.schmizz.sshj.xfer.scp.SCPFileTransfer;
 
@@ -45,7 +42,7 @@ public class SCPInputHandler implements 
 
 	private static final Logger log = LoggerFactory.getLogger(SCPInputHandler.class);
 
-	@Override
+
 	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException,GFacException {
 
 		  log.info("Invoking SCPInputHandler");
@@ -88,4 +85,8 @@ public class SCPInputHandler implements 
 		 fileTransfer.upload(inputFile.getAbsolutePath(), remoteFile);
 		 return remoteFile;
 	 }
+
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPOutputHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPOutputHandler.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPOutputHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPOutputHandler.java Tue Apr 23 19:03:10 2013
@@ -30,6 +30,7 @@ import net.schmizz.sshj.transport.Transp
 import net.schmizz.sshj.xfer.scp.SCPFileTransfer;
 
 import org.apache.airavata.commons.gfac.type.ActualParameter;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.security.SSHSecurityContext;
 import org.apache.airavata.gfac.utils.GFacUtils;
@@ -39,7 +40,7 @@ import org.apache.xmlbeans.XmlException;
 
 public class SCPOutputHandler implements GFacHandler{
 
-	@Override
+
 	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
 		ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
 		try {
@@ -78,4 +79,7 @@ public class SCPOutputHandler implements
 
 	}
 
+    public void init(Map<String, String> properties) throws GFacHandlerException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java Tue Apr 23 19:03:10 2013
@@ -23,9 +23,13 @@ package org.apache.airavata.gfac.provide
 
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
+import org.apache.airavata.schemas.gfac.HadoopHostType;
+
+import java.util.Map;
 
 public interface GFacProvider {
 
+    void initProperties(Map<String,String> properties) throws GFacProviderException,GFacException;
     /**
      * Initialize environment required for invoking the execute method of the provider. If environment setup is
      * done during the in handler execution, validation of environment will go here.

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProviderConfig.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProviderConfig.java?rev=1471096&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProviderConfig.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProviderConfig.java Tue Apr 23 19:03:10 2013
@@ -0,0 +1,51 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gfac.provider;
+
+import java.util.Map;
+
+public class GFacProviderConfig {
+
+    public GFacProviderConfig(Map<String, String> properties, String className) {
+        this.properties = properties;
+        this.className = className;
+    }
+
+    private Map<String, String> properties;
+
+    private String className;
+
+    public void setProperties(Map<String, String> properties) {
+        this.properties = properties;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public Map<String, String> getProperties() {
+        return properties;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+}

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java Tue Apr 23 19:03:10 2013
@@ -25,12 +25,7 @@ import java.io.BufferedOutputStream;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
@@ -70,7 +65,6 @@ public class BESProvider implements GFac
     
     
         
-    @Override
 	public void initialize(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException, GFacException {
 		
@@ -80,7 +74,7 @@ public class BESProvider implements GFac
 
 	}
 
-	@Override
+
 	public void execute(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException {
 		UnicoreHostType host = (UnicoreHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType();
@@ -169,7 +163,6 @@ public class BESProvider implements GFac
 		} 
 	}
 
-	@Override
 	public void dispose(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException {
 		secProperties = null;
@@ -288,4 +281,8 @@ public class BESProvider implements GFac
 		}
 		
 	}
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
+
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java Tue Apr 23 19:03:10 2013
@@ -62,6 +62,7 @@ import java.security.NoSuchAlgorithmExce
 import java.security.spec.InvalidKeySpecException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 public class EC2Provider implements GFacProvider {
 
@@ -526,5 +527,8 @@ public class EC2Provider implements GFac
         }
         return ret;
     }
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
 
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java Tue Apr 23 19:03:10 2013
@@ -41,6 +41,8 @@ import org.ietf.jgss.GSSException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Map;
+
 public class GramProvider implements GFacProvider {
     private static final Logger log = LoggerFactory.getLogger(GramJobSubmissionListener.class);
 
@@ -141,4 +143,8 @@ public class GramProvider implements GFa
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
     }
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java Tue Apr 23 19:03:10 2013
@@ -22,6 +22,7 @@
 package org.apache.airavata.gfac.provider.impl;
 
 import org.apache.airavata.commons.gfac.type.ActualParameter;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.gfac.provider.GFacProvider;
@@ -138,4 +139,8 @@ public class HadoopProvider implements G
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
         // TODO: How to handle cluster shutdown. Best way is to introduce inPath/outPath to handler.
     }
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java Tue Apr 23 19:03:10 2013
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.provider.impl;
 
 import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.notification.events.StartExecutionEvent;
 import org.apache.airavata.gfac.provider.GFacProvider;
@@ -156,4 +157,8 @@ public class LocalProvider implements GF
             }
         }
     }
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java Tue Apr 23 19:03:10 2013
@@ -61,7 +61,6 @@ public class SSHProvider implements GFac
 	private static final Logger log = LoggerFactory.getLogger(SSHProvider.class);
 	private SSHSecurityContext securityContext;
 
-	@Override
 	public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
 		securityContext = (SSHSecurityContext) jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT);
 		ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
@@ -76,7 +75,6 @@ public class SSHProvider implements GFac
 		}
 	}
 
-	@Override
 	public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
 		ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
 		Session session = null;
@@ -113,7 +111,6 @@ public class SSHProvider implements GFac
 
 	}
 
-	@Override
 	public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
 	}
 
@@ -192,5 +189,8 @@ public class SSHProvider implements GFac
 
 		return shellScript;
 	}
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
 
 }

Modified: airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/ParamChemTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/ParamChemTest.java?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/ParamChemTest.java (original)
+++ airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/ParamChemTest.java Tue Apr 23 19:03:10 2013
@@ -37,6 +37,7 @@ import org.apache.airavata.gfac.context.
 import org.apache.airavata.gfac.context.JobExecutionContext;
 import org.apache.airavata.gfac.context.MessageContext;
 import org.apache.airavata.gfac.context.security.GSISecurityContext;
+import org.apache.airavata.gfac.handler.GFacHandlerConfig;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.DataType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
@@ -67,8 +68,8 @@ public class ParamChemTest {
 		context.setTrustedCertLoc("./certificates");
 
         //have to set InFlwo Handlers and outFlowHandlers
-        gFacConfiguration.setInHandlers(Arrays.asList(new String[]{"org.apache.airavata.gfac.handler.GramDirectorySetupHandler", "org.apache.airavata.gfac.handler.GridFTPInputHandler"}));
-        gFacConfiguration.setOutHandlers(Arrays.asList(new String[] {"org.apache.airavata.gfac.handler.GridFTPOutputHandler"}));
+        gFacConfiguration.setInHandlers(Arrays.asList(new GFacHandlerConfig[]{new GFacHandlerConfig(null,"org.apache.airavata.gfac.handler.GramDirectorySetupHandler"), new GFacHandlerConfig(null,"org.apache.airavata.gfac.handler.GridFTPInputHandler")}));
+        gFacConfiguration.setOutHandlers(Arrays.asList(new GFacHandlerConfig[] {new GFacHandlerConfig(null,"org.apache.airavata.gfac.handler.GridFTPOutputHandler")}));
         /*
         * Host
         */

Modified: airavata/trunk/modules/gfac-core/src/test/resources/gfac-config.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/test/resources/gfac-config.xml?rev=1471096&r1=1471095&r2=1471096&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/test/resources/gfac-config.xml (original)
+++ airavata/trunk/modules/gfac-core/src/test/resources/gfac-config.xml Tue Apr 23 19:03:10 2013
@@ -13,7 +13,9 @@
 <GFac>
     <GlobalHandlers>
         <InHandlers>
-            <Handler class="org.apache.airavata.gfac.handler.AppDescriptorCheckHandler"/>
+            <Handler class="org.apache.airavata.gfac.handler.AppDescriptorCheckHandler">
+                    <property name="name" value="value"/>
+            </Handler>
         </InHandlers>
         <OutHandlers></OutHandlers>
     </GlobalHandlers>
@@ -23,8 +25,11 @@
         </InHandlers>
     </Provider>
     <Provider class="org.apache.airavata.gfac.provider.impl.GramProvider">
+        <property name="name" value="value"/>
         <InHandlers>
-            <Handler class="org.apache.airavata.gfac.handler.GramDirectorySetupHandler"/>
+            <Handler class="org.apache.airavata.gfac.handler.GramDirectorySetupHandler">
+                    <property name="name" value="value"/>
+            </Handler>
             <Handler class="org.apache.airavata.gfac.handler.GridFTPInputHandler"/>
         </InHandlers>
         <OutHandlers>



Mime
View raw message