You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/06/04 22:15:14 UTC

[01/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Repository: airavata
Updated Branches:
  refs/heads/master 4d9ed53e3 -> b4ede9cbe


http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
deleted file mode 100644
index 1741833..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
+++ /dev/null
@@ -1,758 +0,0 @@
-/*
- *
- * 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.gsi.ssh.util;
-
-import com.jcraft.jsch.*;
-
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.impl.StandardOutReader;
-import org.apache.airavata.gsi.ssh.jsch.ExtendedJSch;
-import org.slf4j.*;
-
-import java.io.*;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * This class is going to be useful to SCP a file to a remote grid machine using my proxy credentials
- */
-public class SSHUtils {
-    private static final org.slf4j.Logger log = LoggerFactory.getLogger(SSHUtils.class);
-
-    static {
-        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
-        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
-
-    }
-
-    private ServerInfo serverInfo;
-
-    private GSIAuthenticationInfo authenticationInfo;
-
-    private ConfigReader configReader;
-
-    /**
-     * We need to pass certificateLocation when we use SCPTo method standalone
-     *
-     * @param serverInfo
-     * @param authenticationInfo
-     * @param certificateLocation
-     * @param configReader
-     */
-    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo, String certificateLocation, ConfigReader configReader) {
-        System.setProperty("X509_CERT_DIR", certificateLocation);
-        this.serverInfo = serverInfo;
-        this.authenticationInfo = authenticationInfo;
-        this.configReader = configReader;
-    }
-
-    /**
-     * This can be used when use SCPTo method within SSHAPi because SSHApiFactory already set the system property certificateLocation
-     *
-     * @param serverInfo
-     * @param authenticationInfo
-     * @param configReader
-     */
-    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo
-            , ConfigReader configReader) {
-        this.serverInfo = serverInfo;
-        this.authenticationInfo = authenticationInfo;
-        this.configReader = configReader;
-    }
-
-    /**
-     * This  method will scp the lFile to the rFile location
-     *
-     * @param rFile remote file Path to use in scp
-     * @param lFile local file path to use in scp
-     * @throws IOException
-     * @throws JSchException
-     * @throws org.apache.airavata.gsi.ssh.api.SSHApiException
-     *
-     */
-    public void scpTo(String rFile, String lFile) throws IOException, JSchException, SSHApiException {
-        FileInputStream fis = null;
-        String prefix = null;
-        if (new File(lFile).isDirectory()) {
-            prefix = lFile + File.separator;
-        }
-        JSch jsch = new JSch();
-
-        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
-                + serverInfo.getUserName());
-
-        Session session = null;
-
-        try {
-            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while creating SSH session." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        java.util.Properties config = this.configReader.getProperties();
-        session.setConfig(config);
-
-        // Not a good way, but we dont have any choice
-        if (session instanceof ExtendedSession) {
-            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
-        }
-
-        try {
-            session.connect();
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        boolean ptimestamp = true;
-
-        // exec 'scp -t rfile' remotely
-        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + rFile;
-        Channel channel = session.openChannel("exec");
-
-        StandardOutReader stdOutReader = new StandardOutReader();
-        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-        ((ChannelExec) channel).setCommand(command);
-
-        // get I/O streams for remote scp
-        OutputStream out = channel.getOutputStream();
-        InputStream in = channel.getInputStream();
-
-        channel.connect();
-
-        if (checkAck(in) != 0) {
-            String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-
-        File _lfile = new File(lFile);
-
-        if (ptimestamp) {
-            command = "T" + (_lfile.lastModified() / 1000) + " 0";
-            // The access time should be sent here,
-            // but it is not accessible with JavaAPI ;-<
-            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
-            out.write(command.getBytes());
-            out.flush();
-            if (checkAck(in) != 0) {
-                 String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-            }
-        }
-
-        // send "C0644 filesize filename", where filename should not include '/'
-        long filesize = _lfile.length();
-        command = "C0644 " + filesize + " ";
-        if (lFile.lastIndexOf('/') > 0) {
-            command += lFile.substring(lFile.lastIndexOf('/') + 1);
-        } else {
-            command += lFile;
-        }
-        command += "\n";
-        out.write(command.getBytes());
-        out.flush();
-        if (checkAck(in) != 0) {
-            String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-
-        // send a content of lFile
-        fis = new FileInputStream(lFile);
-        byte[] buf = new byte[1024];
-        while (true) {
-            int len = fis.read(buf, 0, buf.length);
-            if (len <= 0) break;
-            out.write(buf, 0, len); //out.flush();
-        }
-        fis.close();
-        fis = null;
-        // send '\0'
-        buf[0] = 0;
-        out.write(buf, 0, 1);
-        out.flush();
-        if (checkAck(in) != 0) {
-             String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-        out.close();
-
-        stdOutReader.onOutput(channel);
-
-
-        if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-        channel.disconnect();
-    }
-
-    /**
-     * This will copy a local file to a remote location
-     *
-     * @param remoteFile remote location you want to transfer the file, this cannot be a directory, if user pass
-     *                   a dirctory we do copy it to that directory but we simply return the directory name
-     *                   todo handle the directory name as input and return the proper final output file name
-     * @param localFile  Local file to transfer, this can be a directory
-     * @param session
-     * @return returns the final remote file path, so that users can use the new file location
-     * @throws IOException
-     * @throws JSchException
-     * @throws SSHApiException
-     */
-    public static String scpTo(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
-        FileInputStream fis = null;
-        String prefix = null;
-        if (new File(localFile).isDirectory()) {
-            prefix = localFile + File.separator;
-        }
-        boolean ptimestamp = true;
-
-        // exec 'scp -t rfile' remotely
-        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + remoteFile;
-        Channel channel = session.openChannel("exec");
-
-        StandardOutReader stdOutReader = new StandardOutReader();
-        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-        ((ChannelExec) channel).setCommand(command);
-
-        // get I/O streams for remote scp
-        OutputStream out = channel.getOutputStream();
-        InputStream in = channel.getInputStream();
-
-        channel.connect();
-
-        if (checkAck(in) != 0) {
-             String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-
-        File _lfile = new File(localFile);
-
-        if (ptimestamp) {
-            command = "T" + (_lfile.lastModified() / 1000) + " 0";
-            // The access time should be sent here,
-            // but it is not accessible with JavaAPI ;-<
-            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
-            out.write(command.getBytes());
-            out.flush();
-            if (checkAck(in) != 0) {
-                 String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-            }
-        }
-
-        // send "C0644 filesize filename", where filename should not include '/'
-        long filesize = _lfile.length();
-        command = "C0644 " + filesize + " ";
-        if (localFile.lastIndexOf('/') > 0) {
-            command += localFile.substring(localFile.lastIndexOf('/') + 1);
-        } else {
-            command += localFile;
-        }
-        command += "\n";
-        out.write(command.getBytes());
-        out.flush();
-        if (checkAck(in) != 0) {
-            String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-
-        // send a content of lFile
-        fis = new FileInputStream(localFile);
-        byte[] buf = new byte[1024];
-        while (true) {
-            int len = fis.read(buf, 0, buf.length);
-            if (len <= 0) break;
-            out.write(buf, 0, len); //out.flush();
-        }
-        fis.close();
-        fis = null;
-        // send '\0'
-        buf[0] = 0;
-        out.write(buf, 0, 1);
-        out.flush();
-        if (checkAck(in) != 0) {
-            String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
-        }
-        out.close();
-        stdOutReader.onOutput(channel);
-
-
-        channel.disconnect();
-        if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-        //since remote file is always a file  we just return the file
-        return remoteFile;
-    }
-
-    /**
-     * This method will copy a remote file to a local directory
-     *
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile  This is the local file to copy, this can be a directory too
-     * @param session
-     * @return returns the final local file path of the new file came from the remote resource
-     */
-    public static void scpFrom(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
-        FileOutputStream fos = null;
-        try {
-            String prefix = null;
-            if (new File(localFile).isDirectory()) {
-                prefix = localFile + File.separator;
-            }
-
-            // exec 'scp -f remotefile' remotely
-            String command = "scp -f " + remoteFile;
-            Channel channel = session.openChannel("exec");
-            ((ChannelExec) channel).setCommand(command);
-
-            StandardOutReader stdOutReader = new StandardOutReader();
-            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-            // get I/O streams for remote scp
-            OutputStream out = channel.getOutputStream();
-            InputStream in = channel.getInputStream();
-
-            channel.connect();
-
-            byte[] buf = new byte[1024];
-
-            // send '\0'
-            buf[0] = 0;
-            out.write(buf, 0, 1);
-            out.flush();
-
-            while (true) {
-                int c = checkAck(in);
-                if (c != 'C') {
-                    break;
-                }
-
-                // read '0644 '
-                in.read(buf, 0, 5);
-
-                long filesize = 0L;
-                while (true) {
-                    if (in.read(buf, 0, 1) < 0) {
-                        // error
-                        break;
-                    }
-                    if (buf[0] == ' ') break;
-                    filesize = filesize * 10L + (long) (buf[0] - '0');
-                }
-
-                String file = null;
-                for (int i = 0; ; i++) {
-                    in.read(buf, i, 1);
-                    if (buf[i] == (byte) 0x0a) {
-                        file = new String(buf, 0, i);
-                        break;
-                    }
-                }
-
-                //System.out.println("filesize="+filesize+", file="+file);
-
-                // send '\0'
-                buf[0] = 0;
-                out.write(buf, 0, 1);
-                out.flush();
-
-                // read a content of lfile
-                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
-                int foo;
-                while (true) {
-                    if (buf.length < filesize) foo = buf.length;
-                    else foo = (int) filesize;
-                    foo = in.read(buf, 0, foo);
-                    if (foo < 0) {
-                        // error
-                        break;
-                    }
-                    fos.write(buf, 0, foo);
-                    filesize -= foo;
-                    if (filesize == 0L) break;
-                }
-                fos.close();
-                fos = null;
-
-                if (checkAck(in) != 0) {
-                    String error = "Error transfering the file content";
-                    log.error(error);
-                    throw new SSHApiException(error);
-                }
-
-                // send '\0'
-                buf[0] = 0;
-                out.write(buf, 0, 1);
-                out.flush();
-            }
-            stdOutReader.onOutput(channel);
-            if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        } finally {
-            try {
-                if (fos != null) fos.close();
-            } catch (Exception ee) {
-            }
-        }
-    }
-
-    /**
-     * This method will copy a remote file to a local directory
-     *
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile  This is the local file to copy, this can be a directory too
-     */
-    public void scpFrom(String remoteFile, String localFile) throws SSHApiException {
-        JSch jsch = new JSch();
-
-        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
-                + serverInfo.getUserName());
-
-        Session session = null;
-
-        try {
-            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while creating SSH session." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        java.util.Properties config = this.configReader.getProperties();
-        session.setConfig(config);
-
-        // Not a good way, but we dont have any choice
-        if (session instanceof ExtendedSession) {
-            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
-        }
-
-        try {
-            session.connect();
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        FileOutputStream fos = null;
-        try {
-            String prefix = null;
-            if (new File(localFile).isDirectory()) {
-                prefix = localFile + File.separator;
-            }
-
-            // exec 'scp -f remotefile' remotely
-            StandardOutReader stdOutReader = new StandardOutReader();
-            String command = "scp -f " + remoteFile;
-            Channel channel = session.openChannel("exec");
-            ((ChannelExec) channel).setCommand(command);
-            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-            // get I/O streams for remote scp
-            OutputStream out = channel.getOutputStream();
-            InputStream in = channel.getInputStream();
-
-            channel.connect();
-
-            byte[] buf = new byte[1024];
-
-            // send '\0'
-            buf[0] = 0;
-            out.write(buf, 0, 1);
-            out.flush();
-
-            while (true) {
-                int c = checkAck(in);
-                if (c != 'C') {
-                    break;
-                }
-
-                // read '0644 '
-                in.read(buf, 0, 5);
-
-                long filesize = 0L;
-                while (true) {
-                    if (in.read(buf, 0, 1) < 0) {
-                        // error
-                        break;
-                    }
-                    if (buf[0] == ' ') break;
-                    filesize = filesize * 10L + (long) (buf[0] - '0');
-                }
-
-                String file = null;
-                for (int i = 0; ; i++) {
-                    in.read(buf, i, 1);
-                    if (buf[i] == (byte) 0x0a) {
-                        file = new String(buf, 0, i);
-                        break;
-                    }
-                }
-
-                //System.out.println("filesize="+filesize+", file="+file);
-
-                // send '\0'
-                buf[0] = 0;
-                out.write(buf, 0, 1);
-                out.flush();
-
-                // read a content of lfile
-                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
-                int foo;
-                while (true) {
-                    if (buf.length < filesize) foo = buf.length;
-                    else foo = (int) filesize;
-                    foo = in.read(buf, 0, foo);
-                    if (foo < 0) {
-                        // error
-                        break;
-                    }
-                    fos.write(buf, 0, foo);
-                    filesize -= foo;
-                    if (filesize == 0L) break;
-                }
-                fos.close();
-                fos = null;
-
-                if (checkAck(in) != 0) {
-                    String error = "Error transfering the file content";
-                    log.error(error);
-                    throw new SSHApiException(error);
-                }
-
-                // send '\0'
-                buf[0] = 0;
-                out.write(buf, 0, 1);
-                out.flush();
-            }
-
-//            session.disconnect();
-
-            stdOutReader.onOutput(channel);
-            if (stdOutReader.getStdErrorString().contains("scp:")) {
-                throw new SSHApiException(stdOutReader.getStdErrorString());
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        } finally {
-            try {
-                if (fos != null) fos.close();
-            } catch (Exception ee) {
-            }
-        }
-    }
-
-    /**
-     * This method will copy a remote file to a local directory
-     *
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile  This is the local file to copy, this can be a directory too
-     * @param session
-     * @return returns the final local file path of the new file came from the remote resource
-     */
-    public static void scpThirdParty(String remoteFileSource, String remoteFileTarget, Session session) throws IOException, JSchException, SSHApiException {
-        FileOutputStream fos = null;
-        try {
-            String prefix = null;
-         
-            // exec 'scp -f remotefile' remotely
-            String command = "scp -3 " + remoteFileSource + " " + remoteFileTarget;
-            Channel channel = session.openChannel("exec");
-            ((ChannelExec) channel).setCommand(command);
-
-            StandardOutReader stdOutReader = new StandardOutReader();
-            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-            // get I/O streams for remote scp
-            OutputStream out = channel.getOutputStream();
-            InputStream in = channel.getInputStream();
-
-            channel.connect();
-
-            byte[] buf = new byte[1024];
-
-            // send '\0'
-            buf[0] = 0;
-            out.write(buf, 0, 1);
-            out.flush();
-
-            while (true) {
-                int c = checkAck(in);
-                if (c != 'C') {
-                    break;
-                }
-
-                // read '0644 '
-                in.read(buf, 0, 5);
-
-                long filesize = 0L;
-                while (true) {
-                    if (in.read(buf, 0, 1) < 0) {
-                        // error
-                        break;
-                    }
-                    if (buf[0] == ' ') break;
-                    filesize = filesize * 10L + (long) (buf[0] - '0');
-                }
-                int foo;
-                while (true) {
-                	   if (buf.length < filesize) foo = buf.length;
-                       else foo = (int) filesize;
-                    
-                    int len = in.read(buf, 0, foo);
-                    if (len <= 0) break;
-                    out.write(buf, 0, len); 
-                }
-             // send '\0'
-                buf[0] = 0;
-                out.write(buf, 0, 1);
-                out.flush();
-                if (checkAck(in) != 0) {
-                    String error = "Error transfering the file content";
-                    log.error(error);
-                    throw new SSHApiException(error);
-                }
-
-            }
-            out.close();
-
-            stdOutReader.onOutput(channel);
-            if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        } finally {
-            try {
-                if (fos != null) fos.close();
-            } catch (Exception ee) {
-            }
-        }
-    }
-
-    public static void makeDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
-
-        // exec 'scp -t rfile' remotely
-        String command = "mkdir -p " + path;
-        Channel channel = session.openChannel("exec");
-        StandardOutReader stdOutReader = new StandardOutReader();
-
-        ((ChannelExec) channel).setCommand(command);
-
-
-        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-        try {
-            channel.connect();
-        } catch (JSchException e) {
-
-            channel.disconnect();
-//            session.disconnect();
-
-            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
-                    " on server - " + session.getHost() + ":" + session.getPort() +
-                    " connecting user name - "
-                    + session.getUserName(), e);
-        }
-        stdOutReader.onOutput(channel);
-        if (stdOutReader.getStdErrorString().contains("mkdir:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-
-        channel.disconnect();
-    }
-
-    public static List<String> listDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
-
-        // exec 'scp -t rfile' remotely
-        String command = "ls " + path;
-        Channel channel = session.openChannel("exec");
-        StandardOutReader stdOutReader = new StandardOutReader();
-
-        ((ChannelExec) channel).setCommand(command);
-
-
-        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
-        try {
-            channel.connect();
-        } catch (JSchException e) {
-
-            channel.disconnect();
-//            session.disconnect();
-
-            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
-                    " on server - " + session.getHost() + ":" + session.getPort() +
-                    " connecting user name - "
-                    + session.getUserName(), e);
-        }
-        stdOutReader.onOutput(channel);
-        stdOutReader.getStdOutputString();
-        if (stdOutReader.getStdErrorString().contains("ls:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
-        channel.disconnect();
-        return Arrays.asList(stdOutReader.getStdOutputString().split("\n"));
-    }
-
-    static int checkAck(InputStream in) throws IOException {
-        int b = in.read();
-        if (b == 0) return b;
-        if (b == -1) return b;
-
-        if (b == 1 || b == 2) {
-            StringBuffer sb = new StringBuffer();
-            int c;
-            do {
-                c = in.read();
-                sb.append((char) c);
-            }
-            while (c != '\n');
-            if (b == 1) { // error
-                System.out.print(sb.toString());
-            }
-            if (b == 2) { // fatal error
-                System.out.print(sb.toString());
-            }
-        }
-        return b;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/resources/schemas/gsissh-schemas.xsdconfig
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/resources/schemas/gsissh-schemas.xsdconfig b/tools/gsissh/src/main/resources/schemas/gsissh-schemas.xsdconfig
index 6be14f8..a46cadc 100644
--- a/tools/gsissh/src/main/resources/schemas/gsissh-schemas.xsdconfig
+++ b/tools/gsissh/src/main/resources/schemas/gsissh-schemas.xsdconfig
@@ -9,6 +9,6 @@
 <xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
 
     <xb:namespace uri="http://airavata.apache.org/schemas/gsi/ssh/2012/12">
-        <xb:package>org.apache.airavata.gsi.ssh</xb:package>
+        <xb:package>org.apache.airavata.gfac.ssh</xb:package>
     </xb:namespace>
 </xb:config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
new file mode 100644
index 0000000..a90dcba
--- /dev/null
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.ssh.config;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ConfigReaderTest {
+
+    @Test
+    public void testGetConfiguration() throws Exception {
+
+        System.out.println("Test case name " + this.getClass().getName());
+        ConfigReader configReader = new ConfigReader();
+        Assert.assertEquals(configReader.getConfiguration("StrictHostKeyChecking"), "no");
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
new file mode 100644
index 0000000..61a7437
--- /dev/null
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyAuthentication;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+
+public class DefaultSSHApiTestWithMyProxyAuth {
+    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
+
+
+
+    public void tearDown() throws Exception {
+    }
+
+
+    public static void main(String[]ars) throws IOException {
+         String myProxyUserName = "lg11w";
+
+//        DefaultPasswordAuthenticationInfo authenticationInfo
+//                = new DefaultPasswordAuthenticationInfo("");
+        byte[] privateKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa")));
+        byte[] publicKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa.pub")));
+        DefaultPublicKeyAuthentication authenticationInfo = new DefaultPublicKeyAuthentication(privateKey,publicKey,"");
+
+        // Create command
+        CommandInfo commandInfo = new RawCommandInfo("source /etc/bashrc; bsub </home/lg11w/mywork/sshEchoExperiment_9d267072-ca65-4ca8-847a-cd3d130f6050/366787899.lsf");
+
+        // Server info
+        //Stampede
+//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "stampede.tacc.utexas.edu", 2222);
+        //Trestles
+//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "trestles.sdsc.xsede.org", 22);
+        
+        //Lonestar
+         ServerInfo serverInfo = new ServerInfo(myProxyUserName, "ghpcc06.umassrc.org", 22);
+        // Output
+        CommandOutput commandOutput = new SystemCommandOutput();
+
+        // Execute command
+        try {
+            CommandExecutor.executeCommand(commandInfo, serverInfo, authenticationInfo, commandOutput, new ConfigReader());
+        } catch (SSHApiException e) {
+            log.error(e.getMessage(), e);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
new file mode 100644
index 0000000..6f2840f
--- /dev/null
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
@@ -0,0 +1,262 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.testng.AssertJUnit;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+public class VanilaTestWithSSHAuth {
+
+    private String userName;
+    private String password;
+    private String passPhrase;
+    private String hostName;
+    private String workingDirectory;
+    private String privateKeyPath;
+    private String publicKeyPath;
+    private String path;
+
+    @BeforeTest
+    public void setUp() throws Exception {
+        System.out.println("Test case name " + this.getClass().getName());
+        //Trestles
+        this.hostName = "trestles.sdsc.xsede.org";      
+        this.userName = "ogce";
+        this.path="/opt/torque/bin/";
+        //Stampede:
+//        this.hostName = "stampede.tacc.xsede.org";        
+//        this.userName = "ogce";
+//        this.path="/usr/bin";
+        //Lonestar:
+//         this.hostName = "lonestar.tacc.utexas.edu";        
+//         this.userName = "us3";
+//        this.path="/opt/sge6.2/bin/lx24-amd64";
+        //Alamo:
+//        this.hostName = "alamo.uthscsa.edu";        
+//        this.userName = "raminder";
+//        this.path="/opt/torque/bin/";
+        //Bigred:
+//        this.hostName = "bigred2.uits.iu.edu";        
+//        this.userName = "cgateway";
+//        this.path="/opt/torque/torque-5.0.1/bin/";
+        
+        System.setProperty("ssh.host",hostName);
+        System.setProperty("ssh.username", userName);
+        System.setProperty("private.ssh.key", "/home/lginnali/.ssh/id_dsa");
+        System.setProperty("public.ssh.key", "/home/lginnali/.ssh/id_dsa.pub");
+        System.setProperty("ssh.working.directory", "/tmp");
+
+        this.hostName = System.getProperty("ssh.host");
+        this.userName = System.getProperty("ssh.username");
+        this.password = System.getProperty("ssh.password");
+        this.privateKeyPath = System.getProperty("private.ssh.key");
+        this.publicKeyPath = System.getProperty("public.ssh.key");
+        
+        System.setProperty("ssh.keypass", "");
+        this.passPhrase = System.getProperty("ssh.keypass");
+        this.workingDirectory = System.getProperty("ssh.working.directory");
+
+
+        if (this.userName == null
+                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
+            System.out.println("########### In order to test you have to either username password or private,public keys");
+            System.out.println("Use -Dssh.user=xxx -Dssh.password=yyy -Dssh.private.key.passphrase=zzz " +
+                    "-Dssh.private.key.path -Dssh.public.key.path -Dssh.working.directory ");
+        }
+    }
+
+
+    @Test
+    public void testSimplePBSJob() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
+
+        String date = new Date().toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        String pomFile =  new File("").getAbsolutePath() + File.separator + "pom.xml";
+
+        workingDirectory = workingDirectory + File.separator
+                + date + "_" + UUID.randomUUID();
+        pbsCluster.makeDirectory(workingDirectory);
+        Thread.sleep(1000);
+        pbsCluster.makeDirectory(workingDirectory + File.separator + "inputs");
+        Thread.sleep(1000);
+        pbsCluster.makeDirectory(workingDirectory + File.separator + "outputs");
+
+
+        // doing file transfer to the remote resource
+        String remoteLocation = workingDirectory + File.separator + "inputs";
+        pbsCluster.scpTo(remoteLocation, pomFile);
+
+        int i = pomFile.lastIndexOf(File.separator);
+        String fileName = pomFile.substring(i + 1);
+        // constructing the job object
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("normal");
+        jobDescriptor.setMaxWallTime("5");
+        //jobDescriptor.setJobSubmitter("aprun -n 1");
+        List<String> inputs = new ArrayList<String>();
+        inputs.add(remoteLocation + File.separator + fileName);
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        if(hostName.contains("trestles")){
+        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+        System.out.println("JobID returned : " + jobID);
+
+//        Cluster cluster = sshApi.getCluster(serverInfo, authenticationInfo);
+        Thread.sleep(1000);
+        JobDescriptor jobById = pbsCluster.getJobDescriptorById(jobID);
+
+        //printing job data got from previous call
+        AssertJUnit.assertEquals(jobById.getJobId(), jobID);
+        System.out.println(jobById.getAcountString());
+        System.out.println(jobById.getAllEnvExport());
+        System.out.println(jobById.getCompTime());
+        System.out.println(jobById.getExecutablePath());
+        System.out.println(jobById.getEllapsedTime());
+        System.out.println(jobById.getQueueName());
+        System.out.println(jobById.getExecuteNode());
+        System.out.println(jobById.getJobName());
+        System.out.println(jobById.getCTime());
+        System.out.println(jobById.getSTime());
+        System.out.println(jobById.getMTime());
+        System.out.println(jobById.getCompTime());
+        System.out.println(jobById.getOwner());
+        System.out.println(jobById.getQTime());
+        System.out.println(jobById.getUsedCPUTime());
+        System.out.println(jobById.getUsedMemory());
+        System.out.println(jobById.getVariableList());
+        }
+    }
+
+    @Test
+    public void testSimpleLSFJob() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+
+
+        // constructing the job object
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setMailAddress("test@gmail.com");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("long");
+        jobDescriptor.setMaxWallTimeForLSF("5");
+        jobDescriptor.setJobSubmitter("mpiexec");
+        jobDescriptor.setModuleLoadCommands(new String[]{"module load openmpi/1.6.5"});
+        jobDescriptor.setUsedMemory("1000");
+        jobDescriptor.setChassisName("01");
+
+        //jobDescriptor.setJobSubmitter("aprun -n 1");
+        List<String> inputs = new ArrayList<String>();
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        Cluster pbsCluster = new PBSCluster(CommonUtils.getLSFJobManager(""));
+        ((PBSCluster) pbsCluster).generateJobScript(jobDescriptor);
+    }
+
+    @Test
+    public void testSCPFromAndSCPTo() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
+        new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));;
+
+        String date = new Date().toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        String pomFile = (new File(".")).getAbsolutePath() + File.separator + "pom.xml";
+        File file = new File(pomFile);
+        if(!file.exists()){
+            file.createNewFile();
+        }
+        // Constructing theworking directory for demonstration and creating directories in the remote
+        // resource
+        workingDirectory = workingDirectory + File.separator
+                + date + "_" + UUID.randomUUID();
+        pbsCluster.makeDirectory(workingDirectory);
+        pbsCluster.scpTo(workingDirectory, pomFile);
+        Thread.sleep(1000);
+        pbsCluster.scpFrom(workingDirectory + File.separator + "pom.xml", (new File(".")).getAbsolutePath());
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/ConfigReaderTest.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/ConfigReaderTest.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/ConfigReaderTest.java
deleted file mode 100644
index ba5bf6a..0000000
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/ConfigReaderTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * 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.gsi.ssh.config;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class ConfigReaderTest {
-
-    @Test
-    public void testGetConfiguration() throws Exception {
-
-        System.out.println("Test case name " + this.getClass().getName());
-        ConfigReader configReader = new ConfigReader();
-        Assert.assertEquals(configReader.getConfiguration("StrictHostKeyChecking"), "no");
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
deleted file mode 100644
index 7a2fce3..0000000
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import junit.framework.Assert;
-import org.apache.airavata.gsi.ssh.api.*;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyAuthentication;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.AssertJUnit;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-public class DefaultSSHApiTestWithMyProxyAuth {
-    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
-
-
-
-    public void tearDown() throws Exception {
-    }
-
-
-    public static void main(String[]ars) throws IOException {
-         String myProxyUserName = "lg11w";
-
-//        DefaultPasswordAuthenticationInfo authenticationInfo
-//                = new DefaultPasswordAuthenticationInfo("");
-        byte[] privateKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa")));
-        byte[] publicKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa.pub")));
-        DefaultPublicKeyAuthentication authenticationInfo = new DefaultPublicKeyAuthentication(privateKey,publicKey,"");
-
-        // Create command
-        CommandInfo commandInfo = new RawCommandInfo("source /etc/bashrc; bsub </home/lg11w/mywork/sshEchoExperiment_9d267072-ca65-4ca8-847a-cd3d130f6050/366787899.lsf");
-
-        // Server info
-        //Stampede
-//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "stampede.tacc.utexas.edu", 2222);
-        //Trestles
-//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "trestles.sdsc.xsede.org", 22);
-        
-        //Lonestar
-         ServerInfo serverInfo = new ServerInfo(myProxyUserName, "ghpcc06.umassrc.org", 22);
-        // Output
-        CommandOutput commandOutput = new SystemCommandOutput();
-
-        // Execute command
-        try {
-            CommandExecutor.executeCommand(commandInfo, serverInfo, authenticationInfo, commandOutput, new ConfigReader());
-        } catch (SSHApiException e) {
-            log.error(e.getMessage(), e);
-        } catch (IOException e) {
-            log.error(e.getMessage(), e);
-        }
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
deleted file mode 100644
index 186aca6..0000000
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import org.apache.airavata.gsi.ssh.api.*;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.testng.AssertJUnit;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-public class VanilaTestWithSSHAuth {
-
-    private String userName;
-    private String password;
-    private String passPhrase;
-    private String hostName;
-    private String workingDirectory;
-    private String privateKeyPath;
-    private String publicKeyPath;
-    private String path;
-
-    @BeforeTest
-    public void setUp() throws Exception {
-        System.out.println("Test case name " + this.getClass().getName());
-        //Trestles
-        this.hostName = "trestles.sdsc.xsede.org";      
-        this.userName = "ogce";
-        this.path="/opt/torque/bin/";
-        //Stampede:
-//        this.hostName = "stampede.tacc.xsede.org";        
-//        this.userName = "ogce";
-//        this.path="/usr/bin";
-        //Lonestar:
-//         this.hostName = "lonestar.tacc.utexas.edu";        
-//         this.userName = "us3";
-//        this.path="/opt/sge6.2/bin/lx24-amd64";
-        //Alamo:
-//        this.hostName = "alamo.uthscsa.edu";        
-//        this.userName = "raminder";
-//        this.path="/opt/torque/bin/";
-        //Bigred:
-//        this.hostName = "bigred2.uits.iu.edu";        
-//        this.userName = "cgateway";
-//        this.path="/opt/torque/torque-5.0.1/bin/";
-        
-        System.setProperty("ssh.host",hostName);
-        System.setProperty("ssh.username", userName);
-        System.setProperty("private.ssh.key", "/home/lginnali/.ssh/id_dsa");
-        System.setProperty("public.ssh.key", "/home/lginnali/.ssh/id_dsa.pub");
-        System.setProperty("ssh.working.directory", "/tmp");
-
-        this.hostName = System.getProperty("ssh.host");
-        this.userName = System.getProperty("ssh.username");
-        this.password = System.getProperty("ssh.password");
-        this.privateKeyPath = System.getProperty("private.ssh.key");
-        this.publicKeyPath = System.getProperty("public.ssh.key");
-        
-        System.setProperty("ssh.keypass", "");
-        this.passPhrase = System.getProperty("ssh.keypass");
-        this.workingDirectory = System.getProperty("ssh.working.directory");
-
-
-        if (this.userName == null
-                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
-            System.out.println("########### In order to test you have to either username password or private,public keys");
-            System.out.println("Use -Dssh.user=xxx -Dssh.password=yyy -Dssh.private.key.passphrase=zzz " +
-                    "-Dssh.private.key.path -Dssh.public.key.path -Dssh.working.directory ");
-        }
-    }
-
-
-    @Test
-    public void testSimplePBSJob() throws Exception {
-
-        AuthenticationInfo authenticationInfo = null;
-        if (password != null) {
-            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-        } else {
-            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                    this.passPhrase);
-        }
-        // Server info
-        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
-
-        String date = new Date().toString();
-        date = date.replaceAll(" ", "_");
-        date = date.replaceAll(":", "_");
-
-        String pomFile =  new File("").getAbsolutePath() + File.separator + "pom.xml";
-
-        workingDirectory = workingDirectory + File.separator
-                + date + "_" + UUID.randomUUID();
-        pbsCluster.makeDirectory(workingDirectory);
-        Thread.sleep(1000);
-        pbsCluster.makeDirectory(workingDirectory + File.separator + "inputs");
-        Thread.sleep(1000);
-        pbsCluster.makeDirectory(workingDirectory + File.separator + "outputs");
-
-
-        // doing file transfer to the remote resource
-        String remoteLocation = workingDirectory + File.separator + "inputs";
-        pbsCluster.scpTo(remoteLocation, pomFile);
-
-        int i = pomFile.lastIndexOf(File.separator);
-        String fileName = pomFile.substring(i + 1);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("5");
-        //jobDescriptor.setJobSubmitter("aprun -n 1");
-        List<String> inputs = new ArrayList<String>();
-        inputs.add(remoteLocation + File.separator + fileName);
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        if(hostName.contains("trestles")){
-        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-        System.out.println("JobID returned : " + jobID);
-
-//        Cluster cluster = sshApi.getCluster(serverInfo, authenticationInfo);
-        Thread.sleep(1000);
-        JobDescriptor jobById = pbsCluster.getJobDescriptorById(jobID);
-
-        //printing job data got from previous call
-        AssertJUnit.assertEquals(jobById.getJobId(), jobID);
-        System.out.println(jobById.getAcountString());
-        System.out.println(jobById.getAllEnvExport());
-        System.out.println(jobById.getCompTime());
-        System.out.println(jobById.getExecutablePath());
-        System.out.println(jobById.getEllapsedTime());
-        System.out.println(jobById.getQueueName());
-        System.out.println(jobById.getExecuteNode());
-        System.out.println(jobById.getJobName());
-        System.out.println(jobById.getCTime());
-        System.out.println(jobById.getSTime());
-        System.out.println(jobById.getMTime());
-        System.out.println(jobById.getCompTime());
-        System.out.println(jobById.getOwner());
-        System.out.println(jobById.getQTime());
-        System.out.println(jobById.getUsedCPUTime());
-        System.out.println(jobById.getUsedMemory());
-        System.out.println(jobById.getVariableList());
-        }
-    }
-
-    @Test
-    public void testSimpleLSFJob() throws Exception {
-
-        AuthenticationInfo authenticationInfo = null;
-        if (password != null) {
-            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-        } else {
-            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                    this.passPhrase);
-        }
-        // Server info
-        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-
-
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setMailAddress("test@gmail.com");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("long");
-        jobDescriptor.setMaxWallTimeForLSF("5");
-        jobDescriptor.setJobSubmitter("mpiexec");
-        jobDescriptor.setModuleLoadCommands(new String[]{"module load openmpi/1.6.5"});
-        jobDescriptor.setUsedMemory("1000");
-        jobDescriptor.setChassisName("01");
-
-        //jobDescriptor.setJobSubmitter("aprun -n 1");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        Cluster pbsCluster = new PBSCluster(CommonUtils.getLSFJobManager(""));
-        ((PBSCluster) pbsCluster).generateJobScript(jobDescriptor);
-    }
-
-    @Test
-    public void testSCPFromAndSCPTo() throws Exception {
-
-        AuthenticationInfo authenticationInfo = null;
-        if (password != null) {
-            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-        } else {
-            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                    this.passPhrase);
-        }
-        // Server info
-        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
-        new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));;
-
-        String date = new Date().toString();
-        date = date.replaceAll(" ", "_");
-        date = date.replaceAll(":", "_");
-
-        String pomFile = (new File(".")).getAbsolutePath() + File.separator + "pom.xml";
-        File file = new File(pomFile);
-        if(!file.exists()){
-            file.createNewFile();
-        }
-        // Constructing theworking directory for demonstration and creating directories in the remote
-        // resource
-        workingDirectory = workingDirectory + File.separator
-                + date + "_" + UUID.randomUUID();
-        pbsCluster.makeDirectory(workingDirectory);
-        pbsCluster.scpTo(workingDirectory, pomFile);
-        Thread.sleep(1000);
-        pbsCluster.scpFrom(workingDirectory + File.separator + "pom.xml", (new File(".")).getAbsolutePath());
-    }
-}


[69/81] [abbrv] airavata git commit: adding a parent distribution

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/distribution/main/resources/NOTICE b/distribution/main/resources/NOTICE
new file mode 100644
index 0000000..fa7cba5
--- /dev/null
+++ b/distribution/main/resources/NOTICE
@@ -0,0 +1,163 @@
+Apache Airavata
+Copyright 2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+===============================================================================
+Apache Xerces Java Notice:
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+     - voluntary contributions made by Paul Eng on behalf of the
+       Apache Software Foundation that were originally developed at iClick, Inc.,
+       software copyright (c) 1999.
+
+================================================================================
+Apache XmlBeans Notice: 
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
+
+   Aside from contributions to the Apache XMLBeans project, this
+   software also includes:
+
+    - one or more source files from the Apache Xerces-J and Apache Axis
+      products, Copyright (c) 1999-2003 Apache Software Foundation
+
+    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
+      Consortium (Massachusetts Institute of Technology, European Research
+      Consortium for Informatics and Mathematics, Keio University)
+
+    - resolver.jar from Apache Xml Commons project,
+      Copyright (c) 2001-2003 Apache Software Foundation
+
+    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
+      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
+
+    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
+      Copyright 2005 BEA under the terms of the Apache Software License 2.0
+      
+=========================================================================================
+Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
+
+Portions Copyright 2006 International Business Machines Corp.
+Portions Copyright 2005-2007 WSO2, Inc.
+
+This product also includes schemas and specification developed by:
+- the W3C consortium (http://www.w3c.org)
+
+This product also includes WS-* schemas developed by International
+Business Machines Corporation, Microsoft Corporation, BEA Systems, 
+TIBCO Software, SAP AG, Sonic Software, and VeriSign
+
+This product also includes a WSDL developed by salesforce.com
+- Copyright 1999-2006 salesforce.com, inc.
+Portions of the included xmlbeans library were originally based on the following:
+- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
+
+====================================================================================
+Apache Derby Notice:
+
+Portions of Derby were originally developed by
+International Business Machines Corporation and are
+licensed to the Apache Software Foundation under the
+"Software Grant and Corporate Contribution License Agreement",
+informally known as the "Derby CLA".
+The following copyright notice(s) were affixed to portions of the code
+with which this file is now or was at one time distributed
+and are placed here unaltered.
+
+(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
+
+(C) Copyright IBM Corp. 2003. 
+
+=======================
+
+The portion of the functionTests under 'nist' was originally 
+developed by the National Institute of Standards and Technology (NIST), 
+an agency of the United States Department of Commerce, and adapted by
+International Business Machines Corporation in accordance with the NIST
+Software Acknowledgment and Redistribution document at
+http://www.itl.nist.gov/div897/ctg/sql_form.htm
+
+========================
+
+The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
+java/stubs/jdbc3) were produced by trimming sources supplied by the
+Apache Harmony project. In addition, the Harmony SerialBlob and
+SerialClob implementations are used. The following notice covers the Harmony sources:
+
+Portions of Harmony were originally developed by
+Intel Corporation and are licensed to the Apache Software
+Foundation under the "Software Grant and Corporate Contribution
+License Agreement", informally known as the "Intel Harmony CLA".
+
+=============================================================================
+Apache Woden Notice:
+
+   This product also includes software developed by :
+   
+     - IBM Corporation (http://www.ibm.com),
+         WSDL4J was the initial code contribution for the Apache Woden
+         project and some of the WSDL4J design and code has been reused.
+     - The W3C Consortium (http://www.w3c.org),
+         Common W3C XML Schema and DTD files are packaged with Apache Woden.
+
+   Please read the different LICENSE files present in the root directory of
+   this distribution.
+
+=========================================================================
+Woodstox Notice: 
+
+This product includes software developed by the Woodstox Project 
+(http://woodstox.codehaus.org/)
+
+This product currently only contains code developed by authors
+of specific components, as identified by the source code files.
+
+Since product implements StAX API, it has dependencies to StAX API
+classes.
+
+For additional credits (generally to people who reported problems)
+see CREDITS file.
+
+===========================================================================
+Apache xml-commons xml-apis Notice:
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
+
+================================================================================================
+Apache  Xalan Notice: 
+
+Portions of this software was originally based on the following:
+     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
+     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
+     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
+     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
+       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
+================================================================================================
+Apache  OpenJPA Notice: 
+
+OpenJPA includes software developed by the SERP project
+Copyright (c) 2002-2006, A. Abram White. All rights reserved.
+
+OpenJPA includes the persistence and orm schemas from the JPA specifications.
+Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
+OpenJPA elects to include this software in this distribution under the
+CDDL license.  You can obtain a copy of the License at:
+    https://glassfish.dev.java.net/public/CDDL+GPL.html
+The source code is available at:
+    https://glassfish.dev.java.net/source/browse/glassfish/
+
+OpenJPA includes software written by Miroslav Nachev
+OpenJPA uses test code written by Charles Tillman.
+================================================================================================
+Apache XmlSchema Notice:
+
+Portions Copyright 2006 International Business Machines Corp.
+================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/README
----------------------------------------------------------------------
diff --git a/distribution/main/resources/README b/distribution/main/resources/README
new file mode 100644
index 0000000..c2223ff
--- /dev/null
+++ b/distribution/main/resources/README
@@ -0,0 +1,145 @@
+Apache Airavata Source - README.txt
+Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
+--------------------------------------------------------------------------------
+
+About
+=====
+Apache Airavata, a software framework to executing and managing computational jobs on 
+distributed computing resources including local clusters, supercomputers, national grids, 
+academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
+distributed messaging, and workflow composition and orchestration. Airavata bundles a server package 
+with an API, client software development Kits and a general purpose GUI XBaya as a application registration, workflow
+construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
+produced data.  
+
+Contact
+========
+For additional information about Apache Airavata, please contact the user or dev mailing lists:
+http://airavata.apache.org/community/mailing-lists.html
+
+Description of Airavata Directory Structure
+==================================
+    - airavata-api
+      This directory contains Airavata API related data models, api methods, generated server skeletons, client stubs, server implementations and client samples. 
+
+    - modules
+      This contains the source code of all the airavata maven projects organized as libraries, services and distributions
+
+    - samples
+      This contains all the system wide samples provided in Airavata distribution. All the sample are having its README file
+      So users have to refer each readme file before running each sample.
+
+    - tools
+      This contains source code libraries that can enhance Airavata features.
+
+    - README
+      This document.
+    
+    - RELEASE_NOTES
+      The describe the key features and know issues with the current release. 
+
+    - INSTALL
+      This document will contain information on installing Apache-Airavata.
+
+Airavata Source Distribution Directory Structure
+================================================
+
+    AIRAVATA_MASTER
+		├── airavata-api
+		├── modules
+		│   ├── airavata-client
+		│   ├── app-catalog
+		│   ├── commons
+		│   │   ├── gfac-schema
+		│   │   ├── utils
+		│   │   ├── workflow-execution-context
+		│   │   └── workflow-tracking
+		│   ├── credential-store-service
+		│   ├── distribution
+		│   │   ├── api-server
+		│   │   ├── client
+		│   │   ├── gfac-server
+		│   │   ├── orchestrator-server
+		│   │   ├── server
+		│   │   └── release
+		│   │   └── xbaya-gui
+		│   ├── gfac
+		│   │   ├── airavata-gfac-service
+		│   │   ├── gfac-bes
+		│   │   ├── gfac-core
+		│   │   ├── gfac-ec2
+		│   │   ├── gfac-gram
+		│   │   ├── gfac-gsissh
+		│   │   ├── gfac-hadoop
+		│   │   ├── gfac-local
+		│   │   ├── gfac-monitor
+		│   │   ├── gfac-ssh
+		│   │   ├── gfac-thrift-descriptions
+		│   ├── integration-tests
+		│   ├── messaging
+		│   ├── orchestrator
+		│   ├── registry
+		│   │   ├── airavata-jpa-registry
+		│   │   ├── registry-cpi
+		│   ├── security
+		│   ├── credential-store
+		│   ├── server
+		│   ├── test-suite
+		│   ├── workflow-model
+		│   │   ├── workflow-engine
+		│   │   ├── workflow-model-component-node
+		│   │   └── workflow-model-core
+		│   ├── ws-messenger
+		│   │   ├── commons
+		│   │   ├── distribution
+		│   │   ├── messagebox
+		│   │   ├── messagebroker
+		│   │   ├── message-monitor
+		│   │   └── samples
+		│   └── xbaya-gui
+		├── samples
+		├── tools
+		│   ├── gsissh
+		│   ├── gsissh-cli-tools
+		│   ├── phoebus-integration
+		│   └── registry-migrate
+		├── INSTALL
+		├── LICENSE
+		├── NOTICE
+		├── README
+		└── RELEASE_NOTES
+
+Available Binary Distributions
+==============================
+
+Server Distributions
+--------------------
+* Airavata Server
+  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
+  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
+
+* Airavata API Server
+  This is the server that contains Airavata API Server.
+
+* Airavata Orchestrator Server
+  This is the stand-alone orchestrator server
+
+* Airavata GFac Server
+  This is the standalone GFac Server
+
+Client Distributions
+--------------------
+* Airavata XBaya
+  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
+  execute and monitor workflows and browse the generated results from the airavata registry.
+
+* Airavata Client
+  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
+  access Airavata functionality through Airavata API. 
+  
+ How to test and run samples
+===========================
+* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
+* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
+* To walk through Airavata features, follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial.
+* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/airavata-server.bat
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/airavata-server.bat b/distribution/main/resources/bin/airavata-server.bat
new file mode 100644
index 0000000..09752c4
--- /dev/null
+++ b/distribution/main/resources/bin/airavata-server.bat
@@ -0,0 +1,55 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+setlocal EnableDelayedExpansion
+
+call "%~dp0"setenv.bat
+
+:loop
+if ""%1""==""-xdebug"" goto xdebug
+if ""%1""==""-security"" goto security
+if ""%1""=="""" goto run
+goto help
+
+:xdebug
+set JAVA_OPTS= %JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000
+shift
+goto loop
+
+:security
+set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%AIRAVATA_HOME%\conf\axis2.policy -Daxis2.home=%AIRAVATA_HOME%
+shift
+goto loop
+
+:help
+echo  Usage: %0 [-options]
+echo.
+echo  where options include:
+echo   -xdebug    Start Airavata Server under JPDA debugger
+echo   -security  Enable Java 2 security
+echo   -h         Help
+goto end
+
+:run
+cd "%AIRAVATA_HOME%\bin"
+set LOGO_FILE="logo.txt"
+if exist "%LOGO_FILE%" type "%LOGO_FILE%"
+
+java %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" -Djava.endorsed.dirs="%AIRAVATA_HOME%/lib/endorsed":"%JAVA_HOME%/jre/lib/endorsed":"%JAVA_HOME%/lib/endorsed" org.apache.airavata.server.ServerMain -repo "%AIRAVATA_HOME%"/repository/services -conf "%AIRAVATA_HOME%"/conf/axis2.xml %*
+
+:end

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/airavata-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/airavata-server.sh b/distribution/main/resources/bin/airavata-server.sh
new file mode 100755
index 0000000..885dcd4
--- /dev/null
+++ b/distribution/main/resources/bin/airavata-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+#SERVERS="--servers=apiserver,orchestrator,gfac,credentialstore"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+        	AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+		AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
+	    IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > airavata-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/api-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/api-server.sh b/distribution/main/resources/bin/api-server.sh
new file mode 100755
index 0000000..872c854
--- /dev/null
+++ b/distribution/main/resources/bin/api-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=apiserver"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > api-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/derby.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/derby.sh b/distribution/main/resources/bin/derby.sh
new file mode 100644
index 0000000..134f7b9
--- /dev/null
+++ b/distribution/main/resources/bin/derby.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# 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.
+
+. `dirname $0`/setenv.sh
+export DERBY_HOME=$AIRAVATA_HOME/standalone-server
+cd $AIRAVATA_HOME/bin
+./startNetworkServer $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/gfac-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/gfac-server.sh b/distribution/main/resources/bin/gfac-server.sh
new file mode 100755
index 0000000..839ef4e
--- /dev/null
+++ b/distribution/main/resources/bin/gfac-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=gfac"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > gfac-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/logo.txt b/distribution/main/resources/bin/logo.txt
new file mode 100644
index 0000000..e886438
--- /dev/null
+++ b/distribution/main/resources/bin/logo.txt
@@ -0,0 +1,34 @@
+...._....................._..............._...._......................_.........
+.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
+../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
+./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
+/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
+........|_|.....................................................................
+................................................................................
+................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
+..............:???????....:::...~??????????????.~..::...=????????...............
+............????????..~~..?????..??????????????.?????..~~~.~???????.............
+...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
+.........?????++??????..????????:.??????????I..????????..????????+????..........
+........??.....???????....???????...???????+..+??????+.I.????????.....?,........
+........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
+......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
+....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
+....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
+....??????..?...........+?..???.....???????......???.??...........~=.??????=....
+....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
+...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
+.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
+..........????..............??????~...~??..~~??????..?...........+???,..........
+...........???............=.+???????,.?+:.?????????..+...........???+...........
+............??............?,.??????.,??..??????????.,............???............
+...........??,.............=.,????.?+....????????I.I..............=?............
+..........I?..................+??.:?~.....=??????..................??...........
+..........??...?...............??.:?=......??????..............?...??...........
+............++?..............?.????...?....??????.+..............++I............
+.............................?.??????~....???????.?.............................
+............................~~.??????......??????...............................
+.............................=???????......???????+.............................
+..........................=I??++?+++?......?+++++++?+...........................
+..........................,..77..77.........  ..  ...7..........................
+................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/orchestrator-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/orchestrator-server.sh b/distribution/main/resources/bin/orchestrator-server.sh
new file mode 100755
index 0000000..5fa73e7
--- /dev/null
+++ b/distribution/main/resources/bin/orchestrator-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=orchestrator"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > orchestrator-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/setenv.bat b/distribution/main/resources/bin/setenv.bat
new file mode 100644
index 0000000..223f8cd
--- /dev/null
+++ b/distribution/main/resources/bin/setenv.bat
@@ -0,0 +1,43 @@
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+@echo off
+
+:checkJava
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto initialize
+
+:noJavaHome
+echo You must set the JAVA_HOME environment variable before running Airavata.
+goto end
+
+:initialize
+if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
+SET curDrive=%cd:~0,1%
+SET airavataDrive=%AIRAVATA_HOME:~0,1%
+if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
+goto updateClasspath
+
+rem ----- update classpath -----------------------------------------------------
+:updateClasspath
+cd %AIRAVATA_HOME%
+set XBAYA_CLASSPATH=
+FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
+FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
+
+:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/setenv.sh b/distribution/main/resources/bin/setenv.sh
new file mode 100755
index 0000000..84673db
--- /dev/null
+++ b/distribution/main/resources/bin/setenv.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# 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.
+
+
+# Get standard environment variables
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+
+PRGDIR=`dirname "$PRG"`
+
+# Only set AIRAVATA_HOME if not already set
+[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
+
+XBAYA_CLASSPATH=""
+
+
+
+for f in "$AIRAVATA_HOME"/lib/*.jar
+do
+  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
+done
+
+for f in "$AIRAVATA_HOME"/repository/services/*.jar
+do
+  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
+done
+
+XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
+
+
+
+
+export AIRAVATA_HOME
+export XBAYA_CLASSPATH
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/startNetworkServer
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/startNetworkServer b/distribution/main/resources/bin/startNetworkServer
new file mode 100644
index 0000000..808566c
--- /dev/null
+++ b/distribution/main/resources/bin/startNetworkServer
@@ -0,0 +1,189 @@
+#!/bin/sh
+
+# 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.
+
+if [ -n "$derby_common_debug" ] ; then
+  set -x
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+           fi
+           ;;
+esac
+
+if [ -z "$DERBY_HOME" -o ! -d "$DERBY_HOME" ] ; then
+  ## resolve links - $0 may be a link to derby's home
+  PRG="$0"
+  progname=`basename "$0"`
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+    else
+    PRG=`dirname "$PRG"`"/$link"
+    fi
+  done
+
+  DERBY_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  DERBY_HOME=`cd "$DERBY_HOME" && pwd`
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$DERBY_HOME" ] &&
+    DERBY_HOME=`cygpath --unix "$DERBY_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# set DERBY_LIB location
+DERBY_LIB="${DERBY_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=java
+    fi
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+# set local classpath, don't overwrite the user's
+LOCALCLASSPATH=$DERBY_LIB/derby.jar:$DERBY_LIB/derbynet.jar:$DERBY_LIB/derbytools.jar:$DERBY_LIB/derbyclient.jar
+
+# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+# user CLASSPATH first and derby-found jars after.
+# In that case, the user CLASSPATH will override derby-found jars
+#
+# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+# with derby-found jars first and user CLASSPATH after
+if [ -n "$CLASSPATH" ] ; then
+  # merge local and specified classpath 
+  if [ -z "$LOCALCLASSPATH" ] ; then 
+    LOCALCLASSPATH="$CLASSPATH"
+  elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+    LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+  else
+    LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+  fi
+
+  # remove class path from launcher -cp option
+  CLASSPATH=""
+fi
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  DERBY_HOME=`cygpath --$format "$DERBY_HOME"`
+  DERBY_LIB=`cygpath --$format "$DERBY_LIB"`
+  if [ -n "$JAVA_HOME" ]; then
+    JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+  fi
+  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  if [ -n "$CLASSPATH" ] ; then
+    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+  fi
+  CYGHOME=`cygpath --$format "$HOME"`
+fi
+
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+  case "$DERBY_HOME" in
+    *\\ )
+    DERBY_HOME="$DERBY_HOME\\"
+    ;;
+  esac
+  case "$CYGHOME" in
+    *\\ )
+    CYGHOME="$CYGHOME\\"
+    ;;
+  esac
+  case "$LOCALCLASSPATH" in
+    *\\ )
+    LOCALCLASSPATH="$LOCALCLASSPATH\\"
+    ;;
+  esac
+  case "$CLASSPATH" in
+    *\\ )
+    CLASSPATH="$CLASSPATH\\"
+    ;;
+  esac
+fi
+
+# Readjust classpath for MKS
+# expr match 
+if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; then
+  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g
+'`
+fi
+#!/bin/sh
+
+# 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.
+
+derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start $@"
+eval $derby_exec_command

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/bin/workflow-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/workflow-server.sh b/distribution/main/resources/bin/workflow-server.sh
new file mode 100755
index 0000000..b66e192
--- /dev/null
+++ b/distribution/main/resources/bin/workflow-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=workflowserver"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > workflow-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/samples/registerSample.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/registerSample.sh b/distribution/main/resources/samples/registerSample.sh
new file mode 100644
index 0000000..6450f6f
--- /dev/null
+++ b/distribution/main/resources/samples/registerSample.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# 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.
+
+. `dirname $0`/../bin/setenv.sh
+JAVA_OPTS=""
+
+java -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		     org.apache.airavata.client.samples.RegisterSampleData $*

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/samples/scripts/add.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/add.sh b/distribution/main/resources/samples/scripts/add.sh
new file mode 100755
index 0000000..daa140b
--- /dev/null
+++ b/distribution/main/resources/samples/scripts/add.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# 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.
+
+# add two numbers
+sleep 10
+/bin/echo  "Result=`expr $1 + $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/samples/scripts/echo.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/echo.sh b/distribution/main/resources/samples/scripts/echo.sh
new file mode 100755
index 0000000..9dbaab9
--- /dev/null
+++ b/distribution/main/resources/samples/scripts/echo.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+#echo wrapper
+sleep 10
+/bin/echo "Echoed_Output=$1"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/samples/scripts/multiply.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/multiply.sh b/distribution/main/resources/samples/scripts/multiply.sh
new file mode 100755
index 0000000..a5b5f7f
--- /dev/null
+++ b/distribution/main/resources/samples/scripts/multiply.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+# mutiply two numbers
+sleep 10
+/bin/echo "Result=`expr $1 \* $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/samples/scripts/subtract.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/subtract.sh b/distribution/main/resources/samples/scripts/subtract.sh
new file mode 100755
index 0000000..a21bec7
--- /dev/null
+++ b/distribution/main/resources/samples/scripts/subtract.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+# substract two numbers
+sleep 10
+/bin/echo "Result=`expr $1 - $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
new file mode 100644
index 0000000..f7047f4
--- /dev/null
+++ b/distribution/pom.xml
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.16-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>apache-airavata-distribution</artifactId>
+    <name>Airavata server distribution</name>
+    <packaging>pom</packaging>
+    <url>http://airavata.apache.org/</url>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.8</version>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.airavata</groupId>
+                                    <artifactId>airavata-server-configuration</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                </artifactItem>
+                            </artifactItems>
+                            <!--includes>**/*.war</includes -->
+                            <outputDirectory>${project.build.directory}/conf</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.4</version>
+                <executions>
+                    <execution>
+                        <id>generate-timestamp</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>
+                                import java.util.Date
+                                import java.text.MessageFormat
+
+                                project.properties['buildTimestamp'] =
+                                        MessageFormat.format("{0,date,dd-MM-yyyy}", new
+                                                Date())
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>distribution-package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <finalName>${archieve.name}-${project.version}</finalName>
+                            <descriptors>
+                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
+                                <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
+                            </descriptors>
+                            <attach>false</attach>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.7</version>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${airavata.bin.zip}</file>
+                                    <type>zip</type>
+                                    <classifier>bin</classifier>
+                                </artifact>
+                                <artifact>
+                                    <file>${airavata.bin.tar.gz}</file>
+                                    <type>tar.gz</type>
+                                    <classifier>bin</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>${derby.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbyclient</artifactId>
+            <version>${derby.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbynet</artifactId>
+            <version>${derby.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbytools</artifactId>
+            <version>${derby.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.amazonaws</groupId>
+            <artifactId>aws-java-sdk</artifactId>
+            <version>1.9.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>net.java.dev.jets3t</groupId>
+            <artifactId>jets3t</artifactId>
+            <version>0.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-standalone-server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>app-catalog-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-messaging-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>app-catalog-data</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.ws.commons.schema</groupId>
+                    <artifactId>XmlSchema</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xerces</groupId>
+                    <artifactId>xmlParserAPIs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.neethi</groupId>
+                    <artifactId>neethi</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-orchestrator-service</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.ws.commons.schema</groupId>
+                    <artifactId>XmlSchema</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xerces</groupId>
+                    <artifactId>xmlParserAPIs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.neethi</groupId>
+                    <artifactId>neethi</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-orchestrator-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-orchestrator-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-credential-store</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-ssh</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-bes</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-gsissh</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-hpc-monitor</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-local</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-model-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>gsissh</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-model-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-api-server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-all</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-core</artifactId>
+            <version>1.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-client</artifactId>
+            <version>${jersey.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+            <version>7.0.22</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-jasper</artifactId>
+            <version>7.0.22</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-servlet</artifactId>
+            <version>${jersey.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-json</artifactId>
+            <version>${jersey.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>stax</groupId>
+                    <artifactId>stax-api</artifactId>
+                </exclusion>
+            </exclusions>
+
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey.contribs</groupId>
+            <artifactId>jersey-multipart</artifactId>
+            <version>${jersey.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-server</artifactId>
+            <version>${jersey.version}</version>
+        </dependency>
+        <!--dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId>
+            <version>${jersey.version}</version> </dependency -->
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-xc</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-jaxrs</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.9.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>xml-apis</groupId>
+                    <artifactId>xml-apis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.ibm.icu</groupId>
+            <artifactId>icu4j</artifactId>
+            <version>3.4.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>12.0</version>
+        </dependency>
+
+        <!-- Hadoop provider related dependencies -->
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-core</artifactId>
+            <version>1.0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
+            <version>1.0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.whirr</groupId>
+            <artifactId>whirr-core</artifactId>
+            <version>0.7.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>bcprov-jdk16</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jclouds.driver</groupId>
+                    <artifactId>jclouds-bouncycastle</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.whirr</groupId>
+            <artifactId>whirr-hadoop</artifactId>
+            <version>0.7.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-all</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-configuration</groupId>
+            <artifactId>commons-configuration</artifactId>
+            <version>1.7</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.jopt-simple</groupId>
+            <artifactId>jopt-simple</artifactId>
+            <version>3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ebaysf.web</groupId>
+            <artifactId>cors-filter</artifactId>
+            <version>${ebay.cors.filter}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.50</version>
+        </dependency>
+        <!-- dependency> <groupId>org.ogce</groupId> <artifactId>bcgss</artifactId>
+            <version>146</version> </dependency> -->
+        <dependency>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
+            <version>${xmlbeans.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>stax</groupId>
+                    <artifactId>stax-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+        <!-- zookeeper dependencies -->
+
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>3.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rabbitmq</groupId>
+            <artifactId>amqp-client</artifactId>
+            <version>${amqp.client.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+            <version>${curator.version}</version>
+        </dependency>
+
+        <!-- ======================== Sample =================== -->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-samples</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+    <properties>
+        <jersey.version>1.13</jersey.version>
+        <grizzly.version>2.0.0-M3</grizzly.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <archieve.name>apache-airavata-server</archieve.name>
+        <airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
+        <airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
+        <airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
+        <airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
+    </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5fe2d34..1c656fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -561,6 +561,7 @@
 				<!--<module>modules/integration-tests</module>-->
 				<module>modules/workflow</module>
 				<module>modules/xbaya-gui</module>
+				<module>distribution</module>
 			</modules>
 		</profile>
 		<profile>


[50/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/NOTICE b/modules/distribution/xbaya-gui/src/main/resources/NOTICE
deleted file mode 100644
index 61d74b8..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/README b/modules/distribution/xbaya-gui/src/main/resources/README
deleted file mode 100644
index 6ca8faf..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/README
+++ /dev/null
@@ -1,101 +0,0 @@
-Apache Airavata XBaya - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata can be used as individual components or 
-as an integrated solution to build science gateways or general-purpose distributed 
-application and workflow management systems. Users can use Airavata back end services 
-and build gadgets to deploy in open social containers such as Apache Rave and modify them 
-to suit their needs. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration.
-
-This distribution is a client gui application capable of composing workflows, application 
-descriptors & communicating with the airavata server to persist user data, run & monitor 
-experiments and analyze the results.
-
-Release Notes
-=============
-0.11 is the tenth release of Airavata (skipped 0.1-INCUBATNG). This release focuses GFac rearchitecturing and more GFac level changes. For detailed tasks list, please see RELEASE_NOTES.
-
-Building from source
-====================
-For brief installation instructions, see INSTALL
-For detailed installation and further instructions refer http://airavata.apache.org/ - Documentation section in left hand panel. Step by step with proper documentation are provided.
-
-Known Issues in This Release
-============================
-This is the base release and is focused on a good foundation and less on features. This 
-version is not recommended for production usage.
-
-Airavata XBaya Distribution Directory Structure
-================================================
-
-    AIRAVATA_XBAYA
-		├── bin
-		│   ├── airavata-client.properties
-		│   ├── log4j.properties
-		│   ├── setenv.bat
-		│   ├── setenv.sh
-		│   ├── xbaya-gui.bat
-		│   └── xbaya-gui.sh
-		├── lib
-		├── samples
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		└── README
-
-How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "Airavata in Five Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* For intermediate level Airavata features, follow "Airavata in Ten Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html 
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html
-
-Description of Directory Structure
-==================================
-
-    - bin
-      This contains the configuration files for Airavata XBaya & the scripts to run XBaya GUI Application.
-
-    - samples
-      This contains sample scripts to define the sample descriptor in http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-
-    - lib
-      This contains all the libraries required to run the client side code with the jars required to run XBaya GUI.
-
-    - README
-      This document.
-
-    - INSTALL
-          This document will contain information on installing Apache-Airavata XBaya.
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata Server Web Application
-  This is similar package as the Airavata Server but is distributed as the server Web Application archive.
-  This war is compatible with Apache Tomcat application server. The war bundles all airavata services 
-  enabled by defualt to startup a derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata XBaya JNLP
-  The Airavata XBaya JNLP distribution is the simular GUI distribution but prepackeged to be ready to be deployed to 
-   a web server as a web start application. The GUI provides features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry. 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/airavata-logo.gif
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/airavata-logo.gif b/modules/distribution/xbaya-gui/src/main/resources/airavata-logo.gif
deleted file mode 100644
index 46749c1..0000000
Binary files a/modules/distribution/xbaya-gui/src/main/resources/airavata-logo.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.bat b/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.bat
deleted file mode 100755
index e02e0d6..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%XBAYA_HOME%"=="" set XBAYA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET xBayaDrive=%XBAYA_HOME:~0,1%
-if not "%curDrive%" == "%xBayaDrive%" %xBayaDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %XBAYA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%XBAYA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.sh b/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.bat b/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.bat
deleted file mode 100755
index 1f46002..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-setlocal EnableDelayedExpansion
-call "%~dp0"setenv.bat
-
-cd "%XBAYA_HOME%\bin"
-"%JAVA_HOME%\bin\java.exe" %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" org.apache.airavata.xbaya.XBaya %*

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.sh b/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.sh
deleted file mode 100755
index 13ffe10..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/bin/xbaya-gui.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/setenv.sh
-$JAVA_HOME/bin/java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-    org.apache.airavata.xbaya.XBaya $* 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/conf/log4j.properties b/modules/distribution/xbaya-gui/src/main/resources/conf/log4j.properties
deleted file mode 100644
index ee40d6f..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/conf/log4j.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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.
-#
-
-# Set root category priority to INFO and its only appender to CONSOLE.
-log4j.rootCategory=INFO, CONSOLE,LOGFILE
-log4j.rootLogger=INFO, CONSOLE, LOGFILE
-
-# Set the enterprise logger priority to FATAL
-log4j.logger.org.apache.axis2.enterprise=FATAL
-log4j.logger.de.hunsicker.jalopy.io=FATAL
-log4j.logger.httpclient.wire.header=FATAL
-log4j.logger.org.apache.commons.httpclient=FATAL
-         
-# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
-
-# LOGFILE is set to be a File appender using a PatternLayout.
-log4j.appender.LOGFILE=org.apache.log4j.FileAppender
-log4j.appender.LOGFILE.File=../../bin/axis2.log
-log4j.appender.LOGFILE.Append=true
-log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/jnlp/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/jnlp/INSTALL b/modules/distribution/xbaya-gui/src/main/resources/jnlp/INSTALL
deleted file mode 100644
index 24ae962..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/jnlp/INSTALL
+++ /dev/null
@@ -1,48 +0,0 @@
-Installing  Apache Airavata XBaya 0.11
--------------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata XBaya JNLP from Source
---------------------------------------------
-* Unzip/untar the source file or check out from svn.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* The compressed binary distribution is created at <PROJECT DIR>/modules/distribution/xbaya-gui/target/apache-airavata-xbaya-gui-<airavata-version>-jnlp.zip
-
-Installing the JNLP Distribution
---------------------------------
-* Extract the Apache Airavata XBaya JNLP distribution to a web accessible location
-* Update the the xbaya.jnlp file "codebase" with the web access location of the jnlp
-      eg: <jnlp ... codebase="http://example-server.com/airavata/xbaya/" ...>
-           ...
-           ...
-          </jnlp> 
-
-Starting Apache Airavata XBaya JNLP
------------------------------------
-Using the web browser
-	* Using a browser navigate to the url <JNLP-web-access-url>/xbaya.jnlp
-		eg: http://example-server.com/airavata/xbaya/xbaya.jnlp
-	* Following the web start download instructions to run XBaya
-
-Using the commandline
-	* type for following command in the commandline to start the Airavata XBaya
-			$ javaws <JNLP-web-access-url>/xbaya.jnlp
-				eg: $ javaws http://example-server.com/airavata/xbaya/xbaya.jnlp
-
-Running Tests
--------------
-Once the binary is unzipped, instructions to run the tests should be followed from README
-
-Tutorials 
-----------
-The airavata website has instructions for basic tutorials:
-* For basic understanding of how Airavata works - http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* Describing and executing applications using Airavata - http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-* Advanced tutorial to provide understanding of how to run sample workflows distributed with Airavata - http://airavata.apache.org/documentation/tutorials/advanced-workflow-samples.html


[57/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/LICENSE b/modules/distribution/new-dist/src/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/modules/distribution/new-dist/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-

<TRUNCATED>

[79/81] [abbrv] airavata git commit: Merge moduleRefactor branch

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 0000000,9e03173..61db417
mode 000000,100644..100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@@ -1,0 -1,229 +1,229 @@@
+ ///*
+ // *
+ // * 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.core.gfac.services.impl;
+ //
+ //import java.io.File;
+ //import java.net.URL;
+ //import java.util.ArrayList;
+ //import java.util.Date;
+ //import java.util.List;
+ //import java.util.UUID;
+ //
+ //import org.apache.aiaravata.application.catalog.data.model.ApplicationInterface;
+ //import org.apache.airavata.commons.gfac.type.ActualParameter;
+ //import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+ //import org.apache.airavata.commons.gfac.type.HostDescription;
+ //import org.apache.airavata.commons.gfac.type.ServiceDescription;
+ //import org.apache.airavata.gfac.GFacConfiguration;
+ //import org.apache.airavata.gfac.GFacException;
+ //import org.apache.airavata.gfac.SecurityContext;
+ //import org.apache.airavata.gfac.core.context.ApplicationContext;
+ //import org.apache.airavata.gfac.core.context.JobExecutionContext;
+ //import org.apache.airavata.gfac.core.context.MessageContext;
+ //import org.apache.airavata.gfac.impl.BetterGfacImpl;
+ //import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+ //import org.apache.airavata.gfac.ssh.api.Cluster;
+ //import org.apache.airavata.gfac.ssh.api.SSHApiException;
+ //import org.apache.airavata.gfac.ssh.api.ServerInfo;
+ //import GSIAuthenticationInfo;
+ //import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+ //import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+ //import org.apache.airavata.gfac.ssh.util.CommonUtils;
+ //import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+ //import org.apache.airavata.model.workspace.experiment.TaskDetails;
 -//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
++//import org.apache.airavata.experiment.registry.jpa.impl.RegistryFactory;
+ //import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+ //import org.apache.airavata.schemas.gfac.GsisshHostType;
+ //import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
+ //import org.apache.airavata.schemas.gfac.InputParameterType;
+ //import org.apache.airavata.schemas.gfac.JobTypeType;
+ //import org.apache.airavata.schemas.gfac.OutputParameterType;
+ //import org.apache.airavata.schemas.gfac.ProjectAccountType;
+ //import org.apache.airavata.schemas.gfac.QueueType;
+ //import org.apache.airavata.schemas.gfac.StringParameterType;
+ //import org.testng.annotations.BeforeClass;
+ //import org.testng.annotations.Test;
+ //
+ //public class GSISSHProviderTestWithMyProxyAuth {
+ //    private JobExecutionContext jobExecutionContext;
+ //
+ //    //FIXME: move job properties to configuration file
+ //    private static final String hostAddress = "trestles.sdsc.edu";
+ //    private static final String hostName = "trestles";
+ //    private String myProxyUserName;
+ //    private String myProxyPassword;
+ //    private String workingDirectory;
+ //    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
+ //
+ //    @BeforeClass
+ //    public void setUp() throws Exception {
+ ////        System.setProperty("myproxy.user", "ogce");
+ ////        System.setProperty("myproxy.password", "");
+ ////        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
+ ////        System.setProperty("gsi.working.directory", "/home/ogce");
+ ////        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
+ //        certificateLocation = System.getProperty("trusted.cert.location");
+ //        myProxyUserName = System.getProperty("myproxy.username");
+ //        myProxyPassword = System.getProperty("myproxy.password");
+ //        workingDirectory = System.getProperty("gsi.working.directory");
+ //
+ //        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
+ //            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+ //                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+ //            throw new Exception("Need my proxy user name password to run tests.");
+ //        }
+ //        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+ //        assert resource != null;
+ //        System.out.println(resource.getFile());
+ //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+ //
+ //        /*
+ //        * Host
+ //        */
+ //        HostDescription host = new HostDescription(GsisshHostType.type);
+ //        host.getType().setHostAddress(hostAddress);
+ //        host.getType().setHostName(hostName);
+ //
+ //        /*
+ //        * App
+ //        */
+ //        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+ //        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+ //        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+ //        name.setStringValue("EchoLocal");
+ //        app.setApplicationName(name);
+ //        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+ //        projectAccountType.setProjectAccountNumber("sds128");
+ //
+ //        QueueType queueType = app.addNewQueue();
+ //        queueType.setQueueName("normal");
+ //
+ //        app.setCpuCount(1);
+ //        app.setJobType(JobTypeType.SERIAL);
+ //        app.setNodeCount(1);
+ //        app.setProcessorsPerNode(1);
+ //
+ //        /*
+ //        * Use bat file if it is compiled on Windows
+ //        */
+ //        app.setExecutableLocation("/bin/echo");
+ //
+ //        /*
+ //        * Default tmp location
+ //        */
+ //        String tempDir = "/home/ogce/scratch/";
+ //        String date = (new Date()).toString();
+ //        date = date.replaceAll(" ", "_");
+ //        date = date.replaceAll(":", "_");
+ //
+ //        tempDir = workingDirectory + File.separator
+ //                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+ //
+ //        System.out.println(tempDir);
+ //        app.setScratchWorkingDirectory(tempDir);
+ //        app.setStaticWorkingDirectory(tempDir);
+ //        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+ //        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+ //        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+ //        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+ //        app.setMaxWallTime(5);
+ //        app.setInstalledParentPath("/opt/torque/bin/");
+ //
+ //        /*
+ //        * Service
+ //        */
+ //        ServiceDescription serv = new ServiceDescription();
+ //        serv.getType().setName("SimpleEcho");
+ //
+ //        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+ //
+ //        InputParameterType input = InputParameterType.Factory.newInstance();
+ //        input.setParameterName("echo_input");
+ //        input.setParameterType(StringParameterType.Factory.newInstance());
+ //        inputList.add(input);
+ //
+ //        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+ //
+ //                .size()]);
+ //        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+ //        OutputParameterType output = OutputParameterType.Factory.newInstance();
+ //        output.setParameterName("echo_output");
+ //        output.setParameterType(StringParameterType.Factory.newInstance());
+ //        outputList.add(output);
+ //
+ //        OutputParameterType[] outputParamList = outputList
+ //                .toArray(new OutputParameterType[outputList.size()]);
+ //
+ //        serv.getType().setInputParametersArray(inputParamList);
+ //        serv.getType().setOutputParametersArray(outputParamList);
+ //
+ //        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+ //        // Adding security context
+ //        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
+ //        ApplicationContext applicationContext = new ApplicationContext();
+ //        jobExecutionContext.setApplicationContext(applicationContext);
+ //        applicationContext.setServiceDescription(serv);
+ //        applicationContext.setApplicationDeploymentDescription(appDesc);
+ //        applicationContext.setHostDescription(host);
+ //
+ //        MessageContext inMessage = new MessageContext();
+ //        ActualParameter echo_input = new ActualParameter();
+ //        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+ //        inMessage.addParameter("echo_input", echo_input);
+ //
+ //
+ //        jobExecutionContext.setInMessageContext(inMessage);
+ //
+ //        MessageContext outMessage = new MessageContext();
+ //        ActualParameter echo_out = new ActualParameter();
+ ////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+ //        outMessage.addParameter("echo_output", echo_out);
+ //        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+ //        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+ //        jobExecutionContext.setOutMessageContext(outMessage);
+ //
+ //    }
+ //
+ //    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+ //        GSIAuthenticationInfo authenticationInfo
+ //                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+ //                7512, 17280000, certificateLocation);
+ //
+ //        // Server info
+ //        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
+ //        Cluster pbsCluster = null;
+ //        try {
+ //            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(app.getInstalledParentPath()));
+ //        } catch (SSHApiException e) {
+ //            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+ //        }
+ //        GSISecurityContext sshSecurityContext = new GSISecurityContext(pbsCluster);
+ //        return sshSecurityContext;
+ //    }
+ //    @Test
+ //    public void testGSISSHProvider() throws GFacException {
+ //        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+ //        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+ //        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
+ //        System.out.println(jobExecutionContext.getJobDetails().getJobID());
+ //    }
+ //
+ //}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
index 0000000,aeb8158..b3974d2
mode 000000,100644..100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@@ -1,0 -1,184 +1,184 @@@
+ ///*
+ // *
+ // * 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.core.gfac.services.impl;
+ //
+ //import java.io.File;
+ //import java.net.URL;
+ //import java.util.ArrayList;
+ //import java.util.List;
+ //
+ //import org.apache.airavata.common.utils.MonitorPublisher;
+ //import org.apache.airavata.commons.gfac.type.ActualParameter;
+ //import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+ //import org.apache.airavata.commons.gfac.type.HostDescription;
+ //import org.apache.airavata.commons.gfac.type.ServiceDescription;
+ //import org.apache.airavata.gfac.GFacConfiguration;
+ //import org.apache.airavata.gfac.GFacException;
+ //import org.apache.airavata.gfac.core.context.ApplicationContext;
+ //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.gfac.local.handler.LocalDirectorySetupHandler;
+ //import org.apache.airavata.gfac.local.provider.impl.LocalProvider;
+ //import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
+ //import org.apache.airavata.model.workspace.experiment.Experiment;
+ //import org.apache.airavata.model.workspace.experiment.TaskDetails;
+ //import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
 -//import org.apache.airavata.persistance.registry.jpa.impl.LoggingRegistryImpl;
++//import org.apache.airavata.experiment.registry.jpa.impl.LoggingRegistryImpl;
+ //import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+ //import org.apache.airavata.schemas.gfac.InputParameterType;
+ //import org.apache.airavata.schemas.gfac.OutputParameterType;
+ //import org.apache.airavata.schemas.gfac.StringParameterType;
+ //import org.apache.commons.lang.SystemUtils;
+ //import org.testng.annotations.BeforeTest;
+ //import org.testng.annotations.Test;
+ //
+ //import com.google.common.eventbus.EventBus;
+ //
+ //public class LocalProviderTest {
+ //    private JobExecutionContext jobExecutionContext;
+ //    @BeforeTest
+ //    public void setUp() throws Exception {
+ //
+ //        URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+ //        File configFile = new File(resource.getPath());
+ //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
+ //        //have to set InFlwo Handlers and outFlowHandlers
+ //        ApplicationContext applicationContext = new ApplicationContext();
+ //        HostDescription host = new HostDescription();
+ //        host.getType().setHostName("localhost");
+ //        host.getType().setHostAddress("localhost");
+ //        applicationContext.setHostDescription(host);
+ //        /*
+ //           * App
+ //           */
+ //        ApplicationDescription appDesc = new ApplicationDescription();
+ //        ApplicationDeploymentDescriptionType app = appDesc.getType();
+ //        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+ //        name.setStringValue("EchoLocal");
+ //        app.setApplicationName(name);
+ //
+ //        /*
+ //           * Use bat file if it is compiled on Windows
+ //           */
+ //        if (SystemUtils.IS_OS_WINDOWS) {
+ //            URL url = this.getClass().getClassLoader().getResource("echo.bat");
+ //            app.setExecutableLocation(url.getFile());
+ //        } else {
+ //            //for unix and Mac
+ //            app.setExecutableLocation("/bin/echo");
+ //        }
+ //
+ //        /*
+ //           * Default tmp location
+ //           */
+ //        String tempDir = System.getProperty("java.io.tmpdir");
+ //        if (tempDir == null) {
+ //            tempDir = "/tmp";
+ //        }
+ //
+ //        app.setScratchWorkingDirectory(tempDir);
+ //        app.setStaticWorkingDirectory(tempDir);
+ //        app.setInputDataDirectory(tempDir + File.separator + "input");
+ //        app.setOutputDataDirectory(tempDir + File.separator + "output");
+ //        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
+ //        app.setStandardError(tempDir + File.separator + "echo.stderr");
+ //
+ //        applicationContext.setApplicationDeploymentDescription(appDesc);
+ //
+ //        /*
+ //           * Service
+ //           */
+ //        ServiceDescription serv = new ServiceDescription();
+ //        serv.getType().setName("SimpleEcho");
+ //
+ //        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+ //        InputParameterType input = InputParameterType.Factory.newInstance();
+ //        input.setParameterName("echo_input");
+ //        input.setParameterType(StringParameterType.Factory.newInstance());
+ //        inputList.add(input);
+ //        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+ //                .size()]);
+ //
+ //        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+ //        OutputParameterType output = OutputParameterType.Factory.newInstance();
+ //        output.setParameterName("echo_output");
+ //        output.setParameterType(StringParameterType.Factory.newInstance());
+ //        outputList.add(output);
+ //        OutputParameterType[] outputParamList = outputList
+ //                .toArray(new OutputParameterType[outputList.size()]);
+ //
+ //        serv.getType().setInputParametersArray(inputParamList);
+ //        serv.getType().setOutputParametersArray(outputParamList);
+ //
+ //        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+ //        jobExecutionContext.setApplicationContext(applicationContext);
+ //        /*
+ //        * Host
+ //        */
+ //        applicationContext.setServiceDescription(serv);
+ //
+ //        MessageContext inMessage = new MessageContext();
+ //        ActualParameter echo_input = new ActualParameter();
+ //        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+ //        inMessage.addParameter("echo_input", echo_input);
+ //
+ //        jobExecutionContext.setInMessageContext(inMessage);
+ //
+ //        MessageContext outMessage = new MessageContext();
+ //        ActualParameter echo_out = new ActualParameter();
+ //        outMessage.addParameter("echo_output", echo_out);
+ //
+ //        jobExecutionContext.setOutMessageContext(outMessage);
+ //
+ //        jobExecutionContext.setExperimentID("test123");
+ //        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
+ //        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
+ //        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
+ //        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
+ //
+ //
+ //    }
+ //
+ //    @Test
+ //    public void testLocalDirectorySetupHandler() throws GFacException {
+ //        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+ //        localDirectorySetupHandler.invoke(jobExecutionContext);
+ //
+ //        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+ //        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
+ //        junit.framework.Assert.assertTrue(new File(app.getStaticWorkingDirectory()).exists());
+ //        junit.framework.Assert.assertTrue(new File(app.getScratchWorkingDirectory()).exists());
+ //        junit.framework.Assert.assertTrue(new File(app.getInputDataDirectory()).exists());
+ //        junit.framework.Assert.assertTrue(new File(app.getOutputDataDirectory()).exists());
+ //    }
+ //
+ //    @Test
+ //    public void testLocalProvider() throws GFacException,GFacProviderException {
+ //        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+ //        localDirectorySetupHandler.invoke(jobExecutionContext);
+ //        LocalProvider localProvider = new LocalProvider();
+ //        localProvider.setMonitorPublisher(new MonitorPublisher(new EventBus()));
+ //        localProvider.initialize(jobExecutionContext);
+ //        localProvider.execute(jobExecutionContext);
+ //        localProvider.dispose(jobExecutionContext);
+ //    }
+ //}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-service/pom.xml
index 0000000,99497a3..83999e3
mode 000000,100644..100644
--- a/modules/gfac/gfac-service/pom.xml
+++ b/modules/gfac/gfac-service/pom.xml
@@@ -1,0 -1,100 +1,100 @@@
+ <?xml version="1.0" encoding="UTF-8"?>
+ 
+ <!--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. -->
+ 
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 
+     <modelVersion>4.0.0</modelVersion>
+ 
+     <parent>
+         <artifactId>airavata-gfac</artifactId>
+         <groupId>org.apache.airavata</groupId>
+         <version>0.16-SNAPSHOT</version>
+         <relativePath>../pom.xml</relativePath>
+     </parent>
+ 
+     <name>Airavata Gfac Service</name>
+     <artifactId>airavata-gfac-service</artifactId>
+     <packaging>jar</packaging>
+     <url>http://airavata.apache.org/</url>
+ 
+     <dependencies>
+         <dependency>
+             <groupId>org.apache.thrift</groupId>
+             <artifactId>libthrift</artifactId>
+             <version>${thrift.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>slf4j-log4j12</artifactId>
+             <version>${org.slf4j.version}</version>
+         </dependency>
+         <!--<dependency>-->
+             <!--<groupId>org.apache.airavata</groupId>-->
+             <!--<artifactId>airavata-client-api</artifactId>-->
+             <!--<version>${project.version}</version>-->
+         <!--</dependency>-->
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-common-utils</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-registry-cpi</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
 -            <artifactId>airavata-jpa-registry</artifactId>
++            <artifactId>airavata-experiment-catalog</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-client</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-core</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-impl</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+ 	    <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-model-utils</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-api-stubs</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+ 	    <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-server-configuration</artifactId>
+             <scope>test</scope>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.curator</groupId>
+             <artifactId>curator-framework</artifactId>
+             <version>${curator.version}</version>
+         </dependency>
+     </dependencies>
+ 
+     <properties>
+         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+     </properties>
+     
+ </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 0000000,64c06e4..f6338a8
mode 000000,100644..100644
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@@ -1,0 -1,421 +1,421 @@@
+ /*
+  *
+  * 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.server;
+ 
+ import com.google.common.eventbus.EventBus;
+ import org.airavata.appcatalog.cpi.AppCatalog;
+ import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+ import org.apache.airavata.common.exception.AiravataException;
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.logger.AiravataLogger;
+ import org.apache.airavata.common.logger.AiravataLoggerFactory;
+ import org.apache.airavata.common.utils.AiravataZKUtils;
+ import org.apache.airavata.common.utils.Constants;
+ import org.apache.airavata.common.utils.MonitorPublisher;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.common.utils.ThriftUtils;
+ import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+ import org.apache.airavata.gfac.GFacConfiguration;
+ import org.apache.airavata.gfac.GFacException;
+ import org.apache.airavata.gfac.core.GFac;
+ import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+ import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+ import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
+ import org.apache.airavata.gfac.core.GFacUtils;
+ import org.apache.airavata.gfac.cpi.GfacService;
+ import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
+ import org.apache.airavata.gfac.impl.BetterGfacImpl;
+ import org.apache.airavata.gfac.impl.InputHandlerWorker;
+ import org.apache.airavata.messaging.core.MessageContext;
+ import org.apache.airavata.messaging.core.MessageHandler;
+ import org.apache.airavata.messaging.core.MessagingConstants;
+ import org.apache.airavata.messaging.core.Publisher;
+ import org.apache.airavata.messaging.core.PublisherFactory;
+ import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
+ import org.apache.airavata.model.messaging.event.MessageType;
+ import org.apache.airavata.model.messaging.event.TaskSubmitEvent;
+ import org.apache.airavata.model.messaging.event.TaskTerminateEvent;
+ import org.apache.airavata.model.workspace.experiment.ExperimentState;
+ import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
 -import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
++import org.apache.airavata.experiment.catalog.impl.RegistryFactory;
+ import org.apache.airavata.registry.cpi.Registry;
+ import org.apache.airavata.registry.cpi.RegistryException;
+ import org.apache.airavata.registry.cpi.RegistryModelType;
+ import org.apache.curator.RetryPolicy;
+ import org.apache.curator.framework.CuratorFramework;
+ import org.apache.curator.framework.CuratorFrameworkFactory;
+ import org.apache.curator.retry.ExponentialBackoffRetry;
+ import org.apache.thrift.TBase;
+ import org.apache.thrift.TException;
+ import org.apache.zookeeper.CreateMode;
+ import org.apache.zookeeper.ZooDefs;
+ import org.apache.zookeeper.data.Stat;
+ import org.xml.sax.SAXException;
+ 
+ import javax.xml.parsers.ParserConfigurationException;
+ import javax.xml.xpath.XPathExpressionException;
+ import java.io.File;
+ import java.io.IOException;
+ import java.net.URL;
+ import java.util.ArrayList;
+ import java.util.Calendar;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.concurrent.BlockingQueue;
+ 
+ public class GfacServerHandler implements GfacService.Iface {
+     private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GfacServerHandler.class);
+     private static RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer;
+     private static int requestCount=0;
+     private Registry registry;
+     private AppCatalog appCatalog;
+     private String gatewayName;
+     private String airavataUserName;
+     private CuratorFramework curatorClient;
+     private MonitorPublisher publisher;
+     private String gfacServer;
+     private String gfacExperiments;
+     private String airavataServerHostPort;
+     private BlockingQueue<TaskSubmitEvent> taskSubmitEvents;
+     private static File gfacConfigFile;
+     private static List<ThreadedHandler> daemonHandlers = new ArrayList<ThreadedHandler>();
+     private static List<AbstractActivityListener> activityListeners = new ArrayList<AbstractActivityListener>();
+ 
+     public GfacServerHandler() throws Exception {
+         try {
+             // start curator client
+             String zkhostPort = AiravataZKUtils.getZKhostPort();
+             RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 5);
+             curatorClient = CuratorFrameworkFactory.newClient(zkhostPort, retryPolicy);
+             curatorClient.start();
+             gfacServer = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NODE, "/gfac-server");
+             gfacExperiments = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+             airavataServerHostPort = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST)
+                     + ":" + ServerSettings.getSetting(Constants.GFAC_SERVER_PORT);
+             storeServerConfig();
+             publisher = new MonitorPublisher(new EventBus());
+             registry = RegistryFactory.getDefaultRegistry();
+             appCatalog = AppCatalogFactory.getAppCatalog();
+             setGatewayProperties();
+             startDaemonHandlers();
+             // initializing Better Gfac Instance
+             BetterGfacImpl.getInstance().init(registry, appCatalog, curatorClient, publisher);
+             if (ServerSettings.isGFacPassiveMode()) {
+                 rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
+                 rabbitMQTaskLaunchConsumer.listen(new TaskLaunchMessageHandler());
+             }
+             startStatusUpdators(registry, curatorClient, publisher, rabbitMQTaskLaunchConsumer);
+ 
+         } catch (Exception e) {
+             throw new Exception("Error initialising GFAC", e);
+         }
+     }
+ 
+     public static void main(String[] args) {
+         RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer = null;
+         try {
+             rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
+             rabbitMQTaskLaunchConsumer.listen(new TestHandler());
+         } catch (AiravataException e) {
+             logger.error(e.getMessage(), e);
+         }
+     }
+     private void storeServerConfig() throws Exception {
+         Stat stat = curatorClient.checkExists().forPath(gfacServer);
+         if (stat == null) {
+             curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
+                     .forPath(gfacServer, new byte[0]);
+         }
+         String instanceId = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME);
+         String instanceNode = gfacServer + File.separator + instanceId;
+         stat = curatorClient.checkExists().forPath(instanceNode);
+         if (stat == null) {
+             curatorClient.create().withMode(CreateMode.EPHEMERAL).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(instanceNode, airavataServerHostPort.getBytes());
+             curatorClient.getChildren().watched().forPath(instanceNode);
+         }
+         stat = curatorClient.checkExists().forPath(gfacExperiments);
+         if (stat == null) {
+             curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(gfacExperiments, airavataServerHostPort.getBytes());
+         }
+         stat = curatorClient.checkExists().forPath(gfacExperiments + File.separator + instanceId);
+         if (stat == null) {
+             curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
+                     .forPath(gfacExperiments + File.separator + instanceId, airavataServerHostPort.getBytes());
+         }
+     }
+ 
+     private long ByateArrayToLong(byte[] data) {
+         long value = 0;
+         for (int i = 0; i < data.length; i++)
+         {
+             value += ((long) data[i] & 0xffL) << (8 * i);
+         }
+         return value;
+     }
+ 
+     public String getGFACServiceVersion() throws TException {
+         return gfac_cpi_serviceConstants.GFAC_CPI_VERSION;
+     }
+ 
+     /**
+      * * After creating the experiment Data and Task Data in the orchestrator
+      * * Orchestrator has to invoke this operation for each Task per experiment to run
+      * * the actual Job related actions.
+      * *
+      * * @param experimentID
+      * * @param taskID
+      * * @param gatewayId:
+      * *  The GatewayId is inferred from security context and passed onto gfac.
+      * * @return sucess/failure
+      * *
+      * *
+      *
+      * @param experimentId
+      * @param taskId
+      * @param gatewayId
+      */
+     public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
+         requestCount++;
+         logger.info("-----------------------------------------------------" + requestCount + "-----------------------------------------------------");
+         logger.infoId(experimentId, "GFac Received submit job request for the Experiment: {} TaskId: {}", experimentId, taskId);
+         InputHandlerWorker inputHandlerWorker = new InputHandlerWorker(BetterGfacImpl.getInstance(), experimentId,
+                 taskId, gatewayId, tokenId);
+ //        try {
+ //            if( gfac.submitJob(experimentId, taskId, gatewayId)){
+         logger.debugId(experimentId, "Submitted job to the Gfac Implementation, experiment {}, task {}, gateway " +
+                 "{}", experimentId, taskId, gatewayId);
+ 
+         GFacThreadPoolExecutor.getCachedThreadPool().execute(inputHandlerWorker);
+ 
+         // we immediately return when we have a threadpool
+         return true;
+     }
+ 
+     public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
+         logger.infoId(experimentId, "GFac Received cancel job request for Experiment: {} TaskId: {} ", experimentId, taskId);
+         try {
+             if (BetterGfacImpl.getInstance().cancel(experimentId, taskId, gatewayId, tokenId)) {
+                 logger.debugId(experimentId, "Successfully cancelled job, experiment {} , task {}", experimentId, taskId);
+                 return true;
+             } else {
+                 logger.errorId(experimentId, "Job cancellation failed, experiment {} , task {}", experimentId, taskId);
+                 return false;
+             }
+         } catch (Exception e) {
+             logger.errorId(experimentId, "Error cancelling the experiment {}.", experimentId);
+             throw new TException("Error cancelling the experiment : " + e.getMessage(), e);
+         }
+     }
+ 
+     public Registry getRegistry() {
+         return registry;
+     }
+ 
+     public void setRegistry(Registry registry) {
+         this.registry = registry;
+     }
+ 
+     public String getGatewayName() {
+         return gatewayName;
+     }
+ 
+     public void setGatewayName(String gatewayName) {
+         this.gatewayName = gatewayName;
+     }
+ 
+     public String getAiravataUserName() {
+         return airavataUserName;
+     }
+ 
+     public void setAiravataUserName(String airavataUserName) {
+         this.airavataUserName = airavataUserName;
+     }
+ 
+     protected void setGatewayProperties() throws ApplicationSettingsException {
+         setAiravataUserName(ServerSettings.getDefaultUser());
+         setGatewayName(ServerSettings.getDefaultUserGateway());
+     }
+ 
+     private GFac getGfac() throws TException {
+         GFac gFac = BetterGfacImpl.getInstance();
+         gFac.init(registry, appCatalog, curatorClient, publisher);
+         return gFac;
+     }
+ 
+     public void startDaemonHandlers() {
+         List<GFacHandlerConfig> daemonHandlerConfig = null;
+         String className = null;
+         try {
+             URL resource = GfacServerHandler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+             if (resource != null) {
+                 gfacConfigFile = new File(resource.getPath());
+             }
+             daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
+             for (GFacHandlerConfig handlerConfig : daemonHandlerConfig) {
+                 className = handlerConfig.getClassName();
+                 Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
+                 ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
+                 threadedHandler.initProperties(handlerConfig.getProperties());
+                 daemonHandlers.add(threadedHandler);
+             }
+         } catch (ParserConfigurationException | IOException | XPathExpressionException | ClassNotFoundException |
+                 InstantiationException | IllegalAccessException | GFacHandlerException | SAXException e) {
+             logger.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+         }
+         for (ThreadedHandler tHandler : daemonHandlers) {
+             (new Thread(tHandler)).start();
+         }
+     }
+ 
+ 
+     public static void startStatusUpdators(Registry registry, CuratorFramework curatorClient, MonitorPublisher publisher,
+ 
+                                            RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer) {
+         try {
+             String[] listenerClassList = ServerSettings.getActivityListeners();
+             Publisher rabbitMQPublisher = PublisherFactory.createActivityPublisher();
+             for (String listenerClass : listenerClassList) {
+                 Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
+                 AbstractActivityListener abstractActivityListener = aClass.newInstance();
+                 activityListeners.add(abstractActivityListener);
+                 abstractActivityListener.setup(publisher, registry, curatorClient, rabbitMQPublisher, rabbitMQTaskLaunchConsumer);
+                 logger.info("Registering listener: " + listenerClass);
+                 publisher.registerListener(abstractActivityListener);
+             }
+         } catch (Exception e) {
+             logger.error("Error loading the listener classes configured in airavata-server.properties", e);
+         }
+     }
+     private static  class TestHandler implements MessageHandler{
+         @Override
+         public Map<String, Object> getProperties() {
+             Map<String, Object> props = new HashMap<String, Object>();
+             ArrayList<String> keys = new ArrayList<String>();
+             keys.add(ServerSettings.getLaunchQueueName());
+             keys.add(ServerSettings.getCancelQueueName());
+             props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
+             props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
+             return props;
+         }
+ 
+         @Override
+         public void onMessage(MessageContext message) {
+             TaskSubmitEvent event = new TaskSubmitEvent();
+             TBase messageEvent = message.getEvent();
+             byte[] bytes = new byte[0];
+             try {
+                 bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                 ThriftUtils.createThriftFromBytes(bytes, event);
+                 System.out.println(event.getExperimentId());
+             } catch (TException e) {
+                 logger.error(e.getMessage(), e);
+             }
+         }
+     }
+ 
+     private class TaskLaunchMessageHandler implements MessageHandler {
+         private String experimentNode;
+         private String nodeName;
+ 
+         public TaskLaunchMessageHandler() {
+             experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+             nodeName = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME,"gfac-node0");
+         }
+ 
+         public Map<String, Object> getProperties() {
+             Map<String, Object> props = new HashMap<String, Object>();
+             ArrayList<String> keys = new ArrayList<String>();
+             keys.add(ServerSettings.getLaunchQueueName());
+             keys.add(ServerSettings.getCancelQueueName());
+             props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
+             props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
+             return props;
+         }
+ 
+         public void onMessage(MessageContext message) {
+             System.out.println(" Message Received with message id '" + message.getMessageId()
+                     + "' and with message type '" + message.getType());
+             if (message.getType().equals(MessageType.LAUNCHTASK)) {
+                 try {
+                     TaskSubmitEvent event = new TaskSubmitEvent();
+                     TBase messageEvent = message.getEvent();
+                     byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                     ThriftUtils.createThriftFromBytes(bytes, event);
+                     // update experiment status to executing
+                     ExperimentStatus status = new ExperimentStatus();
+                     status.setExperimentState(ExperimentState.EXECUTING);
+                     status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+                     registry.update(RegistryModelType.EXPERIMENT_STATUS, status, event.getExperimentId());
+                     experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+                     try {
+                         GFacUtils.createExperimentEntryForPassive(event.getExperimentId(), event.getTaskId(), curatorClient,
+                                 experimentNode, nodeName, event.getTokenId(), message.getDeliveryTag());
+                         AiravataZKUtils.getExpStatePath(event.getExperimentId());
+                         submitJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
+                     } catch (Exception e) {
+                         logger.error(e.getMessage(), e);
+                         rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
+                     }
+                 } catch (TException e) {
+                     logger.error(e.getMessage(), e); //nobody is listening so nothing to throw
+                 } catch (RegistryException e) {
+                     logger.error("Error while updating experiment status", e);
+                 }
+             } else if (message.getType().equals(MessageType.TERMINATETASK)) {
+                 boolean cancelSuccess = false;
+                 TaskTerminateEvent event = new TaskTerminateEvent();
+                 TBase messageEvent = message.getEvent();
+                 try {
+                     byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                     ThriftUtils.createThriftFromBytes(bytes, event);
+                     boolean saveDeliveryTagSuccess = GFacUtils.setExperimentCancel(event.getExperimentId(), curatorClient, message.getDeliveryTag());
+                     if (saveDeliveryTagSuccess) {
+                         cancelSuccess = cancelJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
+                         System.out.println(" Message Received with message id '" + message.getMessageId()
+                                 + "' and with message type '" + message.getType());
+                     } else {
+                         throw new GFacException("Terminate Task fail to save delivery tag : " + String.valueOf(message.getDeliveryTag()) + " \n" +
+                                 "This happens when another cancel operation is being processed or experiment is in one of final states, complete|failed|cancelled.");
+                     }
+                 } catch (Exception e) {
+                     logger.error(e.getMessage(), e);
+                 }finally {
+                     if (cancelSuccess) {
+                         // if cancel success , AiravataExperimentStatusUpdator will send an ack to this message.
+                     } else {
+                         try {
+                             if (GFacUtils.ackCancelRequest(event.getExperimentId(), curatorClient)) {
+                                 if (!rabbitMQTaskLaunchConsumer.isOpen()) {
+                                     rabbitMQTaskLaunchConsumer.reconnect();
+                                 }
+                                 rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
+                             }
+                         } catch (Exception e) {
+                             logger.error("Error while ack to cancel request, experimentId: " + event.getExperimentId());
+                         }
+                     }
+                 }
+             }
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
index 0000000,651f414..15d384c
mode 000000,100644..100644
--- a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
+++ b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
@@@ -1,0 -1,330 +1,329 @@@
+ /*
+  *
+  * 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.client.util;
+ 
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
 -import org.apache.airavata.common.utils.AiravataUtils;
+ import org.apache.airavata.common.utils.ServerSettings;
 -import org.apache.airavata.persistance.registry.jpa.ResourceType;
 -import org.apache.airavata.persistance.registry.jpa.resources.*;
++import org.apache.airavata.experiment.catalog.ResourceType;
++import org.apache.airavata.experiment.catalog.resources.*;
+ import org.apache.airavata.registry.cpi.RegistryException;
+ import org.apache.derby.drda.NetworkServerControl;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ 
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.net.InetAddress;
+ import java.sql.*;
+ import java.util.StringTokenizer;
+ 
+ public class Initialize {
+     private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
+     public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+     public  String scriptName = "registry-derby.sql";
+     private NetworkServerControl server;
+     private static final String delimiter = ";";
+     public static final String PERSISTANT_DATA = "Configuration";
+ 
+     public Initialize(String scriptName) {
+         this.scriptName = scriptName;
+     }
+ 
+     public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+         if (suffix.length() > buffer.length()) {
+             return false;
+         }
+         // this loop is done on purpose to avoid memory allocation performance
+         // problems on various JDKs
+         // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+         // implementation is ok though does allocation/copying
+         // StringBuffer.toString().endsWith() does massive memory
+         // allocation/copying on JDK 1.5
+         // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+         int endIndex = suffix.length() - 1;
+         int bufferIndex = buffer.length() - 1;
+         while (endIndex >= 0) {
+             if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                 return false;
+             }
+             bufferIndex--;
+             endIndex--;
+         }
+         return true;
+     }
+ 
+     private static boolean isServerStarted(NetworkServerControl server, int ntries)
+     {
+         for (int i = 1; i <= ntries; i ++)
+         {
+             try {
+                 Thread.sleep(500);
+                 server.ping();
+                 return true;
+             }
+             catch (Exception e) {
+                 if (i == ntries)
+                     return false;
+             }
+         }
+         return false;
+     }
+ 
+     public void initializeDB() throws SQLException{
+         String jdbcUrl = null;
+         String jdbcUser = null;
+         String jdbcPassword = null;
+         try{
+             jdbcUrl = ServerSettings.getSetting("registry.jdbc.url");
+             jdbcUser = ServerSettings.getSetting("registry.jdbc.user");
+             jdbcPassword = ServerSettings.getSetting("registry.jdbc.password");
+             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+         } catch (ApplicationSettingsException e) {
+             logger.error("Unable to read properties", e);
+         }
+         startDerbyInServerMode();
+         if(!isServerStarted(server, 20)){
+            throw new RuntimeException("Derby server cound not started within five seconds...");
+         }
+ 
+         Connection conn = null;
+         try {
+             Class.forName(Utils.getJDBCDriver()).newInstance();
+             conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+             if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
+                 executeSQLScript(conn);
+                 logger.info("New Database created for Registry");
+             } else {
+                 logger.debug("Database already created for Registry!");
+             }
+         } catch (Exception e) {
+             logger.error(e.getMessage(), e);
+             throw new RuntimeException("Database failure", e);
+         } finally {
+             try {
+                 if (conn != null){
+                     if (!conn.getAutoCommit()) {
+                         conn.commit();
+                     }
+                     conn.close();
+                 }
+             } catch (SQLException e) {
+                 logger.error(e.getMessage(), e);
+             }
+         }
+ 
+         try{
+             GatewayResource gatewayResource = new GatewayResource();
+             gatewayResource.setGatewayId(ServerSettings.getSetting("default.registry.gateway"));
+             gatewayResource.setGatewayName(ServerSettings.getSetting("default.registry.gateway"));
+             gatewayResource.setDomain("test-domain");
+             gatewayResource.setEmailAddress("test-email");
+             gatewayResource.save();
+             
+             UserResource userResource = new UserResource();
+             userResource.setUserName(ServerSettings.getSetting("default.registry.user"));
+             userResource.setPassword(ServerSettings.getSetting("default.registry.password"));
+             userResource.save();
+ 
+             WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+             workerResource.setUser(userResource.getUserName());
+             workerResource.save();
+             
+             ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
+             projectResource.setGatewayId(gatewayResource.getGatewayId());
+             projectResource.setId("default");
+             projectResource.setName("default");
+             projectResource.setWorker(workerResource);
+             projectResource.save();
+         
+           
+         } catch (ApplicationSettingsException e) {
+             logger.error("Unable to read properties", e);
+             throw new SQLException(e.getMessage(), e);
+         } catch (RegistryException e) {
+             logger.error("Unable to save data to registry", e);
+             throw new SQLException(e.getMessage(), e);
+         }
+     }
+ 
+     public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+         try {
+             System.out.println("Running a query to test the database tables existence.");
+             // check whether the tables are already created with a query
+             Statement statement = null;
+             try {
+                 statement = conn.createStatement();
+                 ResultSet rs = statement.executeQuery("select * from " + tableName);
+                 if (rs != null) {
+                     rs.close();
+                 }
+             } finally {
+                 try {
+                     if (statement != null) {
+                         statement.close();
+                     }
+                 } catch (SQLException e) {
+                     return false;
+                 }
+             }
+         } catch (SQLException e) {
+             return false;
+         }
+ 
+         return true;
+     }
+ 
+     private void executeSQLScript(Connection conn) throws Exception {
+         StringBuffer sql = new StringBuffer();
+         BufferedReader reader = null;
+         try{
+ 
+         InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+         reader = new BufferedReader(new InputStreamReader(inputStream));
+         String line;
+         while ((line = reader.readLine()) != null) {
+             line = line.trim();
+             if (line.startsWith("//")) {
+                 continue;
+             }
+             if (line.startsWith("--")) {
+                 continue;
+             }
+             StringTokenizer st = new StringTokenizer(line);
+             if (st.hasMoreTokens()) {
+                 String token = st.nextToken();
+                 if ("REM".equalsIgnoreCase(token)) {
+                     continue;
+                 }
+             }
+             sql.append(" ").append(line);
+ 
+             // SQL defines "--" as a comment to EOL
+             // and in Oracle it may contain a hint
+             // so we cannot just remove it, instead we must end it
+             if (line.indexOf("--") >= 0) {
+                 sql.append("\n");
+             }
+             if ((checkStringBufferEndsWith(sql, delimiter))) {
+                 executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                 sql.replace(0, sql.length(), "");
+             }
+         }
+         // Catch any statements not followed by ;
+         if (sql.length() > 0) {
+             executeSQL(sql.toString(), conn);
+         }
+         }catch (IOException e){
+             logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+             throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+         }finally {
+             if (reader != null) {
+                 reader.close();
+             }
+ 
+         }
+ 
+     }
+ 
+     private static void executeSQL(String sql, Connection conn) throws Exception {
+         // Check and ignore empty statements
+         if ("".equals(sql.trim())) {
+             return;
+         }
+ 
+         Statement statement = null;
+         try {
+             logger.debug("SQL : " + sql);
+ 
+             boolean ret;
+             int updateCount = 0, updateCountTotal = 0;
+             statement = conn.createStatement();
+             ret = statement.execute(sql);
+             updateCount = statement.getUpdateCount();
+             do {
+                 if (!ret) {
+                     if (updateCount != -1) {
+                         updateCountTotal += updateCount;
+                     }
+                 }
+                 ret = statement.getMoreResults();
+                 if (ret) {
+                     updateCount = statement.getUpdateCount();
+                 }
+             } while (ret);
+ 
+             logger.debug(sql + " : " + updateCountTotal + " rows affected");
+ 
+             SQLWarning warning = conn.getWarnings();
+             while (warning != null) {
+                 logger.warn(warning + " sql warning");
+                 warning = warning.getNextWarning();
+             }
+             conn.clearWarnings();
+         } catch (SQLException e) {
+             if (e.getSQLState().equals("X0Y32")) {
+                 // eliminating the table already exception for the derby
+                 // database
+                 logger.info("Table Already Exists", e);
+             } else {
+                 throw new Exception("Error occurred while executing : " + sql, e);
+             }
+         } finally {
+             if (statement != null) {
+                 try {
+                     statement.close();
+                 } catch (SQLException e) {
+                     logger.error("Error occurred while closing result set.", e);
+                 }
+             }
+         }
+     }
+ 
+     private void startDerbyInServerMode() {
+         try {
+             System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+             server = new NetworkServerControl(InetAddress.getByName(Utils.getHost()),
+                     20000,
+                     Utils.getJDBCUser(), Utils.getJDBCPassword());
+             java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+             server.start(consoleWriter);
+         } catch (IOException e) {
+             logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                     "specified port is available");
+         } catch (Exception e) {
+             logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                     "specified port is available");
+         }
+ 
+     }
+ 
+     public void stopDerbyServer() throws SQLException{
+         try {
+             server.shutdown();
+         } catch (Exception e) {
+             logger.error(e.getMessage(), e);
+             throw new SQLException("Error while stopping derby server", e);
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------


[76/81] [abbrv] airavata git commit: moving resources into src

Posted by sh...@apache.org.
moving resources into src


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

Branch: refs/heads/master
Commit: 6eaaff4feae3a46d574ec59f04499e28c62c5c85
Parents: 8e451b3
Author: Suresh Marru <sm...@apache.org>
Authored: Thu Jun 4 15:06:51 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Jun 4 15:06:51 2015 -0400

----------------------------------------------------------------------
 distribution/main/assembly/bin-assembly.xml     |  189 --
 distribution/main/assembly/src-assembly.xml     |   75 -
 distribution/main/resources/INSTALL             |   30 -
 distribution/main/resources/LICENSE             | 2387 ------------------
 distribution/main/resources/NOTICE              |  163 --
 distribution/main/resources/README              |  145 --
 .../main/resources/bin/airavata-server.bat      |   55 -
 .../main/resources/bin/airavata-server.sh       |  118 -
 distribution/main/resources/bin/api-server.sh   |  118 -
 distribution/main/resources/bin/derby.sh        |   23 -
 distribution/main/resources/bin/gfac-server.sh  |  118 -
 distribution/main/resources/bin/logo.txt        |   34 -
 .../main/resources/bin/orchestrator-server.sh   |  118 -
 distribution/main/resources/bin/setenv.bat      |   43 -
 distribution/main/resources/bin/setenv.sh       |   77 -
 .../main/resources/bin/startNetworkServer       |  189 --
 .../main/resources/bin/workflow-server.sh       |  118 -
 .../main/resources/samples/registerSample.sh    |   25 -
 .../main/resources/samples/scripts/add.sh       |   21 -
 .../main/resources/samples/scripts/echo.sh      |   22 -
 .../main/resources/samples/scripts/multiply.sh  |   22 -
 .../main/resources/samples/scripts/subtract.sh  |   22 -
 distribution/src/main/assembly/bin-assembly.xml |  189 ++
 distribution/src/main/assembly/src-assembly.xml |   75 +
 distribution/src/main/resources/INSTALL         |   30 +
 distribution/src/main/resources/LICENSE         | 2387 ++++++++++++++++++
 distribution/src/main/resources/NOTICE          |  163 ++
 distribution/src/main/resources/README          |  145 ++
 .../src/main/resources/bin/airavata-server.bat  |   55 +
 .../src/main/resources/bin/airavata-server.sh   |  118 +
 .../src/main/resources/bin/api-server.sh        |  118 +
 distribution/src/main/resources/bin/derby.sh    |   23 +
 .../src/main/resources/bin/gfac-server.sh       |  118 +
 distribution/src/main/resources/bin/logo.txt    |   34 +
 .../main/resources/bin/orchestrator-server.sh   |  118 +
 distribution/src/main/resources/bin/setenv.bat  |   43 +
 distribution/src/main/resources/bin/setenv.sh   |   77 +
 .../src/main/resources/bin/startNetworkServer   |  189 ++
 .../src/main/resources/bin/workflow-server.sh   |  118 +
 .../main/resources/samples/registerSample.sh    |   25 +
 .../src/main/resources/samples/scripts/add.sh   |   21 +
 .../src/main/resources/samples/scripts/echo.sh  |   22 +
 .../main/resources/samples/scripts/multiply.sh  |   22 +
 .../main/resources/samples/scripts/subtract.sh  |   22 +
 44 files changed, 4112 insertions(+), 4112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/main/assembly/bin-assembly.xml b/distribution/main/assembly/bin-assembly.xml
deleted file mode 100644
index 6c290b8..0000000
--- a/distribution/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<!--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. -->
-
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|fileMode|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|outputFileNameMapping|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<fileSets>
-
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** copy database scripts ********************** -->
-		<fileSet>
-			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../registry/airavata-jpa-registry/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../app-catalog/app-catalog-data/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-				<include>logo.txt</include>
-				<include>startNetworkServer</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/samples</directory>
-			<outputDirectory>samples</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>**/*.sh</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>airavata-server.properties</include>
-				<include>zoo.cfg</include>
-				<include>registry.properties</include>
-				<include>log4j.properties</include>
-				<include>host.xml</include>
-				<include>persistence.xml</include>
-				<include>provenance.sql</include>
-				<include>gfac-config.xml</include>
-				<include>PBSTemplate.xslt</include>
-				<include>SLURMTemplate.xslt</include>
-				<include>LSFTemplate.xslt</include>
-				<include>UGETemplate.xslt</include>
-				<include>gsissh.properties</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
-			********************** -->
-		<fileSet>
-			<directory>src/main/resources/axis2-standalone-bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-		<fileSet>
-			<directory>src/main/resources/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>**/*</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy samples ********************** -->
-		<fileSet>
-			<directory>${project.build.directory}/samples/applications
-			</directory>
-			<outputDirectory>samples</outputDirectory>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<includes>
-				<include>*:*:jar</include>
-            </includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/main/assembly/src-assembly.xml b/distribution/main/assembly/src-assembly.xml
deleted file mode 100644
index 6a093ed..0000000
--- a/distribution/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/distribution/main/resources/INSTALL b/distribution/main/resources/INSTALL
deleted file mode 100644
index 53d0550..0000000
--- a/distribution/main/resources/INSTALL
+++ /dev/null
@@ -1,30 +0,0 @@
-Installing  Apache Airavata 0.14
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or clone from git.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* Alternatively, all  compressed binary distributions can be found at <PROJECT DIR>/modules/distribution/release/target/release-artifacts
-
-Running Tests
--------------
-* Unit tests & integrations tests will run while Apache Airavata is built from source (without "-Dmaven.test.skip=true").
-* To run the test samples
-    - You can find the binary distributions at <PROJECT DIR>/modules/distribution/release/target/release-artifacts or from
-      the Apache Airavata download site.
-    - Extract the binary distributions and once the binary is unzipped, instructions to run the tests should be followed
-      from README files found within.
-
-Tutorials
-----------
-The airavata website has instructions for basic tutorials:
-* Describing and executing applications using Airavata - follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial
\ No newline at end of file


[43/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
new file mode 100644
index 0000000..888d3ae
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
@@ -0,0 +1,4174 @@
+/*
+ * XML Type:  pbsParams
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PbsParams
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML pbsParams(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class PbsParamsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.PbsParams
+{
+    private static final long serialVersionUID = 1L;
+    
+    public PbsParamsImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName JOBID$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "jobID");
+    private static final javax.xml.namespace.QName USERNAME$2 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "userName");
+    private static final javax.xml.namespace.QName SHELLNAME$4 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "shellName");
+    private static final javax.xml.namespace.QName QUEUENAME$6 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "queueName");
+    private static final javax.xml.namespace.QName JOBNAME$8 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "jobName");
+    private static final javax.xml.namespace.QName ALLENVEXPORT$10 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "allEnvExport");
+    private static final javax.xml.namespace.QName MAILOPTIONS$12 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "mailOptions");
+    private static final javax.xml.namespace.QName MAILADDRESS$14 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "mailAddress");
+    private static final javax.xml.namespace.QName PARTITION$16 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "partition");
+    private static final javax.xml.namespace.QName MAILTYPE$18 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "mailType");
+    private static final javax.xml.namespace.QName ACOUNTSTRING$20 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "acountString");
+    private static final javax.xml.namespace.QName MAXWALLTIME$22 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "maxWallTime");
+    private static final javax.xml.namespace.QName STANDARDOUTFILE$24 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "standardOutFile");
+    private static final javax.xml.namespace.QName STANDARDERRORFILE$26 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "standardErrorFile");
+    private static final javax.xml.namespace.QName OUTPUTDIRECTORY$28 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "outputDirectory");
+    private static final javax.xml.namespace.QName INPUTDIRECTORY$30 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "inputDirectory");
+    private static final javax.xml.namespace.QName NODES$32 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "nodes");
+    private static final javax.xml.namespace.QName PROCESSESPERNODE$34 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "processesPerNode");
+    private static final javax.xml.namespace.QName CPUCOUNT$36 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "cpuCount");
+    private static final javax.xml.namespace.QName NODELIST$38 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "nodeList");
+    private static final javax.xml.namespace.QName WORKINGDIRECTORY$40 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "workingDirectory");
+    private static final javax.xml.namespace.QName EXECUTABLEPATH$42 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "executablePath");
+    private static final javax.xml.namespace.QName INPUTS$44 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "inputs");
+    private static final javax.xml.namespace.QName EXPORTS$46 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "exports");
+    private static final javax.xml.namespace.QName STATUS$48 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "status");
+    private static final javax.xml.namespace.QName AFTERANY$50 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "afterAny");
+    private static final javax.xml.namespace.QName AFTEROKLIST$52 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "afterOKList");
+    private static final javax.xml.namespace.QName CTIME$54 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "cTime");
+    private static final javax.xml.namespace.QName QTIME$56 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "qTime");
+    private static final javax.xml.namespace.QName MTIME$58 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "mTime");
+    private static final javax.xml.namespace.QName STIME$60 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "sTime");
+    private static final javax.xml.namespace.QName COMPTIME$62 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "compTime");
+    private static final javax.xml.namespace.QName OWNER$64 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "owner");
+    private static final javax.xml.namespace.QName EXECUTENODE$66 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "executeNode");
+    private static final javax.xml.namespace.QName ELLAPSEDTIME$68 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "ellapsedTime");
+    private static final javax.xml.namespace.QName USEDCPUTIME$70 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "usedCPUTime");
+    private static final javax.xml.namespace.QName USEDMEM$72 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "usedMem");
+    private static final javax.xml.namespace.QName SUBMITARGS$74 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "submitArgs");
+    private static final javax.xml.namespace.QName VARIABLELIST$76 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "variableList");
+    private static final javax.xml.namespace.QName PREJOBCOMMANDS$78 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "preJobCommands");
+    private static final javax.xml.namespace.QName MODULELOADCOMMANDS$80 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "moduleLoadCommands");
+    private static final javax.xml.namespace.QName POSTJOBCOMMANDS$82 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "postJobCommands");
+    private static final javax.xml.namespace.QName JOBSUBMITTERCOMMAND$84 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "jobSubmitterCommand");
+    private static final javax.xml.namespace.QName CALLBACKIP$86 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "callBackIp");
+    private static final javax.xml.namespace.QName CALLBACKPORT$88 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "callBackPort");
+    private static final javax.xml.namespace.QName CHASSISNAME$90 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "chassisName");
+    
+    
+    /**
+     * Gets the "jobID" element
+     */
+    public java.lang.String getJobID()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBID$0, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "jobID" element
+     */
+    public org.apache.xmlbeans.XmlString xgetJobID()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(JOBID$0, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "jobID" element
+     */
+    public boolean isSetJobID()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(JOBID$0) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "jobID" element
+     */
+    public void setJobID(java.lang.String jobID)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBID$0, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(JOBID$0);
+            }
+            target.setStringValue(jobID);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "jobID" element
+     */
+    public void xsetJobID(org.apache.xmlbeans.XmlString jobID)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(JOBID$0, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(JOBID$0);
+            }
+            target.set(jobID);
+        }
+    }
+    
+    /**
+     * Unsets the "jobID" element
+     */
+    public void unsetJobID()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(JOBID$0, 0);
+        }
+    }
+    
+    /**
+     * Gets the "userName" element
+     */
+    public java.lang.String getUserName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERNAME$2, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "userName" element
+     */
+    public org.apache.xmlbeans.XmlString xgetUserName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERNAME$2, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "userName" element
+     */
+    public boolean isSetUserName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(USERNAME$2) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "userName" element
+     */
+    public void setUserName(java.lang.String userName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERNAME$2, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USERNAME$2);
+            }
+            target.setStringValue(userName);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "userName" element
+     */
+    public void xsetUserName(org.apache.xmlbeans.XmlString userName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERNAME$2, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(USERNAME$2);
+            }
+            target.set(userName);
+        }
+    }
+    
+    /**
+     * Unsets the "userName" element
+     */
+    public void unsetUserName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(USERNAME$2, 0);
+        }
+    }
+    
+    /**
+     * Gets the "shellName" element
+     */
+    public java.lang.String getShellName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SHELLNAME$4, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "shellName" element
+     */
+    public org.apache.xmlbeans.XmlString xgetShellName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SHELLNAME$4, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "shellName" element
+     */
+    public boolean isSetShellName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(SHELLNAME$4) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "shellName" element
+     */
+    public void setShellName(java.lang.String shellName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SHELLNAME$4, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SHELLNAME$4);
+            }
+            target.setStringValue(shellName);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "shellName" element
+     */
+    public void xsetShellName(org.apache.xmlbeans.XmlString shellName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SHELLNAME$4, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SHELLNAME$4);
+            }
+            target.set(shellName);
+        }
+    }
+    
+    /**
+     * Unsets the "shellName" element
+     */
+    public void unsetShellName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(SHELLNAME$4, 0);
+        }
+    }
+    
+    /**
+     * Gets the "queueName" element
+     */
+    public java.lang.String getQueueName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QUEUENAME$6, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "queueName" element
+     */
+    public org.apache.xmlbeans.XmlString xgetQueueName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QUEUENAME$6, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "queueName" element
+     */
+    public boolean isSetQueueName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(QUEUENAME$6) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "queueName" element
+     */
+    public void setQueueName(java.lang.String queueName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QUEUENAME$6, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(QUEUENAME$6);
+            }
+            target.setStringValue(queueName);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "queueName" element
+     */
+    public void xsetQueueName(org.apache.xmlbeans.XmlString queueName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QUEUENAME$6, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(QUEUENAME$6);
+            }
+            target.set(queueName);
+        }
+    }
+    
+    /**
+     * Unsets the "queueName" element
+     */
+    public void unsetQueueName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(QUEUENAME$6, 0);
+        }
+    }
+    
+    /**
+     * Gets the "jobName" element
+     */
+    public java.lang.String getJobName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBNAME$8, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "jobName" element
+     */
+    public org.apache.xmlbeans.XmlString xgetJobName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(JOBNAME$8, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "jobName" element
+     */
+    public boolean isSetJobName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(JOBNAME$8) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "jobName" element
+     */
+    public void setJobName(java.lang.String jobName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBNAME$8, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(JOBNAME$8);
+            }
+            target.setStringValue(jobName);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "jobName" element
+     */
+    public void xsetJobName(org.apache.xmlbeans.XmlString jobName)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(JOBNAME$8, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(JOBNAME$8);
+            }
+            target.set(jobName);
+        }
+    }
+    
+    /**
+     * Unsets the "jobName" element
+     */
+    public void unsetJobName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(JOBNAME$8, 0);
+        }
+    }
+    
+    /**
+     * Gets the "allEnvExport" element
+     */
+    public boolean getAllEnvExport()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ALLENVEXPORT$10, 0);
+            if (target == null)
+            {
+                return false;
+            }
+            return target.getBooleanValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "allEnvExport" element
+     */
+    public org.apache.xmlbeans.XmlBoolean xgetAllEnvExport()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlBoolean target = null;
+            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ALLENVEXPORT$10, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "allEnvExport" element
+     */
+    public boolean isSetAllEnvExport()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(ALLENVEXPORT$10) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "allEnvExport" element
+     */
+    public void setAllEnvExport(boolean allEnvExport)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ALLENVEXPORT$10, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ALLENVEXPORT$10);
+            }
+            target.setBooleanValue(allEnvExport);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "allEnvExport" element
+     */
+    public void xsetAllEnvExport(org.apache.xmlbeans.XmlBoolean allEnvExport)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlBoolean target = null;
+            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ALLENVEXPORT$10, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(ALLENVEXPORT$10);
+            }
+            target.set(allEnvExport);
+        }
+    }
+    
+    /**
+     * Unsets the "allEnvExport" element
+     */
+    public void unsetAllEnvExport()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(ALLENVEXPORT$10, 0);
+        }
+    }
+    
+    /**
+     * Gets the "mailOptions" element
+     */
+    public java.lang.String getMailOptions()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILOPTIONS$12, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "mailOptions" element
+     */
+    public org.apache.xmlbeans.XmlString xgetMailOptions()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILOPTIONS$12, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "mailOptions" element
+     */
+    public boolean isSetMailOptions()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(MAILOPTIONS$12) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "mailOptions" element
+     */
+    public void setMailOptions(java.lang.String mailOptions)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILOPTIONS$12, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAILOPTIONS$12);
+            }
+            target.setStringValue(mailOptions);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "mailOptions" element
+     */
+    public void xsetMailOptions(org.apache.xmlbeans.XmlString mailOptions)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILOPTIONS$12, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAILOPTIONS$12);
+            }
+            target.set(mailOptions);
+        }
+    }
+    
+    /**
+     * Unsets the "mailOptions" element
+     */
+    public void unsetMailOptions()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(MAILOPTIONS$12, 0);
+        }
+    }
+    
+    /**
+     * Gets the "mailAddress" element
+     */
+    public java.lang.String getMailAddress()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILADDRESS$14, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "mailAddress" element
+     */
+    public org.apache.xmlbeans.XmlString xgetMailAddress()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILADDRESS$14, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "mailAddress" element
+     */
+    public boolean isSetMailAddress()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(MAILADDRESS$14) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "mailAddress" element
+     */
+    public void setMailAddress(java.lang.String mailAddress)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILADDRESS$14, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAILADDRESS$14);
+            }
+            target.setStringValue(mailAddress);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "mailAddress" element
+     */
+    public void xsetMailAddress(org.apache.xmlbeans.XmlString mailAddress)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILADDRESS$14, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAILADDRESS$14);
+            }
+            target.set(mailAddress);
+        }
+    }
+    
+    /**
+     * Unsets the "mailAddress" element
+     */
+    public void unsetMailAddress()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(MAILADDRESS$14, 0);
+        }
+    }
+    
+    /**
+     * Gets the "partition" element
+     */
+    public java.lang.String getPartition()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PARTITION$16, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "partition" element
+     */
+    public org.apache.xmlbeans.XmlString xgetPartition()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PARTITION$16, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "partition" element
+     */
+    public boolean isSetPartition()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(PARTITION$16) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "partition" element
+     */
+    public void setPartition(java.lang.String partition)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PARTITION$16, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PARTITION$16);
+            }
+            target.setStringValue(partition);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "partition" element
+     */
+    public void xsetPartition(org.apache.xmlbeans.XmlString partition)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PARTITION$16, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PARTITION$16);
+            }
+            target.set(partition);
+        }
+    }
+    
+    /**
+     * Unsets the "partition" element
+     */
+    public void unsetPartition()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(PARTITION$16, 0);
+        }
+    }
+    
+    /**
+     * Gets the "mailType" element
+     */
+    public java.lang.String getMailType()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILTYPE$18, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "mailType" element
+     */
+    public org.apache.xmlbeans.XmlString xgetMailType()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILTYPE$18, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "mailType" element
+     */
+    public boolean isSetMailType()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(MAILTYPE$18) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "mailType" element
+     */
+    public void setMailType(java.lang.String mailType)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAILTYPE$18, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAILTYPE$18);
+            }
+            target.setStringValue(mailType);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "mailType" element
+     */
+    public void xsetMailType(org.apache.xmlbeans.XmlString mailType)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAILTYPE$18, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAILTYPE$18);
+            }
+            target.set(mailType);
+        }
+    }
+    
+    /**
+     * Unsets the "mailType" element
+     */
+    public void unsetMailType()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(MAILTYPE$18, 0);
+        }
+    }
+    
+    /**
+     * Gets the "acountString" element
+     */
+    public java.lang.String getAcountString()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACOUNTSTRING$20, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "acountString" element
+     */
+    public org.apache.xmlbeans.XmlString xgetAcountString()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ACOUNTSTRING$20, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "acountString" element
+     */
+    public boolean isSetAcountString()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(ACOUNTSTRING$20) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "acountString" element
+     */
+    public void setAcountString(java.lang.String acountString)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACOUNTSTRING$20, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACOUNTSTRING$20);
+            }
+            target.setStringValue(acountString);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "acountString" element
+     */
+    public void xsetAcountString(org.apache.xmlbeans.XmlString acountString)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ACOUNTSTRING$20, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ACOUNTSTRING$20);
+            }
+            target.set(acountString);
+        }
+    }
+    
+    /**
+     * Unsets the "acountString" element
+     */
+    public void unsetAcountString()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(ACOUNTSTRING$20, 0);
+        }
+    }
+    
+    /**
+     * Gets the "maxWallTime" element
+     */
+    public java.lang.String getMaxWallTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXWALLTIME$22, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "maxWallTime" element
+     */
+    public org.apache.xmlbeans.XmlString xgetMaxWallTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXWALLTIME$22, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "maxWallTime" element
+     */
+    public boolean isSetMaxWallTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(MAXWALLTIME$22) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "maxWallTime" element
+     */
+    public void setMaxWallTime(java.lang.String maxWallTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXWALLTIME$22, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAXWALLTIME$22);
+            }
+            target.setStringValue(maxWallTime);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "maxWallTime" element
+     */
+    public void xsetMaxWallTime(org.apache.xmlbeans.XmlString maxWallTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXWALLTIME$22, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAXWALLTIME$22);
+            }
+            target.set(maxWallTime);
+        }
+    }
+    
+    /**
+     * Unsets the "maxWallTime" element
+     */
+    public void unsetMaxWallTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(MAXWALLTIME$22, 0);
+        }
+    }
+    
+    /**
+     * Gets the "standardOutFile" element
+     */
+    public java.lang.String getStandardOutFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STANDARDOUTFILE$24, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "standardOutFile" element
+     */
+    public org.apache.xmlbeans.XmlString xgetStandardOutFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STANDARDOUTFILE$24, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "standardOutFile" element
+     */
+    public boolean isSetStandardOutFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(STANDARDOUTFILE$24) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "standardOutFile" element
+     */
+    public void setStandardOutFile(java.lang.String standardOutFile)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STANDARDOUTFILE$24, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STANDARDOUTFILE$24);
+            }
+            target.setStringValue(standardOutFile);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "standardOutFile" element
+     */
+    public void xsetStandardOutFile(org.apache.xmlbeans.XmlString standardOutFile)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STANDARDOUTFILE$24, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STANDARDOUTFILE$24);
+            }
+            target.set(standardOutFile);
+        }
+    }
+    
+    /**
+     * Unsets the "standardOutFile" element
+     */
+    public void unsetStandardOutFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(STANDARDOUTFILE$24, 0);
+        }
+    }
+    
+    /**
+     * Gets the "standardErrorFile" element
+     */
+    public java.lang.String getStandardErrorFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STANDARDERRORFILE$26, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "standardErrorFile" element
+     */
+    public org.apache.xmlbeans.XmlString xgetStandardErrorFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STANDARDERRORFILE$26, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "standardErrorFile" element
+     */
+    public boolean isSetStandardErrorFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(STANDARDERRORFILE$26) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "standardErrorFile" element
+     */
+    public void setStandardErrorFile(java.lang.String standardErrorFile)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STANDARDERRORFILE$26, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STANDARDERRORFILE$26);
+            }
+            target.setStringValue(standardErrorFile);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "standardErrorFile" element
+     */
+    public void xsetStandardErrorFile(org.apache.xmlbeans.XmlString standardErrorFile)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STANDARDERRORFILE$26, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STANDARDERRORFILE$26);
+            }
+            target.set(standardErrorFile);
+        }
+    }
+    
+    /**
+     * Unsets the "standardErrorFile" element
+     */
+    public void unsetStandardErrorFile()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(STANDARDERRORFILE$26, 0);
+        }
+    }
+    
+    /**
+     * Gets the "outputDirectory" element
+     */
+    public java.lang.String getOutputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OUTPUTDIRECTORY$28, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "outputDirectory" element
+     */
+    public org.apache.xmlbeans.XmlString xgetOutputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(OUTPUTDIRECTORY$28, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "outputDirectory" element
+     */
+    public boolean isSetOutputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(OUTPUTDIRECTORY$28) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "outputDirectory" element
+     */
+    public void setOutputDirectory(java.lang.String outputDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OUTPUTDIRECTORY$28, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(OUTPUTDIRECTORY$28);
+            }
+            target.setStringValue(outputDirectory);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "outputDirectory" element
+     */
+    public void xsetOutputDirectory(org.apache.xmlbeans.XmlString outputDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(OUTPUTDIRECTORY$28, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(OUTPUTDIRECTORY$28);
+            }
+            target.set(outputDirectory);
+        }
+    }
+    
+    /**
+     * Unsets the "outputDirectory" element
+     */
+    public void unsetOutputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(OUTPUTDIRECTORY$28, 0);
+        }
+    }
+    
+    /**
+     * Gets the "inputDirectory" element
+     */
+    public java.lang.String getInputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INPUTDIRECTORY$30, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "inputDirectory" element
+     */
+    public org.apache.xmlbeans.XmlString xgetInputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(INPUTDIRECTORY$30, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "inputDirectory" element
+     */
+    public boolean isSetInputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(INPUTDIRECTORY$30) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "inputDirectory" element
+     */
+    public void setInputDirectory(java.lang.String inputDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INPUTDIRECTORY$30, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INPUTDIRECTORY$30);
+            }
+            target.setStringValue(inputDirectory);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "inputDirectory" element
+     */
+    public void xsetInputDirectory(org.apache.xmlbeans.XmlString inputDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(INPUTDIRECTORY$30, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(INPUTDIRECTORY$30);
+            }
+            target.set(inputDirectory);
+        }
+    }
+    
+    /**
+     * Unsets the "inputDirectory" element
+     */
+    public void unsetInputDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(INPUTDIRECTORY$30, 0);
+        }
+    }
+    
+    /**
+     * Gets the "nodes" element
+     */
+    public int getNodes()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NODES$32, 0);
+            if (target == null)
+            {
+                return 0;
+            }
+            return target.getIntValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "nodes" element
+     */
+    public org.apache.xmlbeans.XmlInt xgetNodes()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(NODES$32, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "nodes" element
+     */
+    public boolean isSetNodes()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(NODES$32) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "nodes" element
+     */
+    public void setNodes(int nodes)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NODES$32, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NODES$32);
+            }
+            target.setIntValue(nodes);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "nodes" element
+     */
+    public void xsetNodes(org.apache.xmlbeans.XmlInt nodes)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(NODES$32, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(NODES$32);
+            }
+            target.set(nodes);
+        }
+    }
+    
+    /**
+     * Unsets the "nodes" element
+     */
+    public void unsetNodes()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(NODES$32, 0);
+        }
+    }
+    
+    /**
+     * Gets the "processesPerNode" element
+     */
+    public int getProcessesPerNode()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROCESSESPERNODE$34, 0);
+            if (target == null)
+            {
+                return 0;
+            }
+            return target.getIntValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "processesPerNode" element
+     */
+    public org.apache.xmlbeans.XmlInt xgetProcessesPerNode()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PROCESSESPERNODE$34, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "processesPerNode" element
+     */
+    public boolean isSetProcessesPerNode()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(PROCESSESPERNODE$34) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "processesPerNode" element
+     */
+    public void setProcessesPerNode(int processesPerNode)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROCESSESPERNODE$34, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PROCESSESPERNODE$34);
+            }
+            target.setIntValue(processesPerNode);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "processesPerNode" element
+     */
+    public void xsetProcessesPerNode(org.apache.xmlbeans.XmlInt processesPerNode)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PROCESSESPERNODE$34, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(PROCESSESPERNODE$34);
+            }
+            target.set(processesPerNode);
+        }
+    }
+    
+    /**
+     * Unsets the "processesPerNode" element
+     */
+    public void unsetProcessesPerNode()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(PROCESSESPERNODE$34, 0);
+        }
+    }
+    
+    /**
+     * Gets the "cpuCount" element
+     */
+    public int getCpuCount()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CPUCOUNT$36, 0);
+            if (target == null)
+            {
+                return 0;
+            }
+            return target.getIntValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "cpuCount" element
+     */
+    public org.apache.xmlbeans.XmlInt xgetCpuCount()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(CPUCOUNT$36, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "cpuCount" element
+     */
+    public boolean isSetCpuCount()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(CPUCOUNT$36) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "cpuCount" element
+     */
+    public void setCpuCount(int cpuCount)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CPUCOUNT$36, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CPUCOUNT$36);
+            }
+            target.setIntValue(cpuCount);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "cpuCount" element
+     */
+    public void xsetCpuCount(org.apache.xmlbeans.XmlInt cpuCount)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlInt target = null;
+            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(CPUCOUNT$36, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(CPUCOUNT$36);
+            }
+            target.set(cpuCount);
+        }
+    }
+    
+    /**
+     * Unsets the "cpuCount" element
+     */
+    public void unsetCpuCount()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(CPUCOUNT$36, 0);
+        }
+    }
+    
+    /**
+     * Gets the "nodeList" element
+     */
+    public java.lang.String getNodeList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NODELIST$38, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "nodeList" element
+     */
+    public org.apache.xmlbeans.XmlString xgetNodeList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NODELIST$38, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "nodeList" element
+     */
+    public boolean isSetNodeList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(NODELIST$38) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "nodeList" element
+     */
+    public void setNodeList(java.lang.String nodeList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NODELIST$38, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NODELIST$38);
+            }
+            target.setStringValue(nodeList);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "nodeList" element
+     */
+    public void xsetNodeList(org.apache.xmlbeans.XmlString nodeList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NODELIST$38, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(NODELIST$38);
+            }
+            target.set(nodeList);
+        }
+    }
+    
+    /**
+     * Unsets the "nodeList" element
+     */
+    public void unsetNodeList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(NODELIST$38, 0);
+        }
+    }
+    
+    /**
+     * Gets the "workingDirectory" element
+     */
+    public java.lang.String getWorkingDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(WORKINGDIRECTORY$40, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "workingDirectory" element
+     */
+    public org.apache.xmlbeans.XmlString xgetWorkingDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(WORKINGDIRECTORY$40, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "workingDirectory" element
+     */
+    public boolean isSetWorkingDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(WORKINGDIRECTORY$40) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "workingDirectory" element
+     */
+    public void setWorkingDirectory(java.lang.String workingDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(WORKINGDIRECTORY$40, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(WORKINGDIRECTORY$40);
+            }
+            target.setStringValue(workingDirectory);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "workingDirectory" element
+     */
+    public void xsetWorkingDirectory(org.apache.xmlbeans.XmlString workingDirectory)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(WORKINGDIRECTORY$40, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(WORKINGDIRECTORY$40);
+            }
+            target.set(workingDirectory);
+        }
+    }
+    
+    /**
+     * Unsets the "workingDirectory" element
+     */
+    public void unsetWorkingDirectory()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(WORKINGDIRECTORY$40, 0);
+        }
+    }
+    
+    /**
+     * Gets the "executablePath" element
+     */
+    public java.lang.String getExecutablePath()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXECUTABLEPATH$42, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "executablePath" element
+     */
+    public org.apache.xmlbeans.XmlString xgetExecutablePath()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EXECUTABLEPATH$42, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "executablePath" element
+     */
+    public boolean isSetExecutablePath()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(EXECUTABLEPATH$42) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "executablePath" element
+     */
+    public void setExecutablePath(java.lang.String executablePath)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXECUTABLEPATH$42, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EXECUTABLEPATH$42);
+            }
+            target.setStringValue(executablePath);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "executablePath" element
+     */
+    public void xsetExecutablePath(org.apache.xmlbeans.XmlString executablePath)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EXECUTABLEPATH$42, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(EXECUTABLEPATH$42);
+            }
+            target.set(executablePath);
+        }
+    }
+    
+    /**
+     * Unsets the "executablePath" element
+     */
+    public void unsetExecutablePath()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(EXECUTABLEPATH$42, 0);
+        }
+    }
+    
+    /**
+     * Gets the "inputs" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.InputList getInputs()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.InputList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.InputList)get_store().find_element_user(INPUTS$44, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * Sets the "inputs" element
+     */
+    public void setInputs(org.apache.airavata.gfac.core.x2012.x12.InputList inputs)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.InputList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.InputList)get_store().find_element_user(INPUTS$44, 0);
+            if (target == null)
+            {
+                target = (org.apache.airavata.gfac.core.x2012.x12.InputList)get_store().add_element_user(INPUTS$44);
+            }
+            target.set(inputs);
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty "inputs" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.InputList addNewInputs()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.InputList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.InputList)get_store().add_element_user(INPUTS$44);
+            return target;
+        }
+    }
+    
+    /**
+     * Gets the "exports" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties getExports()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties)get_store().find_element_user(EXPORTS$46, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * Sets the "exports" element
+     */
+    public void setExports(org.apache.airavata.gfac.core.x2012.x12.ExportProperties exports)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties)get_store().find_element_user(EXPORTS$46, 0);
+            if (target == null)
+            {
+                target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties)get_store().add_element_user(EXPORTS$46);
+            }
+            target.set(exports);
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty "exports" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties addNewExports()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties)get_store().add_element_user(EXPORTS$46);
+            return target;
+        }
+    }
+    
+    /**
+     * Gets the "status" element
+     */
+    public java.lang.String getStatus()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATUS$48, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "status" element
+     */
+    public org.apache.xmlbeans.XmlString xgetStatus()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STATUS$48, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "status" element
+     */
+    public boolean isSetStatus()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(STATUS$48) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "status" element
+     */
+    public void setStatus(java.lang.String status)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATUS$48, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATUS$48);
+            }
+            target.setStringValue(status);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "status" element
+     */
+    public void xsetStatus(org.apache.xmlbeans.XmlString status)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STATUS$48, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STATUS$48);
+            }
+            target.set(status);
+        }
+    }
+    
+    /**
+     * Unsets the "status" element
+     */
+    public void unsetStatus()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(STATUS$48, 0);
+        }
+    }
+    
+    /**
+     * Gets the "afterAny" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.AfterAnyList getAfterAny()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterAnyList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList)get_store().find_element_user(AFTERANY$50, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "afterAny" element
+     */
+    public boolean isSetAfterAny()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(AFTERANY$50) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "afterAny" element
+     */
+    public void setAfterAny(org.apache.airavata.gfac.core.x2012.x12.AfterAnyList afterAny)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterAnyList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList)get_store().find_element_user(AFTERANY$50, 0);
+            if (target == null)
+            {
+                target = (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList)get_store().add_element_user(AFTERANY$50);
+            }
+            target.set(afterAny);
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty "afterAny" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.AfterAnyList addNewAfterAny()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterAnyList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList)get_store().add_element_user(AFTERANY$50);
+            return target;
+        }
+    }
+    
+    /**
+     * Unsets the "afterAny" element
+     */
+    public void unsetAfterAny()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(AFTERANY$50, 0);
+        }
+    }
+    
+    /**
+     * Gets the "afterOKList" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.AfterOKList getAfterOKList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterOKList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterOKList)get_store().find_element_user(AFTEROKLIST$52, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "afterOKList" element
+     */
+    public boolean isSetAfterOKList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(AFTEROKLIST$52) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "afterOKList" element
+     */
+    public void setAfterOKList(org.apache.airavata.gfac.core.x2012.x12.AfterOKList afterOKList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterOKList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterOKList)get_store().find_element_user(AFTEROKLIST$52, 0);
+            if (target == null)
+            {
+                target = (org.apache.airavata.gfac.core.x2012.x12.AfterOKList)get_store().add_element_user(AFTEROKLIST$52);
+            }
+            target.set(afterOKList);
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty "afterOKList" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.AfterOKList addNewAfterOKList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.AfterOKList target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.AfterOKList)get_store().add_element_user(AFTEROKLIST$52);
+            return target;
+        }
+    }
+    
+    /**
+     * Unsets the "afterOKList" element
+     */
+    public void unsetAfterOKList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(AFTEROKLIST$52, 0);
+        }
+    }
+    
+    /**
+     * Gets the "cTime" element
+     */
+    public java.lang.String getCTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CTIME$54, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "cTime" element
+     */
+    public org.apache.xmlbeans.XmlString xgetCTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CTIME$54, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "cTime" element
+     */
+    public boolean isSetCTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(CTIME$54) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "cTime" element
+     */
+    public void setCTime(java.lang.String cTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CTIME$54, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CTIME$54);
+            }
+            target.setStringValue(cTime);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "cTime" element
+     */
+    public void xsetCTime(org.apache.xmlbeans.XmlString cTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CTIME$54, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CTIME$54);
+            }
+            target.set(cTime);
+        }
+    }
+    
+    /**
+     * Unsets the "cTime" element
+     */
+    public void unsetCTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(CTIME$54, 0);
+        }
+    }
+    
+    /**
+     * Gets the "qTime" element
+     */
+    public java.lang.String getQTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QTIME$56, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "qTime" element
+     */
+    public org.apache.xmlbeans.XmlString xgetQTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QTIME$56, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "qTime" element
+     */
+    public boolean isSetQTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(QTIME$56) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "qTime" element
+     */
+    public void setQTime(java.lang.String qTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QTIME$56, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(QTIME$56);
+            }
+            target.setStringValue(qTime);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "qTime" element
+     */
+    public void xsetQTime(org.apache.xmlbeans.XmlString qTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QTIME$56, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(QTIME$56);
+            }
+            target.set(qTime);
+        }
+    }
+    
+    /**
+     * Unsets the "qTime" element
+     */
+    public void unsetQTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(QTIME$56, 0);
+        }
+    }
+    
+    /**
+     * Gets the "mTime" element
+     */
+    public java.lang.String getMTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MTIME$58, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "mTime" element
+     */
+    public org.apache.xmlbeans.XmlString xgetMTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MTIME$58, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "mTime" element
+     */
+    public boolean isSetMTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(MTIME$58) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "mTime" element
+     */
+    public void setMTime(java.lang.String mTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MTIME$58, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MTIME$58);
+            }
+            target.setStringValue(mTime);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "mTime" element
+     */
+    public void xsetMTime(org.apache.xmlbeans.XmlString mTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MTIME$58, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MTIME$58);
+            }
+            target.set(mTime);
+        }
+    }
+    
+    /**
+     * Unsets the "mTime" element
+     */
+    public void unsetMTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(MTIME$58, 0);
+        }
+    }
+    
+    /**
+     * Gets the "sTime" element
+     */
+    public java.lang.String getSTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STIME$60, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) the "sTime" element
+     */
+    public org.apache.xmlbeans.XmlString xgetSTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STIME$60, 0);
+            return target;
+        }
+    }
+    
+    /**
+     * True if has "sTime" element
+     */
+    public boolean isSetSTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(STIME$60) != 0;
+        }
+    }
+    
+    /**
+     * Sets the "sTime" element
+     */
+    public void setSTime(java.lang.String sTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STIME$60, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STIME$60);
+            }
+            target.setStringValue(sTime);
+        }
+    }
+    
+    /**
+     * Sets (as xml) the "sTime" element
+     */
+    public void xsetSTime(org.apache.xmlbeans.XmlString sTime)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STIME$60, 0);
+            if (target == null)
+            {
+                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STIME$60);
+            }
+            target.set(sTime);
+        }
+    }
+    
+    /**
+     * Unsets the "sTime" element
+     */
+    public void unsetSTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(STIME$60, 0);
+        }
+    }
+    
+    /**
+     * Gets the "compTime" element
+     */
+    public java.lang.String getCompTime()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMPTIME$62, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target.getStringValue(

<TRUNCATED>

[81/81] [abbrv] airavata git commit: Merge moduleRefactor branch

Posted by sh...@apache.org.
Merge moduleRefactor branch


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

Branch: refs/heads/master
Commit: b4ede9cbec6089b32d0dc856cc57aea27616197b
Parents: 4d9ed53 08e3a87
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Thu Jun 4 16:14:48 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Thu Jun 4 16:14:48 2015 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |    2 +-
 airavata-api/generate-thrift-files.sh           |  305 --
 .../airavataAPI.thrift                          | 2064 --------
 .../airavataDataModel.thrift                    |   38 -
 .../airavataErrors.thrift                       |  172 -
 .../appCatalogModels.thrift                     |   24 -
 .../applicationDeploymentModel.thrift           |  132 -
 .../applicationInterfaceModel.thrift            |  146 -
 .../computeResourceModel.thrift                 |  445 --
 .../experimentModel.thrift                      |  411 --
 .../gatewayResourceProfileModel.thrift          |   83 -
 .../messagingEvents.thrift                      |  149 -
 .../securityModel.thrift                        |   35 -
 .../workflowAPI.thrift                          |   82 -
 .../workflowDataModel.thrift                    |   43 -
 .../workspaceModel.thrift                       |   63 -
 .../airavata-api/airavataAPI.thrift             | 2064 ++++++++
 .../airavata-api/airavataDataModel.thrift       |   38 +
 .../airavata-api/airavataErrors.thrift          |  172 +
 .../airavata-api/appCatalogModels.thrift        |   24 +
 .../applicationDeploymentModel.thrift           |  132 +
 .../applicationInterfaceModel.thrift            |  146 +
 .../airavata-api/computeResourceModel.thrift    |  445 ++
 .../airavata-api/experimentModel.thrift         |  411 ++
 .../gatewayResourceProfileModel.thrift          |   83 +
 .../airavata-api/generate-thrift-files.sh       |  305 ++
 .../airavata-api/messagingEvents.thrift         |  149 +
 .../airavata-api/securityModel.thrift           |   35 +
 .../airavata-api/workflowAPI.thrift             |   82 +
 .../airavata-api/workflowDataModel.thrift       |   43 +
 .../airavata-api/workspaceModel.thrift          |   63 +
 .../gfac/generate-gfac-stubs.sh                 |  134 +
 .../gfac/gfac.cpi.service.thrift                |   68 +
 .../gfac/gfacDataModel.thrift                   |   64 +
 .../orchestrator/generate-orchestrator-stubs.sh |  132 +
 .../orchestrator.cpi.service.thrift             |   78 +
 distribution/pom.xml                            |  581 +++
 distribution/src/main/assembly/bin-assembly.xml |  189 +
 distribution/src/main/assembly/src-assembly.xml |   75 +
 distribution/src/main/resources/INSTALL         |   30 +
 distribution/src/main/resources/LICENSE         | 2387 +++++++++
 distribution/src/main/resources/NOTICE          |  163 +
 distribution/src/main/resources/README          |  145 +
 .../src/main/resources/bin/airavata-server.bat  |   55 +
 .../src/main/resources/bin/airavata-server.sh   |  118 +
 .../src/main/resources/bin/api-server.sh        |  118 +
 distribution/src/main/resources/bin/derby.sh    |   23 +
 .../src/main/resources/bin/gfac-server.sh       |  118 +
 distribution/src/main/resources/bin/logo.txt    |   34 +
 .../main/resources/bin/orchestrator-server.sh   |  118 +
 distribution/src/main/resources/bin/setenv.bat  |   43 +
 distribution/src/main/resources/bin/setenv.sh   |   77 +
 .../src/main/resources/bin/startNetworkServer   |  189 +
 .../src/main/resources/bin/workflow-server.sh   |  118 +
 .../main/resources/samples/registerSample.sh    |   25 +
 .../src/main/resources/samples/scripts/add.sh   |   21 +
 .../src/main/resources/samples/scripts/echo.sh  |   22 +
 .../main/resources/samples/scripts/multiply.sh  |   22 +
 .../main/resources/samples/scripts/subtract.sh  |   22 +
 modules/distribution/api-server/pom.xml         |  152 -
 .../src/main/assembly/bin-assembly.xml          |  123 -
 .../src/main/assembly/src-assembly.xml          |   74 -
 .../api-server/src/main/resources/INSTALL       |   55 -
 .../api-server/src/main/resources/LICENSE       | 2387 ---------
 .../api-server/src/main/resources/NOTICE        |  163 -
 .../api-server/src/main/resources/README        |  121 -
 .../src/main/resources/bin/api-server.sh        |  118 -
 .../api-server/src/main/resources/bin/logo.txt  |   34 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../api-server/src/main/resources/bin/setenv.sh |   77 -
 modules/distribution/client/java/pom.xml        |  162 -
 .../java/src/main/assembly/bin-assembly.xml     |  166 -
 .../java/src/main/assembly/src-assembly.xml     |   75 -
 .../client/java/src/main/resources/LICENSE      | 2272 ---------
 .../client/java/src/main/resources/NOTICE       |  163 -
 .../client/java/src/main/resources/README       |   53 -
 modules/distribution/client/pom.xml             |   39 -
 modules/distribution/gfac-server/pom.xml        |  192 -
 .../src/main/assembly/bin-assembly.xml          |  176 -
 .../src/main/assembly/src-assembly.xml          |   75 -
 .../gfac-server/src/main/resources/INSTALL      |   55 -
 .../gfac-server/src/main/resources/LICENSE      | 2387 ---------
 .../gfac-server/src/main/resources/NOTICE       |  163 -
 .../gfac-server/src/main/resources/README       |  121 -
 .../src/main/resources/bin/gfac-server.sh       |  118 -
 .../gfac-server/src/main/resources/bin/logo.txt |   34 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../src/main/resources/bin/setenv.sh            |   77 -
 modules/distribution/new-dist/pom.xml           |   99 -
 .../main/assembly/airavata-common-component.xml |  100 -
 .../src/main/assembly/api-server-assembly.xml   |   39 -
 .../src/main/assembly/api-server-component.xml  |   35 -
 .../new-dist/src/main/assembly/src-assembly.xml |   75 -
 .../new-dist/src/main/resources/INSTALL         |   30 -
 .../new-dist/src/main/resources/LICENSE         | 2387 ---------
 .../new-dist/src/main/resources/NOTICE          |  163 -
 .../new-dist/src/main/resources/README          |  145 -
 .../src/main/resources/bin/airavata-server.bat  |   55 -
 .../src/main/resources/bin/airavata-server.sh   |  118 -
 .../new-dist/src/main/resources/bin/derby.sh    |   23 -
 .../new-dist/src/main/resources/bin/logo.txt    |   34 -
 .../new-dist/src/main/resources/bin/setenv.bat  |   43 -
 .../new-dist/src/main/resources/bin/setenv.sh   |   77 -
 .../src/main/resources/bin/startNetworkServer   |  189 -
 .../main/resources/samples/registerSample.sh    |   25 -
 .../src/main/resources/samples/scripts/add.sh   |   21 -
 .../src/main/resources/samples/scripts/echo.sh  |   22 -
 .../main/resources/samples/scripts/multiply.sh  |   22 -
 .../main/resources/samples/scripts/subtract.sh  |   22 -
 .../distribution/orchestrator-server/pom.xml    |  155 -
 .../src/main/assembly/bin-assembly.xml          |  146 -
 .../src/main/assembly/src-assembly.xml          |   75 -
 .../src/main/resources/INSTALL                  |   55 -
 .../src/main/resources/LICENSE                  | 2387 ---------
 .../src/main/resources/NOTICE                   |  163 -
 .../src/main/resources/README                   |  121 -
 .../src/main/resources/bin/logo.txt             |   34 -
 .../main/resources/bin/orchestrator-server.sh   |  118 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../src/main/resources/bin/setenv.sh            |   77 -
 modules/distribution/pom.xml                    |   46 -
 modules/distribution/release/pom.xml            |  117 -
 .../server/src/main/assembly/bin-assembly.xml   |  189 -
 .../server/src/main/assembly/src-assembly.xml   |   75 -
 .../server/src/main/resources/INSTALL           |   30 -
 .../server/src/main/resources/LICENSE           | 2387 ---------
 .../server/src/main/resources/NOTICE            |  163 -
 .../server/src/main/resources/README            |  145 -
 .../src/main/resources/bin/airavata-server.bat  |   55 -
 .../src/main/resources/bin/airavata-server.sh   |  118 -
 .../server/src/main/resources/bin/api-server.sh |  118 -
 .../server/src/main/resources/bin/derby.sh      |   23 -
 .../src/main/resources/bin/gfac-server.sh       |  118 -
 .../server/src/main/resources/bin/logo.txt      |   34 -
 .../main/resources/bin/orchestrator-server.sh   |  118 -
 .../server/src/main/resources/bin/setenv.bat    |   43 -
 .../server/src/main/resources/bin/setenv.sh     |   77 -
 .../src/main/resources/bin/startNetworkServer   |  189 -
 .../src/main/resources/bin/workflow-server.sh   |  118 -
 .../main/resources/samples/registerSample.sh    |   25 -
 .../src/main/resources/samples/scripts/add.sh   |   21 -
 .../src/main/resources/samples/scripts/echo.sh  |   22 -
 .../main/resources/samples/scripts/multiply.sh  |   22 -
 .../main/resources/samples/scripts/subtract.sh  |   22 -
 modules/distribution/xbaya-gui/pom.xml          |  239 -
 .../src/main/assembly/bin-assembly.xml          |  101 -
 .../airavata/distribution/xbaya/jnlp/Main.java  |  156 -
 .../xbaya-gui/src/main/resources/INSTALL        |   44 -
 .../xbaya-gui/src/main/resources/LICENSE        | 2273 ---------
 .../xbaya-gui/src/main/resources/NOTICE         |  163 -
 .../xbaya-gui/src/main/resources/README         |  101 -
 .../src/main/resources/airavata-logo.gif        |  Bin 13895 -> 0 bytes
 .../xbaya-gui/src/main/resources/bin/setenv.bat |   42 -
 .../xbaya-gui/src/main/resources/bin/setenv.sh  |   77 -
 .../src/main/resources/bin/xbaya-gui.bat        |   23 -
 .../src/main/resources/bin/xbaya-gui.sh         |   22 -
 .../src/main/resources/conf/log4j.properties    |   40 -
 .../xbaya-gui/src/main/resources/jnlp/INSTALL   |   48 -
 .../xbaya-gui/src/main/resources/jnlp/LICENSE   | 2272 ---------
 .../xbaya-gui/src/main/resources/jnlp/NOTICE    |  163 -
 .../xbaya-gui/src/main/resources/jnlp/README    |   91 -
 .../src/main/resources/jnlp/xbaya.jnlp          |   42 -
 .../xbaya-gui/src/main/resources/xbaya.jks      |  Bin 2234 -> 0 bytes
 modules/gfac/airavata-gfac-service/pom.xml      |   95 -
 .../apache/airavata/gfac/cpi/GfacService.java   | 3170 ------------
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 -
 .../apache/airavata/gfac/server/GfacServer.java |  143 -
 .../airavata/gfac/server/GfacServerHandler.java |  421 --
 .../src/main/resources/gsissh.properties        |   26 -
 .../gfac/client/GfacClientFactoryTest.java      |   92 -
 .../airavata/gfac/client/util/Initialize.java   |  329 --
 .../src/test/resources/gsissh.properties        |   26 -
 .../src/test/resources/monitor.properties       |   30 -
 .../src/test/resources/orchestrator.properties  |   26 -
 .../src/test/resources/registry-derby.sql       |  361 --
 .../src/test/resources/zoo.cfg                  |   22 -
 modules/gfac/airavata-gfac-stubs/pom.xml        |   60 -
 .../airavata/gfac/client/GFACInstance.java      |   62 -
 .../airavata/gfac/client/GFacClientFactory.java |   42 -
 .../apache/airavata/gfac/cpi/GfacService.java   | 2867 -----------
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 -
 .../gfac-application-specific-handlers/pom.xml  |    2 +-
 modules/gfac/gfac-bes/pom.xml                   |    2 +-
 .../gfac/bes/handlers/AbstractSMSHandler.java   |    2 +-
 .../gfac/bes/provider/impl/BESProvider.java     |    7 +-
 .../airavata/gfac/bes/utils/SecurityUtils.java  |    2 +-
 modules/gfac/gfac-client/pom.xml                |   60 +
 .../airavata/gfac/client/GFACInstance.java      |   62 +
 .../airavata/gfac/client/GFacClientFactory.java |   42 +
 .../apache/airavata/gfac/cpi/GfacService.java   | 3239 ++++++++++++
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   56 +
 modules/gfac/gfac-core/pom.xml                  |   30 +-
 .../org/apache/airavata/gfac/Scheduler.java     |    2 +-
 .../org/apache/airavata/gfac/core/GFac.java     |   77 +
 .../gfac/core/GFacThreadPoolExecutor.java       |   57 +
 .../apache/airavata/gfac/core/GFacUtils.java    |  747 +++
 .../airavata/gfac/core/JobDescriptor.java       |  475 ++
 .../gfac/core/JobManagerConfiguration.java      |   52 +
 .../airavata/gfac/core/SSHApiException.java     |   36 +
 .../core/authentication/AuthenticationInfo.java |   32 +
 .../authentication/GSIAuthenticationInfo.java   |   43 +
 .../authentication/SSHKeyAuthentication.java    |   46 +
 .../SSHPasswordAuthentication.java              |   43 +
 .../SSHPublicKeyAuthentication.java             |   54 +
 .../SSHPublicKeyFileAuthentication.java         |   52 +
 .../airavata/gfac/core/cluster/Cluster.java     |  161 +
 .../airavata/gfac/core/cluster/CommandInfo.java |   34 +
 .../gfac/core/cluster/CommandOutput.java        |   49 +
 .../airavata/gfac/core/cluster/JobStatus.java   |  110 +
 .../gfac/core/cluster/OutputParser.java         |   67 +
 .../gfac/core/cluster/RawCommandInfo.java       |   53 +
 .../airavata/gfac/core/cluster/ServerInfo.java  |   65 +
 .../gfac/core/context/JobExecutionContext.java  |   13 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 1158 -----
 .../org/apache/airavata/gfac/core/cpi/GFac.java |   77 -
 .../apache/airavata/gfac/core/cpi/GFacImpl.java |  798 ---
 .../gfac/core/handler/AbstractHandler.java      |    2 +-
 .../core/handler/AppDescriptorCheckHandler.java |    2 +-
 .../core/monitor/AiravataJobStatusUpdator.java  |  123 -
 .../core/monitor/AiravataTaskStatusUpdator.java |  162 -
 .../AiravataWorkflowNodeStatusUpdator.java      |  130 -
 .../airavata/gfac/core/monitor/EmailParser.java |   35 +
 .../gfac/core/monitor/ExperimentIdentity.java   |   36 -
 .../airavata/gfac/core/monitor/JobIdentity.java |   39 -
 .../gfac/core/monitor/JobStatusResult.java      |   55 +
 .../gfac/core/monitor/TaskIdentity.java         |   38 -
 .../gfac/core/monitor/WorkflowNodeIdentity.java |   37 -
 .../monitor/state/JobStatusChangeRequest.java   |   81 -
 .../monitor/state/JobStatusChangedEvent.java    |   81 -
 .../state/TaskOutputDataChangedEvent.java       |   64 -
 .../monitor/state/TaskStatusChangeRequest.java  |   62 -
 .../monitor/state/TaskStatusChangedEvent.java   |   62 -
 .../state/WorkflowNodeStatusChangedEvent.java   |   64 -
 .../gfac/core/notification/GFacNotifier.java    |   42 -
 .../core/notification/MonitorPublisher.java     |   47 -
 .../notification/events/ExecutionFailEvent.java |   35 -
 .../events/FinishExecutionEvent.java            |   29 -
 .../events/FinishScheduleEvent.java             |   29 -
 .../core/notification/events/GFacEvent.java     |   39 -
 .../core/notification/events/JobIDEvent.java    |   35 -
 .../events/StartExecutionEvent.java             |   29 -
 .../notification/events/StartScheduleEvent.java |   29 -
 .../notification/events/StatusChangeEvent.java  |   33 -
 .../notification/events/UnicoreJobIDEvent.java  |   35 -
 .../notification/listeners/LoggingListener.java |   57 -
 .../listeners/WorkflowTrackingListener.java     |  133 -
 .../airavata/gfac/core/persistence/JobData.java |   55 -
 .../core/persistence/JobPersistenceManager.java |   76 -
 .../gfac/core/utils/GFacThreadPoolExecutor.java |   57 -
 .../airavata/gfac/core/utils/GFacUtils.java     |  708 ---
 .../gfac/core/utils/InputHandlerWorker.java     |   52 -
 .../gfac/core/utils/OutHandlerWorker.java       |   87 -
 .../airavata/gfac/core/utils/OutputUtils.java   |  111 -
 .../gfac/core/x2012/x12/AfterAnyList.java       |  166 +
 .../gfac/core/x2012/x12/AfterOKList.java        |  166 +
 .../gfac/core/x2012/x12/ExportProperties.java   |  183 +
 .../airavata/gfac/core/x2012/x12/InputList.java |  166 +
 .../core/x2012/x12/JobDescriptorDocument.java   |  112 +
 .../gfac/core/x2012/x12/ModuleLoadCommands.java |  166 +
 .../airavata/gfac/core/x2012/x12/PbsParams.java | 1421 ++++++
 .../gfac/core/x2012/x12/PostJobCommands.java    |  166 +
 .../gfac/core/x2012/x12/PreJobCommands.java     |  166 +
 .../core/x2012/x12/impl/AfterAnyListImpl.java   |  235 +
 .../core/x2012/x12/impl/AfterOKListImpl.java    |  235 +
 .../x2012/x12/impl/ExportPropertiesImpl.java    |  233 +
 .../gfac/core/x2012/x12/impl/InputListImpl.java |  235 +
 .../x12/impl/JobDescriptorDocumentImpl.java     |   77 +
 .../x2012/x12/impl/ModuleLoadCommandsImpl.java  |  235 +
 .../gfac/core/x2012/x12/impl/PbsParamsImpl.java | 4174 ++++++++++++++++
 .../x2012/x12/impl/PostJobCommandsImpl.java     |  235 +
 .../core/x2012/x12/impl/PreJobCommandsImpl.java |  235 +
 .../src/main/resources/PBSJobDescriptor.xsd     |  114 +
 .../src/main/resources/gsissh-schemas.xsdconfig |   14 +
 modules/gfac/gfac-gsissh/pom.xml                |  117 -
 .../handler/GSISSHDirectorySetupHandler.java    |  118 -
 .../gfac/gsissh/handler/GSISSHInputHandler.java |  213 -
 .../gsissh/handler/GSISSHOutputHandler.java     |  323 --
 .../gsissh/handler/NewGSISSHOutputHandler.java  |   83 -
 .../gsissh/provider/impl/GSISSHProvider.java    |  351 --
 .../gsissh/security/GSISecurityContext.java     |   86 -
 .../security/TokenizedMyProxyAuthInfo.java      |  305 --
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  367 --
 .../src/main/resources/errors.properties        |  197 -
 .../src/main/resources/service.properties       |   58 -
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |  229 -
 .../GSISecurityContextTestWithMyProxyAuth.java  |  163 -
 .../src/test/resources/PBSTemplate.xslt         |   78 -
 .../src/test/resources/logging.properties       |   42 -
 modules/gfac/gfac-impl/pom.xml                  |   95 +
 .../java/com/jcraft/jsch/ExtendedSession.java   |   42 +
 .../com/jcraft/jsch/GSISSHIdentityFile.java     |  126 +
 .../jcraft/jsch/GSISSHIdentityRepository.java   |   29 +
 .../UserAuthGSSAPIWithMICGSSCredentials.java    |  308 ++
 .../airavata/gfac/gsi/ssh/GSSContextX509.java   |  210 +
 .../gfac/gsi/ssh/api/CommandExecutor.java       |  295 ++
 .../apache/airavata/gfac/gsi/ssh/api/Core.java  |   59 +
 .../apache/airavata/gfac/gsi/ssh/api/Node.java  |  104 +
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  123 +
 .../gfac/gsi/ssh/api/job/LSFOutputParser.java   |  132 +
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  121 +
 .../gfac/gsi/ssh/api/job/PBSOutputParser.java   |  214 +
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  119 +
 .../gfac/gsi/ssh/api/job/SlurmOutputParser.java |  192 +
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  121 +
 .../gfac/gsi/ssh/api/job/UGEOutputParser.java   |  190 +
 .../gfac/gsi/ssh/config/ConfigReader.java       |   76 +
 .../ssh/impl/DefaultJobSubmissionListener.java  |   43 +
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  769 +++
 .../airavata/gfac/gsi/ssh/impl/PBSCluster.java  |   46 +
 .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java |   63 +
 .../gfac/gsi/ssh/impl/StandardOutReader.java    |   79 +
 .../gfac/gsi/ssh/impl/SystemCommandOutput.java  |   78 +
 .../DefaultPasswordAuthenticationInfo.java      |   48 +
 .../DefaultPublicKeyAuthentication.java         |   68 +
 .../DefaultPublicKeyFileAuthentication.java     |   70 +
 .../MyProxyAuthenticationInfo.java              |  108 +
 .../gfac/gsi/ssh/jsch/ExtendedJSch.java         |   64 +
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 +
 .../airavata/gfac/gsi/ssh/util/CommonUtils.java |   83 +
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 +
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 +
 .../airavata/gfac/gsi/ssh/util/SSHUtils.java    |  760 +++
 .../handler/GSISSHDirectorySetupHandler.java    |  118 +
 .../gfac/gsissh/handler/GSISSHInputHandler.java |  213 +
 .../gsissh/handler/GSISSHOutputHandler.java     |  323 ++
 .../gsissh/handler/NewGSISSHOutputHandler.java  |   83 +
 .../gsissh/provider/impl/GSISSHProvider.java    |  344 ++
 .../gsissh/security/GSISecurityContext.java     |   67 +
 .../security/TokenizedMyProxyAuthInfo.java      |  304 ++
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  367 ++
 .../gfac/impl/AiravataJobStatusUpdator.java     |  120 +
 .../gfac/impl/AiravataTaskStatusUpdator.java    |  166 +
 .../impl/AiravataWorkflowNodeStatusUpdator.java |  129 +
 .../airavata/gfac/impl/BetterGfacImpl.java      | 1151 +++++
 .../gfac/impl/GfacInternalStatusUpdator.java    |  104 +
 .../airavata/gfac/impl/InputHandlerWorker.java  |   52 +
 .../airavata/gfac/impl/OutHandlerWorker.java    |   88 +
 .../apache/airavata/gfac/impl/OutputUtils.java  |  111 +
 .../handler/LocalDirectorySetupHandler.java     |   62 +
 .../gfac/local/handler/LocalInputHandler.java   |   92 +
 .../gfac/local/provider/impl/LocalProvider.java |  309 ++
 .../local/utils/InputStreamToFileWriter.java    |   68 +
 .../airavata/gfac/local/utils/InputUtils.java   |   46 +
 .../gfac/local/utils/LocalProviderUtil.java     |   51 +
 .../airavata/gfac/monitor/HPCMonitorID.java     |  107 +
 .../airavata/gfac/monitor/HostMonitorData.java  |   88 +
 .../airavata/gfac/monitor/UserMonitorData.java  |   76 +
 .../command/ExperimentCancelRequest.java        |   38 +
 .../gfac/monitor/command/TaskCancelRequest.java |   52 +
 .../monitor/core/AiravataAbstractMonitor.java   |   38 +
 .../gfac/monitor/core/MessageParser.java        |   43 +
 .../airavata/gfac/monitor/core/Monitor.java     |   30 +
 .../airavata/gfac/monitor/core/PullMonitor.java |   64 +
 .../airavata/gfac/monitor/core/PushMonitor.java |   60 +
 .../gfac/monitor/email/EmailBasedMonitor.java   |  344 ++
 .../gfac/monitor/email/EmailMonitorFactory.java |   49 +
 .../monitor/email/parser/LSFEmailParser.java    |   75 +
 .../monitor/email/parser/PBSEmailParser.java    |  105 +
 .../monitor/email/parser/SLURMEmailParser.java  |   83 +
 .../monitor/email/parser/UGEEmailParser.java    |  103 +
 .../exception/AiravataMonitorException.java     |   37 +
 .../handlers/GridPullMonitorHandler.java        |  139 +
 .../handlers/GridPushMonitorHandler.java        |  107 +
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  471 ++
 .../impl/pull/qstat/ResourceConnection.java     |  154 +
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  280 ++
 .../monitor/impl/push/amqp/BasicConsumer.java   |   87 +
 .../impl/push/amqp/ComputingActivity.java       |   19 +
 .../impl/push/amqp/JSONMessageParser.java       |   77 +
 .../impl/push/amqp/SimpleJobFinishConsumer.java |   86 +
 .../impl/push/amqp/UnRegisterWorker.java        |   67 +
 .../gfac/monitor/util/AMQPConnectionUtil.java   |   80 +
 .../airavata/gfac/monitor/util/CommonUtils.java |  280 ++
 .../airavata/gfac/monitor/util/X509Helper.java  |  164 +
 .../gfac/ssh/context/SSHAuthWrapper.java        |   50 +
 .../ssh/handler/AdvancedSCPInputHandler.java    |  229 +
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  225 +
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |   78 +
 .../ssh/handler/SSHDirectorySetupHandler.java   |  119 +
 .../gfac/ssh/handler/SSHInputHandler.java       |  198 +
 .../gfac/ssh/handler/SSHOutputHandler.java      |  256 +
 .../gfac/ssh/provider/impl/SSHProvider.java     |  465 ++
 .../gfac/ssh/security/SSHSecurityContext.java   |  118 +
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |  184 +
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  562 +++
 .../airavata/gfac/ssh/util/HandleOutputs.java   |   96 +
 .../src/main/resources/LSFTemplate.xslt         |   93 +
 .../src/main/resources/PBSTemplate.xslt         |   82 +
 .../src/main/resources/SLURMTemplate.xslt       |   78 +
 .../src/main/resources/UGETemplate.xslt         |   74 +
 .../src/main/resources/errors.properties        |  197 +
 .../src/main/resources/schema/AccessPolicy.json |   13 +
 .../src/main/resources/schema/Activity.json     |   31 +
 .../src/main/resources/schema/AdminDomain.json  |   51 +
 .../schema/ApplicationEnvironment.json          |   86 +
 .../resources/schema/ApplicationHandle.json     |   21 +
 .../src/main/resources/schema/Benchmark.json    |   21 +
 .../resources/schema/ComputingActivity.json     |  165 +
 .../resources/schema/ComputingEndpoint.json     |   44 +
 .../main/resources/schema/ComputingManager.json |  117 +
 .../main/resources/schema/ComputingService.json |   32 +
 .../main/resources/schema/ComputingShare.json   |  182 +
 .../src/main/resources/schema/Contact.json      |   32 +
 .../src/main/resources/schema/DataStore.json    |   30 +
 .../src/main/resources/schema/Domain.json       |   30 +
 .../src/main/resources/schema/Endpoint.json     |  147 +
 .../src/main/resources/schema/Entity.json       |   35 +
 .../resources/schema/ExecutionEnvironment.json  |  115 +
 .../src/main/resources/schema/Glue2.json        |  246 +
 .../src/main/resources/schema/Location.json     |   47 +
 .../src/main/resources/schema/Manager.json      |   28 +
 .../main/resources/schema/MappingPolicy.json    |   13 +
 .../src/main/resources/schema/Policy.json       |   27 +
 .../src/main/resources/schema/Resource.json     |   27 +
 .../src/main/resources/schema/Service.json      |   75 +
 .../src/main/resources/schema/Share.json        |   45 +
 .../resources/schema/StorageAccessProtocol.json |   32 +
 .../main/resources/schema/StorageEndpoint.json  |    8 +
 .../main/resources/schema/StorageManager.json   |    8 +
 .../main/resources/schema/StorageService.json   |   22 +
 .../schema/StorageServiceCapacity.json          |   33 +
 .../src/main/resources/schema/StorageShare.json |   65 +
 .../resources/schema/StorageShareCapacity.json  |   33 +
 .../resources/schema/ToComputingService.json    |   32 +
 .../main/resources/schema/ToStorageService.json |   25 +
 .../src/main/resources/schema/UserDomain.json   |   58 +
 .../main/resources/schemas/PBSJobDescriptor.xsd |  114 +
 .../resources/schemas/gsissh-schemas.xsdconfig  |   14 +
 .../src/main/resources/service.properties       |   58 +
 .../services/impl/BigRed2TestWithSSHAuth.java   |  252 +
 .../gfac/services/impl/CredentialStoreTest.java |  135 +
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |  229 +
 .../gfac/services/impl/LocalProviderTest.java   |  184 +
 .../impl/SSHProviderTestWithSSHAuth.java        |  172 +
 .../GSISecurityContextTestWithMyProxyAuth.java  |  163 +
 .../gfac/ssh/config/ConfigReaderTest.java       |   38 +
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   84 +
 .../gfac/ssh/impl/VanilaTestWithSSHAuth.java    |  264 +
 .../apache/airavata/job/AMQPMonitorTest.java    |  208 +
 .../job/QstatMonitorTestWithMyProxyAuth.java    |  172 +
 .../src/test/resources/PBSTemplate.xslt         |   73 +
 .../gfac/gfac-impl/src/test/resources/echo.bat  |   22 +
 .../src/test/resources/gsissh.properties        |   26 +
 .../src/test/resources/log4j.properties         |   34 +
 .../src/test/resources/logging.properties       |   42 +
 .../gfac/gfac-impl/src/test/resources/sleep.pbs |   32 +
 .../gfac/gfac-impl/src/test/resources/test.pbs  |   30 +
 modules/gfac/gfac-local/pom.xml                 |   65 -
 .../handler/LocalDirectorySetupHandler.java     |   62 -
 .../gfac/local/handler/LocalInputHandler.java   |   92 -
 .../gfac/local/provider/impl/LocalProvider.java |  311 --
 .../local/utils/InputStreamToFileWriter.java    |   68 -
 .../airavata/gfac/local/utils/InputUtils.java   |   46 -
 .../gfac/local/utils/LocalProviderUtil.java     |   51 -
 .../src/main/resources/errors.properties        |  197 -
 .../src/main/resources/service.properties       |   58 -
 .../gfac/services/impl/LocalProviderTest.java   |  184 -
 .../src/test/resources/PBSTemplate.xslt         |   73 -
 .../src/test/resources/logging.properties       |   42 -
 .../gfac-monitor/gfac-email-monitor/pom.xml     |   35 -
 .../gfac/monitor/email/EmailBasedMonitor.java   |  345 --
 .../gfac/monitor/email/EmailMonitorFactory.java |   49 -
 .../gfac/monitor/email/JobStatusResult.java     |   55 -
 .../gfac/monitor/email/parser/EmailParser.java  |   36 -
 .../monitor/email/parser/LSFEmailParser.java    |   74 -
 .../monitor/email/parser/PBSEmailParser.java    |  104 -
 .../monitor/email/parser/SLURMEmailParser.java  |   82 -
 .../monitor/email/parser/UGEEmailParser.java    |  102 -
 .../airavata/gfac/monitor/HPCMonitorID.java     |  107 -
 .../airavata/gfac/monitor/HostMonitorData.java  |   88 -
 .../airavata/gfac/monitor/UserMonitorData.java  |   76 -
 .../command/ExperimentCancelRequest.java        |   38 -
 .../gfac/monitor/command/TaskCancelRequest.java |   52 -
 .../monitor/core/AiravataAbstractMonitor.java   |   38 -
 .../gfac/monitor/core/MessageParser.java        |   43 -
 .../airavata/gfac/monitor/core/Monitor.java     |   30 -
 .../airavata/gfac/monitor/core/PullMonitor.java |   64 -
 .../airavata/gfac/monitor/core/PushMonitor.java |   60 -
 .../exception/AiravataMonitorException.java     |   37 -
 .../handlers/GridPullMonitorHandler.java        |  145 -
 .../handlers/GridPushMonitorHandler.java        |  108 -
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  471 --
 .../impl/pull/qstat/ResourceConnection.java     |  154 -
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  280 --
 .../monitor/impl/push/amqp/BasicConsumer.java   |   87 -
 .../impl/push/amqp/JSONMessageParser.java       |   78 -
 .../impl/push/amqp/SimpleJobFinishConsumer.java |   86 -
 .../impl/push/amqp/UnRegisterWorker.java        |   67 -
 .../gfac/monitor/util/AMQPConnectionUtil.java   |   80 -
 .../airavata/gfac/monitor/util/CommonUtils.java |  280 --
 .../airavata/gfac/monitor/util/X509Helper.java  |  164 -
 .../src/main/resources/errors.properties        |  197 -
 .../src/main/resources/schema/AccessPolicy.json |   13 -
 .../src/main/resources/schema/Activity.json     |   31 -
 .../src/main/resources/schema/AdminDomain.json  |   51 -
 .../schema/ApplicationEnvironment.json          |   86 -
 .../resources/schema/ApplicationHandle.json     |   21 -
 .../src/main/resources/schema/Benchmark.json    |   21 -
 .../resources/schema/ComputingActivity.json     |  165 -
 .../resources/schema/ComputingEndpoint.json     |   44 -
 .../main/resources/schema/ComputingManager.json |  117 -
 .../main/resources/schema/ComputingService.json |   32 -
 .../main/resources/schema/ComputingShare.json   |  182 -
 .../src/main/resources/schema/Contact.json      |   32 -
 .../src/main/resources/schema/DataStore.json    |   30 -
 .../src/main/resources/schema/Domain.json       |   30 -
 .../src/main/resources/schema/Endpoint.json     |  147 -
 .../src/main/resources/schema/Entity.json       |   35 -
 .../resources/schema/ExecutionEnvironment.json  |  115 -
 .../src/main/resources/schema/Glue2.json        |  246 -
 .../src/main/resources/schema/Location.json     |   47 -
 .../src/main/resources/schema/Manager.json      |   28 -
 .../main/resources/schema/MappingPolicy.json    |   13 -
 .../src/main/resources/schema/Policy.json       |   27 -
 .../src/main/resources/schema/Resource.json     |   27 -
 .../src/main/resources/schema/Service.json      |   75 -
 .../src/main/resources/schema/Share.json        |   45 -
 .../resources/schema/StorageAccessProtocol.json |   32 -
 .../main/resources/schema/StorageEndpoint.json  |    8 -
 .../main/resources/schema/StorageManager.json   |    8 -
 .../main/resources/schema/StorageService.json   |   22 -
 .../schema/StorageServiceCapacity.json          |   33 -
 .../src/main/resources/schema/StorageShare.json |   65 -
 .../resources/schema/StorageShareCapacity.json  |   33 -
 .../resources/schema/ToComputingService.json    |   32 -
 .../main/resources/schema/ToStorageService.json |   25 -
 .../src/main/resources/schema/UserDomain.json   |   58 -
 .../src/main/resources/service.properties       |   58 -
 .../apache/airavata/job/AMQPMonitorTest.java    |  207 -
 .../job/QstatMonitorTestWithMyProxyAuth.java    |  172 -
 .../src/test/resources/PBSTemplate.xslt         |   73 -
 .../src/test/resources/echo.bat                 |   22 -
 .../src/test/resources/logging.properties       |   42 -
 modules/gfac/gfac-monitor/pom.xml               |   29 -
 modules/gfac/gfac-service/pom.xml               |  100 +
 .../apache/airavata/gfac/server/GfacServer.java |  143 +
 .../airavata/gfac/server/GfacServerHandler.java |  421 ++
 .../src/main/resources/gsissh.properties        |   26 +
 .../gfac/client/GfacClientFactoryTest.java      |   88 +
 .../airavata/gfac/client/util/Initialize.java   |  329 ++
 .../src/test/resources/gsissh.properties        |   26 +
 .../src/test/resources/monitor.properties       |   30 +
 .../src/test/resources/orchestrator.properties  |   26 +
 .../src/test/resources/registry-derby.sql       |  361 ++
 .../gfac-service/src/test/resources/zoo.cfg     |   22 +
 modules/gfac/gfac-ssh/pom.xml                   |  114 -
 .../gfac/ssh/context/SSHAuthWrapper.java        |   50 -
 .../ssh/handler/AdvancedSCPInputHandler.java    |  229 -
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  225 -
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |   78 -
 .../ssh/handler/SSHDirectorySetupHandler.java   |  119 -
 .../gfac/ssh/handler/SSHInputHandler.java       |  198 -
 .../gfac/ssh/handler/SSHOutputHandler.java      |  256 -
 .../gfac/ssh/provider/impl/SSHProvider.java     |  473 --
 .../gfac/ssh/security/SSHSecurityContext.java   |  118 -
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |  184 -
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  562 ---
 .../airavata/gfac/ssh/util/HandleOutputs.java   |   96 -
 .../src/main/resources/errors.properties        |  197 -
 .../src/main/resources/service.properties       |   58 -
 .../services/impl/BigRed2TestWithSSHAuth.java   |  252 -
 .../gfac/services/impl/CredentialStoreTest.java |  135 -
 .../impl/SSHProviderTestWithSSHAuth.java        |  172 -
 .../src/test/resources/PBSTemplate.xslt         |   75 -
 .../src/test/resources/logging.properties       |   42 -
 .../generate-gfac-stubs.sh                      |  134 -
 .../gfac.cpi.service.thrift                     |   68 -
 .../gfacDataModel.thrift                        |   64 -
 modules/gfac/pom.xml                            |   11 +-
 .../airavata-orchestrator-service/pom.xml       |   85 -
 .../orchestrator/server/OrchestratorServer.java |  160 -
 .../server/OrchestratorServerHandler.java       |  643 ---
 .../airavata/orchestrator/util/Constants.java   |   29 -
 .../orchestrator/util/DataModelUtils.java       |   55 -
 .../OrchestratorServerThreadPoolExecutor.java   |   56 -
 .../src/main/resources/gsissh.properties        |   26 -
 .../client/OrchestratorClientFactoryTest.java   |   77 -
 .../orchestrator/client/util/Initialize.java    |  329 --
 .../src/test/resources/gsissh.properties        |   26 -
 .../src/test/resources/monitor.properties       |   30 -
 .../src/test/resources/orchestrator.properties  |   26 -
 .../src/test/resources/registry-derby.sql       |  361 --
 .../src/test/resources/zoo.cfg                  |   22 -
 .../airavata-orchestrator-stubs/pom.xml         |   60 -
 .../client/OrchestratorClientFactory.java       |   44 -
 .../orchestrator/cpi/OrchestratorService.java   | 4669 ------------------
 .../cpi/orchestrator_cpi_serviceConstants.java  |   55 -
 .../sample/OrchestratorClientSample.java        |  136 -
 .../orchestrator/orchestrator-client/pom.xml    |   60 +
 .../client/OrchestratorClientFactory.java       |   44 +
 .../orchestrator/cpi/OrchestratorService.java   | 4669 ++++++++++++++++++
 .../cpi/orchestrator_cpi_serviceConstants.java  |   55 +
 .../sample/OrchestratorClientSample.java        |  136 +
 modules/orchestrator/orchestrator-core/pom.xml  |   20 +-
 .../core/impl/GFACEmbeddedJobSubmitter.java     |   12 +-
 .../core/impl/GFACPassiveJobSubmitter.java      |    2 +-
 .../orchestrator/orchestrator-service/pom.xml   |   85 +
 .../orchestrator/server/OrchestratorServer.java |  160 +
 .../server/OrchestratorServerHandler.java       |  643 +++
 .../airavata/orchestrator/util/Constants.java   |   29 +
 .../orchestrator/util/DataModelUtils.java       |   55 +
 .../OrchestratorServerThreadPoolExecutor.java   |   56 +
 .../src/main/resources/gsissh.properties        |   26 +
 .../client/OrchestratorClientFactoryTest.java   |   77 +
 .../orchestrator/client/util/Initialize.java    |  329 ++
 .../src/test/resources/gsissh.properties        |   26 +
 .../src/test/resources/monitor.properties       |   30 +
 .../src/test/resources/orchestrator.properties  |   26 +
 .../src/test/resources/registry-derby.sql       |  361 ++
 .../src/test/resources/zoo.cfg                  |   22 +
 .../generate-orchestrator-stubs.sh              |  132 -
 .../orchestrator.cpi.service.thrift             |   78 -
 modules/orchestrator/pom.xml                    |    4 +-
 modules/server/pom.xml                          |    2 +-
 modules/workflow-model/workflow-engine/pom.xml  |    4 +-
 modules/xbaya-gui/pom.xml                       |    7 +-
 pom.xml                                         |   88 +-
 tools/gsissh-cli-tools/README.txt               |    2 +-
 .../ssh/cli/SSHApiClientWithMyProxyAuth.java    |   25 +-
 tools/gsissh/src/main/java/SSHDemo.java         |    4 +-
 .../java/com/jcraft/jsch/ExtendedSession.java   |    2 +-
 .../UserAuthGSSAPIWithMICGSSCredentials.java    |    4 +-
 .../airavata/gfac/gsi/ssh/GSSContextX509.java   |  210 +
 .../airavata/gfac/gsi/ssh/api/Cluster.java      |  162 +
 .../gfac/gsi/ssh/api/CommandExecutor.java       |  278 ++
 .../airavata/gfac/gsi/ssh/api/CommandInfo.java  |   34 +
 .../gfac/gsi/ssh/api/CommandOutput.java         |   49 +
 .../apache/airavata/gfac/gsi/ssh/api/Core.java  |   59 +
 .../apache/airavata/gfac/gsi/ssh/api/Node.java  |  104 +
 .../gfac/gsi/ssh/api/SSHApiException.java       |   36 +
 .../airavata/gfac/gsi/ssh/api/ServerInfo.java   |   65 +
 .../api/authentication/AuthenticationInfo.java  |   32 +
 .../authentication/GSIAuthenticationInfo.java   |   43 +
 .../authentication/SSHKeyAuthentication.java    |   46 +
 .../SSHPasswordAuthentication.java              |   43 +
 .../SSHPublicKeyAuthentication.java             |   54 +
 .../SSHPublicKeyFileAuthentication.java         |   52 +
 .../gfac/gsi/ssh/api/job/JobDescriptor.java     |  473 ++
 .../ssh/api/job/JobManagerConfiguration.java    |   51 +
 .../airavata/gfac/gsi/ssh/api/job/JobType.java  |   32 +
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  121 +
 .../gfac/gsi/ssh/api/job/LSFOutputParser.java   |  130 +
 .../gfac/gsi/ssh/api/job/OutputParser.java      |   67 +
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/PBSOutputParser.java   |  212 +
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  117 +
 .../gfac/gsi/ssh/api/job/SlurmOutputParser.java |  190 +
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/UGEOutputParser.java   |  188 +
 .../gfac/gsi/ssh/config/ConfigReader.java       |   76 +
 .../ssh/impl/DefaultJobSubmissionListener.java  |   42 +
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  767 +++
 .../airavata/gfac/gsi/ssh/impl/JobStatus.java   |  110 +
 .../airavata/gfac/gsi/ssh/impl/PBSCluster.java  |   45 +
 .../gfac/gsi/ssh/impl/RawCommandInfo.java       |   55 +
 .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java |   63 +
 .../gfac/gsi/ssh/impl/StandardOutReader.java    |   79 +
 .../gfac/gsi/ssh/impl/SystemCommandOutput.java  |   78 +
 .../DefaultPasswordAuthenticationInfo.java      |   48 +
 .../DefaultPublicKeyAuthentication.java         |   68 +
 .../DefaultPublicKeyFileAuthentication.java     |   70 +
 .../MyProxyAuthenticationInfo.java              |  108 +
 .../gfac/gsi/ssh/jsch/ExtendedJSch.java         |   64 +
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 +
 .../airavata/gfac/gsi/ssh/util/CommonUtils.java |   81 +
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 +
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 +
 .../airavata/gfac/gsi/ssh/util/SSHUtils.java    |  757 +++
 .../apache/airavata/gsi/ssh/GSSContextX509.java |  214 -
 .../apache/airavata/gsi/ssh/api/Cluster.java    |  162 -
 .../airavata/gsi/ssh/api/CommandExecutor.java   |  278 --
 .../airavata/gsi/ssh/api/CommandInfo.java       |   34 -
 .../airavata/gsi/ssh/api/CommandOutput.java     |   49 -
 .../org/apache/airavata/gsi/ssh/api/Core.java   |   59 -
 .../org/apache/airavata/gsi/ssh/api/Node.java   |  104 -
 .../airavata/gsi/ssh/api/SSHApiException.java   |   36 -
 .../apache/airavata/gsi/ssh/api/ServerInfo.java |   65 -
 .../api/authentication/AuthenticationInfo.java  |   32 -
 .../authentication/GSIAuthenticationInfo.java   |   43 -
 .../authentication/SSHKeyAuthentication.java    |   46 -
 .../SSHPasswordAuthentication.java              |   43 -
 .../SSHPublicKeyAuthentication.java             |   54 -
 .../SSHPublicKeyFileAuthentication.java         |   52 -
 .../airavata/gsi/ssh/api/job/JobDescriptor.java |  473 --
 .../ssh/api/job/JobManagerConfiguration.java    |   51 -
 .../airavata/gsi/ssh/api/job/JobType.java       |   32 -
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  121 -
 .../gsi/ssh/api/job/LSFOutputParser.java        |  130 -
 .../airavata/gsi/ssh/api/job/OutputParser.java  |   68 -
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  119 -
 .../gsi/ssh/api/job/PBSOutputParser.java        |  214 -
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  117 -
 .../gsi/ssh/api/job/SlurmOutputParser.java      |  190 -
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  119 -
 .../gsi/ssh/api/job/UGEOutputParser.java        |  188 -
 .../airavata/gsi/ssh/config/ConfigReader.java   |   81 -
 .../ssh/impl/DefaultJobSubmissionListener.java  |   42 -
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  768 ---
 .../apache/airavata/gsi/ssh/impl/JobStatus.java |  112 -
 .../airavata/gsi/ssh/impl/PBSCluster.java       |   46 -
 .../airavata/gsi/ssh/impl/RawCommandInfo.java   |   55 -
 .../airavata/gsi/ssh/impl/SSHUserInfo.java      |   63 -
 .../gsi/ssh/impl/StandardOutReader.java         |   80 -
 .../gsi/ssh/impl/SystemCommandOutput.java       |   78 -
 .../DefaultPasswordAuthenticationInfo.java      |   50 -
 .../DefaultPublicKeyAuthentication.java         |   68 -
 .../DefaultPublicKeyFileAuthentication.java     |   70 -
 .../MyProxyAuthenticationInfo.java              |  108 -
 .../airavata/gsi/ssh/jsch/ExtendedJSch.java     |   64 -
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 -
 .../airavata/gsi/ssh/util/CommonUtils.java      |   81 -
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 -
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 -
 .../apache/airavata/gsi/ssh/util/SSHUtils.java  |  758 ---
 .../resources/schemas/gsissh-schemas.xsdconfig  |    2 +-
 .../gfac/ssh/config/ConfigReaderTest.java       |   37 +
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   77 +
 .../gfac/ssh/impl/VanilaTestWithSSHAuth.java    |  262 +
 .../gsi/ssh/config/ConfigReaderTest.java        |   37 -
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   88 -
 .../gsi/ssh/impl/VanilaTestWithSSHAuth.java     |  263 -
 721 files changed, 58879 insertions(+), 71470 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/distribution/pom.xml
----------------------------------------------------------------------
diff --cc distribution/pom.xml
index 0000000,cf33308..d934b9e
mode 000000,100644..100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@@ -1,0 -1,581 +1,581 @@@
+ <?xml version="1.0" encoding="UTF-8"?>
+ 
+ <!--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. -->
+ 
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 
+     <parent>
+         <groupId>org.apache.airavata</groupId>
+         <artifactId>airavata</artifactId>
+         <version>0.16-SNAPSHOT</version>
+         <relativePath>../pom.xml</relativePath>
+     </parent>
+ 
+     <modelVersion>4.0.0</modelVersion>
+     <artifactId>apache-airavata-distribution</artifactId>
+     <name>Airavata server distribution</name>
+     <packaging>pom</packaging>
+     <url>http://airavata.apache.org/</url>
+ 
+     <build>
+         <plugins>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-dependency-plugin</artifactId>
+                 <version>2.8</version>
+                 <executions>
+                     <execution>
+                         <id>unpack</id>
+                         <phase>compile</phase>
+                         <goals>
+                             <goal>unpack</goal>
+                         </goals>
+                         <configuration>
+                             <artifactItems>
+                                 <artifactItem>
+                                     <groupId>org.apache.airavata</groupId>
+                                     <artifactId>airavata-server-configuration</artifactId>
+                                     <version>${project.version}</version>
+                                     <type>jar</type>
+                                 </artifactItem>
+                             </artifactItems>
+                             <!--includes>**/*.war</includes -->
+                             <outputDirectory>${project.build.directory}/conf</outputDirectory>
+                         </configuration>
+                     </execution>
+                 </executions>
+             </plugin>
+ 
+             <plugin>
+                 <groupId>org.codehaus.gmaven</groupId>
+                 <artifactId>gmaven-plugin</artifactId>
+                 <version>1.4</version>
+                 <executions>
+                     <execution>
+                         <id>generate-timestamp</id>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>execute</goal>
+                         </goals>
+                         <configuration>
+                             <source>
+                                 import java.util.Date
+                                 import java.text.MessageFormat
+ 
+                                 project.properties['buildTimestamp'] =
+                                         MessageFormat.format("{0,date,dd-MM-yyyy}", new
+                                                 Date())
+                             </source>
+                         </configuration>
+                     </execution>
+                 </executions>
+             </plugin>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-assembly-plugin</artifactId>
+                 <executions>
+                     <execution>
+                         <id>distribution-package</id>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>single</goal>
+                         </goals>
+                         <configuration>
+                             <finalName>${archieve.name}-${project.version}</finalName>
+                             <descriptors>
+                                 <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
+                                 <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
+                             </descriptors>
+                             <attach>false</attach>
+                         </configuration>
+                     </execution>
+                 </executions>
+             </plugin>
+ 
+             <plugin>
+                 <groupId>org.codehaus.mojo</groupId>
+                 <artifactId>build-helper-maven-plugin</artifactId>
+                 <version>1.7</version>
+                 <executions>
+                     <execution>
+                         <id>attach-artifacts</id>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>attach-artifact</goal>
+                         </goals>
+                         <configuration>
+                             <artifacts>
+                                 <artifact>
+                                     <file>${airavata.bin.zip}</file>
+                                     <type>zip</type>
+                                     <classifier>bin</classifier>
+                                 </artifact>
+                                 <artifact>
+                                     <file>${airavata.bin.tar.gz}</file>
+                                     <type>tar.gz</type>
+                                     <classifier>bin</classifier>
+                                 </artifact>
+                             </artifacts>
+                         </configuration>
+                     </execution>
+                 </executions>
+             </plugin>
+         </plugins>
+     </build>
+ 
+     <dependencies>
+         <dependency>
+             <groupId>org.apache.derby</groupId>
+             <artifactId>derby</artifactId>
+             <version>${derby.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.derby</groupId>
+             <artifactId>derbyclient</artifactId>
+             <version>${derby.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.derby</groupId>
+             <artifactId>derbynet</artifactId>
+             <version>${derby.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.derby</groupId>
+             <artifactId>derbytools</artifactId>
+             <version>${derby.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>slf4j-api</artifactId>
+         </dependency>
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>jcl-over-slf4j</artifactId>
+         </dependency>
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>slf4j-log4j12</artifactId>
+         </dependency>
+         <dependency>
+             <groupId>log4j</groupId>
+             <artifactId>log4j</artifactId>
+         </dependency>
+         <dependency>
+             <groupId>com.amazonaws</groupId>
+             <artifactId>aws-java-sdk</artifactId>
+             <version>1.9.0</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.apache.httpcomponents</groupId>
+                     <artifactId>httpclient</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>net.java.dev.jets3t</groupId>
+             <artifactId>jets3t</artifactId>
+             <version>0.8.0</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-collections</groupId>
+             <artifactId>commons-collections</artifactId>
+             <version>3.2.1</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-lang</groupId>
+             <artifactId>commons-lang</artifactId>
+             <version>2.4</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-io</groupId>
+             <artifactId>commons-io</artifactId>
+             <version>2.4</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-codec</groupId>
+             <artifactId>commons-codec</artifactId>
+             <version>1.6</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-standalone-server</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>app-catalog-cpi</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-messaging-core</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>app-catalog-data</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-common-utils</artifactId>
+             <version>${project.version}</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.apache.ws.commons.schema</groupId>
+                     <artifactId>XmlSchema</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>xerces</groupId>
+                     <artifactId>xmlParserAPIs</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>org.apache.neethi</groupId>
+                     <artifactId>neethi</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-orchestrator-service</artifactId>
+             <version>${project.version}</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.apache.ws.commons.schema</groupId>
+                     <artifactId>XmlSchema</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>xerces</groupId>
+                     <artifactId>xmlParserAPIs</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>org.apache.neethi</groupId>
+                     <artifactId>neethi</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-orchestrator-client</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-client</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-orchestrator-core</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-registry-cpi</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
 -            <artifactId>airavata-jpa-registry</artifactId>
++            <artifactId>airavata-experiment-catalog</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-data-models</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-credential-store</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-impl</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-bes</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-core</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-gfac-service</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-workflow-model-core</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-model-utils</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-api-server</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.bouncycastle</groupId>
+             <artifactId>bcprov-jdk15on</artifactId>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.openjpa</groupId>
+             <artifactId>openjpa-all</artifactId>
+             <version>2.2.0</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>org.apache.shiro</groupId>
+             <artifactId>shiro-core</artifactId>
+             <version>1.2.1</version>
+         </dependency>
+         <dependency>
+             <groupId>com.sun.jersey</groupId>
+             <artifactId>jersey-client</artifactId>
+             <version>${jersey.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>javax.servlet</groupId>
+             <artifactId>javax.servlet-api</artifactId>
+             <version>3.0.1</version>
+             <scope>provided</scope>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.tomcat.embed</groupId>
+             <artifactId>tomcat-embed-logging-juli</artifactId>
+             <version>7.0.22</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.tomcat.embed</groupId>
+             <artifactId>tomcat-embed-jasper</artifactId>
+             <version>7.0.22</version>
+         </dependency>
+         <dependency>
+             <groupId>com.sun.jersey</groupId>
+             <artifactId>jersey-servlet</artifactId>
+             <version>${jersey.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>com.sun.jersey</groupId>
+             <artifactId>jersey-json</artifactId>
+             <version>${jersey.version}</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>stax</groupId>
+                     <artifactId>stax-api</artifactId>
+                 </exclusion>
+             </exclusions>
+ 
+         </dependency>
+         <dependency>
+             <groupId>com.sun.jersey.contribs</groupId>
+             <artifactId>jersey-multipart</artifactId>
+             <version>${jersey.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>com.sun.jersey</groupId>
+             <artifactId>jersey-server</artifactId>
+             <version>${jersey.version}</version>
+         </dependency>
+         <!--dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId>
+             <version>${jersey.version}</version> </dependency -->
+         <dependency>
+             <groupId>org.codehaus.jackson</groupId>
+             <artifactId>jackson-mapper-asl</artifactId>
+             <version>1.9.2</version>
+         </dependency>
+         <dependency>
+             <groupId>org.codehaus.jackson</groupId>
+             <artifactId>jackson-xc</artifactId>
+             <version>1.9.2</version>
+         </dependency>
+         <dependency>
+             <groupId>org.codehaus.jackson</groupId>
+             <artifactId>jackson-jaxrs</artifactId>
+             <version>1.9.2</version>
+         </dependency>
+         <dependency>
+             <groupId>org.codehaus.jackson</groupId>
+             <artifactId>jackson-core-asl</artifactId>
+             <version>1.9.2</version>
+         </dependency>
+         <dependency>
+             <groupId>xerces</groupId>
+             <artifactId>xercesImpl</artifactId>
+             <version>2.9.1</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>xml-apis</groupId>
+                     <artifactId>xml-apis</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>com.ibm.icu</groupId>
+             <artifactId>icu4j</artifactId>
+             <version>3.4.4</version>
+         </dependency>
+         <dependency>
+             <groupId>com.google.guava</groupId>
+             <artifactId>guava</artifactId>
+             <version>12.0</version>
+         </dependency>
+ 
+         <!-- Hadoop provider related dependencies -->
+         <dependency>
+             <groupId>org.apache.hadoop</groupId>
+             <artifactId>hadoop-core</artifactId>
+             <version>1.0.3</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.hadoop</groupId>
+             <artifactId>hadoop-client</artifactId>
+             <version>1.0.3</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.whirr</groupId>
+             <artifactId>whirr-core</artifactId>
+             <version>0.7.1</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.bouncycastle</groupId>
+                     <artifactId>bcprov-jdk16</artifactId>
+                 </exclusion>
+                 <exclusion>
+                     <groupId>org.jclouds.driver</groupId>
+                     <artifactId>jclouds-bouncycastle</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.whirr</groupId>
+             <artifactId>whirr-hadoop</artifactId>
+             <version>0.7.1</version>
+         </dependency>
+         <dependency>
+             <groupId>org.hamcrest</groupId>
+             <artifactId>hamcrest-all</artifactId>
+             <version>1.1</version>
+         </dependency>
+         <dependency>
+             <groupId>org.mockito</groupId>
+             <artifactId>mockito-all</artifactId>
+             <version>1.8.5</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-configuration</groupId>
+             <artifactId>commons-configuration</artifactId>
+             <version>1.7</version>
+         </dependency>
+         <dependency>
+             <groupId>net.sf.jopt-simple</groupId>
+             <artifactId>jopt-simple</artifactId>
+             <version>3.2</version>
+         </dependency>
+         <dependency>
+             <groupId>org.ebaysf.web</groupId>
+             <artifactId>cors-filter</artifactId>
+             <version>${ebay.cors.filter}</version>
+         </dependency>
+         <dependency>
+             <groupId>com.jcraft</groupId>
+             <artifactId>jsch</artifactId>
+             <version>0.1.50</version>
+         </dependency>
+         <!-- dependency> <groupId>org.ogce</groupId> <artifactId>bcgss</artifactId>
+             <version>146</version> </dependency> -->
+         <dependency>
+             <groupId>org.apache.xmlbeans</groupId>
+             <artifactId>xmlbeans</artifactId>
+             <version>${xmlbeans.version}</version>
+             <exclusions>
+                 <exclusion>
+                     <groupId>stax</groupId>
+                     <artifactId>stax-api</artifactId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.thrift</groupId>
+             <artifactId>libthrift</artifactId>
+             <version>0.9.1</version>
+         </dependency>
+         <dependency>
+             <groupId>com.fasterxml.jackson.core</groupId>
+             <artifactId>jackson-databind</artifactId>
+             <version>2.0.0</version>
+         </dependency>
+         <dependency>
+             <groupId>com.fasterxml.jackson.core</groupId>
+             <artifactId>jackson-core</artifactId>
+             <version>2.0.0</version>
+         </dependency>
+         <dependency>
+             <groupId>com.fasterxml.jackson.core</groupId>
+             <artifactId>jackson-annotations</artifactId>
+             <version>2.0.0</version>
+         </dependency>
+         <!-- zookeeper dependencies -->
+ 
+         <dependency>
+             <groupId>org.apache.zookeeper</groupId>
+             <artifactId>zookeeper</artifactId>
+             <version>3.4.0</version>
+         </dependency>
+         <dependency>
+             <groupId>commons-cli</groupId>
+             <artifactId>commons-cli</artifactId>
+             <version>1.2</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.rabbitmq</groupId>
+             <artifactId>amqp-client</artifactId>
+             <version>${amqp.client.version}</version>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.curator</groupId>
+             <artifactId>curator-framework</artifactId>
+             <version>${curator.version}</version>
+         </dependency>
+ 
+         <!-- ======================== Sample =================== -->
+         <dependency>
+             <groupId>org.apache.airavata</groupId>
+             <artifactId>airavata-client-samples</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+     </dependencies>
+ 
+ 
+     <properties>
+         <jersey.version>1.13</jersey.version>
+         <grizzly.version>2.0.0-M3</grizzly.version>
+         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+         <archieve.name>apache-airavata-server</archieve.name>
+         <airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
+         <airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
+         <airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
+         <airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
+     </properties>
+ </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-core/pom.xml
index 037cef6,d2741a1..079fe36
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@@ -47,9 -47,14 +47,14 @@@
          </dependency>
           <dependency>
              <groupId>org.apache.airavata</groupId>
 -            <artifactId>airavata-jpa-registry</artifactId>
 +            <artifactId>airavata-experiment-catalog</artifactId>
              <version>${project.version}</version>
          </dependency>
+         <dependency>
+             <groupId>org.apache.xmlbeans</groupId>
+             <artifactId>xmlbeans</artifactId>
+             <version>${xmlbeans.version}</version>
+         </dependency>
          <!-- Credential Store -->
          <dependency>
              <groupId>org.apache.airavata</groupId>


[49/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/jnlp/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/jnlp/LICENSE b/modules/distribution/xbaya-gui/src/main/resources/jnlp/LICENSE
deleted file mode 100644
index 3a4d1a4..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/jnlp/LICENSE
+++ /dev/null
@@ -1,2272 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-    Everyone is permitted to copy and distribute copies of this Agreement,
-    but in order to avoid inconsistency the Agreement is copyrighted and may
-    only be modified in the following manner. The Agreement Steward reserves
-    the right to publish new versions (including revisions) of this Agreement
-    from time to time. No one other than the Agreement Steward has the right
-    to modify this Agreement. The Eclipse Foundation is the initial Agreement
-    Steward. The Eclipse Foundation may assign the responsibility to serve as
-    the Agreement Steward to a suitable separate entity. Each new version of
-    the Agreement will be given a distinguishing version number. The Program
-    (including Contributions) may always be distributed subject to the version
-    of the Agreement under which it was received. In addition, after a new
-    version of the Agreement is published, Contributor may elect to distribute
-    the Program (including its Contributions) under the new version. Except as
-    expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-    rights or licenses to the intellectual property of any Contributor under
-    this Agreement, whether expressly, by implication, estoppel or otherwise.
-    All rights in the Program not expressly granted under this Agreement
-    are reserved.
-
-    This Agreemen

<TRUNCATED>

[09/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
deleted file mode 100644
index 0a2aa8d..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *
- * 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.ssh.handler;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * This handler will copy outputs from airavata installed local directory
- * to a remote location, prior to this handler SCPOutputHandler should be invoked
- * Should add following configuration to gfac-config.xml and configure the keys properly
- * <Handler class="AdvancedSCPOutputHandler">
-                            <property name="privateKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa"/>
-                            <property name="publicKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa.pub"/>
-                        <property name="userName" value="airavata"/>
-                        <property name="hostName" value="gw98.iu.xsede.org"/>
-                        <property name="outputPath" value="/home/airavata/outputData"/>
-                        <property name="passPhrase" value="/home/airavata/outputData"/>
-                        <property name="password" value="/home/airavata/outputData"/>
-
- */
-public class AdvancedSCPOutputHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(AdvancedSCPOutputHandler.class);
-
-    public static final int DEFAULT_SSH_PORT = 22;
-
-    private String password = null;
-
-    private String publicKeyPath;
-
-    private String passPhrase;
-
-    private String privateKeyPath;
-
-    private String userName;
-
-    private String hostName;
-
-    private String outputPath;
-
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-        password = (String)properties.get("password");
-        passPhrase = (String)properties.get("passPhrase");
-        privateKeyPath = (String)properties.get("privateKeyPath");
-        publicKeyPath = (String)properties.get("publicKeyPath");
-        userName = (String)properties.get("userName");
-        hostName = (String)properties.get("hostName");
-        outputPath = (String)properties.get("outputPath");
-    }
-
-    @Override
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-    	Cluster pbsCluster = null;
-        AuthenticationInfo authenticationInfo = null;
-        if (password != null) {
-            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-        } else {
-            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                    this.passPhrase);
-        }
-        try {
-            String hostName = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostName) == null) {
-                try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    try {
-                        StringWriter errors = new StringWriter();
-                        e.printStackTrace(new PrintWriter(errors));
-         				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-         			} catch (GFacException e1) {
-         				 log.error(e1.getLocalizedMessage());
-         			}
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-            String standardError = jobExecutionContext.getStandardError();
-            String standardOutput = jobExecutionContext.getStandardOutput();
-            super.invoke(jobExecutionContext);
-            // Server info
-            if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir() != null){
-                try{
-                    URL outputPathURL = new URL(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir());
-                    this.userName = outputPathURL.getUserInfo();
-                    this.hostName = outputPathURL.getHost();
-                    outputPath = outputPathURL.getPath();
-                } catch (MalformedURLException e) {
-                    log.error(e.getLocalizedMessage(),e);
-                }
-            }
-            String key = GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
-            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
-            if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && !jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().isPersistOutputData()){
-            outputPath = outputPath + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID()
-                    + File.separator;
-                pbsCluster.makeDirectory(outputPath);
-            }
-            pbsCluster.scpTo(outputPath, standardError);
-            pbsCluster.scpTo(outputPath, standardOutput);
-            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
-            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
-            Set<String> keys = output.keySet();
-            for (String paramName : keys) {
-                OutputDataObjectType outputDataObjectType = (OutputDataObjectType) output.get(paramName);
-                if (outputDataObjectType.getType() == DataType.URI) {
-                    // for failed jobs outputs are not generated. So we should not download outputs
-                    if (GFacUtils.isFailedJob(jobExecutionContext)){
-                        continue;
-                    }
-                	String downloadFile = outputDataObjectType.getValue();
-                    if(downloadFile == null || !(new File(downloadFile).isFile())){
-                        GFacUtils.saveErrorDetails(jobExecutionContext, "Empty Output returned from the application", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                		throw new GFacHandlerException("Empty Output returned from the application.." );
-                	}
-                	pbsCluster.scpTo(outputPath, downloadFile);
-                    String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar)+1, downloadFile.length());
-                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
-                    dataObjectType.setName(paramName);
-                    dataObjectType.setType(DataType.URI);
-                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
-                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
-                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
-                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
-                    outputArray.add(dataObjectType);
-                }else if (outputDataObjectType.getType() == DataType.STDOUT) {
-                    pbsCluster.scpTo(outputPath, standardOutput);
-                    String fileName = standardOutput.substring(standardOutput.lastIndexOf(File.separatorChar)+1, standardOutput.length());
-                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
-                    dataObjectType.setName(paramName);
-                    dataObjectType.setType(DataType.STDOUT);
-                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
-                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
-                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
-                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
-                    outputArray.add(dataObjectType);
-                }else if (outputDataObjectType.getType() == DataType.STDERR) {
-                    pbsCluster.scpTo(outputPath, standardError);
-                    String fileName = standardError.substring(standardError.lastIndexOf(File.separatorChar)+1, standardError.length());
-                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
-                    dataObjectType.setName(paramName);
-                    dataObjectType.setType(DataType.STDERR);
-                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
-                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
-                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
-                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
-                    outputArray.add(dataObjectType);
-                }
-             }
-           registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-        } catch (SSHApiException e) {
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-			} catch (GFacException e1) {
-				 log.error(e1.getLocalizedMessage());
-			}
-            log.error("Error transfering files to remote host : " + hostName + " with the user: " + userName);
-            log.error(e.getMessage());
-            throw new GFacHandlerException(e);
-        } catch (Exception e) {
-        	 try {
- 				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
- 			} catch (GFacException e1) {
- 				 log.error(e1.getLocalizedMessage());
- 			}
-        	throw new GFacHandlerException(e);
-        }
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
deleted file mode 100644
index 93d0ed0..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.apache.airavata.gfac.ssh.handler;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.util.HandleOutputs;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NewSSHOutputHandler extends AbstractHandler{
-
-	 private static final Logger log = LoggerFactory.getLogger(NewSSHOutputHandler.class);
-
-	    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-	        String hostAddress = jobExecutionContext.getHostName();
-	      	Cluster cluster = null;
-	      	// Security Context and connection
-	        try {
-	            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-	                GFACSSHUtils.addSecurityContext(jobExecutionContext);
-	            }
-	            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-	            if (cluster == null) {
-	                throw new GFacProviderException("Security context is not set properly");
-	            } else {
-	                log.info("Successfully retrieved the Security Context");
-	            }
-	        } catch (Exception e) {
-	            log.error(e.getMessage());
-	            try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-	                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-	            } catch (GFacException e1) {
-	                log.error(e1.getLocalizedMessage());
-	            }
-	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-	        }
-
-	        super.invoke(jobExecutionContext);
-	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
-	        try {
-				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-			} catch (RegistryException e) {
-				throw new GFacHandlerException(e);
-			}
-
-	       
-	    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    @Override
-	public void initProperties(Properties properties) throws GFacHandlerException {
-		// TODO Auto-generated method stub
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
deleted file mode 100644
index a985bd3..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *
- * 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.ssh.handler;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-
-public class SSHDirectorySetupHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(SSHDirectorySetupHandler.class);
-
-	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACSSHUtils.addSecurityContext(jobExecutionContext);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage());
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
- 				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
- 			} catch (GFacException e1) {
- 				 log.error(e1.getLocalizedMessage());
- 			}
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        } 
-
-        log.info("Setup SSH job directorties");
-        super.invoke(jobExecutionContext);
-        makeDirectory(jobExecutionContext);
-
-	}
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    private void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-		Cluster cluster = null;
-		try{
-            String hostAddress = jobExecutionContext.getHostName();
-            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-        if (cluster == null) {
-            throw new GFacHandlerException("Security context is not set properly");
-        } else {
-            log.info("Successfully retrieved the Security Context");
-        }
-            String workingDirectory = jobExecutionContext.getWorkingDir();
-            cluster.makeDirectory(workingDirectory);
-            if(!jobExecutionContext.getInputDir().equals(workingDirectory))
-            	cluster.makeDirectory(jobExecutionContext.getInputDir());
-            if(!jobExecutionContext.getOutputDir().equals(workingDirectory))
-            	cluster.makeDirectory(jobExecutionContext.getOutputDir());
-            
-            DataTransferDetails detail = new DataTransferDetails();
-            TransferStatus status = new TransferStatus();
-            status.setTransferState(TransferState.DIRECTORY_SETUP);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("Working directory = " + workingDirectory);
-
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-        } catch (Exception e) {
-			DataTransferDetails detail = new DataTransferDetails();
-            TransferStatus status = new TransferStatus();
-            status.setTransferState(TransferState.FAILED);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("Working directory = " + jobExecutionContext.getWorkingDir());
-            try {
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-            } catch (Exception e1) {
-                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error executing the Handler: " + SSHDirectorySetupHandler.class, e);
-        }
-        
-	}
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
deleted file mode 100644
index b2210a9..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- *
- * 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.ssh.handler;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-public class SSHInputHandler extends AbstractHandler {
-
-    private static final Logger log = LoggerFactory.getLogger(SSHInputHandler.class);
-
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        DataTransferDetails detail = new DataTransferDetails();
-        detail.setTransferDescription("Input Data Staging");
-        TransferStatus status = new TransferStatus();
-        int index = 0;
-        int oldIndex = 0;
-        List<String> oldFiles = new ArrayList<String>();
-        StringBuffer data = new StringBuffer("|");
-        MessageContext inputNew = new MessageContext();
-        Cluster cluster = null;
-        
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                try {
-                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    try {
-                        StringWriter errors = new StringWriter();
-                        e.printStackTrace(new PrintWriter(errors));
-         				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-         			} catch (GFacException e1) {
-         				 log.error(e1.getLocalizedMessage());
-         			}
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-
-            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                throw new GFacException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-            log.info("Invoking SCPInputHandler");
-            super.invoke(jobExecutionContext);
-
-
-            MessageContext input = jobExecutionContext.getInMessageContext();
-            Set<String> parameters = input.getParameters().keySet();
-            for (String paramName : parameters) {
-                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
-                String paramValue = inputParamType.getValue();
-                //TODO: Review this with type
-                if (inputParamType.getType() == DataType.URI) {
-                    if (index < oldIndex) {
-                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-                        inputParamType.setValue(oldFiles.get(index));
-                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
-                    } else {
-                        String stageInputFile = stageInputFiles(cluster, jobExecutionContext, paramValue);
-                        inputParamType.setValue(stageInputFile);
-                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
-                        status.setTransferState(TransferState.UPLOAD);
-                        detail.setTransferStatus(status);
-                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                    }
-                }// FIXME: what is the thrift model DataType equivalent for URIArray type?
-//                else if ("URIArray".equals(actualParameter.getType().getType().toString())) {
-//                	if (index < oldIndex) {
-//                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-//                        ((URIParameterType) actualParameter.getType()).setValue(oldFiles.get(index));
-//                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
-//                    }else{
-//                	List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
-//                    List<String> newFiles = new ArrayList<String>();
-//                    for (String paramValueEach : split) {
-//                        String stageInputFiles = stageInputFiles(cluster,jobExecutionContext, paramValueEach);
-//                        status.setTransferState(TransferState.UPLOAD);
-//                        detail.setTransferStatus(status);
-//                        detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
-//                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-//                        newFiles.add(stageInputFiles);
-//                        StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
-//                        GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-//                    }
-//                    ((URIArrayType) actualParameter.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
-//                    }
-//                }
-                inputNew.getParameters().put(paramName, inputParamType);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage());
-            status.setTransferState(TransferState.FAILED);
-            detail.setTransferStatus(status);
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            } catch (Exception e1) {
-                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-        }
-        jobExecutionContext.setInMessageContext(inputNew);
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
-        int i = paramValue.lastIndexOf(File.separator);
-        String substring = paramValue.substring(i + 1);
-        try {
-            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
-            if(paramValue.startsWith("scp:")){
-            	paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
-            	cluster.scpThirdParty(paramValue, targetFile);
-            }else{
-            if(paramValue.startsWith("file")){
-                paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
-            }
-            boolean success = false;
-            int j = 1;
-            while(!success){
-            try {
-				cluster.scpTo(targetFile, paramValue);
-				success = true;
-			} catch (Exception e) {
-				log.info(e.getLocalizedMessage());
-				Thread.sleep(2000);
-				 if(j==3) {
-					throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-				 }
-            }
-            j++;
-            }
-            }
-            return targetFile;
-        } catch (Exception e) {
-            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-        }
-    }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
deleted file mode 100644
index f7fd2f4..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- *
- * 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.ssh.handler;
-
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.core.utils.OutputUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TransferState;
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-public class SSHOutputHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(SSHOutputHandler.class);
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        String hostAddress = jobExecutionContext.getHostName();
-        try {
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACSSHUtils.addSecurityContext(jobExecutionContext);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage());
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            } catch (GFacException e1) {
-                log.error(e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        }
-
-        super.invoke(jobExecutionContext);
-        DataTransferDetails detail = new DataTransferDetails();
-        detail.setTransferDescription("Output data staging");
-        TransferStatus status = new TransferStatus();
-
-        Cluster cluster = null;
-        try {
-             cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                throw new GFacProviderException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-
-            // Get the Stdouts and StdErrs
-            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
-
-            TaskDetails taskData = jobExecutionContext.getTaskData();
-            String outputDataDir = ServerSettings.getSetting(Constants.OUTPUT_DATA_DIR, File.separator + "tmp");
-            File localStdOutFile;
-            File localStdErrFile;
-            //FIXME: AdvancedOutput is remote location and third party transfer should work to make this work 
-//            if (taskData.getAdvancedOutputDataHandling() != null) {
-//                outputDataDir = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
-//            }
-            if (outputDataDir == null) {
-                outputDataDir = File.separator + "tmp";
-            }
-            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
-            (new File(outputDataDir)).mkdirs();
-
-
-            localStdOutFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stdout");
-            localStdErrFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stderr");
-//            cluster.makeDirectory(outputDataDir);
-            int i = 0;
-            String stdOutStr = "";
-            while (stdOutStr.isEmpty()) {
-                try {
-                    cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
-                    stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
-                } catch (Exception e) {
-                    log.error(e.getLocalizedMessage());
-                    Thread.sleep(2000);
-                }
-                i++;
-                if (i == 3) break;
-            }
-            Thread.sleep(1000);
-            cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
-            Thread.sleep(1000);
-
-            String stdErrStr = GFacUtils.readFileToString(localStdErrFile.getAbsolutePath());
-            status.setTransferState(TransferState.STDOUT_DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-            status.setTransferState(TransferState.STDERROR_DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-
-            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
-            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
-            Set<String> keys = output.keySet();
-            for (String paramName : keys) {
-                OutputDataObjectType actualParameter = (OutputDataObjectType) output.get(paramName);
-                if (DataType.URI == actualParameter.getType()) {
-                    List<String> outputList = null;
-                    int retry = 3;
-                    while (retry > 0) {
-                        outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
-                        if (outputList.size() > 0) {
-                            break;
-                        }
-                        retry--;
-                        Thread.sleep(2000);
-                    }
-
-                    if (outputList.size() == 0 || outputList.get(0).isEmpty() || outputList.size() > 1) {
-                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-                        Set<String> strings = output.keySet();
-                        outputArray.clear();
-                        for (String key : strings) {
-                            OutputDataObjectType actualParameter1 = (OutputDataObjectType) output.get(key);
-                            if (DataType.URI == actualParameter1.getType()) {
-                                String downloadFile = actualParameter1.getValue();
-                                cluster.scpFrom(downloadFile, outputDataDir);
-                                String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
-                                String localFile = outputDataDir + File.separator + fileName;
-                                jobExecutionContext.addOutputFile(localFile);
-                                actualParameter1.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.URI);
-                                outputArray.add(dataObjectType);
-                            }else if (DataType.STDOUT == actualParameter.getType()) {
-                                String fileName = localStdOutFile.getName();
-                                String localFile = outputDataDir + File.separator + fileName;
-                                jobExecutionContext.addOutputFile(localFile);
-                                actualParameter.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.STDOUT);
-                                outputArray.add(dataObjectType);
-                            }else if (DataType.STDERR == actualParameter.getType()) {
-                                String fileName = localStdErrFile.getName();
-                                String localFile = outputDataDir + File.separator + fileName;
-                                jobExecutionContext.addOutputFile(localFile);
-                                actualParameter.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.STDERR);
-                                outputArray.add(dataObjectType);
-                            }
-                        }
-                        break;
-                    } else if (outputList.size() == 1) {//FIXME: Ultrascan case
-                        String valueList = outputList.get(0);
-                        cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
-                        String outputPath = outputDataDir + File.separator + valueList;
-                        jobExecutionContext.addOutputFile(outputPath);
-                        actualParameter.setValue(outputPath);
-                        OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                        dataObjectType.setValue(outputPath);
-                        dataObjectType.setName(paramName);
-                        dataObjectType.setType(DataType.URI);
-                        outputArray.add(dataObjectType);
-                    }
-                } else {
-                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-                }
-            }
-            if (outputArray == null || outputArray.isEmpty()) {
-                log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
-                if (jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null) {
-                    throw new GFacHandlerException(
-                            "Empty Output returned from the Application, Double check the application"
-                                    + "and ApplicationDescriptor output Parameter Names");
-                }
-            }
-            jobExecutionContext.setStandardError(localStdErrFile.getAbsolutePath());
-            jobExecutionContext.setStandardOutput(localStdOutFile.getAbsolutePath());
-            jobExecutionContext.setOutputDir(outputDataDir);
-            status.setTransferState(TransferState.DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription(outputDataDir);
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-
-        } catch (Exception e) {
-            try {
-                status.setTransferState(TransferState.FAILED);
-                detail.setTransferStatus(status);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-            } catch (Exception e1) {
-                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error in retrieving results", e);
-        }
-
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
deleted file mode 100644
index cc6cca0..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- *
- * 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.ssh.provider.impl;
-
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.ExecutionMode;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
-import org.apache.airavata.gfac.core.provider.AbstractProvider;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.states.GfacExperimentState;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
-import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.CommandExecutor;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.airavata.gsi.ssh.impl.StandardOutReader;
-import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.xmlbeans.XmlException;
-import org.apache.zookeeper.KeeperException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-
-/**
- * Execute application using remote SSH
- */
-public class SSHProvider extends AbstractProvider {
-    private static final Logger log = LoggerFactory.getLogger(SSHProvider.class);
-    private Cluster cluster;
-    private String jobID = null;
-    private String taskID = null;
-    // we keep gsisshprovider to support qsub submission incase of hpc scenario with ssh
-    private boolean hpcType = false;
-
-    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        try {
-            super.initialize(jobExecutionContext);
-            String hostAddress = jobExecutionContext.getHostName();
-            ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
-            ResourceJobManagerType resourceJobManagerType = resourceJobManager.getResourceJobManagerType();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACSSHUtils.addSecurityContext(jobExecutionContext);
-            }
-            taskID = jobExecutionContext.getTaskData().getTaskID();
-
-            JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
-            if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH && resourceJobManagerType == ResourceJobManagerType.FORK) {
-                jobID = "SSH_" + jobExecutionContext.getHostName() + "_" + Calendar.getInstance().getTimeInMillis();
-                cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-
-                String remoteFile = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
-                details.setJobID(taskID);
-                details.setJobDescription(remoteFile);
-                jobExecutionContext.setJobDetails(details);
-                // FIXME : Why cluster is passed as null
-                JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
-                details.setJobDescription(jobDescriptor.toXML());
-
-                GFacUtils.saveJobStatus(jobExecutionContext, details, JobState.SETUP);
-                log.info(remoteFile);
-                File runscript = createShellScript(jobExecutionContext);
-                cluster.scpTo(remoteFile, runscript.getAbsolutePath());
-            } else {
-                hpcType = true;
-            }
-        } catch (ApplicationSettingsException e) {
-            log.error(e.getMessage());
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        } catch (Exception e) {
-            throw new GFacProviderException(e.getLocalizedMessage(), e);
-        }
-    }
-
-
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        if (!hpcType) {
-            try {
-                /*
-                 * Execute
-                 */
-                String executable = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
-                details.setJobDescription(executable);
-                RawCommandInfo rawCommandInfo = new RawCommandInfo("/bin/chmod 755 " + executable + "; " + executable);
-                StandardOutReader jobIDReaderCommandOutput = new StandardOutReader();
-                log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-                CommandExecutor.executeCommand(rawCommandInfo, cluster.getSession(), jobIDReaderCommandOutput);
-                String stdOutputString = getOutputifAvailable(jobIDReaderCommandOutput, "Error submitting job to resource");
-                log.info("stdout=" + stdOutputString);
-            } catch (Exception e) {
-                throw new GFacProviderException(e.getMessage(), e);
-            }
-        } else {
-            try {
-                StringBuffer data = new StringBuffer();
-                jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-                JobDetails jobDetails = new JobDetails();
-                String hostAddress = jobExecutionContext.getHostName();
-                MonitorPublisher monitorPublisher = jobExecutionContext.getMonitorPublisher();
-                try {
-                    Cluster cluster = null;
-                    if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                        GFACSSHUtils.addSecurityContext(jobExecutionContext);
-                    }
-                    cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-                    if (cluster == null) {
-                        throw new GFacProviderException("Security context is not set properly");
-                    } else {
-                        log.info("Successfully retrieved the Security Context");
-                    }
-                    // This installed path is a mandetory field, because this could change based on the computing resource
-                    JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
-                    jobDetails.setJobName(jobDescriptor.getJobName());
-                    log.info(jobDescriptor.toXML());
-                    jobDetails.setJobDescription(jobDescriptor.toXML());
-                    String jobID = cluster.submitBatchJob(jobDescriptor);
-                    if (jobID != null && !jobID.isEmpty()) {
-                        jobDetails.setJobID(jobID);
-                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
-                                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                                        , GfacExperimentState.JOBSUBMITTED));
-                        jobExecutionContext.setJobDetails(jobDetails);
-                        if (verifyJobSubmissionByJobId(cluster, jobID)) {
-                            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                                    , GfacExperimentState.JOBSUBMITTED));
-                            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
-                        }
-                    } else {
-                        jobExecutionContext.setJobDetails(jobDetails);
-                        String verifyJobId = verifyJobSubmission(cluster, jobDetails);
-                        if (verifyJobId != null && !verifyJobId.isEmpty()) {
-                            // JobStatus either changed from SUBMITTED to QUEUED or directly to QUEUED
-                            jobID = verifyJobId;
-                            jobDetails.setJobID(jobID);
-                            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                                    , GfacExperimentState.JOBSUBMITTED));
-                            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
-                        }
-                    }
-
-                    if (jobID == null || jobID.isEmpty()) {
-                        log.error("Couldn't find remote jobId for JobName:" + jobDetails.getJobName() + ", ExperimentId:" + jobExecutionContext.getExperimentID());
-                        GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
-                        return;
-                    }
-                    data.append("jobDesc=").append(jobDescriptor.toXML());
-                    data.append(",jobId=").append(jobDetails.getJobID());
-                    monitor(jobExecutionContext);
-                } catch (SSHApiException e) {
-                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-                    log.error(error);
-                    jobDetails.setJobID("none");
-                    GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-                    GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                    throw new GFacProviderException(error, e);
-                } catch (Exception e) {
-                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-                    log.error(error);
-                    jobDetails.setJobID("none");
-                    GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-                    GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                    throw new GFacProviderException(error, e);
-                } finally {
-                    log.info("Saving data for future recovery: ");
-                    log.info(data.toString());
-                    GFacUtils.saveHandlerData(jobExecutionContext, data, this.getClass().getName());
-                }
-            } catch (GFacException e) {
-                throw new GFacProviderException(e.getMessage(), e);
-            }
-        }
-    }
-
-    private boolean verifyJobSubmissionByJobId(Cluster cluster, String jobID) throws SSHApiException {
-        JobStatus status = cluster.getJobStatus(jobID);
-        return status != null &&  status != JobStatus.U;
-    }
-
-    private String verifyJobSubmission(Cluster cluster, JobDetails jobDetails) {
-        String jobName = jobDetails.getJobName();
-        String jobId = null;
-        try {
-          jobId  = cluster.getJobIdByJobName(jobName, cluster.getServerInfo().getUserName());
-        } catch (SSHApiException e) {
-            log.error("Error while verifying JobId from JobName");
-        }
-        return jobId;
-    }
-
-    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-
-    }
-
-    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        JobDetails jobDetails = jobExecutionContext.getJobDetails();
-        StringBuffer data = new StringBuffer();
-        String hostAddress = jobExecutionContext.getHostName();
-        if (!hpcType) {
-            throw new NotImplementedException();
-        } else {
-            Cluster cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                throw new GFacProviderException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-            // This installed path is a mandetory field, because this could change based on the computing resource
-            if (jobDetails == null) {
-                log.error("There is not JobDetails, Cancel request can't be performed !!!");
-                return false;
-            }
-            try {
-                if (jobDetails.getJobID() != null) {
-                    if (cluster.cancelJob(jobDetails.getJobID()) != null) {
-                        // if this operation success without any exceptions, we can assume cancel operation succeeded.
-                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
-                        return true;
-                    } else {
-                        log.info("Job Cancel operation failed");
-                    }
-                } else {
-                    log.error("No Job Id is set, so cannot perform the cancel operation !!!");
-                    throw new GFacProviderException("Cancel request failed to cancel job as JobId is null in Job Execution Context");
-                }
-            } catch (SSHApiException e) {
-                String error = "Cancel request failed " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-                log.error(error);
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-//                throw new GFacProviderException(error, e);
-            } catch (Exception e) {
-                String error = "Cancel request failed " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-                log.error(error);
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-//                throw new GFacProviderException(error, e);
-            }
-            return false;
-        }
-    }
-
-    private File createShellScript(JobExecutionContext context) throws IOException {
-        String uniqueDir = jobExecutionContext.getApplicationName() + System.currentTimeMillis()
-                + new Random().nextLong();
-
-        File shellScript = File.createTempFile(uniqueDir, "sh");
-        OutputStream out = new FileOutputStream(shellScript);
-
-        out.write("#!/bin/bash\n".getBytes());
-        out.write(("cd " + jobExecutionContext.getWorkingDir() + "\n").getBytes());
-        out.write(("export " + Constants.INPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getInputDir() + "\n").getBytes());
-        out.write(("export " + Constants.OUTPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getOutputDir() + "\n")
-                .getBytes());
-        // get the env of the host and the application
-        List<SetEnvPaths> envPathList = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getSetEnvironment();
-        for (SetEnvPaths setEnvPaths : envPathList) {
-            log.debug("Env[" + setEnvPaths.getName() + "] = " + setEnvPaths.getValue());
-            out.write(("export " + setEnvPaths.getName() + "=" + setEnvPaths.getValue() + "\n").getBytes());
-        }
-
-        // prepare the command
-        final String SPACE = " ";
-        StringBuffer cmd = new StringBuffer();
-        cmd.append(jobExecutionContext.getExecutablePath());
-        cmd.append(SPACE);
-
-        MessageContext input = context.getInMessageContext();
-        Map<String, Object> inputs = input.getParameters();
-        Set<String> keys = inputs.keySet();
-        for (String paramName : keys) {
-            InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
-            //if ("URIArray".equals(actualParameter.getType().getType().toString())) {
-            if (inputParamType.getType() == DataType.URI) {
-                String value = inputParamType.getValue();
-                cmd.append(value);
-                cmd.append(SPACE);
-            } else {
-                String paramValue = inputParamType.getValue();
-                cmd.append(paramValue);
-                cmd.append(SPACE);
-            }
-        }
-        // We redirect the error and stdout to remote files, they will be read
-        // in later
-        cmd.append(SPACE);
-        cmd.append("1>");
-        cmd.append(SPACE);
-        cmd.append(jobExecutionContext.getStandardOutput());
-        cmd.append(SPACE);
-        cmd.append("2>");
-        cmd.append(SPACE);
-        cmd.append(jobExecutionContext.getStandardError());
-
-        String cmdStr = cmd.toString();
-        log.info("Command = " + cmdStr);
-        out.write((cmdStr + "\n").getBytes());
-        String message = "\"execuationSuceeded\"";
-        out.write(("echo " + message + "\n").getBytes());
-        out.close();
-
-        return shellScript;
-    }
-
-    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
-
-    }
-
-    /**
-     * This method will read standard output and if there's any it will be parsed
-     *
-     * @param jobIDReaderCommandOutput
-     * @param errorMsg
-     * @return
-     * @throws SSHApiException
-     */
-    private String getOutputifAvailable(StandardOutReader jobIDReaderCommandOutput, String errorMsg) throws SSHApiException {
-        String stdOutputString = jobIDReaderCommandOutput.getStdOutputString();
-        String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
-
-        if (stdOutputString == null || stdOutputString.isEmpty() || (stdErrorString != null && !stdErrorString.isEmpty())) {
-            log.error("Standard Error output : " + stdErrorString);
-            throw new SSHApiException(errorMsg + stdErrorString);
-        }
-        return stdOutputString;
-    }
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        // have to implement the logic to recover a gfac failure
-        initialize(jobExecutionContext);
-        if(hpcType) {
-            log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
-            String hostName = jobExecutionContext.getHostName();
-            String jobId = "";
-            String jobDesc = "";
-            String jobName = "";
-            try {
-                String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
-                String[] split = pluginData.split(",");
-                if (split.length < 2) {
-                    this.execute(jobExecutionContext);
-                    return;
-                }
-                jobDesc = split[0].substring(8);
-                jobId = split[1].substring(6);
-                try {
-                    JobDescriptor jobDescriptor = JobDescriptor.fromXML(jobDesc);
-                    jobName = jobDescriptor.getJobName();
-                } catch (XmlException e) {
-                    log.error(e.getMessage(), e);
-                    log.error("Cannot parse plugin data stored, but trying to recover");
-
-                }
-                log.info("Following data have recovered: ");
-                log.info("Job Description: " + jobDesc);
-                log.info("Job Id: " + jobId);
-                if (jobName.isEmpty() || jobId.isEmpty() || "none".equals(jobId) ||
-                        "".equals(jobId)) {
-                    log.info("Cannot recover data so submitting the job again !!!");
-                    this.execute(jobExecutionContext);
-                    return;
-                }
-            } catch (Exception e) {
-                log.error("Error while  recovering provider", e);
-            }
-            try {
-                // Now we are we have enough data to recover
-                JobDetails jobDetails = new JobDetails();
-                jobDetails.setJobDescription(jobDesc);
-                jobDetails.setJobID(jobId);
-                jobDetails.setJobName(jobName);
-                jobExecutionContext.setJobDetails(jobDetails);
-                if (jobExecutionContext.getSecurityContext(hostName) == null) {
-                    try {
-                        GFACSSHUtils.addSecurityContext(jobExecutionContext);
-                    } catch (ApplicationSettingsException e) {
-                        log.error(e.getMessage());
-                        throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                    }
-                }
-                monitor(jobExecutionContext);
-            } catch (Exception e) {
-                log.error("Error while recover the job", e);
-                throw new GFacProviderException("Error delegating already ran job to Monitoring", e);
-            }
-        }else{
-            log.info("We do not handle non hpc recovery so we simply run the Job directly");
-            this.execute(jobExecutionContext);
-        }
-    }
-
-    @Override
-    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
-            String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
-            SSHJobSubmission sshJobSubmission = null;
-            try {
-                sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
-            } catch (AppCatalogException e) {
-                throw new GFacException("Error while reading compute resource", e);
-            }
-            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR) {
-                try {
-                    EmailBasedMonitor emailBasedMonitor = EmailMonitorFactory.getEmailBasedMonitor(
-                            sshJobSubmission.getResourceJobManager().getResourceJobManagerType());
-                    emailBasedMonitor.addToJobMonitorMap(jobExecutionContext);
-                } catch (AiravataException e) {
-                    throw new GFacHandlerException("Error while activating email job monitoring ", e);
-                }
-                return;
-            }
-        } else {
-            throw new IllegalArgumentException("Monitoring is implemented only for SSH, "
-                    + jobExecutionContext.getPreferredJobSubmissionProtocol().name() + " is not yet implemented");
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
deleted file mode 100644
index c406c41..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- * 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.ssh.security;
-
-import java.io.IOException;
-
-import net.schmizz.sshj.SSHClient;
-import net.schmizz.sshj.connection.channel.direct.Session;
-import net.schmizz.sshj.userauth.keyprovider.KeyProvider;
-
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Handle SSH security
- */
-public class SSHSecurityContext implements SecurityContext {
-	private static final Logger log = LoggerFactory.getLogger(SSHSecurityContext.class);
-
-	private String username;
-	private String privateKeyLoc;
-	private String keyPass;
-	private SSHClient sshClient;
-	private Session session;
-
-    private Cluster pbsCluster;
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPrivateKeyLoc() {
-		return privateKeyLoc;
-	}
-
-	public void setPrivateKeyLoc(String privateKeyLoc) {
-		this.privateKeyLoc = privateKeyLoc;
-	}
-
-	public String getKeyPass() {
-		return keyPass;
-	}
-
-	public void setKeyPass(String keyPass) {
-		this.keyPass = keyPass;
-	}
-
-	public void closeSession(Session session) {
-		if (session != null) {
-			try {
-				session.close();
-			} catch (Exception e) {
-				log.warn("Cannot Close SSH Session");
-			}
-		}
-	}
-
-	public Session getSession(String hostAddress) throws IOException {
-		try {
-			if (sshClient == null) {
-				sshClient = new SSHClient();
-			}
-			if (getSSHClient().isConnected())
-				return getSSHClient().startSession();
-
-			KeyProvider pkey = getSSHClient().loadKeys(getPrivateKeyLoc(), getKeyPass());
-
-			getSSHClient().loadKnownHosts();
-
-			getSSHClient().connect(hostAddress);
-			getSSHClient().authPublickey(getUsername(), pkey);
-			session = getSSHClient().startSession();
-			return session;
-
-		} catch (NullPointerException ne) {
-			throw new SecurityException("Cannot load security context for SSH", ne);
-		}
-	}
-
-	public SSHClient getSSHClient() {
-		if (sshClient == null) {
-			sshClient = new SSHClient();
-		}
-		return sshClient;
-	}
-
-    public void setPbsCluster(Cluster pbsCluster) {
-        this.pbsCluster = pbsCluster;
-    }
-
-    public Cluster getPbsCluster() {
-        return this.pbsCluster;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
deleted file mode 100644
index f09a662..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- *
- * 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.ssh.security;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.IOUtil;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.credential.Credential;
-import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPublicKeyFileAuthentication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-import java.util.Properties;
-
-public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication {
-    protected static final Logger log = LoggerFactory.getLogger(TokenizedSSHAuthInfo.class);
-
-    private String publicKeyFile;
-
-    private String privateKeyFile;
-
-    private String passPhrase = null;
-
-    private SSHCredential gssCredentials = null;
-
-    private CredentialReader credentialReader;
-
-    private RequestData requestData;
-
-    public TokenizedSSHAuthInfo(CredentialReader credentialReader, RequestData requestData) {
-        this.credentialReader = credentialReader;
-        this.requestData = requestData;
-    }
-
-    public TokenizedSSHAuthInfo(RequestData requestData) {
-        this.requestData = requestData;
-    }
-
-    public String getPublicKeyFile(String userName, String hostName) {
-        return publicKeyFile;
-    }
-
-    public String getPrivateKeyFile(String userName, String hostName) {
-        return privateKeyFile;
-    }
-
-    public String getPassPhrase() {
-        return passPhrase;
-    }
-
-    public void bannerMessage(String message) {
-
-    }
-
-    public SSHCredential getCredentials() throws SecurityException {
-
-        if (gssCredentials == null) {
-
-            try {
-                gssCredentials = getCredentialsFromStore();
-            } catch (Exception e) {
-                log.error("An exception occurred while retrieving credentials from the credential store. " +
-                        "Will continue with my proxy user name and password. Provided TokenId:" + requestData.getTokenId() + e.getMessage(), e);
-            }
-
-            if (gssCredentials == null) {
-                System.out.println("Authenticating with provided token failed, so falling back to authenticate with defaultCredentials");
-                try {
-                    gssCredentials = getDefaultCredentials();
-                } catch (Exception e) {
-                    throw new SecurityException("Error retrieving my proxy using username password",e.getCause());
-                }
-            }
-            // if still null, throw an exception
-            if (gssCredentials == null) {
-                throw new SecurityException("Unable to retrieve my proxy credentials to continue operation.");
-            }
-        }
-
-        return gssCredentials;
-    }
-
-
-    /**
-     * Reads the credentials from credential store.
-     *
-     * @return If token is found in the credential store, will return a valid credential. Else returns null.
-     * @throws Exception If an error occurred while retrieving credentials.
-     */
-    public SSHCredential getCredentialsFromStore() throws Exception {
-
-        if (getCredentialReader() == null) {
-            credentialReader = GFacUtils.getCredentialReader();
-            if(credentialReader == null){
-            	 return null;
-            }
-        }
-
-        Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
-                getRequestData().getTokenId());
-
-        if (credential instanceof SSHCredential) {
-            SSHCredential credential1 = (SSHCredential) credential;
-            this.publicKeyFile = writeFileToDisk(credential1.getPublicKey());
-            this.privateKeyFile = writeFileToDisk(credential1.getPrivateKey());
-            this.passPhrase = credential1.getPassphrase();
-            System.out.println(this.publicKeyFile);
-            System.out.println(this.privateKeyFile);
-            System.out.println(this.passPhrase);
-            this.getRequestData().setRequestUser(credential1.getPortalUserName());
-            return credential1;
-        } else {
-            log.info("Could not find SSH credentials for token - " + getRequestData().getTokenId() + " and "
-                    + "gateway id - " + getRequestData().getGatewayId());
-        }
-
-        return null;
-    }
-
-    /**
-     * Gets the default proxy certificate.
-     *
-     * @return Default my proxy credentials.
-     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while retrieving credentials.
-     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
-     */
-    public SSHCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException, IOException {
-        Properties configurationProperties = ServerSettings.getProperties();
-        String sshUserName = configurationProperties.getProperty(Constants.SSH_USER_NAME);
-        this.getRequestData().setRequestUser(sshUserName);
-        this.privateKeyFile = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY);
-        this.publicKeyFile = configurationProperties.getProperty(Constants.SSH_PUBLIC_KEY);
-        this.passPhrase = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY_PASS);
-        this.getRequestData().setRequestUser(sshUserName);
-        return new SSHCredential(IOUtil.readToByteArray(new File(this.privateKeyFile)), IOUtil.readToByteArray(new File(this.publicKeyFile)), this.passPhrase, requestData.getGatewayId(), sshUserName);
-    }
-
-    public CredentialReader getCredentialReader() {
-        return credentialReader;
-    }
-
-    public RequestData getRequestData() {
-        return requestData;
-    }
-
-    private String writeFileToDisk(byte[] data) {
-        File temp = null;
-        try {
-            temp = File.createTempFile("id_rsa", "");
-            //write it
-            FileOutputStream bw = new FileOutputStream(temp);
-            bw.write(data);
-            bw.close();
-        } catch (IOException e) {
-            log.error(e.getMessage(), e);
-        }
-        return temp.getAbsolutePath();
-    }
-}


[32/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
deleted file mode 100644
index 2cc375e..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ /dev/null
@@ -1,1158 +0,0 @@
-/*
- *
- * 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.core.cpi;
-
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.Scheduler;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.GFacHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
-import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
-import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
-import org.apache.airavata.gfac.core.provider.GFacProvider;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.states.GfacExperimentState;
-import org.apache.airavata.gfac.core.states.GfacHandlerState;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
-import org.apache.airavata.model.appcatalog.computeresource.FileSystems;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.model.messaging.event.TaskIdentifier;
-import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
-import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.utils.ZKPaths;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
- * the resource, required data for the job has to be stored in registry prior to invoke this object.
- */
-public class BetterGfacImpl implements GFac {
-    private static final Logger log = LoggerFactory.getLogger(BetterGfacImpl.class);
-    private static String ERROR_SENT = "ErrorSent";
-    private Registry registry;
-    private CuratorFramework curatorClient;
-    private MonitorPublisher monitorPublisher;
-    private static GFac gfacInstance;
-    private boolean initialized = false;
-
-    private BetterGfacImpl() {
-
-    }
-
-    public static GFac getInstance() {
-        if (gfacInstance == null) {
-            synchronized (BetterGfacImpl.class) {
-                if (gfacInstance == null) {
-                    gfacInstance = new BetterGfacImpl();
-                }
-            }
-        }
-        return gfacInstance;
-    }
-
-    @Override
-    public boolean init(Registry registry, AppCatalog appCatalog, CuratorFramework curatorClient,
-                        MonitorPublisher publisher) {
-        this.registry = registry;
-        monitorPublisher = publisher;     // This is a EventBus common for gfac
-        this.curatorClient = curatorClient;
-        return initialized = true;
-    }
-
-
-    /**
-     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
-     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
-     *
-     * @param experimentID
-     * @return
-     * @throws GFacException
-     */
-    @Override
-    public boolean submitJob(String experimentID, String taskID, String gatewayID, String tokenId) throws GFacException {
-        if (!initialized) {
-            throw new GFacException("Initialize the Gfac instance before use it");
-        }
-        JobExecutionContext jobExecutionContext = null;
-        try {
-            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-            jobExecutionContext.setCredentialStoreToken(tokenId);
-            return submitJob(jobExecutionContext);
-        } catch (Exception e) {
-            log.error("Error inovoking the job with experiment ID: " + experimentID + ":" + e.getMessage());
-            StringWriter errors = new StringWriter();
-            e.printStackTrace(new PrintWriter(errors));
-            GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            // FIXME: Here we need to update Experiment status to Failed, as we used chained update approach updating
-            // task status will cause to update Experiment status. Remove this chained update approach and fix this correctly (update experiment status)
-            if (jobExecutionContext != null) {
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getGatewayID());
-                TaskStatusChangeRequestEvent event = new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentity);
-                monitorPublisher.publish(event);
-            }
-            throw new GFacException(e);
-        }
-    }
-
-    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
-
-        JobExecutionContext jobExecutionContext;
-
-        /** FIXME:
-         * A temporary wrapper to co-relate the app catalog and experiment thrift models to old gfac schema documents.
-         * The serviceName in ExperimentData and service name in ServiceDescriptor has to be same.
-         * 1. Get the Task from the task ID and construct the Job object and save it in to registry
-         * 2. Add properties of description documents to jobExecutionContext which will be used inside the providers.
-         */
-
-        //Fetch the Task details for the requested experimentID from the registry. Extract required pointers from the Task object.
-        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
-
-        String applicationInterfaceId = taskData.getApplicationId();
-        String applicationDeploymentId = taskData.getApplicationDeploymentId();
-        if (null == applicationInterfaceId) {
-            throw new GFacException("Error executing the job. The required Application Id is missing");
-        }
-        if (null == applicationDeploymentId) {
-            throw new GFacException("Error executing the job. The required Application deployment Id is missing");
-        }
-
-        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-
-        //fetch the compute resource, application interface and deployment information from app catalog
-        ApplicationInterfaceDescription applicationInterface = appCatalog.
-                getApplicationInterface().getApplicationInterface(applicationInterfaceId);
-        ApplicationDeploymentDescription applicationDeployment = appCatalog.
-                getApplicationDeployment().getApplicationDeployement(applicationDeploymentId);
-        ComputeResourceDescription computeResource = appCatalog.getComputeResource().
-                getComputeResource(applicationDeployment.getComputeHostId());
-        ComputeResourcePreference gatewayResourcePreferences = appCatalog.getGatewayProfile().
-                getComputeResourcePreference(gatewayID, applicationDeployment.getComputeHostId());
-        if (gatewayResourcePreferences == null) {
-            List<String> gatewayProfileIds = appCatalog.getGatewayProfile()
-                    .getGatewayProfileIds(gatewayID);
-            for (String profileId : gatewayProfileIds) {
-                gatewayID = profileId;
-                gatewayResourcePreferences = appCatalog.getGatewayProfile().
-                        getComputeResourcePreference(gatewayID, applicationDeployment.getComputeHostId());
-                if (gatewayResourcePreferences != null) {
-                    break;
-                }
-            }
-        }
-
-        URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        Properties configurationProperties = ServerSettings.getProperties();
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), configurationProperties);
-
-        // start constructing jobexecutioncontext
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, applicationInterface.getApplicationName());
-
-        // setting experiment/task/workflownode related information
-        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
-        jobExecutionContext.setExperiment(experiment);
-        jobExecutionContext.setExperimentID(experimentID);
-        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
-        jobExecutionContext.setTaskData(taskData);
-        jobExecutionContext.setGatewayID(gatewayID);
-        jobExecutionContext.setAppCatalog(appCatalog);
-
-
-        List<JobDetails> jobDetailsList = taskData.getJobDetailsList();
-        //FIXME: Following for loop only set last jobDetails element to the jobExecutionContext
-        for (JobDetails jDetails : jobDetailsList) {
-            jobExecutionContext.setJobDetails(jDetails);
-        }
-        // setting the registry
-        jobExecutionContext.setRegistry(registry);
-
-        ApplicationContext applicationContext = new ApplicationContext();
-        applicationContext.setComputeResourceDescription(computeResource);
-        applicationContext.setApplicationDeploymentDescription(applicationDeployment);
-        applicationContext.setApplicationInterfaceDescription(applicationInterface);
-        applicationContext.setComputeResourcePreference(gatewayResourcePreferences);
-        jobExecutionContext.setApplicationContext(applicationContext);
-
-
-//        List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
-//        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInputParamMap(experimentInputs)));
-        List<InputDataObjectType> taskInputs = taskData.getApplicationInputs();
-        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInputParamMap(taskInputs)));
-
-        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
-        jobExecutionContext.setGfac(gfacInstance);
-        jobExecutionContext.setCuratorClient(curatorClient);
-        jobExecutionContext.setMonitorPublisher(monitorPublisher);
-
-        // handle job submission protocol
-        List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
-        if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()) {
-            Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
-                @Override
-                public int compare(JobSubmissionInterface jobSubmissionInterface, JobSubmissionInterface jobSubmissionInterface2) {
-                    return jobSubmissionInterface.getPriorityOrder() - jobSubmissionInterface2.getPriorityOrder();
-                }
-            });
-
-            jobExecutionContext.setHostPrioritizedJobSubmissionInterfaces(jobSubmissionInterfaces);
-        } else {
-            throw new GFacException("Compute resource should have at least one job submission interface defined...");
-        }
-        // handle data movement protocol
-        List<DataMovementInterface> dataMovementInterfaces = computeResource.getDataMovementInterfaces();
-        if (dataMovementInterfaces != null && !dataMovementInterfaces.isEmpty()) {
-            Collections.sort(dataMovementInterfaces, new Comparator<DataMovementInterface>() {
-                @Override
-                public int compare(DataMovementInterface dataMovementInterface, DataMovementInterface dataMovementInterface2) {
-                    return dataMovementInterface.getPriorityOrder() - dataMovementInterface2.getPriorityOrder();
-                }
-            });
-            jobExecutionContext.setHostPrioritizedDataMovementInterfaces(dataMovementInterfaces);
-        }
-
-        // set compute resource configuration as default preferred values, after that replace those with gateway user preferences.
-        populateDefaultComputeResourceConfiguration(jobExecutionContext, applicationInterface, computeResource);
-        populateResourceJobManager(jobExecutionContext);
-        // if gateway resource preference is set
-        if (gatewayResourcePreferences != null) {
-            if (gatewayResourcePreferences.getScratchLocation() == null) {
-                gatewayResourcePreferences.setScratchLocation("/tmp");
-            }
-            setUpWorkingLocation(jobExecutionContext, applicationInterface, gatewayResourcePreferences.getScratchLocation());
-
-            jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
-            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
-                jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
-                jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
-            } else {
-                for (JobSubmissionInterface jobSubmissionInterface : jobSubmissionInterfaces) {
-                    if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == jobSubmissionInterface.getJobSubmissionProtocol()) {
-                        jobExecutionContext.setPreferredJobSubmissionInterface(jobSubmissionInterface);
-                        break;
-                    }
-                }
-            }
-
-            if (gatewayResourcePreferences.getLoginUserName() != null) {
-                jobExecutionContext.setLoginUserName(gatewayResourcePreferences.getLoginUserName());
-            }
-
-            // set gatewayUserPreferred data movement protocol and interface
-            jobExecutionContext.setPreferredDataMovementProtocol(gatewayResourcePreferences.getPreferredDataMovementProtocol());
-            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
-                jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
-                jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
-            } else {
-                // this check is to avoid NPE when job submission endpoints do
-                // not contain any data movement interfaces.
-                if ((dataMovementInterfaces != null) && (!dataMovementInterfaces.isEmpty())) {
-                    for (DataMovementInterface dataMovementInterface : dataMovementInterfaces) {
-                        if (gatewayResourcePreferences.getPreferredDataMovementProtocol() == dataMovementInterface.getDataMovementProtocol()) {
-                            jobExecutionContext.setPreferredDataMovementInterface(dataMovementInterface);
-                            break;
-                        }
-                    }
-                }
-            }
-        } else {
-            setUpWorkingLocation(jobExecutionContext, applicationInterface, "/tmp");
-        }
-        List<OutputDataObjectType> taskOutputs = taskData.getApplicationOutputs();
-        if (taskOutputs == null || taskOutputs.isEmpty()) {
-            taskOutputs = applicationInterface.getApplicationOutputs();
-        }
-
-        for (OutputDataObjectType objectType : taskOutputs) {
-            if (objectType.getType() == DataType.URI && objectType.getValue() != null) {
-                String filePath = objectType.getValue();
-                // if output is not in working folder
-                if (objectType.getLocation() != null && !objectType.getLocation().isEmpty()) {
-                    if (objectType.getLocation().startsWith(File.separator)) {
-                        filePath = objectType.getLocation() + File.separator + filePath;
-                    } else {
-                        filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation() + File.separator + filePath;
-                    }
-                } else {
-                    filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
-                }
-                objectType.setValue(filePath);
-
-            }
-            if (objectType.getType() == DataType.STDOUT) {
-                objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + jobExecutionContext.getApplicationName() + ".stdout");
-            }
-            if (objectType.getType() == DataType.STDERR) {
-                objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + jobExecutionContext.getApplicationName() + ".stderr");
-            }
-        }
-        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getOuputParamMap(taskOutputs)));
-        return jobExecutionContext;
-    }
-
-    private void setUpWorkingLocation(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, String scratchLocation) {
-        /**
-         * Scratch location
-         */
-        jobExecutionContext.setScratchLocation(scratchLocation);
-
-        /**
-         * Working dir
-         */
-        String workingDir = scratchLocation + File.separator + jobExecutionContext.getExperimentID();
-        jobExecutionContext.setWorkingDir(workingDir);
-
-            /*
-            * Input and Output Directory
-            */
-//        jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
-        jobExecutionContext.setInputDir(workingDir);
-//        jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
-        jobExecutionContext.setOutputDir(workingDir);
-
-            /*
-            * Stdout and Stderr for Shell
-            */
-        jobExecutionContext.setStandardOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
-        jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
-    }
-
-    private void populateDefaultComputeResourceConfiguration(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, ComputeResourceDescription computeResource) {
-        Map<FileSystems, String> fileSystems = computeResource.getFileSystems();
-        String scratchLocation = fileSystems.get(FileSystems.SCRATCH);
-        if (scratchLocation != null) {
-            setUpWorkingLocation(jobExecutionContext, applicationInterface, scratchLocation);
-        }
-
-        jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
-        jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
-
-        if (jobExecutionContext.getHostPrioritizedDataMovementInterfaces() != null) {
-            jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
-            jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
-        }
-    }
-
-    private void populateResourceJobManager(JobExecutionContext jobExecutionContext) {
-        try {
-            JobSubmissionProtocol submissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
-            JobSubmissionInterface jobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
-            if (submissionProtocol == JobSubmissionProtocol.SSH) {
-                SSHJobSubmission sshJobSubmission = GFacUtils.getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-                if (sshJobSubmission != null) {
-                    jobExecutionContext.setResourceJobManager(sshJobSubmission.getResourceJobManager());
-                }
-            } else if (submissionProtocol == JobSubmissionProtocol.LOCAL) {
-                LOCALSubmission localJobSubmission = GFacUtils.getLocalJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-                if (localJobSubmission != null) {
-                    jobExecutionContext.setResourceJobManager(localJobSubmission.getResourceJobManager());
-                }
-            }
-        } catch (AppCatalogException e) {
-            log.error("Error occured while retrieving job submission interface", e);
-        }
-    }
-
-    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
-        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-        // we need to setup workflow tracking listerner.
-        try {
-            GfacExperimentState gfacExpState = GFacUtils.getZKExperimentState(curatorClient, jobExecutionContext);   // this is the original state came, if we query again it might be different,so we preserve this state in the environment
-            // Register log event listener. This is required in all scenarios.
-            if (isNewJob(gfacExpState)) {
-                // In this scenario We do everything from the beginning
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                        , GfacExperimentState.ACCEPTED));                  // immediately we get the request we update the status
-                launch(jobExecutionContext);
-            } else if (isCompletedJob(gfacExpState)) {
-                log.info("There is nothing to recover in this job so we do not re-submit");
-                ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(),
-                        AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID()), true);
-            } else {
-                // Now we know this is an old Job, so we have to handle things gracefully
-                log.info("Re-launching the job in GFac because this is re-submitted to GFac");
-                reLaunch(jobExecutionContext, gfacExpState);
-            }
-            return true;
-        } catch (Exception e) {
-            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            throw new GFacException("Error launching the Job", e);
-        }
-    }
-
-    private boolean isCompletedJob(GfacExperimentState gfacExpState) {
-        switch (gfacExpState) {
-            case COMPLETED:
-            case FAILED:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    private boolean isNewJob(GfacExperimentState stateVal) {
-        switch (stateVal) {
-            case UNKNOWN:
-            case LAUNCHED:
-            case ACCEPTED:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    @Override
-    public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId) throws GFacException {
-        if (!initialized) {
-            throw new GFacException("Initialize the Gfac instance before use it");
-        }
-        JobExecutionContext jobExecutionContext = null;
-        try {
-            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-            jobExecutionContext.setCredentialStoreToken(tokenId);
-            return cancel(jobExecutionContext);
-        } catch (Exception e) {
-            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            log.error("Error cancelling the job with experiment ID: " + experimentID);
-            throw new GFacException(e);
-        }
-    }
-
-    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            GfacExperimentState gfacExpState = GFacUtils.getZKExperimentState(curatorClient, jobExecutionContext);   // this is the original state came, if we query again it might be different,so we preserve this state in the environment
-            String workflowInstanceID = null;
-            if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-                //todo implement WorkflowTrackingListener properly
-            }
-            // Register log event listener. This is required in all scenarios.
-            jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-
-            if (gfacExpState == GfacExperimentState.PROVIDERINVOKING || gfacExpState == GfacExperimentState.JOBSUBMITTED
-                    || gfacExpState == GfacExperimentState.PROVIDERINVOKED) { // we already have changed registry status, we need to handle job canceling scenario.
-                log.info("Job is in a position to perform a proper cancellation");
-                try {
-                    Scheduler.schedule(jobExecutionContext);
-                    invokeProviderCancel(jobExecutionContext);
-                } catch (GFacException e) {
-                    // we make the experiment as failed due to exception scenario
-                    monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
-                    jobExecutionContext.setProperty(ERROR_SENT, "true");
-                    jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-                    throw new GFacException(e.getMessage(), e);
-                }
-            }
-//            else if (gfacExpState == GfacExperimentState.INHANDLERSINVOKING || gfacExpState == GfacExperimentState.INHANDLERSINVOKED || gfacExpState == GfacExperimentState.OUTHANDLERSINVOKING){
-//                log.info("Experiment should be immedietly cancelled");
-//                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.CANCELED);
-//
-//            }
-            return true;
-        } catch (Exception e) {
-            log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentID(), e);
-            throw new GFacException(e.getMessage(), e);
-        }
-    }
-
-    private void reLaunch(JobExecutionContext jobExecutionContext, GfacExperimentState state) throws GFacException {
-        // Scheduler will decide the execution flow of handlers and provider
-        // which handles
-        // the job.
-        String experimentID = jobExecutionContext.getExperimentID();
-        try {
-            Scheduler.schedule(jobExecutionContext);
-
-            // Executing in handlers in the order as they have configured in
-            // GFac configuration
-            // here we do not skip handler if some handler does not have to be
-            // run again during re-run it can implement
-            // that logic in to the handler
-
-            // After executing the in handlers provider instance should be set
-            // to job execution context.
-            // We get the provider instance and execute it.
-            switch (state) {
-                case INHANDLERSINVOKING:
-                    reInvokeInFlowHandlers(jobExecutionContext);
-                case INHANDLERSINVOKED:
-                    invokeProviderExecute(jobExecutionContext);
-                    break;
-                case PROVIDERINVOKING:
-                    reInvokeProviderExecute(jobExecutionContext, true);
-                    break;
-                case JOBSUBMITTED:
-                    reInvokeProviderExecute(jobExecutionContext, false);
-                case PROVIDERINVOKED:
-                    // no need to re-run the job
-                    log.info("Provider does not have to be recovered because it ran successfully for experiment: " + experimentID);
-                    if (!GFacUtils.isSynchronousMode(jobExecutionContext)) {
-                        monitorJob(jobExecutionContext);
-                    } else {
-                        // TODO - Need to handle this correctly , for now we will invoke ouput handlers.
-                        invokeOutFlowHandlers(jobExecutionContext);
-                    }
-                    break;
-                case OUTHANDLERSINVOKING:
-                    reInvokeOutFlowHandlers(jobExecutionContext);
-                    break;
-                case OUTHANDLERSINVOKED:
-                case COMPLETED:
-                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.COMPLETED);
-                    break;
-                case FAILED:
-                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
-                    break;
-                case UNKNOWN:
-                    log.info("All output handlers are invoked successfully, ExperimentId: " + experimentID + " taskId: " + jobExecutionContext.getTaskData().getTaskID());
-                    break;
-                default:
-                    throw new GFacException("Un-handled GfacExperimentState : " + state.name());
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            try {
-                // we make the experiment as failed due to exception scenario
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
-                JobIdentifier jobIdentity = new JobIdentifier(
-                        jobExecutionContext.getJobDetails().getJobID(), jobExecutionContext.getTaskData().getTaskID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getGatewayID());
-                monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
-                GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            } catch (NullPointerException e1) {
-                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
-                        + "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getGatewayID());
-                monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
-                GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-
-            }
-            jobExecutionContext.setProperty(ERROR_SENT, "true");
-            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-            throw new GFacException(e.getMessage(), e);
-        }
-    }
-
-    private void monitorJob(JobExecutionContext jobExecutionContext) throws GFacException, GFacProviderException {
-        GFacProvider provider = jobExecutionContext.getProvider();
-        if (provider != null) {
-            provider.monitor(jobExecutionContext);
-        }
-        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
-            invokeOutFlowHandlers(jobExecutionContext);
-        }
-
-    }
-
-    private void launch(JobExecutionContext jobExecutionContext) throws GFacException {
-        // Scheduler will decide the execution flow of handlers and provider
-        // which handles
-        // the job.
-        try {
-            Scheduler.schedule(jobExecutionContext);
-
-            // Executing in handlers in the order as they have configured in
-            // GFac configuration
-            // here we do not skip handler if some handler does not have to be
-            // run again during re-run it can implement
-            // that logic in to the handler
-            if (!isCancelling(jobExecutionContext)) {
-                invokeInFlowHandlers(jobExecutionContext); // to keep the
-                // consistency we always
-                // try to re-run to
-                // avoid complexity
-            } else {
-                log.info("Experiment is cancelled, so launch operation is stopping immediately");
-                GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
-                return; // if the job is cancelled, status change is handled in cancel operation this thread simply has to be returned
-            }
-            // if (experimentID != null){
-            // registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
-            // }
-
-            // After executing the in handlers provider instance should be set
-            // to job execution context.
-            // We get the provider instance and execute it.
-            if (!isCancelling(jobExecutionContext)) {
-                invokeProviderExecute(jobExecutionContext);
-            } else {
-                log.info("Experiment is cancelled, so launch operation is stopping immediately");
-                GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
-                return;
-            }
-        } catch (Exception e) {
-            try {
-                // we make the experiment as failed due to exception scenario
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
-                // monitorPublisher.publish(new
-                // ExperimentStatusChangedEvent(new
-                // ExperimentIdentity(jobExecutionContext.getExperimentID()),
-                // ExperimentState.FAILED));
-                // Updating the task status if there's any task associated
-                // monitorPublisher.publish(new TaskStatusChangeRequest(
-                // new TaskIdentity(jobExecutionContext.getExperimentID(),
-                // jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                // jobExecutionContext.getTaskData().getTaskID()),
-                // TaskState.FAILED
-                // ));
-                JobIdentifier jobIdentity = new JobIdentifier(
-                        jobExecutionContext.getJobDetails().getJobID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getGatewayID());
-                monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
-            } catch (NullPointerException e1) {
-                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
-                        + "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-                //monitorPublisher.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-                // Updating the task status if there's any task associated
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getGatewayID());
-                monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
-
-            }
-            jobExecutionContext.setProperty(ERROR_SENT, "true");
-            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-            throw new GFacException(e.getMessage(), e);
-        }
-    }
-
-    private void invokeProviderExecute(JobExecutionContext jobExecutionContext) throws Exception {
-        GFacProvider provider = jobExecutionContext.getProvider();
-        if (provider != null) {
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
-            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
-            initProvider(provider, jobExecutionContext);
-            executeProvider(provider, jobExecutionContext);
-            disposeProvider(provider, jobExecutionContext);
-            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
-        }
-        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
-            invokeOutFlowHandlers(jobExecutionContext);
-        }
-    }
-
-    private void reInvokeProviderExecute(JobExecutionContext jobExecutionContext, boolean submit) throws Exception {
-        GFacProvider provider = jobExecutionContext.getProvider();
-        if (provider != null) {
-            if (submit) {
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
-                GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName());
-                GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
-                if (plState != null && plState == GfacHandlerState.INVOKING) {    // this will make sure if a plugin crashes it will not launch from the scratch, but plugins have to save their invoked state
-                    initProvider(provider, jobExecutionContext);
-                    executeProvider(provider, jobExecutionContext);
-                    disposeProvider(provider, jobExecutionContext);
-                } else {
-                    provider.recover(jobExecutionContext);
-                }
-                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
-            } else {
-                disposeProvider(provider, jobExecutionContext);
-                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
-            }
-        }
-
-        if (GFacUtils.isSynchronousMode(jobExecutionContext))  {
-            invokeOutFlowHandlers(jobExecutionContext);
-        }
-
-    }
-
-    private boolean invokeProviderCancel(JobExecutionContext jobExecutionContext) throws GFacException {
-        GFacProvider provider = jobExecutionContext.getProvider();
-        if (provider != null) {
-            initProvider(provider, jobExecutionContext);
-            cancelProvider(provider, jobExecutionContext);
-            disposeProvider(provider, jobExecutionContext);
-        }
-        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
-            invokeOutFlowHandlers(jobExecutionContext);
-        }
-        return true;
-    }
-
-    // TODO - Did refactoring, but need to recheck the logic again.
-    private void reInvokeProviderCancel(JobExecutionContext jobExecutionContext) throws Exception {
-        GFacProvider provider = jobExecutionContext.getProvider();
-        if (provider != null) {
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
-            GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName());
-            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
-            if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {    // this will make sure if a plugin crashes it will not launch from the scratch, but plugins have to save their invoked state
-                initProvider(provider, jobExecutionContext);
-                cancelProvider(provider, jobExecutionContext);
-                disposeProvider(provider, jobExecutionContext);
-            } else {
-                provider.recover(jobExecutionContext);
-            }
-            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
-        }
-
-        if (GFacUtils.isSynchronousMode(jobExecutionContext))
-
-        {
-            invokeOutFlowHandlers(jobExecutionContext);
-        }
-
-    }
-
-
-    private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.initialize(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while initializing provider " + provider.getClass().getName() + ".", e);
-        }
-    }
-
-    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.execute(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-        }
-    }
-
-    private boolean cancelProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            return provider.cancelJob(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-        }
-    }
-
-    private void disposeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.dispose(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while invoking provider " + provider.getClass().getName() + " dispose method.", e);
-        }
-    }
-
-//    private void registerWorkflowTrackingListener(String workflowInstanceID, JobExecutionContext jobExecutionContext) {
-//        String workflowNodeID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID);
-//        String topic = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
-//        String brokerUrl = (String) jobExecutionContext.getProperty(Constants.PROP_BROKER_URL);
-//        jobExecutionContext.getNotificationService().registerListener(
-//                new WorkflowTrackingListener(workflowInstanceID, workflowNodeID, brokerUrl, topic));
-//
-//    }
-
-    private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
-        try {
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                    , GfacExperimentState.INHANDLERSINVOKING));
-            for (GFacHandlerConfig handlerClassName : handlers) {
-                if (!isCancelling(jobExecutionContext)) {
-                    Class<? extends GFacHandler> handlerClass;
-                    GFacHandler handler;
-                    try {
-                        GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName());
-                        handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                        handler = handlerClass.newInstance();
-                        handler.initProperties(handlerClassName.getProperties());
-                    } catch (ClassNotFoundException e) {
-                        throw new GFacException("Cannot load handler class " + handlerClassName, e);
-                    } catch (InstantiationException e) {
-                        throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-                    } catch (IllegalAccessException e) {
-                        throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-                    }
-                    try {
-                        handler.invoke(jobExecutionContext);
-                        GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
-                        // if exception thrown before that we do not make it finished
-                    } catch (GFacHandlerException e) {
-                        throw new GFacException("Error Executing a InFlow Handler", e.getCause());
-                    }
-                } else {
-                    log.info("Experiment execution is cancelled, so InHandler invocation is going to stop");
-                    GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
-                    break;
-                }
-            }
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                    , GfacExperimentState.INHANDLERSINVOKED));
-        } catch (Exception e) {
-            throw new GFacException("Error Invoking Handlers:" + e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        if (!initialized) {
-            throw new GFacException("Initialize the Gfac instance before use it");
-        }
-        String experimentPath = null;
-        try {
-            experimentPath = AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID());
-            if (curatorClient.checkExists().forPath(experimentPath) == null) {
-                log.error("Experiment is already finalized so no output handlers will be invoked");
-                return;
-            }
-            GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
-            List<GFacHandlerConfig> handlers = null;
-            if (gFacConfiguration != null) {
-                handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
-            } else {
-                try {
-                    jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-                            jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-                } catch (Exception e) {
-                    log.error("Error constructing job execution context during outhandler invocation");
-                    throw new GFacException(e);
-                }
-            }
-            try {
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKING));
-                for (GFacHandlerConfig handlerClassName : handlers) {
-                    if (!isCancel(jobExecutionContext)) {
-                        Class<? extends GFacHandler> handlerClass;
-                        GFacHandler handler;
-                        try {
-                            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName());
-                            handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                            handler = handlerClass.newInstance();
-                            handler.initProperties(handlerClassName.getProperties());
-                        } catch (ClassNotFoundException e) {
-                            log.error(e.getMessage());
-                            throw new GFacException("Cannot load handler class " + handlerClassName, e);
-                        } catch (InstantiationException | IllegalAccessException e) {
-                            log.error(e.getMessage());
-                            throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-                        }
-                        try {
-                            handler.invoke(jobExecutionContext);
-                            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
-                        } catch (Exception e) {
-                            GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.FAILED);
-                            try {
-                                StringWriter errors = new StringWriter();
-                                e.printStackTrace(new PrintWriter(errors));
-                                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                            } catch (GFacException e1) {
-                                log.error(e1.getLocalizedMessage());
-                            }
-                            throw new GFacException(e);
-                        }
-                    } else {
-                        log.info("Experiment execution is cancelled, so OutHandler invocation is stopped");
-                        if (isCancelling(jobExecutionContext)) {
-                            GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
-                        }
-                        break;
-                    }
-                }
-                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKED));
-            } catch (Exception e) {
-                throw new GFacException("Cannot invoke OutHandlers\n" + e.getMessage(), e);
-            }
-        } catch (Exception e) {
-            throw new GFacException("Cannot invoke OutHandlers\n" + e.getMessage(), e);
-        }
-
-        // At this point all the execution is finished so we update the task and experiment statuses.
-        // Handler authors does not have to worry about updating experiment or task statuses.
-//        monitorPublisher.publish(new
-//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
-//                ExperimentState.COMPLETED));
-        // Updating the task status if there's any task associated
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
-                jobExecutionContext.getGatewayID());
-        monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
-        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
-
-    }
-
-    /**
-     * If handlers ran successfully we re-run only recoverable handlers
-     * If handler never ran we run the normal invoke method
-     *
-     * @param jobExecutionContext
-     * @throws GFacException
-     */
-    // TODO - Did refactoring, but need to recheck the logic again.
-    private void reInvokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
-        try {
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                    , GfacExperimentState.INHANDLERSINVOKING));
-            for (GFacHandlerConfig handlerClassName : handlers) {
-                Class<? extends GFacHandler> handlerClass;
-                GFacHandler handler;
-                try {
-                    handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                    handler = handlerClass.newInstance();
-                    GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName());
-                    GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.INVOKING);
-                    handler.initProperties(handlerClassName.getProperties());
-                    if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {
-                        log.info(handlerClassName.getClassName() + " never ran so we run this is normal mode");
-                        handler.invoke(jobExecutionContext);
-                    } else {
-                        // if these already ran we re-run only recoverable handlers
-                        log.info(handlerClassName.getClassName() + " is a recoverable handler so we recover the handler");
-                        handler.recover(jobExecutionContext);
-                    }
-                    GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
-                } catch (GFacHandlerException e) {
-                    throw new GFacException("Error Executing a InFlow Handler", e.getCause());
-                } catch (ClassNotFoundException e) {
-                    throw new GFacException("Cannot load handler class " + handlerClassName, e);
-                } catch (InstantiationException e) {
-                    throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-                } catch (IllegalAccessException e) {
-                    throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-                }
-            }
-            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
-                    , GfacExperimentState.INHANDLERSINVOKED));
-        } catch (Exception e) {
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            } catch (GFacException e1) {
-                log.error(e1.getLocalizedMessage());
-            }
-            throw new GFacException("Error while re-invoking output handlers", e);
-        }
-    }
-
-    // TODO - Did refactoring, but need to recheck the logic again.
-    @Override
-    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        if (!initialized) {
-            throw new GFacException("Initialize the Gfac instance before use it");
-        }
-        GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
-        List<GFacHandlerConfig> handlers = null;
-        if (gFacConfiguration != null) {
-            handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
-        } else {
-            try {
-                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-            } catch (Exception e) {
-                log.error("Error constructing job execution context during outhandler invocation");
-                throw new GFacException(e);
-            }
-            launch(jobExecutionContext);
-        }
-        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKING));
-        for (GFacHandlerConfig handlerClassName : handlers) {
-            Class<? extends GFacHandler> handlerClass;
-            GFacHandler handler;
-            try {
-                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                handler = handlerClass.newInstance();
-                GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName());
-                GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.INVOKING);
-                if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {
-                    log.info(handlerClassName.getClassName() + " never ran so we run this in normal mode");
-                    handler.initProperties(handlerClassName.getProperties());
-                    handler.invoke(jobExecutionContext);
-                } else {
-                    // if these already ran we re-run only recoverable handlers
-                    handler.recover(jobExecutionContext);
-                }
-                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
-            } catch (ClassNotFoundException e) {
-                try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    log.error(e1.getLocalizedMessage());
-                }
-                log.error(e.getMessage());
-                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-            } catch (InstantiationException e) {
-                try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    log.error(e1.getLocalizedMessage());
-                }
-                log.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            } catch (IllegalAccessException e) {
-                try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    log.error(e1.getLocalizedMessage());
-                }
-                log.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            } catch (Exception e) {
-                // TODO: Better error reporting.
-                try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    log.error(e1.getLocalizedMessage());
-                }
-                throw new GFacException("Error Executing a OutFlow Handler", e);
-            }
-        }
-        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKED));
-
-        // At this point all the execution is finished so we update the task and experiment statuses.
-        // Handler authors does not have to worry about updating experiment or task statuses.
-//        monitorPublisher.publish(new
-//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
-//                ExperimentState.COMPLETED));
-        // Updating the task status if there's any task associated
-
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
-                jobExecutionContext.getGatewayID());
-        monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
-        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
-    }
-
-    private boolean isCancelled(JobExecutionContext executionContext) {
-        // we should check whether experiment is cancelled using registry
-        try {
-            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
-            if (status != null) {
-                ExperimentState experimentState = status.getExperimentState();
-                if (experimentState != null) {
-                    if (experimentState == ExperimentState.CANCELED) {
-                        return true;
-                    }
-                }
-            }
-        } catch (RegistryException e) {
-            // on error we return false.
-        }
-        return false;
-    }
-
-    private boolean isCancelling(JobExecutionContext executionContext) {
-        // check whether cancelling request came
-        try {
-            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
-            if (status != null) {
-                ExperimentState experimentState = status.getExperimentState();
-                if (experimentState != null) {
-                    if (experimentState == ExperimentState.CANCELING) {
-                        return true;
-                    }
-                }
-            }
-        } catch (RegistryException e) {
-            // on error we return false;
-        }
-        return false;
-    }
-
-    private boolean isCancel(JobExecutionContext jobExecutionContext) {
-        try {
-            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, jobExecutionContext.getExperimentID());
-            if (status != null) {
-                ExperimentState experimentState = status.getExperimentState();
-                if (experimentState != null) {
-                    if (experimentState == ExperimentState.CANCELING || experimentState == ExperimentState.CANCELED) {
-                        return true;
-                    }
-                }
-            }
-        } catch (RegistryException e) {
-            // on error we return false;
-        }
-        return false;
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
deleted file mode 100644
index 962f0ec..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *
- * 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.core.cpi;
-
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.curator.framework.CuratorFramework;
-
-/**
- * This is the GFac CPI interface which needs to be implemented by an internal class, this simply have a single method to submit a job to
- * the resource, required data for the job has to be stored in registry prior to invoke this object.
- */
-public interface GFac {
-
-    /**
-     * Initialized method, this method must call one time before use any other method.
-     * @param registry
-     * @param appCatalog
-     * @param curatorClient
-     * @param publisher
-     * @return
-     */
-    public boolean init(Registry registry, AppCatalog appCatalog, CuratorFramework curatorClient, MonitorPublisher publisher);
-
-    /**
-     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
-     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
-     *
-     * @param experimentID
-     * @return boolean Successful acceptence of the jobExecution returns a true value
-     * @throws org.apache.airavata.gfac.GFacException
-     */
-    public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;
-
-    /**
-     * This method can be used in a handler to ivvoke outhandler asynchronously
-     * @param jobExecutionContext
-     * @throws GFacException
-     */
-    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException;
-
-    /**
-     * This method can be used to handle re-run case asynchronously
-     * @param jobExecutionContext
-     * @throws GFacException
-     */
-    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException;
-
-    /**
-     * This operation can be used to cancel an already running experiment
-     * @return Successful cancellation will return true
-     * @throws GFacException
-     */
-    public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId)throws GFacException;
-
-}


[67/81] [abbrv] airavata git commit: removed thrift generated client code from gfac-service module and move it to gfac-client module. Refactored module dependency of gfac

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
deleted file mode 100644
index 213b834..0000000
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ /dev/null
@@ -1,3170 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class GfacService {
-
-  public interface Iface {
-
-    /**
-     * Query gfac server to fetch the CPI version
-     */
-    public String getGFACServiceVersion() throws org.apache.thrift.TException;
-
-    /**
-     *  * After creating the experiment Data and Task Data in the orchestrator
-     *  * Orchestrator has to invoke this operation for each Task per experiment to run
-     *  * the actual Job related actions.
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @param gatewayId:
-     *  *  The GatewayId is inferred from security context and passed onto gfac.
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     * @param tokenId
-     */
-    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
-
-    /**
-     *  *
-     *  * Terminate the running job.At this point user
-     *  * does not have to know the job ID so in the argument
-     *  * we do not make it to required jobID to provide.
-     *  *
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     * @param tokenId
-     */
-    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
-
-  }
-
-  public interface AsyncIface {
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-  }
-
-  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
-    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
-      public Factory() {}
-      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
-        return new Client(prot);
-      }
-      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-        return new Client(iprot, oprot);
-      }
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol prot)
-    {
-      super(prot, prot);
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-      super(iprot, oprot);
-    }
-
-    public String getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      send_getGFACServiceVersion();
-      return recv_getGFACServiceVersion();
-    }
-
-    public void send_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-      sendBase("getGFACServiceVersion", args);
-    }
-
-    public String recv_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-      receiveBase(result, "getGFACServiceVersion");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
-    }
-
-    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      send_submitJob(experimentId, taskId, gatewayId, tokenId);
-      return recv_submitJob();
-    }
-
-    public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      submitJob_args args = new submitJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      args.setGatewayId(gatewayId);
-      args.setTokenId(tokenId);
-      sendBase("submitJob", args);
-    }
-
-    public boolean recv_submitJob() throws org.apache.thrift.TException
-    {
-      submitJob_result result = new submitJob_result();
-      receiveBase(result, "submitJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
-    }
-
-    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      send_cancelJob(experimentId, taskId, gatewayId, tokenId);
-      return recv_cancelJob();
-    }
-
-    public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      cancelJob_args args = new cancelJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      args.setGatewayId(gatewayId);
-      args.setTokenId(tokenId);
-      sendBase("cancelJob", args);
-    }
-
-    public boolean recv_cancelJob() throws org.apache.thrift.TException
-    {
-      cancelJob_result result = new cancelJob_result();
-      receiveBase(result, "cancelJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result");
-    }
-
-  }
-  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
-    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
-      private org.apache.thrift.async.TAsyncClientManager clientManager;
-      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
-        this.clientManager = clientManager;
-        this.protocolFactory = protocolFactory;
-      }
-      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
-        return new AsyncClient(protocolFactory, clientManager, transport);
-      }
-    }
-
-    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
-      super(protocolFactory, clientManager, transport);
-    }
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public String getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getGFACServiceVersion();
-      }
-    }
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      private String gatewayId;
-      private String tokenId;
-      public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-        this.tokenId = tokenId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        submitJob_args args = new submitJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.setGatewayId(gatewayId);
-        args.setTokenId(tokenId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_submitJob();
-      }
-    }
-
-    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      private String gatewayId;
-      private String tokenId;
-      public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-        this.tokenId = tokenId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        cancelJob_args args = new cancelJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.setGatewayId(gatewayId);
-        args.setTokenId(tokenId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_cancelJob();
-      }
-    }
-
-  }
-
-  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
-    }
-
-    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException {
-        getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-        result.success = iface.getGFACServiceVersion();
-        return result;
-      }
-    }
-
-    public static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
-        submitJob_result result = new submitJob_result();
-        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-    public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
-        cancelJob_result result = new cancelJob_result();
-        result.success = iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-  }
-
-  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
-    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
-    public AsyncProcessor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
-    }
-
-    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.getGFACServiceVersion(resultHandler);
-      }
-    }
-
-    public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            submitJob_result result = new submitJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            submitJob_result result = new submitJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
-      }
-    }
-
-    public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            cancelJob_result result = new cancelJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            cancelJob_result result = new cancelJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
-
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory());
-    }
-
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_args() {
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_args(getGFACServiceVersion_args other) {
-    }
-
-    public getGFACServiceVersion_args deepCopy() {
-      return new getGFACServiceVersion_args(this);
-    }
-
-    @Override
-    public void clear() {
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_args)
-        return this.equals((getGFACServiceVersion_args)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_args that) {
-      if (that == null)
-        return false;
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_args(");
-      boolean first = true;
-
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsStandardScheme getScheme() {
-        return new getGFACServiceVersion_argsStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsTupleScheme getScheme() {
-        return new getGFACServiceVersion_argsTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory());
-    }
-
-    public String success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_result() {
-    }
-
-    public getGFACServiceVersion_result(
-      String success)
-    {
-      this();
-      this.success = success;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_result(getGFACServiceVersion_result other) {
-      if (other.isSetSuccess()) {
-        this.success = other.success;
-      }
-    }
-
-    public getGFACServiceVersion_result deepCopy() {
-      return new getGFACServiceVersion_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.success = null;
-    }
-
-    public String getSuccess() {
-      return this.success;
-    }
-
-    public getGFACServiceVersion_result setSuccess(String success) {
-      this.success = success;
-      return this;
-    }
-
-    public void unsetSuccess() {
-      this.success = null;
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return this.success != null;
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      if (!value) {
-        this.success = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return getSuccess();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_result)
-        return this.equals((getGFACServiceVersion_result)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true && this.isSetSuccess();
-      boolean that_present_success = true && that.isSetSuccess();
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (!this.success.equals(that.success))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      if (this.success == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.success);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultStandardScheme getScheme() {
-        return new getGFACServiceVersion_resultStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.success = iprot.readString();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.success != null) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeString(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultTupleScheme getScheme() {
-        return new getGFACServiceVersion_resultTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeString(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readString();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-    public String gatewayId; // required
-    public String tokenId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId"),
-      TOKEN_ID((short)4, "tokenId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          case 3: // GATEWAY_ID
-            return GATEWAY_ID;
-          case 4: // TOKEN_ID
-            return TOKEN_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
-    }
-
-    public submitJob_args() {
-    }
-
-    public submitJob_args(
-      String experimentId,
-      String taskId,
-      String gatewayId,
-      String tokenId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-      this.gatewayId = gatewayId;
-      this.tokenId = tokenId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_args(submitJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-      if (other.isSetGatewayId()) {
-        this.gatewayId = other.gatewayId;
-      }
-      if (other.isSetTokenId()) {
-        this.tokenId = other.tokenId;
-      }
-    }
-
-    public submitJob_args deepCopy() {
-      return new submitJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-      this.gatewayId = null;
-      this.tokenId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public submitJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public submitJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public String getGatewayId() {
-      return this.gatewayId;
-    }
-
-    public submitJob_args setGatewayId(String gatewayId) {
-      this.gatewayId = gatewayId;
-      return this;
-    }
-
-    public void unsetGatewayId() {
-      this.gatewayId = null;
-    }
-
-    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
-    public boolean isSetGatewayId() {
-      return this.gatewayId != null;
-    }
-
-    public void setGatewayIdIsSet(boolean value) {
-      if (!value) {
-        this.gatewayId = null;
-      }
-    }
-
-    public String getTokenId() {
-      return this.tokenId;
-    }
-
-    public submitJob_args setTokenId(String tokenId) {
-      this.tokenId = tokenId;
-      return this;
-    }
-
-    public void unsetTokenId() {
-      this.tokenId = null;
-    }
-
-    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTokenId() {
-      return this.tokenId != null;
-    }
-
-    public void setTokenIdIsSet(boolean value) {
-      if (!value) {
-        this.tokenId = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        if (value == null) {
-          unsetExperimentId();
-        } else {
-          setExperimentId((String)value);
-        }
-        break;
-
-      case TASK_ID:
-        if (value == null) {
-          unsetTaskId();
-        } else {
-          setTaskId((String)value);
-        }
-        break;
-
-      case GATEWAY_ID:
-        if (value == null) {
-          unsetGatewayId();
-        } else {
-          setGatewayId((String)value);
-        }
-        break;
-
-      case TOKEN_ID:
-        if (value == null) {
-          unsetTokenId();
-        } else {
-          setTokenId((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        return getExperimentId();
-
-      case TASK_ID:
-        return getTaskId();
-
-      case GATEWAY_ID:
-        return getGatewayId();
-
-      case TOKEN_ID:
-        return getTokenId();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EXPERIMENT_ID:
-        return isSetExperimentId();
-      case TASK_ID:
-        return isSetTaskId();
-      case GATEWAY_ID:
-        return isSetGatewayId();
-      case TOKEN_ID:
-        return isSetTokenId();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_args)
-        return this.equals((submitJob_args)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
-      if (this_present_experimentId || that_present_experimentId) {
-        if (!(this_present_experimentId && that_present_experimentId))
-          return false;
-        if (!this.experimentId.equals(that.experimentId))
-          return false;
-      }
-
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
-      if (this_present_taskId || that_present_taskId) {
-        if (!(this_present_taskId && that_present_taskId))
-          return false;
-        if (!this.taskId.equals(that.taskId))
-          return false;
-      }
-
-      boolean this_present_gatewayId = true && this.isSetGatewayId();
-      boolean that_present_gatewayId = true && that.isSetGatewayId();
-      if (this_present_gatewayId || that_present_gatewayId) {
-        if (!(this_present_gatewayId && that_present_gatewayId))
-          return false;
-        if (!this.gatewayId.equals(that.gatewayId))
-          return false;
-      }
-
-      boolean this_present_tokenId = true && this.isSetTokenId();
-      boolean that_present_tokenId = true && that.isSetTokenId();
-      if (this_present_tokenId || that_present_tokenId) {
-        if (!(this_present_tokenId && that_present_tokenId))
-          return false;
-        if (!this.tokenId.equals(that.tokenId))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetExperimentId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTaskId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetGatewayId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTokenId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_args(");
-      boolean first = true;
-
-      sb.append("experimentId:");
-      if (this.experimentId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.experimentId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("taskId:");
-      if (this.taskId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.taskId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("gatewayId:");
-      if (this.gatewayId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.gatewayId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("tokenId:");
-      if (this.tokenId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.tokenId);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      if (experimentId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
-      }
-      if (taskId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
-      }
-      if (gatewayId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
-      }
-      if (tokenId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
-      }
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
-      public submitJob_argsStandardScheme getScheme() {
-        return new submitJob_argsStandardScheme();
-      }
-    }
-
-    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EXPERIMENT_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.experimentId = iprot.readString();
-                struct.setExperimentIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // TASK_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.taskId = iprot.readString();
-                struct.setTaskIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // GATEWAY_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.gatewayId = iprot.readString();
-                struct.setGatewayIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 4: // TOKEN_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.tokenId = iprot.readString();
-                struct.setTokenIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.experimentId != null) {
-          oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
-          oprot.writeString(struct.experimentId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.taskId != null) {
-          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
-          oprot.writeString(struct.taskId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.gatewayId != null) {
-          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
-          oprot.writeString(struct.gatewayId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.tokenId != null) {
-          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
-          oprot.writeString(struct.tokenId);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
-      public submitJob_argsTupleScheme getScheme() {
-        return new submitJob_argsTupleScheme();
-      }
-    }
-
-    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.experimentId);
-        oprot.writeString(struct.taskId);
-        oprot.writeString(struct.gatewayId);
-        oprot.writeString(struct.tokenId);
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.experimentId = iprot.readString();
-        struct.setExperimentIdIsSet(true);
-        struct.taskId = iprot.readString();
-        struct.setTaskIdIsSet(true);
-        struct.gatewayId = iprot.readString();
-        struct.setGatewayIdIsSet(true);
-        struct.tokenId = iprot.readString();
-        struct.setTokenIdIsSet(true);
-      }
-    }
-
-  }
-
-  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
-    }
-
-    public boolean success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
-    }
-
-    public submitJob_result() {
-    }
-
-    public submitJob_result(
-      boolean success)
-    {
-      this();
-      this.success = success;
-      setSuccessIsSet(true);
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_result(submitJob_result other) {
-      __isset_bitfield = other.__isset_bitfield;
-      this.success = other.success;
-    }
-
-    public submitJob_result deepCopy() {
-      return new submitJob_result(this);
-    }
-
-    @Override
-    public void clear() {
-      setSuccessIsSet(false);
-      this.success = false;
-    }
-
-    public boolean isSuccess() {
-      return this.success;
-    }
-
-    public submitJob_result setSuccess(boolean success) {
-      this.success = success;
-      setSuccessIsSet(true);
-      return this;
-    }
-
-    public void unsetSuccess() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((Boolean)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return Boolean.valueOf(isSuccess());
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_result)
-        return this.equals((submitJob_result)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true;
-      boolean that_present_success = true;
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (this.success != that.success)
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      sb.append(this.success);
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-        __isset_bitfield = 0;
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
-      public submitJob_resultStandardScheme getScheme() {
-        return new submitJob_resultStandardScheme();
-      }
-    }
-
-    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-                struct.success = iprot.readBool();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.isSetSuccess()) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeBool(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
-      public submitJob_resultTupleScheme getScheme() {
-        return new submitJob_resultTupleScheme();
-      }
-    }
-
-    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeBool(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readBool();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class cancelJob_args implements org.apache.thrift.TBase<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-    public String gatewayId; // required
-    public String tokenId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId"),
-      TOKEN_ID((short)4, "tokenId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          case 3: // GATEWAY_ID
-            return GATEWAY_ID;
-          case 4: // TOKEN_ID
-            return TOKEN_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
-    }
-
-    public cancelJob_args() {
-    }
-
-    public cancelJob_args(
-      String experimentId,
-      String taskId,
-      String gatewayId,
-      String tokenId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-      this.gatewayId = gatewayId;
-      this.tokenId = tokenId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public cancelJob_args(cancelJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-      if (other.isSetGatewayId()) {
-        this.gatewayId = other.gatewayId;
-      }
-      if (other.isSetTokenId()) {
-        this.tokenId = other.tokenId;
-      }
-    }
-
-    public cancelJob_args deepCopy() {
-      return new cancelJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-      this.gatewayId = null;
-      this.tokenId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public cancelJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public cancelJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public String getGatewayId() {
-      return this.gatewayId;
-    }
-
-    public cancelJob_args setGatewayId(String gatewayId) {
-      this.gatewayId = gatewayId;
-      return this;
-    }
-
-    public void unsetGatewayId() {
-      this.gatewayId = null;
-    }
-
-    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
-    public boolean isSetGatewayId() {
-      return this.gatewayId != null;
-    }
-
-    public void setGatewayIdIsSet(boolean value) {
-      if (!value) {
-        this.gatewayId = null;
-      }
-    }
-
-    public String getTokenId() {
-      return this.tokenId;
-    }
-
-    public cancelJob_args setTokenId(String tokenId) {
-      this.tokenId = tokenId;
-      return this;
-    }
-
-    public void unsetTokenId() {
-      this.tokenId = null;
-    }
-
-    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTokenId() {
-      return this.tokenId != null;
-    }
-
-    public void setTokenIdIsSet(boolean value) {
-      if (

<TRUNCATED>

[70/81] [abbrv] airavata git commit: adding a parent distribution

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/distribution/main/resources/LICENSE b/distribution/main/resources/LICENSE
new file mode 100644
index 0000000..56f7cc2
--- /dev/null
+++ b/distribution/main/resources/LICENSE
@@ -0,0 +1,2387 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+===================================================================================
+The Apache Airavata distribution includes a number of run time 
+dependencies with separate copyright notices and license terms. Your use of the
+Apache Airavata code is subject to the terms and conditions of the following licenses.
+===================================================================================
+
+===============================================================================
+The following components come under Apache Software License 2.0
+===============================================================================
+
+apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
+apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
+aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
+jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
+jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
+(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
+
+- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
+- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
+- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
+- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
+- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
+- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
+- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
+- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
+- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
+- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
+- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
+- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
+- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
+
+===============================================================================
+The following components use Apache based Licenses
+===============================================================================
+
+===============================================================================
+For: jdom-1.0.jar
+    Containing Project URL: http://www.jdom.org/
+/*-- 
+
+ $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
+
+ Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
+ All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions, and the following disclaimer.
+ 
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions, and the disclaimer that follows 
+    these conditions in the documentation and/or other materials 
+    provided with the distribution.
+
+ 3. The name "JDOM" must not be used to endorse or promote products
+    derived from this software without prior written permission.  For
+    written permission, please contact <request_AT_jdom_DOT_org>.
+ 
+ 4. Products derived from this software may not be called "JDOM", nor
+    may "JDOM" appear in their name, without prior written permission
+    from the JDOM Project Management <request_AT_jdom_DOT_org>.
+ 
+ In addition, we request (but do not require) that you include in the 
+ end-user documentation provided with the redistribution and/or in the 
+ software itself an acknowledgement equivalent to the following:
+     "This product includes software developed by the
+      JDOM Project (http://www.jdom.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos 
+ available at http://www.jdom.org/images/logos.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many 
+ individuals on behalf of the JDOM Project and was originally 
+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
+ Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
+ on the JDOM Project, please see <http://www.jdom.org/>. 
+
+ */
+
+===============================================================================
+
+ASM bytecode manipulation library (asm)
+    Containing Project URL: http://asm.ow2.org/
+
+    Copyright (c) 2000-2005 INRIA, France Telecom
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of the copyright holders nor the names of its
+       contributors may be used to endorse or promote products derived from
+       this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+    THE POSSIBILITY OF SUCH DAMAGE.
+
+===============================================================================
+
+For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
+    Containing Project URL: http://www.cryptix.org/
+
+Cryptix General License
+
+Copyright (c) 1995-2005 The Cryptix Foundation Limited.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  1. Redistributions of source code must retain the copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
+CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===============================================================================
+The following components come under Extreme! Lab Software License
+===============================================================================
+
+XPP3
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
+xsul, xsul5, xutil
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
+wsmg
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
+gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/
+    
+Indiana University Extreme! Lab Software License
+
+Version 1.1.1
+
+Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the distribution.
+
+3. The end-user documentation included with the redistribution, if any,
+   must include the following acknowledgment:
+
+  "This product includes software developed by the Indiana University
+  Extreme! Lab (http://www.extreme.indiana.edu/)."
+
+Alternately, this acknowledgment may appear in the software itself,
+if and wherever such third-party acknowledgments normally appear.
+
+4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
+must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission,
+please contact http://www.extreme.indiana.edu/.
+
+5. Products derived from this software may not use "Indiana Univeristy"
+name nor may "Indiana Univeristy" appear in their name, without prior
+written permission of the Indiana University.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+======================================================================== 
+The following components are MIT Licensed 
+========================================================================
+
+SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
+    Containing Project URL: http://www.slf4j.org/
+
+Copyright (c) 2004-2008 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+========================================================================
+
+For dom4j-1.6.1.jar:
+    Containing Project URL: http://dom4j.sourceforge.net/
+Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
+
+Redistribution and use of this software and associated documentation
+("Software"), with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain copyright
+   statements and notices.  Redistributions must also contain a
+   copy of this document.
+ 
+2. Redistributions in binary form must reproduce the
+   above copyright notice, this list of conditions and the
+   following disclaimer in the documentation and/or other
+   materials provided with the distribution.
+ 
+3. The name "DOM4J" must not be used to endorse or promote
+   products derived from this Software without prior written
+   permission of MetaStuff, Ltd.  For written permission,
+   please contact dom4j-info@metastuff.com.
+ 
+4. Products derived from this Software may not be called "DOM4J"
+   nor may "DOM4J" appear in their names without prior written
+   permission of MetaStuff, Ltd. DOM4J is a registered
+   trademark of MetaStuff, Ltd.
+ 
+5. Due credit should be given to the DOM4J Project - 
+   http://www.dom4j.org
+ 
+THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+====================================================================================================
+
+For Bouncy Castle:
+    Containing Project URL: http://www.bouncycastle.org/
+
+Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission iss software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=======================================================================================================
+
+For: The International Components for Unicode (icu4j-2.6.1.jar)
+    Containing Project URL: http://site.icu-project.org/
+
+    Copyright (c) 1995-2009 International Business Machines Corporation
+    and others
+
+    All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies
+    of the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+    SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder shall
+    not be used in advertising or otherwise to promote the sale, use or other
+    dealings in this Software without prior written authorization of the
+    copyright holder.
+    
+====================================================================== 
+The following components are CDDL based License 
+======================================================================
+
+For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
+Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
+Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
+JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
+Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
+jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
+implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
+ 
+NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
+Apahce Airavata elects to include jersey in this distribution under the
+[CDDLv_1.0] license.
+
+    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+    1. Definitions.
+
+    1.1. Contributor means each individual or entity that creates or
+    contributes to the creation of Modifications.
+
+    1.2. Contributor Version means the combination of the Original Software,
+    prior Modifications used by a Contributor (if any), and the Modifications
+    made by that particular Contributor.
+
+    1.3. Covered Software means (a) the Original Software, or
+    (b) Modifications, or (c) the combination of files containing Original
+    Software with files containing Modifications, in each case including
+    portions thereof.
+
+    1.4. Executable means the Covered Software in any form other than Source
+    Code.
+
+    1.5. Initial Developer means the individual or entity that first makes
+    Original Software available under this License.
+
+    1.6. Larger Work means a work which combines Covered Software or portions
+    thereof with code not governed by the terms of this License.
+
+    1.7. License means this document.
+
+    1.8. Licensable means having the right to grant, to the maximum extent
+    possible, whether at the time of the initial grant or subsequently
+    acquired, any and all of the rights conveyed herein.
+
+    1.9. Modifications means the Source Code and Executable form of any of
+    the following: A. Any file that results from an addition to, deletion
+    from or modification of the contents of a file containing Original
+    Software or previous Modifications; B. Any new file that contains any
+    part of the Original Software or previous Modification; or C. Any new
+    file that is contributed or otherwise made available under the terms of
+    this License.
+
+    1.10. Original Software means the Source Code and Executable form of
+    computer software code that is originally released under this License.
+
+    1.11. Patent Claims means any patent claim(s), now owned or hereafter
+    acquired, including without limitation, method, process, and apparatus
+    claims, in any patent Licensable by grantor.
+
+    1.12. Source Code means (a) the common form of computer software code in
+    which modifications are made and (b) associated documentation included in
+    or with such code.
+
+    1.13. You (or Your) means an individual or a legal entity exercising
+    rights under, and complying with all of the terms of, this License. For
+    legal entities, You includes any entity which controls, is controlled by,
+    or is under common control with You. For purposes of this definition,
+    control means (a) the power, direct or indirect, to cause the direction
+    or management of such entity, whether by contract or otherwise, or
+    (b) ownership of more than fifty percent (50%) of the outstanding shares
+    or beneficial ownership of such entity.
+
+    2. License Grants.
+
+    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
+    Section 3.1 below and subject to third party intellectual property
+    claims, the Initial Developer hereby grants You a world-wide,
+    royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or trademark)
+        Licensable by Initial Developer, to use, reproduce, modify, display,
+        perform, sublicense and distribute the Original Software (or portions
+        thereof), with or without Modifications, and/or as part of a Larger
+        Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling of
+        Original Software, to make, have made, use, practice, sell, and offer
+        for sale, and/or otherwise dispose of the Original Software (or
+        portions thereof);
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
+        date Initial Developer first distributes or otherwise makes the
+        Original Software available to a third party under the terms of
+        this License;
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
+        (1) for code that You delete from the Original Software, or (2) for
+        infringements caused by: (i) the modification of the Original
+        Software, or (ii) the combination of the Original Software with other
+        software or devices.
+
+    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
+    below and subject to third party intellectual property claims, each
+    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
+    license:
+
+    (a) under intellectual property rights (other than patent or trademark)
+        Licensable by Contributor to use, reproduce, modify, display, perform,
+        sublicense and distribute the Modifications created by such
+        Contributor (or portions thereof), either on an unmodified basis,
+        with other Modifications, as Covered Software and/or as part of a
+        Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling of
+        Modifications made by that Contributor either alone and/or in
+        combination with its Contributor Version (or portions of such
+        combination), to make, use, sell, offer for sale, have made, and/or
+        otherwise dispose of: (1) Modifications made by that Contributor (or
+        portions thereof); and (2) the combination of Modifications made by
+        that Contributor with its Contributor Version (or portions of such
+        combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
+        the date Contributor first distributes or otherwise makes the
+        Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
+        (1) for any code that Contributor has deleted from the Contributor
+        Version; (2) for infringements caused by: (i) third party
+        modifications of Contributor Version, or (ii) the combination of
+        Modifications made by that Contributor with other software (except
+        as part of the Contributor Version) or other devices; or (3) under
+        Patent Claims infringed by Covered Software in the absence of
+        Modifications made by that Contributor.
+
+    3. Distribution Obligations.
+
+    3.1. Availability of Source Code. Any Covered Software that You distribute
+    or otherwise make available in Executable form must also be made available
+    in Source Code form and that Source Code form must be distributed only
+    under the terms of this License. You must include a copy of this License
+    with every copy of the Source Code form of the Covered Software You
+    distribute or otherwise make available. You must inform recipients of any
+    such Covered Software in Executable form as to how they can obtain such
+    Covered Software in Source Code form in a reasonable manner on or through
+    a medium customarily used for software exchange.
+
+    3.2. Modifications. The Modifications that You create or to which You
+    contribute are governed by the terms of this License. You represent that
+    You believe Your Modifications are Your original creation(s) and/or You
+    have sufficient rights to grant the rights conveyed by this License.
+
+    3.3. Required Notices. You must include a notice in each of Your
+    Modifications that identifies You as the Contributor of the Modification.
+    You may not remove or alter any copyright, patent or trademark notices
+    contained within the Covered Software, or any notices of licensing or any
+    descriptive text giving attribution to any Contributor or the Initial
+    Developer.
+
+    3.4. Application of Additional Terms. You may not offer or impose any
+    terms on any Covered Software in Source Code form that alters or restricts
+    the applicable version of this License or the recipients rights hereunder.
+    You may choose to offer, and to charge a fee for, warranty, support,
+    indemnity or liability obligations to one or more recipients of Covered
+    Software. However, you may do so only on Your own behalf, and not on
+    behalf of the Initial Developer or any Contributor. You must make it
+    absolutely clear that any such warranty, support, indemnity or liability
+    obligation is offered by You alone, and You hereby agree to indemnify the
+    Initial Developer and every Contributor for any liability incurred by the
+    Initial Developer or such Contributor as a result of warranty, support,
+    indemnity or liability terms You offer.
+
+    3.5. Distribution of Executable Versions. You may distribute the
+    Executable form of the Covered Software under the terms of this License or
+    under the terms of a license of Your choice, which may contain terms
+    different from this License, provided that You are in compliance with the
+    terms of this License and that the license for the Executable form does
+    not attempt to limit or alter the recipients rights in the Source Code
+    form from the rights set forth in this License. If You distribute the
+    Covered Software in Executable form under a different license, You must
+    make it absolutely clear that any terms which differ from this License
+    are offered by You alone, not by the Initial Developer or Contributor.
+    You hereby agree to indemnify the Initial Developer and every Contributor
+    for any liability incurred by the Initial Developer or such Contributor as
+    a result of any such terms You offer.
+
+    3.6. Larger Works. You may create a Larger Work by combining Covered
+    Software with other code not governed by the terms of this License and
+    distribute the Larger Work as a single product. In such a case, You must
+    make sure the requirements of this License are fulfilled for the Covered
+    Software.
+
+    4. Versions of the License.
+
+    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
+    and may publish revised and/or new versions of this License from time to
+    time. Each version will be given a distinguishing version number. Except
+    as provided in Section 4.3, no one other than the license steward has the
+    right to modify this License.
+
+    4.2. Effect of New Versions. You may always continue to use, distribute
+    or otherwise make the Covered Software available under the terms of the
+    version of the License under which You originally received the Covered
+    Software. If the Initial Developer includes a notice in the Original
+    Software prohibiting it from being distributed or otherwise made
+    available under any subsequent version of the License, You must
+    distribute and make the Covered Software available under the terms of
+    the version of the License under which You originally received the
+    Covered Software. Otherwise, You may also choose to use, distribute or
+    otherwise make the Covered Software available under the terms of any
+    subsequent version of the License published by the license steward.
+
+    4.3. Modified Versions. When You are an Initial Developer and You want
+    to create a new license for Your Original Software, You may create and
+    use a modified version of this License if You: (a) rename the license and
+    remove any references to the name of the license steward (except to note
+    that the license differs from this License); and (b) otherwise make it
+    clear that the license contains terms which differ from this License.
+
+    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
+    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
+    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
+    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
+    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
+    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
+    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
+    EXCEPT UNDER THIS DISCLAIMER.
+
+    6. TERMINATION.
+
+    6.1. This License and the rights granted hereunder will terminate
+    automatically if You fail to comply with terms herein and fail to cure
+    such breach within 30 days of becoming aware of the breach. Provisions
+    which, by their nature, must remain in effect beyond the termination of
+    this License shall survive.
+
+    6.2. If You assert a patent infringement claim (excluding declaratory
+    judgment actions) against Initial Developer or a Contributor (the Initial
+    Developer or Contributor against whom You assert such claim is referred
+    to as Participant) alleging that the Participant Software (meaning the
+    Contributor Version where the Participant is a Contributor or the
+    Original Software where the Participant is the Initial Developer)
+    directly or indirectly infringes any patent, then any and all rights
+    granted directly or indirectly to You by such Participant, the Initial
+    Developer (if the Initial Developer is not the Participant) and all
+    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
+    60 days notice from Participant terminate prospectively and automatically
+    at the expiration of such 60 day notice period, unless if within such
+    60 day period You withdraw Your claim with respect to the Participant
+    Software against such Participant either unilaterally or pursuant to a
+    written agreement with Participant.
+
+    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+    user licenses that have been validly granted by You or any distributor
+    hereunder prior to termination (excluding licenses granted to You by any
+    distributor) shall survive termination.
+
+    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
+    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
+    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
+    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
+    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
+    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
+    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
+    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
+    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
+    AND LIMITATION MAY NOT APPLY TO YOU.
+
+    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
+    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
+    commercial computer software (as that term is defined at 48 C.F.R.
+    252.227-7014(a)(1)) and commercial computer software documentation as such
+    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
+    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
+    Government End Users acquire Covered Software with only those rights set
+    forth herein. This U.S. Government Rights clause is in lieu of, and
+    supersedes, any other FAR, DFAR, or other clause or provision that
+    addresses Government rights in computer software under this License.
+
+    9. MISCELLANEOUS. This License represents the complete agreement
+    concerning subject matter hereof. If any provision of this License is
+    held to be unenforceable, such provision shall be reformed only to the
+    extent necessary to make it enforceable. This License shall be governed
+    by the law of the jurisdiction specified in a notice contained within
+    the Original Software (except to the extent applicable law, if any,
+    provides otherwise), excluding such jurisdictions conflict-of-law
+    provisions. Any litigation relating to this License shall be subject to
+    the jurisdiction of the courts located in the jurisdiction and venue
+    specified in a notice contained within the Original Software, with the
+    losing party responsible for costs, including, without limitation, court
+    costs and reasonable attorneys fees and expenses. The application of the
+    United Nations Convention on Contracts for the International Sale of
+    Goods is expressly excluded. Any law or regulation which provides that
+    the language of a contract shall be construed against the drafter shall
+    not apply to this License. You agree that You alone are responsible for
+    compliance with the United States export administration regulations (and
+    the export control laws and regulation of any other countries) when You
+    use, distribute or otherwise make available any Covered Software.
+
+    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
+    Contributors, each party is responsible for claims and damages arising,
+    directly or indirectly, out of its utilization of rights under this
+    License and You agree to work with Initial Developer and Contributors
+    to distribute such responsibility on an equitable basis. Nothing herein
+    is intended or shall be deemed to constitute any admission of liability.
+
+    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+    LICENSE (CDDL) The code released under the CDDL shall be governed by the
+    laws of the State of California (excluding conflict-of-law provisions).
+    Any litigation relating to this License shall be subject to the
+    jurisdiction of the Federal Courts of the Northern District of California
+    and the state courts of the State of California, with venue lying in
+    Santa Clara County, California.
+
+
+==============================================================================
+
+For: jaxb-xjc-2.1.7.jar
+    Containing Project URL: 
+
+Copyright (c) 2004 Kohsuke Kawaguchi
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom
+the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall
+be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=============================================================================== 
+The following components are BSD Licensed 
+=============================================================================== 
+
+For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
+    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
+
+Copyright (c) 2003-2007, Dennis M. Sosnoski
+All rights reserved.
+
+Copyright (c) 2010 Terence Parr
+All rights reserved.
+
+[The BSD License]
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+ * Neither the name of JiBX nor the names of its contributors may be used
+   to endorse or promote products derived from this software without specific
+   prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==============================================================================
+
+For YFilter:
+    Containing Project URL: http://yfilter.cs.umass.edu/
+
+YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
+
+Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this
+    list of conditions and the following disclaimer in the documentation and/or other
+    materials provided with the distribution.
+    * Neither the name of the University of California at Berkeley nor the names of
+    its contributors may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================================================
+For jaxen-1.1.1.jar:
+    Containing Project URL: http://jaxen.codehaus.org/
+
+ Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+  * Neither the name of the Jaxen Project nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================== 
+The following components are CPL Licensed 
+=============================================================================== 
+
+For wsdl4j-1.6.2.jar:
+    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
+
+Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
+"Program" means the Contributions distributed in accordance with this Agreement.
+"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within the
Program.
+Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
+If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
+Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
+
+==========================================================================================
+==========================================================================================
+
+For puretls:
+    Containing Project URL: 
+
+  This package is a SSLv3/TLS implementation written by Eric Rescorla
+   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
+      Rescorla may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+
+==============================================================================
+
+For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
+    Containing Project URL: 
+
+For the W3C schema and DTD files in the org.apache.woden.resolver package:
+
+W3C® DOCUMENT LICENSE
+http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
+
+Public documents on the W3C site are provided by the copyright holders under
+the following license. By using and/or copying this document, or the W3C
+document from which this statement is linked, you (the licensee) agree that
+you have read, understood, and will comply with the following terms and
+conditions:
+
+Permission to copy, and distribute the contents of this document, or the W3C
+document from which this statement is linked, in any medium for any purpose
+and without fee or royalty is hereby granted, provided that you include the
+following on ALL copies of the document, or portions thereof, that you use:
+
+  1. A link or URL to the original W3C document.
+  2. The pre-existing copyright notice of the original author, or if it
+     doesn't exist, a notice (hypertext is preferred, but a textual
+     representation is permitted) of the form: "Copyright © [$date-of-document]
+     World Wide Web Consortium, (Massachusetts Institute of Technology,
+     European Research Consortium for Informatics and Mathematics, Keio
+     University). All Rights Reserved.
+     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
+  3. If it exists, the STATUS of the W3C document.
+
+When space permits, inclusion of the full text of this NOTICE should be
+provided. We request that authorship attribution be provided in any software,
+documents, or other items or products that you create pursuant to the
+implementation of the contents of this document, or any portion thereof.
+
+No right to create modifications or derivatives of W3C documents is granted
+pursuant to this license. However, if additional requirements (documented in
+the Copyright FAQ) are satisfied, the right to create modifications or
+derivatives is sometimes granted by the W3C to individuals complying with
+those requirements.
+
+THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
+FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
+INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
+PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
+
+The name and trademarks of copyright holders may NOT be used in advertising
+or publicity pertaining to this document or its contents without specific,
+written prior permission. Title to copyright in this document will at all
+times remain with copyright holders.
+
+This formulation of W3C's notice and license became active on December 31 2002. 
+This version removes the copyright ownership notice such that this license can 
+be used with materials other than those owned by the W3C, reflects that ERCIM is 
+now a host of the W3C, includes references to this specific dated version of the 
+license, and removes the ambiguous grant of "use". Otherwise, this version is the 
+same as the previous version and is written so as to preserve the Free Software 
+Foundation's assessment of GPL compatibility and OSI's certification under the 
+Open Source Definition. Please see our Copyright FAQ for common questions about 
+using materials from our site, including specific terms and conditions for packages 
+like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
+o site-policy@w3.org.
+
+Joseph Reagle <si...@w3.org>
+ 
+Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
+
+==========================================================================================
+
+XML API library, org.w3c classes (xml-apis)
+    Containing Project URL: 
+
+    DOM Java Language Binding:
+    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
+
+    W3C IPR SOFTWARE NOTICE
+    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
+    Technology, Institut National de Recherche en Informatique et en
+    Automatique, Keio University). All Rights Reserved.
+
+    The DOM bindings are published under the W3C Software Copyright Notice
+    and License. The software license requires "Notice of any changes or
+    modifications to the W3C files, including the date changes were made."
+    Consequently, modified versions of the DOM bindings must document that
+    they do not conform to the W3C standard; in the case of the IDL binding,
+    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
+    binding, the package names can no longer be in the 'org.w3c' package.
+
+    Note: The original version of the W3C Software Copyright Notice and
+    License could be found at
+    http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
+    Institute of Technology, Institut National de Recherche en Informatique
+    et en Automatique, Keio University). All Rights Reserved.
+    http://www.w3.org/Consortium/Legal/
+
+    This W3C work (including software, documents, or other related items) is
+    being provided by the copyright holders under the following license. By
+    obtaining, using and/or copying this work, you (the licensee) agree that
+    you have read, understood, and will comply with the following terms and
+    conditions:
+
+    Permission to use, copy, and modify this software and its documentation,
+    with or without modification, for any purpose and without fee or royalty
+    is hereby granted, provided that you include the following on ALL copies
+    of the software and documentation or portions thereof, including
+    modifications, that you make:
+
+      1. The full text of this NOTICE in a location viewable to users of the
+         redistributed or derivative work.
+
+      2. Any pre-existing intellectual property disclaimers, notices, or
+         terms and conditions. If none exist, a short notice of the following
+         form (hypertext is preferred, text is permitted) should be used
+         within the body of any redistributed or derivative code:
+         "Copyright (C) [$date-of-software] World Wide Web Consortium,
+         (Massachusetts Institute of Technology, Institut National de
+         Recherche en Informatique et en Automatique, Keio University).
+         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+
+      3. Notice of any changes or modifications to the W3C files, including
+         the date changes were made. (We recommend you provide URIs to the
+         location from which the code is derived.)
+
+    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
+    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
+    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+    DOCUMENTATION.
+
+    The name and trademarks of copyright holders may NOT be used in
+    advertising or publicity pertaining to the software without specific,
+    written prior permission. Title to copyright in this software and any
+    associated documentation will at all times remain with copyright holders.
+
+=============================================================================== 
+The following components come under the Eclipse Public 1.0 License 
+=============================================================================== 
+Eclipse JDT Core (core-3.1.1.jar)
+
+-AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
+    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
+
+  Eclipse Public License - v 1.0
+
+    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+    1. DEFINITIONS
+
+    "Contribution" means:
+
+    a) in the case of the initial Contributor, the initial code and
+       documentation distributed under this Agreement, and
+
+    b) in the case of each subsequent Contributor:
+
+       i) changes to the Program, and
+
+       ii) additions to the Program;
+
+       where such changes and/or additions to the Program originate from and
+       are distributed by that particular Contributor. A Contribution
+       'originates' from a Contributor if it was added to the Program by
+       such Contributor itself or anyone acting on such Contributor's behalf.
+       Contributions do not include additions to the Program which: (i) are
+       separate modules of software distributed in conjunction with the
+       Program under their own license agreement, and (ii) are not derivative
+       works of the Program.
+
+    "Contributor" means any person or entity that distributes the Program.
+
+    "Licensed Patents " mean patent claims licensable by a Contributor which
+    are necessarily infringed by the use or sale of its Contribution alone or
+    when combined with the Program.
+
+    "Program" means the Contributions distributed in accordance with this
+    Agreement.
+
+    "Recipient" means anyone who receives the Program under this Agreement,
+    including all Contributors.
+
+    2. GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby grants
+       Recipient a non-exclusive, worldwide, royalty-free copyright license to
+       reproduce, prepare derivative works of, publicly display, publicly
+       perform, distribute and sublicense the Contribution of such
+       Contributor, if any, and such derivative works, in source code and
+       object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby grants
+       Recipient a non-exclusive, worldwide, royalty-free patent license under
+       Licensed Patents to make, use, sell, offer to sell, import and
+       otherwise transfer the Contribution of such Contributor, if any, in
+       source code and object code form. This patent license shall apply to
+       the combination of the Contribution and the Program if, at the time
+       the Contribution is added by the Contributor, such addition of the
+       Contribution causes such combination to be covered by the Licensed
+       Patents. The patent license shall not apply to any other combinations
+       which include the Contribution. No hardware per se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the
+       licenses to its Contributions set forth herein, no assurances are
+       provided by any Contributor that the Program does not infringe the
+       patent or other intellectual property rights of any other entity. Each
+       Contributor disclaims any liability to Recipient for claims brought by
+       any other entity based on infringement of intellectual property rights
+       or otherwise. As a condition to exercising the rights and licenses
+       granted hereunder, each Recipient hereby assumes sole responsibility
+       to secure any other intellectual property rights needed, if any. For
+       example, if a third party patent license is required to allow Recipient
+       to distribute the Program, it is Recipient's responsibility to acquire
+       that license before distributing the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+       copyright rights in its Contribution, if any, to grant the copyright
+       license set forth in this Agreement.
+
+    3. REQUIREMENTS
+
+    A Contributor may choose to distribute the Program in object code form
+    under its own license agreement, provided that:
+
+    a) it complies with the terms and conditions of this Agreement; and
+
+    b) its license agreement:
+
+       i)   effectively disclaims on behalf of all Contributors all warranties
+            and conditions, express and implied, including warranties or
+            conditions of title and non-infringement, and implied warranties
+            or conditions of merchantability and fitness for a particular
+            purpose;
+
+       ii)  effectively excludes on behalf of all Contributors all liability
+            for damages, including direct, indirect, special, incidental and
+            consequential damages, such as lost profits;
+
+       iii) states that any provisions which differ from this Agreement are
+            offered by that Contributor alone and not by any other party; and
+
+       iv)  states that source code for the Program is available from such
+            Contributor, and informs licensees how to obtain it in a
+            reasonable manner on or through a medium customarily used for
+            software exchange.
+
+    When the Program is made available in source code form:
+
+    a) it must be made available under this Agreement; and
+
+    b) a copy of this Agreement must be included with each copy of the
+       Program.
+
+    Contributors may not remove or alter any copyright notices contained
+    within the Program.
+
+    Each Contributor must identify itself as the originator of its
+    Contribution, if any, in a manner that reasonably allows subsequent
+    Recipients to identify the originator of the Contribution.
+
+    4. COMMERCIAL DISTRIBUTION
+
+    Commercial distributors of software may accept certain responsibilities
+    with respect to end users, business partners and the like. While this
+    license is intended to facilitate the commercial use of the Program,
+    the Contributor who includes the Program in a commercial product offering
+    should do so in a manner which does not create potential liability for
+    other Contributors. Therefore, if a Contributor includes the Program in
+    a commercial product offering, such Contributor ("Commercial Contributor")
+    hereby agrees to defend and indemnify every other Contributor
+    ("Indemnified Contributor") against any losses, damages and costs
+    (collectively "Losses") arising from claims, lawsuits and other legal
+    actions brought by a third party against the Indemnified Contributor to
+    the extent caused by the acts or omissions of such Commercial Contributor
+    in connection with its distribution of the Program in a commercial
+    product offering. The obligations in this section do not apply to any
+    claims or Losses relating to any actual or alleged intellectual property
+    infringement. In order to qualify, an Indemnified Contributor must:
+    a) promptly notify the Commercial Contributor in writing of such claim,
+    and b) allow the Commercial Contributor to control, and cooperate with
+    the Commercial Contributor in, the defense and any related settlement
+    negotiations. The Indemnified Contributor may participate in any such
+    claim at its own expense.
+
+    For example, a Contributor might include the Program in a commercial
+    product offering, Product X. That Contributor is then a Commercial
+    Contributor. If that Commercial Contributor then makes performance claims,
+    or offers warranties related to Product X, those performance claims and
+    warranties are such Commercial Contributor's responsibility alone. Under
+    this section, the Commercial Contributor would have to defend claims
+    against the other Contributors related to those performance claims and
+    warranties, and if a court requires any other Contributor to pay any
+    damages as a result, the Commercial Contributor must pay those damages.
+
+    5. NO WARRANTY
+
+    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
+    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
+    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
+    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
+    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
+    the appropriateness of using and distributing the Program and assumes all
+    risks associated with its exercise of rights under this Agreement ,
+    including but not limited to the risks and costs of program errors,
+    compliance with applicable laws, damage to or loss of data, programs or
+    equipment, and unavailability or interruption of operations.
+
+    6. DISCLAIMER OF LIABILITY
+
+    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
+    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+    7. GENERAL
+
+    If any provision of this Agreement is invalid or unenforceable under
+    applicable law, it shall not affect the validity or enforceability of
+    the remainder of the terms of this Agreement, and without further action
+    by the parties hereto, such provision shall be reformed to the minimum
+    extent necessary to make such provision valid and enforceable.
+
+    If Recipient institutes patent litigation against any entity (including
+    a cross-claim or counterclaim in a lawsuit) alleging that the Program
+    itself (excluding combinations of the Program with other software or
+    hardware) infringes such Recipient's patent(s), then such Recipient's
+    rights granted under Section 2(b) shall terminate as of the date such
+    litigation is filed.
+
+    All Recipient's rights under this Agreement shall terminate if it fails
+    to comply with any of the material terms or conditions of this Agreement
+    and does not cure such failure in a reasonable period of time after
+    becoming aware of such noncompliance. If all Recipient's rights under
+    this Agreement terminate, Recipient agrees to cease use and distribution
+    of the Program as soon as reasonably practicable. However, Recipient's
+    obligations under this Agreement and any licenses granted by Recipient
+    relating to the Program shall continue and survive.
+
+    Everyone is permitted to copy and distribute copies of this Agreement,
+    but in o

<TRUNCATED>

[28/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
deleted file mode 100644
index 7a2e885..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- *
- * 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.gsissh.security;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.credential.Credential;
-import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.globus.gsi.X509Credential;
-import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
-import org.globus.gsi.provider.GlobusProvider;
-import org.globus.myproxy.GetParams;
-import org.globus.myproxy.MyProxy;
-import org.globus.myproxy.MyProxyException;
-import org.gridforum.jgss.ExtendedGSSCredential;
-import org.ietf.jgss.GSSCredential;
-import org.ietf.jgss.GSSException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.security.Security;
-import java.security.cert.X509Certificate;
-
-public class TokenizedMyProxyAuthInfo extends GSIAuthenticationInfo {
-    protected static final Logger log = LoggerFactory.getLogger(TokenizedMyProxyAuthInfo.class);
-
-    public static int CREDENTIAL_RENEWING_THRESH_HOLD = 10 * 90;
-
-    private GSSCredential gssCredentials = null;
-
-
-    private CredentialReader credentialReader;
-
-    private RequestData requestData;
-
-    public static final String X509_CERT_DIR = "X509_CERT_DIR";
-
-
-    static {
-        Security.addProvider(new GlobusProvider());
-        try {
-            setUpTrustedCertificatePath();
-        } catch (ApplicationSettingsException e) {
-            log.error(e.getLocalizedMessage(), e);
-        }
-    }
-
-    public static void setUpTrustedCertificatePath(String trustedCertificatePath) {
-
-        File file = new File(trustedCertificatePath);
-
-        if (!file.exists() || !file.canRead()) {
-            File f = new File(".");
-            log.info("Current directory " + f.getAbsolutePath());
-            throw new RuntimeException("Cannot read trusted certificate path " + trustedCertificatePath);
-        } else {
-            System.setProperty(Constants.TRUSTED_CERTIFICATE_SYSTEM_PROPERTY, file.getAbsolutePath());
-        }
-    }
-
-    private static void setUpTrustedCertificatePath() throws ApplicationSettingsException {
-
-        String trustedCertificatePath = ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION);
-
-        setUpTrustedCertificatePath(trustedCertificatePath);
-    }
-
-    public TokenizedMyProxyAuthInfo(CredentialReader credentialReader, RequestData requestData) {
-        this.credentialReader = credentialReader;
-        this.requestData = requestData;
-        try {
-            properties.setProperty(X509_CERT_DIR, ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION));
-        } catch (ApplicationSettingsException e) {
-            log.error("Error while  reading server properties", e);
-        };
-    }
-
-    public TokenizedMyProxyAuthInfo(RequestData requestData) {
-           this.requestData = requestData;
-           try {
-               properties.setProperty(X509_CERT_DIR, ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION));
-           } catch (ApplicationSettingsException e) {
-               log.error("Error while  reading server properties", e);
-           };
-       }
-
-    public GSSCredential getCredentials() throws SecurityException {
-
-        if (gssCredentials == null) {
-
-            try {
-                gssCredentials = getCredentialsFromStore();
-            } catch (Exception e) {
-                log.error("An exception occurred while retrieving credentials from the credential store. " +
-                        "Will continue with my proxy user name and password. Provided TokenId:" + requestData.getTokenId(), e);
-            }
-
-            if (gssCredentials == null) {
-                System.out.println("Authenticating with provided token failed, so falling back to authenticate with defaultCredentials");
-                try {
-                    gssCredentials = getDefaultCredentials();
-                } catch (Exception e) {
-                    throw new SecurityException("Error retrieving my proxy using username password");
-                }
-            }
-            // if still null, throw an exception
-            if (gssCredentials == null) {
-                throw new SecurityException("Unable to retrieve my proxy credentials to continue operation.");
-            }
-        } else {
-            try {
-                if (gssCredentials.getRemainingLifetime() < CREDENTIAL_RENEWING_THRESH_HOLD) {
-                    try {
-                        return renewCredentials();
-                    } catch (Exception e) {
-                        throw new SecurityException("Error renewing credentials", e);
-                    }
-                }
-            } catch (GSSException e) {
-                throw new SecurityException("Unable to retrieve remaining life time from credentials.", e);
-            }
-        }
-
-        return gssCredentials;
-    }
-
-
-    /**
-     * Reads the credentials from credential store.
-     *
-     * @return If token is found in the credential store, will return a valid credential. Else returns null.
-     * @throws Exception If an error occurred while retrieving credentials.
-     */
-    public GSSCredential getCredentialsFromStore() throws Exception {
-
-        if (getCredentialReader() == null) {
-        	credentialReader = GFacUtils.getCredentialReader();
-        	if(credentialReader == null){
-        		return null;
-        	}
-        }
-
-        Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
-                getRequestData().getTokenId());
-
-        if (credential != null) {
-            if (credential instanceof CertificateCredential) {
-
-                log.info("Successfully found credentials for token id - " + getRequestData().getTokenId() +
-                        " gateway id - " + getRequestData().getGatewayId());
-
-                CertificateCredential certificateCredential = (CertificateCredential) credential;
-
-                X509Certificate[] certificates = certificateCredential.getCertificates();
-                X509Credential newCredential = new X509Credential(certificateCredential.getPrivateKey(), certificates);
-
-                GlobusGSSCredentialImpl cred = new GlobusGSSCredentialImpl(newCredential, GSSCredential.INITIATE_AND_ACCEPT);
-                System.out.print(cred.export(ExtendedGSSCredential.IMPEXP_OPAQUE));
-                return cred;
-                //return new GlobusGSSCredentialImpl(newCredential,
-                //        GSSCredential.INITIATE_AND_ACCEPT);
-            } else {
-                log.info("Credential type is not CertificateCredential. Cannot create mapping globus credentials. " +
-                        "Credential type - " + credential.getClass().getName());
-            }
-        } else {
-            log.info("Could not find credentials for token - " + getRequestData().getTokenId() + " and "
-                    + "gateway id - " + getRequestData().getGatewayId());
-        }
-
-        return null;
-    }
-
-    /**
-     * Renew GSSCredentials.
-     * Before executing we need to add current host as a trusted renewer. Note to renew credentials
-     * we dont need user name and password.
-     * To do that execute following command
-     * > myproxy-logon -t <LIFETIME></LIFETIME> -s <MY PROXY SERVER> -l <USER NAME>
-     * E.g :- > myproxy-logon -t 264 -s myproxy.teragrid.org -l us3
-     * Enter MyProxy pass phrase:
-     * A credential has been received for user us3 in /tmp/x509up_u501.
-     * > myproxy-init -A --cert /tmp/x509up_u501 --key /tmp/x509up_u501 -l ogce -s myproxy.teragrid.org
-     *
-     * @return Renewed credentials.
-     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while renewing credentials.
-     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
-     */
-    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException, ApplicationSettingsException {
-        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
-        GetParams getParams = new GetParams();
-        getParams.setAuthzCreds(gssCredentials);
-        getParams.setUserName(getRequestData().getMyProxyUserName());
-        getParams.setLifetime(getRequestData().getMyProxyLifeTime());
-        try {
-            return myproxy.get(gssCredentials, getParams);
-        } catch (MyProxyException e) {
-            throw new GFacException("An error occurred while renewing security credentials.", e);
-        }
-    }
-
-
-    /**
-     * Gets the default proxy certificate.
-     *
-     * @return Default my proxy credentials.
-     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while retrieving credentials.
-     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
-     */
-    public GSSCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException {
-        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
-        try {
-            return myproxy.get(getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
-                    getRequestData().getMyProxyLifeTime());
-        } catch (MyProxyException e) {
-            throw new GFacException("An error occurred while retrieving default security credentials.", e);
-        }
-    }
-
-
-    /**
-     * Renews credentials. First try to renew credentials as a trusted renewer. If that failed
-     * use user name and password to renew credentials.
-     *
-     * @return Renewed credentials.
-     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while renewing credentials.
-     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
-     */
-    public GSSCredential renewCredentials() throws GFacException, ApplicationSettingsException {
-
-        // First try to renew credentials as a trusted renewer
-        try {
-            gssCredentials = renewCredentialsAsATrustedHost();
-        } catch (Exception e) {
-            log.warn("Renewing credentials as a trusted renewer failed", e);
-            gssCredentials = getDefaultCredentials();
-        }
-
-        return gssCredentials;
-    }
-
-    /**
-     * Gets a new proxy certificate given current credentials.
-     *
-     * @return The short lived GSSCredentials
-     * @throws org.apache.airavata.gfac.GFacException                            If an error is occurred while retrieving credentials.
-     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
-     */
-    public GSSCredential getProxyCredentials() throws GFacException, ApplicationSettingsException {
-
-        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
-        try {
-            return myproxy.get(gssCredentials, getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
-                    getRequestData().getMyProxyLifeTime());
-        } catch (MyProxyException e) {
-            throw new GFacException("An error occurred while renewing security credentials using user/password.", e);
-        }
-    }
-
-    public void setGssCredentials(GSSCredential gssCredentials) {
-        this.gssCredentials = gssCredentials;
-    }
-
-    public CredentialReader getCredentialReader() {
-        return credentialReader;
-    }
-
-    public void setCredentialReader(CredentialReader credentialReader) {
-        this.credentialReader = credentialReader;
-    }
-
-    public RequestData getRequestData() {
-        return requestData;
-    }
-
-    public void setRequestData(RequestData requestData) {
-        this.requestData = requestData;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
deleted file mode 100644
index 0428bc0..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- *
- * 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.gsissh.util;
-
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.security.TokenizedMyProxyAuthInfo;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
-import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.*;
-
-
-public class GFACGSISSHUtils {
-    private final static Logger logger = LoggerFactory.getLogger(GFACGSISSHUtils.class);
-
-    public static final String PBS_JOB_MANAGER = "pbs";
-    public static final String SLURM_JOB_MANAGER = "slurm";
-    public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
-    public static final String LSF_JOB_MANAGER = "lsf";
-
-    public static int maxClusterCount = 5;
-    public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
-
-    public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
-        JobSubmissionInterface jobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
-        JobSubmissionProtocol jobProtocol = jobSubmissionInterface.getJobSubmissionProtocol();
-        try {
-            AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
-            SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
-            if (jobProtocol == JobSubmissionProtocol.GLOBUS || jobProtocol == JobSubmissionProtocol.UNICORE
-                    || jobProtocol == JobSubmissionProtocol.CLOUD || jobProtocol == JobSubmissionProtocol.LOCAL) {
-                logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
-            } else if (jobProtocol == JobSubmissionProtocol.SSH && sshJobSubmission.getSecurityProtocol() == SecurityProtocol.GSI) {
-                String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
-                RequestData requestData = new RequestData(jobExecutionContext.getGatewayID());
-                requestData.setTokenId(credentialStoreToken);
-                PBSCluster pbsCluster = null;
-                GSISecurityContext context = null;
-
-                TokenizedMyProxyAuthInfo tokenizedMyProxyAuthInfo = new TokenizedMyProxyAuthInfo(requestData);
-                CredentialReader credentialReader = GFacUtils.getCredentialReader();
-                if (credentialReader != null) {
-                    CertificateCredential credential = null;
-                    try {
-                        credential = (CertificateCredential) credentialReader.getCredential(jobExecutionContext.getGatewayID(), credentialStoreToken);
-                        requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
-                    } catch (Exception e) {
-                        logger.error(e.getLocalizedMessage());
-                    }
-                }
-
-                String key = requestData.getMyProxyUserName() + jobExecutionContext.getHostName()+
-                        sshJobSubmission.getSshPort();
-                boolean recreate = false;
-                synchronized (clusters) {
-                    if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
-                        recreate = true;
-                    } else if (clusters.containsKey(key)) {
-                        int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
-                        if (clusters.get(key).get(i).getSession().isConnected()) {
-                            pbsCluster = (PBSCluster) clusters.get(key).get(i);
-                        } else {
-                            clusters.get(key).remove(i);
-                            recreate = true;
-                        }
-                        if (!recreate) {
-                            try {
-                                pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
-                            } catch (Exception e) {
-                                clusters.get(key).remove(i);
-                                logger.info("Connection found the connection map is expired, so we create from the scratch");
-                                maxClusterCount++;
-                                recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
-                            }
-                            logger.info("Re-using the same connection used with the connection string:" + key);
-                            context = new GSISecurityContext(tokenizedMyProxyAuthInfo.getCredentialReader(), requestData, pbsCluster);
-                        }
-                    } else {
-                        recreate = true;
-                    }
-
-                    if (recreate) {
-                        ServerInfo serverInfo = new ServerInfo(requestData.getMyProxyUserName(), jobExecutionContext.getHostName(),
-                                sshJobSubmission.getSshPort());
-
-                        JobManagerConfiguration jConfig = null;
-                        String installedParentPath = sshJobSubmission.getResourceJobManager().getJobManagerBinPath();
-                        String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
-                        if (jobManager == null) {
-                            logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
-                            jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-                        } else {
-                            if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-                            } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
-                            } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                jConfig = CommonUtils.getUGEJobManager(installedParentPath);
-                            }else if(LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                jConfig = CommonUtils.getLSFJobManager(installedParentPath);
-                            }
-                        }
-                        pbsCluster = new PBSCluster(serverInfo, tokenizedMyProxyAuthInfo, jConfig);
-                        context = new GSISecurityContext(tokenizedMyProxyAuthInfo.getCredentialReader(), requestData, pbsCluster);
-                        List<Cluster> pbsClusters = null;
-                        if (!(clusters.containsKey(key))) {
-                            pbsClusters = new ArrayList<Cluster>();
-                        } else {
-                            pbsClusters = clusters.get(key);
-                        }
-                        pbsClusters.add(pbsCluster);
-                        clusters.put(key, pbsClusters);
-                    }
-                }
-
-                jobExecutionContext.addSecurityContext(jobExecutionContext.getHostName(), context);
-            }
-        } catch (Exception e) {
-            throw new GFacException("An error occurred while creating GSI security context", e);
-        }
-    }
-
-    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) {
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        TaskDetails taskData = jobExecutionContext.getTaskData();
-        ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
-        try {
-			if(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")){
-				jobDescriptor.setMailOptions(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS));
-				String emailids = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
-
-				if(jobExecutionContext.getTaskData().isSetEmailAddresses()){
-					List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
-					String elist = GFacUtils.listToCsv(emailList, ',');
-					if(emailids != null && !emailids.isEmpty()){
-						emailids = emailids +"," + elist;
-					}else{
-						emailids = elist;
-					}
-				}
-				if(emailids != null && !emailids.isEmpty()){
-					logger.info("Email list: "+ emailids);
-					jobDescriptor.setMailAddress(emailids);
-				}
-			}
-		} catch (ApplicationSettingsException e) {
-			 logger.error("ApplicationSettingsException : " +e.getLocalizedMessage());
-		}
-        // this is common for any application descriptor
-        jobDescriptor.setCallBackIp(ServerSettings.getIp());
-        jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
-        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
-        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
-        jobDescriptor.setExecutablePath(jobExecutionContext.getExecutablePath());
-        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
-        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
-        String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
-        taskData.getEmailAddresses();
-        if (computationalProjectAccount == null){
-            ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
-            if (computeResourcePreference != null) {
-                computationalProjectAccount = computeResourcePreference.getAllocationProjectNumber();
-            }
-        }
-        if (computationalProjectAccount != null) {
-            jobDescriptor.setAcountString(computationalProjectAccount);
-        }
-
-        Random random = new Random();
-        int i = random.nextInt(Integer.MAX_VALUE); // We always set the job name
-        jobDescriptor.setJobName("A" + String.valueOf(i+99999999));
-        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
-
-        List<String> inputValues = new ArrayList<String>();
-        MessageContext input = jobExecutionContext.getInMessageContext();
-        // sort the inputs first and then build the command List
-        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
-            @Override
-            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
-                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
-            }
-        };
-        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
-        for (Object object : input.getParameters().values()) {
-            if (object instanceof InputDataObjectType) {
-                InputDataObjectType inputDOT = (InputDataObjectType) object;
-                sortedInputSet.add(inputDOT);
-            }
-        }
-        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
-            if (!inputDataObjectType.isRequiredToAddedToCommandLine()) {
-                continue;
-            }
-            if (inputDataObjectType.getApplicationArgument() != null
-                    && !inputDataObjectType.getApplicationArgument().equals("")) {
-                inputValues.add(inputDataObjectType.getApplicationArgument());
-            }
-
-            if (inputDataObjectType.getValue() != null
-                    && !inputDataObjectType.getValue().equals("")) {
-                if (inputDataObjectType.getType() == DataType.URI) {
-                    // set only the relative path
-                    String filePath = inputDataObjectType.getValue();
-                    filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
-                    inputValues.add(filePath);
-                }else {
-                    inputValues.add(inputDataObjectType.getValue());
-                }
-
-            }
-        }
-
-        Map<String, Object> outputParams = jobExecutionContext.getOutMessageContext().getParameters();
-        for (Object outputParam : outputParams.values()) {
-            if (outputParam instanceof OutputDataObjectType) {
-                OutputDataObjectType output = (OutputDataObjectType) outputParam;
-                if (output.getApplicationArgument() != null
-                        && !output.getApplicationArgument().equals("")) {
-                    inputValues.add(output.getApplicationArgument());
-                }
-                if (output.getValue() != null && !output.getValue().equals("") && output.isRequiredToAddedToCommandLine()) {
-                    if (output.getType() == DataType.URI){
-                        String filePath = output.getValue();
-                        filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
-                        inputValues.add(filePath);
-                    }
-                }
-            }
-        }
-        jobDescriptor.setInputValues(inputValues);
-
-        jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
-
-        ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
-        if (taskScheduling != null) {
-            int totalNodeCount = taskScheduling.getNodeCount();
-            int totalCPUCount = taskScheduling.getTotalCPUCount();
-
-//        jobDescriptor.setJobSubmitter(applicationDeploymentType.getJobSubmitterCommand());
-            if (taskScheduling.getComputationalProjectAccount() != null) {
-                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
-            }
-            if (taskScheduling.getQueueName() != null) {
-                jobDescriptor.setQueueName(taskScheduling.getQueueName());
-            }
-
-            if (totalNodeCount > 0) {
-                jobDescriptor.setNodes(totalNodeCount);
-            }
-            if (taskScheduling.getComputationalProjectAccount() != null) {
-                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
-            }
-            if (taskScheduling.getQueueName() != null) {
-                jobDescriptor.setQueueName(taskScheduling.getQueueName());
-            }
-            if (totalCPUCount > 0) {
-                int ppn = totalCPUCount / totalNodeCount;
-                jobDescriptor.setProcessesPerNode(ppn);
-                jobDescriptor.setCPUCount(totalCPUCount);
-            }
-            if (taskScheduling.getWallTimeLimit() > 0) {
-                jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
-                if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
-                    jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
-                }
-            }
-
-            if (taskScheduling.getTotalPhysicalMemory() > 0) {
-                jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
-            }
-        } else {
-            logger.error("Task scheduling cannot be null at this point..");
-        }
-
-        ApplicationDeploymentDescription appDepDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        List<String> moduleCmds = appDepDescription.getModuleLoadCmds();
-        if (moduleCmds != null) {
-            for (String moduleCmd : moduleCmds) {
-                jobDescriptor.addModuleLoadCommands(moduleCmd);
-            }
-        }
-        List<String> preJobCommands = appDepDescription.getPreJobCommands();
-        if (preJobCommands != null) {
-            for (String preJobCommand : preJobCommands) {
-                jobDescriptor.addPreJobCommand(parseCommand(preJobCommand, jobExecutionContext));
-            }
-        }
-
-        List<String> postJobCommands = appDepDescription.getPostJobCommands();
-        if (postJobCommands != null) {
-            for (String postJobCommand : postJobCommands) {
-                jobDescriptor.addPostJobCommand(parseCommand(postJobCommand, jobExecutionContext));
-            }
-        }
-
-        ApplicationParallelismType parallelism = appDepDescription.getParallelism();
-        if (parallelism != null){
-            if (parallelism == ApplicationParallelismType.MPI || parallelism == ApplicationParallelismType.OPENMP || parallelism == ApplicationParallelismType.OPENMP_MPI){
-                Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
-                if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
-                    for (JobManagerCommand command : jobManagerCommands.keySet()) {
-                        if (command == JobManagerCommand.SUBMISSION) {
-                            String commandVal = jobManagerCommands.get(command);
-                            jobDescriptor.setJobSubmitter(commandVal);
-                        }
-                    }
-                }
-            }
-        }
-        return jobDescriptor;
-    }
-
-    private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
-        String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
-        parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
-        parsedValue = parsedValue.replaceAll("\\$outputDir", jobExecutionContext.getOutputDir());
-        return parsedValue;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/resources/errors.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/resources/errors.properties b/modules/gfac/gfac-gsissh/src/main/resources/errors.properties
deleted file mode 100644
index 88c41b8..0000000
--- a/modules/gfac/gfac-gsissh/src/main/resources/errors.properties
+++ /dev/null
@@ -1,197 +0,0 @@
-#
-#
-# 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.
-#
-
-# Directly copied from jglobus. Not a good way to manager error properties.
-1 = Parameter not supported
-2 = The RSL length is greater than the maximum allowed
-3 = No resources available
-4 = Bad directory specified
-5 = The executable does not exist
-6 = Insufficient funds
-7 = Authentication with the remote server failed
-8 = Job cancelled by user
-9 = Job cancelled by system
-
-10 = Data transfer to the server failed
-11 = The stdin file does not exist
-12 = The connection to the server failed (check host and port)
-13 = The provided RSL 'maxtime' value is invalid (not an integer or must be greater than 0)
-14 = The provided RSL 'count' value is invalid (not an integer or must be greater than 0)
-15 = The job manager received an invalid RSL
-16 = Could not connect to job manager
-17 = The job failed when the job manager attempted to run it
-18 = Paradyn error
-19 = The provided RSL 'jobtype' value is invalid
-
-20 = The provided RSL 'myjob' value is invalid
-21 = The job manager failed to locate an internal script argument file
-22 = The job manager failed to create an internal script argument file
-23 = The job manager detected an invalid job state
-24 = The job manager detected an invalid script response
-25 = The job manager detected an invalid job state
-26 = The provided RSL 'jobtype' value is not supported by this job manager
-27 = Unimplemented
-28 = The job manager failed to create an internal script submission file
-29 = The job manager cannot find the user proxy
-
-30 = The job manager failed to open the user proxy
-31 = The job manager failed to cancel the job as requested
-32 = System memory allocation failed
-33 = The interprocess job communication initialization failed
-34 = The interprocess job communication setup failed
-35 = The provided RSL 'host count' value is invalid
-36 = One of the provided RSL parameters is unsupported
-37 = The provided RSL 'queue' parameter is invalid
-38 = The provided RSL 'project' parameter is invalid
-39 = The provided RSL string includes variables that could not be identified
-
-40 = The provided RSL 'environment' parameter is invalid
-41 = The provided RSL 'dryrun' parameter is invalid
-42 = The provided RSL is invalid (an empty string)
-43 = The job manager failed to stage the executable
-44 = The job manager failed to stage the stdin file
-45 = The requested job manager type is invalid
-46 = The provided RSL 'arguments' parameter is invalid
-47 = The gatekeeper failed to run the job manager
-48 = The provided RSL could not be properly parsed
-49 = There is a version mismatch between GRAM components
-
-50 = The provided RSL 'arguments' parameter is invalid
-51 = The provided RSL 'count' parameter is invalid
-52 = The provided RSL 'directory' parameter is invalid
-53 = The provided RSL 'dryrun' parameter is invalid
-54 = The provided RSL 'environment' parameter is invalid
-55 = The provided RSL 'executable' parameter is invalid
-56 = The provided RSL 'host_count' parameter is invalid
-57 = The provided RSL 'jobtype' parameter is invalid
-58 = The provided RSL 'maxtime' parameter is invalid
-59 = The provided RSL 'myjob' parameter is invalid
-
-60 = The provided RSL 'paradyn' parameter is invalid
-61 = The provided RSL 'project' parameter is invalid
-62 = The provided RSL 'queue' parameter is invalid
-63 = The provided RSL 'stderr' parameter is invalid
-64 = The provided RSL 'stdin' parameter is invalid
-65 = The provided RSL 'stdout' parameter is invalid
-66 = The job manager failed to locate an internal script
-67 = The job manager failed on the system call pipe()
-68 = The job manager failed on the system call fcntl()
-69 = The job manager failed to create the temporary stdout filename
-
-70 = The job manager failed to create the temporary stderr filename
-71 = The job manager failed on the system call fork()
-72 = The executable file permissions do not allow execution
-73 = The job manager failed to open stdout
-74 = The job manager failed to open stderr
-75 = The cache file could not be opened in order to relocate the user proxy
-76 = Cannot access cache files in ~/.globus/.gass_cache, check permissions, quota, and disk space
-77 = The job manager failed to insert the contact in the client contact list
-78 = The contact was not found in the job manager's client contact list
-79 = Connecting to the job manager failed.  Possible reasons: job terminated, invalid job contact, network problems, ...
-
-80 = The syntax of the job contact is invalid
-81 = The executable parameter in the RSL is undefined
-82 = The job manager service is misconfigured.  condor arch undefined
-83 = The job manager service is misconfigured.  condor os undefined
-84 = The provided RSL 'min_memory' parameter is invalid
-85 = The provided RSL 'max_memory' parameter is invalid
-86 = The RSL 'min_memory' value is not zero or greater
-87 = The RSL 'max_memory' value is not zero or greater
-88 = The creation of a HTTP message failed
-89 = Parsing incoming HTTP message failed
-
-90 = The packing of information into a HTTP message failed
-91 = An incoming HTTP message did not contain the expected information
-92 = The job manager does not support the service that the client requested
-93 = The gatekeeper failed to find the requested service
-94 = The jobmanager does not accept any new requests (shutting down)
-95 = The client failed to close the listener associated with the callback URL
-96 = The gatekeeper contact cannot be parsed
-97 = The job manager could not find the 'poe' command
-98 = The job manager could not find the 'mpirun' command
-99 = The provided RSL 'start_time' parameter is invalid"
-100 = The provided RSL 'reservation_handle' parameter is invalid
-
-101 = The provided RSL 'max_wall_time' parameter is invalid
-102 = The RSL 'max_wall_time' value is not zero or greater
-103 = The provided RSL 'max_cpu_time' parameter is invalid
-104 = The RSL 'max_cpu_time' value is not zero or greater
-105 = The job manager is misconfigured, a scheduler script is missing
-106 = The job manager is misconfigured, a scheduler script has invalid permissions
-107 = The job manager failed to signal the job
-108 = The job manager did not recognize/support the signal type
-109 = The job manager failed to get the job id from the local scheduler
-
-110 = The job manager is waiting for a commit signal
-111 = The job manager timed out while waiting for a commit signal
-112 = The provided RSL 'save_state' parameter is invalid
-113 = The provided RSL 'restart' parameter is invalid
-114 = The provided RSL 'two_phase' parameter is invalid
-115 = The RSL 'two_phase' value is not zero or greater
-116 = The provided RSL 'stdout_position' parameter is invalid
-117 = The RSL 'stdout_position' value is not zero or greater
-118 = The provided RSL 'stderr_position' parameter is invalid
-119 = The RSL 'stderr_position' value is not zero or greater
-
-120 = The job manager restart attempt failed
-121 = The job state file doesn't exist
-122 = Could not read the job state file
-123 = Could not write the job state file
-124 = The old job manager is still alive
-125 = The job manager state file TTL expired
-126 = It is unknown if the job was submitted
-127 = The provided RSL 'remote_io_url' parameter is invalid
-128 = Could not write the remote io url file
-129 = The standard output/error size is different
-
-130 = The job manager was sent a stop signal (job is still running)
-131 = The user proxy expired (job is still running)
-132 = The job was not submitted by original jobmanager
-133 = The job manager is not waiting for that commit signal
-134 = The provided RSL scheduler specific parameter is invalid
-135 = The job manager could not stage in a file
-136 = The scratch directory could not be created
-137 = The provided 'gass_cache' parameter is invalid
-138 = The RSL contains attributes which are not valid for job submission
-139 = The RSL contains attributes which are not valid for stdio update
-
-140 = The RSL contains attributes which are not valid for job restart
-141 = The provided RSL 'file_stage_in' parameter is invalid
-142 = The provided RSL 'file_stage_in_shared' parameter is invalid
-143 = The provided RSL 'file_stage_out' parameter is invalid
-144 = The provided RSL 'gass_cache' parameter is invalid
-145 = The provided RSL 'file_cleanup' parameter is invalid
-146 = The provided RSL 'scratch_dir' parameter is invalid
-147 = The provided scheduler-specific RSL parameter is invalid
-148 = A required RSL attribute was not defined in the RSL spec
-149 = The gass_cache attribute points to an invalid cache directory
-
-150 = The provided RSL 'save_state' parameter has an invalid value
-151 = The job manager could not open the RSL attribute validation file
-152 = The  job manager could not read the RSL attribute validation file
-153 = The provided RSL 'proxy_timeout' is invalid
-154 = The RSL 'proxy_timeout' value is not greater than zero
-155 = The job manager could not stage out a file
-156 = The job contact string does not match any which the job manager is handling
-157 = Proxy delegation failed
-158 = The job manager could not lock the state lock file
-
-1000 = Failed to start up callback handler
-1003 = Job contact not set

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/resources/service.properties b/modules/gfac/gfac-gsissh/src/main/resources/service.properties
deleted file mode 100644
index 391bfea..0000000
--- a/modules/gfac/gfac-gsissh/src/main/resources/service.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-#
-# 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.
-#
-#
-
-
-#
-# Class which implemented Scheduler interface. It will be used to determine a Provider
-#
-scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# SSH private key location. It will be used by SSHProvider
-#
-# ssh.key=/home/user/.ssh/id_rsa
-# ssh.keypass=
-# ssh.username=usernameAtHost
-
-#
-# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
-#
-# myproxy.server=myproxy.teragrid.org
-# myproxy.user=username
-# myproxy.pass=password
-# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
deleted file mode 100644
index 630cd5c..0000000
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ /dev/null
@@ -1,229 +0,0 @@
-///*
-// *
-// * 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.core.gfac.services.impl;
-//
-//import java.io.File;
-//import java.net.URL;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.UUID;
-//
-//import org.apache.aiaravata.application.catalog.data.model.ApplicationInterface;
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.gfac.GFacConfiguration;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.SecurityContext;
-//import org.apache.airavata.gfac.core.context.ApplicationContext;
-//import org.apache.airavata.gfac.core.context.JobExecutionContext;
-//import org.apache.airavata.gfac.core.context.MessageContext;
-//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-//import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-//import org.apache.airavata.gsi.ssh.api.Cluster;
-//import org.apache.airavata.gsi.ssh.api.SSHApiException;
-//import org.apache.airavata.gsi.ssh.api.ServerInfo;
-//import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-//import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.util.CommonUtils;
-//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-//import org.apache.airavata.model.workspace.experiment.TaskDetails;
-//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-//import org.apache.airavata.schemas.gfac.GsisshHostType;
-//import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
-//import org.apache.airavata.schemas.gfac.InputParameterType;
-//import org.apache.airavata.schemas.gfac.JobTypeType;
-//import org.apache.airavata.schemas.gfac.OutputParameterType;
-//import org.apache.airavata.schemas.gfac.ProjectAccountType;
-//import org.apache.airavata.schemas.gfac.QueueType;
-//import org.apache.airavata.schemas.gfac.StringParameterType;
-//import org.testng.annotations.BeforeClass;
-//import org.testng.annotations.Test;
-//
-//public class GSISSHProviderTestWithMyProxyAuth {
-//    private JobExecutionContext jobExecutionContext;
-//
-//    //FIXME: move job properties to configuration file
-//    private static final String hostAddress = "trestles.sdsc.edu";
-//    private static final String hostName = "trestles";
-//    private String myProxyUserName;
-//    private String myProxyPassword;
-//    private String workingDirectory;
-//    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-//
-//    @BeforeClass
-//    public void setUp() throws Exception {
-////        System.setProperty("myproxy.user", "ogce");
-////        System.setProperty("myproxy.password", "");
-////        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
-////        System.setProperty("gsi.working.directory", "/home/ogce");
-////        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
-//        certificateLocation = System.getProperty("trusted.cert.location");
-//        myProxyUserName = System.getProperty("myproxy.username");
-//        myProxyPassword = System.getProperty("myproxy.password");
-//        workingDirectory = System.getProperty("gsi.working.directory");
-//
-//        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
-//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-//            throw new Exception("Need my proxy user name password to run tests.");
-//        }
-//        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        assert resource != null;
-//        System.out.println(resource.getFile());
-//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
-//
-//        /*
-//        * Host
-//        */
-//        HostDescription host = new HostDescription(GsisshHostType.type);
-//        host.getType().setHostAddress(hostAddress);
-//        host.getType().setHostName(hostName);
-//
-//        /*
-//        * App
-//        */
-//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//        name.setStringValue("EchoLocal");
-//        app.setApplicationName(name);
-//        ProjectAccountType projectAccountType = app.addNewProjectAccount();
-//        projectAccountType.setProjectAccountNumber("sds128");
-//
-//        QueueType queueType = app.addNewQueue();
-//        queueType.setQueueName("normal");
-//
-//        app.setCpuCount(1);
-//        app.setJobType(JobTypeType.SERIAL);
-//        app.setNodeCount(1);
-//        app.setProcessorsPerNode(1);
-//
-//        /*
-//        * Use bat file if it is compiled on Windows
-//        */
-//        app.setExecutableLocation("/bin/echo");
-//
-//        /*
-//        * Default tmp location
-//        */
-//        String tempDir = "/home/ogce/scratch/";
-//        String date = (new Date()).toString();
-//        date = date.replaceAll(" ", "_");
-//        date = date.replaceAll(":", "_");
-//
-//        tempDir = workingDirectory + File.separator
-//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-//
-//        System.out.println(tempDir);
-//        app.setScratchWorkingDirectory(tempDir);
-//        app.setStaticWorkingDirectory(tempDir);
-//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
-//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
-//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
-//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
-//        app.setMaxWallTime(5);
-//        app.setInstalledParentPath("/opt/torque/bin/");
-//
-//        /*
-//        * Service
-//        */
-//        ServiceDescription serv = new ServiceDescription();
-//        serv.getType().setName("SimpleEcho");
-//
-//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-//
-//        InputParameterType input = InputParameterType.Factory.newInstance();
-//        input.setParameterName("echo_input");
-//        input.setParameterType(StringParameterType.Factory.newInstance());
-//        inputList.add(input);
-//
-//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-//
-//                .size()]);
-//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//        OutputParameterType output = OutputParameterType.Factory.newInstance();
-//        output.setParameterName("echo_output");
-//        output.setParameterType(StringParameterType.Factory.newInstance());
-//        outputList.add(output);
-//
-//        OutputParameterType[] outputParamList = outputList
-//                .toArray(new OutputParameterType[outputList.size()]);
-//
-//        serv.getType().setInputParametersArray(inputParamList);
-//        serv.getType().setOutputParametersArray(outputParamList);
-//
-//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-//        // Adding security context
-//        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
-//        ApplicationContext applicationContext = new ApplicationContext();
-//        jobExecutionContext.setApplicationContext(applicationContext);
-//        applicationContext.setServiceDescription(serv);
-//        applicationContext.setApplicationDeploymentDescription(appDesc);
-//        applicationContext.setHostDescription(host);
-//
-//        MessageContext inMessage = new MessageContext();
-//        ActualParameter echo_input = new ActualParameter();
-//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-//        inMessage.addParameter("echo_input", echo_input);
-//
-//
-//        jobExecutionContext.setInMessageContext(inMessage);
-//
-//        MessageContext outMessage = new MessageContext();
-//        ActualParameter echo_out = new ActualParameter();
-////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-//        outMessage.addParameter("echo_output", echo_out);
-//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
-//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
-//        jobExecutionContext.setOutMessageContext(outMessage);
-//
-//    }
-//
-//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
-//        GSIAuthenticationInfo authenticationInfo
-//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-//                7512, 17280000, certificateLocation);
-//
-//        // Server info
-//        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
-//        Cluster pbsCluster = null;
-//        try {
-//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(app.getInstalledParentPath()));
-//        } catch (SSHApiException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        }
-//        GSISecurityContext sshSecurityContext = new GSISecurityContext(pbsCluster);
-//        return sshSecurityContext;
-//    }
-//    @Test
-//    public void testGSISSHProvider() throws GFacException {
-//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-//        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
-//        System.out.println(jobExecutionContext.getJobDetails().getJobID());
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
deleted file mode 100644
index 9268d84..0000000
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- *
- * 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.core.gfac.services.impl.security;
-
-import junit.framework.Assert;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.DatabaseTestCases;
-import org.apache.airavata.common.utils.DerbyUtil;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.credential.store.store.CredentialReaderFactory;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.security.TokenizedMyProxyAuthInfo;
-import org.apache.log4j.Logger;
-import org.ietf.jgss.GSSCredential;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-
-public class GSISecurityContextTestWithMyProxyAuth extends DatabaseTestCases {
-
-    private static String userName;
-    private static String password;
-
-    private static final Logger log = Logger.getLogger(GSISecurityContextTestWithMyProxyAuth.class);
-
-    @BeforeClass
-    public static void setUpClass() throws Exception {
-
-//        System.setProperty("myproxy.username", "ogce");
-//        System.setProperty("myproxy.password", "");
-        userName = System.getProperty("myproxy.username");
-        password = System.getProperty("myproxy.password");
-        System.setProperty("myproxy.server", "myproxy.teragrid.org");
-        System.setProperty("myproxy.life", "3600");
-        System.setProperty("credential.store.keystore.url", "../configuration/server/src/main/resources/airavata.jks");
-        System.setProperty("credential.store.keystore.alias", "airavata");
-        System.setProperty("credential.store.keystore.password", "airavata");
-
-        if (userName == null || password == null || userName.trim().equals("") || password.trim().equals("")) {
-            log.error("===== Please set myproxy.username and myproxy.password system properties. =======");
-            Assert.fail("Please set myproxy.user and myproxy.password system properties.");
-        }
-
-        log.info("Using my proxy user name - " + userName);
-
-        setUpDatabase();
-
-    }
-
-    public static void setUpDatabase() throws Exception {
-        DerbyUtil.startDerbyInServerMode(getHostAddress(), getPort(), getUserName(), getPassword());
-
-        waitTillServerStarts();
-
-
-        String createTable = "CREATE TABLE CREDENTIALS\n" + "(\n"
-                + "        GATEWAY_ID VARCHAR(256) NOT NULL,\n"
-                + "        TOKEN_ID VARCHAR(256) NOT NULL,\n"
-                + // Actual token used to identify the credential
-                "        CREDENTIAL BLOB NOT NULL,\n" + "        PORTAL_USER_ID VARCHAR(256) NOT NULL,\n"
-                + "        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n"
-                + "        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)\n" + ")";
-
-        String dropTable = "drop table CREDENTIALS";
-
-        try {
-            executeSQL(dropTable);
-        } catch (Exception e) {
-        }
-
-        executeSQL(createTable);
-
-    }
-
-    @AfterClass
-    public static void shutDownDatabase() throws Exception {
-        DerbyUtil.stopDerbyServer();
-    }
-
-    private GSSCredential getGSSCredentials() throws Exception {
-
-        TokenizedMyProxyAuthInfo gsiTokenizedMyProxyAuthInfo = getGSISecurityContext();
-        return gsiTokenizedMyProxyAuthInfo.getCredentials();
-    }
-
-    private TokenizedMyProxyAuthInfo getGSISecurityContext() throws Exception {
-
-        RequestData requestData = new RequestData();
-
-        requestData.setMyProxyUserName(userName);
-        requestData.setMyProxyPassword(password);
-        requestData.setMyProxyServerUrl(ServerSettings.getMyProxyServer());
-        requestData.setMyProxyLifeTime(ServerSettings.getMyProxyLifetime());
-        CredentialReader credentialReader = CredentialReaderFactory.createCredentialStoreReader(getDbUtil());
-
-        return new TokenizedMyProxyAuthInfo(requestData);
-    }
-
-    @Test
-    public void testGetGssCredentials() throws Exception {
-
-        Assert.assertNotNull(getGSSCredentials());
-    }
-    /*
-    @Test
-    public void testRenewCredentials() throws Exception {
-        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
-        gsiSecurityContext.getGssCredentials();
-        Assert.assertNotNull(gsiSecurityContext.renewCredentials());
-
-    }
-
-    @Test
-    public void testGetCredentialsFromStore() throws Exception {
-        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
-        Assert.assertNotNull(gsiSecurityContext.getCredentialsFromStore());
-
-    } */
-
-    @Test
-    public void testGetDefaultCredentials() throws Exception {
-        TokenizedMyProxyAuthInfo gsiSecurityContext = getGSISecurityContext();
-        Assert.assertNotNull(gsiSecurityContext.getDefaultCredentials());
-
-    }
-
-    @Test
-    public void testGetProxyCredentials() throws Exception {
-        TokenizedMyProxyAuthInfo gsiSecurityContext = getGSISecurityContext();
-        Assert.assertNotNull(gsiSecurityContext.getProxyCredentials());
-
-    }
-    /*
-    @Test
-    public void testRenewCredentialsAsATrustedHost() throws Exception {
-        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
-        gsiSecurityContext.getGssCredentials();
-        Assert.assertNotNull(gsiSecurityContext.renewCredentialsAsATrustedHost());
-    } */
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-gsissh/src/test/resources/PBSTemplate.xslt
deleted file mode 100644
index 4c49bd8..0000000
--- a/modules/gfac/gfac-gsissh/src/test/resources/PBSTemplate.xslt
+++ /dev/null
@@ -1,78 +0,0 @@
-<!--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. -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
-<xsl:output method="text" />
-<xsl:template match="/ns:JobDescriptor">
-#! /bin/sh
-# PBS batch job script built by Globus job manager
-#   <xsl:choose>
-    <xsl:when test="ns:shellName">
-##PBS -S <xsl:value-of select="ns:shellName"/>
-    </xsl:when></xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:queueName">
-#PBS -q <xsl:value-of select="ns:queueName"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:mailOptions">
-#PBS -m <xsl:value-of select="ns:mailOptions"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-<xsl:when test="ns:acountString">
-#PBS -A <xsl:value-of select="ns:acountString"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:maxWallTime">
-#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -o <xsl:value-of select="ns:standardOutFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:usedMem">
-#PBS -l mem=<xsl:value-of select="ns:usedMem"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
-#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
-<xsl:text>&#xa;</xsl:text>
-    </xsl:when>
-    </xsl:choose>
-<xsl:for-each select="ns:exports/ns:name">
-<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
-export<xsl:text>   </xsl:text><xsl:value-of select="."/>
-<xsl:text>&#xa;</xsl:text>
-</xsl:for-each>
-<xsl:for-each select="ns:preJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
-    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
-<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
-<xsl:for-each select="ns:inputs/ns:input">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-<xsl:for-each select="ns:postJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-</xsl:for-each>
-
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/resources/logging.properties b/modules/gfac/gfac-gsissh/src/test/resources/logging.properties
deleted file mode 100644
index 0584d38..0000000
--- a/modules/gfac/gfac-gsissh/src/test/resources/logging.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-#
-#default/fallback log4j configuration
-#
-
-# Set root logger level to WARN and its only appender to A1.
-log4j.rootLogger=INFO, A1, A2
-
-# A1 is set to be a rolling file appender with default params
-log4j.appender.A1=org.apache.log4j.RollingFileAppender
-log4j.appender.A1.File=target/seclogs.txt
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
-
-# A2 is a console appender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
-
-log4j.logger.unicore.security=INFO
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
new file mode 100644
index 0000000..72a9f34
--- /dev/null
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>gfac</artifactId>
+        <version>0.16-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>gfac-impl</artifactId>
+    <name>Airavata GFac Local implementation</name>
+    <description>This is the extension of GFAC Local.</description>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <!-- GFAC schemas -->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.1.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
new file mode 100644
index 0000000..1c07a39
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
@@ -0,0 +1,210 @@
+/*
+ *
+ * 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.ssh;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.globus.common.CoGProperties;
+import org.globus.gsi.gssapi.auth.HostAuthorization;
+import org.gridforum.jgss.ExtendedGSSCredential;
+import org.gridforum.jgss.ExtendedGSSManager;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.MessageProp;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.jcraft.jsch.JSchException;
+
+/**
+ * This class is based on GSSContextKrb5; it substitutes the globus
+ * ExtendedGSSManager and uses the SecurityUtils method to get the credential if
+ * one is not passed in from memory.
+ *
+ */
+public class GSSContextX509 implements com.jcraft.jsch.GSSContext {
+
+    private GSSContext context = null;
+    private GSSCredential credential;
+    private static final Logger logger = LoggerFactory.getLogger(GSSContextX509.class);
+
+    public void create(String user, String host) throws JSchException {
+        try {
+//			ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
+
+            if (credential == null) {
+                try {
+                    credential = getCredential();
+                } catch (SecurityException t) {
+                    System.out.printf("Could not get proxy: %s: %s\n", t.getClass().getSimpleName(), t.getMessage());
+                    throw new JSchException(t.toString());
+                }
+            }
+
+            String cname = host;
+
+            try {
+                cname = InetAddress.getByName(cname).getCanonicalHostName();
+            } catch (UnknownHostException e) {
+            }
+
+            GSSName name = HostAuthorization.getInstance().getExpectedName(credential, cname);
+
+//			context = manager.createContext(name, null, credential, GSSContext.DEFAULT_LIFETIME);
+//
+//			// RFC4462 3.4. GSS-API Session
+//			//
+//			// When calling GSS_Init_sec_context(), the client MUST set
+//			// integ_req_flag to "true" to request that per-message integrity
+//			// protection be supported for this context. In addition,
+//			// deleg_req_flag MAY be set to "true" to request access delegation,
+//			// if
+//			// requested by the user.
+//			//
+//			// Since the user authentication process by its nature authenticates
+//			// only the client, the setting of mutual_req_flag is not needed for
+//			// this process. This flag SHOULD be set to "false".
+//
+//			// TODO: OpenSSH's sshd does accept 'false' for mutual_req_flag
+//			// context.requestMutualAuth(false);
+//			context.requestMutualAuth(true);
+//			context.requestConf(true);
+//			context.requestInteg(true); // for MIC
+//			context.requestCredDeleg(true);
+//			context.requestAnonymity(false);
+
+//            context = new BCGSSContextImpl(name, (GlobusGSSCredentialImpl) credential);
+//            context.requestLifetime(GSSCredential.DEFAULT_LIFETIME);
+//            context.requestCredDeleg(true);
+//            context.requestMutualAuth(true);
+//            context.requestReplayDet(true);
+//            context.requestSequenceDet(true);
+//            context.requestConf(false);
+//            context.requestInteg(true);
+//            ((ExtendedGSSContext)context).setOption(GSSConstants.DELEGATION_TYPE, GSIConstants.DELEGATION_TYPE_FULL);
+
+            return;
+        } catch (GSSException ex) {
+            throw new JSchException(ex.toString());
+        }
+    }
+
+    private static GSSCredential getProxy() {
+        return getProxy(null, GSSCredential.DEFAULT_LIFETIME);
+    }
+
+    /**
+     * @param x509_USER_PROXY
+     *            path to the proxy.
+     * @param credentialLifetime
+     *            in seconds.
+     * @return valid credential.
+     *             if proxy task throws exception (or if proxy cannot be found).
+     */
+    private static GSSCredential getProxy(String x509_USER_PROXY, int credentialLifetime) throws SecurityException {
+        if (x509_USER_PROXY == null)
+            x509_USER_PROXY = System.getProperty("x509.user.proxy");
+
+//		if (x509_USER_PROXY == null) {
+//			SystemUtils.envToProperties();
+//			x509_USER_PROXY = System.getProperty("x509.user.proxy");
+//		}
+
+        if (x509_USER_PROXY == null || "".equals(x509_USER_PROXY))
+            x509_USER_PROXY = CoGProperties.getDefault().getProxyFile();
+
+        if (x509_USER_PROXY == null)
+            throw new SecurityException("could not get credential; no location defined");
+
+        ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
+
+        // file...load file into a buffer
+        try {
+            File f = new File(x509_USER_PROXY);
+            byte[] data = new byte[(int) f.length()];
+            FileInputStream in = new FileInputStream(f);
+            // read in the credential data
+            in.read(data);
+            in.close();
+            return manager.createCredential(data, ExtendedGSSCredential.IMPEXP_OPAQUE, credentialLifetime, null, // use
+                    // default
+                    // mechanism
+                    // -
+                    // GSI
+                    GSSCredential.INITIATE_AND_ACCEPT);
+        } catch (Throwable t) {
+            throw new SecurityException("could not get credential from " + x509_USER_PROXY, t);
+        }
+    }
+
+    public boolean isEstablished() {
+        // this must check to see if the call returned GSS_S_COMPLETE
+        if (context != null){
+            return context.isEstablished();
+        }
+        return false;
+    }
+
+    public byte[] init(byte[] token, int s, int l) throws JSchException {
+        try {
+            if (context != null){
+                return context.initSecContext(token, s, l);
+            }else {
+                throw new JSchException("Context is null..");
+            }
+        } catch (GSSException ex) {
+            throw new JSchException(ex.toString());
+        }
+    }
+
+    public byte[] getMIC(byte[] message, int s, int l) {
+        try {
+            MessageProp prop = new MessageProp(0, false);
+            return context.getMIC(message, s, l, prop);
+        } catch (GSSException ex) {
+            logger.error(ex.getMessage(), ex);
+            return null;
+        }
+    }
+
+    public void dispose() {
+        try {
+            context.dispose();
+        } catch (GSSException ex) {
+        }
+    }
+
+    public void setCredential(GSSCredential credential) {
+        this.credential = credential;
+    }
+
+    public GSSCredential getCredential() {
+        return credential;
+    }
+}
+


[55/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/LICENSE b/modules/distribution/orchestrator-server/src/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to

<TRUNCATED>

[15/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/resources/service.properties b/modules/gfac/gfac-local/src/main/resources/service.properties
deleted file mode 100644
index 391bfea..0000000
--- a/modules/gfac/gfac-local/src/main/resources/service.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-#
-# 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.
-#
-#
-
-
-#
-# Class which implemented Scheduler interface. It will be used to determine a Provider
-#
-scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# SSH private key location. It will be used by SSHProvider
-#
-# ssh.key=/home/user/.ssh/id_rsa
-# ssh.keypass=
-# ssh.username=usernameAtHost
-
-#
-# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
-#
-# myproxy.server=myproxy.teragrid.org
-# myproxy.user=username
-# myproxy.pass=password
-# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
deleted file mode 100644
index aeb8158..0000000
--- a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-///*
-// *
-// * 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.core.gfac.services.impl;
-//
-//import java.io.File;
-//import java.net.URL;
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import org.apache.airavata.common.utils.MonitorPublisher;
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.gfac.GFacConfiguration;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.core.context.ApplicationContext;
-//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.gfac.local.handler.LocalDirectorySetupHandler;
-//import org.apache.airavata.gfac.local.provider.impl.LocalProvider;
-//import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
-//import org.apache.airavata.model.workspace.experiment.Experiment;
-//import org.apache.airavata.model.workspace.experiment.TaskDetails;
-//import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-//import org.apache.airavata.persistance.registry.jpa.impl.LoggingRegistryImpl;
-//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-//import org.apache.airavata.schemas.gfac.InputParameterType;
-//import org.apache.airavata.schemas.gfac.OutputParameterType;
-//import org.apache.airavata.schemas.gfac.StringParameterType;
-//import org.apache.commons.lang.SystemUtils;
-//import org.testng.annotations.BeforeTest;
-//import org.testng.annotations.Test;
-//
-//import com.google.common.eventbus.EventBus;
-//
-//public class LocalProviderTest {
-//    private JobExecutionContext jobExecutionContext;
-//    @BeforeTest
-//    public void setUp() throws Exception {
-//
-//        URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        File configFile = new File(resource.getPath());
-//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
-//        //have to set InFlwo Handlers and outFlowHandlers
-//        ApplicationContext applicationContext = new ApplicationContext();
-//        HostDescription host = new HostDescription();
-//        host.getType().setHostName("localhost");
-//        host.getType().setHostAddress("localhost");
-//        applicationContext.setHostDescription(host);
-//        /*
-//           * App
-//           */
-//        ApplicationDescription appDesc = new ApplicationDescription();
-//        ApplicationDeploymentDescriptionType app = appDesc.getType();
-//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//        name.setStringValue("EchoLocal");
-//        app.setApplicationName(name);
-//
-//        /*
-//           * Use bat file if it is compiled on Windows
-//           */
-//        if (SystemUtils.IS_OS_WINDOWS) {
-//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
-//            app.setExecutableLocation(url.getFile());
-//        } else {
-//            //for unix and Mac
-//            app.setExecutableLocation("/bin/echo");
-//        }
-//
-//        /*
-//           * Default tmp location
-//           */
-//        String tempDir = System.getProperty("java.io.tmpdir");
-//        if (tempDir == null) {
-//            tempDir = "/tmp";
-//        }
-//
-//        app.setScratchWorkingDirectory(tempDir);
-//        app.setStaticWorkingDirectory(tempDir);
-//        app.setInputDataDirectory(tempDir + File.separator + "input");
-//        app.setOutputDataDirectory(tempDir + File.separator + "output");
-//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
-//        app.setStandardError(tempDir + File.separator + "echo.stderr");
-//
-//        applicationContext.setApplicationDeploymentDescription(appDesc);
-//
-//        /*
-//           * Service
-//           */
-//        ServiceDescription serv = new ServiceDescription();
-//        serv.getType().setName("SimpleEcho");
-//
-//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-//        InputParameterType input = InputParameterType.Factory.newInstance();
-//        input.setParameterName("echo_input");
-//        input.setParameterType(StringParameterType.Factory.newInstance());
-//        inputList.add(input);
-//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-//                .size()]);
-//
-//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//        OutputParameterType output = OutputParameterType.Factory.newInstance();
-//        output.setParameterName("echo_output");
-//        output.setParameterType(StringParameterType.Factory.newInstance());
-//        outputList.add(output);
-//        OutputParameterType[] outputParamList = outputList
-//                .toArray(new OutputParameterType[outputList.size()]);
-//
-//        serv.getType().setInputParametersArray(inputParamList);
-//        serv.getType().setOutputParametersArray(outputParamList);
-//
-//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-//        jobExecutionContext.setApplicationContext(applicationContext);
-//        /*
-//        * Host
-//        */
-//        applicationContext.setServiceDescription(serv);
-//
-//        MessageContext inMessage = new MessageContext();
-//        ActualParameter echo_input = new ActualParameter();
-//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-//        inMessage.addParameter("echo_input", echo_input);
-//
-//        jobExecutionContext.setInMessageContext(inMessage);
-//
-//        MessageContext outMessage = new MessageContext();
-//        ActualParameter echo_out = new ActualParameter();
-//        outMessage.addParameter("echo_output", echo_out);
-//
-//        jobExecutionContext.setOutMessageContext(outMessage);
-//
-//        jobExecutionContext.setExperimentID("test123");
-//        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
-//        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
-//        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
-//        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
-//
-//
-//    }
-//
-//    @Test
-//    public void testLocalDirectorySetupHandler() throws GFacException {
-//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
-//        localDirectorySetupHandler.invoke(jobExecutionContext);
-//
-//        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-//        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
-//        junit.framework.Assert.assertTrue(new File(app.getStaticWorkingDirectory()).exists());
-//        junit.framework.Assert.assertTrue(new File(app.getScratchWorkingDirectory()).exists());
-//        junit.framework.Assert.assertTrue(new File(app.getInputDataDirectory()).exists());
-//        junit.framework.Assert.assertTrue(new File(app.getOutputDataDirectory()).exists());
-//    }
-//
-//    @Test
-//    public void testLocalProvider() throws GFacException,GFacProviderException {
-//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
-//        localDirectorySetupHandler.invoke(jobExecutionContext);
-//        LocalProvider localProvider = new LocalProvider();
-//        localProvider.setMonitorPublisher(new MonitorPublisher(new EventBus()));
-//        localProvider.initialize(jobExecutionContext);
-//        localProvider.execute(jobExecutionContext);
-//        localProvider.dispose(jobExecutionContext);
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-local/src/test/resources/PBSTemplate.xslt
deleted file mode 100644
index e749e9c..0000000
--- a/modules/gfac/gfac-local/src/test/resources/PBSTemplate.xslt
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--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. -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
-<xsl:output method="text" />
-<xsl:template match="/ns:JobDescriptor">
-#! /bin/sh
-# PBS batch job script built by Globus job manager
-#   <xsl:choose>
-    <xsl:when test="ns:shellName">
-##PBS -S <xsl:value-of select="ns:shellName"/>
-    </xsl:when></xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:queueName">
-#PBS -q <xsl:value-of select="ns:queueName"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:mailOptions">
-#PBS -m <xsl:value-of select="ns:mailOptions"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-<xsl:when test="ns:acountString">
-#PBS -A <xsl:value-of select="ns:acountString"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:maxWallTime">
-#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -o <xsl:value-of select="ns:standardOutFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
-#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
-<xsl:text>&#xa;</xsl:text>
-    </xsl:when>
-    </xsl:choose>
-<xsl:for-each select="ns:exports/ns:name">
-<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
-export<xsl:text>   </xsl:text><xsl:value-of select="."/>
-<xsl:text>&#xa;</xsl:text>
-</xsl:for-each>
-<xsl:for-each select="ns:preJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
-    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
-<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
-<xsl:for-each select="ns:inputs/ns:input">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-<xsl:for-each select="ns:postJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-</xsl:for-each>
-
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/resources/logging.properties b/modules/gfac/gfac-local/src/test/resources/logging.properties
deleted file mode 100644
index 0584d38..0000000
--- a/modules/gfac/gfac-local/src/test/resources/logging.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-#
-#default/fallback log4j configuration
-#
-
-# Set root logger level to WARN and its only appender to A1.
-log4j.rootLogger=INFO, A1, A2
-
-# A1 is set to be a rolling file appender with default params
-log4j.appender.A1=org.apache.log4j.RollingFileAppender
-log4j.appender.A1.File=target/seclogs.txt
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
-
-# A2 is a console appender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
-
-log4j.logger.unicore.security=INFO
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/pom.xml b/modules/gfac/gfac-monitor/gfac-email-monitor/pom.xml
deleted file mode 100644
index 2778f51..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>airavata-gfac-monitor</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.16-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>airavata-gfac-email-monitor</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>javax.mail</groupId>
-            <artifactId>mail</artifactId>
-            <version>1.4.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-common-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
deleted file mode 100644
index e418774..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- *
- * 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.monitor.email;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
-import org.apache.airavata.gfac.core.utils.OutHandlerWorker;
-import org.apache.airavata.gfac.monitor.email.parser.EmailParser;
-import org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser;
-import org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser;
-import org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser;
-import org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-
-import javax.mail.Address;
-import javax.mail.Flags;
-import javax.mail.Folder;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-import javax.mail.search.FlagTerm;
-import javax.mail.search.SearchTerm;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-
-public class EmailBasedMonitor implements Runnable{
-    private static final AiravataLogger log = AiravataLoggerFactory.getLogger(EmailBasedMonitor.class);
-
-    public static final int COMPARISON = 6; // after and equal
-    public static final String IMAPS = "imaps";
-    public static final String POP3 = "pop3";
-    private boolean stopMonitoring = false;
-
-    private Session session ;
-    private Store store;
-    private Folder emailFolder;
-    private Properties properties;
-    private Map<String, JobExecutionContext> jobMonitorMap = new ConcurrentHashMap<String, JobExecutionContext>();
-    private String host, emailAddress, password, storeProtocol, folderName ;
-    private Date monitorStartDate;
-    private Map<ResourceJobManagerType, EmailParser> emailParserMap = new HashMap<ResourceJobManagerType, EmailParser>();
-
-    public EmailBasedMonitor(ResourceJobManagerType type) throws AiravataException {
-        init();
-    }
-
-    private void init() throws AiravataException {
-        host = ServerSettings.getEmailBasedMonitorHost();
-        emailAddress = ServerSettings.getEmailBasedMonitorAddress();
-        password = ServerSettings.getEmailBasedMonitorPassword();
-        storeProtocol = ServerSettings.getEmailBasedMonitorStoreProtocol();
-        folderName = ServerSettings.getEmailBasedMonitorFolderName();
-        if (!(storeProtocol.equals(IMAPS) || storeProtocol.equals(POP3))) {
-            throw new AiravataException("Unsupported store protocol , expected " +
-                    IMAPS + " or " + POP3 + " but found " + storeProtocol);
-        }
-        properties = new Properties();
-        properties.put("mail.store.protocol", storeProtocol);
-    }
-
-    public void addToJobMonitorMap(JobExecutionContext jobExecutionContext) {
-        String monitorId = jobExecutionContext.getJobDetails().getJobID();
-        if (monitorId == null || monitorId.isEmpty()) {
-            monitorId = jobExecutionContext.getJobDetails().getJobName();
-        }
-        addToJobMonitorMap(monitorId, jobExecutionContext);
-    }
-
-    public void addToJobMonitorMap(String monitorId, JobExecutionContext jobExecutionContext) {
-        log.info("[EJM]: Added monitor Id : " + monitorId + " to email based monitor map");
-        jobMonitorMap.put(monitorId, jobExecutionContext);
-    }
-
-    private JobStatusResult parse(Message message) throws MessagingException, AiravataException {
-        Address fromAddress = message.getFrom()[0];
-        String addressStr = fromAddress.toString();
-        ResourceJobManagerType jobMonitorType = getJobMonitorType(addressStr);
-        EmailParser emailParser = emailParserMap.get(jobMonitorType);
-        if (emailParser == null) {
-            switch (jobMonitorType) {
-                case PBS:
-                    emailParser = new PBSEmailParser();
-                    break;
-                case SLURM:
-                    emailParser = new SLURMEmailParser();
-                    break;
-                case LSF:
-                    emailParser = new LSFEmailParser();
-                    break;
-                case UGE:
-                    emailParser = new UGEEmailParser();
-                    break;
-                default:
-                    throw new AiravataException("[EJM]: Un-handle resource job manager type: " + jobMonitorType.toString() + " for email monitoring -->  " + addressStr);
-            }
-
-            emailParserMap.put(jobMonitorType, emailParser);
-        }
-        return emailParser.parseEmail(message);
-    }
-
-    private ResourceJobManagerType getJobMonitorType(String addressStr) throws AiravataException {
-        System.out.println("*********** address ******** : " + addressStr);
-        switch (addressStr) {
-            case "pbsconsult@sdsc.edu":   // trestles , gordan
-            case "adm@trident.bigred2.uits.iu.edu":  // bigred2
-            case "root <ad...@trident.bigred2.uits.iu.edu>": // bigred2
-            case "root <ad...@scyld.localdomain>": // alamo
-                return ResourceJobManagerType.PBS;
-            case "SDSC Admin <sl...@comet-fe3.sdsc.edu>": // comet
-            case "slurm@batch1.stampede.tacc.utexas.edu": // stampede
-            case "slurm user <sl...@tempest.dsc.soic.indiana.edu>":
-                return ResourceJobManagerType.SLURM;
-//            case "lsf":
-//                return ResourceJobManagerType.LSF;
-            default:
-                if (addressStr.contains("ls4.tacc.utexas.edu>")) { // lonestar
-                    return ResourceJobManagerType.UGE;
-                } else {
-                    throw new AiravataException("[EJM]: Couldn't identify Resource job manager type from address " + addressStr);
-                }
-        }
-
-    }
-
-    @Override
-    public void run() {
-        try {
-            session = Session.getDefaultInstance(properties);
-            store = session.getStore(storeProtocol);
-            store.connect(host, emailAddress, password);
-            emailFolder = store.getFolder(folderName);
-            // first time we search for all unread messages.
-            SearchTerm unseenBefore = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
-            while (!(stopMonitoring || ServerSettings.isStopAllThreads())) {
-                Thread.sleep(ServerSettings.getEmailMonitorPeriod());// sleep a bit - get a rest till job finishes
-                if (jobMonitorMap.isEmpty()) {
-                    log.info("[EJM]: Job Monitor Map is empty, no need to retrieve emails");
-                    continue;
-                } else {
-                    log.info("[EJM]: " + jobMonitorMap.size() + " job/s in job monitor map");
-                }
-                if (!store.isConnected()) {
-                    store.connect();
-                    emailFolder = store.getFolder(folderName);
-                }
-                log.info("[EJM]: Retrieving unseen emails");
-                emailFolder.open(Folder.READ_WRITE);
-                Message[] searchMessages = emailFolder.search(unseenBefore);
-                if (searchMessages == null || searchMessages.length == 0) {
-                    log.info("[EJM]: No new email messages");
-                } else {
-                    log.info("[EJM]: "+searchMessages.length + " new email/s received");
-                }
-                processMessages(searchMessages);
-                emailFolder.close(false);
-            }
-        } catch (MessagingException e) {
-            log.error("[EJM]: Couldn't connect to the store ", e);
-        } catch (InterruptedException e) {
-            log.error("[EJM]: Interrupt exception while sleep ", e);
-        } catch (AiravataException e) {
-            log.error("[EJM]: UnHandled arguments ", e);
-        } finally {
-            try {
-                emailFolder.close(false);
-                store.close();
-            } catch (MessagingException e) {
-                log.error("[EJM]: Store close operation failed, couldn't close store", e);
-            }
-        }
-    }
-
-    private void processMessages(Message[] searchMessages) throws MessagingException {
-        List<Message> processedMessages = new ArrayList<>();
-        List<Message> unreadMessages = new ArrayList<>();
-        for (Message message : searchMessages) {
-            try {
-                JobStatusResult jobStatusResult = parse(message);
-                JobExecutionContext jEC = jobMonitorMap.get(jobStatusResult.getJobId());
-                if (jEC == null) {
-                    jEC = jobMonitorMap.get(jobStatusResult.getJobName());
-                }
-                if (jEC != null) {
-                    process(jobStatusResult, jEC);
-                    processedMessages.add(message);
-                } else {
-                    // we can get JobExecutionContext null in multiple Gfac instances environment,
-                    // where this job is not submitted by this Gfac instance hence we ignore this message.
-                    unreadMessages.add(message);
-//                  log.info("JobExecutionContext is not found for job Id " + jobStatusResult.getJobId());
-                }
-            } catch (AiravataException e) {
-                log.error("[EJM]: Error parsing email message =====================================>", e);
-                try {
-                    writeEnvelopeOnError(message);
-                } catch (MessagingException e1) {
-                    log.error("[EJM]: Error printing envelop of the email");
-                }
-                unreadMessages.add(message);
-            } catch (MessagingException e) {
-                log.error("[EJM]: Error while retrieving sender address from message : " + message.toString());
-                unreadMessages.add(message);
-            }
-        }
-        if (!processedMessages.isEmpty()) {
-            Message[] seenMessages = new Message[processedMessages.size()];
-            processedMessages.toArray(seenMessages);
-            try {
-                emailFolder.setFlags(seenMessages, new Flags(Flags.Flag.SEEN), true);
-            } catch (MessagingException e) {
-                if (!store.isConnected()) {
-                    store.connect();
-                    emailFolder.setFlags(seenMessages, new Flags(Flags.Flag.SEEN), true);
-                }
-            }
-
-        }
-        if (!unreadMessages.isEmpty()) {
-            Message[] unseenMessages = new Message[unreadMessages.size()];
-            unreadMessages.toArray(unseenMessages);
-            try {
-                emailFolder.setFlags(unseenMessages, new Flags(Flags.Flag.SEEN), false);
-            } catch (MessagingException e) {
-                if (!store.isConnected()) {
-                    store.connect();
-                    emailFolder.setFlags(unseenMessages, new Flags(Flags.Flag.SEEN), false);
-
-                }
-            }
-        }
-    }
-
-    private void process(JobStatusResult jobStatusResult, JobExecutionContext jEC){
-        JobState resultState = jobStatusResult.getState();
-        jEC.getJobDetails().setJobStatus(new JobStatus(resultState));
-        boolean runOutHandlers = false;
-        String jobDetails = "JobName : " + jobStatusResult.getJobName() + ", JobId : " + jobStatusResult.getJobId();
-        // TODO - Handle all other valid JobStates
-        if (resultState == JobState.COMPLETE) {
-            jobMonitorMap.remove(jobStatusResult.getJobId());
-            runOutHandlers = true;
-            log.info("[EJM]: Job Complete email received , removed job from job monitoring. " + jobDetails);
-        }else if (resultState == JobState.QUEUED) {
-            // nothing special thing to do, update the status change to rabbit mq at the end of this method.
-            log.info("[EJM]: Job Queued email received, " + jobDetails);
-        }else if (resultState == JobState.ACTIVE) {
-            // nothing special thing to do, update the status change to rabbit mq at the end of this method.
-            log.info("[EJM]: Job Active email received, " + jobDetails);
-        }else if (resultState == JobState.FAILED) {
-            jobMonitorMap.remove(jobStatusResult.getJobId());
-            runOutHandlers = true;
-            log.info("[EJM]: Job failed email received , removed job from job monitoring. " + jobDetails);
-        }else if (resultState == JobState.CANCELED) {
-            jobMonitorMap.remove(jobStatusResult.getJobId());
-            runOutHandlers = false; // Do we need to run out handlers in canceled case?
-            log.info("[EJM]: Job canceled mail received, removed job from job monitoring. " + jobDetails);
-
-        }
-        log.info("[EJM]: Publishing status changes to amqp. " + jobDetails);
-        publishJobStatusChange(jEC);
-
-        if (runOutHandlers) {
-            log.info("[EJM]: Calling Out Handler chain of " + jobDetails);
-            GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(jEC));
-        }
-    }
-
-    private void publishJobStatusChange(JobExecutionContext jobExecutionContext) {
-        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
-                jobExecutionContext.getTaskData().getTaskID(),
-                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
-                jobExecutionContext.getGatewayID());
-        jobStatus.setJobIdentity(jobIdentity);
-        jobStatus.setState(jobExecutionContext.getJobDetails().getJobStatus().getJobState());
-        // we have this JobStatus class to handle amqp monitoring
-        log.debugId(jobStatus.getJobIdentity().getJobId(), "[EJM]: Published job status(" +
-                        jobExecutionContext.getJobDetails().getJobStatus().getJobState().toString() + ") change request, " +
-                        "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
-                jobStatus.getJobIdentity().getTaskId());
-
-        jobExecutionContext.getMonitorPublisher().publish(jobStatus);
-    }
-
-    private void writeEnvelopeOnError(Message m) throws MessagingException {
-        Address[] a;
-        // FROM
-        if ((a = m.getFrom()) != null) {
-            for (int j = 0; j < a.length; j++)
-                log.error("FROM: " + a[j].toString());
-        }
-        // TO
-        if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
-            for (int j = 0; j < a.length; j++)
-                log.error("TO: " + a[j].toString());
-        }
-        // SUBJECT
-        if (m.getSubject() != null)
-            log.error("SUBJECT: " + m.getSubject());
-    }
-
-    public void stopMonitoring() {
-        stopMonitoring = true;
-    }
-
-    public void setDate(Date date) {
-        this.monitorStartDate = date;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
deleted file mode 100644
index 3a75331..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.monitor.email;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-public class EmailMonitorFactory {
-
-    private static EmailBasedMonitor emailBasedMonitor;
-    private static Date startMonitorDate = Calendar.getInstance().getTime();
-
-    public static EmailBasedMonitor getEmailBasedMonitor(ResourceJobManagerType resourceJobManagerType) throws AiravataException {
-        if (emailBasedMonitor == null) {
-            synchronized (EmailMonitorFactory.class){
-                if (emailBasedMonitor == null) {
-                    emailBasedMonitor = new EmailBasedMonitor(resourceJobManagerType);
-                    emailBasedMonitor.setDate(startMonitorDate);
-                    new Thread(emailBasedMonitor).start();
-                }
-            }
-        }
-        return emailBasedMonitor;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/JobStatusResult.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/JobStatusResult.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/JobStatusResult.java
deleted file mode 100644
index 321b9cc..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/JobStatusResult.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * 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.monitor.email;
-
-import org.apache.airavata.model.workspace.experiment.JobState;
-
-public class JobStatusResult {
-    private JobState state;
-    private String jobId;
-
-    public String getJobName() {
-        return jobName;
-    }
-
-    public void setJobName(String jobName) {
-        this.jobName = jobName;
-    }
-
-    private String jobName;
-
-    public JobState getState() {
-        return state;
-    }
-
-    public void setState(JobState state) {
-        this.state = state;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/EmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/EmailParser.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/EmailParser.java
deleted file mode 100644
index d82ce50..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/EmailParser.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * 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.monitor.email.parser;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.gfac.monitor.email.JobStatusResult;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-
-public interface EmailParser {
-    static final String STATUS = "status";
-    static final String JOBID = "jobId";
-    static final String JOBNAME = "jobName";
-    static final String EXIT_STATUS = "exitStatus";
-
-    JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
deleted file mode 100644
index 042f671..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * 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.monitor.email.parser;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.gfac.monitor.email.JobStatusResult;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class LSFEmailParser implements EmailParser {
-    private static final Logger log = LoggerFactory.getLogger(LSFEmailParser.class);
-    //root@c312-206.ls4.tacc.utexas.edu
-    private static final String SIGNAL = "signal";
-    private static final String LONESTAR_REGEX = "Job (?<" + JOBID + ">\\d+) \\(.*\\) (?<" + STATUS
-            + ">.*)\\s[a-zA-Z =]+(?<" + EXIT_STATUS + ">\\d+)\\sSignal[ ]*=[ ]*(?<" + SIGNAL + ">[a-zA-z]*)";
-
-    @Override
-    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
-        JobStatusResult jobStatusResult = new JobStatusResult();
-        try {
-            String content = ((String) message.getContent());
-            Pattern pattern = Pattern.compile(LONESTAR_REGEX);
-            Matcher matcher = pattern.matcher(content);
-            if (matcher.find()) {
-                jobStatusResult.setJobId(matcher.group(JOBID));
-                String status = matcher.group(STATUS);
-                jobStatusResult.setState(getJobState(status, content));
-                return jobStatusResult;
-            } else {
-                log.error("[EJM]: No matched found for content => \n" + content);
-            }
-        } catch (IOException e) {
-            throw new AiravataException("i[EJM]: Error while reading content of the email message");
-        }
-        return jobStatusResult;
-    }
-
-    private JobState getJobState(String status, String content) {
-        switch (status) {
-            case "Aborted":
-                return JobState.FAILED;
-            case "Success":
-                return JobState.COMPLETE;
-            default:
-                return JobState.UNKNOWN;
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
deleted file mode 100644
index 841ecc4..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * 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.monitor.email.parser;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.gfac.monitor.email.JobStatusResult;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class PBSEmailParser implements EmailParser {
-
-    private static final Logger log = LoggerFactory.getLogger(PBSEmailParser.class);
-
-
-    private static final String REGEX = "[a-zA-Z ]*:[ ]*(?<" +  JOBID + ">[a-zA-Z0-9-\\.]*)\\s+[a-zA-Z ]*:[ ]*(?<"+
-            JOBNAME + ">[a-zA-Z0-9-\\.]*)\\s+.*\\s+(?<" + STATUS + ">[a-zA-Z\\ ]*)";
-    private static final String REGEX_EXIT_STATUS = "Exit_status=(?<" + EXIT_STATUS + ">[\\d]+)";
-    public static final String BEGUN_EXECUTION = "Begun execution";
-    public static final String EXECUTION_TERMINATED = "Execution terminated";
-    public static final String ABORTED_BY_PBS_SERVER = "Aborted by PBS Server";
-
-    @Override
-    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
-        JobStatusResult jobStatusResult = new JobStatusResult();
-//        log.info("Parsing -> " + message.getSubject());
-        try {
-            String content = ((String) message.getContent());
-            Pattern pattern = Pattern.compile(REGEX);
-            Matcher matcher = pattern.matcher(content);
-            if (matcher.find()) {
-                jobStatusResult.setJobId(matcher.group(JOBID));
-                jobStatusResult.setJobName(matcher.group(JOBNAME));
-                String statusLine = matcher.group(STATUS);
-                jobStatusResult.setState(getJobState(statusLine, content));
-                return jobStatusResult;
-            } else {
-                log.error("[EJM]: No matched found for content => \n" + content);
-            }
-
-        } catch (IOException e) {
-            throw new AiravataException("[EJM]: Error while reading content of the email message");
-        }
-        return jobStatusResult;
-    }
-
-    private JobState getJobState(String statusLine, String content) {
-        switch (statusLine) {
-            case BEGUN_EXECUTION:
-                return JobState.ACTIVE;
-            case EXECUTION_TERMINATED:
-                int exitStatus = getExitStatus(content);
-                if (exitStatus == 0) {
-                    // TODO - Remove rabbitmq client script line from the script.
-                    return JobState.COMPLETE;
-                } else if (exitStatus == 271) {
-                    return JobState.CANCELED;
-                } else {
-                    return JobState.FAILED;
-                }
-            case ABORTED_BY_PBS_SERVER:
-                return JobState.FAILED;
-            default:
-                return JobState.UNKNOWN;
-        }
-    }
-
-    private int getExitStatus(String content) {
-        Pattern pattern = Pattern.compile(REGEX_EXIT_STATUS);
-        Matcher matcher = pattern.matcher(content);
-        if (matcher.find()) {
-            String group = matcher.group(EXIT_STATUS);
-            if (group != null && !group.trim().isEmpty()) {
-                return Integer.valueOf(group.trim());
-            }
-        }
-        return -1;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
deleted file mode 100644
index 75ffe98..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * 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.monitor.email.parser;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.gfac.monitor.email.JobStatusResult;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class SLURMEmailParser implements EmailParser {
-
-    private static final Logger log = LoggerFactory.getLogger(SLURMEmailParser.class);
-
-    private static final String REGEX = "[A-Z]*\\s[a-zA-Z]*_[a-z]*=(?<" + JOBID + ">\\d*)[ ]*[a-zA-Z]*=(?<"+
-            JOBNAME + ">[a-zA-Z0-9-]*)[ ]*(?<" + STATUS + ">[]a-zA-Z]*),.*";
-
-    public static final String BEGAN = "Began";
-    public static final String ENDED = "Ended";
-    public static final String FAILED = "Failed";
-    private static final Pattern cancelledStatePattern = Pattern.compile("CANCELLED");
-    private static final Pattern pattern = Pattern.compile(REGEX);
-
-    @Override
-    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException{
-        JobStatusResult jobStatusResult = new JobStatusResult();
-        String subject = message.getSubject();
-        Matcher matcher = pattern.matcher(subject);
-        if (matcher.find()) {
-            jobStatusResult.setJobId(matcher.group(JOBID));
-            jobStatusResult.setJobName(matcher.group(JOBNAME));
-            jobStatusResult.setState(getJobState(matcher.group(STATUS), subject));
-            return jobStatusResult;
-        } else {
-            log.error("[EJM]: No matched found for subject -> " + subject);
-        }
-        return jobStatusResult;
-    }
-
-    private JobState getJobState(String state, String subject) {
-        switch (state.trim()) {
-            case BEGAN:
-                return JobState.ACTIVE;
-            case ENDED:
-                Matcher matcher = cancelledStatePattern.matcher(subject);
-                if (matcher.find()) {
-                   return JobState.CANCELED;
-                }
-                return JobState.COMPLETE;
-            case FAILED:
-                return JobState.FAILED;
-            default:
-                log.error("[EJM]: Job State " + state + " isn't handle by SLURM parser");
-                return JobState.UNKNOWN;
-
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
deleted file mode 100644
index 02209f4..0000000
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * 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.monitor.email.parser;
-
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.gfac.monitor.email.JobStatusResult;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class UGEEmailParser implements EmailParser{
-
-    private static final Logger log = LoggerFactory.getLogger(UGEEmailParser.class);
-    private static final String REGEX = "[\\w]*[ ]*(?<"+ JOBID + ">[\\d]*)[ ]*\\((?<" + JOBNAME
-            + ">[a-zA-Z0-9]*)\\)[ ]*(?<" + STATUS + ">[a-zA-Z]*)";
-    public static final String STARTED = "Started";
-    public static final String COMPLETE = "Complete";
-    public static final String FAILED = "Failed";
-    private static final String REGEX_EXIT_STATUS = "Exit Status[ ]*=[ ]*(?<" + EXIT_STATUS + ">[\\d]+)";
-    public static final String ABORTED = "Aborted";
-
-
-    @Override
-    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
-        JobStatusResult jobStatusResult = new JobStatusResult();
-
-        String subject = message.getSubject();
-        Pattern pattern = Pattern.compile(REGEX);
-        Matcher matcher = pattern.matcher(subject);
-        try {
-            if (matcher.find()) {
-                jobStatusResult.setJobId(matcher.group(JOBID));
-                jobStatusResult.setJobName(matcher.group(JOBNAME));
-                String content = (String) message.getContent();
-                jobStatusResult.setState(getJobState(matcher.group(STATUS), content));
-            } else {
-                log.error("[EJM]: No matched found for subject => \n" + subject);
-            }
-        } catch (IOException e) {
-            throw new AiravataException("[EJM]: Error while reading content of the email message");
-        }
-        return jobStatusResult;
-    }
-
-    private JobState getJobState(String status, String content) {
-        switch (status) {
-            case STARTED:
-                return JobState.ACTIVE;
-            case COMPLETE:
-                int exitStatus = getExitStatus(content);
-                if (exitStatus == 0) {
-                    return JobState.COMPLETE;
-                } else {
-                    log.info("[EJM]: Job returns with Exit Status = " + exitStatus + "  , Marked as Failed");
-                    return JobState.FAILED;
-                }
-            case FAILED:
-                return JobState.FAILED;
-            case ABORTED:
-                return JobState.FAILED;
-            default:
-                return JobState.UNKNOWN;
-
-        }
-    }
-
-    private int getExitStatus(String content) {
-        Pattern statusPattern = Pattern.compile(REGEX_EXIT_STATUS);
-        Matcher statusMatcher = statusPattern.matcher(content);
-        if (statusMatcher.find()) {
-            String group = statusMatcher.group(EXIT_STATUS);
-            if (group != null && !group.trim().isEmpty()) {
-                return Integer.valueOf(group.trim());
-            }
-        }
-        return -1;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml b/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml
deleted file mode 100644
index 3a98baa..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>airavata-gfac-monitor</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.16-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>airavata-gfac-hpc-monitor</artifactId>
-    <name>Airavata GFac Grid Job Monitor</name>
-    <description>The Grid related monitoring implementation</description>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <!-- Logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- GFAC schemas -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-ssh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-cpi</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Workflow Tracking -->
-        <!--<dependency>-->
-        <!--<groupId>org.apache.airavata</groupId>-->
-        <!--<artifactId>airavata-workflow-tracking</artifactId>-->
-        <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
-        <!-- Credential Store -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- Guava -->
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-            <version>12.0</version>
-        </dependency>
-        <!-- gsi-ssh api dependencies -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.jcraft</groupId>
-            <artifactId>jsch</artifactId>
-            <version>0.1.50</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <!-- this is the dependency for amqp implementation -->
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <version>2.0.0</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skip>false</skip>
-                    <forkMode>always</forkMode>
-                    <failIfNoTests>false</failIfNoTests>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.jsonschema2pojo</groupId>
-                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
-                <version>0.4.0</version>
-                <configuration>
-                    <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
-                    <targetPackage>org.apache.airavata</targetPackage>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
deleted file mode 100644
index ae463a7..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.airavata.gfac.monitor;/*
- *
- * 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.
- *
-*/
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Timestamp;
-import java.util.Date;
-
-public class HPCMonitorID extends MonitorID {
-    private final static Logger logger = LoggerFactory.getLogger(HPCMonitorID.class);
-
-
-    private AuthenticationInfo authenticationInfo = null;
-
-    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID,
-                        String experimentID, String userName,String jobName) {
-        super(computeResourceDescription, jobID, taskID, workflowNodeID, experimentID, userName,jobName);
-        setComputeResourceDescription(computeResourceDescription);
-        setJobStartedTime(new Timestamp((new Date()).getTime()));
-        setUserName(userName);
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
-        setWorkflowNodeID(workflowNodeID);
-    }
-
-    public HPCMonitorID(AuthenticationInfo authenticationInfo, JobExecutionContext jobExecutionContext) {
-        super(jobExecutionContext);
-        this.authenticationInfo = authenticationInfo;
-        if (this.authenticationInfo != null) {
-            try {
-                String hostAddress = jobExecutionContext.getHostName();
-                SecurityContext securityContext = jobExecutionContext.getSecurityContext(hostAddress);
-                ServerInfo serverInfo = null;
-                if (securityContext != null) {
-                    if (securityContext instanceof  GSISecurityContext){
-                        serverInfo = (((GSISecurityContext) securityContext).getPbsCluster()).getServerInfo();
-                        if (serverInfo.getUserName() != null) {
-                            setUserName(serverInfo.getUserName());
-                        }
-                    }
-                    if (securityContext instanceof SSHSecurityContext){
-                        serverInfo = (((SSHSecurityContext) securityContext).getPbsCluster()).getServerInfo();
-                        if (serverInfo.getUserName() != null) {
-                            setUserName(serverInfo.getUserName());
-                        }
-                    }
-                }
-            } catch (GFacException e) {
-                logger.error("Error while getting security context", e);
-            }
-        }
-    }
-
-    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID, String experimentID, String userName, AuthenticationInfo authenticationInfo) {
-        setComputeResourceDescription(computeResourceDescription);
-        setJobStartedTime(new Timestamp((new Date()).getTime()));
-        this.authenticationInfo = authenticationInfo;
-        // if we give myproxyauthenticationInfo, so we try to use myproxy user as the user
-        if (this.authenticationInfo != null) {
-            if (this.authenticationInfo instanceof MyProxyAuthenticationInfo) {
-                setUserName(((MyProxyAuthenticationInfo) this.authenticationInfo).getUserName());
-            }
-        }
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
-        setWorkflowNodeID(workflowNodeID);
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
deleted file mode 100644
index f29e3e6..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * 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.monitor;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class HostMonitorData {
-//    private HostDescription host;
-    private ComputeResourceDescription computeResourceDescription;
-    private JobSubmissionProtocol jobSubmissionProtocol;
-    private DataMovementProtocol dataMovementProtocol;
-
-    private List<MonitorID> monitorIDs;
-
-    public HostMonitorData(JobExecutionContext jobExecutionContext) {
-        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
-        this.jobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
-        this.dataMovementProtocol = jobExecutionContext.getPreferredDataMovementProtocol();
-        this.monitorIDs = new ArrayList<MonitorID>();
-    }
-
-    public HostMonitorData(JobExecutionContext jobExecutionContext, List<MonitorID> monitorIDs) {
-        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
-        this.jobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
-        this.dataMovementProtocol = jobExecutionContext.getPreferredDataMovementProtocol();
-        this.monitorIDs = monitorIDs;
-    }
-
-    public ComputeResourceDescription getComputeResourceDescription() {
-        return computeResourceDescription;
-    }
-
-    public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
-        this.computeResourceDescription = computeResourceDescription;
-    }
-
-    public List<MonitorID> getMonitorIDs() {
-        return monitorIDs;
-    }
-
-    public void setMonitorIDs(List<MonitorID> monitorIDs) {
-        this.monitorIDs = monitorIDs;
-    }
-
-    /**
-     * this method get called by CommonUtils and it will check the right place before adding
-     * so there will not be a mismatch between this.host and monitorID.host
-     * @param monitorID
-     * @throws org.apache.airavata.gfac.monitor.exception.AiravataMonitorException
-     */
-    public void addMonitorIDForHost(MonitorID monitorID)throws AiravataMonitorException {
-        monitorIDs.add(monitorID);
-    }
-
-    public JobSubmissionProtocol getJobSubmissionProtocol() {
-        return jobSubmissionProtocol;
-    }
-
-    public DataMovementProtocol getDataMovementProtocol() {
-        return dataMovementProtocol;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
deleted file mode 100644
index 022d17c..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * 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.monitor;
-
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This is the datastructure to keep the user centric job data, rather keeping
- * the individual jobs we keep the jobs based on the each user
- */
-public class UserMonitorData {
-    private final static Logger logger = LoggerFactory.getLogger(UserMonitorData.class);
-
-    private String  userName;
-
-    private List<HostMonitorData> hostMonitorData;
-
-
-    public UserMonitorData(String userName) {
-        this.userName = userName;
-        hostMonitorData = new ArrayList<HostMonitorData>();
-    }
-
-    public UserMonitorData(String userName, List<HostMonitorData> hostMonitorDataList) {
-        this.hostMonitorData = hostMonitorDataList;
-        this.userName = userName;
-    }
-
-    public List<HostMonitorData> getHostMonitorData() {
-        return hostMonitorData;
-    }
-
-    public void setHostMonitorData(List<HostMonitorData> hostMonitorData) {
-        this.hostMonitorData = hostMonitorData;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /*
-    This method will add element to the MonitorID list, user should not
-    duplicate it, we do not check it because its going to be used by airavata
-    so we have to use carefully and this method will add a host if its a new host
-     */
-    public void addHostMonitorData(HostMonitorData hostMonitorData) throws AiravataMonitorException {
-        this.hostMonitorData.add(hostMonitorData);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
deleted file mode 100644
index f19decf..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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.monitor.command;
-
-public class ExperimentCancelRequest {
-	private String experimentId;
-
-	public ExperimentCancelRequest(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
deleted file mode 100644
index b45e01c..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * 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.monitor.command;
-
-public class TaskCancelRequest {
-	private String experimentId;
-	private String nodeId;
-	private String taskId;
-	
-	public TaskCancelRequest(String experimentId, String nodeId, String taskId) {
-		this.experimentId = experimentId;
-		this.setNodeId(nodeId);
-		this.taskId = taskId;
-	}
-	public String getExperimentId() {
-		return experimentId;
-	}
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-	public String getTaskId() {
-		return taskId;
-	}
-	public void setTaskId(String taskId) {
-		this.taskId = taskId;
-	}
-	public String getNodeId() {
-		return nodeId;
-	}
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
deleted file mode 100644
index b4ac3a9..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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.monitor.core;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This is the abstract Monitor which needs to be used by
- * any Monitoring implementation which expect nto consume
- * to store the status to registry. Because they have to
- * use the MonitorPublisher to publish the monitoring statuses
- * to the Event Bus. All the Monitor statuses publish to the eventbus
- * will be saved to the Registry.
- */
-public abstract class AiravataAbstractMonitor implements Monitor {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataAbstractMonitor.class);
-
-}


[27/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
new file mode 100644
index 0000000..beb5b37
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * 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.ssh.api;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+import com.jcraft.jsch.Session;
+
+/**
+ * This interface represents a Cluster machine
+ * End users of the API can implement this and come up with their own
+ * implementations, but mostly this interface is for internal usage.
+ */
+public interface Cluster {
+
+    /**
+     * This will submit a job to the cluster with a given pbs file and some parameters
+     *
+     * @param pbsFilePath  path of the pbs file
+     * @param workingDirectory working directory where pbs should has to copy
+     * @return jobId after successful job submission
+     * @throws SSHApiException throws exception during error
+     */
+    public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
+
+    /**
+     * This will submit the given job and not performing any monitoring
+     *
+     * @param jobDescriptor  job descriptor to submit to cluster, this contains all the parameter
+     * @return jobID after successful job submission.
+     * @throws SSHApiException  throws exception during error
+     */
+    public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
+
+    /**
+     * This will copy the localFile to remoteFile location in configured cluster
+     *
+     * @param remoteFile remote file location, this can be a directory too
+     * @param localFile local file path of the file which needs to copy to remote location
+     * @throws SSHApiException throws exception during error
+     */
+    public void scpTo(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
+    
+    /**
+     * This will create directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public void makeDirectory(String directoryPath) throws SSHApiException;
+
+
+    /**
+     * This will get the job description of a job which is there in the cluster
+     * if jbo is not available with the given ID it returns
+     * @param jobID jobId has to pass
+     * @return Returns full job description of the job which submitted successfully
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
+
+    /**
+     * This will delete the given job from the queue
+     *
+     * @param jobID  jobId of the job which user wants to delete
+     * @return return the description of the deleted job
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor cancelJob(String jobID) throws SSHApiException;
+
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobID jobId of the job user want to get the status
+     * @return job status of the given jobID
+     * @throws SSHApiException throws exception during error
+     */
+    public JobStatus getJobStatus(String jobID) throws SSHApiException;
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobName jobName of the job user want to get the status
+     * @return jobId of the given jobName
+     * @throws SSHApiException throws exception during error
+     */
+    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
+
+    /**
+     * This method can be used to poll the jobstatuses based on the given
+     * user but we should pass the jobID list otherwise we will get unwanted
+     * job statuses which submitted by different middleware outside apache
+     * airavata with the same uername which we are not considering
+     * @param userName userName of the jobs which required to get the status
+     * @param jobIDs precises set of jobIDs
+     * @return
+     */
+    public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
+    /**
+     * This will list directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public List<String> listDirectory(String directoryPath) throws SSHApiException;
+
+    /**
+     * This method can be used to get created ssh session
+     * to reuse the created session.
+     * @throws SSHApiException
+     */
+    public Session getSession() throws SSHApiException;
+    
+    /**
+     * This method can be used to close the connections initialized
+     * to handle graceful shutdown of the system
+     * @throws SSHApiException
+     */
+    public void disconnect() throws SSHApiException;
+
+    /**
+     * This gives the server Info
+     * @return
+     */
+    public ServerInfo getServerInfo();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
new file mode 100644
index 0000000..024c53d
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
@@ -0,0 +1,278 @@
+/*
+ *
+ * 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.ssh.api;
+
+import com.jcraft.jsch.*;
+import org.apache.airavata.gfac.ssh.api.authentication.*;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This is a generic class which take care of command execution
+ * in a shell, this is used through out the other places of the API.
+ */
+public class CommandExecutor {
+    static {
+        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+        JSch jSch = new JSch();
+    }
+
+    private static final Logger log = LoggerFactory.getLogger(CommandExecutor.class);
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+
+    /**
+     * This will execute the given command with given session and session is not closed at the end.
+     *
+     * @param commandInfo
+     * @param session
+     * @param commandOutput
+     * @throws SSHApiException
+     */
+    public static Session executeCommand(CommandInfo commandInfo, Session session,
+                                         CommandOutput commandOutput) throws SSHApiException {
+
+        String command = commandInfo.getCommand();
+
+        Channel channel = null;
+        try {
+            if (!session.isConnected()) {
+                session.connect();
+            }
+            channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+        } catch (JSchException e) {
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to execute command - ", e);
+        }
+
+        channel.setInputStream(null);
+        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command, e);
+        }
+
+
+        commandOutput.onOutput(channel);
+        //Only disconnecting the channel, session can be reused
+        channel.disconnect();
+        return session;
+    }
+
+    /**
+     * This will not reuse any session, it will create the session and close it at the end
+     *
+     * @param commandInfo        Encapsulated information about command. E.g :- executable name
+     *                           parameters etc ...
+     * @param serverInfo         The SSHing server information.
+     * @param authenticationInfo Security data needs to be communicated with remote server.
+     * @param commandOutput      The output of the command.
+     * @param configReader       configuration required for ssh/gshissh connection
+     * @throws SSHApiException   throw exception when error occurs
+     */
+    public static void executeCommand(CommandInfo commandInfo, ServerInfo serverInfo,
+                                      AuthenticationInfo authenticationInfo,
+                                      CommandOutput commandOutput, ConfigReader configReader) throws SSHApiException {
+
+        if (authenticationInfo instanceof GSIAuthenticationInfo) {
+            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo)authenticationInfo).getProperties().
+                    get("X509_CERT_DIR"));
+        }
+
+
+        JSch jsch = new ExtendedJSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = configReader.getProperties();
+        session.setConfig(config);
+
+        //=============================================================
+        // Handling vanilla SSH pieces
+        //=============================================================
+        if (authenticationInfo instanceof SSHPasswordAuthentication) {
+            String password = ((SSHPasswordAuthentication) authenticationInfo).
+                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
+
+            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
+
+            // TODO figure out why we need to set password to session
+            session.setPassword(password);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
+            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
+                    = (SSHPublicKeyFileAuthentication)authenticationInfo;
+
+            String privateKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The private key file for vanilla SSH " + privateKeyFile);
+
+            String publicKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The public key file for vanilla SSH " + publicKeyFile);
+
+            Identity identityFile;
+
+            try {
+                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, jsch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using files. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
+                        publicKeyFile, e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
+
+            SSHPublicKeyAuthentication sshPublicKeyAuthentication
+                    = (SSHPublicKeyAuthentication)authenticationInfo;
+
+            Identity identityFile;
+
+            try {
+                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
+                identityFile = GSISSHIdentityFile.newInstance(name,
+                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
+                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), jsch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName(), e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        }
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            if (authenticationInfo instanceof GSIAuthenticationInfo) {
+                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo)authenticationInfo);
+            }
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        String command = commandInfo.getCommand();
+
+        Channel channel;
+        try {
+            channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+        } catch (JSchException e) {
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to execute command - " + command +
+                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+
+        channel.setInputStream(null);
+        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
+
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        commandOutput.onOutput(channel);
+
+        channel.disconnect();
+//        session.disconnect();
+    }
+
+    private static void logDebug(String message) {
+        if (log.isDebugEnabled()) {
+            log.debug(message);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
new file mode 100644
index 0000000..e6797ce
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
@@ -0,0 +1,34 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulates information about
+ */
+public interface CommandInfo {
+
+    /**
+     * Gets the executable command as a string.
+     * @return String encoded command. Should be able to execute
+     * directly on remote shell. Should includes appropriate parameters.
+     */
+    String getCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
new file mode 100644
index 0000000..f275ff0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
@@ -0,0 +1,49 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+
+import com.jcraft.jsch.Channel;
+
+import java.io.OutputStream;
+
+/**
+ * Output of a certain command. TODO rethink
+ */
+public interface CommandOutput {
+
+    /**
+     * Gets the output of the command as a stream.
+     * @param  channel Command output as a stream.
+     */
+    void onOutput(Channel channel);
+
+    /**
+     * Gets standard error as a output stream.
+     * @return Command error as a stream.
+     */
+    OutputStream getStandardError();
+
+    /**
+     * The command exit code.
+     * @param code The program exit code
+     */
+    void exitCode(int code);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
new file mode 100644
index 0000000..67dd043
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * 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.ssh.api;
+
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+
+/**
+ * This represents a CPU core of a machine in the cluster
+ */
+public class Core {
+    private JobDescriptor job;
+    private String id;
+
+    public Core(String id) {
+        this.id = id;
+        this.job = null;
+    }
+
+    /**
+     * @return core's id
+     */
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * @return job running on the core
+     */
+    public JobDescriptor getJob() {
+        return job;
+    }
+
+    public void setJob(JobDescriptor job) {
+        this.job = job;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
new file mode 100644
index 0000000..1515f39
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * 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.ssh.api;
+
+import java.util.HashMap;
+
+public class Node {
+    private String Name;
+    private Core[] Cores;
+    private String state;
+    private HashMap<String, String> status;
+    private String np;
+    private String ntype;
+
+    /**
+     * @return the machine's name
+     */
+    public String getName() {
+        return Name;
+    }
+
+    public void setName(String Name) {
+        this.Name = Name;
+    }
+
+    /**
+     * @return machine cores as an array
+     */
+    public Core[] getCores() {
+        return Cores;
+    }
+
+    public void setCores(Core[] Cores) {
+        this.Cores = Cores;
+    }
+
+
+    /**
+     * @return the machine state
+     */
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    /**
+     * @return the status
+     */
+    public HashMap<String, String> getStatus() {
+        return status;
+    }
+
+    public void setStatus(HashMap<String, String> status) {
+        this.setStatus(status);
+    }
+
+
+    /**
+     * @return the number of cores in the machine
+     */
+    public String getNp() {
+        return np;
+    }
+
+
+    public void setNp(String np) {
+        this.np = np;
+    }
+
+    /**
+     * @return the ntype of the machine
+     */
+    public String getNtype() {
+        return ntype;
+    }
+
+
+    public void setNtype(String ntype) {
+        this.ntype = ntype;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
new file mode 100644
index 0000000..f78825b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.ssh.api;
+
+/**
+ * An exception class to wrap SSH command execution related errors.
+ */
+public class SSHApiException extends Exception {
+
+    public SSHApiException(String message) {
+        super(message);
+    }
+
+    public SSHApiException(String message, Exception e) {
+        super(message, e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
new file mode 100644
index 0000000..d3c2160
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
@@ -0,0 +1,65 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulate server information.
+ */
+public class ServerInfo {
+
+    private String host;
+    private String userName;
+    private int port = 22;
+
+    public ServerInfo(String userName, String host) {
+        this.userName = userName;
+        this.host = host;
+    }
+
+    public ServerInfo(String userName,String host,  int port) {
+        this.host = host;
+        this.userName = userName;
+        this.port = port;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
new file mode 100644
index 0000000..7e936ec
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
@@ -0,0 +1,473 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.apache.airavata.gfac.ssh.x2012.x12.*;
+import org.apache.xmlbeans.XmlException;
+
+import java.util.List;
+
+/**
+ * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
+ * submit the job to the computing resource
+ */
+public class JobDescriptor {
+
+    private JobDescriptorDocument jobDescriptionDocument;
+
+
+    public JobDescriptor() {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+    public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
+        this.jobDescriptionDocument = jobDescriptorDocument;
+    }
+
+
+    public JobDescriptor(CommandOutput commandOutput) {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+
+    public String toXML() {
+        return jobDescriptionDocument.xmlText();
+    }
+
+    public JobDescriptorDocument getJobDescriptorDocument() {
+        return this.jobDescriptionDocument;
+    }
+
+    /**
+     * With new app catalog thrift object integration, we don't use this
+     * @param xml
+     * @return
+     * @throws XmlException
+     */
+    @Deprecated
+    public static JobDescriptor fromXML(String xml)
+            throws XmlException {
+        JobDescriptorDocument parse = JobDescriptorDocument.Factory
+                .parse(xml);
+        JobDescriptor jobDescriptor = new JobDescriptor(parse);
+        return jobDescriptor;
+    }
+
+
+    //todo write bunch of setter getters to set and get jobdescription parameters
+    public void setWorkingDirectory(String workingDirectory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
+    }
+
+    public String getWorkingDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
+    }
+
+    public void setShellName(String shellName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
+    }
+
+    public void setJobName(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
+    }
+
+    public void setExecutablePath(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
+    }
+
+    public void setAllEnvExport(boolean name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
+    }
+
+    public void setMailOptions(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
+    }
+
+    public void setStandardOutFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
+    }
+
+    public void setStandardErrorFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
+    }
+
+    public void setNodes(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
+    }
+
+    public void setProcessesPerNode(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
+    }
+
+    public String getOutputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
+    }
+
+    public String getInputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
+    }
+    public void setOutputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
+    }
+
+    public void setInputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
+    }
+
+    /**
+     * Users can pass the minute count for maxwalltime
+     * @param minutes
+     */
+    public void setMaxWallTime(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                CommonUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
+
+    }
+
+
+    public void setMaxWallTimeForLSF(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                CommonUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
+
+    }
+    public void setAcountString(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
+    }
+
+    public void setInputValues(List<String> inputValue) {
+        InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
+        inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
+    }
+
+    public void setJobID(String jobID) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
+    }
+
+    public void setQueueName(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
+    }
+
+    public void setStatus(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
+    }
+
+    public void setAfterAnyList(String[] afterAnyList) {
+        AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
+        afterAny.setAfterAnyArray(afterAnyList);
+    }
+
+    public void setAfterOKList(String[] afterOKList) {
+        AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
+        afterAnyList.setAfterOKListArray(afterOKList);
+    }
+    public void setCTime(String cTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
+    }
+    public void setQTime(String qTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
+    }
+    public void setMTime(String mTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
+    }
+    public void setSTime(String sTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
+    }
+    public void setCompTime(String compTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
+    }
+    public void setOwner(String owner) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
+    }
+    public void setExecuteNode(String executeNode) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
+    }
+    public void setEllapsedTime(String ellapsedTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
+    }
+
+    public void setUsedCPUTime(String usedCPUTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
+    }
+    public void setCPUCount(int usedCPUTime) {
+            this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
+        }
+    public void setUsedMemory(String usedMemory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
+    }
+    public void setVariableList(String variableList) {
+        this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
+    }
+    public void setSubmitArgs(String submitArgs) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
+    }
+
+    public void setPreJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
+    }
+
+     public void setPostJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
+    }
+
+    public void setModuleLoadCommands(String[] commands) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
+    }
+
+    public void addModuleLoadCommands(String command) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
+    }
+
+    public void addPreJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
+    }
+
+     public void addPostJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
+    }
+
+    public void setPartition(String partition){
+        this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
+    }
+
+     public void setUserName(String userName){
+        this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
+    }
+     public void setNodeList(String nodeList){
+        this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
+    }
+    public void setJobSubmitter(String jobSubmitter){
+           this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
+    }
+    public String getNodeList(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
+    }
+    public String getExecutablePath() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
+    }
+
+    public boolean getAllEnvExport() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
+    }
+
+    public String getMailOptions() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
+    }
+
+    public String getStandardOutFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
+    }
+
+    public String getStandardErrorFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
+    }
+
+    public int getNodes(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
+    }
+
+    public int getCPUCount(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
+    }
+
+    public int getProcessesPerNode() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
+    }
+
+    public String getMaxWallTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
+    }
+
+    public String getAcountString() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
+    }
+
+    public String[] getInputValues() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
+    }
+
+    public String getJobID() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String getQueueName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
+    }
+
+    public String getStatus() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
+    }
+
+    public String[] getAfterAnyList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
+    }
+
+    public String[] getAfterOKList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
+    }
+    public String getCTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
+    }
+    public String getQTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
+    }
+    public String getMTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
+    }
+    public String getSTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
+    }
+    public String getCompTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
+    }
+    public String getOwner() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
+    }
+    public String getExecuteNode() {
+         return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
+    }
+    public String getEllapsedTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
+    }
+
+    public String getUsedCPUTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
+    }
+
+    public String getUsedMemory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
+    }
+    public void getShellName() {
+        this.getJobDescriptorDocument().getJobDescriptor().getShellName();
+    }
+
+    public String getJobName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
+    }
+
+    public String getJobId() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+
+    public String getVariableList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+    public String getSubmitArgs() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String[] getPostJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getModuleCommands() {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getPreJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String getJobSubmitterCommand(){
+          return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
+    }
+
+    public String getPartition(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
+    }
+
+    public String getUserName(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
+    }
+
+    public void setCallBackIp(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
+    }
+
+    public void setCallBackPort(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
+    }
+
+
+    public String getCallBackIp(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
+    }
+    public String getCallBackPort(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
+    }
+
+    public void setMailType(String emailType) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
+    }
+
+    public String getMailType() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
+    }
+    public void setMailAddress(String emailAddress) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
+    }
+
+    public String getMailAddress() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
+    }
+
+    public String getChassisName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
+    }
+
+    public void setChassisName(String chassisName){
+        this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
+    }
+    
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
new file mode 100644
index 0000000..d58a994
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
@@ -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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+
+public interface JobManagerConfiguration {
+
+	public RawCommandInfo getCancelCommand(String jobID);
+
+	public String getJobDescriptionTemplateName();
+
+	public RawCommandInfo getMonitorCommand(String jobID);
+
+	public RawCommandInfo getUserBasedMonitorCommand(String userName);
+
+    public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
+
+	public String getScriptExtension();
+
+	public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
+
+	public OutputParser getParser();
+
+	public String getInstalledPath();
+
+	public String getBaseCancelCommand();
+
+	public String getBaseMonitorCommand();
+
+	public String getBaseSubmitCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
new file mode 100644
index 0000000..556f4ef
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: lahirugunathilake
+ * Date: 8/22/13
+ * Time: 7:19 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public enum JobType {
+            SERIAL, SINGLE, MPI, MULTIPLE, CONDOR
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
new file mode 100644
index 0000000..f9c7f33
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
@@ -0,0 +1,121 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+
+public class LSFJobConfiguration implements JobManagerConfiguration {
+    private final static Logger logger = LoggerFactory.getLogger(LSFJobConfiguration.class);
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public LSFJobConfiguration(){
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+    public LSFJobConfiguration(String jobDescriptionTemplateName,
+                                 String scriptExtension,String installedPath,OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/") || installedPath.isEmpty()) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    @Override
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "bkill " + jobID);
+    }
+
+    @Override
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    @Override
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "bjobs " + jobID);
+    }
+
+    @Override
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "bjobs -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        return new RawCommandInfo(this.installedPath + "bjobs -J " + jobName);
+    }
+
+    @Override
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    @Override
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "bsub < " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    @Override
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    @Override
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+
+    @Override
+    public String getBaseCancelCommand() {
+        return "bkill";
+    }
+
+    @Override
+    public String getBaseMonitorCommand() {
+        return "bjobs";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "bsub";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
new file mode 100644
index 0000000..c6dea17
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
@@ -0,0 +1,130 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class LSFOutputParser implements OutputParser {
+    private final static Logger logger = LoggerFactory.getLogger(LSFOutputParser.class);
+
+    @Override
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+        //todo we need to implement this but we are not using it airavata runtime
+        // if someone is using the gsissh as a tool this will be useful to get a descriptive information about a single job
+    }
+
+    @Override
+    public String parseJobSubmission(String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+        return rawOutput.substring(rawOutput.indexOf("<")+1,rawOutput.indexOf(">"));
+    }
+
+    @Override
+    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
+        boolean jobFount = false;
+        logger.debug(rawOutput);
+        //todo this is not used anymore
+        return JobStatus.C;
+    }
+
+    @Override
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+
+        String[]    info = rawOutput.split("\n");
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0,8))) {
+                    // now starts processing this line
+                    logger.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+//                    lastStop = i + 1;
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(2)));
+                    }catch(IndexOutOfBoundsException e){
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if(!found)
+                logger.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                logger.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            logger.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+
+    public static void main(String[] args) {
+        String test = "Job <2477982> is submitted to queue <short>.";
+        System.out.println(test.substring(test.indexOf("<")+1, test.indexOf(">")));
+        String test1 = "JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME\n" +
+                "2636607 lg11w   RUN   long       ghpcc06     c11b02      *069656647 Mar  7 00:58\n" +
+                "2636582 lg11w   RUN   long       ghpcc06     c02b01      2134490944 Mar  7 00:48";
+        Map<String, JobStatus> statusMap = new HashMap<String, JobStatus>();
+        statusMap.put("2477983,2134490944", JobStatus.U);
+        LSFOutputParser lsfOutputParser = new LSFOutputParser();
+        try {
+            lsfOutputParser.parseJobStatuses("cjh", statusMap, test1);
+        } catch (SSHApiException e) {
+            logger.error(e.getMessage(), e);
+        }
+        System.out.println(statusMap.get("2477983,2134490944"));
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
new file mode 100644
index 0000000..9730c33
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+import java.util.Map;
+
+public interface OutputParser {
+
+    /**
+     * Tihs can be used to fill a jobdescriptor based on the output
+     * @param descriptor
+     * @return
+     */
+    public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob the result of a job submission to get the JobID
+     * @param rawOutput
+     * @return
+     */
+    public String parseJobSubmission(String rawOutput)throws SSHApiException;
+
+
+    /**
+     * This can be used to get the job status from the output
+     * @param jobID
+     * @param rawOutput
+     */
+    public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob a big output and get multipleJob statuses
+     * @param statusMap list of status map will return and key will be the job ID
+     * @param rawOutput
+     */
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
+
+    /**
+     * filter the jobId value of given JobName from rawOutput
+     * @param jobName
+     * @param rawOutput
+     * @return
+     * @throws SSHApiException
+     */
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
new file mode 100644
index 0000000..0179e01
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class PBSJobConfiguration implements JobManagerConfiguration {
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public PBSJobConfiguration() {
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+
+    public PBSJobConfiguration(String jobDescriptionTemplateName,
+                               String scriptExtension, String installedPath, OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qstat -f " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "qsub " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        // For PBS there is no option to get jobDetails by JobName, so we search with userName
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public String  getBaseCancelCommand() {
+        return "qdel";
+    }
+
+    @Override
+    public String  getBaseMonitorCommand() {
+        return "qstat";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "qsub ";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
new file mode 100644
index 0000000..2f17787
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
@@ -0,0 +1,212 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class PBSOutputParser implements OutputParser {
+    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
+
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line;
+        for (int i = 0; i < info.length; i++) {
+            if (info[i].contains("=")) {
+                line = info[i].split("=", 2);
+            } else {
+                line = info[i].split(":", 2);
+            }
+            if (line.length >= 2) {
+                String header = line[0].trim();
+                log.debug("Header = " + header);
+                String value = line[1].trim();
+                log.debug("value = " + value);
+
+                if (header.equals("Variable_List")) {
+                    while (info[i + 1].startsWith("\t")) {
+                        value += info[i + 1];
+                        i++;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setVariableList(value);
+                } else if ("Job Id".equals(header)) {
+                    jobDescriptor.setJobID(value);
+                } else if ("Job_Name".equals(header)) {
+                    jobDescriptor.setJobName(value);
+                } else if ("Account_Name".equals(header)) {
+                    jobDescriptor.setAcountString(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("Job_Owner".equals(header)) {
+                    jobDescriptor.setOwner(value);
+                } else if ("resources_used.cput".equals(header)) {
+                    jobDescriptor.setUsedCPUTime(value);
+                } else if ("resources_used.mem".equals(header)) {
+                    jobDescriptor.setUsedMemory(value);
+                } else if ("resources_used.walltime".equals(header)) {
+                    jobDescriptor.setEllapsedTime(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("queue".equals(header))
+                    jobDescriptor.setQueueName(value);
+                else if ("ctime".equals(header)) {
+                    jobDescriptor.setCTime(value);
+                } else if ("qtime".equals(header)) {
+                    jobDescriptor.setQTime(value);
+                } else if ("mtime".equals(header)) {
+                    jobDescriptor.setMTime(value);
+                } else if ("start_time".equals(header)) {
+                    jobDescriptor.setSTime(value);
+                } else if ("comp_time".equals(header)) {
+                    jobDescriptor.setCompTime(value);
+                } else if ("exec_host".equals(header)) {
+                    jobDescriptor.setExecuteNode(value);
+                } else if ("Output_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardOutFile(value);
+                    else {
+                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
+                        i++;
+                    }
+                } else if ("Error_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardErrorFile(value);
+                    else {
+                        String st = info[i + 1].trim();
+                        jobDescriptor.setStandardErrorFile(value + st);
+                        i++;
+                    }
+
+                } else if ("submit_args".equals(header)) {
+                    while (i + 1 < info.length) {
+                        if (info[i + 1].startsWith("\t")) {
+                            value += info[i + 1];
+                            i++;
+                        } else
+                            break;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setSubmitArgs(value);
+                }
+            }
+        }
+    }
+
+    public String parseJobSubmission(String rawOutput) {
+        log.debug(rawOutput);
+        return rawOutput;  //In PBS stdout is going to be directly the jobID
+    }
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) {
+        boolean jobFount = false;
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line = null;
+        int index = 0;
+        for (String anInfo : info) {
+            index++;
+            if (anInfo.contains("Job Id:")) {
+                if (anInfo.contains(jobID)) {
+                    jobFount = true;
+                    break;
+                }
+            }
+        }
+        if (jobFount) {
+            for (int i=index;i<info.length;i++) {
+                String anInfo = info[i];
+                if (anInfo.contains("=")) {
+                    line = anInfo.split("=", 2);
+                    if (line.length != 0) {
+                        if (line[0].contains("job_state")) {
+                            return JobStatus.valueOf(line[1].replaceAll(" ", ""));
+                        }
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
+        log.debug(rawOutput);
+        String[]    info = rawOutput.split("\n");
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0,8))) {
+                    // now starts processing this line
+                    log.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+//                    lastStop = i + 1;
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(9)));
+                    }catch(IndexOutOfBoundsException e){
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if(!found)
+            log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        Pattern pattern = Pattern.compile("\\s*(?<" + regJobId + ">[^\\s]*).* " + jobName + " "); // regex , JOB_ID will come as first column
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                log.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            log.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
new file mode 100644
index 0000000..54d8f40
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
@@ -0,0 +1,117 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class SlurmJobConfiguration implements JobManagerConfiguration{
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public SlurmJobConfiguration(){
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+    public SlurmJobConfiguration(String jobDescriptionTemplateName,
+                                   String scriptExtension,String installedPath,OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "scancel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "squeue -j " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory,String pbsFilePath) {
+          return new RawCommandInfo(this.installedPath + "sbatch " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "squeue -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        return new RawCommandInfo(this.installedPath + "squeue -n " + jobName + " -u " + userName);
+    }
+
+    @Override
+    public String getBaseCancelCommand() {
+        return "scancel";
+    }
+
+    @Override
+    public String getBaseMonitorCommand() {
+        return "squeue";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "sbatch";
+    }
+}


[39/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
Refactored gfac sub modules, merged  gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh  modules and create gface-impl, removed implementation from gfac-core to gfac-impl


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

Branch: refs/heads/master
Commit: 7b809747658c5b5e5703540395884c580e8d1f8f
Parents: 82773c7
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Wed Jun 3 14:14:00 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Wed Jun 3 14:14:00 2015 -0400

----------------------------------------------------------------------
 modules/gfac/airavata-gfac-service/pom.xml      |   95 -
 .../apache/airavata/gfac/cpi/GfacService.java   | 3170 ------------------
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 -
 .../apache/airavata/gfac/server/GfacServer.java |  143 -
 .../airavata/gfac/server/GfacServerHandler.java |  421 ---
 .../src/main/resources/gsissh.properties        |   26 -
 .../gfac/client/GfacClientFactoryTest.java      |  103 -
 .../airavata/gfac/client/util/Initialize.java   |  330 --
 .../src/test/resources/gsissh.properties        |   26 -
 .../src/test/resources/monitor.properties       |   30 -
 .../src/test/resources/orchestrator.properties  |   26 -
 .../src/test/resources/registry-derby.sql       |  361 --
 .../src/test/resources/zoo.cfg                  |   22 -
 modules/gfac/airavata-gfac-stubs/pom.xml        |   60 -
 .../airavata/gfac/client/GFACInstance.java      |   62 -
 .../airavata/gfac/client/GFacClientFactory.java |   42 -
 .../apache/airavata/gfac/cpi/GfacService.java   | 2867 ----------------
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 -
 .../gfac/bes/handlers/AbstractSMSHandler.java   |    2 +-
 .../gfac/bes/provider/impl/BESProvider.java     |    7 +-
 .../airavata/gfac/bes/utils/SecurityUtils.java  |    2 +-
 modules/gfac/gfac-client/pom.xml                |   60 +
 .../airavata/gfac/client/GFACInstance.java      |   62 +
 .../airavata/gfac/client/GFacClientFactory.java |   42 +
 .../apache/airavata/gfac/cpi/GfacService.java   | 2867 ++++++++++++++++
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 +
 .../org/apache/airavata/gfac/Scheduler.java     |    2 +-
 .../org/apache/airavata/gfac/core/GFac.java     |   77 +
 .../gfac/core/GFacThreadPoolExecutor.java       |   57 +
 .../apache/airavata/gfac/core/GFacUtils.java    |  708 ++++
 .../core/authentication/AuthenticationInfo.java |   32 +
 .../authentication/GSIAuthenticationInfo.java   |   43 +
 .../authentication/SSHKeyAuthentication.java    |   46 +
 .../SSHPasswordAuthentication.java              |   43 +
 .../SSHPublicKeyAuthentication.java             |   54 +
 .../SSHPublicKeyFileAuthentication.java         |   52 +
 .../gfac/core/context/JobExecutionContext.java  |   13 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 1158 -------
 .../org/apache/airavata/gfac/core/cpi/GFac.java |   77 -
 .../apache/airavata/gfac/core/cpi/GFacImpl.java |  798 -----
 .../gfac/core/handler/AbstractHandler.java      |    2 +-
 .../core/handler/AppDescriptorCheckHandler.java |    2 +-
 .../core/monitor/AiravataJobStatusUpdator.java  |  123 -
 .../core/monitor/AiravataTaskStatusUpdator.java |  162 -
 .../AiravataWorkflowNodeStatusUpdator.java      |  130 -
 .../airavata/gfac/core/monitor/EmailParser.java |   35 +
 .../gfac/core/monitor/ExperimentIdentity.java   |   36 -
 .../airavata/gfac/core/monitor/JobIdentity.java |   39 -
 .../gfac/core/monitor/JobStatusResult.java      |   55 +
 .../gfac/core/monitor/TaskIdentity.java         |   38 -
 .../gfac/core/monitor/WorkflowNodeIdentity.java |   37 -
 .../monitor/state/JobStatusChangeRequest.java   |   81 -
 .../monitor/state/JobStatusChangedEvent.java    |   81 -
 .../state/TaskOutputDataChangedEvent.java       |   64 -
 .../monitor/state/TaskStatusChangeRequest.java  |   62 -
 .../monitor/state/TaskStatusChangedEvent.java   |   62 -
 .../state/WorkflowNodeStatusChangedEvent.java   |   64 -
 .../gfac/core/notification/GFacNotifier.java    |   42 -
 .../core/notification/MonitorPublisher.java     |   47 -
 .../notification/events/ExecutionFailEvent.java |   35 -
 .../events/FinishExecutionEvent.java            |   29 -
 .../events/FinishScheduleEvent.java             |   29 -
 .../core/notification/events/GFacEvent.java     |   39 -
 .../core/notification/events/JobIDEvent.java    |   35 -
 .../events/StartExecutionEvent.java             |   29 -
 .../notification/events/StartScheduleEvent.java |   29 -
 .../notification/events/StatusChangeEvent.java  |   33 -
 .../notification/events/UnicoreJobIDEvent.java  |   35 -
 .../notification/listeners/LoggingListener.java |   57 -
 .../listeners/WorkflowTrackingListener.java     |  133 -
 .../airavata/gfac/core/persistence/JobData.java |   55 -
 .../core/persistence/JobPersistenceManager.java |   76 -
 .../gfac/core/provider/AbstractProvider.java    |    2 -
 .../gfac/core/utils/GFacThreadPoolExecutor.java |   57 -
 .../airavata/gfac/core/utils/GFacUtils.java     |  708 ----
 .../gfac/core/utils/InputHandlerWorker.java     |   52 -
 .../gfac/core/utils/OutHandlerWorker.java       |   87 -
 .../airavata/gfac/core/utils/OutputUtils.java   |  111 -
 modules/gfac/gfac-gsissh/pom.xml                |  117 -
 .../handler/GSISSHDirectorySetupHandler.java    |  118 -
 .../gfac/gsissh/handler/GSISSHInputHandler.java |  213 --
 .../gsissh/handler/GSISSHOutputHandler.java     |  323 --
 .../gsissh/handler/NewGSISSHOutputHandler.java  |   83 -
 .../gsissh/provider/impl/GSISSHProvider.java    |  351 --
 .../gsissh/security/GSISecurityContext.java     |   86 -
 .../security/TokenizedMyProxyAuthInfo.java      |  305 --
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  367 --
 .../src/main/resources/errors.properties        |  197 --
 .../src/main/resources/service.properties       |   58 -
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |  229 --
 .../GSISecurityContextTestWithMyProxyAuth.java  |  163 -
 .../src/test/resources/PBSTemplate.xslt         |   78 -
 .../src/test/resources/logging.properties       |   42 -
 modules/gfac/gfac-impl/pom.xml                  |   65 +
 .../airavata/gfac/gsi/ssh/GSSContextX509.java   |  210 ++
 .../airavata/gfac/gsi/ssh/api/Cluster.java      |  162 +
 .../gfac/gsi/ssh/api/CommandExecutor.java       |  278 ++
 .../airavata/gfac/gsi/ssh/api/CommandInfo.java  |   34 +
 .../gfac/gsi/ssh/api/CommandOutput.java         |   49 +
 .../apache/airavata/gfac/gsi/ssh/api/Core.java  |   59 +
 .../apache/airavata/gfac/gsi/ssh/api/Node.java  |  104 +
 .../gfac/gsi/ssh/api/SSHApiException.java       |   36 +
 .../airavata/gfac/gsi/ssh/api/ServerInfo.java   |   65 +
 .../gfac/gsi/ssh/api/job/JobDescriptor.java     |  473 +++
 .../ssh/api/job/JobManagerConfiguration.java    |   51 +
 .../airavata/gfac/gsi/ssh/api/job/JobType.java  |   32 +
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  121 +
 .../gfac/gsi/ssh/api/job/LSFOutputParser.java   |  130 +
 .../gfac/gsi/ssh/api/job/OutputParser.java      |   67 +
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/PBSOutputParser.java   |  212 ++
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  117 +
 .../gfac/gsi/ssh/api/job/SlurmOutputParser.java |  190 ++
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/UGEOutputParser.java   |  188 ++
 .../gfac/gsi/ssh/config/ConfigReader.java       |   76 +
 .../ssh/impl/DefaultJobSubmissionListener.java  |   42 +
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  767 +++++
 .../airavata/gfac/gsi/ssh/impl/JobStatus.java   |  110 +
 .../airavata/gfac/gsi/ssh/impl/PBSCluster.java  |   45 +
 .../gfac/gsi/ssh/impl/RawCommandInfo.java       |   55 +
 .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java |   63 +
 .../gfac/gsi/ssh/impl/StandardOutReader.java    |   79 +
 .../gfac/gsi/ssh/impl/SystemCommandOutput.java  |   78 +
 .../DefaultPasswordAuthenticationInfo.java      |   48 +
 .../DefaultPublicKeyAuthentication.java         |   68 +
 .../DefaultPublicKeyFileAuthentication.java     |   70 +
 .../MyProxyAuthenticationInfo.java              |  108 +
 .../gfac/gsi/ssh/jsch/ExtendedJSch.java         |   64 +
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 +
 .../airavata/gfac/gsi/ssh/util/CommonUtils.java |   81 +
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 +
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 +
 .../airavata/gfac/gsi/ssh/util/SSHUtils.java    |  757 +++++
 .../handler/GSISSHDirectorySetupHandler.java    |  118 +
 .../gfac/gsissh/handler/GSISSHInputHandler.java |  213 ++
 .../gsissh/handler/GSISSHOutputHandler.java     |  323 ++
 .../gsissh/handler/NewGSISSHOutputHandler.java  |   83 +
 .../gsissh/provider/impl/GSISSHProvider.java    |  346 ++
 .../gsissh/security/GSISecurityContext.java     |   74 +
 .../security/TokenizedMyProxyAuthInfo.java      |  304 ++
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  367 ++
 .../gfac/impl/AiravataJobStatusUpdator.java     |  120 +
 .../gfac/impl/AiravataTaskStatusUpdator.java    |  166 +
 .../impl/AiravataWorkflowNodeStatusUpdator.java |  129 +
 .../airavata/gfac/impl/BetterGfacImpl.java      | 1151 +++++++
 .../gfac/impl/GfacInternalStatusUpdator.java    |  104 +
 .../airavata/gfac/impl/InputHandlerWorker.java  |   52 +
 .../airavata/gfac/impl/OutHandlerWorker.java    |   88 +
 .../apache/airavata/gfac/impl/OutputUtils.java  |  111 +
 .../handler/LocalDirectorySetupHandler.java     |   62 +
 .../gfac/local/handler/LocalInputHandler.java   |   92 +
 .../gfac/local/provider/impl/LocalProvider.java |  311 ++
 .../local/utils/InputStreamToFileWriter.java    |   68 +
 .../airavata/gfac/local/utils/InputUtils.java   |   46 +
 .../gfac/local/utils/LocalProviderUtil.java     |   51 +
 .../airavata/gfac/monitor/HPCMonitorID.java     |  107 +
 .../airavata/gfac/monitor/HostMonitorData.java  |   88 +
 .../airavata/gfac/monitor/UserMonitorData.java  |   76 +
 .../command/ExperimentCancelRequest.java        |   38 +
 .../gfac/monitor/command/TaskCancelRequest.java |   52 +
 .../monitor/core/AiravataAbstractMonitor.java   |   38 +
 .../gfac/monitor/core/MessageParser.java        |   43 +
 .../airavata/gfac/monitor/core/Monitor.java     |   30 +
 .../airavata/gfac/monitor/core/PullMonitor.java |   64 +
 .../airavata/gfac/monitor/core/PushMonitor.java |   60 +
 .../gfac/monitor/email/EmailBasedMonitor.java   |  344 ++
 .../gfac/monitor/email/EmailMonitorFactory.java |   49 +
 .../monitor/email/parser/LSFEmailParser.java    |   75 +
 .../monitor/email/parser/PBSEmailParser.java    |  105 +
 .../monitor/email/parser/SLURMEmailParser.java  |   83 +
 .../monitor/email/parser/UGEEmailParser.java    |  103 +
 .../exception/AiravataMonitorException.java     |   37 +
 .../handlers/GridPullMonitorHandler.java        |  139 +
 .../handlers/GridPushMonitorHandler.java        |  107 +
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  471 +++
 .../impl/pull/qstat/ResourceConnection.java     |  154 +
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  280 ++
 .../monitor/impl/push/amqp/BasicConsumer.java   |   87 +
 .../impl/push/amqp/JSONMessageParser.java       |   78 +
 .../impl/push/amqp/SimpleJobFinishConsumer.java |   86 +
 .../impl/push/amqp/UnRegisterWorker.java        |   67 +
 .../gfac/monitor/util/AMQPConnectionUtil.java   |   80 +
 .../airavata/gfac/monitor/util/CommonUtils.java |  280 ++
 .../airavata/gfac/monitor/util/X509Helper.java  |  164 +
 .../gfac/ssh/context/SSHAuthWrapper.java        |   50 +
 .../ssh/handler/AdvancedSCPInputHandler.java    |  229 ++
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  225 ++
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |   78 +
 .../ssh/handler/SSHDirectorySetupHandler.java   |  119 +
 .../gfac/ssh/handler/SSHInputHandler.java       |  198 ++
 .../gfac/ssh/handler/SSHOutputHandler.java      |  256 ++
 .../gfac/ssh/provider/impl/SSHProvider.java     |  467 +++
 .../gfac/ssh/security/SSHSecurityContext.java   |  118 +
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |  184 +
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  561 ++++
 .../airavata/gfac/ssh/util/HandleOutputs.java   |   96 +
 .../src/main/resources/LSFTemplate.xslt         |   93 +
 .../src/main/resources/PBSTemplate.xslt         |   82 +
 .../src/main/resources/SLURMTemplate.xslt       |   78 +
 .../src/main/resources/UGETemplate.xslt         |   74 +
 .../src/main/resources/errors.properties        |  197 ++
 .../src/main/resources/schema/AccessPolicy.json |   13 +
 .../src/main/resources/schema/Activity.json     |   31 +
 .../src/main/resources/schema/AdminDomain.json  |   51 +
 .../schema/ApplicationEnvironment.json          |   86 +
 .../resources/schema/ApplicationHandle.json     |   21 +
 .../src/main/resources/schema/Benchmark.json    |   21 +
 .../resources/schema/ComputingActivity.json     |  165 +
 .../resources/schema/ComputingEndpoint.json     |   44 +
 .../main/resources/schema/ComputingManager.json |  117 +
 .../main/resources/schema/ComputingService.json |   32 +
 .../main/resources/schema/ComputingShare.json   |  182 +
 .../src/main/resources/schema/Contact.json      |   32 +
 .../src/main/resources/schema/DataStore.json    |   30 +
 .../src/main/resources/schema/Domain.json       |   30 +
 .../src/main/resources/schema/Endpoint.json     |  147 +
 .../src/main/resources/schema/Entity.json       |   35 +
 .../resources/schema/ExecutionEnvironment.json  |  115 +
 .../src/main/resources/schema/Glue2.json        |  246 ++
 .../src/main/resources/schema/Location.json     |   47 +
 .../src/main/resources/schema/Manager.json      |   28 +
 .../main/resources/schema/MappingPolicy.json    |   13 +
 .../src/main/resources/schema/Policy.json       |   27 +
 .../src/main/resources/schema/Resource.json     |   27 +
 .../src/main/resources/schema/Service.json      |   75 +
 .../src/main/resources/schema/Share.json        |   45 +
 .../resources/schema/StorageAccessProtocol.json |   32 +
 .../main/resources/schema/StorageEndpoint.json  |    8 +
 .../main/resources/schema/StorageManager.json   |    8 +
 .../main/resources/schema/StorageService.json   |   22 +
 .../schema/StorageServiceCapacity.json          |   33 +
 .../src/main/resources/schema/StorageShare.json |   65 +
 .../resources/schema/StorageShareCapacity.json  |   33 +
 .../resources/schema/ToComputingService.json    |   32 +
 .../main/resources/schema/ToStorageService.json |   25 +
 .../src/main/resources/schema/UserDomain.json   |   58 +
 .../main/resources/schemas/PBSJobDescriptor.xsd |  114 +
 .../resources/schemas/gsissh-schemas.xsdconfig  |   14 +
 .../src/main/resources/service.properties       |   58 +
 .../services/impl/BigRed2TestWithSSHAuth.java   |  252 ++
 .../gfac/services/impl/CredentialStoreTest.java |  135 +
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |  229 ++
 .../gfac/services/impl/LocalProviderTest.java   |  184 +
 .../impl/SSHProviderTestWithSSHAuth.java        |  172 +
 .../GSISecurityContextTestWithMyProxyAuth.java  |  163 +
 .../gfac/ssh/config/ConfigReaderTest.java       |   37 +
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   77 +
 .../gfac/ssh/impl/VanilaTestWithSSHAuth.java    |  262 ++
 .../apache/airavata/job/AMQPMonitorTest.java    |  207 ++
 .../job/QstatMonitorTestWithMyProxyAuth.java    |  172 +
 .../src/test/resources/PBSTemplate.xslt         |   73 +
 .../gfac/gfac-impl/src/test/resources/echo.bat  |   22 +
 .../src/test/resources/gsissh.properties        |   26 +
 .../src/test/resources/log4j.properties         |   34 +
 .../src/test/resources/logging.properties       |   42 +
 .../gfac/gfac-impl/src/test/resources/sleep.pbs |   32 +
 .../gfac/gfac-impl/src/test/resources/test.pbs  |   30 +
 modules/gfac/gfac-local/pom.xml                 |   65 -
 .../handler/LocalDirectorySetupHandler.java     |   62 -
 .../gfac/local/handler/LocalInputHandler.java   |   92 -
 .../gfac/local/provider/impl/LocalProvider.java |  311 --
 .../local/utils/InputStreamToFileWriter.java    |   68 -
 .../airavata/gfac/local/utils/InputUtils.java   |   46 -
 .../gfac/local/utils/LocalProviderUtil.java     |   51 -
 .../src/main/resources/errors.properties        |  197 --
 .../src/main/resources/service.properties       |   58 -
 .../gfac/services/impl/LocalProviderTest.java   |  184 -
 .../src/test/resources/PBSTemplate.xslt         |   73 -
 .../src/test/resources/logging.properties       |   42 -
 .../gfac-monitor/gfac-email-monitor/pom.xml     |   35 -
 .../gfac/monitor/email/EmailBasedMonitor.java   |  345 --
 .../gfac/monitor/email/EmailMonitorFactory.java |   49 -
 .../gfac/monitor/email/JobStatusResult.java     |   55 -
 .../gfac/monitor/email/parser/EmailParser.java  |   36 -
 .../monitor/email/parser/LSFEmailParser.java    |   74 -
 .../monitor/email/parser/PBSEmailParser.java    |  104 -
 .../monitor/email/parser/SLURMEmailParser.java  |   82 -
 .../monitor/email/parser/UGEEmailParser.java    |  102 -
 .../gfac/gfac-monitor/gfac-hpc-monitor/pom.xml  |  158 -
 .../airavata/gfac/monitor/HPCMonitorID.java     |  107 -
 .../airavata/gfac/monitor/HostMonitorData.java  |   88 -
 .../airavata/gfac/monitor/UserMonitorData.java  |   76 -
 .../command/ExperimentCancelRequest.java        |   38 -
 .../gfac/monitor/command/TaskCancelRequest.java |   52 -
 .../monitor/core/AiravataAbstractMonitor.java   |   38 -
 .../gfac/monitor/core/MessageParser.java        |   43 -
 .../airavata/gfac/monitor/core/Monitor.java     |   30 -
 .../airavata/gfac/monitor/core/PullMonitor.java |   64 -
 .../airavata/gfac/monitor/core/PushMonitor.java |   60 -
 .../exception/AiravataMonitorException.java     |   37 -
 .../handlers/GridPullMonitorHandler.java        |  145 -
 .../handlers/GridPushMonitorHandler.java        |  108 -
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  471 ---
 .../impl/pull/qstat/ResourceConnection.java     |  154 -
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  280 --
 .../monitor/impl/push/amqp/BasicConsumer.java   |   87 -
 .../impl/push/amqp/JSONMessageParser.java       |   78 -
 .../impl/push/amqp/SimpleJobFinishConsumer.java |   86 -
 .../impl/push/amqp/UnRegisterWorker.java        |   67 -
 .../gfac/monitor/util/AMQPConnectionUtil.java   |   80 -
 .../airavata/gfac/monitor/util/CommonUtils.java |  280 --
 .../airavata/gfac/monitor/util/X509Helper.java  |  164 -
 .../src/main/resources/errors.properties        |  197 --
 .../src/main/resources/schema/AccessPolicy.json |   13 -
 .../src/main/resources/schema/Activity.json     |   31 -
 .../src/main/resources/schema/AdminDomain.json  |   51 -
 .../schema/ApplicationEnvironment.json          |   86 -
 .../resources/schema/ApplicationHandle.json     |   21 -
 .../src/main/resources/schema/Benchmark.json    |   21 -
 .../resources/schema/ComputingActivity.json     |  165 -
 .../resources/schema/ComputingEndpoint.json     |   44 -
 .../main/resources/schema/ComputingManager.json |  117 -
 .../main/resources/schema/ComputingService.json |   32 -
 .../main/resources/schema/ComputingShare.json   |  182 -
 .../src/main/resources/schema/Contact.json      |   32 -
 .../src/main/resources/schema/DataStore.json    |   30 -
 .../src/main/resources/schema/Domain.json       |   30 -
 .../src/main/resources/schema/Endpoint.json     |  147 -
 .../src/main/resources/schema/Entity.json       |   35 -
 .../resources/schema/ExecutionEnvironment.json  |  115 -
 .../src/main/resources/schema/Glue2.json        |  246 --
 .../src/main/resources/schema/Location.json     |   47 -
 .../src/main/resources/schema/Manager.json      |   28 -
 .../main/resources/schema/MappingPolicy.json    |   13 -
 .../src/main/resources/schema/Policy.json       |   27 -
 .../src/main/resources/schema/Resource.json     |   27 -
 .../src/main/resources/schema/Service.json      |   75 -
 .../src/main/resources/schema/Share.json        |   45 -
 .../resources/schema/StorageAccessProtocol.json |   32 -
 .../main/resources/schema/StorageEndpoint.json  |    8 -
 .../main/resources/schema/StorageManager.json   |    8 -
 .../main/resources/schema/StorageService.json   |   22 -
 .../schema/StorageServiceCapacity.json          |   33 -
 .../src/main/resources/schema/StorageShare.json |   65 -
 .../resources/schema/StorageShareCapacity.json  |   33 -
 .../resources/schema/ToComputingService.json    |   32 -
 .../main/resources/schema/ToStorageService.json |   25 -
 .../src/main/resources/schema/UserDomain.json   |   58 -
 .../src/main/resources/service.properties       |   58 -
 .../apache/airavata/job/AMQPMonitorTest.java    |  207 --
 .../job/QstatMonitorTestWithMyProxyAuth.java    |  172 -
 .../src/test/resources/PBSTemplate.xslt         |   73 -
 .../src/test/resources/echo.bat                 |   22 -
 .../src/test/resources/logging.properties       |   42 -
 modules/gfac/gfac-monitor/pom.xml               |   29 -
 modules/gfac/gfac-service/pom.xml               |   95 +
 .../apache/airavata/gfac/cpi/GfacService.java   | 3170 ++++++++++++++++++
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 +
 .../apache/airavata/gfac/server/GfacServer.java |  143 +
 .../airavata/gfac/server/GfacServerHandler.java |  421 +++
 .../src/main/resources/gsissh.properties        |   26 +
 .../gfac/client/GfacClientFactoryTest.java      |  103 +
 .../airavata/gfac/client/util/Initialize.java   |  330 ++
 .../src/test/resources/gsissh.properties        |   26 +
 .../src/test/resources/monitor.properties       |   30 +
 .../src/test/resources/orchestrator.properties  |   26 +
 .../src/test/resources/registry-derby.sql       |  361 ++
 .../gfac-service/src/test/resources/zoo.cfg     |   22 +
 modules/gfac/gfac-ssh/pom.xml                   |  114 -
 .../gfac/ssh/context/SSHAuthWrapper.java        |   50 -
 .../ssh/handler/AdvancedSCPInputHandler.java    |  229 --
 .../ssh/handler/AdvancedSCPOutputHandler.java   |  225 --
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |   78 -
 .../ssh/handler/SSHDirectorySetupHandler.java   |  119 -
 .../gfac/ssh/handler/SSHInputHandler.java       |  198 --
 .../gfac/ssh/handler/SSHOutputHandler.java      |  256 --
 .../gfac/ssh/provider/impl/SSHProvider.java     |  473 ---
 .../gfac/ssh/security/SSHSecurityContext.java   |  118 -
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |  184 -
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |  562 ----
 .../airavata/gfac/ssh/util/HandleOutputs.java   |   96 -
 .../src/main/resources/errors.properties        |  197 --
 .../src/main/resources/service.properties       |   58 -
 .../services/impl/BigRed2TestWithSSHAuth.java   |  252 --
 .../gfac/services/impl/CredentialStoreTest.java |  135 -
 .../impl/SSHProviderTestWithSSHAuth.java        |  172 -
 .../src/test/resources/PBSTemplate.xslt         |   75 -
 .../src/test/resources/logging.properties       |   42 -
 modules/gfac/pom.xml                            |    9 +-
 .../core/impl/GFACEmbeddedJobSubmitter.java     |   12 +-
 .../core/impl/GFACPassiveJobSubmitter.java      |    2 +-
 .../server/OrchestratorServerHandler.java       |    2 +-
 pom.xml                                         |    1 -
 tools/gsissh-cli-tools/README.txt               |    2 +-
 .../ssh/cli/SSHApiClientWithMyProxyAuth.java    |   25 +-
 tools/gsissh/src/main/java/SSHDemo.java         |    4 +-
 .../java/com/jcraft/jsch/ExtendedSession.java   |    2 +-
 .../UserAuthGSSAPIWithMICGSSCredentials.java    |    4 +-
 .../airavata/gfac/gsi/ssh/GSSContextX509.java   |  210 ++
 .../airavata/gfac/gsi/ssh/api/Cluster.java      |  162 +
 .../gfac/gsi/ssh/api/CommandExecutor.java       |  278 ++
 .../airavata/gfac/gsi/ssh/api/CommandInfo.java  |   34 +
 .../gfac/gsi/ssh/api/CommandOutput.java         |   49 +
 .../apache/airavata/gfac/gsi/ssh/api/Core.java  |   59 +
 .../apache/airavata/gfac/gsi/ssh/api/Node.java  |  104 +
 .../gfac/gsi/ssh/api/SSHApiException.java       |   36 +
 .../airavata/gfac/gsi/ssh/api/ServerInfo.java   |   65 +
 .../api/authentication/AuthenticationInfo.java  |   32 +
 .../authentication/GSIAuthenticationInfo.java   |   43 +
 .../authentication/SSHKeyAuthentication.java    |   46 +
 .../SSHPasswordAuthentication.java              |   43 +
 .../SSHPublicKeyAuthentication.java             |   54 +
 .../SSHPublicKeyFileAuthentication.java         |   52 +
 .../gfac/gsi/ssh/api/job/JobDescriptor.java     |  473 +++
 .../ssh/api/job/JobManagerConfiguration.java    |   51 +
 .../airavata/gfac/gsi/ssh/api/job/JobType.java  |   32 +
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  121 +
 .../gfac/gsi/ssh/api/job/LSFOutputParser.java   |  130 +
 .../gfac/gsi/ssh/api/job/OutputParser.java      |   67 +
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/PBSOutputParser.java   |  212 ++
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  117 +
 .../gfac/gsi/ssh/api/job/SlurmOutputParser.java |  190 ++
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  119 +
 .../gfac/gsi/ssh/api/job/UGEOutputParser.java   |  188 ++
 .../gfac/gsi/ssh/config/ConfigReader.java       |   76 +
 .../ssh/impl/DefaultJobSubmissionListener.java  |   42 +
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  767 +++++
 .../airavata/gfac/gsi/ssh/impl/JobStatus.java   |  110 +
 .../airavata/gfac/gsi/ssh/impl/PBSCluster.java  |   45 +
 .../gfac/gsi/ssh/impl/RawCommandInfo.java       |   55 +
 .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java |   63 +
 .../gfac/gsi/ssh/impl/StandardOutReader.java    |   79 +
 .../gfac/gsi/ssh/impl/SystemCommandOutput.java  |   78 +
 .../DefaultPasswordAuthenticationInfo.java      |   48 +
 .../DefaultPublicKeyAuthentication.java         |   68 +
 .../DefaultPublicKeyFileAuthentication.java     |   70 +
 .../MyProxyAuthenticationInfo.java              |  108 +
 .../gfac/gsi/ssh/jsch/ExtendedJSch.java         |   64 +
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 +
 .../airavata/gfac/gsi/ssh/util/CommonUtils.java |   81 +
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 +
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 +
 .../airavata/gfac/gsi/ssh/util/SSHUtils.java    |  757 +++++
 .../apache/airavata/gsi/ssh/GSSContextX509.java |  214 --
 .../apache/airavata/gsi/ssh/api/Cluster.java    |  162 -
 .../airavata/gsi/ssh/api/CommandExecutor.java   |  278 --
 .../airavata/gsi/ssh/api/CommandInfo.java       |   34 -
 .../airavata/gsi/ssh/api/CommandOutput.java     |   49 -
 .../org/apache/airavata/gsi/ssh/api/Core.java   |   59 -
 .../org/apache/airavata/gsi/ssh/api/Node.java   |  104 -
 .../airavata/gsi/ssh/api/SSHApiException.java   |   36 -
 .../apache/airavata/gsi/ssh/api/ServerInfo.java |   65 -
 .../api/authentication/AuthenticationInfo.java  |   32 -
 .../authentication/GSIAuthenticationInfo.java   |   43 -
 .../authentication/SSHKeyAuthentication.java    |   46 -
 .../SSHPasswordAuthentication.java              |   43 -
 .../SSHPublicKeyAuthentication.java             |   54 -
 .../SSHPublicKeyFileAuthentication.java         |   52 -
 .../airavata/gsi/ssh/api/job/JobDescriptor.java |  473 ---
 .../ssh/api/job/JobManagerConfiguration.java    |   51 -
 .../airavata/gsi/ssh/api/job/JobType.java       |   32 -
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |  121 -
 .../gsi/ssh/api/job/LSFOutputParser.java        |  130 -
 .../airavata/gsi/ssh/api/job/OutputParser.java  |   68 -
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |  119 -
 .../gsi/ssh/api/job/PBSOutputParser.java        |  214 --
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |  117 -
 .../gsi/ssh/api/job/SlurmOutputParser.java      |  190 --
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |  119 -
 .../gsi/ssh/api/job/UGEOutputParser.java        |  188 --
 .../airavata/gsi/ssh/config/ConfigReader.java   |   81 -
 .../ssh/impl/DefaultJobSubmissionListener.java  |   42 -
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |  768 -----
 .../apache/airavata/gsi/ssh/impl/JobStatus.java |  112 -
 .../airavata/gsi/ssh/impl/PBSCluster.java       |   46 -
 .../airavata/gsi/ssh/impl/RawCommandInfo.java   |   55 -
 .../airavata/gsi/ssh/impl/SSHUserInfo.java      |   63 -
 .../gsi/ssh/impl/StandardOutReader.java         |   80 -
 .../gsi/ssh/impl/SystemCommandOutput.java       |   78 -
 .../DefaultPasswordAuthenticationInfo.java      |   50 -
 .../DefaultPublicKeyAuthentication.java         |   68 -
 .../DefaultPublicKeyFileAuthentication.java     |   70 -
 .../MyProxyAuthenticationInfo.java              |  108 -
 .../airavata/gsi/ssh/jsch/ExtendedJSch.java     |   64 -
 .../gsi/ssh/listener/JobSubmissionListener.java |   81 -
 .../airavata/gsi/ssh/util/CommonUtils.java      |   81 -
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |   73 -
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |   68 -
 .../apache/airavata/gsi/ssh/util/SSHUtils.java  |  758 -----
 .../resources/schemas/gsissh-schemas.xsdconfig  |    2 +-
 .../gfac/ssh/config/ConfigReaderTest.java       |   37 +
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   77 +
 .../gfac/ssh/impl/VanilaTestWithSSHAuth.java    |  262 ++
 .../gsi/ssh/config/ConfigReaderTest.java        |   37 -
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |   88 -
 .../gsi/ssh/impl/VanilaTestWithSSHAuth.java     |  263 --
 488 files changed, 36116 insertions(+), 32978 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/pom.xml b/modules/gfac/airavata-gfac-service/pom.xml
deleted file mode 100644
index 224537f..0000000
--- a/modules/gfac/airavata-gfac-service/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>gfac</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <name>Airavata Gfac Service</name>
-    <artifactId>airavata-gfac-service</artifactId>
-    <packaging>jar</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${org.slf4j.version}</version>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-client-api</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-common-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-cpi</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	    <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-model-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-api-stubs</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-stubs</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	    <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.curator</groupId>
-            <artifactId>curator-framework</artifactId>
-            <version>${curator.version}</version>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    </properties>
-    
-</project>


[16/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
new file mode 100644
index 0000000..002674c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
@@ -0,0 +1,262 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.testng.AssertJUnit;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+public class VanilaTestWithSSHAuth {
+
+    private String userName;
+    private String password;
+    private String passPhrase;
+    private String hostName;
+    private String workingDirectory;
+    private String privateKeyPath;
+    private String publicKeyPath;
+    private String path;
+
+    @BeforeTest
+    public void setUp() throws Exception {
+        System.out.println("Test case name " + this.getClass().getName());
+        //Trestles
+        this.hostName = "trestles.sdsc.xsede.org";      
+        this.userName = "ogce";
+        this.path="/opt/torque/bin/";
+        //Stampede:
+//        this.hostName = "stampede.tacc.xsede.org";        
+//        this.userName = "ogce";
+//        this.path="/usr/bin";
+        //Lonestar:
+//         this.hostName = "lonestar.tacc.utexas.edu";        
+//         this.userName = "us3";
+//        this.path="/opt/sge6.2/bin/lx24-amd64";
+        //Alamo:
+//        this.hostName = "alamo.uthscsa.edu";        
+//        this.userName = "raminder";
+//        this.path="/opt/torque/bin/";
+        //Bigred:
+//        this.hostName = "bigred2.uits.iu.edu";        
+//        this.userName = "cgateway";
+//        this.path="/opt/torque/torque-5.0.1/bin/";
+        
+        System.setProperty("ssh.host",hostName);
+        System.setProperty("ssh.username", userName);
+        System.setProperty("private.ssh.key", "/home/lginnali/.ssh/id_dsa");
+        System.setProperty("public.ssh.key", "/home/lginnali/.ssh/id_dsa.pub");
+        System.setProperty("ssh.working.directory", "/tmp");
+
+        this.hostName = System.getProperty("ssh.host");
+        this.userName = System.getProperty("ssh.username");
+        this.password = System.getProperty("ssh.password");
+        this.privateKeyPath = System.getProperty("private.ssh.key");
+        this.publicKeyPath = System.getProperty("public.ssh.key");
+        
+        System.setProperty("ssh.keypass", "");
+        this.passPhrase = System.getProperty("ssh.keypass");
+        this.workingDirectory = System.getProperty("ssh.working.directory");
+
+
+        if (this.userName == null
+                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
+            System.out.println("########### In order to test you have to either username password or private,public keys");
+            System.out.println("Use -Dssh.user=xxx -Dssh.password=yyy -Dssh.private.key.passphrase=zzz " +
+                    "-Dssh.private.key.path -Dssh.public.key.path -Dssh.working.directory ");
+        }
+    }
+
+
+    @Test
+    public void testSimplePBSJob() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
+
+        String date = new Date().toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        String pomFile =  new File("").getAbsolutePath() + File.separator + "pom.xml";
+
+        workingDirectory = workingDirectory + File.separator
+                + date + "_" + UUID.randomUUID();
+        pbsCluster.makeDirectory(workingDirectory);
+        Thread.sleep(1000);
+        pbsCluster.makeDirectory(workingDirectory + File.separator + "inputs");
+        Thread.sleep(1000);
+        pbsCluster.makeDirectory(workingDirectory + File.separator + "outputs");
+
+
+        // doing file transfer to the remote resource
+        String remoteLocation = workingDirectory + File.separator + "inputs";
+        pbsCluster.scpTo(remoteLocation, pomFile);
+
+        int i = pomFile.lastIndexOf(File.separator);
+        String fileName = pomFile.substring(i + 1);
+        // constructing the job object
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("normal");
+        jobDescriptor.setMaxWallTime("5");
+        //jobDescriptor.setJobSubmitter("aprun -n 1");
+        List<String> inputs = new ArrayList<String>();
+        inputs.add(remoteLocation + File.separator + fileName);
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        if(hostName.contains("trestles")){
+        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+        System.out.println("JobID returned : " + jobID);
+
+//        Cluster cluster = sshApi.getCluster(serverInfo, authenticationInfo);
+        Thread.sleep(1000);
+        JobDescriptor jobById = pbsCluster.getJobDescriptorById(jobID);
+
+        //printing job data got from previous call
+        AssertJUnit.assertEquals(jobById.getJobId(), jobID);
+        System.out.println(jobById.getAcountString());
+        System.out.println(jobById.getAllEnvExport());
+        System.out.println(jobById.getCompTime());
+        System.out.println(jobById.getExecutablePath());
+        System.out.println(jobById.getEllapsedTime());
+        System.out.println(jobById.getQueueName());
+        System.out.println(jobById.getExecuteNode());
+        System.out.println(jobById.getJobName());
+        System.out.println(jobById.getCTime());
+        System.out.println(jobById.getSTime());
+        System.out.println(jobById.getMTime());
+        System.out.println(jobById.getCompTime());
+        System.out.println(jobById.getOwner());
+        System.out.println(jobById.getQTime());
+        System.out.println(jobById.getUsedCPUTime());
+        System.out.println(jobById.getUsedMemory());
+        System.out.println(jobById.getVariableList());
+        }
+    }
+
+    @Test
+    public void testSimpleLSFJob() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+
+
+        // constructing the job object
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setMailAddress("test@gmail.com");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("long");
+        jobDescriptor.setMaxWallTimeForLSF("5");
+        jobDescriptor.setJobSubmitter("mpiexec");
+        jobDescriptor.setModuleLoadCommands(new String[]{"module load openmpi/1.6.5"});
+        jobDescriptor.setUsedMemory("1000");
+        jobDescriptor.setChassisName("01");
+
+        //jobDescriptor.setJobSubmitter("aprun -n 1");
+        List<String> inputs = new ArrayList<String>();
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        Cluster pbsCluster = new PBSCluster(CommonUtils.getLSFJobManager(""));
+        ((PBSCluster) pbsCluster).generateJobScript(jobDescriptor);
+    }
+
+    @Test
+    public void testSCPFromAndSCPTo() throws Exception {
+
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        // Server info
+        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));
+        new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(path));;
+
+        String date = new Date().toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        String pomFile = (new File(".")).getAbsolutePath() + File.separator + "pom.xml";
+        File file = new File(pomFile);
+        if(!file.exists()){
+            file.createNewFile();
+        }
+        // Constructing theworking directory for demonstration and creating directories in the remote
+        // resource
+        workingDirectory = workingDirectory + File.separator
+                + date + "_" + UUID.randomUUID();
+        pbsCluster.makeDirectory(workingDirectory);
+        pbsCluster.scpTo(workingDirectory, pomFile);
+        Thread.sleep(1000);
+        pbsCluster.scpFrom(workingDirectory + File.separator + "pom.xml", (new File(".")).getAbsolutePath());
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
new file mode 100644
index 0000000..29d6fca
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
@@ -0,0 +1,207 @@
+/*
+ *
+ * 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.job;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+public class AMQPMonitorTest {
+
+    private String myProxyUserName;
+    private String myProxyPassword;
+    private String certificateLocation;
+    private String pbsFilePath;
+    private String workingDirectory;
+    private MonitorPublisher monitorPublisher;
+    private BlockingQueue<MonitorID> finishQueue;
+    private BlockingQueue<MonitorID> pushQueue;
+    private Thread pushThread;
+    private String proxyFilePath;
+    private ComputeResourceDescription computeResourceDescription;
+    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitorTest.class);
+
+    @Before
+    public void setUp() throws Exception {
+        System.setProperty("myproxy.username", "ogce");
+        System.setProperty("myproxy.password", "");
+        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+        System.setProperty("gsi.working.directory", "/home1/01437/ogce");
+        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+        System.setProperty("proxy.file.path", "/Users/lahirugunathilake/Downloads/x509up_u503876");
+        myProxyUserName = System.getProperty("myproxy.username");
+        myProxyPassword = System.getProperty("myproxy.password");
+        workingDirectory = System.getProperty("gsi.working.directory");
+        certificateLocation = System.getProperty("trusted.cert.location");
+        proxyFilePath = System.getProperty("proxy.file.path");
+        System.setProperty("connection.name", "xsede");
+        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
+            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+            throw new Exception("Need my proxy user name password to run tests.");
+        }
+
+        monitorPublisher =  new MonitorPublisher(new EventBus());
+        pushQueue = new LinkedBlockingQueue<MonitorID>();
+        finishQueue = new LinkedBlockingQueue<MonitorID>();
+
+
+        final AMQPMonitor amqpMonitor = new
+                AMQPMonitor(monitorPublisher,
+                pushQueue, finishQueue,proxyFilePath,"xsede",
+                Arrays.asList("info1.dyn.teragrid.org,info2.dyn.teragrid.org".split(",")));
+        try {
+            (new Thread(){
+                public void run(){
+                    amqpMonitor.run();
+                }
+            }).start();
+        } catch (Exception e) {
+           logger.error(e.getMessage(), e);
+        }
+        computeResourceDescription = new ComputeResourceDescription("TestComputerResoruceId", "TestHostName");
+        computeResourceDescription.setHostName("stampede-host");
+        computeResourceDescription.addToIpAddresses("login1.stampede.tacc.utexas.edu");
+        ResourceJobManager resourceJobManager = new ResourceJobManager("1234", ResourceJobManagerType.SLURM);
+        Map<JobManagerCommand, String> commandMap = new HashMap<JobManagerCommand, String>();
+        commandMap.put(JobManagerCommand.SUBMISSION, "test");
+        resourceJobManager.setJobManagerCommands(commandMap);
+        resourceJobManager.setJobManagerBinPath("/usr/bin/");
+        resourceJobManager.setPushMonitoringEndpoint("push"); // TODO - add monitor mode
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission("TestSSHJobSubmissionInterfaceId", SecurityProtocol.GSI,
+                resourceJobManager);
+
+        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+        String jobSubmissionID = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
+
+        JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface(jobSubmissionID, JobSubmissionProtocol.SSH, 1);
+
+        computeResourceDescription.addToJobSubmissionInterfaces(jobSubmissionInterface);
+        computeResourceDescription.addToDataMovementInterfaces(new DataMovementInterface("4532", DataMovementProtocol.SCP, 1));
+
+    }
+
+    @Test
+    public void testAMQPMonitor() throws SSHApiException {
+        /* now have to submit a job to some machine and add that job to the queue */
+        //Create authentication
+        GSIAuthenticationInfo authenticationInfo
+                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+                7512, 17280000, certificateLocation);
+
+        // Server info
+        ServerInfo serverInfo = new ServerInfo("ogce", "login1.stampede.tacc.utexas.edu",2222);
+
+
+        Cluster pbsCluster = new
+                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gfac.ssh.util.CommonUtils.getPBSJobManager("/usr/bin/"));
+
+
+        // Execute command
+        System.out.println("Target PBS file path: " + workingDirectory);
+        // constructing the job object
+        String jobName = "GSI_SSH_SLEEP_JOB";
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobDescriptor.setWorkingDirectory(workingDirectory);
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setJobName(jobName);
+        jobDescriptor.setExecutablePath("/bin/echo");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setMailOptions("n");
+        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+        jobDescriptor.setNodes(1);
+        jobDescriptor.setProcessesPerNode(1);
+        jobDescriptor.setQueueName("normal");
+        jobDescriptor.setMaxWallTime("60");
+        jobDescriptor.setAcountString("TG-STA110014S");
+        List<String> inputs = new ArrayList<String>();
+        jobDescriptor.setOwner("ogce");
+        inputs.add("Hello World");
+        jobDescriptor.setInputValues(inputs);
+        //finished construction of job object
+        System.out.println(jobDescriptor.toXML());
+        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+        System.out.println(jobID);
+        try {
+            pushQueue.add(new MonitorID(computeResourceDescription, jobID,null,null,null, "ogce", jobName));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        try {
+            pushThread.join();
+        } catch (InterruptedException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        class InnerClassAMQP{
+            @Subscribe
+            private void getStatus(JobStatusChangeEvent status){
+                Assert.assertNotNull(status);
+                pushThread.interrupt();
+            }
+        }
+        monitorPublisher.registerListener(new InnerClassAMQP());
+//        try {
+//            pushThread.join(5000);
+//            Iterator<MonitorID> iterator = pushQueue.iterator();
+//            MonitorID next = iterator.next();
+//            org.junit.Assert.assertNotNull(next.getStatus());
+//        } catch (Exception e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
new file mode 100644
index 0000000..c405e8c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
@@ -0,0 +1,172 @@
+///*
+// *
+// * 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.job;
+//
+//import java.io.File;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.concurrent.BlockingQueue;
+//import java.util.concurrent.LinkedBlockingQueue;
+//
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.gfac.core.monitor.MonitorID;
+//import org.apache.airavata.gfac.monitor.HPCMonitorID;
+//import org.apache.airavata.gfac.monitor.UserMonitorData;
+//import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
+//import org.apache.airavata.gfac.ssh.api.Cluster;
+//import org.apache.airavata.gfac.ssh.api.SSHApiException;
+//import org.apache.airavata.gfac.ssh.api.ServerInfo;
+//import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+//import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+//import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.util.CommonUtils;
+//import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
+//import org.junit.Assert;
+//import org.testng.annotations.Test;
+//
+//import com.google.common.eventbus.EventBus;
+//import com.google.common.eventbus.Subscribe;
+//
+//public class QstatMonitorTestWithMyProxyAuth {
+//    private String myProxyUserName;
+//    private String myProxyPassword;
+//    private String certificateLocation;
+//    private String pbsFilePath;
+//    private String workingDirectory;
+//    private HostDescription hostDescription;
+//    private MonitorPublisher monitorPublisher;
+//    private BlockingQueue<UserMonitorData> pullQueue;
+//    private Thread monitorThread;
+//
+//    @org.testng.annotations.BeforeClass
+//    public void setUp() throws Exception {
+////        System.setProperty("myproxy.username", "ogce");
+////        System.setProperty("myproxy.password", "");
+////        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+////        System.setProperty("gsi.working.directory", "/home/ogce");
+////        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+//        myProxyUserName = System.getProperty("myproxy.username");
+//        myProxyPassword = System.getProperty("myproxy.password");
+//        workingDirectory = System.getProperty("gsi.working.directory");
+//        certificateLocation = System.getProperty("trusted.cert.location");
+//        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
+//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+//            throw new Exception("Need my proxy user name password to run tests.");
+//        }
+//
+//        monitorPublisher =  new MonitorPublisher(new EventBus());
+//        class InnerClassQstat {
+//
+//            @Subscribe
+//            private void getStatus(JobStatusChangeEvent status) {
+//                Assert.assertNotNull(status);
+//                System.out.println(status.getState().toString());
+//                monitorThread.interrupt();
+//            }
+//        }
+//        monitorPublisher.registerListener(this);
+//        pullQueue = new LinkedBlockingQueue<UserMonitorData>();
+//        final HPCPullMonitor qstatMonitor = new
+//                HPCPullMonitor(pullQueue, monitorPublisher);
+//        try {
+//            (new Thread(){
+//                public void run(){
+//                    qstatMonitor.run();
+//                }
+//            }).start();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//        hostDescription = new HostDescription(GsisshHostType.type);
+//        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
+//        hostDescription.getType().setHostName("gsissh-gordon");
+//        ((GsisshHostType) hostDescription.getType()).setPort(22);
+//        ((GsisshHostType)hostDescription.getType()).setInstalledPath("/opt/torque/bin/");
+//    }
+//
+//    @Test
+//    public void testQstatMonitor() throws SSHApiException {
+//        /* now have to submit a job to some machine and add that job to the queue */
+//        //Create authentication
+//        GSIAuthenticationInfo authenticationInfo
+//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+//                7512, 17280000, certificateLocation);
+//
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
+//
+//
+//        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
+//
+//
+//        // Execute command
+//        System.out.println("Target PBS file path: " + workingDirectory);
+//        // constructing the job object
+//        JobDescriptor jobDescriptor = new JobDescriptor();
+//        jobDescriptor.setWorkingDirectory(workingDirectory);
+//        jobDescriptor.setShellName("/bin/bash");
+//        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
+//        jobDescriptor.setExecutablePath("/bin/echo");
+//        jobDescriptor.setAllEnvExport(true);
+//        jobDescriptor.setMailOptions("n");
+//        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
+//        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
+//        jobDescriptor.setNodes(1);
+//        jobDescriptor.setProcessesPerNode(1);
+//        jobDescriptor.setQueueName("normal");
+//        jobDescriptor.setMaxWallTime("60");
+//        jobDescriptor.setAcountString("sds128");
+//        List<String> inputs = new ArrayList<String>();
+//        jobDescriptor.setOwner("ogce");
+//        inputs.add("Hello World");
+//        jobDescriptor.setInputValues(inputs);
+//        //finished construction of job object
+//        System.out.println(jobDescriptor.toXML());
+//        for (int i = 0; i < 1; i++) {
+//            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
+//            System.out.println("Job submitted successfully, Job ID: " +  jobID);
+//            MonitorID monitorID = new HPCMonitorID(hostDescription, jobID,null,null,null, "ogce","");
+//            ((HPCMonitorID)monitorID).setAuthenticationInfo(authenticationInfo);
+//            try {
+//                org.apache.airavata.gfac.monitor.util.CommonUtils.addMonitortoQueue(pullQueue, monitorID, jobExecutionContext);
+//            } catch (Exception e) {
+//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//            }
+//        }
+//        try {
+//
+//            monitorThread.join();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    @Subscribe
+//    public void testCaseShutDown(JobStatusChangeEvent status) {
+//        Assert.assertNotNull(status.getState());
+//        monitorThread.stop();
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-impl/src/test/resources/PBSTemplate.xslt
new file mode 100644
index 0000000..e749e9c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/PBSTemplate.xslt
@@ -0,0 +1,73 @@
+<!--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. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+<xsl:output method="text" />
+<xsl:template match="/ns:JobDescriptor">
+#! /bin/sh
+# PBS batch job script built by Globus job manager
+#   <xsl:choose>
+    <xsl:when test="ns:shellName">
+##PBS -S <xsl:value-of select="ns:shellName"/>
+    </xsl:when></xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:queueName">
+#PBS -q <xsl:value-of select="ns:queueName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:mailOptions">
+#PBS -m <xsl:value-of select="ns:mailOptions"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+<xsl:when test="ns:acountString">
+#PBS -A <xsl:value-of select="ns:acountString"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:maxWallTime">
+#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -o <xsl:value-of select="ns:standardOutFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
+#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
+<xsl:text>&#xa;</xsl:text>
+    </xsl:when>
+    </xsl:choose>
+<xsl:for-each select="ns:exports/ns:name">
+<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
+export<xsl:text>   </xsl:text><xsl:value-of select="."/>
+<xsl:text>&#xa;</xsl:text>
+</xsl:for-each>
+<xsl:for-each select="ns:preJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
+<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+<xsl:for-each select="ns:inputs/ns:input">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+<xsl:for-each select="ns:postJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+</xsl:for-each>
+
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/echo.bat
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/echo.bat b/modules/gfac/gfac-impl/src/test/resources/echo.bat
new file mode 100644
index 0000000..c6b849b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/echo.bat
@@ -0,0 +1,22 @@
+::
+::
+:: 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.
+::
+::
+@echo off
+echo %1^=%2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/gsissh.properties b/modules/gfac/gfac-impl/src/test/resources/gsissh.properties
new file mode 100644
index 0000000..3fdf76d
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/gsissh.properties
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+
+###########################################################################
+# Specifies system level configurations as a key/value pairs.
+###########################################################################
+
+StrictHostKeyChecking=no
+ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/log4j.properties b/modules/gfac/gfac-impl/src/test/resources/log4j.properties
new file mode 100644
index 0000000..257802c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/log4j.properties
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=ALL, CONSOLE,LOGFILE
+log4j.rootLogger=ALL, CONSOLE, LOGFILE
+
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=./target/integration-tests.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/logging.properties b/modules/gfac/gfac-impl/src/test/resources/logging.properties
new file mode 100644
index 0000000..0584d38
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/logging.properties
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+#
+#default/fallback log4j configuration
+#
+
+# Set root logger level to WARN and its only appender to A1.
+log4j.rootLogger=INFO, A1, A2
+
+# A1 is set to be a rolling file appender with default params
+log4j.appender.A1=org.apache.log4j.RollingFileAppender
+log4j.appender.A1.File=target/seclogs.txt
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
+
+# A2 is a console appender
+log4j.appender.A2=org.apache.log4j.ConsoleAppender
+
+# A2 uses PatternLayout.
+log4j.appender.A2.layout=org.apache.log4j.PatternLayout
+log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
+
+log4j.logger.unicore.security=INFO
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/sleep.pbs
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/sleep.pbs b/modules/gfac/gfac-impl/src/test/resources/sleep.pbs
new file mode 100644
index 0000000..126e045
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/sleep.pbs
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+#
+# 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.
+#
+
+#$ -S /bin/bash
+#$ -V
+#$ -pe 1way 32
+#$ -m n
+#$ -q normal
+#$ -A
+#$ -l h_rt=0:60:00
+#$ -o application.stdout
+#$ -e application.stderr
+#PBS -N GSI_SSH_SLEEP_JOB
+/bin/sleep 60

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/resources/test.pbs
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/resources/test.pbs b/modules/gfac/gfac-impl/src/test/resources/test.pbs
new file mode 100644
index 0000000..d18269b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/resources/test.pbs
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+#
+# 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.
+#
+
+#PBS -q normal
+#PBS -A sds128
+#PBS -l nodes=1:ppn=1
+#PBS -l walltime=00:00:01
+#PBS -o job_output
+#PBS -N GSI_SSH_JOB
+#PBS -V
+
+/bin/date

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/pom.xml b/modules/gfac/gfac-local/pom.xml
deleted file mode 100644
index 081dfd8..0000000
--- a/modules/gfac/gfac-local/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-local</artifactId>
-    <name>Airavata GFac Local implementation</name>
-    <description>This is the extension of GFAC Local.</description>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-
-        <!-- Logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- GFAC schemas -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
deleted file mode 100644
index 2f9e3b0..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * 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.local.handler;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.GFacHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.Properties;
-
-public class LocalDirectorySetupHandler implements GFacHandler {
-    private static final Logger log = LoggerFactory.getLogger(LocalDirectorySetupHandler.class);
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        log.info("Invoking LocalDirectorySetupHandler ...");
-        log.debug("working directory = " + jobExecutionContext.getWorkingDir());
-        log.debug("temp directory = " + jobExecutionContext.getWorkingDir());
-
-        makeFileSystemDir(jobExecutionContext.getWorkingDir());
-        makeFileSystemDir(jobExecutionContext.getInputDir());
-        makeFileSystemDir(jobExecutionContext.getOutputDir());
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    private void makeFileSystemDir(String dir) throws GFacHandlerException {
-           File f = new File(dir);
-           if (f.isDirectory() && f.exists()) {
-               return;
-           } else if (!new File(dir).mkdir()) {
-               throw new GFacHandlerException("Cannot create directory " + dir);
-           }
-    }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
deleted file mode 100644
index 884ccd5..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *
- * 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.local.handler;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-
-
-public class LocalInputHandler extends AbstractHandler {
-    private static final Logger logger = LoggerFactory.getLogger(LocalInputHandler.class);
-    @Override
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        super.invoke(jobExecutionContext);
-        Map<String, Object> inputParameters = jobExecutionContext.getInMessageContext().getParameters();
-        for (Map.Entry<String, Object> inputParamEntry : inputParameters.entrySet()) {
-            if (inputParamEntry.getValue() instanceof InputDataObjectType) {
-                InputDataObjectType inputDataObject = (InputDataObjectType) inputParamEntry.getValue();
-                if (inputDataObject.getType() == DataType.URI
-                        && inputDataObject != null
-                        && !inputDataObject.getValue().equals("")) {
-                    try {
-                        inputDataObject.setValue(stageFile(jobExecutionContext.getInputDir(), inputDataObject.getValue()));
-                    } catch (IOException e) {
-                        throw new GFacHandlerException("Error while data staging sourceFile= " + inputDataObject.getValue());
-                    }
-                }
-            }
-        }
-    }
-
-    private String stageFile(String inputDir, String sourceFilePath) throws IOException {
-        int i = sourceFilePath.lastIndexOf(File.separator);
-        String substring = sourceFilePath.substring(i + 1);
-        if (inputDir.endsWith("/")) {
-            inputDir = inputDir.substring(0, inputDir.length() - 1);
-        }
-        String targetFilePath = inputDir + File.separator + substring;
-
-        if (sourceFilePath.startsWith("file")) {
-            sourceFilePath = sourceFilePath.substring(sourceFilePath.indexOf(":") + 1, sourceFilePath.length());
-        }
-
-        File sourceFile = new File(sourceFilePath);
-        File targetFile = new File(targetFilePath);
-        if (targetFile.exists()) {
-            targetFile.delete();
-        }
-        logger.info("staging source file : " + sourceFilePath + " to target file : " + targetFilePath);
-        FileUtils.copyFile(sourceFile, targetFile);
-
-        return targetFilePath;
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-
-    }
-
-    @Override
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/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
deleted file mode 100644
index 871193a..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- *
- * 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.local.provider.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
-import org.apache.airavata.gfac.core.provider.AbstractProvider;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.core.utils.OutputUtils;
-import org.apache.airavata.gfac.local.utils.InputStreamToFileWriter;
-import org.apache.airavata.gfac.local.utils.InputUtils;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.model.messaging.event.TaskIdentifier;
-import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.xmlbeans.XmlException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
-public class LocalProvider extends AbstractProvider {
-    private static final Logger log = LoggerFactory.getLogger(LocalProvider.class);
-    private ProcessBuilder builder;
-    private List<String> cmdList;
-    private String jobId;
-    
-    public static class LocalProviderJobData{
-    	private String applicationName;
-    	private List<String> inputParameters;
-    	private String workingDir;
-    	private String inputDir;
-    	private String outputDir;
-		public String getApplicationName() {
-			return applicationName;
-		}
-		public void setApplicationName(String applicationName) {
-			this.applicationName = applicationName;
-		}
-		public List<String> getInputParameters() {
-			return inputParameters;
-		}
-		public void setInputParameters(List<String> inputParameters) {
-			this.inputParameters = inputParameters;
-		}
-		public String getWorkingDir() {
-			return workingDir;
-		}
-		public void setWorkingDir(String workingDir) {
-			this.workingDir = workingDir;
-		}
-		public String getInputDir() {
-			return inputDir;
-		}
-		public void setInputDir(String inputDir) {
-			this.inputDir = inputDir;
-		}
-		public String getOutputDir() {
-			return outputDir;
-		}
-		public void setOutputDir(String outputDir) {
-			this.outputDir = outputDir;
-		}
-    }
-    public LocalProvider(){
-        cmdList = new ArrayList<String>();
-    }
-
-    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
-    	super.initialize(jobExecutionContext);
-
-        // build command with all inputs
-        buildCommand();
-        initProcessBuilder(jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription());
-
-        // extra environment variables
-        builder.environment().put(Constants.INPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getInputDir());
-        builder.environment().put(Constants.OUTPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getOutputDir());
-
-        // set working directory
-        builder.directory(new File(jobExecutionContext.getWorkingDir()));
-
-        // log info
-        log.info("Command = " + InputUtils.buildCommand(cmdList));
-        log.info("Working dir = " + builder.directory());
-        /*for (String key : builder.environment().keySet()) {
-            log.info("Env[" + key + "] = " + builder.environment().get(key));
-        }*/
-    }
-
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-        JobDetails jobDetails = new JobDetails();
-        try {
-        	jobId = jobExecutionContext.getTaskData().getTaskID();
-            jobDetails.setJobID(jobId);
-            jobDetails.setJobDescription(jobExecutionContext.getApplicationContext()
-                    .getApplicationDeploymentDescription().getAppDeploymentDescription());
-            jobExecutionContext.setJobDetails(jobDetails);
-            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SETUP);
-            // running cmd
-            Process process = builder.start();
-
-            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), jobExecutionContext.getStandardOutput());
-            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), jobExecutionContext.getStandardError());
-
-            // start output threads
-            standardOutWriter.setDaemon(true);
-            standardErrorWriter.setDaemon(true);
-            standardOutWriter.start();
-            standardErrorWriter.start();
-
-            int returnValue = process.waitFor();
-
-            // make sure other two threads are done
-            standardOutWriter.join();
-            standardErrorWriter.join();
-
-            /*
-             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
-             * just provide warning in the log messages
-             */
-            if (returnValue != 0) {
-                log.error("Process finished with non zero return value. Process may have failed");
-            } else {
-                log.info("Process finished with return value of zero.");
-            }
-
-            StringBuffer buf = new StringBuffer();
-            buf.append("Executed ").append(InputUtils.buildCommand(cmdList))
-                    .append(" on the localHost, working directory = ").append(jobExecutionContext.getWorkingDir())
-                    .append(" tempDirectory = ").append(jobExecutionContext.getScratchLocation()).append(" With the status ")
-                    .append(String.valueOf(returnValue));
-
-            log.info(buf.toString());
-
-            // updating the job status to complete because there's nothing to monitor in local jobs
-//            MonitorID monitorID = createMonitorID(jobExecutionContext);
-            JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
-                    jobExecutionContext.getTaskData().getTaskID(),
-                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                    jobExecutionContext.getExperimentID(),
-                    jobExecutionContext.getGatewayID());
-            jobExecutionContext.getMonitorPublisher().publish(new JobStatusChangeEvent(JobState.COMPLETE, jobIdentity));
-        } catch (IOException io) {
-            throw new GFacProviderException(io.getMessage(), io);
-        } catch (InterruptedException e) {
-            throw new GFacProviderException(e.getMessage(), e);
-        }catch (GFacException e) {
-            throw new GFacProviderException(e.getMessage(), e);
-        }
-    }
-
-//	private MonitorID createMonitorID(JobExecutionContext jobExecutionContext) {
-//		MonitorID monitorID = new MonitorID(jobExecutionContext.getApplicationContext().getHostDescription(), jobId,
-//		        jobExecutionContext.getTaskData().getTaskID(),
-//		        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
-//		        jobExecutionContext.getExperiment().getUserName(),jobId);
-//		return monitorID;
-//	}
-
-//	private void saveApplicationJob(JobExecutionContext jobExecutionContext)
-//			throws GFacProviderException {
-//		ApplicationDeploymentDescriptionType app = jobExecutionContext.
-//                getApplicationContext().getApplicationDeploymentDescription().getType();
-//		ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
-//		appJob.setJobId(jobId);
-//		LocalProviderJobData data = new LocalProviderJobData();
-//		data.setApplicationName(app.getExecutableLocation());
-//		data.setInputDir(app.getInputDataDirectory());
-//		data.setOutputDir(app.getOutputDataDirectory());
-//		data.setWorkingDir(builder.directory().toString());
-//		data.setInputParameters(ProviderUtils.getInputParameters(jobExecutionContext));
-//		ByteArrayOutputStream stream = new ByteArrayOutputStream();
-//		JAXB.marshal(data, stream);
-//		appJob.setJobData(stream.toString());
-//		appJob.setSubmittedTime(Calendar.getInstance().getTime());
-//		appJob.setStatus(ApplicationJobStatus.SUBMITTED);
-//		appJob.setStatusUpdateTime(appJob.getSubmittedTime());
-//		GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
-//	}
-
-    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        try {
-        	List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
-            String stdOutStr = GFacUtils.readFileToString(jobExecutionContext.getStandardOutput());
-            String stdErrStr = GFacUtils.readFileToString(jobExecutionContext.getStandardError());
-			Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
-            OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-            TaskDetails taskDetails = (TaskDetails)registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
-            if (taskDetails != null){
-                taskDetails.setApplicationOutputs(outputArray);
-                registry.update(RegistryModelType.TASK_DETAIL, taskDetails, taskDetails.getTaskID());
-            }
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-            TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                    jobExecutionContext.getExperimentID(),
-                    jobExecutionContext.getGatewayID());
-            jobExecutionContext.getMonitorPublisher().publish(new TaskOutputChangeEvent(outputArray, taskIdentity));
-        } catch (XmlException e) {
-            throw new GFacProviderException("Cannot read output:" + e.getMessage(), e);
-        } catch (IOException io) {
-            throw new GFacProviderException(io.getMessage(), io);
-        } catch (Exception e){
-        	throw new GFacProviderException("Error in retrieving results",e);
-        }
-    }
-
-    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacException {
-        throw new NotImplementedException();
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        // TODO: Auto generated method body.
-    }
-
-    @Override
-    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        // TODO: Auto generated method body.
-    }
-
-
-    private void buildCommand() {
-        cmdList.add(jobExecutionContext.getExecutablePath());
-        Map<String, Object> inputParameters = jobExecutionContext.getInMessageContext().getParameters();
-
-        // sort the inputs first and then build the command List
-        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
-            @Override
-            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
-                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
-            }
-        };
-        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
-        for (Object object : inputParameters.values()) {
-            if (object instanceof InputDataObjectType) {
-                InputDataObjectType inputDOT = (InputDataObjectType) object;
-                sortedInputSet.add(inputDOT);
-            }
-        }
-        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
-            if (inputDataObjectType.getApplicationArgument() != null
-                    && !inputDataObjectType.getApplicationArgument().equals("")) {
-                cmdList.add(inputDataObjectType.getApplicationArgument());
-            }
-
-            if (inputDataObjectType.getValue() != null
-                    && !inputDataObjectType.getValue().equals("")) {
-                cmdList.add(inputDataObjectType.getValue());
-            }
-        }
-
-    }
-
-    private void initProcessBuilder(ApplicationDeploymentDescription app){
-        builder = new ProcessBuilder(cmdList);
-
-        List<SetEnvPaths> setEnvironment = app.getSetEnvironment();
-        if (setEnvironment != null) {
-            for (SetEnvPaths envPath : setEnvironment) {
-                Map<String,String> builderEnv = builder.environment();
-                builderEnv.put(envPath.getName(), envPath.getValue());
-            }
-        }
-    }
-
-    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
deleted file mode 100644
index 2467ce8..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * 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.local.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-
-public class InputStreamToFileWriter extends Thread{
-    protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
-    private BufferedReader in;
-    private BufferedWriter out;
-
-    public InputStreamToFileWriter(InputStream in, String out) throws IOException {
-        this.in = new BufferedReader(new InputStreamReader(in));
-        this.out = new BufferedWriter(new FileWriter(out));
-    }
-
-    public void run() {
-        try {
-            String line = null;
-            while ((line = in.readLine()) != null) {
-                if (log.isDebugEnabled()) {
-                    log.debug(line);
-                }
-                out.write(line);
-                out.newLine();
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (Exception e) {
-                    log.error(e.getMessage(), e);
-                }
-            }
-            if (out != null) {
-                try {
-                    out.close();
-                } catch (Exception e) {
-                    log.error(e.getMessage(), e);
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
deleted file mode 100644
index 98671fd..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * 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.local.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class InputUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(InputUtils.class);
-
-    private static final String SPACE = " ";
-
-    private InputUtils() {
-    }
-
-    public static String buildCommand(List<String> cmdList) {
-        StringBuffer buff = new StringBuffer();
-        for (String string : cmdList) {
-            logger.debug("Build Command --> " + string);
-            buff.append(string);
-            buff.append(SPACE);
-        }
-        return buff.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
deleted file mode 100644
index 2b45df7..0000000
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * 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.local.utils;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-
-public class LocalProviderUtil {
-    private static final Logger log = LoggerFactory.getLogger(LocalProviderUtil.class);
-
-    private void makeFileSystemDir(String dir) throws GFacProviderException {
-        File f = new File(dir);
-        if (f.isDirectory() && f.exists()) {
-            return;
-        } else if (!new File(dir).mkdir()) {
-            throw new GFacProviderException("Cannot make directory " + dir);
-        }
-    }
-
-    public void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        log.info("working diectroy = " + jobExecutionContext.getWorkingDir());
-        log.info("temp directory = " + jobExecutionContext.getScratchLocation());
-        makeFileSystemDir(jobExecutionContext.getWorkingDir());
-        makeFileSystemDir(jobExecutionContext.getScratchLocation());
-        makeFileSystemDir(jobExecutionContext.getInputDir());
-        makeFileSystemDir(jobExecutionContext.getOutputDir());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-local/src/main/resources/errors.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/resources/errors.properties b/modules/gfac/gfac-local/src/main/resources/errors.properties
deleted file mode 100644
index 88c41b8..0000000
--- a/modules/gfac/gfac-local/src/main/resources/errors.properties
+++ /dev/null
@@ -1,197 +0,0 @@
-#
-#
-# 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.
-#
-
-# Directly copied from jglobus. Not a good way to manager error properties.
-1 = Parameter not supported
-2 = The RSL length is greater than the maximum allowed
-3 = No resources available
-4 = Bad directory specified
-5 = The executable does not exist
-6 = Insufficient funds
-7 = Authentication with the remote server failed
-8 = Job cancelled by user
-9 = Job cancelled by system
-
-10 = Data transfer to the server failed
-11 = The stdin file does not exist
-12 = The connection to the server failed (check host and port)
-13 = The provided RSL 'maxtime' value is invalid (not an integer or must be greater than 0)
-14 = The provided RSL 'count' value is invalid (not an integer or must be greater than 0)
-15 = The job manager received an invalid RSL
-16 = Could not connect to job manager
-17 = The job failed when the job manager attempted to run it
-18 = Paradyn error
-19 = The provided RSL 'jobtype' value is invalid
-
-20 = The provided RSL 'myjob' value is invalid
-21 = The job manager failed to locate an internal script argument file
-22 = The job manager failed to create an internal script argument file
-23 = The job manager detected an invalid job state
-24 = The job manager detected an invalid script response
-25 = The job manager detected an invalid job state
-26 = The provided RSL 'jobtype' value is not supported by this job manager
-27 = Unimplemented
-28 = The job manager failed to create an internal script submission file
-29 = The job manager cannot find the user proxy
-
-30 = The job manager failed to open the user proxy
-31 = The job manager failed to cancel the job as requested
-32 = System memory allocation failed
-33 = The interprocess job communication initialization failed
-34 = The interprocess job communication setup failed
-35 = The provided RSL 'host count' value is invalid
-36 = One of the provided RSL parameters is unsupported
-37 = The provided RSL 'queue' parameter is invalid
-38 = The provided RSL 'project' parameter is invalid
-39 = The provided RSL string includes variables that could not be identified
-
-40 = The provided RSL 'environment' parameter is invalid
-41 = The provided RSL 'dryrun' parameter is invalid
-42 = The provided RSL is invalid (an empty string)
-43 = The job manager failed to stage the executable
-44 = The job manager failed to stage the stdin file
-45 = The requested job manager type is invalid
-46 = The provided RSL 'arguments' parameter is invalid
-47 = The gatekeeper failed to run the job manager
-48 = The provided RSL could not be properly parsed
-49 = There is a version mismatch between GRAM components
-
-50 = The provided RSL 'arguments' parameter is invalid
-51 = The provided RSL 'count' parameter is invalid
-52 = The provided RSL 'directory' parameter is invalid
-53 = The provided RSL 'dryrun' parameter is invalid
-54 = The provided RSL 'environment' parameter is invalid
-55 = The provided RSL 'executable' parameter is invalid
-56 = The provided RSL 'host_count' parameter is invalid
-57 = The provided RSL 'jobtype' parameter is invalid
-58 = The provided RSL 'maxtime' parameter is invalid
-59 = The provided RSL 'myjob' parameter is invalid
-
-60 = The provided RSL 'paradyn' parameter is invalid
-61 = The provided RSL 'project' parameter is invalid
-62 = The provided RSL 'queue' parameter is invalid
-63 = The provided RSL 'stderr' parameter is invalid
-64 = The provided RSL 'stdin' parameter is invalid
-65 = The provided RSL 'stdout' parameter is invalid
-66 = The job manager failed to locate an internal script
-67 = The job manager failed on the system call pipe()
-68 = The job manager failed on the system call fcntl()
-69 = The job manager failed to create the temporary stdout filename
-
-70 = The job manager failed to create the temporary stderr filename
-71 = The job manager failed on the system call fork()
-72 = The executable file permissions do not allow execution
-73 = The job manager failed to open stdout
-74 = The job manager failed to open stderr
-75 = The cache file could not be opened in order to relocate the user proxy
-76 = Cannot access cache files in ~/.globus/.gass_cache, check permissions, quota, and disk space
-77 = The job manager failed to insert the contact in the client contact list
-78 = The contact was not found in the job manager's client contact list
-79 = Connecting to the job manager failed.  Possible reasons: job terminated, invalid job contact, network problems, ...
-
-80 = The syntax of the job contact is invalid
-81 = The executable parameter in the RSL is undefined
-82 = The job manager service is misconfigured.  condor arch undefined
-83 = The job manager service is misconfigured.  condor os undefined
-84 = The provided RSL 'min_memory' parameter is invalid
-85 = The provided RSL 'max_memory' parameter is invalid
-86 = The RSL 'min_memory' value is not zero or greater
-87 = The RSL 'max_memory' value is not zero or greater
-88 = The creation of a HTTP message failed
-89 = Parsing incoming HTTP message failed
-
-90 = The packing of information into a HTTP message failed
-91 = An incoming HTTP message did not contain the expected information
-92 = The job manager does not support the service that the client requested
-93 = The gatekeeper failed to find the requested service
-94 = The jobmanager does not accept any new requests (shutting down)
-95 = The client failed to close the listener associated with the callback URL
-96 = The gatekeeper contact cannot be parsed
-97 = The job manager could not find the 'poe' command
-98 = The job manager could not find the 'mpirun' command
-99 = The provided RSL 'start_time' parameter is invalid"
-100 = The provided RSL 'reservation_handle' parameter is invalid
-
-101 = The provided RSL 'max_wall_time' parameter is invalid
-102 = The RSL 'max_wall_time' value is not zero or greater
-103 = The provided RSL 'max_cpu_time' parameter is invalid
-104 = The RSL 'max_cpu_time' value is not zero or greater
-105 = The job manager is misconfigured, a scheduler script is missing
-106 = The job manager is misconfigured, a scheduler script has invalid permissions
-107 = The job manager failed to signal the job
-108 = The job manager did not recognize/support the signal type
-109 = The job manager failed to get the job id from the local scheduler
-
-110 = The job manager is waiting for a commit signal
-111 = The job manager timed out while waiting for a commit signal
-112 = The provided RSL 'save_state' parameter is invalid
-113 = The provided RSL 'restart' parameter is invalid
-114 = The provided RSL 'two_phase' parameter is invalid
-115 = The RSL 'two_phase' value is not zero or greater
-116 = The provided RSL 'stdout_position' parameter is invalid
-117 = The RSL 'stdout_position' value is not zero or greater
-118 = The provided RSL 'stderr_position' parameter is invalid
-119 = The RSL 'stderr_position' value is not zero or greater
-
-120 = The job manager restart attempt failed
-121 = The job state file doesn't exist
-122 = Could not read the job state file
-123 = Could not write the job state file
-124 = The old job manager is still alive
-125 = The job manager state file TTL expired
-126 = It is unknown if the job was submitted
-127 = The provided RSL 'remote_io_url' parameter is invalid
-128 = Could not write the remote io url file
-129 = The standard output/error size is different
-
-130 = The job manager was sent a stop signal (job is still running)
-131 = The user proxy expired (job is still running)
-132 = The job was not submitted by original jobmanager
-133 = The job manager is not waiting for that commit signal
-134 = The provided RSL scheduler specific parameter is invalid
-135 = The job manager could not stage in a file
-136 = The scratch directory could not be created
-137 = The provided 'gass_cache' parameter is invalid
-138 = The RSL contains attributes which are not valid for job submission
-139 = The RSL contains attributes which are not valid for stdio update
-
-140 = The RSL contains attributes which are not valid for job restart
-141 = The provided RSL 'file_stage_in' parameter is invalid
-142 = The provided RSL 'file_stage_in_shared' parameter is invalid
-143 = The provided RSL 'file_stage_out' parameter is invalid
-144 = The provided RSL 'gass_cache' parameter is invalid
-145 = The provided RSL 'file_cleanup' parameter is invalid
-146 = The provided RSL 'scratch_dir' parameter is invalid
-147 = The provided scheduler-specific RSL parameter is invalid
-148 = A required RSL attribute was not defined in the RSL spec
-149 = The gass_cache attribute points to an invalid cache directory
-
-150 = The provided RSL 'save_state' parameter has an invalid value
-151 = The job manager could not open the RSL attribute validation file
-152 = The  job manager could not read the RSL attribute validation file
-153 = The provided RSL 'proxy_timeout' is invalid
-154 = The RSL 'proxy_timeout' value is not greater than zero
-155 = The job manager could not stage out a file
-156 = The job contact string does not match any which the job manager is handling
-157 = Proxy delegation failed
-158 = The job manager could not lock the state lock file
-
-1000 = Failed to start up callback handler
-1003 = Job contact not set


[31/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
deleted file mode 100644
index c764b63..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
+++ /dev/null
@@ -1,798 +0,0 @@
-///*
-// *
-// * 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.core.cpi;
-//
-//import java.io.File;
-//import java.io.IOException;
-//import java.net.URL;
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.Map;
-//import java.util.Properties;
-//
-//import javax.xml.parsers.ParserConfigurationException;
-//import javax.xml.xpath.XPathExpressionException;
-//
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.common.exception.ApplicationSettingsException;
-//import org.apache.airavata.common.utils.MonitorPublisher;
-//import org.apache.airavata.common.utils.ServerSettings;
-//import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.gfac.Constants;
-//import org.apache.airavata.gfac.GFacConfiguration;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.Scheduler;
-//import org.apache.airavata.gfac.core.context.ApplicationContext;
-//import org.apache.airavata.gfac.core.context.JobExecutionContext;
-//import org.apache.airavata.gfac.core.context.MessageContext;
-//import org.apache.airavata.gfac.core.handler.GFacHandler;
-//import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-//import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-//import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-//import org.apache.airavata.gfac.core.monitor.ExperimentIdentity;
-//import org.apache.airavata.gfac.core.monitor.JobIdentity;
-//import org.apache.airavata.gfac.core.monitor.MonitorID;
-//import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-////import org.apache.airavata.api.server.listener.ExperimentStatusChangedEvent;
-//import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
-//import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
-//import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
-//import org.apache.airavata.gfac.core.notification.listeners.WorkflowTrackingListener;
-//import org.apache.airavata.gfac.core.provider.GFacProvider;
-//import org.apache.airavata.gfac.core.scheduler.HostScheduler;
-//import org.apache.airavata.gfac.core.states.GfacExperimentState;
-//import org.apache.airavata.gfac.core.utils.GFacUtils;
-//import org.apache.airavata.model.workspace.experiment.DataObjectType;
-//import org.apache.airavata.model.workspace.experiment.Experiment;
-//import org.apache.airavata.model.workspace.experiment.ExperimentState;
-//import org.apache.airavata.model.workspace.experiment.JobState;
-//import org.apache.airavata.model.workspace.experiment.TaskDetails;
-//import org.apache.airavata.model.workspace.experiment.TaskState;
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-//import org.apache.airavata.registry.cpi.Registry;
-//import org.apache.airavata.registry.cpi.RegistryModelType;
-//import org.apache.zookeeper.ZooKeeper;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.xml.sax.SAXException;
-//
-//import com.google.common.eventbus.EventBus;
-//
-///**
-// * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
-// * the resource, required data for the job has to be stored in registry prior to invoke this object.
-// */
-//public class GFacImpl implements GFac {
-//    private static final Logger log = LoggerFactory.getLogger(GFacImpl.class);
-//    public static final String ERROR_SENT = "ErrorSent";
-//
-//    private Registry registry;
-//
-//    private AiravataAPI airavataAPI;
-//
-//    private AiravataRegistry2 airavataRegistry2;
-//
-//    private ZooKeeper zk;
-//
-//    private static List<ThreadedHandler> daemonHandlers;
-//
-//    private File gfacConfigFile;
-//
-//    private List<AbstractActivityListener> activityListeners;
-//
-//    private static MonitorPublisher monitorPublisher;
-//
-//    /**
-//     * Constructor for GFac
-//     *
-//     * @param registry
-//     * @param airavataAPI
-//     * @param airavataRegistry2
-//     */
-//    public GFacImpl(Registry registry, AiravataAPI airavataAPI, AiravataRegistry2 airavataRegistry2) {
-//        this.registry = registry;
-//        this.airavataAPI = airavataAPI;
-//        this.airavataRegistry2 = airavataRegistry2;
-//        daemonHandlers = new ArrayList<ThreadedHandler>();
-//        activityListeners = new ArrayList<AbstractActivityListener>();
-//        monitorPublisher = new MonitorPublisher(new EventBus());     // This is a EventBus common for gfac
-//        startStatusUpdators();
-//        startDaemonHandlers();
-//    }
-//
-//    private void startStatusUpdators() {
-//        try {
-//            String[] listenerClassList = ServerSettings.getActivityListeners();
-//            for (String listenerClass : listenerClassList) {
-//                Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
-//                AbstractActivityListener abstractActivityListener = aClass.newInstance();
-//                activityListeners.add(abstractActivityListener);
-//                abstractActivityListener.setup(getMonitorPublisher(), registry);
-//                log.info("Registering listener: " + listenerClass);
-//                getMonitorPublisher().registerListener(abstractActivityListener);
-//            }
-//        }catch (ClassNotFoundException e) {
-//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-//        } catch (InstantiationException e) {
-//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-//        } catch (IllegalAccessException e) {
-//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-//        } catch (ApplicationSettingsException e){
-//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-//        }
-//    }
-//    private void startDaemonHandlers()  {
-//        List<GFacHandlerConfig> daemonHandlerConfig = null;
-//        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        gfacConfigFile = new File(resource.getPath());
-//        try {
-//            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
-//        } catch (ParserConfigurationException e) {
-//            log.error("Error parsing gfac-config.xml, double check the xml configuration",e);
-//        } catch (IOException e) {
-//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-//        } catch (SAXException e) {
-//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-//        } catch (XPathExpressionException e) {
-//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-//        }
-//
-//        for(GFacHandlerConfig handlerConfig:daemonHandlerConfig){
-//            String className = handlerConfig.getClassName();
-//            try {
-//                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
-//                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
-//                threadedHandler.initProperties(handlerConfig.getProperties());
-//                daemonHandlers.add(threadedHandler);
-//            }catch (ClassNotFoundException e){
-//                log.error("Error initializing the handler: " + className);
-//                log.error(className + " class has to implement " + ThreadedHandler.class);
-//            } catch (InstantiationException e) {
-//                log.error("Error initializing the handler: " + className);
-//                log.error(className + " class has to implement " + ThreadedHandler.class);
-//            } catch (IllegalAccessException e) {
-//                log.error("Error initializing the handler: " + className);
-//                log.error(className + " class has to implement " + ThreadedHandler.class);
-//            } catch (GFacHandlerException e) {
-//                log.error("Error initializing the handler " + className);
-//            } catch (GFacException e) {
-//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//            }
-//        }
-//        for(ThreadedHandler tHandler:daemonHandlers){
-//            (new Thread(tHandler)).start();
-//        }
-//    }
-//
-//    /**
-//     * This can be used to submit jobs for testing purposes just by filling parameters by hand (JobExecutionContext)
-//     */
-//    public GFacImpl() {
-//        daemonHandlers = new ArrayList<ThreadedHandler>();
-//        startDaemonHandlers();
-//    }
-//
-//    /**
-//     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
-//     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
-//     *
-//     * @param experimentID
-//     * @return
-//     * @throws GFacException
-//     */
-//    public boolean submitJob(String experimentID,String taskID, String gatewayID) throws GFacException {
-//        JobExecutionContext jobExecutionContext = null;
-//        try {
-//            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-//            return submitJob(jobExecutionContext);
-//        } catch (Exception e) {
-//            log.error("Error inovoking the job with experiment ID: " + experimentID);
-//            throw new GFacException(e);
-//        }
-//    }
-//
-//    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
-//        JobExecutionContext jobExecutionContext;
-//        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
-//
-//        // this is wear our new model and old model is mapping (so serviceName in ExperimentData and service name in ServiceDescriptor
-//        // has to be same.
-//
-//        // 1. Get the Task from the task ID and construct the Job object and save it in to registry
-//        // 2. Add another property to jobExecutionContext and read them inside the provider and use it.
-//        String serviceName = taskData.getApplicationId();
-//        if (serviceName == null) {
-//            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-//        }
-//
-//        ServiceDescription serviceDescription = airavataRegistry2.getServiceDescriptor(serviceName);
-//        if (serviceDescription == null ) {
-//            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-//        }
-//        String hostName;
-//        HostDescription hostDescription = null;
-//        if(taskData.getTaskScheduling().getResourceHostId() != null){
-//            hostName = taskData.getTaskScheduling().getResourceHostId();
-//            hostDescription = airavataRegistry2.getHostDescriptor(hostName);
-//        }else{
-//        	  List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
-//              Map<String, ApplicationDescription> applicationDescriptors = airavataRegistry2.getApplicationDescriptors(serviceName);
-//              for (String hostDescName : applicationDescriptors.keySet()) {
-//                  registeredHosts.add(airavataRegistry2.getHostDescriptor(hostDescName));
-//              }
-//              Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
-//             HostScheduler hostScheduler = aClass.newInstance();
-//             //TODO cleanup
-//            hostDescription = registeredHosts.get(0);//hostScheduler.schedule(registeredHosts);
-//        	hostName = hostDescription.getType().getHostName();
-//        }
-//        if(hostDescription == null){
-//        	throw new GFacException("Error executing the job as the host is not registered " + hostName);
-//        }
-//        ApplicationDescription applicationDescription = airavataRegistry2.getApplicationDescriptors(serviceName, hostName);
-//        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        Properties configurationProperties = ServerSettings.getProperties();
-//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
-//
-//
-//        // start constructing jobexecutioncontext
-//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
-//
-//        // setting experiment/task/workflownode related information
-//        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
-//        jobExecutionContext.setExperiment(experiment);
-//        jobExecutionContext.setExperimentID(experimentID);
-//        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
-//        jobExecutionContext.setTaskData(taskData);
-//
-//        // setting the registry
-//        jobExecutionContext.setRegistry(registry);
-//
-//        ApplicationContext applicationContext = new ApplicationContext();
-//        applicationContext.setApplicationDeploymentDescription(applicationDescription);
-//        applicationContext.setHostDescription(hostDescription);
-//        applicationContext.setServiceDescription(serviceDescription);
-//        jobExecutionContext.setApplicationContext(applicationContext);
-//
-//        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
-//        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
-//                serviceDescription.getType().getInputParametersArray())));
-//
-//        List<DataObjectType> outputData = taskData.getApplicationOutputs();
-//        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getInMessageContext(outputData,
-//                serviceDescription.getType().getOutputParametersArray())));
-//
-//        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
-//        jobExecutionContext.setGfac(this);
-//        return jobExecutionContext;
-//    }
-//
-//    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
-//        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-//        // we need to setup workflow tracking listerner.
-//        String workflowInstanceID = null;
-//        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-//            // This mean we need to register workflow tracking listener.
-//            //todo implement WorkflowTrackingListener properly
-//            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-//        }
-//        // Register log event listener. This is required in all scenarios.
-//        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-//        schedule(jobExecutionContext);
-//        return true;
-//    }
-//
-//
-//    public boolean cancel(String experimentID, String taskID, String gatewayID) throws GFacException {
-//        JobExecutionContext jobExecutionContext = null;
-//        try {
-//            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-//            return cancel(jobExecutionContext);
-//        } catch (Exception e) {
-//            log.error("Error inovoking the job with experiment ID: " + experimentID);
-//            throw new GFacException(e);
-//        }
-//    }
-//
-//    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
-//        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-//        // we need to setup workflow tracking listerner.
-//        String workflowInstanceID = null;
-//        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-//            // This mean we need to register workflow tracking listener.
-//            //todo implement WorkflowTrackingListener properly
-//            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-//        }
-//        // Register log event listener. This is required in all scenarios.
-//        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-//        try {
-//            Scheduler.schedule(jobExecutionContext);
-//            GFacProvider provider = jobExecutionContext.getProvider();
-//            if (provider != null) {
-//                initProvider(provider, jobExecutionContext);
-//                cancelProvider(provider, jobExecutionContext);
-//                disposeProvider(provider, jobExecutionContext);
-//            }
-//        }catch (Exception e) {
-//            try {
-//                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-//                        new JobIdentity(jobExecutionContext.getExperimentID(),
-//                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-//                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
-//            } catch (NullPointerException e1) {
-//                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
-//                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-//                // Updating status if job id is not set
-////				monitorPublisher
-////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-//                // Updating the task status if there's any task associated
-//                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-//                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
-//
-//            }
-//            jobExecutionContext.setProperty(ERROR_SENT, "true");
-//            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-//            throw new GFacException(e.getMessage(), e);
-//        }
-//        return true;
-//    }
-//
-//    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
-//        // Scheduler will decide the execution flow of handlers and provider which handles
-//        // the job.
-//        String experimentID = jobExecutionContext.getExperimentID();
-//        try {
-//            Scheduler.schedule(jobExecutionContext);
-//
-//            // Executing in handlers in the order as they have configured in GFac configuration
-//            invokeInFlowHandlers(jobExecutionContext);
-////            if (experimentID != null){
-////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
-////            }
-////        }catch (ClassNotFoundException e) {
-////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-////        } catch (InstantiationException e) {
-////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-////        } catch (IllegalAccessException e) {
-////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-////        } catch (ApplicationSettingsException e){
-////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-////        }
-////    }
-////    private void startDaemonHandlers()  {
-////        List<GFacHandlerConfig> daemonHandlerConfig = null;
-////        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-////        gfacConfigFile = new File(resource.getPath());
-////        try {
-////            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
-////        } catch (ParserConfigurationException e) {
-////            log.error("Error parsing gfac-config.xml, double check the xml configuration",e);
-////        } catch (IOException e) {
-////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-////        } catch (SAXException e) {
-////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-////        } catch (XPathExpressionException e) {
-////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-////        }
-////
-////        for(GFacHandlerConfig handlerConfig:daemonHandlerConfig){
-////            String className = handlerConfig.getClassName();
-////            try {
-////                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
-////                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
-////                threadedHandler.initProperties(handlerConfig.getProperties());
-////                daemonHandlers.add(threadedHandler);
-////            }catch (ClassNotFoundException e){
-////                log.error("Error initializing the handler: " + className);
-////                log.error(className + " class has to implement " + ThreadedHandler.class);
-////            } catch (InstantiationException e) {
-////                log.error("Error initializing the handler: " + className);
-////                log.error(className + " class has to implement " + ThreadedHandler.class);
-////            } catch (IllegalAccessException e) {
-////                log.error("Error initializing the handler: " + className);
-////                log.error(className + " class has to implement " + ThreadedHandler.class);
-////            } catch (GFacHandlerException e) {
-////                log.error("Error initializing the handler " + className);
-////            } catch (GFacException e) {
-////                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-////            }
-////        }
-////        for(ThreadedHandler tHandler:daemonHandlers){
-////            (new Thread(tHandler)).start();
-////        }
-////    }
-////
-////    /**
-////     * This can be used to submit jobs for testing purposes just by filling parameters by hand (JobExecutionContext)
-////     */
-////    public GFacImpl() {
-////        daemonHandlers = new ArrayList<ThreadedHandler>();
-////        startDaemonHandlers();
-////    }
-////
-////    /**
-////     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
-////     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
-////     *
-////     * @param experimentID
-////     * @return
-////     * @throws GFacException
-////     */
-////    public boolean submitJob(String experimentID,String taskID, String gatewayID) throws GFacException {
-////        JobExecutionContext jobExecutionContext = null;
-////        try {
-////            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-////            return submitJob(jobExecutionContext);
-////        } catch (Exception e) {
-////            log.error("Error inovoking the job with experiment ID: " + experimentID);
-////            throw new GFacException(e);
-////        }
-////    }
-////
-////    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
-////        JobExecutionContext jobExecutionContext;
-////        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
-////
-////        // this is wear our new model and old model is mapping (so serviceName in ExperimentData and service name in ServiceDescriptor
-////        // has to be same.
-////
-////        // 1. Get the Task from the task ID and construct the Job object and save it in to registry
-////        // 2. Add another property to jobExecutionContext and read them inside the provider and use it.
-////        String serviceName = taskData.getApplicationId();
-////        if (serviceName == null) {
-////            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-////        }
-////
-////        ServiceDescription serviceDescription = airavataRegistry2.getServiceDescriptor(serviceName);
-////        if (serviceDescription == null ) {
-////            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-////        }
-////        String hostName;
-////        HostDescription hostDescription = null;
-////        if(taskData.getTaskScheduling().getResourceHostId() != null){
-////            hostName = taskData.getTaskScheduling().getResourceHostId();
-////            hostDescription = airavataRegistry2.getHostDescriptor(hostName);
-////        }else{
-////        	  List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
-////              Map<String, ApplicationDescription> applicationDescriptors = airavataRegistry2.getApplicationDescriptors(serviceName);
-////              for (String hostDescName : applicationDescriptors.keySet()) {
-////                  registeredHosts.add(airavataRegistry2.getHostDescriptor(hostDescName));
-////              }
-////              Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
-////             HostScheduler hostScheduler = aClass.newInstance();
-////             //TODO cleanup
-////            hostDescription = registeredHosts.get(0);//hostScheduler.schedule(registeredHosts);
-////        	hostName = hostDescription.getType().getHostName();
-////        }
-////        if(hostDescription == null){
-////        	throw new GFacException("Error executing the job as the host is not registered " + hostName);
-////        }
-////        ApplicationDescription applicationDescription = airavataRegistry2.getApplicationDescriptors(serviceName, hostName);
-////        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-////        Properties configurationProperties = ServerSettings.getProperties();
-////        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
-////
-////
-////        // start constructing jobexecutioncontext
-////        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
-////
-////        // setting experiment/task/workflownode related information
-////        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
-////        jobExecutionContext.setExperiment(experiment);
-////        jobExecutionContext.setExperimentID(experimentID);
-////        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
-////        jobExecutionContext.setTaskData(taskData);
-////
-////        // setting the registry
-////        jobExecutionContext.setRegistry(registry);
-////
-////        ApplicationContext applicationContext = new ApplicationContext();
-////        applicationContext.setApplicationDeploymentDescription(applicationDescription);
-////        applicationContext.setHostDescription(hostDescription);
-////        applicationContext.setServiceDescription(serviceDescription);
-////        jobExecutionContext.setApplicationContext(applicationContext);
-////
-////        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
-////        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
-////                serviceDescription.getType().getInputParametersArray())));
-////
-////        List<DataObjectType> outputData = taskData.getApplicationOutputs();
-////        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getInMessageContext(outputData,
-////                serviceDescription.getType().getOutputParametersArray())));
-////
-////        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
-////        jobExecutionContext.setGfac(this);
-////        return jobExecutionContext;
-////    }
-////
-////    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
-////        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-////        // we need to setup workflow tracking listerner.
-////        String workflowInstanceID = null;
-////        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-////            // This mean we need to register workflow tracking listener.
-////            //todo implement WorkflowTrackingListener properly
-////            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-////        }
-////        // Register log event listener. This is required in all scenarios.
-////        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-////        schedule(jobExecutionContext);
-////        return true;
-////    }
-////
-////
-////    public boolean cancel(String experimentID, String taskID, String gatewayID) throws GFacException {
-////        JobExecutionContext jobExecutionContext = null;
-////        try {
-////            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-////            return cancel(jobExecutionContext);
-////        } catch (Exception e) {
-////            log.error("Error inovoking the job with experiment ID: " + experimentID);
-////            throw new GFacException(e);
-////        }
-////    }
-////
-////    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
-////        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-////        // we need to setup workflow tracking listerner.
-////        String workflowInstanceID = null;
-////        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-////            // This mean we need to register workflow tracking listener.
-////            //todo implement WorkflowTrackingListener properly
-////            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-////        }
-////        // Register log event listener. This is required in all scenarios.
-////        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-////        try {
-////            Scheduler.schedule(jobExecutionContext);
-////            GFacProvider provider = jobExecutionContext.getProvider();
-////            if (provider != null) {
-////                initProvider(provider, jobExecutionContext);
-////                cancelProvider(provider, jobExecutionContext);
-////                disposeProvider(provider, jobExecutionContext);
-////            }
-////        }catch (Exception e) {
-////            try {
-////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-////                        new JobIdentity(jobExecutionContext.getExperimentID(),
-////                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
-////            } catch (NullPointerException e1) {
-////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
-////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-////                // Updating status if job id is not set
-//////				monitorPublisher
-//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-////                // Updating the task status if there's any task associated
-////                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-////                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
-////
-////            }
-////            jobExecutionContext.setProperty(ERROR_SENT, "true");
-////            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-////            throw new GFacException(e.getMessage(), e);
-////        }
-////        return true;
-////    }
-////
-////    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
-////        // Scheduler will decide the execution flow of handlers and provider which handles
-////        // the job.
-////        String experimentID = jobExecutionContext.getExperimentID();
-////        try {
-////            Scheduler.schedule(jobExecutionContext);
-////
-////            // Executing in handlers in the order as they have configured in GFac configuration
-////            invokeInFlowHandlers(jobExecutionContext);
-//////            if (experimentID != null){
-//////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
-//////            }
-////
-////            // After executing the in handlers provider instance should be set to job execution context.
-////            // We get the provider instance and execute it.
-////            GFacProvider provider = jobExecutionContext.getProvider();
-////            if (provider != null) {
-////                initProvider(provider, jobExecutionContext);
-////                executeProvider(provider, jobExecutionContext);
-////                disposeProvider(provider, jobExecutionContext);
-////            }
-////            if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
-////                invokeOutFlowHandlers(jobExecutionContext);
-////            }
-////        } catch (Exception e) {
-////            try {
-////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-////                        new JobIdentity(jobExecutionContext.getExperimentID(),
-////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
-////            } catch (NullPointerException e1) {
-////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
-////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-////                // Updating status if job id is not set
-//////				monitorPublisher
-//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-////				// Updating the task status if there's any task associated
-////				monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-////						.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
-////
-////            }
-////            jobExecutionContext.setProperty(ERROR_SENT, "true");
-////            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-////            throw new GFacException(e.getMessage(), e);
-////        }
-////    }
-////
-////    private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-////        try {
-////            provider.initialize(jobExecutionContext);
-////        } catch (Exception e) {
-////            throw new GFacException("Error while initializing provider " + provider.getClass().getName() + ".", e);
-////        }
-////    }
-////
-////    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-////        try {
-////             provider.execute(jobExecutionContext);
-////        } catch (Exception e) {
-////            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-////        }
-////    }
-////    private void cancelProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-////        try {
-////            provider.cancelJob(jobExecutionContext);
-////        } catch (Exception e) {
-////            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-////        }
-////    }
-////
-////    private void disposeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-////        try {
-////            provider.dispose(jobExecutionContext);
-////        } catch (Exception e) {
-////            throw new GFacException("Error while invoking provider " + provider.getClass().getName() + " dispose method.", e);
-////        }
-////    }
-////
-////    private void registerWorkflowTrackingListener(String workflowInstanceID, JobExecutionContext jobExecutionContext) {
-////        String workflowNodeID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID);
-////        String topic = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
-////        String brokerUrl = (String) jobExecutionContext.getProperty(Constants.PROP_BROKER_URL);
-////        jobExecutionContext.getNotificationService().registerListener(
-////                new WorkflowTrackingListener(workflowInstanceID, workflowNodeID, brokerUrl, topic));
-////
-////    }
-////
-////    private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-////        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
-////        for (GFacHandlerConfig handlerClassName : handlers) {
-////            Class<? extends GFacHandler> handlerClass;
-////            GFacHandler handler;
-////            try {
-////                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-////                handler = handlerClass.newInstance();
-////                handler.initProperties(handlerClassName.getProperties());
-////            } catch (ClassNotFoundException e) {
-////                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-////            } catch (InstantiationException e) {
-////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-////            } catch (IllegalAccessException e) {
-////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-////            }
-////            try {
-////                handler.invoke(jobExecutionContext);
-////            } catch (GFacHandlerException e) {
-////                throw new GFacException("Error Executing a InFlow Handler", e.getCause());
-////            }
-////        }
-////    }
-////
-////    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-////        this.invokeOutFlowHandlers(jobExecutionContext);
-////    }
-////
-////    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-////        GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
-////        List<GFacHandlerConfig> handlers = null;
-////        if(gFacConfiguration != null){
-////         handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
-////        }else {
-////            try {
-////                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-////            } catch (Exception e) {
-////                log.error("Error constructing job execution context during outhandler invocation");
-////                throw new GFacException(e);
-////            }
-////            schedule(jobExecutionContext);
-////        }
-////        for (GFacHandlerConfig handlerClassName : handlers) {
-////            Class<? extends GFacHandler> handlerClass;
-////            GFacHandler handler;
-////            try {
-////                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-////                handler = handlerClass.newInstance();
-////                handler.initProperties(handlerClassName.getProperties());
-////            } catch (ClassNotFoundException e) {
-////                log.error(e.getMessage());
-////                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-////            } catch (InstantiationException e) {
-////                log.error(e.getMessage());
-////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-////            } catch (IllegalAccessException e) {
-////                log.error(e.getMessage());
-////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-////            }
-////            try {
-////                handler.invoke(jobExecutionContext);
-////            } catch (Exception e) {
-////                // TODO: Better error reporting.
-////                throw new GFacException("Error Executing a OutFlow Handler", e);
-////            }
-////        }
-////
-////        monitorPublisher.publish(GfacExperimentState.COMPLETED);
-////        // At this point all the execution is finished so we update the task and experiment statuses.
-////        // Handler authors does not have to worry about updating experiment or task statuses.
-//////        monitorPublisher.publish(new
-//////                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
-//////                ExperimentState.COMPLETED));
-////        // Updating the task status if there's any task associated
-////        monitorPublisher.publish(new TaskStatusChangeRequest(
-////                new TaskIdentity(jobExecutionContext.getExperimentID(),
-////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                        jobExecutionContext.getTaskData().getTaskID()), TaskState.COMPLETED
-////        ));
-////    }
-////
-////
-////    public AiravataAPI getAiravataAPI() {
-////        return airavataAPI;
-////    }
-////
-////    public AiravataRegistry2 getAiravataRegistry2() {
-////        return airavataRegistry2;
-////    }
-////
-////    public static List<ThreadedHandler> getDaemonHandlers() {
-////        return daemonHandlers;
-////    }
-////
-////    public static String getErrorSent() {
-////        return ERROR_SENT;
-////    }
-////
-////    public File getGfacConfigFile() {
-////        return gfacConfigFile;
-////    }
-////
-////    public static MonitorPublisher getMonitorPublisher() {
-////        return monitorPublisher;
-////    }
-////
-////    public Registry getRegistry() {
-////        return registry;
-////    }
-////}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index ecf826d..aa98ef6 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -24,7 +24,7 @@ import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.states.GfacHandlerState;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.messaging.event.TaskIdentifier;
 import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
index c6ada52..3685bb8 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
@@ -22,7 +22,7 @@ package org.apache.airavata.gfac.core.handler;
 
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.states.GfacHandlerState;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
deleted file mode 100644
index d5b917b..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *
- * 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.core.monitor;
-
-import com.google.common.eventbus.Subscribe;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.Publisher;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
-import org.apache.airavata.model.messaging.event.MessageType;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.registry.cpi.CompositeIdentifier;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Calendar;
-
-public class AiravataJobStatusUpdator implements AbstractActivityListener {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataJobStatusUpdator.class);
-    private Registry airavataRegistry;
-
-    private MonitorPublisher monitorPublisher;
-    private Publisher publisher;
-
-
-    public Registry getAiravataRegistry() {
-        return airavataRegistry;
-    }
-
-    public void setAiravataRegistry(Registry airavataRegistry) {
-        this.airavataRegistry = airavataRegistry;
-    }
-
-
-    @Subscribe
-    public void updateRegistry(JobStatusChangeRequestEvent jobStatus) throws Exception{
-        /* Here we need to parse the jobStatus message and update
-                the registry accordingly, for now we are just printing to standard Out
-                 */
-        JobState state = jobStatus.getState();
-        if (state != null) {
-            try {
-                String taskID = jobStatus.getJobIdentity().getTaskId();
-                String jobID = jobStatus.getJobIdentity().getJobId();
-                String expId = jobStatus.getJobIdentity().getExperimentId();
-                updateJobStatus(expId,taskID, jobID, state);
-    			logger.debug("expId - {}: Publishing job status for " + jobStatus.getJobIdentity().getJobId() + ":"
-                        + state.toString(),jobStatus.getJobIdentity().getExperimentId());
-                JobStatusChangeEvent event = new JobStatusChangeEvent(jobStatus.getState(), jobStatus.getJobIdentity());
-                monitorPublisher.publish(event);
-                String messageId = AiravataUtils.getId("JOB");
-                MessageContext msgCntxt = new MessageContext(event, MessageType.JOB, messageId, jobStatus.getJobIdentity().getGatewayId());
-                msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
-                publisher.publish(msgCntxt);
-            } catch (Exception e) {
-                logger.error("expId - " + jobStatus.getJobIdentity().getExperimentId() + ": Error persisting data"
-                        + e.getLocalizedMessage(), e);
-                throw new Exception("Error persisting job status..", e);
-            }
-        }
-    }
-
-    public  void updateJobStatus(String expId, String taskId, String jobID, JobState state) throws Exception {
-        logger.info("expId - {}: Updating job status for " + jobID + ":" + state.toString(), expId);
-        CompositeIdentifier ids = new CompositeIdentifier(taskId, jobID);
-        JobDetails details = (JobDetails) airavataRegistry.get(RegistryModelType.JOB_DETAIL, ids);
-        if (details == null) {
-            details = new JobDetails();
-        }
-        org.apache.airavata.model.workspace.experiment.JobStatus status = new org.apache.airavata.model.workspace.experiment.JobStatus();
-        if (JobState.CANCELED.equals(details.getJobStatus().getJobState()) ||
-                JobState.CANCELING.equals(details.getJobStatus().getJobState())) {
-            status.setJobState(details.getJobStatus().getJobState());
-        } else {
-            status.setJobState(state);
-        }
-        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-        details.setJobStatus(status);
-        details.setJobID(jobID);
-        logger.debug("expId - {}: Updated job status for " + jobID + ":" + details.getJobStatus().toString(), expId);
-        airavataRegistry.update(RegistryModelType.JOB_STATUS, status, ids);
-    }
-
-	@SuppressWarnings("unchecked")
-	public void setup(Object... configurations) {
-		for (Object configuration : configurations) {
-			if (configuration instanceof Registry){
-				this.airavataRegistry=(Registry)configuration;
-			} else if (configuration instanceof MonitorPublisher){
-				this.monitorPublisher=(MonitorPublisher) configuration;
-			} else if (configuration instanceof Publisher){
-                this.publisher=(Publisher) configuration;
-            }
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
deleted file mode 100644
index 90392d6..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * 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.core.monitor;
-
-import com.google.common.eventbus.Subscribe;
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.Publisher;
-import org.apache.airavata.model.messaging.event.*;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Calendar;
-
-public class AiravataTaskStatusUpdator implements AbstractActivityListener {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataTaskStatusUpdator.class);
-    private Registry airavataRegistry;
-    private MonitorPublisher monitorPublisher;
-    private Publisher publisher;
-    
-    public Registry getAiravataRegistry() {
-        return airavataRegistry;
-    }
-
-    public void setAiravataRegistry(Registry airavataRegistry) {
-        this.airavataRegistry = airavataRegistry;
-    }
-
-    @Subscribe
-    public void setupTaskStatus(TaskStatusChangeRequestEvent taskStatus) throws Exception{
-    	try {
-			updateTaskStatus(taskStatus.getTaskIdentity().getTaskId(), taskStatus.getState());
-            logger.debug("expId - {}: Publishing task status for " + taskStatus.getTaskIdentity().getTaskId() + ":"
-                    + taskStatus.getState().toString(), taskStatus.getTaskIdentity().getExperimentId());
-            TaskStatusChangeEvent event = new TaskStatusChangeEvent(taskStatus.getState(), taskStatus.getTaskIdentity());
-            monitorPublisher.publish(event);
-            String messageId = AiravataUtils.getId("TASK");
-            MessageContext msgCntxt = new MessageContext(event, MessageType.TASK, messageId, taskStatus.getTaskIdentity().getGatewayId());
-            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
-            publisher.publish(msgCntxt);
-		} catch (Exception e) {
-            String msg = "Error persisting data task status to database...";
-            logger.error(msg + e.getLocalizedMessage(), e);
-            throw new Exception(msg, e);
-		}
-    }
-
-    @Subscribe
-    public void setupTaskStatus(JobStatusChangeEvent jobStatus) throws Exception{
-    	TaskState state=TaskState.UNKNOWN;
-    	switch(jobStatus.getState()){
-    	case ACTIVE:
-    		state=TaskState.EXECUTING; break;
-    	case CANCELED:
-    		state=TaskState.CANCELED; break;
-    	case COMPLETE: case FAILED:
-    		state=TaskState.POST_PROCESSING; break;
-    	case HELD: case SUSPENDED: case QUEUED:
-    		state=TaskState.WAITING; break;
-    	case SETUP:
-    		state=TaskState.PRE_PROCESSING; break;
-    	case SUBMITTED:
-    		state=TaskState.STARTED; break;
-    	case UN_SUBMITTED:
-    		state=TaskState.CANCELED; break;
-    	case CANCELING:
-    		state=TaskState.CANCELING; break;
-		default:
-			return;
-    	}
-    	try {
-			updateTaskStatus(jobStatus.getJobIdentity().getTaskId(), state);
-            logger.debug("expId - {}: Publishing task status for " + jobStatus.getJobIdentity().getTaskId() + ":"
-                    + state.toString(), jobStatus.getJobIdentity().getExperimentId());
-            TaskIdentifier taskIdentity = new TaskIdentifier(jobStatus.getJobIdentity().getTaskId(),
-                                                         jobStatus.getJobIdentity().getWorkflowNodeId(),
-                                                         jobStatus.getJobIdentity().getExperimentId(),
-                                                         jobStatus.getJobIdentity().getGatewayId());
-            TaskStatusChangeEvent event = new TaskStatusChangeEvent(state, taskIdentity);
-            monitorPublisher.publish(event);
-            String messageId = AiravataUtils.getId("TASK");
-            MessageContext msgCntxt = new MessageContext(event, MessageType.TASK, messageId,jobStatus.getJobIdentity().getGatewayId());
-            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
-            publisher.publish(msgCntxt);
-
-        }  catch (Exception e) {
-            logger.error("expId - " + jobStatus.getJobIdentity().getExperimentId() + ": Error persisting data" + e.getLocalizedMessage(), e);
-            throw new Exception("Error persisting task status..", e);
-		}
-    }
-    
-    public  TaskState updateTaskStatus(String taskId, TaskState state) throws Exception {
-    	TaskDetails details = (TaskDetails)airavataRegistry.get(RegistryModelType.TASK_DETAIL, taskId);
-        if(details == null) {
-            logger.error("Task details cannot be null at this point");
-            throw new Exception("Task details cannot be null at this point");
-        }
-        org.apache.airavata.model.workspace.experiment.TaskStatus status = new org.apache.airavata.model.workspace.experiment.TaskStatus();
-        if(!TaskState.CANCELED.equals(details.getTaskStatus().getExecutionState())
-                && !TaskState.CANCELING.equals(details.getTaskStatus().getExecutionState())){
-            status.setExecutionState(state);
-        }else{
-            status.setExecutionState(details.getTaskStatus().getExecutionState());
-        }
-        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-        details.setTaskStatus(status);
-        logger.debug("Updating task status for "+taskId+":"+details.getTaskStatus().toString());
-
-        airavataRegistry.update(RegistryModelType.TASK_STATUS, status, taskId);
-        return status.getExecutionState();
-    }
-
-	public void setup(Object... configurations) {
-		for (Object configuration : configurations) {
-			if (configuration instanceof Registry){
-				this.airavataRegistry=(Registry)configuration;
-			} else if (configuration instanceof MonitorPublisher){
-				this.monitorPublisher=(MonitorPublisher) configuration;
-			} else if (configuration instanceof Publisher){
-                this.publisher=(Publisher) configuration;
-            }
-        }
-	}
-
-
-    @Subscribe
-    public void taskOutputChanged(TaskOutputChangeEvent taskOutputEvent) throws AiravataException {
-        String taskId = taskOutputEvent.getTaskIdentity().getTaskId();
-        logger.debug("Task Output changed event received for workflow node : " +
-                taskOutputEvent.getTaskIdentity().getWorkflowNodeId() + ", task : " + taskId);
-        // TODO - do we need to update the output to the registry? , we do it in the workflowInterpreter too.
-        MessageContext messageContext = new MessageContext(taskOutputEvent, MessageType.TASKOUTPUT, taskOutputEvent.getTaskIdentity().getTaskId(), taskOutputEvent.getTaskIdentity().getGatewayId());
-        messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
-        publisher.publish(messageContext);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
deleted file mode 100644
index c32742a..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *
- * 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.core.monitor;
-
-import com.google.common.eventbus.Subscribe;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.Publisher;
-import org.apache.airavata.model.messaging.event.MessageType;
-import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
-import org.apache.airavata.model.messaging.event.WorkflowIdentifier;
-import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Calendar;
-
-public class AiravataWorkflowNodeStatusUpdator implements AbstractActivityListener {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataWorkflowNodeStatusUpdator.class);
-
-    private Registry airavataRegistry;
-    private MonitorPublisher monitorPublisher;
-    private Publisher publisher;
-
-
-
-
-    public Registry getAiravataRegistry() {
-        return airavataRegistry;
-    }
-
-    public void setAiravataRegistry(Registry airavataRegistry) {
-        this.airavataRegistry = airavataRegistry;
-    }
-
-    @Subscribe
-    public void setupWorkflowNodeStatus(TaskStatusChangeEvent taskStatus) throws Exception{
-    	WorkflowNodeState state=WorkflowNodeState.UNKNOWN;
-    	switch(taskStatus.getState()){
-    	case CANCELED:
-    		state=WorkflowNodeState.CANCELED; break;
-    	case COMPLETED:
-    		state=WorkflowNodeState.COMPLETED; break;
-    	case CONFIGURING_WORKSPACE:
-    		state=WorkflowNodeState.INVOKED; break;
-    	case FAILED:
-    		state=WorkflowNodeState.FAILED; break;
-    	case EXECUTING: case WAITING: case PRE_PROCESSING: case POST_PROCESSING: case OUTPUT_DATA_STAGING: case INPUT_DATA_STAGING:
-    		state=WorkflowNodeState.EXECUTING; break;
-    	case STARTED:
-    		state=WorkflowNodeState.INVOKED; break;
-    	case CANCELING:
-    		state=WorkflowNodeState.CANCELING; break;
-		default:
-			return;
-    	}
-    	try {
-            String expId = taskStatus.getTaskIdentity().getExperimentId();
-			updateWorkflowNodeStatus(expId, taskStatus.getTaskIdentity().getWorkflowNodeId(), state);
-            logger.debug("expId - {}: Publishing workflow node status for " + taskStatus.getTaskIdentity().getWorkflowNodeId()
-                    + ":" + state.toString(), taskStatus.getTaskIdentity().getExperimentId());
-            WorkflowIdentifier workflowIdentity = new WorkflowIdentifier(taskStatus.getTaskIdentity().getWorkflowNodeId(),
-                                                                         taskStatus.getTaskIdentity().getExperimentId(),
-                                                                         taskStatus.getTaskIdentity().getGatewayId());
-            WorkflowNodeStatusChangeEvent event = new WorkflowNodeStatusChangeEvent(state, workflowIdentity);
-            monitorPublisher.publish(event);
-            String messageId = AiravataUtils.getId("WFNODE");
-            MessageContext msgCntxt = new MessageContext(event, MessageType.WORKFLOWNODE, messageId, taskStatus.getTaskIdentity().getGatewayId());
-            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
-
-            publisher.publish(msgCntxt);
-		} catch (Exception e) {
-            logger.error("expId - " + taskStatus.getTaskIdentity().getExperimentId() + ": Error persisting data"
-                    + e.getLocalizedMessage(), e);
-            throw new Exception("Error persisting workflow node status..", e);
-        }
-    }
-
-    public  void updateWorkflowNodeStatus(String experimentId, String workflowNodeId, WorkflowNodeState state) throws Exception {
-		logger.info("expId - {}: Updating workflow node status for "+workflowNodeId+":"+state.toString(), experimentId);
-    	WorkflowNodeDetails details = (WorkflowNodeDetails)airavataRegistry.get(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeId);
-        if(details == null) {
-            details = new WorkflowNodeDetails();
-            details.setNodeInstanceId(workflowNodeId);
-        }
-        WorkflowNodeStatus status = new WorkflowNodeStatus();
-        status.setWorkflowNodeState(state);
-        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-        details.setWorkflowNodeStatus(status);
-        airavataRegistry.update(RegistryModelType.WORKFLOW_NODE_STATUS, status, workflowNodeId);
-    }
-
-	public void setup(Object... configurations) {
-		for (Object configuration : configurations) {
-			if (configuration instanceof Registry){
-				this.airavataRegistry=(Registry)configuration;
-			} else if (configuration instanceof MonitorPublisher){
-				this.monitorPublisher=(MonitorPublisher) configuration;
-			}  else if (configuration instanceof Publisher){
-                this.publisher=(Publisher) configuration;
-            }
-        }
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/EmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/EmailParser.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/EmailParser.java
new file mode 100644
index 0000000..0961fa4
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/EmailParser.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * 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.core.monitor;
+
+import org.apache.airavata.common.exception.AiravataException;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+
+public interface EmailParser {
+    static final String STATUS = "status";
+    static final String JOBID = "jobId";
+    static final String JOBNAME = "jobName";
+    static final String EXIT_STATUS = "exitStatus";
+
+    JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
deleted file mode 100644
index dd1d9d8..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
+++ /dev/null
@@ -1,36 +0,0 @@
-///*
-//*
-//* 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.core.monitor;
-//
-//public class ExperimentIdentity {
-//	private String experimentID;
-//	public ExperimentIdentity(String experimentId) {
-//		setExperimentID(experimentId);
-//	}
-//	public String getExperimentID() {
-//		return experimentID;
-//	}
-//
-//	public void setExperimentID(String experimentID) {
-//		this.experimentID = experimentID;
-//	}
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobIdentity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobIdentity.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobIdentity.java
deleted file mode 100644
index 881dacd..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobIdentity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-///*
-//*
-//* 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.core.monitor;
-//
-//public class JobIdentity extends TaskIdentity {
-//	private String jobId;
-//
-//	public JobIdentity(String experimentId, String workflowNodeId, String taskId, String jobId) {
-//		super(experimentId,workflowNodeId,taskId);
-//		setJobId(jobId);
-//	}
-//
-//	public String getJobId() {
-//		return jobId;
-//	}
-//
-//	public void setJobId(String jobId) {
-//		this.jobId = jobId;
-//	}
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobStatusResult.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobStatusResult.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobStatusResult.java
new file mode 100644
index 0000000..c1ea026
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/JobStatusResult.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.core.monitor;
+
+import org.apache.airavata.model.workspace.experiment.JobState;
+
+public class JobStatusResult {
+    private JobState state;
+    private String jobId;
+
+    public String getJobName() {
+        return jobName;
+    }
+
+    public void setJobName(String jobName) {
+        this.jobName = jobName;
+    }
+
+    private String jobName;
+
+    public JobState getState() {
+        return state;
+    }
+
+    public void setState(JobState state) {
+        this.state = state;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/TaskIdentity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/TaskIdentity.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/TaskIdentity.java
deleted file mode 100644
index 369b7a0..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/TaskIdentity.java
+++ /dev/null
@@ -1,38 +0,0 @@
-///*
-//*
-//* 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.core.monitor;
-//
-//public class TaskIdentity extends WorkflowNodeIdentity {
-//	private String taskId;
-//
-//	public TaskIdentity(String experimentId, String workflowNodeId, String taskId) {
-//		super(experimentId,workflowNodeId);
-//		setTaskId(taskId);
-//	}
-//	public String getTaskId() {
-//		return taskId;
-//	}
-//
-//	public void setTaskId(String taskId) {
-//		this.taskId = taskId;
-//	}
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/WorkflowNodeIdentity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/WorkflowNodeIdentity.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/WorkflowNodeIdentity.java
deleted file mode 100644
index ba6f828..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/WorkflowNodeIdentity.java
+++ /dev/null
@@ -1,37 +0,0 @@
-///*
-//*
-//* 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.core.monitor;
-//
-//public class WorkflowNodeIdentity extends ExperimentIdentity {
-//	private String workflowNodeID;
-//	public WorkflowNodeIdentity(String experimentId, String workflowNodeId) {
-//		super(experimentId);
-//		setWorkflowNodeID(workflowNodeId);
-//	}
-//	public String getWorkflowNodeID() {
-//		return workflowNodeID;
-//	}
-//
-//	public void setWorkflowNodeID(String workflowNodeID) {
-//		this.workflowNodeID = workflowNodeID;
-//	}
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
deleted file mode 100644
index 2530ff8..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-///*
-// *
-// * 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.core.monitor.state;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.JobIdentity;
-//import org.apache.airavata.gfac.core.monitor.MonitorID;
-//import org.apache.airavata.model.workspace.experiment.JobState;
-//
-///**
-// * This is the primary job state object used in
-// * through out the monitor module. This use airavata-data-model JobState enum
-// * Ideally after processing each event or monitoring message from remote system
-// * Each monitoring implementation has to return this object with a state and
-// * the monitoring ID
-// */
-//public class JobStatusChangeRequest  extends AbstractStateChangeRequest {
-//    private JobState state;
-//    private JobIdentity identity;
-//
-//    private MonitorID monitorID;
-//
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public JobStatusChangeRequest() {
-//    }
-//
-//    public JobStatusChangeRequest(MonitorID monitorID) {
-//        setIdentity(new JobIdentity(monitorID.getExperimentID(),monitorID.getWorkflowNodeID(),
-//                monitorID.getTaskID(),monitorID.getJobID()));
-//    	setMonitorID(monitorID);
-//    	this.state = monitorID.getStatus();
-//    }
-//    public JobStatusChangeRequest(MonitorID monitorID, JobIdentity jobId, JobState state) {
-//    	setIdentity(jobId);
-//    	setMonitorID(monitorID);
-//    	this.state = state;
-//    }
-//
-//    public JobState getState() {
-//        return state;
-//    }
-//
-//    public void setState(JobState state) {
-//       this.state = state;
-//    }
-//
-//	public JobIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(JobIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//	public MonitorID getMonitorID() {
-//		return monitorID;
-//	}
-//
-//	public void setMonitorID(MonitorID monitorID) {
-//		this.monitorID = monitorID;
-//	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
deleted file mode 100644
index b5ccf1c..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
+++ /dev/null
@@ -1,81 +0,0 @@
-///*
-// *
-// * 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.core.monitor.state;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.JobIdentity;
-//import org.apache.airavata.gfac.core.monitor.MonitorID;
-//import org.apache.airavata.model.workspace.experiment.JobState;
-//
-///**
-// * This is the primary job state object used in
-// * through out the monitor module. This use airavata-data-model JobState enum
-// * Ideally after processing each event or monitoring message from remote system
-// * Each monitoring implementation has to return this object with a state and
-// * the monitoring ID
-// */
-//public class JobStatusChangedEvent  extends AbstractStateChangeRequest {
-//    private JobState state;
-//    private JobIdentity identity;
-//
-//    private MonitorID monitorID;
-//
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public JobStatusChangedEvent() {
-//    }
-//
-//    public JobStatusChangedEvent(MonitorID monitorID) {
-//        setIdentity(new JobIdentity(monitorID.getExperimentID(),monitorID.getWorkflowNodeID(),
-//                monitorID.getTaskID(),monitorID.getJobID()));
-//    	setMonitorID(monitorID);
-//    	this.state = monitorID.getStatus();
-//    }
-//    public JobStatusChangedEvent(MonitorID monitorID, JobIdentity jobId, JobState state) {
-//    	setIdentity(jobId);
-//    	setMonitorID(monitorID);
-//    	this.state = state;
-//    }
-//
-//    public JobState getState() {
-//        return state;
-//    }
-//
-//    public void setState(JobState state) {
-//       this.state = state;
-//    }
-//
-//	public JobIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(JobIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//	public MonitorID getMonitorID() {
-//		return monitorID;
-//	}
-//
-//	public void setMonitorID(MonitorID monitorID) {
-//		this.monitorID = monitorID;
-//	}
-//
-//}


[08/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
deleted file mode 100644
index b38a170..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- *
- * 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.ssh.util;
-
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
-import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.*;
-
-public class GFACSSHUtils {
-    private final static Logger logger = LoggerFactory.getLogger(GFACSSHUtils.class);
-
-    public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
-
-    public static final String PBS_JOB_MANAGER = "pbs";
-    public static final String SLURM_JOB_MANAGER = "slurm";
-    public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
-    public static final String LSF_JOB_MANAGER = "LSF";
-
-    public static int maxClusterCount = 5;
-
-    /**
-     * This method is to add computing resource specific authentication, if its a third party machine, use the other addSecurityContext
-     * @param jobExecutionContext
-     * @throws GFacException
-     * @throws ApplicationSettingsException
-     */
-    public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
-        JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
-        JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
-        if (preferredJobSubmissionProtocol == JobSubmissionProtocol.GLOBUS || preferredJobSubmissionProtocol == JobSubmissionProtocol.UNICORE) {
-            logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
-        } else if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH) {
-            try {
-                AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
-                SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
-                SecurityProtocol securityProtocol = sshJobSubmission.getSecurityProtocol();
-                if (securityProtocol == SecurityProtocol.GSI || securityProtocol == SecurityProtocol.SSH_KEYS) {
-                    SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
-                    String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
-                    RequestData requestData = new RequestData(jobExecutionContext.getGatewayID());
-                    requestData.setTokenId(credentialStoreToken);
-
-                    ServerInfo serverInfo = new ServerInfo(null, jobExecutionContext.getHostName());
-
-                    Cluster pbsCluster = null;
-                    try {
-                        AuthenticationInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
-                        String installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
-                        if (installedParentPath == null) {
-                            installedParentPath = "/";
-                        }
-
-                        SSHCredential credentials =((TokenizedSSHAuthInfo)tokenizedSSHAuthInfo).getCredentials();// this is just a call to get and set credentials in to this object,data will be used
-                        if(credentials.getPrivateKey()==null || credentials.getPublicKey()==null){
-                            // now we fall back to username password authentication
-                            Properties configurationProperties = ServerSettings.getProperties();
-                            tokenizedSSHAuthInfo = new DefaultPasswordAuthenticationInfo(configurationProperties.getProperty(Constants.SSH_PASSWORD));
-                        }
-                        // This should be the login user name from compute resource preference
-                        String loginUser = jobExecutionContext.getLoginUserName();
-                        if (loginUser == null) {
-                            loginUser = credentials.getPortalUserName();
-                        }
-                        serverInfo.setUserName(loginUser);
-                        jobExecutionContext.getExperiment().setUserName(loginUser);
-
-
-                        // inside the pbsCluser object
-
-                        String key = loginUser + jobExecutionContext.getHostName() + serverInfo.getPort();
-                        boolean recreate = false;
-                        synchronized (clusters) {
-                            if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
-                                recreate = true;
-                            } else if (clusters.containsKey(key)) {
-                                int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
-                                if (clusters.get(key).get(i).getSession().isConnected()) {
-                                    pbsCluster = clusters.get(key).get(i);
-                                } else {
-                                    clusters.get(key).remove(i);
-                                    recreate = true;
-                                }
-                                if (!recreate) {
-                                    try {
-                                        pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
-                                    } catch (Exception e) {
-                                        clusters.get(key).remove(i);
-                                        logger.info("Connection found the connection map is expired, so we create from the scratch");
-                                        maxClusterCount++;
-                                        recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
-                                    }
-                                }
-                                logger.info("Re-using the same connection used with the connection string:" + key);
-                            } else {
-                                recreate = true;
-                            }
-                            if (recreate) {
-                            	 JobManagerConfiguration jConfig = null;
-                                 String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
-                                 if (jobManager == null) {
-                                     logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
-                                     jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-                                 } else {
-                                     if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                         jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-                                     } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                         jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
-                                     } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                         jConfig = CommonUtils.getUGEJobManager(installedParentPath);
-                                     } else if (LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-                                         jConfig = CommonUtils.getLSFJobManager(installedParentPath);
-                                     }
-                                 }
-
-                                pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,jConfig);
-                                List<Cluster> pbsClusters = null;
-                                if (!(clusters.containsKey(key))) {
-                                    pbsClusters = new ArrayList<Cluster>();
-                                } else {
-                                    pbsClusters = clusters.get(key);
-                                }
-                                pbsClusters.add(pbsCluster);
-                                clusters.put(key, pbsClusters);
-                            }
-                        }
-                    } catch (Exception e) {
-                        throw new GFacException("Error occurred...", e);
-                    }
-                    sshSecurityContext.setPbsCluster(pbsCluster);
-                    jobExecutionContext.addSecurityContext(jobExecutionContext.getHostName(), sshSecurityContext);
-                }
-            } catch (AppCatalogException e) {
-                throw new GFacException("Error while getting SSH Submission object from app catalog", e);
-            }
-        }
-    }
-
-    /**
-     * This method can be used to add third party resource security contexts
-     * @param jobExecutionContext
-     * @param sshAuth
-     * @throws GFacException
-     * @throws ApplicationSettingsException
-     */
-    public static void addSecurityContext(JobExecutionContext jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException, ApplicationSettingsException {
-        try {
-            if(sshAuth== null) {
-                throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
-            }
-            SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
-            AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
-            JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
-            SSHJobSubmission sshJobSubmission = null;
-			try {
-				sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
-			} catch (Exception e1) {
-				 logger.error("Not able to get SSHJobSubmission from registry");
-			}
-
-            Cluster pbsCluster = null;
-            String key=sshAuth.getKey();
-            boolean recreate = false;
-            synchronized (clusters) {
-                if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
-                    recreate = true;
-                } else if (clusters.containsKey(key)) {
-                    int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
-                    if (clusters.get(key).get(i).getSession().isConnected()) {
-                        pbsCluster = clusters.get(key).get(i);
-                    } else {
-                        clusters.get(key).remove(i);
-                        recreate = true;
-                    }
-                    if (!recreate) {
-                        try {
-                            pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
-                        } catch (Exception e) {
-                            clusters.get(key).remove(i);
-                            logger.info("Connection found the connection map is expired, so we create from the scratch");
-                            maxClusterCount++;
-                            recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
-                        }
-                    }
-                    logger.info("Re-using the same connection used with the connection string:" + key);
-                } else {
-                    recreate = true;
-                }
-                if (recreate) {
-               	 JobManagerConfiguration jConfig = null;
-               	 String installedParentPath = null;
-               	 if(jobExecutionContext.getResourceJobManager()!= null){
-               		installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
-               	 }
-                 if (installedParentPath == null) {
-                     installedParentPath = "/";
-                 }
-					if (sshJobSubmission != null) {
-						String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
-						if (jobManager == null) {
-							logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
-							jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-						} else {
-							if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-								jConfig = CommonUtils.getPBSJobManager(installedParentPath);
-							} else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-								jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
-							} else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
-								jConfig = CommonUtils.getUGEJobManager(installedParentPath);
-							} else if (LSF_JOB_MANAGER.equals(jobManager)) {
-								jConfig = CommonUtils.getLSFJobManager(installedParentPath);
-							}
-						}
-					}
-                    pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),jConfig);
-                    key = sshAuth.getKey();
-                    List<Cluster> pbsClusters = null;
-                    if (!(clusters.containsKey(key))) {
-                        pbsClusters = new ArrayList<Cluster>();
-                    } else {
-                        pbsClusters = clusters.get(key);
-                    }
-                    pbsClusters.add(pbsCluster);
-                    clusters.put(key, pbsClusters);
-                }
-            }
-            sshSecurityContext.setPbsCluster(pbsCluster);
-            jobExecutionContext.addSecurityContext(key, sshSecurityContext);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new GFacException("Error adding security Context", e);
-        }
-    }
-
-
-    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) throws AppCatalogException, ApplicationSettingsException {
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        TaskDetails taskData = jobExecutionContext.getTaskData();
-
-
-        // set email based job monitoring email  address if monitor mode is JOB_EMAIL_NOTIFICATION_MONITOR
-        boolean addJobNotifMail = isEmailBasedJobMonitor(jobExecutionContext);
-        String emailIds = null;
-        if (addJobNotifMail) {
-            emailIds = ServerSettings.getEmailBasedMonitorAddress();
-        }
-        // add all configured job notification email addresses.
-        if (ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")) {
-            String flags = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS);
-            if (flags != null && jobExecutionContext.getApplicationContext().getComputeResourceDescription().getHostName().equals("stampede.tacc.xsede.org")) {
-                flags = "ALL";
-            }
-            jobDescriptor.setMailOptions(flags);
-
-            String userJobNotifEmailIds = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
-            if (userJobNotifEmailIds != null && !userJobNotifEmailIds.isEmpty()) {
-                if (emailIds != null && !emailIds.isEmpty()) {
-                    emailIds += ("," + userJobNotifEmailIds);
-                } else {
-                    emailIds = userJobNotifEmailIds;
-                }
-            }
-
-            if (taskData.isEnableEmailNotification()) {
-                List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
-                String elist = GFacUtils.listToCsv(emailList, ',');
-                if (elist != null && !elist.isEmpty()) {
-                    if (emailIds != null && !emailIds.isEmpty()) {
-                        emailIds = emailIds + "," + elist;
-                    } else {
-                        emailIds = elist;
-                    }
-                }
-            }
-        }
-        if (emailIds != null && !emailIds.isEmpty()) {
-            logger.info("Email list: " + emailIds);
-            jobDescriptor.setMailAddress(emailIds);
-        }
-        // this is common for any application descriptor
-
-        jobDescriptor.setCallBackIp(ServerSettings.getIp());
-        jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
-        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
-        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
-        jobDescriptor.setExecutablePath(jobExecutionContext.getApplicationContext()
-                .getApplicationDeploymentDescription().getExecutablePath());
-        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
-        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
-        String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
-        if (computationalProjectAccount == null){
-            ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
-            if (computeResourcePreference != null) {
-                computationalProjectAccount = computeResourcePreference.getAllocationProjectNumber();
-            }
-        }
-        if (computationalProjectAccount != null) {
-            jobDescriptor.setAcountString(computationalProjectAccount);
-        }
-        // To make job name alpha numeric
-        jobDescriptor.setJobName("A" + String.valueOf(generateJobName()));
-        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
-
-        List<String> inputValues = new ArrayList<String>();
-        MessageContext input = jobExecutionContext.getInMessageContext();
-
-        // sort the inputs first and then build the command ListR
-        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
-            @Override
-            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
-                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
-            }
-        };
-        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
-        for (Object object : input.getParameters().values()) {
-            if (object instanceof InputDataObjectType) {
-                InputDataObjectType inputDOT = (InputDataObjectType) object;
-                sortedInputSet.add(inputDOT);
-            }
-        }
-        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
-            if (!inputDataObjectType.isRequiredToAddedToCommandLine()) {
-                continue;
-            }
-            if (inputDataObjectType.getApplicationArgument() != null
-                    && !inputDataObjectType.getApplicationArgument().equals("")) {
-                inputValues.add(inputDataObjectType.getApplicationArgument());
-            }
-
-            if (inputDataObjectType.getValue() != null
-                    && !inputDataObjectType.getValue().equals("")) {
-                if (inputDataObjectType.getType() == DataType.URI) {
-                    // set only the relative path
-                    String filePath = inputDataObjectType.getValue();
-                    filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
-                    inputValues.add(filePath);
-                }else {
-                    inputValues.add(inputDataObjectType.getValue());
-                }
-
-            }
-        }
-        Map<String, Object> outputParams = jobExecutionContext.getOutMessageContext().getParameters();
-        for (Object outputParam : outputParams.values()) {
-            if (outputParam instanceof OutputDataObjectType) {
-                OutputDataObjectType output = (OutputDataObjectType) outputParam;
-                if (output.getApplicationArgument() != null
-                        && !output.getApplicationArgument().equals("")) {
-                    inputValues.add(output.getApplicationArgument());
-                }
-                if (output.getValue() != null && !output.getValue().equals("") && output.isRequiredToAddedToCommandLine()) {
-                    if (output.getType() == DataType.URI){
-                        String filePath = output.getValue();
-                        filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
-                        inputValues.add(filePath);
-                    }
-                }
-            }
-        }
-
-        jobDescriptor.setInputValues(inputValues);
-        jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
-
-        ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
-
-
-        ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
-        if (taskScheduling != null) {
-            int totalNodeCount = taskScheduling.getNodeCount();
-            int totalCPUCount = taskScheduling.getTotalCPUCount();
-
-
-            if (taskScheduling.getComputationalProjectAccount() != null) {
-                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
-            }
-            if (taskScheduling.getQueueName() != null) {
-                jobDescriptor.setQueueName(taskScheduling.getQueueName());
-            }
-
-            if (totalNodeCount > 0) {
-                jobDescriptor.setNodes(totalNodeCount);
-            }
-            if (taskScheduling.getComputationalProjectAccount() != null) {
-                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
-            }
-            if (taskScheduling.getQueueName() != null) {
-                jobDescriptor.setQueueName(taskScheduling.getQueueName());
-            }
-            if (totalCPUCount > 0) {
-                int ppn = totalCPUCount / totalNodeCount;
-                jobDescriptor.setProcessesPerNode(ppn);
-                jobDescriptor.setCPUCount(totalCPUCount);
-            }
-            if (taskScheduling.getWallTimeLimit() > 0) {
-                jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
-                if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
-                    jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
-                }
-            }
-            if (taskScheduling.getTotalPhysicalMemory() > 0) {
-                jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
-            }
-        } else {
-            logger.error("Task scheduling cannot be null at this point..");
-        }
-        ApplicationDeploymentDescription appDepDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
-        List<String> moduleCmds = appDepDescription.getModuleLoadCmds();
-        if (moduleCmds != null) {
-            for (String moduleCmd : moduleCmds) {
-                jobDescriptor.addModuleLoadCommands(moduleCmd);
-            }
-        }
-        List<String> preJobCommands = appDepDescription.getPreJobCommands();
-        if (preJobCommands != null) {
-            for (String preJobCommand : preJobCommands) {
-                jobDescriptor.addPreJobCommand(parseCommand(preJobCommand, jobExecutionContext));
-            }
-        }
-
-        List<String> postJobCommands = appDepDescription.getPostJobCommands();
-        if (postJobCommands != null) {
-            for (String postJobCommand : postJobCommands) {
-                jobDescriptor.addPostJobCommand(parseCommand(postJobCommand, jobExecutionContext));
-            }
-        }
-
-        ApplicationParallelismType parallelism = appDepDescription.getParallelism();
-        if (parallelism != null){
-            if (parallelism == ApplicationParallelismType.MPI || parallelism == ApplicationParallelismType.OPENMP || parallelism == ApplicationParallelismType.OPENMP_MPI){
-                Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
-                if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
-                    for (JobManagerCommand command : jobManagerCommands.keySet()) {
-                        if (command == JobManagerCommand.SUBMISSION) {
-                            String commandVal = jobManagerCommands.get(command);
-                            jobDescriptor.setJobSubmitter(commandVal);
-                        }
-                    }
-                }
-            }
-        }
-        return jobDescriptor;
-    }
-
-    public static boolean isEmailBasedJobMonitor(JobExecutionContext jobExecutionContext) throws AppCatalogException {
-        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
-            String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
-            SSHJobSubmission sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
-            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-            return monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR;
-        } else {
-            return false;
-        }
-    }
-
-    private static int generateJobName() {
-        Random random = new Random();
-        int i = random.nextInt(Integer.MAX_VALUE);
-        i = i + 99999999;
-        if(i<0) {
-            i = i * (-1);
-        }
-        return i;
-    }
-
-    private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
-        String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
-        parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
-        parsedValue = parsedValue.replaceAll("\\$outputDir", jobExecutionContext.getOutputDir());
-        return parsedValue;
-    }
-    /**
-     * This method can be used to set the Security Context if its not set and later use it in other places
-     * @param jobExecutionContext
-     * @param authenticationInfo
-     * @param userName
-     * @param hostName
-     * @param port
-     * @return
-     * @throws GFacException
-     */
-    public static String prepareSecurityContext(JobExecutionContext jobExecutionContext, AuthenticationInfo authenticationInfo
-            , String userName, String hostName, int port) throws GFacException {
-        ServerInfo serverInfo = new ServerInfo(userName, hostName);
-        String key = userName+hostName+port;
-        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
-        if (jobExecutionContext.getSecurityContext(key) == null) {
-            try {
-                GFACSSHUtils.addSecurityContext(jobExecutionContext, sshAuthWrapper);
-            } catch (ApplicationSettingsException e) {
-                logger.error(e.getMessage());
-                try {
-                    StringWriter errors = new StringWriter();
-                    e.printStackTrace(new PrintWriter(errors));
-                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    logger.error(e1.getLocalizedMessage());
-                }
-                throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-            }
-        }
-        return key;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
deleted file mode 100644
index 704528f..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.apache.airavata.gfac.ssh.util;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * To handle outputs of different data types
- * 
- */
-public class HandleOutputs {
-	private static final Logger log = LoggerFactory.getLogger(HandleOutputs.class);
-
-	public static List<OutputDataObjectType> handleOutputs(JobExecutionContext jobExecutionContext, Cluster cluster) throws GFacHandlerException {
-		List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
-		try {
-			String outputDataDir = File.separator + "tmp" + File.separator + jobExecutionContext.getExperimentID();
-			(new File(outputDataDir)).mkdirs();
-
-			List<OutputDataObjectType> outputs = jobExecutionContext.getTaskData().getApplicationOutputs();
-			List<String> outputList = cluster.listDirectory(jobExecutionContext.getWorkingDir());
-			boolean missingOutput = false;
-
-			for (OutputDataObjectType output : outputs) {
-				// FIXME: Validation of outputs based on required and optional and search based on REGEX provided in search.
-
-				if (DataType.URI == output.getType()) {
-                    // for failed jobs outputs are not generated. So we should not download outputs
-                    if (GFacUtils.isFailedJob(jobExecutionContext)){
-                       continue;
-                    }
-					String outputFile = output.getValue();
-					String fileName = outputFile.substring(outputFile.lastIndexOf(File.separatorChar) + 1, outputFile.length());
-
-					if (output.getLocation() == null && !outputList.contains(fileName) && output.isIsRequired()) {
-						missingOutput = true;
-					} else {
-						cluster.scpFrom(outputFile, outputDataDir);
-						String localFile = outputDataDir + File.separator + fileName;
-						jobExecutionContext.addOutputFile(localFile);
-						output.setValue(localFile);
-						outputArray.add(output);
-					}
-
-				} else if (DataType.STDOUT == output.getType()) {
-					String downloadFile = jobExecutionContext.getStandardOutput();
-					String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
-					cluster.scpFrom(downloadFile, outputDataDir);
-					String localFile = outputDataDir + File.separator + fileName;
-					jobExecutionContext.addOutputFile(localFile);
-					jobExecutionContext.setStandardOutput(localFile);
-					output.setValue(localFile);
-					outputArray.add(output);
-
-				} else if (DataType.STDERR == output.getType()) {
-					String downloadFile = jobExecutionContext.getStandardError();
-					String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
-					cluster.scpFrom(downloadFile, outputDataDir);
-					String localFile = outputDataDir + File.separator + fileName;
-					jobExecutionContext.addOutputFile(localFile);
-					jobExecutionContext.setStandardError(localFile);
-					output.setValue(localFile);
-					outputArray.add(output);
-
-				}
-			}
-			if (outputArray == null || outputArray.isEmpty()) {
-				log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
-				if (jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null) {
-					throw new GFacHandlerException("Empty Output returned from the Application, Double check the application"
-							+ "and ApplicationDescriptor output Parameter Names");
-				}
-			}
-
-			if (missingOutput) {
-				String arrayString = Arrays.deepToString(outputArray.toArray());
-				log.error(arrayString);
-				throw new GFacHandlerException("Required output is missing");
-			}
-		} catch (Exception e) {
-			throw new GFacHandlerException(e);
-		}
-		jobExecutionContext.getTaskData().setApplicationOutputs(outputArray);
-		return outputArray;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/resources/errors.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/resources/errors.properties b/modules/gfac/gfac-ssh/src/main/resources/errors.properties
deleted file mode 100644
index 88c41b8..0000000
--- a/modules/gfac/gfac-ssh/src/main/resources/errors.properties
+++ /dev/null
@@ -1,197 +0,0 @@
-#
-#
-# 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.
-#
-
-# Directly copied from jglobus. Not a good way to manager error properties.
-1 = Parameter not supported
-2 = The RSL length is greater than the maximum allowed
-3 = No resources available
-4 = Bad directory specified
-5 = The executable does not exist
-6 = Insufficient funds
-7 = Authentication with the remote server failed
-8 = Job cancelled by user
-9 = Job cancelled by system
-
-10 = Data transfer to the server failed
-11 = The stdin file does not exist
-12 = The connection to the server failed (check host and port)
-13 = The provided RSL 'maxtime' value is invalid (not an integer or must be greater than 0)
-14 = The provided RSL 'count' value is invalid (not an integer or must be greater than 0)
-15 = The job manager received an invalid RSL
-16 = Could not connect to job manager
-17 = The job failed when the job manager attempted to run it
-18 = Paradyn error
-19 = The provided RSL 'jobtype' value is invalid
-
-20 = The provided RSL 'myjob' value is invalid
-21 = The job manager failed to locate an internal script argument file
-22 = The job manager failed to create an internal script argument file
-23 = The job manager detected an invalid job state
-24 = The job manager detected an invalid script response
-25 = The job manager detected an invalid job state
-26 = The provided RSL 'jobtype' value is not supported by this job manager
-27 = Unimplemented
-28 = The job manager failed to create an internal script submission file
-29 = The job manager cannot find the user proxy
-
-30 = The job manager failed to open the user proxy
-31 = The job manager failed to cancel the job as requested
-32 = System memory allocation failed
-33 = The interprocess job communication initialization failed
-34 = The interprocess job communication setup failed
-35 = The provided RSL 'host count' value is invalid
-36 = One of the provided RSL parameters is unsupported
-37 = The provided RSL 'queue' parameter is invalid
-38 = The provided RSL 'project' parameter is invalid
-39 = The provided RSL string includes variables that could not be identified
-
-40 = The provided RSL 'environment' parameter is invalid
-41 = The provided RSL 'dryrun' parameter is invalid
-42 = The provided RSL is invalid (an empty string)
-43 = The job manager failed to stage the executable
-44 = The job manager failed to stage the stdin file
-45 = The requested job manager type is invalid
-46 = The provided RSL 'arguments' parameter is invalid
-47 = The gatekeeper failed to run the job manager
-48 = The provided RSL could not be properly parsed
-49 = There is a version mismatch between GRAM components
-
-50 = The provided RSL 'arguments' parameter is invalid
-51 = The provided RSL 'count' parameter is invalid
-52 = The provided RSL 'directory' parameter is invalid
-53 = The provided RSL 'dryrun' parameter is invalid
-54 = The provided RSL 'environment' parameter is invalid
-55 = The provided RSL 'executable' parameter is invalid
-56 = The provided RSL 'host_count' parameter is invalid
-57 = The provided RSL 'jobtype' parameter is invalid
-58 = The provided RSL 'maxtime' parameter is invalid
-59 = The provided RSL 'myjob' parameter is invalid
-
-60 = The provided RSL 'paradyn' parameter is invalid
-61 = The provided RSL 'project' parameter is invalid
-62 = The provided RSL 'queue' parameter is invalid
-63 = The provided RSL 'stderr' parameter is invalid
-64 = The provided RSL 'stdin' parameter is invalid
-65 = The provided RSL 'stdout' parameter is invalid
-66 = The job manager failed to locate an internal script
-67 = The job manager failed on the system call pipe()
-68 = The job manager failed on the system call fcntl()
-69 = The job manager failed to create the temporary stdout filename
-
-70 = The job manager failed to create the temporary stderr filename
-71 = The job manager failed on the system call fork()
-72 = The executable file permissions do not allow execution
-73 = The job manager failed to open stdout
-74 = The job manager failed to open stderr
-75 = The cache file could not be opened in order to relocate the user proxy
-76 = Cannot access cache files in ~/.globus/.gass_cache, check permissions, quota, and disk space
-77 = The job manager failed to insert the contact in the client contact list
-78 = The contact was not found in the job manager's client contact list
-79 = Connecting to the job manager failed.  Possible reasons: job terminated, invalid job contact, network problems, ...
-
-80 = The syntax of the job contact is invalid
-81 = The executable parameter in the RSL is undefined
-82 = The job manager service is misconfigured.  condor arch undefined
-83 = The job manager service is misconfigured.  condor os undefined
-84 = The provided RSL 'min_memory' parameter is invalid
-85 = The provided RSL 'max_memory' parameter is invalid
-86 = The RSL 'min_memory' value is not zero or greater
-87 = The RSL 'max_memory' value is not zero or greater
-88 = The creation of a HTTP message failed
-89 = Parsing incoming HTTP message failed
-
-90 = The packing of information into a HTTP message failed
-91 = An incoming HTTP message did not contain the expected information
-92 = The job manager does not support the service that the client requested
-93 = The gatekeeper failed to find the requested service
-94 = The jobmanager does not accept any new requests (shutting down)
-95 = The client failed to close the listener associated with the callback URL
-96 = The gatekeeper contact cannot be parsed
-97 = The job manager could not find the 'poe' command
-98 = The job manager could not find the 'mpirun' command
-99 = The provided RSL 'start_time' parameter is invalid"
-100 = The provided RSL 'reservation_handle' parameter is invalid
-
-101 = The provided RSL 'max_wall_time' parameter is invalid
-102 = The RSL 'max_wall_time' value is not zero or greater
-103 = The provided RSL 'max_cpu_time' parameter is invalid
-104 = The RSL 'max_cpu_time' value is not zero or greater
-105 = The job manager is misconfigured, a scheduler script is missing
-106 = The job manager is misconfigured, a scheduler script has invalid permissions
-107 = The job manager failed to signal the job
-108 = The job manager did not recognize/support the signal type
-109 = The job manager failed to get the job id from the local scheduler
-
-110 = The job manager is waiting for a commit signal
-111 = The job manager timed out while waiting for a commit signal
-112 = The provided RSL 'save_state' parameter is invalid
-113 = The provided RSL 'restart' parameter is invalid
-114 = The provided RSL 'two_phase' parameter is invalid
-115 = The RSL 'two_phase' value is not zero or greater
-116 = The provided RSL 'stdout_position' parameter is invalid
-117 = The RSL 'stdout_position' value is not zero or greater
-118 = The provided RSL 'stderr_position' parameter is invalid
-119 = The RSL 'stderr_position' value is not zero or greater
-
-120 = The job manager restart attempt failed
-121 = The job state file doesn't exist
-122 = Could not read the job state file
-123 = Could not write the job state file
-124 = The old job manager is still alive
-125 = The job manager state file TTL expired
-126 = It is unknown if the job was submitted
-127 = The provided RSL 'remote_io_url' parameter is invalid
-128 = Could not write the remote io url file
-129 = The standard output/error size is different
-
-130 = The job manager was sent a stop signal (job is still running)
-131 = The user proxy expired (job is still running)
-132 = The job was not submitted by original jobmanager
-133 = The job manager is not waiting for that commit signal
-134 = The provided RSL scheduler specific parameter is invalid
-135 = The job manager could not stage in a file
-136 = The scratch directory could not be created
-137 = The provided 'gass_cache' parameter is invalid
-138 = The RSL contains attributes which are not valid for job submission
-139 = The RSL contains attributes which are not valid for stdio update
-
-140 = The RSL contains attributes which are not valid for job restart
-141 = The provided RSL 'file_stage_in' parameter is invalid
-142 = The provided RSL 'file_stage_in_shared' parameter is invalid
-143 = The provided RSL 'file_stage_out' parameter is invalid
-144 = The provided RSL 'gass_cache' parameter is invalid
-145 = The provided RSL 'file_cleanup' parameter is invalid
-146 = The provided RSL 'scratch_dir' parameter is invalid
-147 = The provided scheduler-specific RSL parameter is invalid
-148 = A required RSL attribute was not defined in the RSL spec
-149 = The gass_cache attribute points to an invalid cache directory
-
-150 = The provided RSL 'save_state' parameter has an invalid value
-151 = The job manager could not open the RSL attribute validation file
-152 = The  job manager could not read the RSL attribute validation file
-153 = The provided RSL 'proxy_timeout' is invalid
-154 = The RSL 'proxy_timeout' value is not greater than zero
-155 = The job manager could not stage out a file
-156 = The job contact string does not match any which the job manager is handling
-157 = Proxy delegation failed
-158 = The job manager could not lock the state lock file
-
-1000 = Failed to start up callback handler
-1003 = Job contact not set

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/resources/service.properties b/modules/gfac/gfac-ssh/src/main/resources/service.properties
deleted file mode 100644
index 391bfea..0000000
--- a/modules/gfac/gfac-ssh/src/main/resources/service.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-#
-# 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.
-#
-#
-
-
-#
-# Class which implemented Scheduler interface. It will be used to determine a Provider
-#
-scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# SSH private key location. It will be used by SSHProvider
-#
-# ssh.key=/home/user/.ssh/id_rsa
-# ssh.keypass=
-# ssh.username=usernameAtHost
-
-#
-# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
-#
-# myproxy.server=myproxy.teragrid.org
-# myproxy.user=username
-# myproxy.pass=password
-# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
deleted file mode 100644
index c65f386..0000000
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ /dev/null
@@ -1,252 +0,0 @@
-///*
-// *
-// * 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.core.gfac.services.impl;
-//
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.gfac.GFacConfiguration;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.SecurityContext;
-//import org.apache.airavata.gfac.core.context.ApplicationContext;
-//import org.apache.airavata.gfac.core.context.JobExecutionContext;
-//import org.apache.airavata.gfac.core.context.MessageContext;
-//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-//import org.apache.airavata.gsi.ssh.api.Cluster;
-//import org.apache.airavata.gsi.ssh.api.SSHApiException;
-//import org.apache.airavata.gsi.ssh.api.ServerInfo;
-//import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-//import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-//import org.apache.airavata.gsi.ssh.util.CommonUtils;
-//import org.apache.airavata.model.workspace.experiment.TaskDetails;
-//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-//import org.apache.airavata.schemas.gfac.*;
-//import org.testng.annotations.BeforeClass;
-//import org.testng.annotations.Test;
-//
-//import java.io.File;
-//import java.net.URL;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.UUID;
-//
-//public class BigRed2TestWithSSHAuth {
-//    private JobExecutionContext jobExecutionContext;
-//
-//    private String userName;
-//    private String password;
-//    private String passPhrase;
-//    private String hostName;
-//    private String workingDirectory;
-//    private String privateKeyPath;
-//    private String publicKeyPath;
-//
-//    @BeforeClass
-//    public void setUp() throws Exception {
-//
-//        System.out.println("Test case name " + this.getClass().getName());
-////        System.setProperty("ssh.host","bigred2.uits.iu.edu");        //default ssh host
-////        System.setProperty("ssh.user", "lginnali");
-////        System.setProperty("ssh.private.key.path", "/Users/lahirugunathilake/.ssh/id_dsa");
-////        System.setProperty("ssh.public.key.path", "/Users/lahirugunathilake/.ssh/id_dsa.pub");
-////        System.setProperty("ssh.working.directory", "/tmp");
-//
-//        this.hostName = "bigred2.uits.iu.edu";
-//        this.hostName = System.getProperty("ssh.host");
-//        this.userName = System.getProperty("ssh.username");
-//        this.password = System.getProperty("ssh.password");
-//        this.privateKeyPath = System.getProperty("private.ssh.key");
-//        this.publicKeyPath = System.getProperty("public.ssh.key");
-//        this.passPhrase = System.getProperty("ssh.keypass");
-//        this.workingDirectory = System.getProperty("ssh.working.directory");
-//
-//
-//         if (this.userName == null
-//                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
-//            System.out.println("########### In order to test you have to either username password or private,public keys");
-//            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
-//                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
-//        }
-//        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        assert resource != null;
-//        System.out.println(resource.getFile());
-//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
-//
-////        gFacConfiguration.setMyProxyLifeCycle(3600);
-////        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
-////        gFacConfiguration.setMyProxyUser("*****");
-////        gFacConfiguration.setMyProxyPassphrase("*****");
-////        gFacConfiguration.setTrustedCertLocation("./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"}));
-//
-//        /*
-//        * Host
-//        */
-//        HostDescription host = new HostDescription(SSHHostType.type);
-//        host.getType().setHostAddress(hostName);
-//        host.getType().setHostName(hostName);
-//        ((SSHHostType)host.getType()).setHpcResource(true);
-//        /*
-//        * App
-//        */
-//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
-//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
-//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//        name.setStringValue("EchoLocal");
-//        app.setApplicationName(name);
-//
-//        app.setCpuCount(1);
-//        app.setJobType(JobTypeType.SERIAL);
-//        app.setNodeCount(1);
-//        app.setProcessorsPerNode(1);
-//
-//        /*
-//        * Use bat file if it is compiled on Windows
-//        */
-//        app.setExecutableLocation("/bin/echo");
-//
-//        /*
-//        * Default tmp location
-//        */
-//        String tempDir = "/tmp";
-//        String date = (new Date()).toString();
-//        date = date.replaceAll(" ", "_");
-//        date = date.replaceAll(":", "_");
-//
-//        tempDir = tempDir + File.separator
-//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
-//
-//        System.out.println(tempDir);
-//        app.setScratchWorkingDirectory(tempDir);
-//        app.setStaticWorkingDirectory(tempDir);
-//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
-//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
-//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
-//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
-//        app.setMaxWallTime(5);
-//        app.setJobSubmitterCommand("aprun -n 1");
-//        app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
-//
-//        /*
-//        * Service
-//        */
-//        ServiceDescription serv = new ServiceDescription();
-//        serv.getType().setName("SimpleEcho");
-//
-//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-//
-//        InputParameterType input = InputParameterType.Factory.newInstance();
-//        input.setParameterName("echo_input");
-//        input.setParameterType(StringParameterType.Factory.newInstance());
-//        inputList.add(input);
-//
-//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-//
-//                .size()]);
-//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//        OutputParameterType output = OutputParameterType.Factory.newInstance();
-//        output.setParameterName("echo_output");
-//        output.setParameterType(StringParameterType.Factory.newInstance());
-//        outputList.add(output);
-//
-//        OutputParameterType[] outputParamList = outputList
-//                .toArray(new OutputParameterType[outputList.size()]);
-//
-//        serv.getType().setInputParametersArray(inputParamList);
-//        serv.getType().setOutputParametersArray(outputParamList);
-//
-//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
-//        // Adding security context
-//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
-//        ApplicationContext applicationContext = new ApplicationContext();
-//        jobExecutionContext.setApplicationContext(applicationContext);
-//        applicationContext.setServiceDescription(serv);
-//        applicationContext.setApplicationDeploymentDescription(appDesc);
-//        applicationContext.setHostDescription(host);
-//
-//        MessageContext inMessage = new MessageContext();
-//        ActualParameter echo_input = new ActualParameter();
-//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-//        inMessage.addParameter("echo_input", echo_input);
-//
-//
-//        jobExecutionContext.setInMessageContext(inMessage);
-//
-//        MessageContext outMessage = new MessageContext();
-//        ActualParameter echo_out = new ActualParameter();
-////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-//        outMessage.addParameter("echo_output", echo_out);
-//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
-//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
-//        jobExecutionContext.setOutMessageContext(outMessage);
-//
-//    }
-//
-//
-//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
-//         try {
-//
-//        AuthenticationInfo authenticationInfo = null;
-//        if (password != null) {
-//            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-//        } else {
-//            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-//                    this.passPhrase);
-//        }
-//        // Server info
-//        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-//
-//        Cluster pbsCluster = null;
-//        SSHSecurityContext sshSecurityContext = null;
-//
-//            JobManagerConfiguration pbsJobManager = CommonUtils.getPBSJobManager(app.getInstalledParentPath());
-//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, pbsJobManager);
-//
-//
-//            sshSecurityContext = new SSHSecurityContext();
-//            sshSecurityContext.setPbsCluster(pbsCluster);
-//            sshSecurityContext.setUsername(userName);
-//            sshSecurityContext.setKeyPass(passPhrase);
-//            sshSecurityContext.setPrivateKeyLoc(privateKeyPath);
-//             return sshSecurityContext;
-//        } catch (SSHApiException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        }
-//        return null;
-//    }
-//
-//    @Test
-//    public void testSSHProvider() throws GFacException {
-//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
-//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
deleted file mode 100644
index d42ea52..0000000
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-///*
-// *
-// * 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.core.gfac.services.impl;
-//
-//import junit.framework.Assert;
-//import org.apache.airavata.client.AiravataAPIFactory;
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.common.exception.AiravataConfigurationException;
-//import org.apache.airavata.common.exception.ApplicationSettingsException;
-//import org.apache.airavata.common.utils.ClientSettings;
-//import org.apache.airavata.common.utils.DBUtil;
-//import org.apache.airavata.common.utils.ServerSettings;
-//import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
-//import org.apache.airavata.credential.store.store.CredentialReader;
-//import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.RequestData;
-//import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
-//import org.apache.airavata.gsi.ssh.api.SSHApiException;
-//import org.apache.airavata.gsi.ssh.api.ServerInfo;
-//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-//import org.apache.airavata.gsi.ssh.util.CommonUtils;
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-//import org.apache.airavata.registry.api.AiravataRegistryFactory;
-//import org.apache.airavata.registry.api.AiravataUser;
-//import org.apache.airavata.registry.api.Gateway;
-//import org.apache.airavata.registry.api.exception.RegAccessorInstantiateException;
-//import org.apache.airavata.registry.api.exception.RegAccessorInvalidException;
-//import org.apache.airavata.registry.api.exception.RegAccessorUndefinedException;
-//import org.apache.airavata.registry.api.exception.RegException;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.testng.annotations.BeforeTest;
-//import org.testng.annotations.Test;
-//
-//import java.util.UUID;
-//
-//public class CredentialStoreTest {
-//    private final static Logger logger = LoggerFactory.getLogger(CredentialStoreTest.class);
-//
-//    @BeforeTest
-//    public void testGSISSHProvider() throws GFacException, IllegalAccessException, ClassNotFoundException, InstantiationException, ApplicationSettingsException, SSHApiException {
-//        System.setProperty("credential.store.keystore.url", "/Users/lahirugunathilake/Downloads/airavata_sym.jks");
-//        System.setProperty("credential.store.keystore.alias", "airavata");
-//        System.setProperty("credential.store.keystore.password", "airavata");
-//        System.setProperty("myproxy.username", "ogce");
-//        System.setProperty("myproxy.password", "");
-//        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
-//        System.setProperty("credential.store.jdbc.url","jdbc:mysql://gw85.iu.xsede.org:3306/airavata_gta_prod");
-//        System.setProperty("credential.store.jdbc.user","gtaAiravataUser");
-//        System.setProperty("credential.store.jdbc.password","gtaAiravataPWD");
-//        System.setProperty("credential.store.jdbc.driver","com.mysql.jdbc.Driver");
-//
-//
-//
-//            UUID uuid = UUID.randomUUID();
-//            System.out.println("TokenId: " + uuid.toString());
-////            String publicKey = registry.createCredential("default",uuid.toString(),"lginnali" );
-////            System.out.println("Public-Key: " +publicKey);
-////            String tokenId = uuid.toString();
-//            String tokenId = "2c308fa9-99f8-4baa-92e4-d062e311483c";
-//            CredentialReader credentialReader = new CredentialReaderImpl(new DBUtil("jdbc:mysql://gw85.iu.xsede.org:3306/airavata_gta_prod",
-//                    "ptaAiravataUser", "ptaAiravataPWD", "com.mysql.jdbc.Driver"));
-//
-//
-//            RequestData requestData = new RequestData();
-//            requestData.setMyProxyUserName("cgateway");
-//            requestData.setTokenId(tokenId);
-//            requestData.setGatewayId("default");
-//            TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(credentialReader, requestData);
-//
-//            SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();
-//            ServerInfo serverInfo = new ServerInfo("cgateway", "bigred2.uits.iu.edu");
-//
-//            PBSCluster pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-//            Assert.assertNotNull(pbsCluster);
-//            return;
-//
-//    }
-//
-//    @Test
-//    public static void main(String[] args) {
-//        try {
-//            new CredentialStoreTest().testGSISSHProvider();
-//        } catch (GFacException e) {
-//            e.printStackTrace();
-//        } catch (IllegalAccessException e) {
-//            e.printStackTrace();
-//        } catch (ClassNotFoundException e) {
-//            e.printStackTrace();
-//        } catch (InstantiationException e) {
-//            e.printStackTrace();
-//        } catch (ApplicationSettingsException e) {
-//            e.printStackTrace();
-//        } catch (SSHApiException e) {
-//            e.printStackTrace();
-//        }
-//    }
-//
-//    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
-//        AiravataAPI airavataAPI;
-//        try {
-//            String sysUser = ClientSettings.getSetting("admin");
-//            String gateway = ClientSettings.getSetting("default");
-//            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
-//        } catch (AiravataAPIInvocationException e) {
-//            logger.error("Unable to create airavata API", e.getMessage());
-//            throw new AiravataAPIInvocationException(e);
-//        } catch (ApplicationSettingsException e) {
-//            logger.error("Unable to create airavata API", e.getMessage());
-//            throw new ApplicationSettingsException(e.getMessage());
-//        }
-//        return airavataAPI;
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
deleted file mode 100644
index b115b6c..0000000
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ /dev/null
@@ -1,172 +0,0 @@
-///*
-// *
-// * 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.core.gfac.services.impl;
-//
-//import java.io.File;
-//import java.net.URL;
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.UUID;
-//
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.commons.gfac.type.MappingFactory;
-//import org.apache.airavata.commons.gfac.type.ServiceDescription;
-//import org.apache.airavata.gfac.GFacConfiguration;
-//import org.apache.airavata.gfac.GFacException;
-//import org.apache.airavata.gfac.core.context.ApplicationContext;
-//import org.apache.airavata.gfac.core.context.JobExecutionContext;
-//import org.apache.airavata.gfac.core.context.MessageContext;
-//import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-//import org.apache.airavata.schemas.gfac.InputParameterType;
-//import org.apache.airavata.schemas.gfac.OutputParameterType;
-//import org.apache.airavata.schemas.gfac.SSHHostType;
-//import org.apache.airavata.schemas.gfac.StringParameterType;
-//import org.apache.commons.lang.SystemUtils;
-//import org.junit.Assert;
-//import org.junit.Before;
-//import org.junit.Test;
-//
-//public class SSHProviderTestWithSSHAuth {
-//	private JobExecutionContext jobExecutionContext;
-//    @Before
-//    public void setUp() throws Exception {
-//
-//    	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
-////        gFacConfiguration.s
-//        //have to set InFlwo Handlers and outFlowHandlers
-//        ApplicationContext applicationContext = new ApplicationContext();
-//        HostDescription host = new HostDescription(SSHHostType.type);
-//        host.getType().setHostName("bigred");
-//        host.getType().setHostAddress("bigred2.uits.iu.edu");
-//        applicationContext.setHostDescription(host);
-//        /*
-//           * App
-//           */
-//        ApplicationDescription appDesc = new ApplicationDescription();
-//        ApplicationDeploymentDescriptionType app = appDesc.getType();
-//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
-//        name.setStringValue("EchoSSH");
-//        app.setApplicationName(name);
-//
-//        /*
-//           * Use bat file if it is compiled on Windows
-//           */
-//        if (SystemUtils.IS_OS_WINDOWS) {
-//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
-//            app.setExecutableLocation(url.getFile());
-//        } else {
-//            //for unix and Mac
-//            app.setExecutableLocation("/bin/echo");
-//        }
-//
-//        /*
-//         * Job location
-//        */
-//        String tempDir = "/tmp";
-//        String date = (new Date()).toString();
-//        date = date.replaceAll(" ", "_");
-//        date = date.replaceAll(":", "_");
-//
-//        tempDir = tempDir + File.separator
-//                + "EchoSSH" + "_" + date + "_" + UUID.randomUUID();
-//
-//        app.setScratchWorkingDirectory(tempDir);
-//        app.setStaticWorkingDirectory(tempDir);
-//        app.setInputDataDirectory(tempDir + File.separator + "input");
-//        app.setOutputDataDirectory(tempDir + File.separator + "output");
-//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
-//        app.setStandardError(tempDir + File.separator + "echo.stderr");
-//
-//        applicationContext.setApplicationDeploymentDescription(appDesc);
-//
-//        /*
-//           * Service
-//           */
-//        ServiceDescription serv = new ServiceDescription();
-//        serv.getType().setName("EchoSSH");
-//
-//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-//        InputParameterType input = InputParameterType.Factory.newInstance();
-//        input.setParameterName("echo_input");
-//        input.setParameterType(StringParameterType.Factory.newInstance());
-//        inputList.add(input);
-//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
-//                .size()]);
-//
-//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-//        OutputParameterType output = OutputParameterType.Factory.newInstance();
-//        output.setParameterName("echo_output");
-//        output.setParameterType(StringParameterType.Factory.newInstance());
-//        outputList.add(output);
-//        OutputParameterType[] outputParamList = outputList
-//                .toArray(new OutputParameterType[outputList.size()]);
-//
-//        serv.getType().setInputParametersArray(inputParamList);
-//        serv.getType().setOutputParametersArray(outputParamList);
-//
-//        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
-//        jobExecutionContext.setApplicationContext(applicationContext);
-//
-//        // Add security context
-//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext());
-//        /*
-//        * Host
-//        */
-//        applicationContext.setServiceDescription(serv);
-//
-//        MessageContext inMessage = new MessageContext();
-//        ActualParameter echo_input = new ActualParameter();
-//		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-//        inMessage.addParameter("echo_input", echo_input);
-//
-//        jobExecutionContext.setInMessageContext(inMessage);
-//
-//        MessageContext outMessage = new MessageContext();
-//        ActualParameter echo_out = new ActualParameter();
-////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
-//        outMessage.addParameter("echo_output", echo_out);
-//
-//        jobExecutionContext.setOutMessageContext(outMessage);
-//
-//    }
-//
-//	private SSHSecurityContext getSecurityContext() {
-//		SSHSecurityContext context = new SSHSecurityContext();
-//        context.setUsername("lginnali");
-//        context.setPrivateKeyLoc("~/.ssh/id_dsa");
-//        context.setKeyPass("i want to be free");
-//		return context;
-//	}
-//
-//    @Test
-//    public void testLocalProvider() throws GFacException {
-//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-//        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
-//        Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-ssh/src/test/resources/PBSTemplate.xslt
deleted file mode 100644
index cf8dfb6..0000000
--- a/modules/gfac/gfac-ssh/src/test/resources/PBSTemplate.xslt
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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. -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
-<xsl:output method="text" />
-<xsl:template match="/ns:JobDescriptor">
-#! /bin/sh
-# PBS batch job submission script generated by Apache Airavata
-#   <xsl:choose>
-    <xsl:when test="ns:shellName">
-##PBS -S <xsl:value-of select="ns:shellName"/>
-    </xsl:when></xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:queueName">
-#PBS -q <xsl:value-of select="ns:queueName"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:mailOptions">
-#PBS -m <xsl:value-of select="ns:mailOptions"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-<xsl:when test="ns:acountString">
-#PBS -A <xsl:value-of select="ns:acountString"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:maxWallTime">
-#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -o <xsl:value-of select="ns:standardOutFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
-#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
-<xsl:text>&#xa;</xsl:text>
-    </xsl:when>
-    </xsl:choose>
-<xsl:for-each select="ns:exports/ns:name">
-<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
-export<xsl:text>   </xsl:text><xsl:value-of select="."/>
-<xsl:text>&#xa;</xsl:text>
-</xsl:for-each>
-<xsl:for-each select="ns:preJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
-    <xsl:choose><xsl:when test="ns:jobSubmitterCommand != ''">
-<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text>
-<xsl:value-of select="ns:cpuCount"/><xsl:text>   </xsl:text>
-    </xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
-<xsl:for-each select="ns:inputs/ns:input">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-<xsl:for-each select="ns:postJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-</xsl:for-each>
-
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/resources/logging.properties b/modules/gfac/gfac-ssh/src/test/resources/logging.properties
deleted file mode 100644
index 0584d38..0000000
--- a/modules/gfac/gfac-ssh/src/test/resources/logging.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-#
-#default/fallback log4j configuration
-#
-
-# Set root logger level to WARN and its only appender to A1.
-log4j.rootLogger=INFO, A1, A2
-
-# A1 is set to be a rolling file appender with default params
-log4j.appender.A1=org.apache.log4j.RollingFileAppender
-log4j.appender.A1.File=target/seclogs.txt
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
-
-# A2 is a console appender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
-
-log4j.logger.unicore.security=INFO
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/pom.xml b/modules/gfac/pom.xml
index 7f661ae..0414afc 100644
--- a/modules/gfac/pom.xml
+++ b/modules/gfac/pom.xml
@@ -31,14 +31,11 @@
                 <activeByDefault>true</activeByDefault>
             </activation>
             <modules>
+                <module>gfac-service</module>
+                <module>gfac-client</module>
                 <module>gfac-core</module>
-                <module>gfac-ssh</module>
-                <module>gfac-local</module>
-                <module>gfac-gsissh</module>
+                <module>gfac-impl</module>
                 <module>gfac-bes</module>
-                <module>gfac-monitor</module>
-                <module>airavata-gfac-service</module>
-                <module>airavata-gfac-stubs</module>
                 <module>gfac-application-specific-handlers</module>
             </modules>
         </profile>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
index e93ae71..e506556 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
@@ -21,24 +21,17 @@
 package org.apache.airavata.orchestrator.core.impl;
 
 
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.gfac.client.GFACInstance;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFac;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.eventbus.EventBus;
-
-import java.io.IOException;
-
 /**
  * This is the simplest implementation for JobSubmitter,
  * This is calling gfac invocation methods to invoke the gfac embedded mode,so this does not really implement
@@ -54,7 +47,6 @@ public class GFACEmbeddedJobSubmitter implements JobSubmitter {
 
     public void initialize(OrchestratorContext orchestratorContext) throws OrchestratorException {
         this.orchestratorContext = orchestratorContext;
-        gfac = BetterGfacImpl.getInstance();
     }
 
     public GFACInstance selectGFACInstance() throws OrchestratorException {


[60/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/resources/NOTICE b/modules/distribution/client/java/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/client/java/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/resources/README b/modules/distribution/client/java/src/main/resources/README
deleted file mode 100644
index 4ed133e..0000000
--- a/modules/distribution/client/java/src/main/resources/README
+++ /dev/null
@@ -1,53 +0,0 @@
-Apache Airavata Client - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration. Airavata bundles a server package,
-a client API to access the server and a general purpose GUI XBaya as a application registration, workflow
-construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
-produced data.  
-
-Contact
-========
-For additional information about Apache Airavata, please contact the user or dev mailing lists:
-http://airavata.apache.org/community/mailing-lists.html
-
-Airavata Client Distribution
-============================
-
-This distribution is a set of libraries and configurations files that allow a 3rd party
-application to programmatically access Airavata functionality through Airavata API.
-
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended.
-
-* Airavata API Server
-  This is the server that contains Airavata API Server.
-
-* Airavata Orchestrator Server
-  This is the stand-alone orchestrator server
-
-* Airavata GFac Server
-  This is the standalone GFac Server
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata Client
-  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically
-  access Airavata functionality through Airavata API.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/pom.xml b/modules/distribution/client/pom.xml
deleted file mode 100644
index 9757d44..0000000
--- a/modules/distribution/client/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>distribution</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-client-parent</artifactId>
-    <name>Airavata Client Distribution Parent</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-    <profiles>
-        <profile>
-            <id>default</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-                <module>java</module>
-            </modules>
-        </profile>
-    </profiles>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/pom.xml b/modules/distribution/gfac-server/pom.xml
deleted file mode 100644
index 6e80212..0000000
--- a/modules/distribution/gfac-server/pom.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>distribution</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apache-gfac-server</artifactId>
-    <name>Airavata GFAC distribution</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <build>
-        <plugins>
-			<plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.8</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.airavata</groupId>
-                                    <artifactId>airavata-server-configuration</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>jar</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <!--includes>**/*.war</includes-->
-                            <outputDirectory>${project.build.directory}/conf</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.gmaven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <version>1.4</version>
-                <executions>
-                    <execution>
-                        <id>generate-timestamp</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>execute</goal>
-                        </goals>
-                        <configuration>
-                            <source>
-                                import java.util.Date
-                                import java.text.MessageFormat
-                                project.properties['buildTimestamp'] =
-                                MessageFormat.format("{0,date,dd-MM-yyyy}", new
-                                Date())
-                            </source>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>distribution-package</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <finalName>${archieve.name}-${project.version}</finalName>
-                            <descriptors>
-                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-                                <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
-                            </descriptors>
-                            <attach>false</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-           
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>attach-artifacts</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>${airavata.bin.zip}</file>
-                                    <type>zip</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>${airavata.bin.tar.gz}</file>
-                                    <type>tar.gz</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-   	   <dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-standalone-server</artifactId>
-			<version>${project.version}</version>
-	   </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-impl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-service</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-application-specific-handlers</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <archieve.name>apache-gfac-server</archieve.name>
-        <airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
-        <airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
-        <airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
-        <airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/assembly/bin-assembly.xml b/modules/distribution/gfac-server/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index 5f55e4e..0000000
--- a/modules/distribution/gfac-server/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<!--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. -->
-
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<fileSets>
-
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** copy database scripts ********************** -->
-		<fileSet>
-			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../registry/airavata-jpa-registry/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../app-catalog/app-catalog-data/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-				<include>logo.txt</include>
-				<include>startNetworkServer</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>airavata-server.properties</include>
-				<include>registry.properties</include>
-				<include>log4j.properties</include>
-				<include>gfac-config.xml</include>
-				<include>PBSTemplate.xslt</include>
-				<include>SLURMTemplate.xslt</include>
-				<include>UGETemplate.xslt</include>
-				<include>gsissh.properties</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
-			********************** -->
-		<fileSet>
-			<directory>src/main/resources/axis2-standalone-bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-		<fileSet>
-			<directory>src/main/resources/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>**/*</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy samples ********************** -->
-		<fileSet>
-			<directory>${project.build.directory}/samples/applications
-			</directory>
-			<outputDirectory>samples</outputDirectory>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
-			</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-		 	<includes>
-				<include>*:*:jar</include>
-            </includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/assembly/src-assembly.xml b/modules/distribution/gfac-server/src/main/assembly/src-assembly.xml
deleted file mode 100644
index 6a093ed..0000000
--- a/modules/distribution/gfac-server/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/INSTALL b/modules/distribution/gfac-server/src/main/resources/INSTALL
deleted file mode 100644
index 0324e61..0000000
--- a/modules/distribution/gfac-server/src/main/resources/INSTALL
+++ /dev/null
@@ -1,55 +0,0 @@
-Installing  Apache Airavata 0.11
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or check out from svn.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* The compressed binary distribution is created at <PROJECT DIR>/modules/distribution/airavata-server/target/apache-airavata-server-<airavata-version>-bin.zip
-
-Installing the Airavata Server
-------------------------------
-No installation is necessary. Just extract the compressed distribution.
-Note: For customizing the default configurations of the Airavata Server please 
-      refer to Airavata web-site (http://airavata.apache.org/) and/or Airavata 
-      mailing lists (http://airavata.apache.org/community/mailing-lists.html)
-
-Starting Apache Airavata Server
--------------------------------
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh airavata-server.sh
-	Windows
-		> airavata-server.bat
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Starting Apache Derby Server
--------------------------------
-Users have the option to star the derby server separately
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh derby.sh
-	Windows
-		<Not supported in this version>
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Running Tests
--------------
-Once the binary is unzipped, instructions to run the tests should be followed from README
-
-Tutorials 
-----------
-The airavata website has instructions for basic tutorials:
-* For basic understanding of how Airavata works - http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* Describing and executing applications using Airavata - http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-* Advanced tutorial to provide understanding of how to run sample workflows distributed with Airavata - http://airavata.apache.org/documentation/tutorials/advanced-workflow-samples.html


[64/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly


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

Branch: refs/heads/master
Commit: 8c4ea1f0f53027c79eb4d54d08cbca2cea737ac1
Parents: 19afc7e
Author: Suresh Marru <sm...@apache.org>
Authored: Wed Jun 3 22:00:38 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Wed Jun 3 22:00:38 2015 -0400

----------------------------------------------------------------------
 modules/distribution/api-server/pom.xml         |  152 --
 .../src/main/assembly/bin-assembly.xml          |  123 -
 .../src/main/assembly/src-assembly.xml          |   74 -
 .../api-server/src/main/resources/INSTALL       |   55 -
 .../api-server/src/main/resources/LICENSE       | 2387 ------------------
 .../api-server/src/main/resources/NOTICE        |  163 --
 .../api-server/src/main/resources/README        |  121 -
 .../src/main/resources/bin/api-server.sh        |  118 -
 .../api-server/src/main/resources/bin/logo.txt  |   34 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../api-server/src/main/resources/bin/setenv.sh |   77 -
 modules/distribution/client/java/pom.xml        |  162 --
 .../java/src/main/assembly/bin-assembly.xml     |  166 --
 .../java/src/main/assembly/src-assembly.xml     |   75 -
 .../client/java/src/main/resources/LICENSE      | 2272 -----------------
 .../client/java/src/main/resources/NOTICE       |  163 --
 .../client/java/src/main/resources/README       |   53 -
 modules/distribution/client/pom.xml             |   39 -
 modules/distribution/gfac-server/pom.xml        |  167 --
 .../src/main/assembly/bin-assembly.xml          |  176 --
 .../src/main/assembly/src-assembly.xml          |   75 -
 .../gfac-server/src/main/resources/INSTALL      |   55 -
 .../gfac-server/src/main/resources/LICENSE      | 2387 ------------------
 .../gfac-server/src/main/resources/NOTICE       |  163 --
 .../gfac-server/src/main/resources/README       |  121 -
 .../src/main/resources/bin/gfac-server.sh       |  118 -
 .../gfac-server/src/main/resources/bin/logo.txt |   34 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../src/main/resources/bin/setenv.sh            |   77 -
 modules/distribution/new-dist/pom.xml           |   99 -
 .../main/assembly/airavata-common-component.xml |  100 -
 .../src/main/assembly/api-server-assembly.xml   |   39 -
 .../src/main/assembly/api-server-component.xml  |   35 -
 .../new-dist/src/main/assembly/src-assembly.xml |   75 -
 .../new-dist/src/main/resources/INSTALL         |   30 -
 .../new-dist/src/main/resources/LICENSE         | 2387 ------------------
 .../new-dist/src/main/resources/NOTICE          |  163 --
 .../new-dist/src/main/resources/README          |  145 --
 .../src/main/resources/bin/airavata-server.bat  |   55 -
 .../src/main/resources/bin/airavata-server.sh   |  118 -
 .../new-dist/src/main/resources/bin/derby.sh    |   23 -
 .../new-dist/src/main/resources/bin/logo.txt    |   34 -
 .../new-dist/src/main/resources/bin/setenv.bat  |   43 -
 .../new-dist/src/main/resources/bin/setenv.sh   |   77 -
 .../src/main/resources/bin/startNetworkServer   |  189 --
 .../main/resources/samples/registerSample.sh    |   25 -
 .../src/main/resources/samples/scripts/add.sh   |   21 -
 .../src/main/resources/samples/scripts/echo.sh  |   22 -
 .../main/resources/samples/scripts/multiply.sh  |   22 -
 .../main/resources/samples/scripts/subtract.sh  |   22 -
 .../distribution/orchestrator-server/pom.xml    |  155 --
 .../src/main/assembly/bin-assembly.xml          |  146 --
 .../src/main/assembly/src-assembly.xml          |   75 -
 .../src/main/resources/INSTALL                  |   55 -
 .../src/main/resources/LICENSE                  | 2387 ------------------
 .../src/main/resources/NOTICE                   |  163 --
 .../src/main/resources/README                   |  121 -
 .../src/main/resources/bin/logo.txt             |   34 -
 .../main/resources/bin/orchestrator-server.sh   |  118 -
 .../src/main/resources/bin/setenv.bat           |   43 -
 .../src/main/resources/bin/setenv.sh            |   77 -
 modules/distribution/pom.xml                    |   46 -
 modules/distribution/release/pom.xml            |  117 -
 modules/distribution/server/pom.xml             |  587 -----
 .../server/src/main/assembly/bin-assembly.xml   |  189 --
 .../server/src/main/assembly/src-assembly.xml   |   75 -
 .../server/src/main/resources/INSTALL           |   30 -
 .../server/src/main/resources/LICENSE           | 2387 ------------------
 .../server/src/main/resources/NOTICE            |  163 --
 .../server/src/main/resources/README            |  145 --
 .../src/main/resources/bin/airavata-server.bat  |   55 -
 .../src/main/resources/bin/airavata-server.sh   |  118 -
 .../server/src/main/resources/bin/api-server.sh |  118 -
 .../server/src/main/resources/bin/derby.sh      |   23 -
 .../src/main/resources/bin/gfac-server.sh       |  118 -
 .../server/src/main/resources/bin/logo.txt      |   34 -
 .../main/resources/bin/orchestrator-server.sh   |  118 -
 .../server/src/main/resources/bin/setenv.bat    |   43 -
 .../server/src/main/resources/bin/setenv.sh     |   77 -
 .../src/main/resources/bin/startNetworkServer   |  189 --
 .../src/main/resources/bin/workflow-server.sh   |  118 -
 .../main/resources/samples/registerSample.sh    |   25 -
 .../src/main/resources/samples/scripts/add.sh   |   21 -
 .../src/main/resources/samples/scripts/echo.sh  |   22 -
 .../main/resources/samples/scripts/multiply.sh  |   22 -
 .../main/resources/samples/scripts/subtract.sh  |   22 -
 modules/distribution/xbaya-gui/pom.xml          |  239 --
 .../src/main/assembly/bin-assembly.xml          |  101 -
 .../airavata/distribution/xbaya/jnlp/Main.java  |  156 --
 .../xbaya-gui/src/main/resources/INSTALL        |   44 -
 .../xbaya-gui/src/main/resources/LICENSE        | 2273 -----------------
 .../xbaya-gui/src/main/resources/NOTICE         |  163 --
 .../xbaya-gui/src/main/resources/README         |  101 -
 .../src/main/resources/airavata-logo.gif        |  Bin 13895 -> 0 bytes
 .../xbaya-gui/src/main/resources/bin/setenv.bat |   42 -
 .../xbaya-gui/src/main/resources/bin/setenv.sh  |   77 -
 .../src/main/resources/bin/xbaya-gui.bat        |   23 -
 .../src/main/resources/bin/xbaya-gui.sh         |   22 -
 .../src/main/resources/conf/log4j.properties    |   40 -
 .../xbaya-gui/src/main/resources/jnlp/INSTALL   |   48 -
 .../xbaya-gui/src/main/resources/jnlp/LICENSE   | 2272 -----------------
 .../xbaya-gui/src/main/resources/jnlp/NOTICE    |  163 --
 .../xbaya-gui/src/main/resources/jnlp/README    |   91 -
 .../src/main/resources/jnlp/xbaya.jnlp          |   42 -
 .../xbaya-gui/src/main/resources/xbaya.jks      |  Bin 2234 -> 0 bytes
 pom.xml                                         |    2 -
 106 files changed, 27552 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/pom.xml b/modules/distribution/api-server/pom.xml
deleted file mode 100644
index e390f5e..0000000
--- a/modules/distribution/api-server/pom.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>distribution</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apache-api-server</artifactId>
-    <name>API server distribution</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <build>
-        <plugins>
-	<plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.8</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.airavata</groupId>
-                                    <artifactId>airavata-server-configuration</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>jar</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <!--includes>**/*.war</includes-->
-                            <outputDirectory>${project.build.directory}/conf</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.gmaven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <version>1.4</version>
-                <executions>
-                    <execution>
-                        <id>generate-timestamp</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>execute</goal>
-                        </goals>
-                        <configuration>
-                            <source>
-                                import java.util.Date
-                                import java.text.MessageFormat
-                                project.properties['buildTimestamp'] =
-                                MessageFormat.format("{0,date,dd-MM-yyyy}", new
-                                Date())
-                            </source>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>distribution-package</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <finalName>${archieve.name}-${project.version}</finalName>
-                            <descriptors>
-                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-                                <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
-                            </descriptors>
-                            <attach>false</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-           
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>attach-artifacts</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>${airavata.bin.zip}</file>
-                                    <type>zip</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>${airavata.bin.tar.gz}</file>
-                                    <type>tar.gz</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-standalone-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-api-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	</dependencies>
-
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <archieve.name>apache-api-server</archieve.name>
-        <airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
-        <airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
-        <airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
-        <airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/assembly/bin-assembly.xml b/modules/distribution/api-server/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index b362420..0000000
--- a/modules/distribution/api-server/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<!--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. -->
-
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<fileSets>
-
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** copy database scripts ********************** -->
-		<fileSet>
-			<directory>../../registry/airavata-jpa-registry/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../app-catalog/app-catalog-data/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-				<include>logo.txt</include>
-				<include>startNetworkServer</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>airavata-server.properties</include>
-				<include>zoo.cfg</include>
-				<include>log4j.properties</include>
-				<include>persistence.xml</include>
-				<include>provenance.sql</include>
-			</includes>
-		</fileSet>
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
-			</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<includes>
-				<include>*:*:jar</include>
-            </includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/assembly/src-assembly.xml b/modules/distribution/api-server/src/main/assembly/src-assembly.xml
deleted file mode 100644
index c2bed4f..0000000
--- a/modules/distribution/api-server/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>airavata-api/airavata-api-server/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/INSTALL b/modules/distribution/api-server/src/main/resources/INSTALL
deleted file mode 100644
index 0324e61..0000000
--- a/modules/distribution/api-server/src/main/resources/INSTALL
+++ /dev/null
@@ -1,55 +0,0 @@
-Installing  Apache Airavata 0.11
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or check out from svn.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* The compressed binary distribution is created at <PROJECT DIR>/modules/distribution/airavata-server/target/apache-airavata-server-<airavata-version>-bin.zip
-
-Installing the Airavata Server
-------------------------------
-No installation is necessary. Just extract the compressed distribution.
-Note: For customizing the default configurations of the Airavata Server please 
-      refer to Airavata web-site (http://airavata.apache.org/) and/or Airavata 
-      mailing lists (http://airavata.apache.org/community/mailing-lists.html)
-
-Starting Apache Airavata Server
--------------------------------
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh airavata-server.sh
-	Windows
-		> airavata-server.bat
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Starting Apache Derby Server
--------------------------------
-Users have the option to star the derby server separately
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh derby.sh
-	Windows
-		<Not supported in this version>
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Running Tests
--------------
-Once the binary is unzipped, instructions to run the tests should be followed from README
-
-Tutorials 
-----------
-The airavata website has instructions for basic tutorials:
-* For basic understanding of how Airavata works - http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* Describing and executing applications using Airavata - http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-* Advanced tutorial to provide understanding of how to run sample workflows distributed with Airavata - http://airavata.apache.org/documentation/tutorials/advanced-workflow-samples.html


[62/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/NOTICE b/modules/distribution/api-server/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/api-server/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/README b/modules/distribution/api-server/src/main/resources/README
deleted file mode 100644
index 1539b8c..0000000
--- a/modules/distribution/api-server/src/main/resources/README
+++ /dev/null
@@ -1,121 +0,0 @@
-Apache Airavata Server - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata can be used as individual components or 
-as an integrated solution to build science gateways or general-purpose distributed 
-application and workflow management systems. Users can use Airavata back end services 
-and build gadgets to deploy in open social containers such as Apache Rave and modify them 
-to suit their needs. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration.
-
-This distribution allows you to run a standalone Airavata Server which includes all the 
-airavata services shipped with a default derby database as the backend registry.
-
-Release Notes
-=============
-0.11 is the tenth release of Airavata (skipped 0.1-INCUBATNG). This release focuses bug fixes and GSISSH library for beta testing. For detailed tasks list, please see RELEASE_NOTES.
-
-Building from source
-====================
-For brief installation instructions, see INSTALL
-For detailed installation and further instructions refer http://airavata.apache.org/ - Documentation section in left hand panel. Step by step with proper documentation are provided.
-
-Known Issues in This Release
-============================
-This is the base release and is focused on a good foundation and less on features. This 
-version is not recommended for production usage.
-
-Airavata Binary Distribution Directory Structure
-================================================
-
-    AIRAVATA_HOME
-		├── bin
-		│   ├── database_scripts <dir>
-		│   ├── airavata-server.bat
-		│   ├── airavata-server.properties
-		│   ├── airavata-server.sh
-		│   ├── authenticators.xml
-		│   ├── axis2.xml
-		│   ├── derby.sh
-		│   ├── host.xml
-		│   ├── log4j.properties
-		│   ├── logo.txt
-		│   ├── setenv.bat
-		│   ├── setenv.sh
-		│   └── startNetworkServer
-		├── lib <dir>
-		├── repository
-		│   ├── modules 
-		│   └── services
-		├── samples
-		│   ├── workflows <dir>
-		│   ├── echo_out.sh
-		│   └── echo.sh
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		└── README
-
-
-How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "Airavata in Five Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* For intermediate level Airavata features, follow "Airavata in Ten Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html 
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html
-
-Description of Directory Structure
-==================================
-    - bin
-      This contains all the configuration files & the executable scripts to run the Airavata Server (Axis2 server 
-      with Airavata services which include messageBroker and messageBox with GFac Axis2 services), & a standalone Apache Derby server.
-
-    - bin - database_scripts
-      Contains the database scripts which are used to create tables for messagebox and messagebroker services
-
-    - samples
-      This contains sample workflow to try out & sample application scripts.
-
-    - lib
-      This contains all the libraries required to run the airavata server and/or derby server.
-
-    - repository - services
-      Contains deployed services in Axis2 runtime.
-
-    - README
-      This document.
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata Server Web Application
-  This is similar package as the Airavata Server but is distributed as the server Web Application archive.
-  This war is compatible with Apache Tomcat application server. The war bundles all airavata services 
-  enabled by defualt to startup a derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata XBaya JNLP
-  The Airavata XBaya JNLP distribution is the simular GUI distribution but prepackeged to be ready to be deployed to 
-   a web server as a web start application. The GUI provides features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry. 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/bin/api-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/bin/api-server.sh b/modules/distribution/api-server/src/main/resources/bin/api-server.sh
deleted file mode 100755
index 872c854..0000000
--- a/modules/distribution/api-server/src/main/resources/bin/api-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=apiserver"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > api-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/bin/logo.txt b/modules/distribution/api-server/src/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/modules/distribution/api-server/src/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/bin/setenv.bat b/modules/distribution/api-server/src/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/modules/distribution/api-server/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/bin/setenv.sh b/modules/distribution/api-server/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/api-server/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/pom.xml b/modules/distribution/client/java/pom.xml
deleted file mode 100644
index f146a70..0000000
--- a/modules/distribution/client/java/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>airavata-client-parent</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apache-airavata-client-java-sdk</artifactId>
-    <name>Airavata Client Java Distribution</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.8</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.airavata</groupId>
-                                    <artifactId>airavata-client-configuration</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>jar</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <outputDirectory>${project.build.directory}/conf</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>distribution-package</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <finalName>${archieve.name}-${project.version}</finalName>
-                            <descriptors>
-                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-                                <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
-                            </descriptors>
-                            <attach>false</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>attach-artifacts</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>${airavata.client-bin.zip}</file>
-                                    <type>zip</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>${airavata.client-bin.tar.gz}</file>
-                                    <type>tar.gz</type>
-                                    <classifier>bin</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-common-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-model-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>0.9.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-api-stubs</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <archieve.name>apache-airavata-client</archieve.name>
-        <airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>
-        <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip
-        </airavata.client-bin.zip>
-        <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz
-        </airavata.client-bin.tar.gz>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/assembly/bin-assembly.xml b/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index 59976d8..0000000
--- a/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<!--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. -->
-	
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-	<fileSets>
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>conf/*</include>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>conf</outputDirectory>
-			<includes>
-				<include>*.properties</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../../../samples/java-client</directory>
-			<outputDirectory>samples</outputDirectory>
-			<excludes>
-				<exclude>**/*.iml</exclude>
-				<exclude>**/pom.xml</exclude>
-				<exclude>**/target/**</exclude>
-			</excludes>
-
-		</fileSet>
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
-			</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<includes>
-				<include>org.slf4j:slf4j-api:jar</include>
-				<include>org.slf4j:slf4j-jcl:jar</include>
-				<include>org.slf4j:slf4j-log4j12:jar</include>
-				<include>javax.jcr:jcr:jar</include>
-				<include>commons-collections:commons-collections</include>
-				<include>commons-configuration:commons-configuration</include>
-				<include>commons-lang:commons-lang</include>
-				<include>org.ogce:xpp3:jar</include>
-				<include>org.ogce:xpp5:jar</include>
-				<include>org.ogce:xsul:jar</include>
-				<include>org.ogce:xsul5:jar</include>
-				<include>org.ogce:gpel-client:jar</include>
-				<include>org.ogce:atomixmiser:jar</include>
-				<include>org.python:jython:jar</include>
-				<include>org.apache.xmlbeans:xmlbeans</include>
-				<!--<include>com.amazonaws:aws-java-sdk</include> -->
-				<!--<include>amazon:MapReduce.Service.Client</include> -->
-				<include>net.java.dev.jets3t:jets3t</include>
-				<include>org.apache.airavata:orchestrator-core:jar
-				</include>
-				<!--<include>org.apache.airavata:airavata-gfac-schema-utils:jar-->
-				<!--</include>-->
-				<include>org.apache.airavata:airavata-common-utils:jar</include>
-				<include>org.apache.airavata:airavata-workflow-execution-context:jar
-				</include>
-				<include>org.apache.airavata:airavata-registry-cpi:jar</include>
-				<include>org.apache.airavata:airavata-jpa-registry:jar</include>
-				<include>org.apache.airavata:airavata-data-models:jar</include>
-				<include>org.apache.airavata:airavata-api-stubs:jar</include>
-				<include>org.apache.airavata:airavata-credential-store:jar</include>
-				<include>org.apache.airavata:airavata-gfac-core:jar</include>
-				<include>commons-cli:commons-cli:jar</include>
-				<!--include>org.apache.airavata:airavata-message-monitor:jar</include> 
-					<include>org.apache.airavata:airavata-workflow-model-core:jar</include> <include>org.apache.airavata:airavata-messenger-commons:jar</include> 
-					<include>org.apache.airavata:airavata-messenger-client:jar</include -->
-				<include>org.apache.airavata:airavata-workflow-tracking:jar
-				</include>
-				<include>org.apache.airavata:gsissh:jar</include>
-				<include>org.apache.airavata:airavata-model-utils:jar</include>
-				<include>org.apache.airavata:orchestrator-service:jar
-				</include>
-				<include>org.apache.openjpa:openjpa-all:jar</include>
-				<include>xerces:xercesImpl:jar:2.9.1</include>
-				<include>com.sun.jersey:jersey-json</include>
-				<include>com.sun.jersey.contribs:jersey-multipart</include>
-				<include>org.codehaus.jackson:jackson-jaxrs</include>
-				<include>org.codehaus.jackson:jackson-core-asl</include>
-				<include>org.codehaus.jackson:jackson-mapper-asl</include>
-				<include>org.codehaus.jackson:jackson-xc</include>
-				<include>com.sun.jersey:jersey-core:jar</include>
-				<include>com.sun.jersey:jersey-client:jar</include>
-				<include>org.apache.airavata:json</include>
-				<include>commons-codec:commons-codec:jar</include>
-				<include>wsdl4j:wsdl4j:jar</include>
-				<include>org.apache.axis2:axis2-kernel:jar</include>
-				<include>commons-httpclient:commons-httpclient:jar</include>
-				<include>org.apache.ws.commons.axiom:axiom-api:jar</include>
-				<include>org.apache.axis2:axis2:jar</include>
-				<include>org.apache.ws.commons.schema:XmlSchema:jar</include>
-				<include>org.apache.ws.commons.axiom:axiom-impl:jar</include>
-				<include>org.apache.neethi:neethi:jar</include>
-				<include>org.apache.axis2:axis2-transport-local:jar</include>
-				<include>org.apache.axis2:axis2-transport-http:jar</include>
-				<include>javax.mail:mail:jar</include>
-				<include>org.apache.woden:woden-api:jar</include>
-				<include>org.apache.httpcomponents:httpcore:jar</include>
-				<include>org.apache.axis2:axis2-adb:jar</include>
-				<include>log4j:log4j:jar</include>
-				<include>de.odysseus.staxon:staxon:jar:1.2</include>
-				<include>de.odysseus.staxon:staxon-jackson:jar:1.2</include>
-				<include>org.apache.thrift:libthrift:jar:0.9.1</include>
-			</includes>
-		</dependencySet>
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/assembly/src-assembly.xml b/modules/distribution/client/java/src/main/assembly/src-assembly.xml
deleted file mode 100644
index 6a093ed..0000000
--- a/modules/distribution/client/java/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>


[75/81] [abbrv] airavata git commit: moving resources into src

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/distribution/main/resources/LICENSE b/distribution/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/distribution/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-    Everyone is permitted to copy and distribute copies of this Agreement,
-    but 

<TRUNCATED>

[74/81] [abbrv] airavata git commit: moving resources into src

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/distribution/main/resources/NOTICE b/distribution/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/distribution/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/README
----------------------------------------------------------------------
diff --git a/distribution/main/resources/README b/distribution/main/resources/README
deleted file mode 100644
index c2223ff..0000000
--- a/distribution/main/resources/README
+++ /dev/null
@@ -1,145 +0,0 @@
-Apache Airavata Source - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration. Airavata bundles a server package 
-with an API, client software development Kits and a general purpose GUI XBaya as a application registration, workflow
-construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
-produced data.  
-
-Contact
-========
-For additional information about Apache Airavata, please contact the user or dev mailing lists:
-http://airavata.apache.org/community/mailing-lists.html
-
-Description of Airavata Directory Structure
-==================================
-    - airavata-api
-      This directory contains Airavata API related data models, api methods, generated server skeletons, client stubs, server implementations and client samples. 
-
-    - modules
-      This contains the source code of all the airavata maven projects organized as libraries, services and distributions
-
-    - samples
-      This contains all the system wide samples provided in Airavata distribution. All the sample are having its README file
-      So users have to refer each readme file before running each sample.
-
-    - tools
-      This contains source code libraries that can enhance Airavata features.
-
-    - README
-      This document.
-    
-    - RELEASE_NOTES
-      The describe the key features and know issues with the current release. 
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-Airavata Source Distribution Directory Structure
-================================================
-
-    AIRAVATA_MASTER
-		├── airavata-api
-		├── modules
-		│   ├── airavata-client
-		│   ├── app-catalog
-		│   ├── commons
-		│   │   ├── gfac-schema
-		│   │   ├── utils
-		│   │   ├── workflow-execution-context
-		│   │   └── workflow-tracking
-		│   ├── credential-store-service
-		│   ├── distribution
-		│   │   ├── api-server
-		│   │   ├── client
-		│   │   ├── gfac-server
-		│   │   ├── orchestrator-server
-		│   │   ├── server
-		│   │   └── release
-		│   │   └── xbaya-gui
-		│   ├── gfac
-		│   │   ├── airavata-gfac-service
-		│   │   ├── gfac-bes
-		│   │   ├── gfac-core
-		│   │   ├── gfac-ec2
-		│   │   ├── gfac-gram
-		│   │   ├── gfac-gsissh
-		│   │   ├── gfac-hadoop
-		│   │   ├── gfac-local
-		│   │   ├── gfac-monitor
-		│   │   ├── gfac-ssh
-		│   │   ├── gfac-thrift-descriptions
-		│   ├── integration-tests
-		│   ├── messaging
-		│   ├── orchestrator
-		│   ├── registry
-		│   │   ├── airavata-jpa-registry
-		│   │   ├── registry-cpi
-		│   ├── security
-		│   ├── credential-store
-		│   ├── server
-		│   ├── test-suite
-		│   ├── workflow-model
-		│   │   ├── workflow-engine
-		│   │   ├── workflow-model-component-node
-		│   │   └── workflow-model-core
-		│   ├── ws-messenger
-		│   │   ├── commons
-		│   │   ├── distribution
-		│   │   ├── messagebox
-		│   │   ├── messagebroker
-		│   │   ├── message-monitor
-		│   │   └── samples
-		│   └── xbaya-gui
-		├── samples
-		├── tools
-		│   ├── gsissh
-		│   ├── gsissh-cli-tools
-		│   ├── phoebus-integration
-		│   └── registry-migrate
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		├── README
-		└── RELEASE_NOTES
-
-Available Binary Distributions
-==============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata API Server
-  This is the server that contains Airavata API Server.
-
-* Airavata Orchestrator Server
-  This is the stand-alone orchestrator server
-
-* Airavata GFac Server
-  This is the standalone GFac Server
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata Client
-  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
-  access Airavata functionality through Airavata API. 
-  
- How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial.
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/airavata-server.bat
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/airavata-server.bat b/distribution/main/resources/bin/airavata-server.bat
deleted file mode 100644
index 09752c4..0000000
--- a/distribution/main/resources/bin/airavata-server.bat
+++ /dev/null
@@ -1,55 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-setlocal EnableDelayedExpansion
-
-call "%~dp0"setenv.bat
-
-:loop
-if ""%1""==""-xdebug"" goto xdebug
-if ""%1""==""-security"" goto security
-if ""%1""=="""" goto run
-goto help
-
-:xdebug
-set JAVA_OPTS= %JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000
-shift
-goto loop
-
-:security
-set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%AIRAVATA_HOME%\conf\axis2.policy -Daxis2.home=%AIRAVATA_HOME%
-shift
-goto loop
-
-:help
-echo  Usage: %0 [-options]
-echo.
-echo  where options include:
-echo   -xdebug    Start Airavata Server under JPDA debugger
-echo   -security  Enable Java 2 security
-echo   -h         Help
-goto end
-
-:run
-cd "%AIRAVATA_HOME%\bin"
-set LOGO_FILE="logo.txt"
-if exist "%LOGO_FILE%" type "%LOGO_FILE%"
-
-java %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" -Djava.endorsed.dirs="%AIRAVATA_HOME%/lib/endorsed":"%JAVA_HOME%/jre/lib/endorsed":"%JAVA_HOME%/lib/endorsed" org.apache.airavata.server.ServerMain -repo "%AIRAVATA_HOME%"/repository/services -conf "%AIRAVATA_HOME%"/conf/axis2.xml %*
-
-:end

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/airavata-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/airavata-server.sh b/distribution/main/resources/bin/airavata-server.sh
deleted file mode 100755
index 885dcd4..0000000
--- a/distribution/main/resources/bin/airavata-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-#SERVERS="--servers=apiserver,orchestrator,gfac,credentialstore"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-        	AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-		AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-	    IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > airavata-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/api-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/api-server.sh b/distribution/main/resources/bin/api-server.sh
deleted file mode 100755
index 872c854..0000000
--- a/distribution/main/resources/bin/api-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=apiserver"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > api-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/derby.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/derby.sh b/distribution/main/resources/bin/derby.sh
deleted file mode 100644
index 134f7b9..0000000
--- a/distribution/main/resources/bin/derby.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/setenv.sh
-export DERBY_HOME=$AIRAVATA_HOME/standalone-server
-cd $AIRAVATA_HOME/bin
-./startNetworkServer $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/gfac-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/gfac-server.sh b/distribution/main/resources/bin/gfac-server.sh
deleted file mode 100755
index 839ef4e..0000000
--- a/distribution/main/resources/bin/gfac-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=gfac"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > gfac-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/logo.txt b/distribution/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/distribution/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/orchestrator-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/orchestrator-server.sh b/distribution/main/resources/bin/orchestrator-server.sh
deleted file mode 100755
index 5fa73e7..0000000
--- a/distribution/main/resources/bin/orchestrator-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=orchestrator"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > orchestrator-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/setenv.bat b/distribution/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/distribution/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/setenv.sh b/distribution/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/distribution/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/startNetworkServer
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/startNetworkServer b/distribution/main/resources/bin/startNetworkServer
deleted file mode 100644
index 808566c..0000000
--- a/distribution/main/resources/bin/startNetworkServer
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-if [ -n "$derby_common_debug" ] ; then
-  set -x
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$DERBY_HOME" -o ! -d "$DERBY_HOME" ] ; then
-  ## resolve links - $0 may be a link to derby's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  DERBY_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  DERBY_HOME=`cd "$DERBY_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$DERBY_HOME" ] &&
-    DERBY_HOME=`cygpath --unix "$DERBY_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set DERBY_LIB location
-DERBY_LIB="${DERBY_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# set local classpath, don't overwrite the user's
-LOCALCLASSPATH=$DERBY_LIB/derby.jar:$DERBY_LIB/derbynet.jar:$DERBY_LIB/derbytools.jar:$DERBY_LIB/derbyclient.jar
-
-# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-# user CLASSPATH first and derby-found jars after.
-# In that case, the user CLASSPATH will override derby-found jars
-#
-# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-# with derby-found jars first and user CLASSPATH after
-if [ -n "$CLASSPATH" ] ; then
-  # merge local and specified classpath 
-  if [ -z "$LOCALCLASSPATH" ] ; then 
-    LOCALCLASSPATH="$CLASSPATH"
-  elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-    LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-  else
-    LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-  fi
-
-  # remove class path from launcher -cp option
-  CLASSPATH=""
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  DERBY_HOME=`cygpath --$format "$DERBY_HOME"`
-  DERBY_LIB=`cygpath --$format "$DERBY_LIB"`
-  if [ -n "$JAVA_HOME" ]; then
-    JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  fi
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$DERBY_HOME" in
-    *\\ )
-    DERBY_HOME="$DERBY_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-
-# Readjust classpath for MKS
-# expr match 
-if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; then
-  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g
-'`
-fi
-#!/bin/sh
-
-# 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.
-
-derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start $@"
-eval $derby_exec_command

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/bin/workflow-server.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/bin/workflow-server.sh b/distribution/main/resources/bin/workflow-server.sh
deleted file mode 100755
index b66e192..0000000
--- a/distribution/main/resources/bin/workflow-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=workflowserver"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > workflow-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/samples/registerSample.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/registerSample.sh b/distribution/main/resources/samples/registerSample.sh
deleted file mode 100644
index 6450f6f..0000000
--- a/distribution/main/resources/samples/registerSample.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/../bin/setenv.sh
-JAVA_OPTS=""
-
-java -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		     org.apache.airavata.client.samples.RegisterSampleData $*

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/samples/scripts/add.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/add.sh b/distribution/main/resources/samples/scripts/add.sh
deleted file mode 100755
index daa140b..0000000
--- a/distribution/main/resources/samples/scripts/add.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# 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.
-
-# add two numbers
-sleep 10
-/bin/echo  "Result=`expr $1 + $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/samples/scripts/echo.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/echo.sh b/distribution/main/resources/samples/scripts/echo.sh
deleted file mode 100755
index 9dbaab9..0000000
--- a/distribution/main/resources/samples/scripts/echo.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#echo wrapper
-sleep 10
-/bin/echo "Echoed_Output=$1"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/samples/scripts/multiply.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/multiply.sh b/distribution/main/resources/samples/scripts/multiply.sh
deleted file mode 100755
index a5b5f7f..0000000
--- a/distribution/main/resources/samples/scripts/multiply.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# mutiply two numbers
-sleep 10
-/bin/echo "Result=`expr $1 \* $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/main/resources/samples/scripts/subtract.sh
----------------------------------------------------------------------
diff --git a/distribution/main/resources/samples/scripts/subtract.sh b/distribution/main/resources/samples/scripts/subtract.sh
deleted file mode 100755
index a21bec7..0000000
--- a/distribution/main/resources/samples/scripts/subtract.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# substract two numbers
-sleep 10
-/bin/echo "Result=`expr $1 - $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/bin-assembly.xml b/distribution/src/main/assembly/bin-assembly.xml
new file mode 100644
index 0000000..6c290b8
--- /dev/null
+++ b/distribution/src/main/assembly/bin-assembly.xml
@@ -0,0 +1,189 @@
+<!--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. -->
+
+<!DOCTYPE assembly [
+        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
+        <!ELEMENT id (#PCDATA)>
+        <!ELEMENT includeBaseDirectory (#PCDATA)>
+        <!ELEMENT baseDirectory (#PCDATA)>
+        <!ELEMENT formats (format)*>
+        <!ELEMENT format (#PCDATA)>
+        <!ELEMENT fileSets (fileSet)*>
+        <!ELEMENT fileSet (directory|outputDirectory|fileMode|includes)*>
+        <!ELEMENT directory (#PCDATA)>
+        <!ELEMENT outputDirectory (#PCDATA)>
+        <!ELEMENT includes (include)*>
+        <!ELEMENT include (#PCDATA)>
+        <!ELEMENT dependencySets (dependencySet)*>
+        <!ELEMENT dependencySet (outputDirectory|outputFileNameMapping|includes)*>
+        ]>
+<assembly>
+	<id>bin</id>
+	<includeBaseDirectory>true</includeBaseDirectory>
+	<baseDirectory>${archieve.name}-${version}</baseDirectory>
+	<formats>
+		<format>tar.gz</format>
+		<format>zip</format>
+	</formats>
+
+	<fileSets>
+
+		<!-- ********************** copy release notes files ********************** -->
+		<fileSet>
+			<directory>../../../</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>RELEASE_NOTES</include>
+			</includes>
+		</fileSet>
+		<!-- ********************** copy licenses, readme etc. ********************** -->
+		<fileSet>
+			<directory>src/main/resources/</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>LICENSE</include>
+				<include>NOTICE</include>
+				<include>README</include>
+				<include>INSTALL</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** copy database scripts ********************** -->
+		<fileSet>
+			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../registry/airavata-jpa-registry/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../app-catalog/app-catalog-data/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources/bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+				<include>logo.txt</include>
+				<include>startNetworkServer</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources/samples</directory>
+			<outputDirectory>samples</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>**/*.sh</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>${project.build.directory}/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>airavata-server.properties</include>
+				<include>zoo.cfg</include>
+				<include>registry.properties</include>
+				<include>log4j.properties</include>
+				<include>host.xml</include>
+				<include>persistence.xml</include>
+				<include>provenance.sql</include>
+				<include>gfac-config.xml</include>
+				<include>PBSTemplate.xslt</include>
+				<include>SLURMTemplate.xslt</include>
+				<include>LSFTemplate.xslt</include>
+				<include>UGETemplate.xslt</include>
+				<include>gsissh.properties</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
+			********************** -->
+		<fileSet>
+			<directory>src/main/resources/axis2-standalone-bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
+
+		<fileSet>
+			<directory>src/main/resources/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>**/*</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** Copy samples ********************** -->
+		<fileSet>
+			<directory>${project.build.directory}/samples/applications
+			</directory>
+			<outputDirectory>samples</outputDirectory>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
+
+	</fileSets>
+
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+			<includes>
+				<include>org.apache.derby:derby:jar</include>
+				<include>org.apache.derby:derbytools:jar</include>
+				<include>org.apache.derby:derbynet:jar</include>
+				<include>org.apache.derby:derbyclient:jar</include>
+			</includes>
+		</dependencySet>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<includes>
+				<include>*:*:jar</include>
+            </includes>
+		</dependencySet>
+
+	</dependencySets>
+
+</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/src-assembly.xml b/distribution/src/main/assembly/src-assembly.xml
new file mode 100644
index 0000000..6a093ed
--- /dev/null
+++ b/distribution/src/main/assembly/src-assembly.xml
@@ -0,0 +1,75 @@
+<!--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.
+  -->
+
+<assembly>
+    <id>src</id>
+    <includeBaseDirectory>true</includeBaseDirectory> 
+    <baseDirectory>${archieve.name}-${version}</baseDirectory>
+    <formats>
+        <format>tar.gz</format>  
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+        <fileSet>
+            <directory>../..</directory>
+            <outputDirectory></outputDirectory>
+            <includes>
+                <include>NOTICE</include>
+                <include>LICENSE</include>
+                <include>README</include>
+                <include>RELEASE_NOTES</include>
+		<include>DISCLAIMER</include>
+		<include>INSTALL</include>
+            </includes>
+            <filtered>true</filtered>
+        </fileSet>
+        <fileSet>
+            <directory>../..</directory>
+            <outputDirectory></outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+            <includes>
+                <include>pom.xml</include>
+                <include>modules/**</include>
+                <include>samples/**</include>
+            </includes>
+
+            <excludes>
+                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
+                     Note that they assume that all sources are located under an "src" directory. This
+                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
+                     Thus we may still encounter some issues here. -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
+            </excludes>
+
+        </fileSet>
+          </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/INSTALL b/distribution/src/main/resources/INSTALL
new file mode 100644
index 0000000..53d0550
--- /dev/null
+++ b/distribution/src/main/resources/INSTALL
@@ -0,0 +1,30 @@
+Installing  Apache Airavata 0.14
+-------------------------------
+
+Prerequisites
+-------------
+Java 1.5 or later
+Maven (tested on v 3.0.2)
+
+Build Apache Airavata from Source
+---------------------------------
+* Unzip/untar the source file or clone from git.
+* cd to project folder and type
+	$ mvn clean install
+	Note: in order to skip tests use the command
+			$ mvn clean install -Dmaven.test.skip=true
+* Alternatively, all  compressed binary distributions can be found at <PROJECT DIR>/modules/distribution/release/target/release-artifacts
+
+Running Tests
+-------------
+* Unit tests & integrations tests will run while Apache Airavata is built from source (without "-Dmaven.test.skip=true").
+* To run the test samples
+    - You can find the binary distributions at <PROJECT DIR>/modules/distribution/release/target/release-artifacts or from
+      the Apache Airavata download site.
+    - Extract the binary distributions and once the binary is unzipped, instructions to run the tests should be followed
+      from README files found within.
+
+Tutorials
+----------
+The airavata website has instructions for basic tutorials:
+* Describing and executing applications using Airavata - follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial
\ No newline at end of file


[11/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
new file mode 100644
index 0000000..213b834
--- /dev/null
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -0,0 +1,3170 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.gfac.cpi;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class GfacService {
+
+  public interface Iface {
+
+    /**
+     * Query gfac server to fetch the CPI version
+     */
+    public String getGFACServiceVersion() throws org.apache.thrift.TException;
+
+    /**
+     *  * After creating the experiment Data and Task Data in the orchestrator
+     *  * Orchestrator has to invoke this operation for each Task per experiment to run
+     *  * the actual Job related actions.
+     *  *
+     *  * @param experimentID
+     *  * @param taskID
+     *  * @param gatewayId:
+     *  *  The GatewayId is inferred from security context and passed onto gfac.
+     *  * @return sucess/failure
+     *  *
+     * *
+     * 
+     * @param experimentId
+     * @param taskId
+     * @param gatewayId
+     * @param tokenId
+     */
+    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
+
+    /**
+     *  *
+     *  * Terminate the running job.At this point user
+     *  * does not have to know the job ID so in the argument
+     *  * we do not make it to required jobID to provide.
+     *  *
+     *  *
+     *  * @param experimentID
+     *  * @param taskID
+     *  * @return sucess/failure
+     *  *
+     * *
+     * 
+     * @param experimentId
+     * @param taskId
+     * @param gatewayId
+     * @param tokenId
+     */
+    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public String getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      send_getGFACServiceVersion();
+      return recv_getGFACServiceVersion();
+    }
+
+    public void send_getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      getGFACServiceVersion_args args = new getGFACServiceVersion_args();
+      sendBase("getGFACServiceVersion", args);
+    }
+
+    public String recv_getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+      receiveBase(result, "getGFACServiceVersion");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
+    }
+
+    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
+    {
+      send_submitJob(experimentId, taskId, gatewayId, tokenId);
+      return recv_submitJob();
+    }
+
+    public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
+    {
+      submitJob_args args = new submitJob_args();
+      args.setExperimentId(experimentId);
+      args.setTaskId(taskId);
+      args.setGatewayId(gatewayId);
+      args.setTokenId(tokenId);
+      sendBase("submitJob", args);
+    }
+
+    public boolean recv_submitJob() throws org.apache.thrift.TException
+    {
+      submitJob_result result = new submitJob_result();
+      receiveBase(result, "submitJob");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
+    }
+
+    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
+    {
+      send_cancelJob(experimentId, taskId, gatewayId, tokenId);
+      return recv_cancelJob();
+    }
+
+    public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
+    {
+      cancelJob_args args = new cancelJob_args();
+      args.setExperimentId(experimentId);
+      args.setTaskId(taskId);
+      args.setGatewayId(gatewayId);
+      args.setTokenId(tokenId);
+      sendBase("cancelJob", args);
+    }
+
+    public boolean recv_cancelJob() throws org.apache.thrift.TException
+    {
+      cancelJob_result result = new cancelJob_result();
+      receiveBase(result, "cancelJob");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result");
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      super(protocolFactory, clientManager, transport);
+    }
+
+    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getGFACServiceVersion_args args = new getGFACServiceVersion_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getGFACServiceVersion();
+      }
+    }
+
+    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String experimentId;
+      private String taskId;
+      private String gatewayId;
+      private String tokenId;
+      public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.experimentId = experimentId;
+        this.taskId = taskId;
+        this.gatewayId = gatewayId;
+        this.tokenId = tokenId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        submitJob_args args = new submitJob_args();
+        args.setExperimentId(experimentId);
+        args.setTaskId(taskId);
+        args.setGatewayId(gatewayId);
+        args.setTokenId(tokenId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_submitJob();
+      }
+    }
+
+    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String experimentId;
+      private String taskId;
+      private String gatewayId;
+      private String tokenId;
+      public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.experimentId = experimentId;
+        this.taskId = taskId;
+        this.gatewayId = gatewayId;
+        this.tokenId = tokenId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        cancelJob_args args = new cancelJob_args();
+        args.setExperimentId(experimentId);
+        args.setTaskId(taskId);
+        args.setGatewayId(gatewayId);
+        args.setTokenId(tokenId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_cancelJob();
+      }
+    }
+
+  }
+
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
+      processMap.put("submitJob", new submitJob());
+      processMap.put("cancelJob", new cancelJob());
+      return processMap;
+    }
+
+    public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
+      public getGFACServiceVersion() {
+        super("getGFACServiceVersion");
+      }
+
+      public getGFACServiceVersion_args getEmptyArgsInstance() {
+        return new getGFACServiceVersion_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException {
+        getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+        result.success = iface.getGFACServiceVersion();
+        return result;
+      }
+    }
+
+    public static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
+      public submitJob() {
+        super("submitJob");
+      }
+
+      public submitJob_args getEmptyArgsInstance() {
+        return new submitJob_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
+        submitJob_result result = new submitJob_result();
+        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
+      public cancelJob() {
+        super("cancelJob");
+      }
+
+      public cancelJob_args getEmptyArgsInstance() {
+        return new cancelJob_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
+        cancelJob_result result = new cancelJob_result();
+        result.success = iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+  }
+
+  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+    public AsyncProcessor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+    }
+
+    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
+      processMap.put("submitJob", new submitJob());
+      processMap.put("cancelJob", new cancelJob());
+      return processMap;
+    }
+
+    public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
+      public getGFACServiceVersion() {
+        super("getGFACServiceVersion");
+      }
+
+      public getGFACServiceVersion_args getEmptyArgsInstance() {
+        return new getGFACServiceVersion_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.getGFACServiceVersion(resultHandler);
+      }
+    }
+
+    public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
+      public submitJob() {
+        super("submitJob");
+      }
+
+      public submitJob_args getEmptyArgsInstance() {
+        return new submitJob_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            submitJob_result result = new submitJob_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            submitJob_result result = new submitJob_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
+      }
+    }
+
+    public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
+      public cancelJob() {
+        super("cancelJob");
+      }
+
+      public cancelJob_args getEmptyArgsInstance() {
+        return new cancelJob_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            cancelJob_result result = new cancelJob_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            cancelJob_result result = new cancelJob_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
+      }
+    }
+
+  }
+
+  public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
+
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory());
+    }
+
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap);
+    }
+
+    public getGFACServiceVersion_args() {
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getGFACServiceVersion_args(getGFACServiceVersion_args other) {
+    }
+
+    public getGFACServiceVersion_args deepCopy() {
+      return new getGFACServiceVersion_args(this);
+    }
+
+    @Override
+    public void clear() {
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getGFACServiceVersion_args)
+        return this.equals((getGFACServiceVersion_args)that);
+      return false;
+    }
+
+    public boolean equals(getGFACServiceVersion_args that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getGFACServiceVersion_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getGFACServiceVersion_args(");
+      boolean first = true;
+
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_argsStandardScheme getScheme() {
+        return new getGFACServiceVersion_argsStandardScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_argsTupleScheme getScheme() {
+        return new getGFACServiceVersion_argsTupleScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
+  }
+
+  public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory());
+    }
+
+    public String success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
+    }
+
+    public getGFACServiceVersion_result() {
+    }
+
+    public getGFACServiceVersion_result(
+      String success)
+    {
+      this();
+      this.success = success;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getGFACServiceVersion_result(getGFACServiceVersion_result other) {
+      if (other.isSetSuccess()) {
+        this.success = other.success;
+      }
+    }
+
+    public getGFACServiceVersion_result deepCopy() {
+      return new getGFACServiceVersion_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+    }
+
+    public String getSuccess() {
+      return this.success;
+    }
+
+    public getGFACServiceVersion_result setSuccess(String success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getGFACServiceVersion_result)
+        return this.equals((getGFACServiceVersion_result)that);
+      return false;
+    }
+
+    public boolean equals(getGFACServiceVersion_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getGFACServiceVersion_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getGFACServiceVersion_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_resultStandardScheme getScheme() {
+        return new getGFACServiceVersion_resultStandardScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.success = iprot.readString();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeString(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_resultTupleScheme getScheme() {
+        return new getGFACServiceVersion_resultTupleScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeString(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readString();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args");
+
+    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
+    }
+
+    public String experimentId; // required
+    public String taskId; // required
+    public String gatewayId; // required
+    public String tokenId; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EXPERIMENT_ID((short)1, "experimentId"),
+      TASK_ID((short)2, "taskId"),
+      GATEWAY_ID((short)3, "gatewayId"),
+      TOKEN_ID((short)4, "tokenId");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EXPERIMENT_ID
+            return EXPERIMENT_ID;
+          case 2: // TASK_ID
+            return TASK_ID;
+          case 3: // GATEWAY_ID
+            return GATEWAY_ID;
+          case 4: // TOKEN_ID
+            return TOKEN_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
+    }
+
+    public submitJob_args() {
+    }
+
+    public submitJob_args(
+      String experimentId,
+      String taskId,
+      String gatewayId,
+      String tokenId)
+    {
+      this();
+      this.experimentId = experimentId;
+      this.taskId = taskId;
+      this.gatewayId = gatewayId;
+      this.tokenId = tokenId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public submitJob_args(submitJob_args other) {
+      if (other.isSetExperimentId()) {
+        this.experimentId = other.experimentId;
+      }
+      if (other.isSetTaskId()) {
+        this.taskId = other.taskId;
+      }
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
+    }
+
+    public submitJob_args deepCopy() {
+      return new submitJob_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.experimentId = null;
+      this.taskId = null;
+      this.gatewayId = null;
+      this.tokenId = null;
+    }
+
+    public String getExperimentId() {
+      return this.experimentId;
+    }
+
+    public submitJob_args setExperimentId(String experimentId) {
+      this.experimentId = experimentId;
+      return this;
+    }
+
+    public void unsetExperimentId() {
+      this.experimentId = null;
+    }
+
+    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetExperimentId() {
+      return this.experimentId != null;
+    }
+
+    public void setExperimentIdIsSet(boolean value) {
+      if (!value) {
+        this.experimentId = null;
+      }
+    }
+
+    public String getTaskId() {
+      return this.taskId;
+    }
+
+    public submitJob_args setTaskId(String taskId) {
+      this.taskId = taskId;
+      return this;
+    }
+
+    public void unsetTaskId() {
+      this.taskId = null;
+    }
+
+    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTaskId() {
+      return this.taskId != null;
+    }
+
+    public void setTaskIdIsSet(boolean value) {
+      if (!value) {
+        this.taskId = null;
+      }
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public submitJob_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public String getTokenId() {
+      return this.tokenId;
+    }
+
+    public submitJob_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
+      return this;
+    }
+
+    public void unsetTokenId() {
+      this.tokenId = null;
+    }
+
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
+    }
+
+    public void setTokenIdIsSet(boolean value) {
+      if (!value) {
+        this.tokenId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        if (value == null) {
+          unsetExperimentId();
+        } else {
+          setExperimentId((String)value);
+        }
+        break;
+
+      case TASK_ID:
+        if (value == null) {
+          unsetTaskId();
+        } else {
+          setTaskId((String)value);
+        }
+        break;
+
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      case TOKEN_ID:
+        if (value == null) {
+          unsetTokenId();
+        } else {
+          setTokenId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        return getExperimentId();
+
+      case TASK_ID:
+        return getTaskId();
+
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      case TOKEN_ID:
+        return getTokenId();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case EXPERIMENT_ID:
+        return isSetExperimentId();
+      case TASK_ID:
+        return isSetTaskId();
+      case GATEWAY_ID:
+        return isSetGatewayId();
+      case TOKEN_ID:
+        return isSetTokenId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof submitJob_args)
+        return this.equals((submitJob_args)that);
+      return false;
+    }
+
+    public boolean equals(submitJob_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_experimentId = true && this.isSetExperimentId();
+      boolean that_present_experimentId = true && that.isSetExperimentId();
+      if (this_present_experimentId || that_present_experimentId) {
+        if (!(this_present_experimentId && that_present_experimentId))
+          return false;
+        if (!this.experimentId.equals(that.experimentId))
+          return false;
+      }
+
+      boolean this_present_taskId = true && this.isSetTaskId();
+      boolean that_present_taskId = true && that.isSetTaskId();
+      if (this_present_taskId || that_present_taskId) {
+        if (!(this_present_taskId && that_present_taskId))
+          return false;
+        if (!this.taskId.equals(that.taskId))
+          return false;
+      }
+
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
+          return false;
+      }
+
+      boolean this_present_tokenId = true && this.isSetTokenId();
+      boolean that_present_tokenId = true && that.isSetTokenId();
+      if (this_present_tokenId || that_present_tokenId) {
+        if (!(this_present_tokenId && that_present_tokenId))
+          return false;
+        if (!this.tokenId.equals(that.tokenId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(submitJob_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetExperimentId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTaskId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGatewayId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTokenId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("submitJob_args(");
+      boolean first = true;
+
+      sb.append("experimentId:");
+      if (this.experimentId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.experimentId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("taskId:");
+      if (this.taskId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.taskId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("tokenId:");
+      if (this.tokenId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tokenId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (experimentId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
+      }
+      if (taskId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
+      }
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+      }
+      if (tokenId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
+      public submitJob_argsStandardScheme getScheme() {
+        return new submitJob_argsStandardScheme();
+      }
+    }
+
+    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // EXPERIMENT_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.experimentId = iprot.readString();
+                struct.setExperimentIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // TASK_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.taskId = iprot.readString();
+                struct.setTaskIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // GATEWAY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.gatewayId = iprot.readString();
+                struct.setGatewayIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // TOKEN_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.tokenId = iprot.readString();
+                struct.setTokenIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.experimentId != null) {
+          oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+          oprot.writeString(struct.experimentId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.taskId != null) {
+          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+          oprot.writeString(struct.taskId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.tokenId != null) {
+          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+          oprot.writeString(struct.tokenId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
+      public submitJob_argsTupleScheme getScheme() {
+        return new submitJob_argsTupleScheme();
+      }
+    }
+
+    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.experimentId);
+        oprot.writeString(struct.taskId);
+        oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.tokenId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.experimentId = iprot.readString();
+        struct.setExperimentIdIsSet(true);
+        struct.taskId = iprot.readString();
+        struct.setTaskIdIsSet(true);
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+        struct.tokenId = iprot.readString();
+        struct.setTokenIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
+    }
+
+    public boolean success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
+    }
+
+    public submitJob_result() {
+    }
+
+    public submitJob_result(
+      boolean success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public submitJob_result(submitJob_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public submitJob_result deepCopy() {
+      return new submitJob_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = false;
+    }
+
+    public boolean isSuccess() {
+      return this.success;
+    }
+
+    public submitJob_result setSuccess(boolean success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Boolean)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Boolean.valueOf(isSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof submitJob_result)
+        return this.equals((submitJob_result)that);
+      return false;
+    }
+
+    public boolean equals(submitJob_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(submitJob_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("submitJob_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
+      public submitJob_resultStandardScheme getScheme() {
+        return new submitJob_resultStandardScheme();
+      }
+    }
+
+    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.success = iprot.readBool();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeBool(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
+      public submitJob_resultTupleScheme getScheme() {
+        return new submitJob_resultTupleScheme();
+      }
+    }
+
+    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeBool(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readBool();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class cancelJob_args implements org.apache.thrift.TBase<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_args");
+
+    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
+    }
+
+    public String experimentId; // required
+    public String taskId; // required
+    public String gatewayId; // required
+    public String tokenId; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EXPERIMENT_ID((short)1, "experimentId"),
+      TASK_ID((short)2, "taskId"),
+      GATEWAY_ID((short)3, "gatewayId"),
+      TOKEN_ID((short)4, "tokenId");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EXPERIMENT_ID
+            return EXPERIMENT_ID;
+          case 2: // TASK_ID
+            return TASK_ID;
+          case 3: // GATEWAY_ID
+            return GATEWAY_ID;
+          case 4: // TOKEN_ID
+            return TOKEN_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
+    }
+
+    public cancelJob_args() {
+    }
+
+    public cancelJob_args(
+      String experimentId,
+      String taskId,
+      String gatewayId,
+      String tokenId)
+    {
+      this();
+      this.experimentId = experimentId;
+      this.taskId = taskId;
+      this.gatewayId = gatewayId;
+      this.tokenId = tokenId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public cancelJob_args(cancelJob_args other) {
+      if (other.isSetExperimentId()) {
+        this.experimentId = other.experimentId;
+      }
+      if (other.isSetTaskId()) {
+        this.taskId = other.taskId;
+      }
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
+    }
+
+    public cancelJob_args deepCopy() {
+      return new cancelJob_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.experimentId = null;
+      this.taskId = null;
+      this.gatewayId = null;
+      this.tokenId = null;
+    }
+
+    public String getExperimentId() {
+      return this.experimentId;
+    }
+
+    public cancelJob_args setExperimentId(String experimentId) {
+      this.experimentId = experimentId;
+      return this;
+    }
+
+    public void unsetExperimentId() {
+      this.experimentId = null;
+    }
+
+    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetExperimentId() {
+      return this.experimentId != null;
+    }
+
+    public void setExperimentIdIsSet(boolean value) {
+      if (!value) {
+        this.experimentId = null;
+      }
+    }
+
+    public String getTaskId() {
+      return this.taskId;
+    }
+
+    public cancelJob_args setTaskId(String taskId) {
+      this.taskId = taskId;
+      return this;
+    }
+
+    public void unsetTaskId() {
+      this.taskId = null;
+    }
+
+    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTaskId() {
+      return this.taskId != null;
+    }
+
+    public void setTaskIdIsSet(boolean value) {
+      if (!value) {
+        this.taskId = null;
+      }
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public cancelJob_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public String getTokenId() {
+      return this.tokenId;
+    }
+
+    public cancelJob_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
+      return this;
+    }
+
+    public void unsetTokenId() {
+      this.tokenId = null;
+    }
+
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
+    }
+
+    public void setTokenIdIsSet(boolean value) {
+      if (!val

<TRUNCATED>

[03/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
deleted file mode 100644
index 9a34a47..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.CommandOutput;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.gsi.ssh.x2012.x12.*;
-import org.apache.xmlbeans.XmlException;
-
-import java.util.List;
-
-/**
- * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
- * submit the job to the computing resource
- */
-public class JobDescriptor {
-
-    private JobDescriptorDocument jobDescriptionDocument;
-
-
-    public JobDescriptor() {
-        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
-        jobDescriptionDocument.addNewJobDescriptor();
-    }
-
-    public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
-        this.jobDescriptionDocument = jobDescriptorDocument;
-    }
-
-
-    public JobDescriptor(CommandOutput commandOutput) {
-        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
-        jobDescriptionDocument.addNewJobDescriptor();
-    }
-
-
-    public String toXML() {
-        return jobDescriptionDocument.xmlText();
-    }
-
-    public JobDescriptorDocument getJobDescriptorDocument() {
-        return this.jobDescriptionDocument;
-    }
-
-    /**
-     * With new app catalog thrift object integration, we don't use this
-     * @param xml
-     * @return
-     * @throws XmlException
-     */
-    @Deprecated
-    public static JobDescriptor fromXML(String xml)
-            throws XmlException {
-        JobDescriptorDocument parse = JobDescriptorDocument.Factory
-                .parse(xml);
-        JobDescriptor jobDescriptor = new JobDescriptor(parse);
-        return jobDescriptor;
-    }
-
-
-    //todo write bunch of setter getters to set and get jobdescription parameters
-    public void setWorkingDirectory(String workingDirectory) {
-        this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
-    }
-
-    public String getWorkingDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
-    }
-
-    public void setShellName(String shellName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
-    }
-
-    public void setJobName(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
-    }
-
-    public void setExecutablePath(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
-    }
-
-    public void setAllEnvExport(boolean name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
-    }
-
-    public void setMailOptions(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
-    }
-
-    public void setStandardOutFile(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
-    }
-
-    public void setStandardErrorFile(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
-    }
-
-    public void setNodes(int name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
-    }
-
-    public void setProcessesPerNode(int name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
-    }
-
-    public String getOutputDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
-    }
-
-    public String getInputDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
-    }
-    public void setOutputDirectory(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
-    }
-
-    public void setInputDirectory(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
-    }
-
-    /**
-     * Users can pass the minute count for maxwalltime
-     * @param minutes
-     */
-    public void setMaxWallTime(String minutes) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
-                CommonUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
-
-    }
-
-
-    public void setMaxWallTimeForLSF(String minutes) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
-                CommonUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
-
-    }
-    public void setAcountString(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
-    }
-
-    public void setInputValues(List<String> inputValue) {
-        InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
-        inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
-    }
-
-    public void setJobID(String jobID) {
-        this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
-    }
-
-    public void setQueueName(String queueName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
-    }
-
-    public void setStatus(String queueName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
-    }
-
-    public void setAfterAnyList(String[] afterAnyList) {
-        AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
-        afterAny.setAfterAnyArray(afterAnyList);
-    }
-
-    public void setAfterOKList(String[] afterOKList) {
-        AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
-        afterAnyList.setAfterOKListArray(afterOKList);
-    }
-    public void setCTime(String cTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
-    }
-    public void setQTime(String qTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
-    }
-    public void setMTime(String mTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
-    }
-    public void setSTime(String sTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
-    }
-    public void setCompTime(String compTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
-    }
-    public void setOwner(String owner) {
-        this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
-    }
-    public void setExecuteNode(String executeNode) {
-        this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
-    }
-    public void setEllapsedTime(String ellapsedTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
-    }
-
-    public void setUsedCPUTime(String usedCPUTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
-    }
-    public void setCPUCount(int usedCPUTime) {
-            this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
-        }
-    public void setUsedMemory(String usedMemory) {
-        this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
-    }
-    public void setVariableList(String variableList) {
-        this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
-    }
-    public void setSubmitArgs(String submitArgs) {
-        this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
-    }
-
-    public void setPreJobCommands(String[] commands){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
-    }
-
-     public void setPostJobCommands(String[] commands){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
-    }
-
-    public void setModuleLoadCommands(String[] commands) {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
-            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
-    }
-
-    public void addModuleLoadCommands(String command) {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
-            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
-    }
-
-    public void addPreJobCommand(String command){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
-    }
-
-     public void addPostJobCommand(String command){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
-    }
-
-    public void setPartition(String partition){
-        this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
-    }
-
-     public void setUserName(String userName){
-        this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
-    }
-     public void setNodeList(String nodeList){
-        this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
-    }
-    public void setJobSubmitter(String jobSubmitter){
-           this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
-    }
-    public String getNodeList(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
-    }
-    public String getExecutablePath() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
-    }
-
-    public boolean getAllEnvExport() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
-    }
-
-    public String getMailOptions() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
-    }
-
-    public String getStandardOutFile() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
-    }
-
-    public String getStandardErrorFile() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
-    }
-
-    public int getNodes(int name) {
-        return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
-    }
-
-    public int getCPUCount(int name) {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
-    }
-
-    public int getProcessesPerNode() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
-    }
-
-    public String getMaxWallTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
-    }
-
-    public String getAcountString() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
-    }
-
-    public String[] getInputValues() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
-    }
-
-    public String getJobID() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-    public String getQueueName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
-    }
-
-    public String getStatus() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
-    }
-
-    public String[] getAfterAnyList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
-    }
-
-    public String[] getAfterOKList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
-    }
-    public String getCTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
-    }
-    public String getQTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
-    }
-    public String getMTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
-    }
-    public String getSTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
-    }
-    public String getCompTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
-    }
-    public String getOwner() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
-    }
-    public String getExecuteNode() {
-         return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
-    }
-    public String getEllapsedTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
-    }
-
-    public String getUsedCPUTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
-    }
-
-    public String getUsedMemory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
-    }
-    public void getShellName() {
-        this.getJobDescriptorDocument().getJobDescriptor().getShellName();
-    }
-
-    public String getJobName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
-    }
-
-    public String getJobId() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-
-    public String getVariableList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-    public String getSubmitArgs() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-    public String[] getPostJobCommands(){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String[] getModuleCommands() {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String[] getPreJobCommands(){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String getJobSubmitterCommand(){
-          return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
-    }
-
-    public String getPartition(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
-    }
-
-    public String getUserName(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
-    }
-
-    public void setCallBackIp(String ip){
-        this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
-    }
-
-    public void setCallBackPort(String ip){
-        this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
-    }
-
-
-    public String getCallBackIp(){
-        return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
-    }
-    public String getCallBackPort(){
-        return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
-    }
-
-    public void setMailType(String emailType) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
-    }
-
-    public String getMailType() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
-    }
-    public void setMailAddress(String emailAddress) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
-    }
-
-    public String getMailAddress() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
-    }
-
-    public String getChassisName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
-    }
-
-    public void setChassisName(String chassisName){
-        this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
-    }
-    
-
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
deleted file mode 100644
index d9b6b1c..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-
-public interface JobManagerConfiguration {
-
-	public RawCommandInfo getCancelCommand(String jobID);
-
-	public String getJobDescriptionTemplateName();
-
-	public RawCommandInfo getMonitorCommand(String jobID);
-
-	public RawCommandInfo getUserBasedMonitorCommand(String userName);
-
-    public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
-
-	public String getScriptExtension();
-
-	public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
-
-	public OutputParser getParser();
-
-	public String getInstalledPath();
-
-	public String getBaseCancelCommand();
-
-	public String getBaseMonitorCommand();
-
-	public String getBaseSubmitCommand();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobType.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobType.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobType.java
deleted file mode 100644
index 7e1b49b..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahirugunathilake
- * Date: 8/22/13
- * Time: 7:19 AM
- * To change this template use File | Settings | File Templates.
- */
-public enum JobType {
-            SERIAL, SINGLE, MPI, MULTIPLE, CONDOR
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
deleted file mode 100644
index 740c9ac..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.commons.io.FilenameUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-
-public class LSFJobConfiguration implements JobManagerConfiguration {
-    private final static Logger logger = LoggerFactory.getLogger(LSFJobConfiguration.class);
-
-    private String jobDescriptionTemplateName;
-
-    private String scriptExtension;
-
-    private String installedPath;
-
-    private OutputParser parser;
-
-    public LSFJobConfiguration(){
-        // this can be used to construct and use setter methods to set all the params in order
-    }
-    public LSFJobConfiguration(String jobDescriptionTemplateName,
-                                 String scriptExtension,String installedPath,OutputParser parser) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-        this.scriptExtension = scriptExtension;
-        this.parser = parser;
-        if (installedPath.endsWith("/") || installedPath.isEmpty()) {
-            this.installedPath = installedPath;
-        } else {
-            this.installedPath = installedPath + "/";
-        }
-    }
-
-    @Override
-    public RawCommandInfo getCancelCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "bkill " + jobID);
-    }
-
-    @Override
-    public String getJobDescriptionTemplateName() {
-        return jobDescriptionTemplateName;
-    }
-
-    @Override
-    public RawCommandInfo getMonitorCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "bjobs " + jobID);
-    }
-
-    @Override
-    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
-        return new RawCommandInfo(this.installedPath + "bjobs -u " + userName);
-    }
-
-    @Override
-    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
-        return new RawCommandInfo(this.installedPath + "bjobs -J " + jobName);
-    }
-
-    @Override
-    public String getScriptExtension() {
-        return scriptExtension;
-    }
-
-    @Override
-    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
-        return new RawCommandInfo(this.installedPath + "bsub < " +
-                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
-    }
-
-    @Override
-    public OutputParser getParser() {
-        return parser;
-    }
-
-    public void setParser(OutputParser parser) {
-        this.parser = parser;
-    }
-
-    @Override
-    public String getInstalledPath() {
-        return installedPath;
-    }
-
-
-    @Override
-    public String getBaseCancelCommand() {
-        return "bkill";
-    }
-
-    @Override
-    public String getBaseMonitorCommand() {
-        return "bjobs";
-    }
-
-    @Override
-    public String getBaseSubmitCommand() {
-        return "bsub";
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
deleted file mode 100644
index a621ae0..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class LSFOutputParser implements OutputParser {
-    private final static Logger logger = LoggerFactory.getLogger(LSFOutputParser.class);
-
-    @Override
-    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) throws SSHApiException {
-        logger.debug(rawOutput);
-        //todo we need to implement this but we are not using it airavata runtime
-        // if someone is using the gsissh as a tool this will be useful to get a descriptive information about a single job
-    }
-
-    @Override
-    public String parseJobSubmission(String rawOutput) throws SSHApiException {
-        logger.debug(rawOutput);
-        return rawOutput.substring(rawOutput.indexOf("<")+1,rawOutput.indexOf(">"));
-    }
-
-    @Override
-    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
-        boolean jobFount = false;
-        logger.debug(rawOutput);
-        //todo this is not used anymore
-        return JobStatus.C;
-    }
-
-    @Override
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
-        logger.debug(rawOutput);
-
-        String[]    info = rawOutput.split("\n");
-//        int lastStop = 0;
-        for (String jobID : statusMap.keySet()) {
-            String jobName = jobID.split(",")[1];
-            boolean found = false;
-            for (int i = 0; i < info.length; i++) {
-                if (info[i].contains(jobName.substring(0,8))) {
-                    // now starts processing this line
-                    logger.info(info[i]);
-                    String correctLine = info[i];
-                    String[] columns = correctLine.split(" ");
-                    List<String> columnList = new ArrayList<String>();
-                    for (String s : columns) {
-                        if (!"".equals(s)) {
-                            columnList.add(s);
-                        }
-                    }
-//                    lastStop = i + 1;
-                    try {
-                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(2)));
-                    }catch(IndexOutOfBoundsException e){
-                        statusMap.put(jobID, JobStatus.valueOf("U"));
-                    }
-                    found = true;
-                    break;
-                }
-            }
-            if(!found)
-                logger.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
-        }
-    }
-
-    @Override
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
-        String regJobId = "jobId";
-        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
-        if (rawOutput != null) {
-            Matcher matcher = pattern.matcher(rawOutput);
-            if (matcher.find()) {
-                return matcher.group(regJobId);
-            } else {
-                logger.error("No match is found for JobName");
-                return null;
-            }
-        } else {
-            logger.error("Error: RawOutput shouldn't be null");
-            return null;
-        }
-    }
-
-    public static void main(String[] args) {
-        String test = "Job <2477982> is submitted to queue <short>.";
-        System.out.println(test.substring(test.indexOf("<")+1, test.indexOf(">")));
-        String test1 = "JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME\n" +
-                "2636607 lg11w   RUN   long       ghpcc06     c11b02      *069656647 Mar  7 00:58\n" +
-                "2636582 lg11w   RUN   long       ghpcc06     c02b01      2134490944 Mar  7 00:48";
-        Map<String, JobStatus> statusMap = new HashMap<String, JobStatus>();
-        statusMap.put("2477983,2134490944", JobStatus.U);
-        LSFOutputParser lsfOutputParser = new LSFOutputParser();
-        try {
-            lsfOutputParser.parseJobStatuses("cjh", statusMap, test1);
-        } catch (SSHApiException e) {
-            logger.error(e.getMessage(), e);
-        }
-        System.out.println(statusMap.get("2477983,2134490944"));
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/OutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/OutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/OutputParser.java
deleted file mode 100644
index fd37b6a..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/OutputParser.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-
-import java.util.List;
-import java.util.Map;
-
-public interface OutputParser {
-
-    /**
-     * Tihs can be used to fill a jobdescriptor based on the output
-     * @param descriptor
-     * @return
-     */
-    public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
-
-    /**
-     * This can be used to parseSingleJob the result of a job submission to get the JobID
-     * @param rawOutput
-     * @return
-     */
-    public String parseJobSubmission(String rawOutput)throws SSHApiException;
-
-
-    /**
-     * This can be used to get the job status from the output
-     * @param jobID
-     * @param rawOutput
-     */
-    public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
-
-    /**
-     * This can be used to parseSingleJob a big output and get multipleJob statuses
-     * @param statusMap list of status map will return and key will be the job ID
-     * @param rawOutput
-     */
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
-
-    /**
-     * filter the jobId value of given JobName from rawOutput
-     * @param jobName
-     * @param rawOutput
-     * @return
-     * @throws SSHApiException
-     */
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
deleted file mode 100644
index b658b16..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.commons.io.FilenameUtils;
-
-import java.io.File;
-
-public class PBSJobConfiguration implements JobManagerConfiguration {
-
-    private String jobDescriptionTemplateName;
-
-    private String scriptExtension;
-
-    private String installedPath;
-
-    private OutputParser parser;
-
-    public PBSJobConfiguration() {
-        // this can be used to construct and use setter methods to set all the params in order
-    }
-
-    public PBSJobConfiguration(String jobDescriptionTemplateName,
-                               String scriptExtension, String installedPath, OutputParser parser) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-        this.scriptExtension = scriptExtension;
-        this.parser = parser;
-        if (installedPath.endsWith("/")) {
-            this.installedPath = installedPath;
-        } else {
-            this.installedPath = installedPath + "/";
-        }
-    }
-
-    public RawCommandInfo getCancelCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
-    }
-
-    public String getJobDescriptionTemplateName() {
-        return jobDescriptionTemplateName;
-    }
-
-    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-    }
-
-    public RawCommandInfo getMonitorCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "qstat -f " + jobID);
-    }
-
-    public String getScriptExtension() {
-        return scriptExtension;
-    }
-
-    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
-        return new RawCommandInfo(this.installedPath + "qsub " +
-                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
-    }
-
-    public String getInstalledPath() {
-        return installedPath;
-    }
-
-    public void setInstalledPath(String installedPath) {
-        this.installedPath = installedPath;
-    }
-
-    public OutputParser getParser() {
-        return parser;
-    }
-
-    public void setParser(OutputParser parser) {
-        this.parser = parser;
-    }
-
-    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
-        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
-    }
-
-    @Override
-    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
-        // For PBS there is no option to get jobDetails by JobName, so we search with userName
-        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
-    }
-
-    @Override
-    public String  getBaseCancelCommand() {
-        return "qdel";
-    }
-
-    @Override
-    public String  getBaseMonitorCommand() {
-        return "qstat";
-    }
-
-    @Override
-    public String getBaseSubmitCommand() {
-        return "qsub ";
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
deleted file mode 100644
index 1458f4c..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.print.attribute.standard.JobState;
-import javax.validation.constraints.Null;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class PBSOutputParser implements OutputParser {
-    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
-
-    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String[] line;
-        for (int i = 0; i < info.length; i++) {
-            if (info[i].contains("=")) {
-                line = info[i].split("=", 2);
-            } else {
-                line = info[i].split(":", 2);
-            }
-            if (line.length >= 2) {
-                String header = line[0].trim();
-                log.debug("Header = " + header);
-                String value = line[1].trim();
-                log.debug("value = " + value);
-
-                if (header.equals("Variable_List")) {
-                    while (info[i + 1].startsWith("\t")) {
-                        value += info[i + 1];
-                        i++;
-                    }
-                    value = value.replaceAll("\t", "");
-                    jobDescriptor.setVariableList(value);
-                } else if ("Job Id".equals(header)) {
-                    jobDescriptor.setJobID(value);
-                } else if ("Job_Name".equals(header)) {
-                    jobDescriptor.setJobName(value);
-                } else if ("Account_Name".equals(header)) {
-                    jobDescriptor.setAcountString(value);
-                } else if ("job_state".equals(header)) {
-                    jobDescriptor.setStatus(value);
-                } else if ("Job_Owner".equals(header)) {
-                    jobDescriptor.setOwner(value);
-                } else if ("resources_used.cput".equals(header)) {
-                    jobDescriptor.setUsedCPUTime(value);
-                } else if ("resources_used.mem".equals(header)) {
-                    jobDescriptor.setUsedMemory(value);
-                } else if ("resources_used.walltime".equals(header)) {
-                    jobDescriptor.setEllapsedTime(value);
-                } else if ("job_state".equals(header)) {
-                    jobDescriptor.setStatus(value);
-                } else if ("queue".equals(header))
-                    jobDescriptor.setQueueName(value);
-                else if ("ctime".equals(header)) {
-                    jobDescriptor.setCTime(value);
-                } else if ("qtime".equals(header)) {
-                    jobDescriptor.setQTime(value);
-                } else if ("mtime".equals(header)) {
-                    jobDescriptor.setMTime(value);
-                } else if ("start_time".equals(header)) {
-                    jobDescriptor.setSTime(value);
-                } else if ("comp_time".equals(header)) {
-                    jobDescriptor.setCompTime(value);
-                } else if ("exec_host".equals(header)) {
-                    jobDescriptor.setExecuteNode(value);
-                } else if ("Output_Path".equals(header)) {
-                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
-                        jobDescriptor.setStandardOutFile(value);
-                    else {
-                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
-                        i++;
-                    }
-                } else if ("Error_Path".equals(header)) {
-                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
-                        jobDescriptor.setStandardErrorFile(value);
-                    else {
-                        String st = info[i + 1].trim();
-                        jobDescriptor.setStandardErrorFile(value + st);
-                        i++;
-                    }
-
-                } else if ("submit_args".equals(header)) {
-                    while (i + 1 < info.length) {
-                        if (info[i + 1].startsWith("\t")) {
-                            value += info[i + 1];
-                            i++;
-                        } else
-                            break;
-                    }
-                    value = value.replaceAll("\t", "");
-                    jobDescriptor.setSubmitArgs(value);
-                }
-            }
-        }
-    }
-
-    public String parseJobSubmission(String rawOutput) {
-        log.debug(rawOutput);
-        return rawOutput;  //In PBS stdout is going to be directly the jobID
-    }
-
-    public JobStatus parseJobStatus(String jobID, String rawOutput) {
-        boolean jobFount = false;
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String[] line = null;
-        int index = 0;
-        for (String anInfo : info) {
-            index++;
-            if (anInfo.contains("Job Id:")) {
-                if (anInfo.contains(jobID)) {
-                    jobFount = true;
-                    break;
-                }
-            }
-        }
-        if (jobFount) {
-            for (int i=index;i<info.length;i++) {
-                String anInfo = info[i];
-                if (anInfo.contains("=")) {
-                    line = anInfo.split("=", 2);
-                    if (line.length != 0) {
-                        if (line[0].contains("job_state")) {
-                            return JobStatus.valueOf(line[1].replaceAll(" ", ""));
-                        }
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
-        log.debug(rawOutput);
-        String[]    info = rawOutput.split("\n");
-//        int lastStop = 0;
-        for (String jobID : statusMap.keySet()) {
-            String jobName = jobID.split(",")[1];
-            boolean found = false;
-            for (int i = 0; i < info.length; i++) {
-                if (info[i].contains(jobName.substring(0,8))) {
-                    // now starts processing this line
-                    log.info(info[i]);
-                    String correctLine = info[i];
-                    String[] columns = correctLine.split(" ");
-                    List<String> columnList = new ArrayList<String>();
-                    for (String s : columns) {
-                        if (!"".equals(s)) {
-                            columnList.add(s);
-                        }
-                    }
-//                    lastStop = i + 1;
-                    try {
-                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(9)));
-                    }catch(IndexOutOfBoundsException e){
-                        statusMap.put(jobID, JobStatus.valueOf("U"));
-                    }
-                    found = true;
-                    break;
-                }
-            }
-            if(!found)
-            log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
-        }
-    }
-
-    @Override
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
-        String regJobId = "jobId";
-        Pattern pattern = Pattern.compile("\\s*(?<" + regJobId + ">[^\\s]*).* " + jobName + " "); // regex , JOB_ID will come as first column
-        if (rawOutput != null) {
-            Matcher matcher = pattern.matcher(rawOutput);
-            if (matcher.find()) {
-                return matcher.group(regJobId);
-            } else {
-                log.error("No match is found for JobName");
-                return null;
-            }
-        } else {
-            log.error("Error: RawOutput shouldn't be null");
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
deleted file mode 100644
index 5feed86..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.commons.io.FilenameUtils;
-
-import java.io.File;
-
-public class SlurmJobConfiguration implements JobManagerConfiguration{
-
-    private String jobDescriptionTemplateName;
-
-    private String scriptExtension;
-
-    private String installedPath;
-
-    private OutputParser parser;
-
-    public SlurmJobConfiguration(){
-        // this can be used to construct and use setter methods to set all the params in order
-    }
-    public SlurmJobConfiguration(String jobDescriptionTemplateName,
-                                   String scriptExtension,String installedPath,OutputParser parser) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-        this.scriptExtension = scriptExtension;
-        this.parser = parser;
-        if (installedPath.endsWith("/")) {
-            this.installedPath = installedPath;
-        } else {
-            this.installedPath = installedPath + "/";
-        }
-    }
-
-    public RawCommandInfo getCancelCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "scancel " + jobID);
-    }
-
-    public String getJobDescriptionTemplateName() {
-        return jobDescriptionTemplateName;
-    }
-
-    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-    }
-
-    public RawCommandInfo getMonitorCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "squeue -j " + jobID);
-    }
-
-    public String getScriptExtension() {
-        return scriptExtension;
-    }
-
-    public RawCommandInfo getSubmitCommand(String workingDirectory,String pbsFilePath) {
-          return new RawCommandInfo(this.installedPath + "sbatch " +
-                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
-    }
-
-    public String getInstalledPath() {
-        return installedPath;
-    }
-
-    public void setInstalledPath(String installedPath) {
-        this.installedPath = installedPath;
-    }
-
-    public OutputParser getParser() {
-        return parser;
-    }
-
-    public void setParser(OutputParser parser) {
-        this.parser = parser;
-    }
-
-    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
-        return new RawCommandInfo(this.installedPath + "squeue -u " + userName);
-    }
-
-    @Override
-    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
-        return new RawCommandInfo(this.installedPath + "squeue -n " + jobName + " -u " + userName);
-    }
-
-    @Override
-    public String getBaseCancelCommand() {
-        return "scancel";
-    }
-
-    @Override
-    public String getBaseMonitorCommand() {
-        return "squeue";
-    }
-
-    @Override
-    public String getBaseSubmitCommand() {
-        return "sbatch";
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
deleted file mode 100644
index d37d444..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class SlurmOutputParser implements OutputParser {
-    private static final Logger log = LoggerFactory.getLogger(SlurmOutputParser.class);
-    public static final int JOB_NAME_OUTPUT_LENGTH = 8;
-    public static final String STATUS = "status";
-
-    public void parseSingleJob(JobDescriptor descriptor, String rawOutput) throws SSHApiException {
-        log.info(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String lastString = info[info.length - 1];
-        if (lastString.contains("JOB ID")) {
-            // because there's no state
-            descriptor.setStatus("U");
-        } else {
-            int column = 0;
-            System.out.println(lastString);
-            for (String each : lastString.split(" ")) {
-                if (each.trim().isEmpty()) {
-                    continue;
-                } else {
-                    switch (column) {
-                        case 0:
-                            descriptor.setJobID(each);
-                            column++;
-                            break;
-                        case 1:
-                            descriptor.setPartition(each);
-                            column++;
-                            break;
-                        case 2:
-                            descriptor.setJobName(each);
-                            column++;
-                            break;
-                        case 3:
-                            descriptor.setUserName(each);
-                            column++;
-                            break;
-                        case 4:
-                            descriptor.setStatus(each);
-                            column++;
-                            break;
-                        case 5:
-                            descriptor.setUsedCPUTime(each);
-                            column++;
-                            break;
-                        case 6:
-                            try {
-                                int nodes = Integer.parseInt(each);
-                                descriptor.setNodes(nodes);
-                            }catch (Exception e){
-                                log.error("Node count read from command output is not an integer !!!");
-                            }
-                            column++;
-                            break;
-                        case 7:
-                            descriptor.setNodeList(each);
-                            column++;
-                            break;
-                    }
-                }
-            }
-        }
-
-    }
-
-    /**
-     * This can be used to parseSingleJob the outpu of sbatch and extrac the jobID from the content
-     *
-     * @param rawOutput
-     * @return
-     */
-    public String parseJobSubmission(String rawOutput) throws SSHApiException {
-        // FIXME : use regex to match correct jobId;
-        log.info(rawOutput);
-        String[] info = rawOutput.split("\n");
-        for (String anInfo : info) {
-            if (anInfo.contains("Submitted batch job")) {
-                String[] split = anInfo.split("Submitted batch job");
-                return split[1].trim();
-            }
-        }
-        return "";
-//        throw new SSHApiException(rawOutput);  //todo//To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
-        log.info(rawOutput);
-        Pattern pattern = Pattern.compile(jobID + "(?=\\s+\\S+\\s+\\S+\\s+\\S+\\s+(?<" + STATUS + ">\\w+))");
-        Matcher matcher = pattern.matcher(rawOutput);
-        if (matcher.find()) {
-            return JobStatus.valueOf(matcher.group(STATUS));
-        }
-        return null;
-    }
-
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String lastString = info[info.length - 1];
-        if (lastString.contains("JOBID") || lastString.contains("PARTITION")) {
-            log.info("There are no jobs with this username ... ");
-            return;
-        }
-//        int lastStop = 0;
-        for (String jobID : statusMap.keySet()) {
-            String jobId = jobID.split(",")[0];
-            String jobName = jobID.split(",")[1];
-            boolean found = false;
-            for (int i = 0; i < info.length; i++) {
-                if (info[i].contains(jobName.substring(0, 8))) {
-                    // now starts processing this line
-                    log.info(info[i]);
-                    String correctLine = info[i];
-                    String[] columns = correctLine.split(" ");
-                    List<String> columnList = new ArrayList<String>();
-                    for (String s : columns) {
-                        if (!"".equals(s)) {
-                            columnList.add(s);
-                        }
-                    }
-                    try {
-                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
-                    } catch (IndexOutOfBoundsException e) {
-                        statusMap.put(jobID, JobStatus.valueOf("U"));
-                    }
-                    found = true;
-                    break;
-                }
-            }
-            if (!found) {
-                log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobId);
-            }
-        }
-    }
-
-    @Override
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
-        String regJobId = "jobId";
-        if (jobName == null) {
-            return null;
-        } else if(jobName.length() > JOB_NAME_OUTPUT_LENGTH) {
-            jobName = jobName.substring(0, JOB_NAME_OUTPUT_LENGTH);
-        }
-        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
-        if (rawOutput != null) {
-            Matcher matcher = pattern.matcher(rawOutput);
-            if (matcher.find()) {
-                return matcher.group(regJobId);
-            } else {
-                log.error("No match is found for JobName");
-                return null;
-            }
-        } else {
-            log.error("Error: RawOutput shouldn't be null");
-            return null;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEJobConfiguration.java
deleted file mode 100644
index 8817c06..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEJobConfiguration.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.commons.io.FilenameUtils;
-
-import java.io.File;
-
-public class UGEJobConfiguration implements JobManagerConfiguration {
-
-    private String jobDescriptionTemplateName;
-
-    private String scriptExtension;
-
-    private String installedPath;
-
-    private OutputParser parser;
-
-    public UGEJobConfiguration() {
-        // this can be used to construct and use setter methods to set all the params in order
-    }
-
-    public UGEJobConfiguration(String jobDescriptionTemplateName,
-                               String scriptExtension, String installedPath, OutputParser parser) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-        this.scriptExtension = scriptExtension;
-        this.parser = parser;
-        if (installedPath.endsWith("/")) {
-            this.installedPath = installedPath;
-        } else {
-            this.installedPath = installedPath + "/";
-        }
-    }
-
-    public RawCommandInfo getCancelCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
-    }
-
-    public String getJobDescriptionTemplateName() {
-        return jobDescriptionTemplateName;
-    }
-
-    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
-        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
-    }
-
-    public RawCommandInfo getMonitorCommand(String jobID) {
-        return new RawCommandInfo(this.installedPath + "qstat -j " + jobID);
-    }
-
-    public String getScriptExtension() {
-        return scriptExtension;
-    }
-
-    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
-        return new RawCommandInfo(this.installedPath + "qsub " +
-                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
-    }
-
-    public String getInstalledPath() {
-        return installedPath;
-    }
-
-    public void setInstalledPath(String installedPath) {
-        this.installedPath = installedPath;
-    }
-
-    public OutputParser getParser() {
-        return parser;
-    }
-
-    public void setParser(OutputParser parser) {
-        this.parser = parser;
-    }
-
-    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
-        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
-    }
-
-    @Override
-    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
-        // For PBS there is no option to get jobDetails by JobName, so we search with userName
-        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
-    }
-
-    @Override
-    public String  getBaseCancelCommand() {
-        return "qdel";
-    }
-
-    @Override
-    public String  getBaseMonitorCommand() {
-        return "qstat";
-    }
-
-    @Override
-    public String getBaseSubmitCommand() {
-        return "qsub ";
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
deleted file mode 100644
index 1465c4f..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.job;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class UGEOutputParser implements OutputParser{
-    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
-    public static final String JOB_ID = "jobId";
-
-    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String[] line;
-        for (int i = 0; i < info.length; i++) {
-            if (info[i].contains("=")) {
-                line = info[i].split("=", 2);
-            } else {
-                line = info[i].split(":", 2);
-            }
-            if (line.length >= 2) {
-                String header = line[0].trim();
-                log.debug("Header = " + header);
-                String value = line[1].trim();
-                log.debug("value = " + value);
-
-                if (header.equals("Variable_List")) {
-                    while (info[i + 1].startsWith("\t")) {
-                        value += info[i + 1];
-                        i++;
-                    }
-                    value = value.replaceAll("\t", "");
-                    jobDescriptor.setVariableList(value);
-                } else if ("Job Id".equals(header)) {
-                    jobDescriptor.setJobID(value);
-                } else if ("Job_Name".equals(header)) {
-                    jobDescriptor.setJobName(value);
-                } else if ("Account_Name".equals(header)) {
-                    jobDescriptor.setAcountString(value);
-                } else if ("job_state".equals(header)) {
-                    jobDescriptor.setStatus(value);
-                } else if ("Job_Owner".equals(header)) {
-                    jobDescriptor.setOwner(value);
-                } else if ("resources_used.cput".equals(header)) {
-                    jobDescriptor.setUsedCPUTime(value);
-                } else if ("resources_used.mem".equals(header)) {
-                    jobDescriptor.setUsedMemory(value);
-                } else if ("resources_used.walltime".equals(header)) {
-                    jobDescriptor.setEllapsedTime(value);
-                } else if ("job_state".equals(header)) {
-                    jobDescriptor.setStatus(value);
-                } else if ("queue".equals(header))
-                    jobDescriptor.setQueueName(value);
-                else if ("ctime".equals(header)) {
-                    jobDescriptor.setCTime(value);
-                } else if ("qtime".equals(header)) {
-                    jobDescriptor.setQTime(value);
-                } else if ("mtime".equals(header)) {
-                    jobDescriptor.setMTime(value);
-                } else if ("start_time".equals(header)) {
-                    jobDescriptor.setSTime(value);
-                } else if ("comp_time".equals(header)) {
-                    jobDescriptor.setCompTime(value);
-                } else if ("exec_host".equals(header)) {
-                    jobDescriptor.setExecuteNode(value);
-                } else if ("Output_Path".equals(header)) {
-                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
-                        jobDescriptor.setStandardOutFile(value);
-                    else {
-                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
-                        i++;
-                    }
-                } else if ("Error_Path".equals(header)) {
-                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
-                        jobDescriptor.setStandardErrorFile(value);
-                    else {
-                        String st = info[i + 1].trim();
-                        jobDescriptor.setStandardErrorFile(value + st);
-                        i++;
-                    }
-
-                } else if ("submit_args".equals(header)) {
-                    while (i + 1 < info.length) {
-                        if (info[i + 1].startsWith("\t")) {
-                            value += info[i + 1];
-                            i++;
-                        } else
-                            break;
-                    }
-                    value = value.replaceAll("\t", "");
-                    jobDescriptor.setSubmitArgs(value);
-                }
-            }
-        }
-    }
-
-	public String parseJobSubmission(String rawOutput) {
-		log.debug(rawOutput);
-		if (rawOutput != null && !rawOutput.isEmpty()) {
-			String[] info = rawOutput.split("\n");
-			String lastLine = info[info.length - 1];
-			return lastLine.split(" ")[2]; // In PBS stdout is going to be directly the jobID
-		} else {
-			return "";
-		}
-	}
-
-    public JobStatus parseJobStatus(String jobID, String rawOutput) {
-        Pattern pattern = Pattern.compile("job_number:[\\s]+" + jobID);
-        Matcher matcher = pattern.matcher(rawOutput);
-        if (matcher.find()) {
-            return JobStatus.Q; // fixme; return correct status.
-        }
-        return JobStatus.U;
-    }
-
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        int lastStop = 0;
-        for (String jobID : statusMap.keySet()) {
-            for(int i=lastStop;i<info.length;i++){
-               if(jobID.split(",")[0].contains(info[i].split(" ")[0]) && !"".equals(info[i].split(" ")[0])){
-                   // now starts processing this line
-                   log.info(info[i]);
-                   String correctLine = info[i];
-                   String[] columns = correctLine.split(" ");
-                   List<String> columnList = new ArrayList<String>();
-                   for (String s : columns) {
-                       if (!"".equals(s)) {
-                           columnList.add(s);
-                       }
-                   }
-                   lastStop = i+1;
-                   if ("E".equals(columnList.get(4))) {
-                       // There is another status with the same letter E other than error status
-                       // to avoid that we make a small tweek to the job status
-                       columnList.set(4, "Er");
-                   }
-                   statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
-                   break;
-               }
-            }
-        }
-    }
-
-    @Override
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
-        if (jobName.length() > 10) {
-            jobName = jobName.substring(0, 10);
-        }
-        Pattern pattern = Pattern.compile("(?<" + JOB_ID + ">\\S+)\\s+\\S+\\s+(" + jobName + ")");
-        Matcher matcher = pattern.matcher(rawOutput);
-        if (matcher.find()) {
-            return matcher.group(JOB_ID);
-        }
-        return null;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/config/ConfigReader.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/config/ConfigReader.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/config/ConfigReader.java
deleted file mode 100644
index 088ab38..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/config/ConfigReader.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * 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.gsi.ssh.config;
-
-import com.sun.security.auth.login.ConfigFile;
-import sun.security.jgss.LoginConfigImpl;
-
-import javax.security.auth.login.Configuration;
-import javax.security.auth.login.LoginContext;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-/**
- * Reads basic configurations.
- */
-public class ConfigReader {
-
-    private static final String CONFIGURATION_FILE = "gsissh.properties";
-
-
-    private Properties properties;
-
-    /**
-     * Reads configurations from the class path configuration file.
-     * @throws IOException If an error occurred while reading configurations.
-     */
-    public ConfigReader() throws IOException {
-        this.properties = getPropertiesFromClasspath(CONFIGURATION_FILE);
-    }
-
-    private Properties getPropertiesFromClasspath(String propFileName) throws IOException {
-        Properties props = new Properties();
-        InputStream inputStream = this.getClass().getClassLoader()
-                .getResourceAsStream(propFileName);
-
-        if (inputStream == null) {
-            throw new FileNotFoundException("System configuration file '" + propFileName
-                    + "' not found in the classpath");
-        }
-
-        props.load(inputStream);
-
-        return props;
-    }
-
-    public String getConfiguration(String key) {
-        return this.properties.getProperty(key);
-    }
-
-
-    /**
-     * Gets all the SSH related properties used by JSch.
-     * @return All properties.
-     */
-    public Properties getProperties() {
-        return this.properties;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/DefaultJobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/DefaultJobSubmissionListener.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/DefaultJobSubmissionListener.java
deleted file mode 100644
index 749fc0d..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/DefaultJobSubmissionListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.listener.JobSubmissionListener;
-
-public class DefaultJobSubmissionListener extends JobSubmissionListener {
-
-    public void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException {
-        System.out.println("Job status has changed to : " + jobDescriptor.getStatus());
-    }
-
-    @Override
-    public void statusChanged(JobStatus jobStatus) throws SSHApiException {
-        System.out.println("Job status has changed to : " + jobStatus.toString());
-    }
-
-    @Override
-    public boolean isJobDone() throws SSHApiException {
-        return getJobStatus().equals(JobStatus.C);
-    }
-}


[13/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
deleted file mode 100644
index 6a4ed3b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * 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.monitor.util;
-
-import com.rabbitmq.client.Connection;
-import com.rabbitmq.client.ConnectionFactory;
-import com.rabbitmq.client.DefaultSaslConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManagerFactory;
-import java.security.KeyStore;
-import java.util.Collections;
-import java.util.List;
-
-public class AMQPConnectionUtil {
-    private final static Logger logger = LoggerFactory.getLogger(AMQPConnectionUtil.class);
-    public static Connection connect(List<String>hosts,String vhost, String proxyFile) {
-        Collections.shuffle(hosts);
-        for (String host : hosts) {
-            Connection connection = connect(host, vhost, proxyFile);
-            if (host != null) {
-                System.out.println("connected to " + host);
-                return connection;
-            }
-        }
-        return null;
-    }
-
-    public static Connection connect(String host, String vhost, String proxyFile) {
-        Connection connection;
-        try {
-            String keyPassPhrase = "test123";
-            KeyStore ks = X509Helper.keyStoreFromPEM(proxyFile, keyPassPhrase);
-            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
-            kmf.init(ks, keyPassPhrase.toCharArray());
-
-            KeyStore tks = X509Helper.trustKeyStoreFromCertDir();
-            TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
-            tmf.init(tks);
-
-            SSLContext c = SSLContext.getInstance("SSLv3");
-            c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-
-            ConnectionFactory factory = new ConnectionFactory();
-            factory.setHost(host);
-            factory.setPort(5671);
-            factory.useSslProtocol(c);
-            factory.setVirtualHost(vhost);
-            factory.setSaslConfig(DefaultSaslConfig.EXTERNAL);
-
-            connection = factory.newConnection();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-        return connection;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
deleted file mode 100644
index e53fe09..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *
- * 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.monitor.util;
-
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.GFacHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.HostMonitorData;
-import org.apache.airavata.gfac.monitor.UserMonitorData;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooDefs;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-
-public class CommonUtils {
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(CommonUtils.class);
-
-    public static String getChannelID(MonitorID monitorID) {
-        return monitorID.getUserName() + "-" + monitorID.getComputeResourceDescription().getHostName();
-    }
-
-    public static String getRoutingKey(MonitorID monitorID) {
-        return "*." + monitorID.getUserName() + "." + monitorID.getComputeResourceDescription().getIpAddresses().get(0);
-    }
-
-    public static String getChannelID(String userName,String hostAddress) {
-        return userName + "-" + hostAddress;
-    }
-
-    public static String getRoutingKey(String userName,String hostAddress) {
-        return "*." + userName + "." + hostAddress;
-    }
-
-    public static void addMonitortoQueue(BlockingQueue<UserMonitorData> queue, MonitorID monitorID, JobExecutionContext jobExecutionContext) throws AiravataMonitorException {
-        synchronized (queue) {
-            Iterator<UserMonitorData> iterator = queue.iterator();
-            while (iterator.hasNext()) {
-                UserMonitorData next = iterator.next();
-                if (next.getUserName().equals(monitorID.getUserName())) {
-                    // then this is the right place to update
-                    List<HostMonitorData> monitorIDs = next.getHostMonitorData();
-                    for (HostMonitorData host : monitorIDs) {
-                        if (isEqual(host.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
-                            // ok we found right place to add this monitorID
-                            host.addMonitorIDForHost(monitorID);
-                            logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                                    " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
-                            return;
-                        }
-                    }
-                    // there is a userMonitor object for this user name but no Hosts for this host
-                    // so we have to create new Hosts
-                    HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
-                    hostMonitorData.addMonitorIDForHost(monitorID);
-                    next.addHostMonitorData(hostMonitorData);
-                    logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                            " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
-                    return;
-                }
-            }
-            HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
-            hostMonitorData.addMonitorIDForHost(monitorID);
-
-            UserMonitorData userMonitorData = new UserMonitorData(monitorID.getUserName());
-            userMonitorData.addHostMonitorData(hostMonitorData);
-            try {
-                queue.put(userMonitorData);
-                logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                        " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
-            } catch (InterruptedException e) {
-                throw new AiravataMonitorException(e);
-            }
-        }
-    }
-
-    private static boolean isEqual(ComputeResourceDescription comRes_1, ComputeResourceDescription comRes_2) {
-        return comRes_1.getComputeResourceId().equals(comRes_2.getComputeResourceId()) &&
-                comRes_1.getHostName().equals(comRes_2.getHostName());
-    }
-
-    public static boolean isTheLastJobInQueue(BlockingQueue<MonitorID> queue,MonitorID monitorID){
-        Iterator<MonitorID> iterator = queue.iterator();
-        while(iterator.hasNext()){
-            MonitorID next = iterator.next();
-            if (monitorID.getUserName().equals(next.getUserName()) &&
-                    CommonUtils.isEqual(monitorID.getComputeResourceDescription(), next.getComputeResourceDescription())) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * This method doesn't have to be synchronized because it will be invoked by HPCPullMonitor which already synchronized
-     * @param monitorID
-     * @throws AiravataMonitorException
-     */
-    public static void removeMonitorFromQueue(UserMonitorData userMonitorData, MonitorID monitorID) throws AiravataMonitorException {
-                if (userMonitorData.getUserName().equals(monitorID.getUserName())) {
-                    // then this is the right place to update
-                    List<HostMonitorData> hostMonitorData = userMonitorData.getHostMonitorData();
-                    Iterator<HostMonitorData> iterator1 = hostMonitorData.iterator();
-                    while (iterator1.hasNext()) {
-                        HostMonitorData iHostMonitorID = iterator1.next();
-                        if (isEqual(iHostMonitorID.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
-                            Iterator<MonitorID> iterator2 = iHostMonitorID.getMonitorIDs().iterator();
-                            while (iterator2.hasNext()) {
-                                MonitorID iMonitorID = iterator2.next();
-                                if (iMonitorID.getJobID().equals(monitorID.getJobID())
-                                        || iMonitorID.getJobName().equals(monitorID.getJobName())) {
-                                    // OK we found the object, we cannot do list.remove(object) states of two objects
-                                    // could be different, thats why we check the jobID
-                                    iterator2.remove();
-                                    logger.infoId(monitorID.getJobID(), "Removed the jobId: {} JobName: {} from monitoring last " +
-                                            "status:{}", monitorID.getJobID(),monitorID.getJobName(), monitorID.getStatus().toString());
-
-                                    return;
-                                }
-                            }
-                        }
-                    }
-                }
-        logger.info("Cannot find the given MonitorID in the queue with userName " +
-                monitorID.getUserName() + "  and jobID " + monitorID.getJobID());
-        logger.info("This might not be an error because someone else removed this job from the queue");
-    }
-
-
-    public static void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
-
-        for (GFacHandlerConfig handlerClassName : handlers) {
-            Class<? extends GFacHandler> handlerClass;
-            GFacHandler handler;
-            try {
-                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                handler = handlerClass.newInstance();
-                handler.initProperties(handlerClassName.getProperties());
-            } catch (ClassNotFoundException e) {
-                logger.error(e.getMessage());
-                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-            } catch (InstantiationException e) {
-                logger.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            } catch (IllegalAccessException e) {
-                logger.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            }
-            try {
-                handler.invoke(jobExecutionContext);
-            } catch (Exception e) {
-                // TODO: Better error reporting.
-                throw new GFacException("Error Executing a OutFlow Handler", e);
-            }
-        }
-    }
-
-        /**
-         *  Update job count for a given set of paths.
-         * @param curatorClient - CuratorFramework instance
-         * @param changeCountMap - map of change job count with relevant path
-         * @param isAdd - Should add or reduce existing job count by the given job count.
-         */
-    public static void updateZkWithJobCount(CuratorFramework curatorClient, final Map<String, Integer> changeCountMap, boolean isAdd) {
-        StringBuilder changeZNodePaths = new StringBuilder();
-        try {
-            for (String path : changeCountMap.keySet()) {
-                if (isAdd) {
-                    CommonUtils.checkAndCreateZNode(curatorClient, path);
-                }
-                byte[] byteData = curatorClient.getData().forPath(path);
-                String nodeData;
-                if (byteData == null) {
-                    if (isAdd) {
-                        curatorClient.setData().withVersion(-1).forPath(path, String.valueOf(changeCountMap.get(path)).getBytes());
-                    } else {
-                        // This is not possible, but we handle in case there any data zookeeper communication failure
-                        logger.warn("Couldn't reduce job count in " + path + " as it returns null data. Hence reset the job count to 0");
-                        curatorClient.setData().withVersion(-1).forPath(path, "0".getBytes());
-                    }
-                } else {
-                    nodeData = new String(byteData);
-                    if (isAdd) {
-                        curatorClient.setData().withVersion(-1).forPath(path,
-                                String.valueOf(changeCountMap.get(path) + Integer.parseInt(nodeData)).getBytes());
-                    } else {
-                        int previousCount = Integer.parseInt(nodeData);
-                        int removeCount = changeCountMap.get(path);
-                        if (previousCount >= removeCount) {
-                            curatorClient.setData().withVersion(-1).forPath(path,
-                                    String.valueOf(previousCount - removeCount).getBytes());
-                        } else {
-                            // This is not possible, do we need to reset the job count to 0 ?
-                            logger.error("Requested remove job count is " + removeCount +
-                                    " which is higher than the existing job count " + previousCount
-                                    + " in  " + path + " path.");
-                        }
-                    }
-                }
-                changeZNodePaths.append(path).append(":");
-            }
-
-            // update stat node to trigger orchestrator watchers
-            if (changeCountMap.size() > 0) {
-                changeZNodePaths.deleteCharAt(changeZNodePaths.length() - 1);
-                curatorClient.setData().withVersion(-1).forPath("/" + Constants.STAT, changeZNodePaths.toString().getBytes());
-            }
-        } catch (Exception e) {
-            logger.error("Error while writing job count to zookeeper", e);
-        }
-
-    }
-
-    /**
-     * Increase job count by one and update the zookeeper
-     * @param monitorID - Job monitorId
-     */
-    public static void increaseZkJobCount(MonitorID monitorID) {
-        Map<String, Integer> addMap = new HashMap<String, Integer>();
-        addMap.put(CommonUtils.getJobCountUpdatePath(monitorID), 1);
-        updateZkWithJobCount(monitorID.getJobExecutionContext().getCuratorClient(), addMap, true);
-    }
-
-    /**
-     * Construct and return the path for a given MonitorID , eg: /stat/{username}/{resourceName}/job
-     * @param monitorID - Job monitorId
-     * @return
-     */
-    public static String getJobCountUpdatePath(MonitorID monitorID){
-        return new StringBuilder("/").append(Constants.STAT).append("/").append(monitorID.getUserName())
-                .append("/").append(monitorID.getComputeResourceDescription().getHostName()).append("/").append(Constants.JOB).toString();
-    }
-
-    /**
-     * Check whether znode is exist in given path if not create a new znode
-     * @param curatorClient - zookeeper instance
-     * @param path - path to check znode
-     * @throws KeeperException
-     * @throws InterruptedException
-     */
-    private static void checkAndCreateZNode(CuratorFramework curatorClient , String path) throws Exception {
-        if (curatorClient.checkExists().forPath(path) == null) { // if znode doesn't exist
-            if (path.lastIndexOf("/") > 1) {  // recursively traverse to parent znode and check parent exist
-                checkAndCreateZNode(curatorClient, (path.substring(0, path.lastIndexOf("/"))));
-            }
-            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(path);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
deleted file mode 100644
index 08c3f67..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *
- * 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.monitor.util;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-
-import java.io.*;
-import java.security.*;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.CertificateParsingException;
-import java.security.cert.X509Certificate;
-import java.security.spec.InvalidKeySpecException;
-
-public class X509Helper {
-
-    static {
-        // parsing of RSA key fails without this
-        java.security.Security.addProvider(new BouncyCastleProvider());
-    }
-
-
-
-    public static KeyStore keyStoreFromPEM(String proxyFile,
-                                           String keyPassPhrase) throws IOException,
-            CertificateException,
-            NoSuchAlgorithmException,
-            InvalidKeySpecException,
-            KeyStoreException {
-        return keyStoreFromPEM(proxyFile,proxyFile,keyPassPhrase);
-    }
-
-    public static KeyStore keyStoreFromPEM(String certFile,
-                                           String keyFile,
-                                           String keyPassPhrase) throws IOException,
-                                                                        CertificateException,
-                                                                        NoSuchAlgorithmException,
-                                                                        InvalidKeySpecException,
-                                                                        KeyStoreException {
-        CertificateFactory cf = CertificateFactory.getInstance("X.509");
-        X509Certificate cert = (X509Certificate)cf.generateCertificate(new FileInputStream(certFile));
-        //System.out.println(cert.toString());
-
-        // this works for proxy files, too, since it skips over the certificate
-        BufferedReader reader = new BufferedReader(new FileReader(keyFile));
-        String line = null;
-        StringBuilder builder = new StringBuilder();
-        boolean inKey = false;
-        while((line=reader.readLine()) != null) {
-            if (line.contains("-----BEGIN RSA PRIVATE KEY-----")) {
-                inKey = true;
-            }
-            if (inKey) {
-                builder.append(line);
-                builder.append(System.getProperty("line.separator"));
-            }
-            if (line.contains("-----END RSA PRIVATE KEY-----")) {
-                inKey = false;
-            }
-        }
-        String privKeyPEM = builder.toString();
-        //System.out.println(privKeyPEM);
-
-        // using BouncyCastle
-//        PEMReader pemParser = new PEMReader(new StringReader(privKeyPEM));
-//        Object object = pemParser.readObject();
-//
-//        PrivateKey privKey = null;
-//        if(object instanceof KeyPair){
-//            privKey = ((KeyPair)object).getPrivate();
-//        }
-        // PEMParser from BouncyCastle is good for reading PEM files, but I didn't want to add that dependency
-        /*
-        // Base64 decode the data
-        byte[] encoded = javax.xml.bind.DatatypeConverter.parseBase64Binary(privKeyPEM);
-
-        // PKCS8 decode the encoded RSA private key
-        java.security.spec.PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded);
-        KeyFactory kf = KeyFactory.getInstance("RSA");
-        PrivateKey privKey = kf.generatePrivate(keySpec);
-        //RSAPrivateKey privKey = (RSAPrivateKey)kf.generatePrivate(keySpec);
-        */
-        //System.out.println(privKey.toString());
-
-//        KeyStore keyStore = KeyStore.getInstance("PKCS12");
-//        keyStore.load(null,null);
-//
-//        KeyStore.PrivateKeyEntry entry =
-//            new KeyStore.PrivateKeyEntry(privKey,
-//                                         new java.security.cert.Certificate[] {(java.security.cert.Certificate)cert});
-//        KeyStore.PasswordProtection prot = new KeyStore.PasswordProtection(keyPassPhrase.toCharArray());
-//        keyStore.setEntry(cert.getSubjectX500Principal().getName(), entry, prot);
-
-//        return keyStore;
-        //TODO: Problem with BouncyCastle version used in gsissh 
-        throw new CertificateException("Method not implemented");
-
-    }
-
-
-    public static KeyStore trustKeyStoreFromCertDir() throws IOException,
-                                                             KeyStoreException,
-                                                             CertificateException,
-                                                             NoSuchAlgorithmException, ApplicationSettingsException {
-        return trustKeyStoreFromCertDir(ServerSettings.getSetting("trusted.cert.location"));
-    }
-
-    public static KeyStore trustKeyStoreFromCertDir(String certDir) throws IOException,
-                                                                           KeyStoreException,
-                                                                           CertificateException,
-                                                                           NoSuchAlgorithmException {
-        KeyStore ks = KeyStore.getInstance("JKS");
-        ks.load(null,null);
-
-        File dir = new File(certDir);
-        for(File file : dir.listFiles()) {
-            if (!file.isFile()) {
-                continue;
-            }
-            if (!file.getName().endsWith(".0")) {
-                continue;
-            }
-
-            try {
-                //System.out.println("reading file "+file.getName());
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-                X509Certificate cert = (X509Certificate) cf.generateCertificate(new FileInputStream(file));
-                //System.out.println(cert.toString());
-
-                KeyStore.TrustedCertificateEntry entry = new KeyStore.TrustedCertificateEntry(cert);
-
-                ks.setEntry(cert.getSubjectX500Principal().getName(), entry, null);
-            } catch (KeyStoreException e) {
-            } catch (CertificateParsingException e) {
-                continue;
-            }
-
-        }
-
-        return ks;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/errors.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/errors.properties b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/errors.properties
deleted file mode 100644
index 88c41b8..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/errors.properties
+++ /dev/null
@@ -1,197 +0,0 @@
-#
-#
-# 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.
-#
-
-# Directly copied from jglobus. Not a good way to manager error properties.
-1 = Parameter not supported
-2 = The RSL length is greater than the maximum allowed
-3 = No resources available
-4 = Bad directory specified
-5 = The executable does not exist
-6 = Insufficient funds
-7 = Authentication with the remote server failed
-8 = Job cancelled by user
-9 = Job cancelled by system
-
-10 = Data transfer to the server failed
-11 = The stdin file does not exist
-12 = The connection to the server failed (check host and port)
-13 = The provided RSL 'maxtime' value is invalid (not an integer or must be greater than 0)
-14 = The provided RSL 'count' value is invalid (not an integer or must be greater than 0)
-15 = The job manager received an invalid RSL
-16 = Could not connect to job manager
-17 = The job failed when the job manager attempted to run it
-18 = Paradyn error
-19 = The provided RSL 'jobtype' value is invalid
-
-20 = The provided RSL 'myjob' value is invalid
-21 = The job manager failed to locate an internal script argument file
-22 = The job manager failed to create an internal script argument file
-23 = The job manager detected an invalid job state
-24 = The job manager detected an invalid script response
-25 = The job manager detected an invalid job state
-26 = The provided RSL 'jobtype' value is not supported by this job manager
-27 = Unimplemented
-28 = The job manager failed to create an internal script submission file
-29 = The job manager cannot find the user proxy
-
-30 = The job manager failed to open the user proxy
-31 = The job manager failed to cancel the job as requested
-32 = System memory allocation failed
-33 = The interprocess job communication initialization failed
-34 = The interprocess job communication setup failed
-35 = The provided RSL 'host count' value is invalid
-36 = One of the provided RSL parameters is unsupported
-37 = The provided RSL 'queue' parameter is invalid
-38 = The provided RSL 'project' parameter is invalid
-39 = The provided RSL string includes variables that could not be identified
-
-40 = The provided RSL 'environment' parameter is invalid
-41 = The provided RSL 'dryrun' parameter is invalid
-42 = The provided RSL is invalid (an empty string)
-43 = The job manager failed to stage the executable
-44 = The job manager failed to stage the stdin file
-45 = The requested job manager type is invalid
-46 = The provided RSL 'arguments' parameter is invalid
-47 = The gatekeeper failed to run the job manager
-48 = The provided RSL could not be properly parsed
-49 = There is a version mismatch between GRAM components
-
-50 = The provided RSL 'arguments' parameter is invalid
-51 = The provided RSL 'count' parameter is invalid
-52 = The provided RSL 'directory' parameter is invalid
-53 = The provided RSL 'dryrun' parameter is invalid
-54 = The provided RSL 'environment' parameter is invalid
-55 = The provided RSL 'executable' parameter is invalid
-56 = The provided RSL 'host_count' parameter is invalid
-57 = The provided RSL 'jobtype' parameter is invalid
-58 = The provided RSL 'maxtime' parameter is invalid
-59 = The provided RSL 'myjob' parameter is invalid
-
-60 = The provided RSL 'paradyn' parameter is invalid
-61 = The provided RSL 'project' parameter is invalid
-62 = The provided RSL 'queue' parameter is invalid
-63 = The provided RSL 'stderr' parameter is invalid
-64 = The provided RSL 'stdin' parameter is invalid
-65 = The provided RSL 'stdout' parameter is invalid
-66 = The job manager failed to locate an internal script
-67 = The job manager failed on the system call pipe()
-68 = The job manager failed on the system call fcntl()
-69 = The job manager failed to create the temporary stdout filename
-
-70 = The job manager failed to create the temporary stderr filename
-71 = The job manager failed on the system call fork()
-72 = The executable file permissions do not allow execution
-73 = The job manager failed to open stdout
-74 = The job manager failed to open stderr
-75 = The cache file could not be opened in order to relocate the user proxy
-76 = Cannot access cache files in ~/.globus/.gass_cache, check permissions, quota, and disk space
-77 = The job manager failed to insert the contact in the client contact list
-78 = The contact was not found in the job manager's client contact list
-79 = Connecting to the job manager failed.  Possible reasons: job terminated, invalid job contact, network problems, ...
-
-80 = The syntax of the job contact is invalid
-81 = The executable parameter in the RSL is undefined
-82 = The job manager service is misconfigured.  condor arch undefined
-83 = The job manager service is misconfigured.  condor os undefined
-84 = The provided RSL 'min_memory' parameter is invalid
-85 = The provided RSL 'max_memory' parameter is invalid
-86 = The RSL 'min_memory' value is not zero or greater
-87 = The RSL 'max_memory' value is not zero or greater
-88 = The creation of a HTTP message failed
-89 = Parsing incoming HTTP message failed
-
-90 = The packing of information into a HTTP message failed
-91 = An incoming HTTP message did not contain the expected information
-92 = The job manager does not support the service that the client requested
-93 = The gatekeeper failed to find the requested service
-94 = The jobmanager does not accept any new requests (shutting down)
-95 = The client failed to close the listener associated with the callback URL
-96 = The gatekeeper contact cannot be parsed
-97 = The job manager could not find the 'poe' command
-98 = The job manager could not find the 'mpirun' command
-99 = The provided RSL 'start_time' parameter is invalid"
-100 = The provided RSL 'reservation_handle' parameter is invalid
-
-101 = The provided RSL 'max_wall_time' parameter is invalid
-102 = The RSL 'max_wall_time' value is not zero or greater
-103 = The provided RSL 'max_cpu_time' parameter is invalid
-104 = The RSL 'max_cpu_time' value is not zero or greater
-105 = The job manager is misconfigured, a scheduler script is missing
-106 = The job manager is misconfigured, a scheduler script has invalid permissions
-107 = The job manager failed to signal the job
-108 = The job manager did not recognize/support the signal type
-109 = The job manager failed to get the job id from the local scheduler
-
-110 = The job manager is waiting for a commit signal
-111 = The job manager timed out while waiting for a commit signal
-112 = The provided RSL 'save_state' parameter is invalid
-113 = The provided RSL 'restart' parameter is invalid
-114 = The provided RSL 'two_phase' parameter is invalid
-115 = The RSL 'two_phase' value is not zero or greater
-116 = The provided RSL 'stdout_position' parameter is invalid
-117 = The RSL 'stdout_position' value is not zero or greater
-118 = The provided RSL 'stderr_position' parameter is invalid
-119 = The RSL 'stderr_position' value is not zero or greater
-
-120 = The job manager restart attempt failed
-121 = The job state file doesn't exist
-122 = Could not read the job state file
-123 = Could not write the job state file
-124 = The old job manager is still alive
-125 = The job manager state file TTL expired
-126 = It is unknown if the job was submitted
-127 = The provided RSL 'remote_io_url' parameter is invalid
-128 = Could not write the remote io url file
-129 = The standard output/error size is different
-
-130 = The job manager was sent a stop signal (job is still running)
-131 = The user proxy expired (job is still running)
-132 = The job was not submitted by original jobmanager
-133 = The job manager is not waiting for that commit signal
-134 = The provided RSL scheduler specific parameter is invalid
-135 = The job manager could not stage in a file
-136 = The scratch directory could not be created
-137 = The provided 'gass_cache' parameter is invalid
-138 = The RSL contains attributes which are not valid for job submission
-139 = The RSL contains attributes which are not valid for stdio update
-
-140 = The RSL contains attributes which are not valid for job restart
-141 = The provided RSL 'file_stage_in' parameter is invalid
-142 = The provided RSL 'file_stage_in_shared' parameter is invalid
-143 = The provided RSL 'file_stage_out' parameter is invalid
-144 = The provided RSL 'gass_cache' parameter is invalid
-145 = The provided RSL 'file_cleanup' parameter is invalid
-146 = The provided RSL 'scratch_dir' parameter is invalid
-147 = The provided scheduler-specific RSL parameter is invalid
-148 = A required RSL attribute was not defined in the RSL spec
-149 = The gass_cache attribute points to an invalid cache directory
-
-150 = The provided RSL 'save_state' parameter has an invalid value
-151 = The job manager could not open the RSL attribute validation file
-152 = The  job manager could not read the RSL attribute validation file
-153 = The provided RSL 'proxy_timeout' is invalid
-154 = The RSL 'proxy_timeout' value is not greater than zero
-155 = The job manager could not stage out a file
-156 = The job contact string does not match any which the job manager is handling
-157 = Proxy delegation failed
-158 = The job manager could not lock the state lock file
-
-1000 = Failed to start up callback handler
-1003 = Job contact not set

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AccessPolicy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AccessPolicy.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AccessPolicy.json
deleted file mode 100644
index 8f6cfe1..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AccessPolicy.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AccessPolicy.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
-  "properties": {
-    "EndpointID": {
-      "type": "string",
-      "description": "The ID of the Endpoint this AccessPolicy is for"
-    }
-  },
-  "required": ["EndpointID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Activity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Activity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Activity.json
deleted file mode 100644
index 8bd2495..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Activity.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "UserDomainID": {
-      "type": "string",
-      "description": "An ID"
-    },
-    "EndpointID": {
-      "type": "string",
-      "description": "The ID of the Endpoint managing Activity"
-    },
-    "ShareID": {
-      "type": "string",
-      "description": "The ID of the Share servicing this Activity"
-    },
-    "ResourceID": {
-      "type": "string",
-      "description": "The ID of the Resource executing this Activity"
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "The IDs of other Activities related to this one",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AdminDomain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AdminDomain.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AdminDomain.json
deleted file mode 100644
index 8ed4606..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/AdminDomain.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AdminDomain.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
-  "properties": {
-    "Distributed": {
-      "type": "boolean",
-      "description": "true if the services managed by the AdminDomain are geographically distributed"
-    },
-    "Owner": {
-      "type": "array",
-      "description": "Identification of persons or legal entities that own the resources in this AdminDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ServiceID": {
-      "type": "array",
-      "description": "IDs of Services in this AdminDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ChildDomainID": {
-      "type": "array",
-      "description": "IDs of AdminDomains aggregated by this AdminDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ParentDomainID": {
-      "type": "string",
-      "description": "The ID of the AdminDomain that this AdminDomain participates in"
-    },
-    "ComputingServiceID": {
-      "type": "array",
-      "description": "IDs of ComputingServices in this AdminDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "StorageServiceID": {
-      "type": "array",
-      "description": "IDs of StorageServices in this AdminDomain",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationEnvironment.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationEnvironment.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationEnvironment.json
deleted file mode 100644
index 89c78e0..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationEnvironment.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationEnvironment.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "AppName": {
-      "type": "string",
-      "description": "The name of the application"
-    },
-    "AppVersion": {
-      "type": "string",
-      "description": "The version of the application"
-    },
-    "State": {
-      "type": "string",
-      "description": "The current installation state of the application - AppEnvState_t"
-    },
-    "RemovalDate": {
-      "type": "string",
-      "description": "The date/time after which the application may be removed - DateTime_t"
-    },
-    "License": {
-      "type": "string",
-      "description": "The license under which the application is usable - License_t"
-    },
-    "Description": {
-      "type": "string",
-      "description": "A human-readable description of the application"
-    },
-    "BestBenchmark": {
-      "type": "array",
-      "description": "The type(s) of the benchmarks which best describe the sensitivity of this application to the performance of the ExecutionEnvironment - Benchmark_t",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ParallelSupport": {
-      "type": "string",
-      "description": "The type of supported parallel execution - ParallelSupport_t"
-    },
-    "MaxSlots": {
-      "type": "integer",
-      "description": "The maximum number of concurrent slots that may be used to run the application"
-    },
-    "MaxJobs": {
-      "type": "integer",
-      "description": "The maximum number of concurrent jobs that can run the application"
-    },
-    "MaxUserSeats": {
-      "type": "integer",
-      "description": "The maximum number of concurrent users that can run the application"
-    },
-    "FreeSlots": {
-      "type": "integer",
-      "description": "The maximum number slots currently available to run the application"
-    },
-    "FreeJobs": {
-      "type": "integer",
-      "description": "The maximum number of additional jobs that can run the application"
-    },
-    "FreeUserSeats": {
-      "type": "integer",
-      "description": "The maximum number of additional users that can run the application"
-    },
-    "ExecutionEnvironmentID": {
-      "type": "array",
-      "description": "ID(s) of ExecutionEnvironments where this ApplicationEnvironment can be used",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ComputingManagerID": {
-      "type": "string",
-      "description": "ID of the ComputingManager this ApplicationEnvironment is associated with"
-    },
-    "ApplicationHandleID": {
-      "type": "array",
-      "description": "ID(s) of the ApplicationHandles that can be used to refer to this environment",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["AppName","ComputingManagerID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationHandle.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationHandle.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationHandle.json
deleted file mode 100644
index e7972e9..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ApplicationHandle.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationHandle.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of method used to set up an ApplicationEnvironment - ApplicationHandle_t (open enumeration)"
-    },
-    "Value": {
-      "type": "string",
-      "description": "How to set up the ApplicationEnvironment in the context of the Type"
-    },
-    "ApplicationEnvironmentID": {
-      "type": "string",
-      "description": "The ID of the ApplicationEnvironment this ApplicationHandle refers to"
-    }
-  },
-  "required": ["Type","Value","ApplicationEnvironmentID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Benchmark.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Benchmark.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Benchmark.json
deleted file mode 100644
index 2b64261..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Benchmark.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Benchmark.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of the benchmark - Benchmark_t (open enumeration)"
-    },
-    "Value": {
-      "type": "number",
-      "description": "The value of the benchmark"
-    },
-    "ComputingManagerID": {
-      "type": "string",
-      "description": "The ID of the ComputingManager this benchmark is for"
-    }
-  },
-  "required": ["Type","Value"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingActivity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingActivity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingActivity.json
deleted file mode 100644
index 5fcae72..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingActivity.json
+++ /dev/null
@@ -1,165 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingActivity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "closed enumeration ComputingActivityType_t",
-      "enum": ["collectionelement","parallelelement","single","workflownode"]
-    },
-    "IDFromEndpoint": {
-      "type": "string",
-      "description": "The ID assigned by the ComputingEndpoint"
-    },
-    "LocalIDFromManager": {
-      "type": "string",
-      "description": "The local ID assigned by the ComputingManager"
-    },
-    "State": {
-      "type": "array",
-      "description": "open enumeration ComputingActivityState_t",
-      "items": {
-        "type": "string"
-      },
-      "minItems": 1
-    },
-    "RestartState": {
-      "type": "array",
-      "description": "open enumeration ComputingActivityState_t",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ExitCode": {
-      "type": "integer",
-      "description": "The exit code as returned by the main executable code or script of the job"
-    },
-    "ComputingManagerExitCode": {
-      "type": "string",
-      "description": "The exit code provided by the ComputingManager"
-    },
-    "Error": {
-      "type": "array",
-      "description": "The error messages as provided by the software components involved in the management of the job",
-      "items": {
-        "type": "string"
-      }
-    },
-    "WaitingPosition": {
-      "type": "integer",
-      "description": "The position of the job in the queue, if the job is waiting"
-    },
-    "Owner": {
-      "type": "string",
-      "description": "The Grid identity of the job's owner"
-    },
-    "LocalOwner": {
-      "type": "string",
-      "description": "The local user name of the job's owner"
-    },
-    "RequestedTotalWallTime": {
-      "type": "integer",
-      "description": "The total wall clock time requested by the job"
-    },
-    "RequestedTotalCPUTime": {
-      "type": "integer",
-      "description": "The total CPU time requested by the job"
-    },
-    "RequestedSlots": {
-      "type": "integer",
-      "description": "The number of slots requested for the job"
-    },
-    "RequestedApplicationEnvironment": {
-      "type": "array",
-      "description": "The AppName and Version of the requested ApplicationEnvironments",
-      "items": {
-        "type": "string"
-      }
-    },
-    "StdIn": {
-      "type": "string",
-      "description": "The name of the file used for standard input"
-    },
-    "StdOut": {
-      "type": "string",
-      "description": "The name of the file used for standard output"
-    },
-    "StdErr": {
-      "type": "string",
-      "description": "The name of the file used for standard error"
-    },
-    "LogDir": {
-      "type": "string",
-      "description": "The name of the directory which contains job logs"
-    },
-    "ExecutionNode": {
-      "type": "array",
-      "description": "Hostnames associated with the ExecutionEnvironments running the job",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Queue": {
-      "type": "string",
-      "description": "The name of the ComputingManager queue that held the job before execution"
-    },
-    "UsedTotalWallTime": {
-      "type": "integer",
-      "description": "The total wall clock time consumed by the job so far (slots*seconds)"
-    },
-    "UsedTotalCpuTime": {
-      "type": "integer",
-      "description": "The total CPU time consumed by the job so far (seconds)"
-    },
-    "UsedMainMemory": {
-      "type": "integer",
-      "description": "The physical RAM currently used by the job (MB)"
-    },
-    "SubmissionTime": {
-      "type": "string",
-      "description": "The time when the job was submitted to the ComputingEndpoint (DateTime_t)"
-    },
-    "ComputingManagerSubmissionTime": {
-      "type": "string",
-      "description": "The time when the job was submitted to the ComputingManager (DateTime_t)"
-    },
-    "StartTime": {
-      "type": "string",
-      "description": "The time when the ComputingManager started the job (DateTime_t)"
-    },
-    "EndTime": {
-      "type": "string",
-      "description": "The time when the job ended in the Grid layer (DateTime_t)"
-    },
-    "ComputingManagerEndTime": {
-      "type": "string",
-      "description": "The time when the job ended according to the ComputingManager (DateTime_t)"
-    },
-    "WorkingAreaEraseTime": {
-      "type": "string",
-      "description": "The time when working area will be removed from storage (DateTime_t)"
-    },
-    "ProxyExpirationTime": {
-      "type": "string",
-      "description": "The expiration time of the Grid proxy associated with the job (DateTime_t)"
-    },
-    "SubmissionHost": {
-      "type": "string",
-      "description": "The name of the host from which the job was submitted"
-    },
-    "SubmissionClientName": {
-      "type": "string",
-      "description": "The name of the software client used to submit the job"
-    },
-    "OtherMessages": {
-      "type": "array",
-      "description": "Optional messages provided by either the Grid layer or the ComputingManager",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["State","Owner"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingEndpoint.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingEndpoint.json
deleted file mode 100644
index f94f889..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingEndpoint.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingEndpoint.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
-  "properties": {
-    "Staging": {
-      "type": "string",
-      "description": "Supported file staging functionality - Staging_t",
-      "enum": ["none","stagingin","staginginout","stagingout"]
-    },
-    "JobDescription": {
-      "type": "array",
-      "description": "Supported job description languages - JobDescription_t (open Enumeration)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "TotalJobs": {
-      "type": "integer",
-      "description": "The total number of Grid jobs known to the system"
-    },
-    "RunningJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs which are running in an ExecutionEnvironment"
-    },
-    "WaitingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs which are waiting to start executing"
-    },
-    "StagingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs staging files before or after execution"
-    },
-    "SuspendedJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs that started to execute, but are now suspended"
-    },
-    "PreLRMSWaitingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs managed by the Grid software, but not yet passed to the LRMS"
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingManager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingManager.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingManager.json
deleted file mode 100644
index aecb114..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingManager.json
+++ /dev/null
@@ -1,117 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingManager.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-    "Reservation": {
-      "type": "boolean",
-      "description": "Whether advance reservation is supported (no value implies undefined in ExtendedBoolean_t)"
-    },
-    "BulkSubmission": {
-      "type": "boolean",
-      "description": "Whether multiple jobs can be submitted at once (no value implies undefined in ExtendedBoolean_t)"
-    },
-    "TotalPhysicalCPUs": {
-      "type": "integer",
-      "description": "The total number of physical CPUs managed by this ComputingManager"
-    },
-    "TotalLogicalCPUs": {
-      "type": "integer",
-      "description": "The total number of logical CPUs managed by this ComputingManager"
-    },
-    "TotalSlots": {
-      "type": "integer",
-      "description": "The total number of slots managed by this ComputingManager"
-    },
-    "SlotsUsedByLocalJobs": {
-      "type": "integer",
-      "description": "The number of slots currently used by jobs submitted via a non-Grid interface"
-    },
-    "SlotsUsedByGridJobs": {
-      "type": "integer",
-      "description": "The number of slots currently used by jobs submitted via a non-Grid interface"
-    },
-    "Homogeneous": {
-      "type": "boolean",
-      "description": "Whether this ComputingManager manages only one type of ExecutionEnvironment"
-    },
-    "NetworkInfo": {
-      "type": "array",
-      "description": "The types of internal network connections between ExecutionEnvironments (NetworkInfo_t)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "LocalCPUDistribution": {
-      "type": "boolean",
-      "description": "Classification of the managed ExecutionEnvironments aggregated by the number of logical CPUs"
-    },
-    "WorkingAreaShared": {
-      "type": "boolean",
-      "description": "True if the working area is shared across different ExecutionEnvironments"
-    },
-    "WorkingAreaGuaranteed": {
-      "type": "boolean",
-      "description": "True if the job is guaranteed all of WorkingAreaTotal"
-    },
-    "WorkingAreaTotal": {
-      "type": "integer",
-      "description": "Total size of the working area available to single slot jobs (GB)"
-    },
-    "WorkingAreaFree": {
-      "type": "integer",
-      "description": "The amount of free space in the working area (GB)"
-    },
-    "WorkingAreaLifeTime": {
-      "type": "integer",
-      "description": "The minimum guaranteed lifetime of files created in the working area (seconds)"
-    },
-    "WorkingAreaMultiSlotTotal": {
-      "type": "integer",
-      "description": "The total size of the working area across all ExecutionEnvironments (GB)"
-    },
-    "WorkingAreaMultiSlotFree": {
-      "type": "integer",
-      "description": "The available space in the working area across all ExecutionEnvironments (GB)"
-    },
-    "WorkingAreaMultiSlotLifeTime": {
-      "type": "integer",
-      "description": "The minimum guaranteed lifetime of files created in the working area (seconds)"
-    },
-    "CacheTotal": {
-      "type": "integer",
-      "description": "If local caching of input files is supported, the total size of the area they may be stored in"
-    },
-    "CacheFree": {
-      "type": "integer",
-      "description": "If local caching of input files is supported, the available size of the area they may be stored in"
-    },
-    "TmpDir": {
-      "type": "string",
-      "description": "The absolute path of a temporary directory local to an ExecutionEnvironment"
-    },
-    "ScratchDir": {
-      "type": "string",
-      "description": "The absolute path of a shared directory available for application data"
-    },
-    "ApplicationDir": {
-      "type": "string",
-      "description": "The absolute path of a directory available for installation of persistent application software"
-    },
-    "ApplicationEnvironmentID": {
-      "type": "array",
-      "description": "ID(s) of ApplicationEnvironments provided by this ComputingManager",
-      "items": {
-        "type": "string"
-      }
-    },
-    "BenchmarkID": {
-      "type": "array",
-      "description": "ID(s) of Benchmarks associated with this ComputingManager",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingService.json
deleted file mode 100644
index 9cfde1b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingService.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
-  "properties": {
-    "TotalJobs": {
-      "type": "integer",
-      "description": "The total number of Grid jobs known to the system"
-    },
-    "RunningJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs which are running in an ExecutionEnvironment"
-    },
-    "WaitingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs which are waiting to start executing"
-    },
-    "StagingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs staging files before or after execution"
-    },
-    "SuspendedJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs that started to execute, but are now suspended"
-    },
-    "PreLRMSWaitingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs managed by the Grid software, but not yet passed to the LRMS"
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingShare.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingShare.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingShare.json
deleted file mode 100644
index 340c83e..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ComputingShare.json
+++ /dev/null
@@ -1,182 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingShare.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-    "MappingQueue": {
-      "type": "string",
-      "description": "The name of the queue in the LRMS where jobs in this share are submitted"
-    },
-    "MaxWallTime": {
-      "type": "integer",
-      "description": "The maximum wall clock time that a single-slot job can run (seconds)"
-    },
-    "MaxMultiSlotWallTime": {
-      "type": "integer",
-      "description": "The maximum wall clock time that a multi-slot job can run (seconds)"
-    },
-    "DefaultWallTime": {
-      "type": "integer",
-      "description": "The default wall clock per slot assumed by the LRMS if a maximum time is not specified (seconds)"
-    },
-    "MaxCPUTime": {
-      "type": "integer",
-      "description": "The maximum pre-slot CPU time that a job can request (seconds)"
-    },
-    "MaxTotalCPUTime": {
-      "type": "integer",
-      "description": "The maximum amount of CPU time that a job can request across all slots assigned to it (seconds)"
-    },
-    "MinCPUTime": {
-      "type": "integer",
-      "description": "The minimum pre-slot CPU time that a job can request (seconds)"
-    },
-    "DefaultCPUTime": {
-      "type": "integer",
-      "description": "The default CPU time limit assumed by the LRMS if a maximum time is not specified (seconds)"
-    },
-    "MaxTotalJobs": {
-      "type": "integer",
-      "description": "The maximum number of jobs that can be in this Share"
-    },
-    "MaxRunningJobs": {
-      "type": "integer",
-      "description": "The maximum number of jobs that can be running in this Share"
-    },
-    "MaxWaitingJobs": {
-      "type": "integer",
-      "description": "The maximum number of jobs that can be waiting in this Share"
-    },
-    "MaxPreLRMSWaitingJobs": {
-      "type": "integer",
-      "description": "The maximum number of jobs that can be waiting in the Grid layer for this Share"
-    },
-    "MaxUserRunningJobs": {
-      "type": "integer",
-      "description": "The maximum number of jobs that can be running in this Share per user"
-    },
-    "MaxSlotsPerJob": {
-      "type": "integer",
-      "description": "The maximum number of slots that can be allocated to a single job in this Share"
-    },
-    "MaxStageInStreams": {
-      "type": "integer",
-      "description": "The maximum number of streams available to stage files in"
-    },
-    "MaxStageOutStreams": {
-      "type": "integer",
-      "description": "The maximum number of streams available to stage files out"
-    },
-    "ScheduingPolicy": {
-      "type": "string",
-      "description": "The scheduling policy used by the share - SchedulingPolicy_t (open enumeration)"
-    },
-    "MaxMainMemory": {
-      "type": "integer",
-      "description": "The maximum amount of physical RAM that a job can use (MB)"
-    },
-    "GuaranteedMainMemory": {
-      "type": "integer",
-      "description": "The amount of physical RAM that a job will have available (MB)"
-    },
-    "MaxVirtualMemory": {
-      "type": "integer",
-      "description": "The maximum amount memory (RAM+swap) that a job can use (MB)"
-    },
-    "GuaranteedVirtualMemory": {
-      "type": "integer",
-      "description": "The amount of memory (RAM+swap) that a job will have available (MB)"
-    },
-    "MaxDiskSpace": {
-      "type": "integer",
-      "description": "The maximum disk space that a job can use in the working area (GB)"
-    },
-    "DefaultStorageServiceID": {
-      "type": "string",
-      "description": "The ID of the default StorageService used to store files"
-    },
-    "Preemption": {
-      "type": "boolean",
-      "description": "Whether jobs can be preempted and resumed (no value implies undefined in ExtendedBoolean_t)"
-    },
-    "ServingState": {
-      "type": "string",
-      "description": "How the Share is currently serving jobs",
-      "enum": ["closed","draining","production","queueing"]
-    },
-    "TotalJobs": {
-      "type": "integer",
-      "description": "The total number of jobs in any state"
-    },
-    "RunningJobs": {
-      "type": "integer",
-      "description": "The number of running jobs submitted through Grid or non-Grid interfaces"
-    },
-    "LocalRunningJobs": {
-      "type": "integer",
-      "description": "The number of running jobs submitted using non-Grid interfaces"
-    },
-    "WaitingJobs": {
-      "type": "integer",
-      "description": "The number of waiting jobs submitted through Grid or non-Grid interfaces"
-    },
-    "LocalWaitingJobs": {
-      "type": "integer",
-      "description": "The number of waiting jobs submitted using non-Grid interfaces"
-    },
-    "SuspendedJobs": {
-      "type": "integer",
-      "description": "The number of suspended jobs submitted through Grid or non-Grid interfaces"
-    },
-    "LocalSuspendedJobs": {
-      "type": "integer",
-      "description": "The number of suspended jobs submitted using non-Grid interfaces"
-    },
-    "StagingJobs": {
-      "type": "integer",
-      "description": "The number of jobs staging files before or after execution"
-    },
-    "PreLRMSWaitingJobs": {
-      "type": "integer",
-      "description": "The number of Grid jobs which have not yet been passed to the LRMS"
-    },
-    "EstimatedAverageWaitingTime": {
-      "type": "integer",
-      "description": "An estimate of the average time a job will wait before it starts to execute (seconds)"
-    },
-    "EstimatedWorstWaitingTime": {
-      "type": "integer",
-      "description": "An estimate of the worst-case time a job will wait before it starts to execute (seconds)"
-    },
-    "FreeSlots": {
-      "type": "integer",
-      "description": "The number of slots which are currently available for use"
-    },
-    "FreeSlotsWithDuration": {
-      "type": "string",
-      "description": "The number of slots which are currently available for use and how long they are available"
-    },
-    "UsedSlots": {
-      "type": "integer",
-      "description": "The number of slots currently in use"
-    },
-    "RequestedSlots": {
-      "type": "integer",
-      "description": "The number of slots needd to execute all waiting and staging jobs"
-    },
-    "ReservationPolicy": {
-      "type": "string",
-      "description": "The policy used for advance reservation - ReservationPolicy_t",
-      "enum": ["mandatory","none","optional"]
-    },
-    "Tag": {
-      "type": "array",
-      "description": "UserDomain-defined tags for this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ServingState"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Contact.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Contact.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Contact.json
deleted file mode 100644
index 436b262..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Contact.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Contact.json",
-  "description": "A GLUE 2 Contact",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Detail": {
-      "type": "string",
-      "description": "A URI embedding the contact information"
-    },
-    "Type": {
-      "type": "string",
-      "description": "closed enumeration ContactType_t",
-      "enum": ["general","security","sysadmin","usersupport"]
-    },
-    "ServiceID": {
-      "type": "array",
-      "description": "The IDs of Services associated with this Contact",
-      "items": {
-        "type": "string"
-      }
-    },
-    "DomainID": {
-      "type": "array",
-      "description": "The IDs of Domains associated with this Contact",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/DataStore.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/DataStore.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/DataStore.json
deleted file mode 100644
index 8f15447..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/DataStore.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/DataStore.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of storage medium - DataStoreType_t (disk,optical,tape,...)"
-    },
-    "Latency": {
-      "type": "string",
-      "description": "The latency category under normal operating conditions - AccessLatency_t",
-      "enum": ["nearline","offline","online"]
-    },
-    "TotalSize": {
-      "type": "integer",
-      "description": "The total amount of storage (GB)"
-    },
-    "FreeSize": {
-      "type": "integer",
-      "description": "The amount of available storage (GB)"
-    },
-    "UsedSize": {
-      "type": "integer",
-      "description": "The amount of used storage (GB)"
-    }
-  },
-  "required": ["Type","Latency"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Domain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Domain.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Domain.json
deleted file mode 100644
index 5bd996b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Domain.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Description": {
-      "type": "string",
-      "description": "A description of the Domain"
-    },
-    "WWW": {
-      "type": "array",
-      "description": "URLs of web pages with more information about the Domain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ContactID": {
-      "type": "array",
-      "description": "IDs of Contacts for this Domain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "LocationID": {
-      "type": "string",
-      "description": "The ID of the primary Location for this Domain"
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
deleted file mode 100644
index b75b02a..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Endpoint.json
+++ /dev/null
@@ -1,147 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "URL": {
-      "type": "string",
-      "description": "Network location of the endpoint"
-    },
-    "Capability": {
-      "type": "array",
-      "description": "Capability_t (open enumeration)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Technology": {
-      "type": "string",
-      "description": "EndpointTechnology_t"
-    },
-    "InterfaceName": {
-      "type": "string",
-      "description": "InterfaceName_t"
-    },
-    "InterfaceVersion": {
-      "type": "string",
-      "description": "The version of the primary interface protocol (free format)"
-    },
-    "InterfaceExtension": {
-      "type": "array",
-      "description": "URIs identifying supported extensions to the interface protocol",
-      "items": {
-        "type": "string"
-      }
-    },
-    "WSDL": {
-      "type": "array",
-      "description": "URLs of WSDL document(s) describing the interface",
-      "items": {
-        "type": "string"
-      }
-    },
-    "SupportedProfile": {
-      "type": "array",
-      "description": "URI(s) identifying supported profiles for the Endpoint",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Semantics": {
-      "type": "array",
-      "description": "URL(s) of documents providing human-readable descriptions of the semantics of the Endpoint",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Implementor": {
-      "type": "string",
-      "description": "The name of the main organization implementing the Endpoint"
-    },
-    "ImplementationName": {
-      "type": "string",
-      "description": "The name of the implementation of the Endpoint"
-    },
-    "ImplementationVersion": {
-      "type": "string",
-      "description": "The version of the implementation of the Endpoint"
-    },
-    "QualityLevel": {
-      "type": "string",
-      "description": "QualityLevel_t",
-      "enum": ["development","pre-production","production","testing"]
-    },
-    "HealthState": {
-      "type": "string",
-      "description": "The operational status of the Endpoint",
-      "enum": ["critical","ok","other","unknown","warning"]
-    },
-    "HealthStateInfo": {
-      "type": "string",
-      "description": "A human-readable explanation of the HealthState of this Endpoint"
-    },
-    "ServingState": {
-      "type": "string",
-      "description": "If the endpoint is accepting and serving requests",
-      "enum": ["closed","draining","production","queueing"]
-    },
-    "StartTime": {
-      "type": "string",
-      "description": "The start time of the Service associated with this Endpoint (DateTime_t)"
-    },
-    "IssuerCA": {
-      "type": "string",
-      "description": "The DN of the CA issuing the certificate presented by this Endpoint"
-    },
-    "TrustedCA": {
-      "type": "array",
-      "description": "DN(s) of CAs trusted by this Endpoint",
-      "items": {
-        "type": "string"
-      }
-    },
-    "DowntimeAnnounce": {
-      "type": "string",
-      "description": "When the next scheduled downtime was announced (DateTime_t)"
-    },
-    "DowntimeStart": {
-      "type": "string",
-      "description": "When the next scheduled downtime will start (DateTime_t)"
-    },
-    "DowntimeEnd": {
-      "type": "string",
-      "description": "When the next scheduled downtime will end (DateTime_t)"
-    },
-    "DowntimeInfo": {
-      "type": "string",
-      "description": "Human-readable of the next scheduled downtime"
-    },
-    "ServiceID": {
-      "type": "string",
-      "description": "The ID of the Service associated with this Endpoint"
-    },
-    "ShareID": {
-      "type": "array",
-      "description": "The IDs of the Shares accessible from this Endpoint",
-      "items": {
-        "type": "string"
-      }
-    },
-    "AccessPolicyID": {
-      "type": "array",
-      "description": "IDs of AccessPolicies associated with this Endpoint",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "IDs of Activities being managed through this Endpoint",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["InterfaceName","QualityLevel","HealthState","ServingState","ServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
deleted file mode 100644
index 5d1ae46..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Entity.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json",
-  "type": "object",
-  "properties": {
-    "CreationTime": {
-      "type": "string",
-      "description": "The creation time of this entity in the format: CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]"
-    },
-    "Validity": {
-      "type": "integer",
-      "description": "The number of seconds after CreationTime that this entity should be considered relevant"
-    },
-    "ID": {
-      "type": "string",
-      "description": "A globally unique identifier for this entity"
-    },
-    "Name": {
-      "type": "string",
-      "description": "A human-readable name"
-    },
-    "OtherInfo": {
-      "type": "array",
-      "description": "Placeholder for information that does not fit in any other attribute",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Extension": {
-      "type": "object",
-      "description": "Key/value pairs enabling the association of extra information not captured by the model"
-    }
-  },
-  "required": ["ID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
deleted file mode 100644
index 77bf876..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ExecutionEnvironment.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}],
-  "properties": {
-    "Platform": {
-      "type": "string",
-      "description": "The platform architecture - Platform_t (open enumeration)"
-    },
-    "VirtualMachine": {
-      "type": "boolean",
-      "description": "True if the ExecutionEnvironment is a virtual machine"
-    },
-    "TotalInstances": {
-      "type": "integer",
-      "description": "The total number of ExecutionEnvironment instances"
-    },
-    "UsedInstances": {
-      "type": "integer",
-      "description": "The number of ExecutionEnvironment instances in use"
-    },
-    "UnavailableInstances": {
-      "type": "integer",
-      "description": "The number of ExecutionEnvironment instances that are unavailable"
-    },
-    "PhysicalCPUs": {
-      "type": "integer",
-      "description": "The number of physical CPUs in one ExecutionEnvironment instance"
-    },
-    "LogicalCPUs": {
-      "type": "integer",
-      "description": "The number of logical CPUs in one ExecutionEnvironment instance"
-    },
-    "CPUMultiplicity": {
-      "type": "string",
-      "description": "Information about the CPUs and cores in an execution environment",
-      "enum": ["multicpu-multicore","multicpu-singlecore","singlecpu-multicore","singlecpu-singlecore"]
-    },
-    "CPUVendor": {
-      "type": "string",
-      "description": "The name of the manufacturer of the CPU"
-    },
-    "CPUModel": {
-      "type": "string",
-      "description": "The model of the CPU, as defined by the vendor"
-    },
-    "CPUVersion": {
-      "type": "string",
-      "description": "The specific version name of the CPU, as defined by the vendor"
-    },
-    "CPUClockSpeed": {
-      "type": "integer",
-      "description": "The clock speed of the CPU (MHz)"
-    },
-    "CPUTimeScalingFactor": {
-      "type": "float",
-      "description": "The factor used by the ComputingManager to scale the CPU time limit"
-    },
-    "WallTimeScalingFactor": {
-      "type": "float",
-      "description": "The factor used by the ComputingManager to scale the wallclock time limit"
-    },
-    "MainMemorySize": {
-      "type": "integer",
-      "description": "The total amount of physical RAM in one ExecutionEnvironment instance (MB)"
-    },
-    "VirtualMemorySize": {
-      "type": "integer",
-      "description": "The total amount of virtual memory (RAM+swap) in one ExecutionEnvironment instance (MB)"
-    },
-    "OSFamily": {
-      "type": "string",
-      "description": "The general family of the operating system - OSFamily_t (open enumeration)"
-    },
-    "OSName": {
-      "type": "string",
-      "description": "The specific name of the operating system - OSName_t (open enumeration)"
-    },
-    "OSVersion": {
-      "type": "string",
-      "description": "The version of the operating system, as defined by the vendor"
-    },
-    "ConnectivityIn": {
-      "type": "boolean",
-      "description": "True if direct inbound network connectiity is available to a running job"
-    },
-    "ConnectivityOut": {
-      "type": "boolean",
-      "description": "True if direct outbound network connectiity is available to a running job"
-    },
-    "NetworkInfo": {
-      "type": "array",
-      "description": "The types of internal network connections between ExecutionEnvironments - NetworkInfo_t (open enumeration)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ApplicationEnvironmentID": {
-      "type": "array",
-      "description": "ID(s) of ApplicationEnvironments available in this ExecutionEnvironment",
-      "items": {
-        "type": "string"
-      }
-    },
-    "BenchmarkID": {
-      "type": "array",
-      "description": "ID(s) of Benchmarks associated with this ExecutionEnvironment",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Platform","MainMemorySize","OSFamily","ConnectivityIn","ConnectivityOut"]
-}


[77/81] [abbrv] airavata git commit: Fixed test failures and artifact names.

Posted by sh...@apache.org.
Fixed test failures and artifact names.


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

Branch: refs/heads/master
Commit: 08e3a872330845b2391e413c0851558db2e246cd
Parents: 6eaaff4
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Thu Jun 4 15:45:02 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Thu Jun 4 15:45:02 2015 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |  2 +-
 distribution/pom.xml                            | 26 +++-----------------
 .../gfac-application-specific-handlers/pom.xml  |  6 ++---
 modules/gfac/gfac-bes/pom.xml                   |  6 ++---
 modules/gfac/gfac-client/pom.xml                |  4 +--
 modules/gfac/gfac-core/pom.xml                  |  4 +--
 modules/gfac/gfac-impl/pom.xml                  |  6 ++---
 .../gfac/ssh/config/ConfigReaderTest.java       |  1 +
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  | 12 ++++++---
 .../gfac/ssh/impl/VanilaTestWithSSHAuth.java    | 12 +++++----
 .../apache/airavata/job/AMQPMonitorTest.java    | 17 +++++++------
 modules/gfac/gfac-service/pom.xml               | 10 ++++----
 modules/gfac/pom.xml                            |  2 +-
 .../orchestrator/orchestrator-client/pom.xml    |  2 +-
 modules/orchestrator/orchestrator-core/pom.xml  |  6 ++---
 .../orchestrator/orchestrator-service/pom.xml   |  6 ++---
 modules/server/pom.xml                          |  2 +-
 modules/workflow-model/workflow-engine/pom.xml  |  6 ++---
 modules/xbaya-gui/pom.xml                       |  4 +--
 19 files changed, 62 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index 6bf3d32..885bb16 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -63,7 +63,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-client</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index f7047f4..cf33308 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -266,12 +266,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-orchestrator-stubs</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-stubs</artifactId>
+            <artifactId>airavata-gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -301,7 +301,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-ssh</artifactId>
+            <artifactId>airavata-gfac-impl</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -311,21 +311,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-hpc-monitor</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-local</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -341,11 +326,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-model-utils</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-application-specific-handlers/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-application-specific-handlers/pom.xml b/modules/gfac/gfac-application-specific-handlers/pom.xml
index 638c81f..36d2a37 100644
--- a/modules/gfac/gfac-application-specific-handlers/pom.xml
+++ b/modules/gfac/gfac-application-specific-handlers/pom.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>gfac</artifactId>
+        <artifactId>airavata-gfac</artifactId>
         <groupId>org.apache.airavata</groupId>
         <version>0.16-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>gfac-application-specific-handlers</artifactId>
+    <artifactId>airavata-gfac-application-specific-handlers</artifactId>
     <dependencies>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-bes/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml
index 4e61ae0..f3fba4f 100644
--- a/modules/gfac/gfac-bes/pom.xml
+++ b/modules/gfac/gfac-bes/pom.xml
@@ -14,13 +14,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<parent>
 		<groupId>org.apache.airavata</groupId>
-		<artifactId>gfac</artifactId>
+		<artifactId>airavata-gfac</artifactId>
 		<version>0.16-SNAPSHOT</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 
 	<modelVersion>4.0.0</modelVersion>
-	<artifactId>gfac-bes</artifactId>
+	<artifactId>airavata-gfac-bes</artifactId>
 	<name>Airavata GFac BES implementation</name>
 	<description>This is the extension of GFAC to use GRAM </description>
 	<url>http://airavata.apache.org/</url>
@@ -36,7 +36,7 @@
 		<!-- GFAC schemas -->
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-core</artifactId>
+			<artifactId>airavata-gfac-core</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<!-- Credential Store -->

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/pom.xml b/modules/gfac/gfac-client/pom.xml
index 20423e0..2028c22 100644
--- a/modules/gfac/gfac-client/pom.xml
+++ b/modules/gfac/gfac-client/pom.xml
@@ -13,14 +13,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>gfac</artifactId>
+        <artifactId>airavata-gfac</artifactId>
         <groupId>org.apache.airavata</groupId>
         <version>0.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <name>Airavata Gfac Client SDK</name>
-    <artifactId>gfac-client</artifactId>
+    <artifactId>airavata-gfac-client</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index 0203865..d2741a1 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -11,13 +11,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
+        <artifactId>airavata-gfac</artifactId>
         <version>0.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>gfac-core</artifactId>
+    <artifactId>airavata-gfac-core</artifactId>
     <name>Airavata GFac Core</name>
     <description>The core GFAC functionality independent from any webservice implementation.</description>
     <url>http://airavata.apache.org/</url>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
index 0326782..871572d 100644
--- a/modules/gfac/gfac-impl/pom.xml
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -11,13 +11,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
+        <artifactId>airavata-gfac</artifactId>
         <version>0.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>gfac-impl</artifactId>
+    <artifactId>airavata-gfac-impl</artifactId>
     <name>Airavata GFac Implementation</name>
     <description>This is the extension of GFAC Local.</description>
     <url>http://airavata.apache.org/</url>
@@ -33,7 +33,7 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
index a90dcba..760ab17 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.gfac.ssh.config;
 
+import org.apache.airavata.gfac.gsi.ssh.config.ConfigReader;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
index 79f29e4..45d8ca2 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -21,10 +21,16 @@
 
 package org.apache.airavata.gfac.ssh.impl;
 
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.CommandInfo;
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
 import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
-import org.apache.airavata.gfac.ssh.api.*;
-import org.apache.airavata.gfac.ssh.config.ConfigReader;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyAuthentication;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.gsi.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.gsi.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.gsi.ssh.impl.SystemCommandOutput;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPublicKeyAuthentication;
 import org.apache.commons.io.IOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
index 002674c..8bc8c66 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/VanilaTestWithSSHAuth.java
@@ -21,12 +21,14 @@
 
 package org.apache.airavata.gfac.ssh.impl;
 
-import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.core.JobDescriptor;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.gsi.ssh.util.CommonUtils;
 import org.testng.AssertJUnit;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
index 29d6fca..aecc8c2 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
@@ -25,15 +25,16 @@ import com.google.common.eventbus.Subscribe;
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
-import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.impl.PBSCluster;
-import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
 import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
@@ -148,7 +149,7 @@ public class AMQPMonitorTest {
 
 
         Cluster pbsCluster = new
-                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gfac.ssh.util.CommonUtils.getPBSJobManager("/usr/bin/"));
+                PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/usr/bin/"));
 
 
         // Execute command

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/pom.xml b/modules/gfac/gfac-service/pom.xml
index fefc8cd..99497a3 100644
--- a/modules/gfac/gfac-service/pom.xml
+++ b/modules/gfac/gfac-service/pom.xml
@@ -13,14 +13,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>gfac</artifactId>
+        <artifactId>airavata-gfac</artifactId>
         <groupId>org.apache.airavata</groupId>
         <version>0.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <name>Airavata Gfac Service</name>
-    <artifactId>gfac-service</artifactId>
+    <artifactId>airavata-gfac-service</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 
@@ -57,17 +57,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-client</artifactId>
+            <artifactId>airavata-gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-impl</artifactId>
+            <artifactId>airavata-gfac-impl</artifactId>
             <version>${project.version}</version>
         </dependency>
 	    <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/gfac/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/pom.xml b/modules/gfac/pom.xml
index 0414afc..3bb21a9 100644
--- a/modules/gfac/pom.xml
+++ b/modules/gfac/pom.xml
@@ -19,7 +19,7 @@
 
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>gfac</artifactId>
+    <artifactId>airavata-gfac</artifactId>
     <packaging>pom</packaging>
     <name>Airavata GFac</name>
     <url>http://airavata.apache.org/</url>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/orchestrator/orchestrator-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-client/pom.xml b/modules/orchestrator/orchestrator-client/pom.xml
index 0c439c9..618f31b 100644
--- a/modules/orchestrator/orchestrator-client/pom.xml
+++ b/modules/orchestrator/orchestrator-client/pom.xml
@@ -20,7 +20,7 @@
     </parent>
 
     <name>Airavata Orchestrator Client SDK</name>
-    <artifactId>orchestrator-client</artifactId>
+    <artifactId>airavata-orchestrator-client</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 3a9a48a..9e111d1 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -18,7 +18,7 @@ the License. -->
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>orchestrator-core</artifactId>
+    <artifactId>airavata-orchestrator-core</artifactId>
     <packaging>jar</packaging>
     <name>Airavata Orchestrator Core</name>
     <url>http://airavata.apache.org/</url>
@@ -46,12 +46,12 @@ the License. -->
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-client</artifactId>
+            <artifactId>airavata-gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/orchestrator/orchestrator-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-service/pom.xml b/modules/orchestrator/orchestrator-service/pom.xml
index a3f47c7..f0bb400 100644
--- a/modules/orchestrator/orchestrator-service/pom.xml
+++ b/modules/orchestrator/orchestrator-service/pom.xml
@@ -20,7 +20,7 @@
     </parent>
 
     <name>Airavata Orchestrator Service</name>
-    <artifactId>orchestrator-service</artifactId>
+    <artifactId>airavata-orchestrator-service</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 
@@ -42,12 +42,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-core</artifactId>
+            <artifactId>airavata-orchestrator-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-client</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/server/pom.xml b/modules/server/pom.xml
index a204543..37ba141 100644
--- a/modules/server/pom.xml
+++ b/modules/server/pom.xml
@@ -42,7 +42,7 @@
         </dependency>
 		<dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-client</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml
index 2928014..9997800 100644
--- a/modules/workflow-model/workflow-engine/pom.xml
+++ b/modules/workflow-model/workflow-engine/pom.xml
@@ -232,12 +232,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-client</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
          <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-client</artifactId>
+            <artifactId>airavata-gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -259,7 +259,7 @@
         <!-- TODO need clean up -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
 <!--        <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/08e3a872/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index 520b076..a26e09d 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -216,7 +216,7 @@
         </dependency>
         	<dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>orchestrator-client</artifactId>
+            <artifactId>airavata-orchestrator-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -229,7 +229,7 @@
         <!-- TODO need clean up -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-core</artifactId>
+            <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>


[73/81] [abbrv] airavata git commit: moving resources into src

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/LICENSE b/distribution/src/main/resources/LICENSE
new file mode 100644
index 0000000..56f7cc2
--- /dev/null
+++ b/distribution/src/main/resources/LICENSE
@@ -0,0 +1,2387 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+===================================================================================
+The Apache Airavata distribution includes a number of run time 
+dependencies with separate copyright notices and license terms. Your use of the
+Apache Airavata code is subject to the terms and conditions of the following licenses.
+===================================================================================
+
+===============================================================================
+The following components come under Apache Software License 2.0
+===============================================================================
+
+apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
+apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
+aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
+jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
+jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
+(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
+
+- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
+- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
+- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
+- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
+- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
+- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
+- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
+- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
+- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
+- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
+- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
+- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
+- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
+
+===============================================================================
+The following components use Apache based Licenses
+===============================================================================
+
+===============================================================================
+For: jdom-1.0.jar
+    Containing Project URL: http://www.jdom.org/
+/*-- 
+
+ $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
+
+ Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
+ All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions, and the following disclaimer.
+ 
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions, and the disclaimer that follows 
+    these conditions in the documentation and/or other materials 
+    provided with the distribution.
+
+ 3. The name "JDOM" must not be used to endorse or promote products
+    derived from this software without prior written permission.  For
+    written permission, please contact <request_AT_jdom_DOT_org>.
+ 
+ 4. Products derived from this software may not be called "JDOM", nor
+    may "JDOM" appear in their name, without prior written permission
+    from the JDOM Project Management <request_AT_jdom_DOT_org>.
+ 
+ In addition, we request (but do not require) that you include in the 
+ end-user documentation provided with the redistribution and/or in the 
+ software itself an acknowledgement equivalent to the following:
+     "This product includes software developed by the
+      JDOM Project (http://www.jdom.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos 
+ available at http://www.jdom.org/images/logos.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many 
+ individuals on behalf of the JDOM Project and was originally 
+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
+ Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
+ on the JDOM Project, please see <http://www.jdom.org/>. 
+
+ */
+
+===============================================================================
+
+ASM bytecode manipulation library (asm)
+    Containing Project URL: http://asm.ow2.org/
+
+    Copyright (c) 2000-2005 INRIA, France Telecom
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of the copyright holders nor the names of its
+       contributors may be used to endorse or promote products derived from
+       this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+    THE POSSIBILITY OF SUCH DAMAGE.
+
+===============================================================================
+
+For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
+    Containing Project URL: http://www.cryptix.org/
+
+Cryptix General License
+
+Copyright (c) 1995-2005 The Cryptix Foundation Limited.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  1. Redistributions of source code must retain the copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
+CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===============================================================================
+The following components come under Extreme! Lab Software License
+===============================================================================
+
+XPP3
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
+xsul, xsul5, xutil
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
+wsmg
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
+gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
+    Containing Project URL: http://www.extreme.indiana.edu/xgws/
+    
+Indiana University Extreme! Lab Software License
+
+Version 1.1.1
+
+Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the distribution.
+
+3. The end-user documentation included with the redistribution, if any,
+   must include the following acknowledgment:
+
+  "This product includes software developed by the Indiana University
+  Extreme! Lab (http://www.extreme.indiana.edu/)."
+
+Alternately, this acknowledgment may appear in the software itself,
+if and wherever such third-party acknowledgments normally appear.
+
+4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
+must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission,
+please contact http://www.extreme.indiana.edu/.
+
+5. Products derived from this software may not use "Indiana Univeristy"
+name nor may "Indiana Univeristy" appear in their name, without prior
+written permission of the Indiana University.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+======================================================================== 
+The following components are MIT Licensed 
+========================================================================
+
+SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
+    Containing Project URL: http://www.slf4j.org/
+
+Copyright (c) 2004-2008 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+========================================================================
+
+For dom4j-1.6.1.jar:
+    Containing Project URL: http://dom4j.sourceforge.net/
+Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
+
+Redistribution and use of this software and associated documentation
+("Software"), with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain copyright
+   statements and notices.  Redistributions must also contain a
+   copy of this document.
+ 
+2. Redistributions in binary form must reproduce the
+   above copyright notice, this list of conditions and the
+   following disclaimer in the documentation and/or other
+   materials provided with the distribution.
+ 
+3. The name "DOM4J" must not be used to endorse or promote
+   products derived from this Software without prior written
+   permission of MetaStuff, Ltd.  For written permission,
+   please contact dom4j-info@metastuff.com.
+ 
+4. Products derived from this Software may not be called "DOM4J"
+   nor may "DOM4J" appear in their names without prior written
+   permission of MetaStuff, Ltd. DOM4J is a registered
+   trademark of MetaStuff, Ltd.
+ 
+5. Due credit should be given to the DOM4J Project - 
+   http://www.dom4j.org
+ 
+THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+====================================================================================================
+
+For Bouncy Castle:
+    Containing Project URL: http://www.bouncycastle.org/
+
+Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission iss software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=======================================================================================================
+
+For: The International Components for Unicode (icu4j-2.6.1.jar)
+    Containing Project URL: http://site.icu-project.org/
+
+    Copyright (c) 1995-2009 International Business Machines Corporation
+    and others
+
+    All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies
+    of the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+    SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder shall
+    not be used in advertising or otherwise to promote the sale, use or other
+    dealings in this Software without prior written authorization of the
+    copyright holder.
+    
+====================================================================== 
+The following components are CDDL based License 
+======================================================================
+
+For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
+Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
+Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
+JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
+Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
+jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
+implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
+ 
+NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
+Apahce Airavata elects to include jersey in this distribution under the
+[CDDLv_1.0] license.
+
+    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+    1. Definitions.
+
+    1.1. Contributor means each individual or entity that creates or
+    contributes to the creation of Modifications.
+
+    1.2. Contributor Version means the combination of the Original Software,
+    prior Modifications used by a Contributor (if any), and the Modifications
+    made by that particular Contributor.
+
+    1.3. Covered Software means (a) the Original Software, or
+    (b) Modifications, or (c) the combination of files containing Original
+    Software with files containing Modifications, in each case including
+    portions thereof.
+
+    1.4. Executable means the Covered Software in any form other than Source
+    Code.
+
+    1.5. Initial Developer means the individual or entity that first makes
+    Original Software available under this License.
+
+    1.6. Larger Work means a work which combines Covered Software or portions
+    thereof with code not governed by the terms of this License.
+
+    1.7. License means this document.
+
+    1.8. Licensable means having the right to grant, to the maximum extent
+    possible, whether at the time of the initial grant or subsequently
+    acquired, any and all of the rights conveyed herein.
+
+    1.9. Modifications means the Source Code and Executable form of any of
+    the following: A. Any file that results from an addition to, deletion
+    from or modification of the contents of a file containing Original
+    Software or previous Modifications; B. Any new file that contains any
+    part of the Original Software or previous Modification; or C. Any new
+    file that is contributed or otherwise made available under the terms of
+    this License.
+
+    1.10. Original Software means the Source Code and Executable form of
+    computer software code that is originally released under this License.
+
+    1.11. Patent Claims means any patent claim(s), now owned or hereafter
+    acquired, including without limitation, method, process, and apparatus
+    claims, in any patent Licensable by grantor.
+
+    1.12. Source Code means (a) the common form of computer software code in
+    which modifications are made and (b) associated documentation included in
+    or with such code.
+
+    1.13. You (or Your) means an individual or a legal entity exercising
+    rights under, and complying with all of the terms of, this License. For
+    legal entities, You includes any entity which controls, is controlled by,
+    or is under common control with You. For purposes of this definition,
+    control means (a) the power, direct or indirect, to cause the direction
+    or management of such entity, whether by contract or otherwise, or
+    (b) ownership of more than fifty percent (50%) of the outstanding shares
+    or beneficial ownership of such entity.
+
+    2. License Grants.
+
+    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
+    Section 3.1 below and subject to third party intellectual property
+    claims, the Initial Developer hereby grants You a world-wide,
+    royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or trademark)
+        Licensable by Initial Developer, to use, reproduce, modify, display,
+        perform, sublicense and distribute the Original Software (or portions
+        thereof), with or without Modifications, and/or as part of a Larger
+        Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling of
+        Original Software, to make, have made, use, practice, sell, and offer
+        for sale, and/or otherwise dispose of the Original Software (or
+        portions thereof);
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
+        date Initial Developer first distributes or otherwise makes the
+        Original Software available to a third party under the terms of
+        this License;
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
+        (1) for code that You delete from the Original Software, or (2) for
+        infringements caused by: (i) the modification of the Original
+        Software, or (ii) the combination of the Original Software with other
+        software or devices.
+
+    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
+    below and subject to third party intellectual property claims, each
+    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
+    license:
+
+    (a) under intellectual property rights (other than patent or trademark)
+        Licensable by Contributor to use, reproduce, modify, display, perform,
+        sublicense and distribute the Modifications created by such
+        Contributor (or portions thereof), either on an unmodified basis,
+        with other Modifications, as Covered Software and/or as part of a
+        Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling of
+        Modifications made by that Contributor either alone and/or in
+        combination with its Contributor Version (or portions of such
+        combination), to make, use, sell, offer for sale, have made, and/or
+        otherwise dispose of: (1) Modifications made by that Contributor (or
+        portions thereof); and (2) the combination of Modifications made by
+        that Contributor with its Contributor Version (or portions of such
+        combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
+        the date Contributor first distributes or otherwise makes the
+        Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
+        (1) for any code that Contributor has deleted from the Contributor
+        Version; (2) for infringements caused by: (i) third party
+        modifications of Contributor Version, or (ii) the combination of
+        Modifications made by that Contributor with other software (except
+        as part of the Contributor Version) or other devices; or (3) under
+        Patent Claims infringed by Covered Software in the absence of
+        Modifications made by that Contributor.
+
+    3. Distribution Obligations.
+
+    3.1. Availability of Source Code. Any Covered Software that You distribute
+    or otherwise make available in Executable form must also be made available
+    in Source Code form and that Source Code form must be distributed only
+    under the terms of this License. You must include a copy of this License
+    with every copy of the Source Code form of the Covered Software You
+    distribute or otherwise make available. You must inform recipients of any
+    such Covered Software in Executable form as to how they can obtain such
+    Covered Software in Source Code form in a reasonable manner on or through
+    a medium customarily used for software exchange.
+
+    3.2. Modifications. The Modifications that You create or to which You
+    contribute are governed by the terms of this License. You represent that
+    You believe Your Modifications are Your original creation(s) and/or You
+    have sufficient rights to grant the rights conveyed by this License.
+
+    3.3. Required Notices. You must include a notice in each of Your
+    Modifications that identifies You as the Contributor of the Modification.
+    You may not remove or alter any copyright, patent or trademark notices
+    contained within the Covered Software, or any notices of licensing or any
+    descriptive text giving attribution to any Contributor or the Initial
+    Developer.
+
+    3.4. Application of Additional Terms. You may not offer or impose any
+    terms on any Covered Software in Source Code form that alters or restricts
+    the applicable version of this License or the recipients rights hereunder.
+    You may choose to offer, and to charge a fee for, warranty, support,
+    indemnity or liability obligations to one or more recipients of Covered
+    Software. However, you may do so only on Your own behalf, and not on
+    behalf of the Initial Developer or any Contributor. You must make it
+    absolutely clear that any such warranty, support, indemnity or liability
+    obligation is offered by You alone, and You hereby agree to indemnify the
+    Initial Developer and every Contributor for any liability incurred by the
+    Initial Developer or such Contributor as a result of warranty, support,
+    indemnity or liability terms You offer.
+
+    3.5. Distribution of Executable Versions. You may distribute the
+    Executable form of the Covered Software under the terms of this License or
+    under the terms of a license of Your choice, which may contain terms
+    different from this License, provided that You are in compliance with the
+    terms of this License and that the license for the Executable form does
+    not attempt to limit or alter the recipients rights in the Source Code
+    form from the rights set forth in this License. If You distribute the
+    Covered Software in Executable form under a different license, You must
+    make it absolutely clear that any terms which differ from this License
+    are offered by You alone, not by the Initial Developer or Contributor.
+    You hereby agree to indemnify the Initial Developer and every Contributor
+    for any liability incurred by the Initial Developer or such Contributor as
+    a result of any such terms You offer.
+
+    3.6. Larger Works. You may create a Larger Work by combining Covered
+    Software with other code not governed by the terms of this License and
+    distribute the Larger Work as a single product. In such a case, You must
+    make sure the requirements of this License are fulfilled for the Covered
+    Software.
+
+    4. Versions of the License.
+
+    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
+    and may publish revised and/or new versions of this License from time to
+    time. Each version will be given a distinguishing version number. Except
+    as provided in Section 4.3, no one other than the license steward has the
+    right to modify this License.
+
+    4.2. Effect of New Versions. You may always continue to use, distribute
+    or otherwise make the Covered Software available under the terms of the
+    version of the License under which You originally received the Covered
+    Software. If the Initial Developer includes a notice in the Original
+    Software prohibiting it from being distributed or otherwise made
+    available under any subsequent version of the License, You must
+    distribute and make the Covered Software available under the terms of
+    the version of the License under which You originally received the
+    Covered Software. Otherwise, You may also choose to use, distribute or
+    otherwise make the Covered Software available under the terms of any
+    subsequent version of the License published by the license steward.
+
+    4.3. Modified Versions. When You are an Initial Developer and You want
+    to create a new license for Your Original Software, You may create and
+    use a modified version of this License if You: (a) rename the license and
+    remove any references to the name of the license steward (except to note
+    that the license differs from this License); and (b) otherwise make it
+    clear that the license contains terms which differ from this License.
+
+    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
+    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
+    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
+    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
+    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
+    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
+    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
+    EXCEPT UNDER THIS DISCLAIMER.
+
+    6. TERMINATION.
+
+    6.1. This License and the rights granted hereunder will terminate
+    automatically if You fail to comply with terms herein and fail to cure
+    such breach within 30 days of becoming aware of the breach. Provisions
+    which, by their nature, must remain in effect beyond the termination of
+    this License shall survive.
+
+    6.2. If You assert a patent infringement claim (excluding declaratory
+    judgment actions) against Initial Developer or a Contributor (the Initial
+    Developer or Contributor against whom You assert such claim is referred
+    to as Participant) alleging that the Participant Software (meaning the
+    Contributor Version where the Participant is a Contributor or the
+    Original Software where the Participant is the Initial Developer)
+    directly or indirectly infringes any patent, then any and all rights
+    granted directly or indirectly to You by such Participant, the Initial
+    Developer (if the Initial Developer is not the Participant) and all
+    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
+    60 days notice from Participant terminate prospectively and automatically
+    at the expiration of such 60 day notice period, unless if within such
+    60 day period You withdraw Your claim with respect to the Participant
+    Software against such Participant either unilaterally or pursuant to a
+    written agreement with Participant.
+
+    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+    user licenses that have been validly granted by You or any distributor
+    hereunder prior to termination (excluding licenses granted to You by any
+    distributor) shall survive termination.
+
+    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
+    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
+    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
+    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
+    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
+    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
+    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
+    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
+    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
+    AND LIMITATION MAY NOT APPLY TO YOU.
+
+    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
+    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
+    commercial computer software (as that term is defined at 48 C.F.R.
+    252.227-7014(a)(1)) and commercial computer software documentation as such
+    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
+    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
+    Government End Users acquire Covered Software with only those rights set
+    forth herein. This U.S. Government Rights clause is in lieu of, and
+    supersedes, any other FAR, DFAR, or other clause or provision that
+    addresses Government rights in computer software under this License.
+
+    9. MISCELLANEOUS. This License represents the complete agreement
+    concerning subject matter hereof. If any provision of this License is
+    held to be unenforceable, such provision shall be reformed only to the
+    extent necessary to make it enforceable. This License shall be governed
+    by the law of the jurisdiction specified in a notice contained within
+    the Original Software (except to the extent applicable law, if any,
+    provides otherwise), excluding such jurisdictions conflict-of-law
+    provisions. Any litigation relating to this License shall be subject to
+    the jurisdiction of the courts located in the jurisdiction and venue
+    specified in a notice contained within the Original Software, with the
+    losing party responsible for costs, including, without limitation, court
+    costs and reasonable attorneys fees and expenses. The application of the
+    United Nations Convention on Contracts for the International Sale of
+    Goods is expressly excluded. Any law or regulation which provides that
+    the language of a contract shall be construed against the drafter shall
+    not apply to this License. You agree that You alone are responsible for
+    compliance with the United States export administration regulations (and
+    the export control laws and regulation of any other countries) when You
+    use, distribute or otherwise make available any Covered Software.
+
+    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
+    Contributors, each party is responsible for claims and damages arising,
+    directly or indirectly, out of its utilization of rights under this
+    License and You agree to work with Initial Developer and Contributors
+    to distribute such responsibility on an equitable basis. Nothing herein
+    is intended or shall be deemed to constitute any admission of liability.
+
+    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+    LICENSE (CDDL) The code released under the CDDL shall be governed by the
+    laws of the State of California (excluding conflict-of-law provisions).
+    Any litigation relating to this License shall be subject to the
+    jurisdiction of the Federal Courts of the Northern District of California
+    and the state courts of the State of California, with venue lying in
+    Santa Clara County, California.
+
+
+==============================================================================
+
+For: jaxb-xjc-2.1.7.jar
+    Containing Project URL: 
+
+Copyright (c) 2004 Kohsuke Kawaguchi
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom
+the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall
+be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=============================================================================== 
+The following components are BSD Licensed 
+=============================================================================== 
+
+For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
+    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
+
+Copyright (c) 2003-2007, Dennis M. Sosnoski
+All rights reserved.
+
+Copyright (c) 2010 Terence Parr
+All rights reserved.
+
+[The BSD License]
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+ * Neither the name of JiBX nor the names of its contributors may be used
+   to endorse or promote products derived from this software without specific
+   prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==============================================================================
+
+For YFilter:
+    Containing Project URL: http://yfilter.cs.umass.edu/
+
+YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
+
+Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this
+    list of conditions and the following disclaimer in the documentation and/or other
+    materials provided with the distribution.
+    * Neither the name of the University of California at Berkeley nor the names of
+    its contributors may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================================================
+For jaxen-1.1.1.jar:
+    Containing Project URL: http://jaxen.codehaus.org/
+
+ Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+  * Neither the name of the Jaxen Project nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================== 
+The following components are CPL Licensed 
+=============================================================================== 
+
+For wsdl4j-1.6.2.jar:
+    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
+
+Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
+"Program" means the Contributions distributed in accordance with this Agreement.
+"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within the
Program.
+Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
+If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
+Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
+
+==========================================================================================
+==========================================================================================
+
+For puretls:
+    Containing Project URL: 
+
+  This package is a SSLv3/TLS implementation written by Eric Rescorla
+   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
+      Rescorla may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+
+==============================================================================
+
+For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
+    Containing Project URL: 
+
+For the W3C schema and DTD files in the org.apache.woden.resolver package:
+
+W3C® DOCUMENT LICENSE
+http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
+
+Public documents on the W3C site are provided by the copyright holders under
+the following license. By using and/or copying this document, or the W3C
+document from which this statement is linked, you (the licensee) agree that
+you have read, understood, and will comply with the following terms and
+conditions:
+
+Permission to copy, and distribute the contents of this document, or the W3C
+document from which this statement is linked, in any medium for any purpose
+and without fee or royalty is hereby granted, provided that you include the
+following on ALL copies of the document, or portions thereof, that you use:
+
+  1. A link or URL to the original W3C document.
+  2. The pre-existing copyright notice of the original author, or if it
+     doesn't exist, a notice (hypertext is preferred, but a textual
+     representation is permitted) of the form: "Copyright © [$date-of-document]
+     World Wide Web Consortium, (Massachusetts Institute of Technology,
+     European Research Consortium for Informatics and Mathematics, Keio
+     University). All Rights Reserved.
+     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
+  3. If it exists, the STATUS of the W3C document.
+
+When space permits, inclusion of the full text of this NOTICE should be
+provided. We request that authorship attribution be provided in any software,
+documents, or other items or products that you create pursuant to the
+implementation of the contents of this document, or any portion thereof.
+
+No right to create modifications or derivatives of W3C documents is granted
+pursuant to this license. However, if additional requirements (documented in
+the Copyright FAQ) are satisfied, the right to create modifications or
+derivatives is sometimes granted by the W3C to individuals complying with
+those requirements.
+
+THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
+FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
+INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
+PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
+
+The name and trademarks of copyright holders may NOT be used in advertising
+or publicity pertaining to this document or its contents without specific,
+written prior permission. Title to copyright in this document will at all
+times remain with copyright holders.
+
+This formulation of W3C's notice and license became active on December 31 2002. 
+This version removes the copyright ownership notice such that this license can 
+be used with materials other than those owned by the W3C, reflects that ERCIM is 
+now a host of the W3C, includes references to this specific dated version of the 
+license, and removes the ambiguous grant of "use". Otherwise, this version is the 
+same as the previous version and is written so as to preserve the Free Software 
+Foundation's assessment of GPL compatibility and OSI's certification under the 
+Open Source Definition. Please see our Copyright FAQ for common questions about 
+using materials from our site, including specific terms and conditions for packages 
+like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
+o site-policy@w3.org.
+
+Joseph Reagle <si...@w3.org>
+ 
+Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
+
+==========================================================================================
+
+XML API library, org.w3c classes (xml-apis)
+    Containing Project URL: 
+
+    DOM Java Language Binding:
+    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
+
+    W3C IPR SOFTWARE NOTICE
+    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
+    Technology, Institut National de Recherche en Informatique et en
+    Automatique, Keio University). All Rights Reserved.
+
+    The DOM bindings are published under the W3C Software Copyright Notice
+    and License. The software license requires "Notice of any changes or
+    modifications to the W3C files, including the date changes were made."
+    Consequently, modified versions of the DOM bindings must document that
+    they do not conform to the W3C standard; in the case of the IDL binding,
+    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
+    binding, the package names can no longer be in the 'org.w3c' package.
+
+    Note: The original version of the W3C Software Copyright Notice and
+    License could be found at
+    http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
+    Institute of Technology, Institut National de Recherche en Informatique
+    et en Automatique, Keio University). All Rights Reserved.
+    http://www.w3.org/Consortium/Legal/
+
+    This W3C work (including software, documents, or other related items) is
+    being provided by the copyright holders under the following license. By
+    obtaining, using and/or copying this work, you (the licensee) agree that
+    you have read, understood, and will comply with the following terms and
+    conditions:
+
+    Permission to use, copy, and modify this software and its documentation,
+    with or without modification, for any purpose and without fee or royalty
+    is hereby granted, provided that you include the following on ALL copies
+    of the software and documentation or portions thereof, including
+    modifications, that you make:
+
+      1. The full text of this NOTICE in a location viewable to users of the
+         redistributed or derivative work.
+
+      2. Any pre-existing intellectual property disclaimers, notices, or
+         terms and conditions. If none exist, a short notice of the following
+         form (hypertext is preferred, text is permitted) should be used
+         within the body of any redistributed or derivative code:
+         "Copyright (C) [$date-of-software] World Wide Web Consortium,
+         (Massachusetts Institute of Technology, Institut National de
+         Recherche en Informatique et en Automatique, Keio University).
+         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+
+      3. Notice of any changes or modifications to the W3C files, including
+         the date changes were made. (We recommend you provide URIs to the
+         location from which the code is derived.)
+
+    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
+    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
+    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+    DOCUMENTATION.
+
+    The name and trademarks of copyright holders may NOT be used in
+    advertising or publicity pertaining to the software without specific,
+    written prior permission. Title to copyright in this software and any
+    associated documentation will at all times remain with copyright holders.
+
+=============================================================================== 
+The following components come under the Eclipse Public 1.0 License 
+=============================================================================== 
+Eclipse JDT Core (core-3.1.1.jar)
+
+-AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
+    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
+
+  Eclipse Public License - v 1.0
+
+    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+    1. DEFINITIONS
+
+    "Contribution" means:
+
+    a) in the case of the initial Contributor, the initial code and
+       documentation distributed under this Agreement, and
+
+    b) in the case of each subsequent Contributor:
+
+       i) changes to the Program, and
+
+       ii) additions to the Program;
+
+       where such changes and/or additions to the Program originate from and
+       are distributed by that particular Contributor. A Contribution
+       'originates' from a Contributor if it was added to the Program by
+       such Contributor itself or anyone acting on such Contributor's behalf.
+       Contributions do not include additions to the Program which: (i) are
+       separate modules of software distributed in conjunction with the
+       Program under their own license agreement, and (ii) are not derivative
+       works of the Program.
+
+    "Contributor" means any person or entity that distributes the Program.
+
+    "Licensed Patents " mean patent claims licensable by a Contributor which
+    are necessarily infringed by the use or sale of its Contribution alone or
+    when combined with the Program.
+
+    "Program" means the Contributions distributed in accordance with this
+    Agreement.
+
+    "Recipient" means anyone who receives the Program under this Agreement,
+    including all Contributors.
+
+    2. GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby grants
+       Recipient a non-exclusive, worldwide, royalty-free copyright license to
+       reproduce, prepare derivative works of, publicly display, publicly
+       perform, distribute and sublicense the Contribution of such
+       Contributor, if any, and such derivative works, in source code and
+       object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby grants
+       Recipient a non-exclusive, worldwide, royalty-free patent license under
+       Licensed Patents to make, use, sell, offer to sell, import and
+       otherwise transfer the Contribution of such Contributor, if any, in
+       source code and object code form. This patent license shall apply to
+       the combination of the Contribution and the Program if, at the time
+       the Contribution is added by the Contributor, such addition of the
+       Contribution causes such combination to be covered by the Licensed
+       Patents. The patent license shall not apply to any other combinations
+       which include the Contribution. No hardware per se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the
+       licenses to its Contributions set forth herein, no assurances are
+       provided by any Contributor that the Program does not infringe the
+       patent or other intellectual property rights of any other entity. Each
+       Contributor disclaims any liability to Recipient for claims brought by
+       any other entity based on infringement of intellectual property rights
+       or otherwise. As a condition to exercising the rights and licenses
+       granted hereunder, each Recipient hereby assumes sole responsibility
+       to secure any other intellectual property rights needed, if any. For
+       example, if a third party patent license is required to allow Recipient
+       to distribute the Program, it is Recipient's responsibility to acquire
+       that license before distributing the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+       copyright rights in its Contribution, if any, to grant the copyright
+       license set forth in this Agreement.
+
+    3. REQUIREMENTS
+
+    A Contributor may choose to distribute the Program in object code form
+    under its own license agreement, provided that:
+
+    a) it complies with the terms and conditions of this Agreement; and
+
+    b) its license agreement:
+
+       i)   effectively disclaims on behalf of all Contributors all warranties
+            and conditions, express and implied, including warranties or
+            conditions of title and non-infringement, and implied warranties
+            or conditions of merchantability and fitness for a particular
+            purpose;
+
+       ii)  effectively excludes on behalf of all Contributors all liability
+            for damages, including direct, indirect, special, incidental and
+            consequential damages, such as lost profits;
+
+       iii) states that any provisions which differ from this Agreement are
+            offered by that Contributor alone and not by any other party; and
+
+       iv)  states that source code for the Program is available from such
+            Contributor, and informs licensees how to obtain it in a
+            reasonable manner on or through a medium customarily used for
+            software exchange.
+
+    When the Program is made available in source code form:
+
+    a) it must be made available under this Agreement; and
+
+    b) a copy of this Agreement must be included with each copy of the
+       Program.
+
+    Contributors may not remove or alter any copyright notices contained
+    within the Program.
+
+    Each Contributor must identify itself as the originator of its
+    Contribution, if any, in a manner that reasonably allows subsequent
+    Recipients to identify the originator of the Contribution.
+
+    4. COMMERCIAL DISTRIBUTION
+
+    Commercial distributors of software may accept certain responsibilities
+    with respect to end users, business partners and the like. While this
+    license is intended to facilitate the commercial use of the Program,
+    the Contributor who includes the Program in a commercial product offering
+    should do so in a manner which does not create potential liability for
+    other Contributors. Therefore, if a Contributor includes the Program in
+    a commercial product offering, such Contributor ("Commercial Contributor")
+    hereby agrees to defend and indemnify every other Contributor
+    ("Indemnified Contributor") against any losses, damages and costs
+    (collectively "Losses") arising from claims, lawsuits and other legal
+    actions brought by a third party against the Indemnified Contributor to
+    the extent caused by the acts or omissions of such Commercial Contributor
+    in connection with its distribution of the Program in a commercial
+    product offering. The obligations in this section do not apply to any
+    claims or Losses relating to any actual or alleged intellectual property
+    infringement. In order to qualify, an Indemnified Contributor must:
+    a) promptly notify the Commercial Contributor in writing of such claim,
+    and b) allow the Commercial Contributor to control, and cooperate with
+    the Commercial Contributor in, the defense and any related settlement
+    negotiations. The Indemnified Contributor may participate in any such
+    claim at its own expense.
+
+    For example, a Contributor might include the Program in a commercial
+    product offering, Product X. That Contributor is then a Commercial
+    Contributor. If that Commercial Contributor then makes performance claims,
+    or offers warranties related to Product X, those performance claims and
+    warranties are such Commercial Contributor's responsibility alone. Under
+    this section, the Commercial Contributor would have to defend claims
+    against the other Contributors related to those performance claims and
+    warranties, and if a court requires any other Contributor to pay any
+    damages as a result, the Commercial Contributor must pay those damages.
+
+    5. NO WARRANTY
+
+    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
+    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
+    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
+    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
+    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
+    the appropriateness of using and distributing the Program and assumes all
+    risks associated with its exercise of rights under this Agreement ,
+    including but not limited to the risks and costs of program errors,
+    compliance with applicable laws, damage to or loss of data, programs or
+    equipment, and unavailability or interruption of operations.
+
+    6. DISCLAIMER OF LIABILITY
+
+    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
+    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+    7. GENERAL
+
+    If any provision of this Agreement is invalid or unenforceable under
+    applicable law, it shall not affect the validity or enforceability of
+    the remainder of the terms of this Agreement, and without further action
+    by the parties hereto, such provision shall be reformed to the minimum
+    extent necessary to make such provision valid and enforceable.
+
+    If Recipient institutes patent litigation against any entity (including
+    a cross-claim or counterclaim in a lawsuit) alleging that the Program
+    itself (excluding combinations of the Program with other software or
+    hardware) infringes such Recipient's patent(s), then such Recipient's
+    rights granted under Section 2(b) shall terminate as of the date such
+    litigation is filed.
+
+    All Recipient's rights under this Agreement shall terminate if it fails
+    to comply with any of the material terms or conditions of this Agreement
+    and does not cure such failure in a reasonable period of time after
+    becoming aware of such noncompliance. If all Recipient's rights under
+    this Agreement terminate, Recipient agrees to cease use and distribution
+    of the Program as soon as reasonably practicable. However, Recipient's
+    obligations under this Agreement and any licenses granted by Recipient
+    relating to the Program shall continue and survive.
+
+    Everyone is permitted to copy and distribute copies of this Agreemen

<TRUNCATED>

[72/81] [abbrv] airavata git commit: moving resources into src

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/NOTICE b/distribution/src/main/resources/NOTICE
new file mode 100644
index 0000000..fa7cba5
--- /dev/null
+++ b/distribution/src/main/resources/NOTICE
@@ -0,0 +1,163 @@
+Apache Airavata
+Copyright 2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+===============================================================================
+Apache Xerces Java Notice:
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+     - voluntary contributions made by Paul Eng on behalf of the
+       Apache Software Foundation that were originally developed at iClick, Inc.,
+       software copyright (c) 1999.
+
+================================================================================
+Apache XmlBeans Notice: 
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
+
+   Aside from contributions to the Apache XMLBeans project, this
+   software also includes:
+
+    - one or more source files from the Apache Xerces-J and Apache Axis
+      products, Copyright (c) 1999-2003 Apache Software Foundation
+
+    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
+      Consortium (Massachusetts Institute of Technology, European Research
+      Consortium for Informatics and Mathematics, Keio University)
+
+    - resolver.jar from Apache Xml Commons project,
+      Copyright (c) 2001-2003 Apache Software Foundation
+
+    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
+      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
+
+    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
+      Copyright 2005 BEA under the terms of the Apache Software License 2.0
+      
+=========================================================================================
+Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
+
+Portions Copyright 2006 International Business Machines Corp.
+Portions Copyright 2005-2007 WSO2, Inc.
+
+This product also includes schemas and specification developed by:
+- the W3C consortium (http://www.w3c.org)
+
+This product also includes WS-* schemas developed by International
+Business Machines Corporation, Microsoft Corporation, BEA Systems, 
+TIBCO Software, SAP AG, Sonic Software, and VeriSign
+
+This product also includes a WSDL developed by salesforce.com
+- Copyright 1999-2006 salesforce.com, inc.
+Portions of the included xmlbeans library were originally based on the following:
+- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
+
+====================================================================================
+Apache Derby Notice:
+
+Portions of Derby were originally developed by
+International Business Machines Corporation and are
+licensed to the Apache Software Foundation under the
+"Software Grant and Corporate Contribution License Agreement",
+informally known as the "Derby CLA".
+The following copyright notice(s) were affixed to portions of the code
+with which this file is now or was at one time distributed
+and are placed here unaltered.
+
+(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
+
+(C) Copyright IBM Corp. 2003. 
+
+=======================
+
+The portion of the functionTests under 'nist' was originally 
+developed by the National Institute of Standards and Technology (NIST), 
+an agency of the United States Department of Commerce, and adapted by
+International Business Machines Corporation in accordance with the NIST
+Software Acknowledgment and Redistribution document at
+http://www.itl.nist.gov/div897/ctg/sql_form.htm
+
+========================
+
+The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
+java/stubs/jdbc3) were produced by trimming sources supplied by the
+Apache Harmony project. In addition, the Harmony SerialBlob and
+SerialClob implementations are used. The following notice covers the Harmony sources:
+
+Portions of Harmony were originally developed by
+Intel Corporation and are licensed to the Apache Software
+Foundation under the "Software Grant and Corporate Contribution
+License Agreement", informally known as the "Intel Harmony CLA".
+
+=============================================================================
+Apache Woden Notice:
+
+   This product also includes software developed by :
+   
+     - IBM Corporation (http://www.ibm.com),
+         WSDL4J was the initial code contribution for the Apache Woden
+         project and some of the WSDL4J design and code has been reused.
+     - The W3C Consortium (http://www.w3c.org),
+         Common W3C XML Schema and DTD files are packaged with Apache Woden.
+
+   Please read the different LICENSE files present in the root directory of
+   this distribution.
+
+=========================================================================
+Woodstox Notice: 
+
+This product includes software developed by the Woodstox Project 
+(http://woodstox.codehaus.org/)
+
+This product currently only contains code developed by authors
+of specific components, as identified by the source code files.
+
+Since product implements StAX API, it has dependencies to StAX API
+classes.
+
+For additional credits (generally to people who reported problems)
+see CREDITS file.
+
+===========================================================================
+Apache xml-commons xml-apis Notice:
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
+
+================================================================================================
+Apache  Xalan Notice: 
+
+Portions of this software was originally based on the following:
+     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
+     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
+     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
+     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
+       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
+================================================================================================
+Apache  OpenJPA Notice: 
+
+OpenJPA includes software developed by the SERP project
+Copyright (c) 2002-2006, A. Abram White. All rights reserved.
+
+OpenJPA includes the persistence and orm schemas from the JPA specifications.
+Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
+OpenJPA elects to include this software in this distribution under the
+CDDL license.  You can obtain a copy of the License at:
+    https://glassfish.dev.java.net/public/CDDL+GPL.html
+The source code is available at:
+    https://glassfish.dev.java.net/source/browse/glassfish/
+
+OpenJPA includes software written by Miroslav Nachev
+OpenJPA uses test code written by Charles Tillman.
+================================================================================================
+Apache XmlSchema Notice:
+
+Portions Copyright 2006 International Business Machines Corp.
+================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/README
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/README b/distribution/src/main/resources/README
new file mode 100644
index 0000000..c2223ff
--- /dev/null
+++ b/distribution/src/main/resources/README
@@ -0,0 +1,145 @@
+Apache Airavata Source - README.txt
+Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
+--------------------------------------------------------------------------------
+
+About
+=====
+Apache Airavata, a software framework to executing and managing computational jobs on 
+distributed computing resources including local clusters, supercomputers, national grids, 
+academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
+distributed messaging, and workflow composition and orchestration. Airavata bundles a server package 
+with an API, client software development Kits and a general purpose GUI XBaya as a application registration, workflow
+construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
+produced data.  
+
+Contact
+========
+For additional information about Apache Airavata, please contact the user or dev mailing lists:
+http://airavata.apache.org/community/mailing-lists.html
+
+Description of Airavata Directory Structure
+==================================
+    - airavata-api
+      This directory contains Airavata API related data models, api methods, generated server skeletons, client stubs, server implementations and client samples. 
+
+    - modules
+      This contains the source code of all the airavata maven projects organized as libraries, services and distributions
+
+    - samples
+      This contains all the system wide samples provided in Airavata distribution. All the sample are having its README file
+      So users have to refer each readme file before running each sample.
+
+    - tools
+      This contains source code libraries that can enhance Airavata features.
+
+    - README
+      This document.
+    
+    - RELEASE_NOTES
+      The describe the key features and know issues with the current release. 
+
+    - INSTALL
+      This document will contain information on installing Apache-Airavata.
+
+Airavata Source Distribution Directory Structure
+================================================
+
+    AIRAVATA_MASTER
+		├── airavata-api
+		├── modules
+		│   ├── airavata-client
+		│   ├── app-catalog
+		│   ├── commons
+		│   │   ├── gfac-schema
+		│   │   ├── utils
+		│   │   ├── workflow-execution-context
+		│   │   └── workflow-tracking
+		│   ├── credential-store-service
+		│   ├── distribution
+		│   │   ├── api-server
+		│   │   ├── client
+		│   │   ├── gfac-server
+		│   │   ├── orchestrator-server
+		│   │   ├── server
+		│   │   └── release
+		│   │   └── xbaya-gui
+		│   ├── gfac
+		│   │   ├── airavata-gfac-service
+		│   │   ├── gfac-bes
+		│   │   ├── gfac-core
+		│   │   ├── gfac-ec2
+		│   │   ├── gfac-gram
+		│   │   ├── gfac-gsissh
+		│   │   ├── gfac-hadoop
+		│   │   ├── gfac-local
+		│   │   ├── gfac-monitor
+		│   │   ├── gfac-ssh
+		│   │   ├── gfac-thrift-descriptions
+		│   ├── integration-tests
+		│   ├── messaging
+		│   ├── orchestrator
+		│   ├── registry
+		│   │   ├── airavata-jpa-registry
+		│   │   ├── registry-cpi
+		│   ├── security
+		│   ├── credential-store
+		│   ├── server
+		│   ├── test-suite
+		│   ├── workflow-model
+		│   │   ├── workflow-engine
+		│   │   ├── workflow-model-component-node
+		│   │   └── workflow-model-core
+		│   ├── ws-messenger
+		│   │   ├── commons
+		│   │   ├── distribution
+		│   │   ├── messagebox
+		│   │   ├── messagebroker
+		│   │   ├── message-monitor
+		│   │   └── samples
+		│   └── xbaya-gui
+		├── samples
+		├── tools
+		│   ├── gsissh
+		│   ├── gsissh-cli-tools
+		│   ├── phoebus-integration
+		│   └── registry-migrate
+		├── INSTALL
+		├── LICENSE
+		├── NOTICE
+		├── README
+		└── RELEASE_NOTES
+
+Available Binary Distributions
+==============================
+
+Server Distributions
+--------------------
+* Airavata Server
+  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
+  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
+
+* Airavata API Server
+  This is the server that contains Airavata API Server.
+
+* Airavata Orchestrator Server
+  This is the stand-alone orchestrator server
+
+* Airavata GFac Server
+  This is the standalone GFac Server
+
+Client Distributions
+--------------------
+* Airavata XBaya
+  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
+  execute and monitor workflows and browse the generated results from the airavata registry.
+
+* Airavata Client
+  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
+  access Airavata functionality through Airavata API. 
+  
+ How to test and run samples
+===========================
+* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
+* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
+* To walk through Airavata features, follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial.
+* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/airavata-server.bat
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/airavata-server.bat b/distribution/src/main/resources/bin/airavata-server.bat
new file mode 100644
index 0000000..09752c4
--- /dev/null
+++ b/distribution/src/main/resources/bin/airavata-server.bat
@@ -0,0 +1,55 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+setlocal EnableDelayedExpansion
+
+call "%~dp0"setenv.bat
+
+:loop
+if ""%1""==""-xdebug"" goto xdebug
+if ""%1""==""-security"" goto security
+if ""%1""=="""" goto run
+goto help
+
+:xdebug
+set JAVA_OPTS= %JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000
+shift
+goto loop
+
+:security
+set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%AIRAVATA_HOME%\conf\axis2.policy -Daxis2.home=%AIRAVATA_HOME%
+shift
+goto loop
+
+:help
+echo  Usage: %0 [-options]
+echo.
+echo  where options include:
+echo   -xdebug    Start Airavata Server under JPDA debugger
+echo   -security  Enable Java 2 security
+echo   -h         Help
+goto end
+
+:run
+cd "%AIRAVATA_HOME%\bin"
+set LOGO_FILE="logo.txt"
+if exist "%LOGO_FILE%" type "%LOGO_FILE%"
+
+java %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" -Djava.endorsed.dirs="%AIRAVATA_HOME%/lib/endorsed":"%JAVA_HOME%/jre/lib/endorsed":"%JAVA_HOME%/lib/endorsed" org.apache.airavata.server.ServerMain -repo "%AIRAVATA_HOME%"/repository/services -conf "%AIRAVATA_HOME%"/conf/axis2.xml %*
+
+:end

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/airavata-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/airavata-server.sh b/distribution/src/main/resources/bin/airavata-server.sh
new file mode 100755
index 0000000..885dcd4
--- /dev/null
+++ b/distribution/src/main/resources/bin/airavata-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+#SERVERS="--servers=apiserver,orchestrator,gfac,credentialstore"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+        	AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+		AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
+	    IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > airavata-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/api-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/api-server.sh b/distribution/src/main/resources/bin/api-server.sh
new file mode 100755
index 0000000..872c854
--- /dev/null
+++ b/distribution/src/main/resources/bin/api-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=apiserver"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > api-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/derby.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/derby.sh b/distribution/src/main/resources/bin/derby.sh
new file mode 100644
index 0000000..134f7b9
--- /dev/null
+++ b/distribution/src/main/resources/bin/derby.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# 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.
+
+. `dirname $0`/setenv.sh
+export DERBY_HOME=$AIRAVATA_HOME/standalone-server
+cd $AIRAVATA_HOME/bin
+./startNetworkServer $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/gfac-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/gfac-server.sh b/distribution/src/main/resources/bin/gfac-server.sh
new file mode 100755
index 0000000..839ef4e
--- /dev/null
+++ b/distribution/src/main/resources/bin/gfac-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=gfac"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > gfac-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/logo.txt b/distribution/src/main/resources/bin/logo.txt
new file mode 100644
index 0000000..e886438
--- /dev/null
+++ b/distribution/src/main/resources/bin/logo.txt
@@ -0,0 +1,34 @@
+...._....................._..............._...._......................_.........
+.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
+../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
+./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
+/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
+........|_|.....................................................................
+................................................................................
+................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
+..............:???????....:::...~??????????????.~..::...=????????...............
+............????????..~~..?????..??????????????.?????..~~~.~???????.............
+...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
+.........?????++??????..????????:.??????????I..????????..????????+????..........
+........??.....???????....???????...???????+..+??????+.I.????????.....?,........
+........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
+......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
+....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
+....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
+....??????..?...........+?..???.....???????......???.??...........~=.??????=....
+....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
+...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
+.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
+..........????..............??????~...~??..~~??????..?...........+???,..........
+...........???............=.+???????,.?+:.?????????..+...........???+...........
+............??............?,.??????.,??..??????????.,............???............
+...........??,.............=.,????.?+....????????I.I..............=?............
+..........I?..................+??.:?~.....=??????..................??...........
+..........??...?...............??.:?=......??????..............?...??...........
+............++?..............?.????...?....??????.+..............++I............
+.............................?.??????~....???????.?.............................
+............................~~.??????......??????...............................
+.............................=???????......???????+.............................
+..........................=I??++?+++?......?+++++++?+...........................
+..........................,..77..77.........  ..  ...7..........................
+................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/orchestrator-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/orchestrator-server.sh b/distribution/src/main/resources/bin/orchestrator-server.sh
new file mode 100755
index 0000000..5fa73e7
--- /dev/null
+++ b/distribution/src/main/resources/bin/orchestrator-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=orchestrator"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > orchestrator-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/setenv.bat b/distribution/src/main/resources/bin/setenv.bat
new file mode 100644
index 0000000..223f8cd
--- /dev/null
+++ b/distribution/src/main/resources/bin/setenv.bat
@@ -0,0 +1,43 @@
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+@echo off
+
+:checkJava
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto initialize
+
+:noJavaHome
+echo You must set the JAVA_HOME environment variable before running Airavata.
+goto end
+
+:initialize
+if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
+SET curDrive=%cd:~0,1%
+SET airavataDrive=%AIRAVATA_HOME:~0,1%
+if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
+goto updateClasspath
+
+rem ----- update classpath -----------------------------------------------------
+:updateClasspath
+cd %AIRAVATA_HOME%
+set XBAYA_CLASSPATH=
+FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
+FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
+
+:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/setenv.sh b/distribution/src/main/resources/bin/setenv.sh
new file mode 100755
index 0000000..84673db
--- /dev/null
+++ b/distribution/src/main/resources/bin/setenv.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# 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.
+
+
+# Get standard environment variables
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+
+PRGDIR=`dirname "$PRG"`
+
+# Only set AIRAVATA_HOME if not already set
+[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
+
+XBAYA_CLASSPATH=""
+
+
+
+for f in "$AIRAVATA_HOME"/lib/*.jar
+do
+  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
+done
+
+for f in "$AIRAVATA_HOME"/repository/services/*.jar
+do
+  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
+done
+
+XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
+
+
+
+
+export AIRAVATA_HOME
+export XBAYA_CLASSPATH
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/startNetworkServer
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/startNetworkServer b/distribution/src/main/resources/bin/startNetworkServer
new file mode 100644
index 0000000..808566c
--- /dev/null
+++ b/distribution/src/main/resources/bin/startNetworkServer
@@ -0,0 +1,189 @@
+#!/bin/sh
+
+# 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.
+
+if [ -n "$derby_common_debug" ] ; then
+  set -x
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+           fi
+           ;;
+esac
+
+if [ -z "$DERBY_HOME" -o ! -d "$DERBY_HOME" ] ; then
+  ## resolve links - $0 may be a link to derby's home
+  PRG="$0"
+  progname=`basename "$0"`
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+    else
+    PRG=`dirname "$PRG"`"/$link"
+    fi
+  done
+
+  DERBY_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  DERBY_HOME=`cd "$DERBY_HOME" && pwd`
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$DERBY_HOME" ] &&
+    DERBY_HOME=`cygpath --unix "$DERBY_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# set DERBY_LIB location
+DERBY_LIB="${DERBY_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=java
+    fi
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+# set local classpath, don't overwrite the user's
+LOCALCLASSPATH=$DERBY_LIB/derby.jar:$DERBY_LIB/derbynet.jar:$DERBY_LIB/derbytools.jar:$DERBY_LIB/derbyclient.jar
+
+# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+# user CLASSPATH first and derby-found jars after.
+# In that case, the user CLASSPATH will override derby-found jars
+#
+# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+# with derby-found jars first and user CLASSPATH after
+if [ -n "$CLASSPATH" ] ; then
+  # merge local and specified classpath 
+  if [ -z "$LOCALCLASSPATH" ] ; then 
+    LOCALCLASSPATH="$CLASSPATH"
+  elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+    LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+  else
+    LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+  fi
+
+  # remove class path from launcher -cp option
+  CLASSPATH=""
+fi
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  DERBY_HOME=`cygpath --$format "$DERBY_HOME"`
+  DERBY_LIB=`cygpath --$format "$DERBY_LIB"`
+  if [ -n "$JAVA_HOME" ]; then
+    JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+  fi
+  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  if [ -n "$CLASSPATH" ] ; then
+    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+  fi
+  CYGHOME=`cygpath --$format "$HOME"`
+fi
+
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+  case "$DERBY_HOME" in
+    *\\ )
+    DERBY_HOME="$DERBY_HOME\\"
+    ;;
+  esac
+  case "$CYGHOME" in
+    *\\ )
+    CYGHOME="$CYGHOME\\"
+    ;;
+  esac
+  case "$LOCALCLASSPATH" in
+    *\\ )
+    LOCALCLASSPATH="$LOCALCLASSPATH\\"
+    ;;
+  esac
+  case "$CLASSPATH" in
+    *\\ )
+    CLASSPATH="$CLASSPATH\\"
+    ;;
+  esac
+fi
+
+# Readjust classpath for MKS
+# expr match 
+if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; then
+  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g
+'`
+fi
+#!/bin/sh
+
+# 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.
+
+derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start $@"
+eval $derby_exec_command

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/bin/workflow-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/bin/workflow-server.sh b/distribution/src/main/resources/bin/workflow-server.sh
new file mode 100755
index 0000000..b66e192
--- /dev/null
+++ b/distribution/src/main/resources/bin/workflow-server.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $AIRAVATA_HOME/bin
+LOGO_FILE="logo.txt"
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+IS_DAEMON_MODE=false
+LOGO=true
+STOP=false
+FORCE=false
+SERVERS="--servers=workflowserver"
+for var in "$@"
+do
+    case $var in
+        -xdebug)
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+            shift
+        ;;
+        -security)
+            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
+            shift
+        ;;
+	start)
+	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
+	   IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    LOGO=false
+	    STOP=true
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
+            shift
+        ;;
+	--force)
+	    FORCE=true
+            shift
+        ;;
+	-nologo)
+	    LOGO=false
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop [--force]     Stop all airavata servers."
+	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+            echo "  -nologo            Do not show airavata logo"
+            echo "  -xdebug            Start Airavata Server under JPDA debugger"
+            echo "  -security          Enable Java 2 security"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
+            shift
+    esac
+done
+if $LOGO ; then
+	if [ -e $LOGO_FILE ]
+	then
+		cat $LOGO_FILE
+	fi
+fi
+if $STOP && $FORCE ; 
+then
+	for f in `find . -name "server-start_*"`; do 
+		f_split=(${f//_/ });
+		echo "Found process file : $f" 
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting airavata server in daemon mode..."
+		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > workflow-server.out & 
+ 	else
+		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
+	fi
+fi
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/samples/registerSample.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/samples/registerSample.sh b/distribution/src/main/resources/samples/registerSample.sh
new file mode 100644
index 0000000..6450f6f
--- /dev/null
+++ b/distribution/src/main/resources/samples/registerSample.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# 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.
+
+. `dirname $0`/../bin/setenv.sh
+JAVA_OPTS=""
+
+java -classpath "$XBAYA_CLASSPATH" \
+		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
+		     org.apache.airavata.client.samples.RegisterSampleData $*

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/samples/scripts/add.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/samples/scripts/add.sh b/distribution/src/main/resources/samples/scripts/add.sh
new file mode 100755
index 0000000..daa140b
--- /dev/null
+++ b/distribution/src/main/resources/samples/scripts/add.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# 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.
+
+# add two numbers
+sleep 10
+/bin/echo  "Result=`expr $1 + $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/samples/scripts/echo.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/samples/scripts/echo.sh b/distribution/src/main/resources/samples/scripts/echo.sh
new file mode 100755
index 0000000..9dbaab9
--- /dev/null
+++ b/distribution/src/main/resources/samples/scripts/echo.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+#echo wrapper
+sleep 10
+/bin/echo "Echoed_Output=$1"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/samples/scripts/multiply.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/samples/scripts/multiply.sh b/distribution/src/main/resources/samples/scripts/multiply.sh
new file mode 100755
index 0000000..a5b5f7f
--- /dev/null
+++ b/distribution/src/main/resources/samples/scripts/multiply.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+# mutiply two numbers
+sleep 10
+/bin/echo "Result=`expr $1 \* $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6eaaff4f/distribution/src/main/resources/samples/scripts/subtract.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/samples/scripts/subtract.sh b/distribution/src/main/resources/samples/scripts/subtract.sh
new file mode 100755
index 0000000..a21bec7
--- /dev/null
+++ b/distribution/src/main/resources/samples/scripts/subtract.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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.
+
+# substract two numbers
+sleep 10
+/bin/echo "Result=`expr $1 - $2`"


[44/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/InputListImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/InputListImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/InputListImpl.java
new file mode 100644
index 0000000..73ae2bb
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/InputListImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  inputList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.InputList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML inputList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class InputListImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.InputList
+{
+    private static final long serialVersionUID = 1L;
+    
+    public InputListImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName INPUT$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "input");
+    
+    
+    /**
+     * Gets array of all "input" elements
+     */
+    public java.lang.String[] getInputArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(INPUT$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "input" element
+     */
+    public java.lang.String getInputArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INPUT$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "input" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetInputArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(INPUT$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "input" element
+     */
+    public org.apache.xmlbeans.XmlString xgetInputArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(INPUT$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "input" element
+     */
+    public int sizeOfInputArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(INPUT$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "input" element
+     */
+    public void setInputArray(java.lang.String[] inputArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(inputArray, INPUT$0);
+        }
+    }
+    
+    /**
+     * Sets ith "input" element
+     */
+    public void setInputArray(int i, java.lang.String input)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INPUT$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(input);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "input" element
+     */
+    public void xsetInputArray(org.apache.xmlbeans.XmlString[]inputArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(inputArray, INPUT$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "input" element
+     */
+    public void xsetInputArray(int i, org.apache.xmlbeans.XmlString input)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(INPUT$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(input);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "input" element
+     */
+    public void insertInput(int i, java.lang.String input)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(INPUT$0, i);
+            target.setStringValue(input);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "input" element
+     */
+    public void addInput(java.lang.String input)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INPUT$0);
+            target.setStringValue(input);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "input" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewInput(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(INPUT$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "input" element
+     */
+    public org.apache.xmlbeans.XmlString addNewInput()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(INPUT$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "input" element
+     */
+    public void removeInput(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(INPUT$0, i);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/JobDescriptorDocumentImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/JobDescriptorDocumentImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/JobDescriptorDocumentImpl.java
new file mode 100644
index 0000000..98d1650
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/JobDescriptorDocumentImpl.java
@@ -0,0 +1,77 @@
+/*
+ * An XML document type.
+ * Localname: JobDescriptor
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * A document containing one JobDescriptor(@http://airavata.apache.org/gfac/core/2012/12) element.
+ *
+ * This is a complex type.
+ */
+public class JobDescriptorDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument
+{
+    private static final long serialVersionUID = 1L;
+    
+    public JobDescriptorDocumentImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName JOBDESCRIPTOR$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "JobDescriptor");
+    
+    
+    /**
+     * Gets the "JobDescriptor" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.PbsParams getJobDescriptor()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.PbsParams target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.PbsParams)get_store().find_element_user(JOBDESCRIPTOR$0, 0);
+            if (target == null)
+            {
+                return null;
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * Sets the "JobDescriptor" element
+     */
+    public void setJobDescriptor(org.apache.airavata.gfac.core.x2012.x12.PbsParams jobDescriptor)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.PbsParams target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.PbsParams)get_store().find_element_user(JOBDESCRIPTOR$0, 0);
+            if (target == null)
+            {
+                target = (org.apache.airavata.gfac.core.x2012.x12.PbsParams)get_store().add_element_user(JOBDESCRIPTOR$0);
+            }
+            target.set(jobDescriptor);
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty "JobDescriptor" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.PbsParams addNewJobDescriptor()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.PbsParams target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.PbsParams)get_store().add_element_user(JOBDESCRIPTOR$0);
+            return target;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ModuleLoadCommandsImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ModuleLoadCommandsImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ModuleLoadCommandsImpl.java
new file mode 100644
index 0000000..1611ebf
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ModuleLoadCommandsImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  moduleLoadCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML moduleLoadCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class ModuleLoadCommandsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands
+{
+    private static final long serialVersionUID = 1L;
+    
+    public ModuleLoadCommandsImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName COMMAND$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "command");
+    
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    public java.lang.String[] getCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "command" element
+     */
+    public java.lang.String getCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString xgetCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "command" element
+     */
+    public int sizeOfCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "command" element
+     */
+    public void setCommandArray(java.lang.String[] commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets ith "command" element
+     */
+    public void setCommandArray(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    public void xsetCommandArray(org.apache.xmlbeans.XmlString[]commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    public void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(command);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    public void insertCommand(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(COMMAND$0, i);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    public void addCommand(java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(COMMAND$0);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(COMMAND$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    public org.apache.xmlbeans.XmlString addNewCommand()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(COMMAND$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "command" element
+     */
+    public void removeCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(COMMAND$0, i);
+        }
+    }
+}


[54/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/NOTICE b/modules/distribution/orchestrator-server/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/README b/modules/distribution/orchestrator-server/src/main/resources/README
deleted file mode 100644
index 1539b8c..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/README
+++ /dev/null
@@ -1,121 +0,0 @@
-Apache Airavata Server - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata can be used as individual components or 
-as an integrated solution to build science gateways or general-purpose distributed 
-application and workflow management systems. Users can use Airavata back end services 
-and build gadgets to deploy in open social containers such as Apache Rave and modify them 
-to suit their needs. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration.
-
-This distribution allows you to run a standalone Airavata Server which includes all the 
-airavata services shipped with a default derby database as the backend registry.
-
-Release Notes
-=============
-0.11 is the tenth release of Airavata (skipped 0.1-INCUBATNG). This release focuses bug fixes and GSISSH library for beta testing. For detailed tasks list, please see RELEASE_NOTES.
-
-Building from source
-====================
-For brief installation instructions, see INSTALL
-For detailed installation and further instructions refer http://airavata.apache.org/ - Documentation section in left hand panel. Step by step with proper documentation are provided.
-
-Known Issues in This Release
-============================
-This is the base release and is focused on a good foundation and less on features. This 
-version is not recommended for production usage.
-
-Airavata Binary Distribution Directory Structure
-================================================
-
-    AIRAVATA_HOME
-		├── bin
-		│   ├── database_scripts <dir>
-		│   ├── airavata-server.bat
-		│   ├── airavata-server.properties
-		│   ├── airavata-server.sh
-		│   ├── authenticators.xml
-		│   ├── axis2.xml
-		│   ├── derby.sh
-		│   ├── host.xml
-		│   ├── log4j.properties
-		│   ├── logo.txt
-		│   ├── setenv.bat
-		│   ├── setenv.sh
-		│   └── startNetworkServer
-		├── lib <dir>
-		├── repository
-		│   ├── modules 
-		│   └── services
-		├── samples
-		│   ├── workflows <dir>
-		│   ├── echo_out.sh
-		│   └── echo.sh
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		└── README
-
-
-How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "Airavata in Five Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* For intermediate level Airavata features, follow "Airavata in Ten Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html 
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html
-
-Description of Directory Structure
-==================================
-    - bin
-      This contains all the configuration files & the executable scripts to run the Airavata Server (Axis2 server 
-      with Airavata services which include messageBroker and messageBox with GFac Axis2 services), & a standalone Apache Derby server.
-
-    - bin - database_scripts
-      Contains the database scripts which are used to create tables for messagebox and messagebroker services
-
-    - samples
-      This contains sample workflow to try out & sample application scripts.
-
-    - lib
-      This contains all the libraries required to run the airavata server and/or derby server.
-
-    - repository - services
-      Contains deployed services in Axis2 runtime.
-
-    - README
-      This document.
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata Server Web Application
-  This is similar package as the Airavata Server but is distributed as the server Web Application archive.
-  This war is compatible with Apache Tomcat application server. The war bundles all airavata services 
-  enabled by defualt to startup a derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata XBaya JNLP
-  The Airavata XBaya JNLP distribution is the simular GUI distribution but prepackeged to be ready to be deployed to 
-   a web server as a web start application. The GUI provides features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry. 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/bin/logo.txt b/modules/distribution/orchestrator-server/src/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/bin/orchestrator-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/bin/orchestrator-server.sh b/modules/distribution/orchestrator-server/src/main/resources/bin/orchestrator-server.sh
deleted file mode 100755
index 5fa73e7..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/bin/orchestrator-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=orchestrator"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > orchestrator-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.bat b/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.sh b/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
deleted file mode 100644
index 843fde7..0000000
--- a/modules/distribution/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>airavata</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>distribution</artifactId>
-    <name>distribution</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-    <profiles>
-        <profile>
-            <id>default</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-                <module>new-dist</module>
-                <module>server</module>
-                <module>client</module>
-                <module>xbaya-gui</module>
-                <module>api-server</module>
-                <module>orchestrator-server</module>
-                <module>gfac-server</module>
-            	<module>release</module>
-            </modules>
-        </profile>
-    </profiles>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/release/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/release/pom.xml b/modules/distribution/release/pom.xml
deleted file mode 100644
index 1d7882a..0000000
--- a/modules/distribution/release/pom.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>distribution</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apache-airavata-release-artifacts</artifactId>
-    <name>Airavata release artifacts</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <build>
-        <plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.6</version>
-				<executions>
-					<execution>
-						<id>copy-artifacts</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<!--Airavata Server Distributions-->
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-server</artifactId>
-						            		<version>${project.version}</version>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-server</artifactId>
-						            		<version>${project.version}</version>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<!--Airavata Client Distributions-->
-								<!--Java SDK-->
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-java-sdk</artifactId>
-						           		<version>${project.version}</version>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-java-sdk</artifactId>
-						            		<version>${project.version}</version>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<!--PHP SDK-->
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-php-sdk</artifactId>
-						           		<version>${project.version}</version>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-php-sdk</artifactId>
-						            		<version>${project.version}</version>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<!--CPP SDK-->
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-cpp-sdk</artifactId>
-						           		<version>${project.version}</version>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>apache-airavata-client-cpp-sdk</artifactId>
-						            		<version>${project.version}</version>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifactItem>
-							</artifactItems>
-							<outputDirectory>${project.build.directory}/release-artifacts</outputDirectory>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-        </plugins>
-    </build>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <archieve.name>apache-airavata-client</archieve.name>
-		<airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>
-		<airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
-		<airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
deleted file mode 100644
index cf8a73c..0000000
--- a/modules/distribution/server/pom.xml
+++ /dev/null
@@ -1,587 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<parent>
-		<groupId>org.apache.airavata</groupId>
-		<artifactId>distribution</artifactId>
-		<version>0.16-SNAPSHOT</version>
-		<relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>apache-airavata-server</artifactId>
-	<name>Airavata server distribution</name>
-	<packaging>pom</packaging>
-	<url>http://airavata.apache.org/</url>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.8</version>
-				<executions>
-					<execution>
-						<id>unpack</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>unpack</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>airavata-server-configuration</artifactId>
-									<version>${project.version}</version>
-									<type>jar</type>
-								</artifactItem>
-							</artifactItems>
-							<!--includes>**/*.war</includes -->
-							<outputDirectory>${project.build.directory}/conf</outputDirectory>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.gmaven</groupId>
-				<artifactId>gmaven-plugin</artifactId>
-				<version>1.4</version>
-				<executions>
-					<execution>
-						<id>generate-timestamp</id>
-						<phase>package</phase>
-						<goals>
-							<goal>execute</goal>
-						</goals>
-						<configuration>
-							<source>
-								import java.util.Date
-								import java.text.MessageFormat
-								project.properties['buildTimestamp'] =
-								MessageFormat.format("{0,date,dd-MM-yyyy}", new
-								Date())
-							</source>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>distribution-package</id>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-						<configuration>
-							<finalName>${archieve.name}-${project.version}</finalName>
-							<descriptors>
-								<descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-								<!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
-							</descriptors>
-							<attach>false</attach>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>1.7</version>
-				<executions>
-					<execution>
-						<id>attach-artifacts</id>
-						<phase>package</phase>
-						<goals>
-							<goal>attach-artifact</goal>
-						</goals>
-						<configuration>
-							<artifacts>
-								<artifact>
-									<file>${airavata.bin.zip}</file>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifact>
-								<artifact>
-									<file>${airavata.bin.tar.gz}</file>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifact>
-							</artifacts>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.derby</groupId>
-			<artifactId>derby</artifactId>
-			<version>${derby.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.derby</groupId>
-			<artifactId>derbyclient</artifactId>
-			<version>${derby.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.derby</groupId>
-			<artifactId>derbynet</artifactId>
-			<version>${derby.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.derby</groupId>
-			<artifactId>derbytools</artifactId>
-			<version>${derby.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>jcl-over-slf4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.amazonaws</groupId>
-			<artifactId>aws-java-sdk</artifactId>
-			<version>1.9.0</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.httpcomponents</groupId>
-					<artifactId>httpclient</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>net.java.dev.jets3t</groupId>
-			<artifactId>jets3t</artifactId>
-			<version>0.8.0</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-collections</groupId>
-			<artifactId>commons-collections</artifactId>
-			<version>3.2.1</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>2.4</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-io</groupId>
-			<artifactId>commons-io</artifactId>
-			<version>2.4</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>1.6</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-standalone-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>app-catalog-cpi</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-messaging-core</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>app-catalog-data</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-common-utils</artifactId>
-			<version>${project.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.ws.commons.schema</groupId>
-					<artifactId>XmlSchema</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>xerces</groupId>
-					<artifactId>xmlParserAPIs</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.apache.neethi</groupId>
-					<artifactId>neethi</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>orchestrator-service</artifactId>
-			<version>${project.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.ws.commons.schema</groupId>
-					<artifactId>XmlSchema</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>xerces</groupId>
-					<artifactId>xmlParserAPIs</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.apache.neethi</groupId>
-					<artifactId>neethi</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>orchestrator-client</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-client</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>orchestrator-core</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-registry-cpi</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-jpa-registry</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-data-models</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-credential-store</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-impl</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-bes</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-core</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gfac-service</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-message-monitor</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-workflow-model-core</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-model-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-api-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>apache-airavata-samples</artifactId> 
-			<type>zip</type> <version>${project.version}</version> </dependency -->
-		<dependency>
-			<groupId>org.bouncycastle</groupId>
-			<artifactId>bcprov-jdk15on</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.openjpa</groupId>
-			<artifactId>openjpa-all</artifactId>
-			<version>2.2.0</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.shiro</groupId>
-			<artifactId>shiro-core</artifactId>
-			<version>1.2.1</version>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-client</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-		<!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId>
-			<version>${project.version}</version> </dependency -->
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>javax.servlet-api</artifactId>
-			<version>3.0.1</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-logging-juli</artifactId>
-			<version>7.0.22</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-jasper</artifactId>
-			<version>7.0.22</version>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-servlet</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-json</artifactId>
-			<version>${jersey.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>stax</groupId>
-					<artifactId>stax-api</artifactId>
-				</exclusion>
-			</exclusions>
-
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey.contribs</groupId>
-			<artifactId>jersey-multipart</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-server</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-		<!--dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> 
-			<version>${jersey.version}</version> </dependency -->
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-mapper-asl</artifactId>
-			<version>1.9.2</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-xc</artifactId>
-			<version>1.9.2</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-jaxrs</artifactId>
-			<version>1.9.2</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-core-asl</artifactId>
-			<version>1.9.2</version>
-		</dependency>
-		<dependency>
-			<groupId>xerces</groupId>
-			<artifactId>xercesImpl</artifactId>
-			<version>2.9.1</version>
-			<exclusions>
-				<exclusion>
-					<groupId>xml-apis</groupId>
-					<artifactId>xml-apis</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.ibm.icu</groupId>
-			<artifactId>icu4j</artifactId>
-			<version>3.4.4</version>
-		</dependency>
-		<dependency>
-			<groupId>com.google.guava</groupId>
-			<artifactId>guava</artifactId>
-			<version>12.0</version>
-		</dependency>
-
-		<!-- Hadoop provider related dependencies -->
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-core</artifactId>
-			<version>1.0.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-client</artifactId>
-			<version>1.0.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.whirr</groupId>
-			<artifactId>whirr-core</artifactId>
-			<version>0.7.1</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.bouncycastle</groupId>
-					<artifactId>bcprov-jdk16</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.jclouds.driver</groupId>
-					<artifactId>jclouds-bouncycastle</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.whirr</groupId>
-			<artifactId>whirr-hadoop</artifactId>
-			<version>0.7.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hamcrest</groupId>
-			<artifactId>hamcrest-all</artifactId>
-			<version>1.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.mockito</groupId>
-			<artifactId>mockito-all</artifactId>
-			<version>1.8.5</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-configuration</groupId>
-			<artifactId>commons-configuration</artifactId>
-			<version>1.7</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.jopt-simple</groupId>
-			<artifactId>jopt-simple</artifactId>
-			<version>3.2</version>
-		</dependency>
-		<dependency>
-			<groupId>org.ebaysf.web</groupId>
-			<artifactId>cors-filter</artifactId>
-			<version>${ebay.cors.filter}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.jcraft</groupId>
-			<artifactId>jsch</artifactId>
-			<version>0.1.50</version>
-		</dependency>
-		<!-- dependency> <groupId>org.ogce</groupId> <artifactId>bcgss</artifactId> 
-			<version>146</version> </dependency> -->
-		<dependency>
-			<groupId>org.apache.xmlbeans</groupId>
-			<artifactId>xmlbeans</artifactId>
-			<version>${xmlbeans.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>stax</groupId>
-					<artifactId>stax-api</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.thrift</groupId>
-			<artifactId>libthrift</artifactId>
-			<version>0.9.1</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-			<version>2.0.0</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-core</artifactId>
-			<version>2.0.0</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-annotations</artifactId>
-			<version>2.0.0</version>
-		</dependency>
-		<!-- zookeeper dependencies -->
-
-		<dependency>
-			<groupId>org.apache.zookeeper</groupId>
-			<artifactId>zookeeper</artifactId>
-			<version>3.4.0</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-cli</groupId>
-			<artifactId>commons-cli</artifactId>
-			<version>1.2</version>
-		</dependency>
-
-		<dependency>
-			<groupId>com.rabbitmq</groupId>
-			<artifactId>amqp-client</artifactId>
-			<version>${amqp.client.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.curator</groupId>
-			<artifactId>curator-framework</artifactId>
-			<version>${curator.version}</version>
-		</dependency>
-
-		<!-- ======================== Sample =================== -->
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-client-samples</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	</dependencies>
-
-
-	<properties>
-		<jersey.version>1.13</jersey.version>
-		<grizzly.version>2.0.0-M3</grizzly.version>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<archieve.name>apache-airavata-server</archieve.name>
-		<airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
-		<airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
-		<airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
-		<airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
-	</properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index 8b88e92..0000000
--- a/modules/distribution/server/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<!--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. -->
-
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|fileMode|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|outputFileNameMapping|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<fileSets>
-
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** copy database scripts ********************** -->
-		<fileSet>
-			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../registry/airavata-jpa-registry/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../app-catalog/app-catalog-data/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-				<include>logo.txt</include>
-				<include>startNetworkServer</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/samples</directory>
-			<outputDirectory>samples</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>**/*.sh</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>airavata-server.properties</include>
-				<include>zoo.cfg</include>
-				<include>registry.properties</include>
-				<include>log4j.properties</include>
-				<include>host.xml</include>
-				<include>persistence.xml</include>
-				<include>provenance.sql</include>
-				<include>gfac-config.xml</include>
-				<include>PBSTemplate.xslt</include>
-				<include>SLURMTemplate.xslt</include>
-				<include>LSFTemplate.xslt</include>
-				<include>UGETemplate.xslt</include>
-				<include>gsissh.properties</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
-			********************** -->
-		<fileSet>
-			<directory>src/main/resources/axis2-standalone-bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-		<fileSet>
-			<directory>src/main/resources/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>**/*</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** Copy samples ********************** -->
-		<fileSet>
-			<directory>${project.build.directory}/samples/applications
-			</directory>
-			<outputDirectory>samples</outputDirectory>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-			</includes>
-		</fileSet>
-
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<includes>
-				<include>*:*:jar</include>
-            </includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/src-assembly.xml b/modules/distribution/server/src/main/assembly/src-assembly.xml
deleted file mode 100644
index 6a093ed..0000000
--- a/modules/distribution/server/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/INSTALL b/modules/distribution/server/src/main/resources/INSTALL
deleted file mode 100644
index 53d0550..0000000
--- a/modules/distribution/server/src/main/resources/INSTALL
+++ /dev/null
@@ -1,30 +0,0 @@
-Installing  Apache Airavata 0.14
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or clone from git.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* Alternatively, all  compressed binary distributions can be found at <PROJECT DIR>/modules/distribution/release/target/release-artifacts
-
-Running Tests
--------------
-* Unit tests & integrations tests will run while Apache Airavata is built from source (without "-Dmaven.test.skip=true").
-* To run the test samples
-    - You can find the binary distributions at <PROJECT DIR>/modules/distribution/release/target/release-artifacts or from
-      the Apache Airavata download site.
-    - Extract the binary distributions and once the binary is unzipped, instructions to run the tests should be followed
-      from README files found within.
-
-Tutorials
-----------
-The airavata website has instructions for basic tutorials:
-* Describing and executing applications using Airavata - follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial
\ No newline at end of file


[33/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
new file mode 100644
index 0000000..14fd7fe
--- /dev/null
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
@@ -0,0 +1,55 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.gfac.cpi;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class gfac_cpi_serviceConstants {
+
+  public static final String GFAC_CPI_VERSION = "0.13.0";
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 853ffc8..b9c17e7 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -27,7 +27,7 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderConfig;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFac.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFac.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFac.java
new file mode 100644
index 0000000..d3e1c70
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFac.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.core;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.curator.framework.CuratorFramework;
+
+/**
+ * This is the GFac CPI interface which needs to be implemented by an internal class, this simply have a single method to submit a job to
+ * the resource, required data for the job has to be stored in registry prior to invoke this object.
+ */
+public interface GFac {
+
+    /**
+     * Initialized method, this method must call one time before use any other method.
+     * @param registry
+     * @param appCatalog
+     * @param curatorClient
+     * @param publisher
+     * @return
+     */
+    public boolean init(Registry registry, AppCatalog appCatalog, CuratorFramework curatorClient, MonitorPublisher publisher);
+
+    /**
+     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
+     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
+     *
+     * @param experimentID
+     * @return boolean Successful acceptence of the jobExecution returns a true value
+     * @throws org.apache.airavata.gfac.GFacException
+     */
+    public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;
+
+    /**
+     * This method can be used in a handler to ivvoke outhandler asynchronously
+     * @param jobExecutionContext
+     * @throws GFacException
+     */
+    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException;
+
+    /**
+     * This method can be used to handle re-run case asynchronously
+     * @param jobExecutionContext
+     * @throws GFacException
+     */
+    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException;
+
+    /**
+     * This operation can be used to cancel an already running experiment
+     * @return Successful cancellation will return true
+     * @throws GFacException
+     */
+    public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId)throws GFacException;
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacThreadPoolExecutor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacThreadPoolExecutor.java
new file mode 100644
index 0000000..9ae8c99
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacThreadPoolExecutor.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * 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.core;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.ServerSettings;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class GFacThreadPoolExecutor {
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GFacThreadPoolExecutor.class);
+    public static final String GFAC_THREAD_POOL_SIZE = "gfac.thread.pool.size";
+
+    private static ExecutorService threadPool;
+
+    public static ExecutorService getCachedThreadPool() {
+        if(threadPool ==null){
+            threadPool = Executors.newCachedThreadPool();
+        }
+        return threadPool;
+    }
+
+    public static ExecutorService client() throws ApplicationSettingsException {
+        if(threadPool ==null){
+            try {
+                threadPool = Executors.newFixedThreadPool(Integer.parseInt(ServerSettings.getSetting(GFAC_THREAD_POOL_SIZE)));
+            } catch (ApplicationSettingsException e) {
+                logger.error("Error reading " + GFAC_THREAD_POOL_SIZE+ " property");
+                throw e;
+            }
+        }
+        return threadPool;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
new file mode 100644
index 0000000..407db94
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -0,0 +1,708 @@
+/*
+ *
+ * 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.core;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.ExecutionMode;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.states.GfacExperimentState;
+import org.apache.airavata.gfac.core.states.GfacHandlerState;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.ActionableGroup;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.CompositeIdentifier;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+
+public class GFacUtils {
+	private final static Logger log = LoggerFactory.getLogger(GFacUtils.class);
+	public static final ArrayList<ACL> OPEN_ACL_UNSAFE = ZooDefs.Ids.OPEN_ACL_UNSAFE;
+
+	private GFacUtils() {
+	}
+
+	/**
+	 * Read data from inputStream and convert it to String.
+	 * 
+	 * @param in
+	 * @return String read from inputStream
+	 * @throws java.io.IOException
+	 */
+	public static String readFromStream(InputStream in) throws IOException {
+		try {
+			StringBuffer wsdlStr = new StringBuffer();
+
+			int read;
+
+			byte[] buf = new byte[1024];
+			while ((read = in.read(buf)) > 0) {
+				wsdlStr.append(new String(buf, 0, read));
+			}
+			return wsdlStr.toString();
+		} finally {
+			if (in != null) {
+				try {
+					in.close();
+				} catch (IOException e) {
+					log.warn("Cannot close InputStream: "
+							+ in.getClass().getName(), e);
+				}
+			}
+		}
+	}
+
+	/**
+	 * this can be used to do framework opertaions specific to different modes
+	 * 
+	 * @param jobExecutionContext
+	 * @return
+	 */
+	public static boolean isSynchronousMode(
+			JobExecutionContext jobExecutionContext) {
+		GFacConfiguration gFacConfiguration = jobExecutionContext
+				.getGFacConfiguration();
+		if (ExecutionMode.ASYNCHRONOUS.equals(gFacConfiguration
+				.getExecutionMode())) {
+			return false;
+		}
+		return true;
+	}
+
+	public static String readFileToString(String file)
+			throws FileNotFoundException, IOException {
+		BufferedReader instream = null;
+		try {
+
+			instream = new BufferedReader(new FileReader(file));
+			StringBuffer buff = new StringBuffer();
+			String temp = null;
+			while ((temp = instream.readLine()) != null) {
+				buff.append(temp);
+				buff.append(Constants.NEWLINE);
+			}
+			return buff.toString();
+		} finally {
+			if (instream != null) {
+				try {
+					instream.close();
+				} catch (IOException e) {
+					log.warn("Cannot close FileinputStream", e);
+				}
+			}
+		}
+	}
+
+	public static boolean isLocalHost(String appHost)
+			throws UnknownHostException {
+		String localHost = InetAddress.getLocalHost().getCanonicalHostName();
+		return (localHost.equals(appHost)
+				|| Constants.LOCALHOST.equals(appHost) || Constants._127_0_0_1
+					.equals(appHost));
+	}
+
+	public static String createUniqueNameWithDate(String name) {
+		String date = new Date().toString();
+		date = date.replaceAll(" ", "_");
+		date = date.replaceAll(":", "_");
+		return name + "_" + date;
+	}
+
+    public static List<Element> getElementList(Document doc, String expression) throws XPathExpressionException {
+        XPathFactory xPathFactory = XPathFactory.newInstance();
+        XPath xPath = xPathFactory.newXPath();
+        XPathExpression expr = xPath.compile(expression);
+        NodeList nodeList = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
+        List<Element> elementList = new ArrayList<Element>();
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node item = nodeList.item(i);
+            if (item instanceof Element) {
+                elementList.add((Element) item);
+            }
+        }
+        return elementList;
+    }
+
+	public static String createGsiftpURIAsString(String host, String localPath)
+			throws URISyntaxException {
+		StringBuffer buf = new StringBuffer();
+		if (!host.startsWith("gsiftp://"))
+			buf.append("gsiftp://");
+		buf.append(host);
+		if (!host.endsWith("/"))
+			buf.append("/");
+		buf.append(localPath);
+		return buf.toString();
+	}
+
+	public static void saveJobStatus(JobExecutionContext jobExecutionContext,
+                                     JobDetails details, JobState state) throws GFacException {
+		try {
+            // first we save job details to the registry for sa and then save the job status.
+            Registry registry = jobExecutionContext.getRegistry();
+            JobStatus status = new JobStatus();
+            status.setJobState(state);
+            details.setJobStatus(status);
+            registry.add(ChildDataType.JOB_DETAIL, details,
+                    new CompositeIdentifier(jobExecutionContext.getTaskData()
+                            .getTaskID(), details.getJobID()));
+            JobIdentifier identifier = new JobIdentifier(details.getJobID(), jobExecutionContext.getTaskData().getTaskID(),
+                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
+                    jobExecutionContext.getGatewayID());
+            JobStatusChangeRequestEvent jobStatusChangeRequestEvent = new JobStatusChangeRequestEvent(state, identifier);
+            jobExecutionContext.getMonitorPublisher().publish(jobStatusChangeRequestEvent);
+        } catch (Exception e) {
+			throw new GFacException("Error persisting job status"
+					+ e.getLocalizedMessage(), e);
+		}
+	}
+
+	public static void updateJobStatus(JobExecutionContext jobExecutionContext,
+			JobDetails details, JobState state) throws GFacException {
+		try {
+			Registry registry = jobExecutionContext.getRegistry();
+			JobStatus status = new JobStatus();
+			status.setJobState(state);
+			status.setTimeOfStateChange(Calendar.getInstance()
+					.getTimeInMillis());
+			details.setJobStatus(status);
+			registry.update(
+					org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL,
+					details, details.getJobID());
+		} catch (Exception e) {
+			throw new GFacException("Error persisting job status"
+					+ e.getLocalizedMessage(), e);
+		}
+	}
+
+	public static void saveErrorDetails(
+			JobExecutionContext jobExecutionContext, String errorMessage,
+			CorrectiveAction action, ErrorCategory errorCatogory)
+			throws GFacException {
+		try {
+			Registry registry = jobExecutionContext.getRegistry();
+			ErrorDetails details = new ErrorDetails();
+			details.setActualErrorMessage(errorMessage);
+			details.setCorrectiveAction(action);
+			details.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS);
+			details.setCreationTime(Calendar.getInstance().getTimeInMillis());
+			details.setErrorCategory(errorCatogory);
+			registry.add(ChildDataType.ERROR_DETAIL, details,
+					jobExecutionContext.getTaskData().getTaskID());
+		} catch (Exception e) {
+			throw new GFacException("Error persisting job status"
+					+ e.getLocalizedMessage(), e);
+		}
+	}
+
+    public static Map<String, Object> getInputParamMap(List<InputDataObjectType> experimentData) throws GFacException {
+        Map<String, Object> map = new HashMap<String, Object>();
+        for (InputDataObjectType objectType : experimentData) {
+            map.put(objectType.getName(), objectType);
+        }
+        return map;
+    }
+
+    public static Map<String, Object> getOuputParamMap(List<OutputDataObjectType> experimentData) throws GFacException {
+        Map<String, Object> map = new HashMap<String, Object>();
+        for (OutputDataObjectType objectType : experimentData) {
+            map.put(objectType.getName(), objectType);
+        }
+        return map;
+    }
+
+	public static GfacExperimentState getZKExperimentState(CuratorFramework curatorClient,
+			JobExecutionContext jobExecutionContext)
+			throws Exception {
+		String expState = AiravataZKUtils.getExpState(curatorClient, jobExecutionContext
+				.getExperimentID());
+        if (expState == null || expState.isEmpty()) {
+            return GfacExperimentState.UNKNOWN;
+        }
+        return GfacExperimentState.findByValue(Integer.valueOf(expState));
+    }
+
+	public static boolean createHandlerZnode(CuratorFramework curatorClient,
+                                             JobExecutionContext jobExecutionContext, String className)
+			throws Exception {
+		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
+				jobExecutionContext.getExperimentID(), className);
+		Stat exists = curatorClient.checkExists().forPath(expState);
+		if (exists == null) {
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(expState, new byte[0]);
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+		} else {
+			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+			if (exists == null) {
+				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+			}
+		}
+
+		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+		if (exists != null) {
+			curatorClient.setData().withVersion(exists.getVersion())
+					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+							String.valueOf(GfacHandlerState.INVOKING.getValue()).getBytes());
+		}
+		return true;
+	}
+
+	public static boolean createHandlerZnode(CuratorFramework curatorClient,
+                                             JobExecutionContext jobExecutionContext, String className,
+                                             GfacHandlerState state) throws Exception {
+		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
+				jobExecutionContext.getExperimentID(), className);
+		Stat exists = curatorClient.checkExists().forPath(expState);
+		if (exists == null) {
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(expState, new byte[0]);
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+		} else {
+			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+			if (exists == null) {
+				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+			}
+		}
+
+		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+		if (exists != null) {
+			curatorClient.setData().withVersion(exists.getVersion())
+					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+							String.valueOf(state.getValue()).getBytes());
+		}
+		return true;
+	}
+
+	public static boolean updateHandlerState(CuratorFramework curatorClient,
+                                             JobExecutionContext jobExecutionContext, String className,
+                                             GfacHandlerState state) throws Exception {
+		String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath(
+				jobExecutionContext.getExperimentID(), className);
+		Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+		if (exists != null) {
+			curatorClient.setData().withVersion(exists.getVersion())
+					.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, String.valueOf(state.getValue()).getBytes());
+		} else {
+			createHandlerZnode(curatorClient, jobExecutionContext, className, state);
+		}
+		return false;
+	}
+
+	public static GfacHandlerState getHandlerState(CuratorFramework curatorClient,
+                                                  JobExecutionContext jobExecutionContext, String className) {
+		try {
+			String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath( jobExecutionContext.getExperimentID(), className);
+			Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+			if (exists != null) {
+				String stateVal = new String(curatorClient.getData().storingStatIn(exists)
+						.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE));
+				return GfacHandlerState.findByValue(Integer.valueOf(stateVal));
+			}
+			return GfacHandlerState.UNKNOWN; // if the node doesn't exist or any other error we
+							// return false
+		} catch (Exception e) {
+			log.error("Error occured while getting zk node status", e);
+			return null;
+		}
+	}
+
+	// This method is dangerous because of moving the experiment data
+	public static boolean createExperimentEntryForPassive(String experimentID,
+														  String taskID, CuratorFramework curatorClient, String experimentNode,
+														  String pickedChild, String tokenId, long deliveryTag) throws Exception {
+		String experimentPath = experimentNode + File.separator + pickedChild;
+		String newExperimentPath = experimentPath + File.separator + experimentID;
+		Stat exists1 = curatorClient.checkExists().forPath(newExperimentPath);
+		String oldExperimentPath = GFacUtils.findExperimentEntry(experimentID, curatorClient);
+		if (oldExperimentPath == null) {  // this means this is a very new experiment
+			// are going to create a new node
+			log.info("This is a new Job, so creating all the experiment docs from the scratch");
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath, new byte[0]);
+            String stateNodePath = curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(newExperimentPath + File.separator + "state",
+							String .valueOf(GfacExperimentState.LAUNCHED.getValue()) .getBytes());
+
+			if(curatorClient.checkExists().forPath(stateNodePath)!=null) {
+				log.info("Created the node: " + stateNodePath + " successfully !");
+			}else {
+				log.error("Error creating node: " + stateNodePath + " successfully !");
+			}
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag));
+		} else {
+			log.error("ExperimentID: " + experimentID + " taskID: " + taskID + " was running by some Gfac instance,but it failed");
+            removeCancelDeliveryTagNode(oldExperimentPath, curatorClient); // remove previous cancel deliveryTagNode
+            if(newExperimentPath.equals(oldExperimentPath)){
+                log.info("Re-launch experiment came to the same GFac instance");
+            }else {
+				log.info("Re-launch experiment came to a new GFac instance so we are moving data to new gfac node");
+				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath,
+						curatorClient.getData().storingStatIn(exists1).forPath(oldExperimentPath)); // recursively copy children
+                copyChildren(curatorClient, oldExperimentPath, newExperimentPath, 2); // we need to copy children up to depth 2
+				String oldDeliveryTag = oldExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX;
+				Stat exists = curatorClient.checkExists().forPath(oldDeliveryTag);
+				if(exists!=null) {
+					curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+							.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX,
+									curatorClient.getData().storingStatIn(exists).forPath(oldDeliveryTag));
+					ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldDeliveryTag, true);
+				}
+				// After all the files are successfully transfered we delete the // old experiment,otherwise we do
+				// not delete a single file
+				log.info("After a successful copying of experiment data for an old experiment we delete the old data");
+				log.info("Deleting experiment data: " + oldExperimentPath);
+				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldExperimentPath, true);
+			}
+		}
+		return true;
+	}
+
+    private static void removeCancelDeliveryTagNode(String experimentPath, CuratorFramework curatorClient) throws Exception {
+        Stat exists = curatorClient.checkExists().forPath(experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
+        if (exists != null) {
+			ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, true);
+		}
+	}
+
+    private static void copyChildren(CuratorFramework curatorClient, String oldPath, String newPath, int depth) throws Exception {
+        for (String childNode : curatorClient.getChildren().forPath(oldPath)) {
+            String oldChildPath = oldPath + File.separator + childNode;
+            Stat stat = curatorClient.checkExists().forPath(oldChildPath); // no need to check exists
+            String newChildPath = newPath + File.separator + childNode;
+            log.info("Creating new znode: " + newChildPath);
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(newChildPath, curatorClient.getData().storingStatIn(stat).forPath(oldChildPath));
+			if (--depth > 0) {
+                copyChildren(curatorClient , oldChildPath, newChildPath, depth );
+            }
+        }
+    }
+
+	/**
+	 * This will return a value if the server is down because we iterate through exisiting experiment nodes, not
+	 * through gfac-server nodes
+	 *
+	 * @param experimentID
+	 * @param curatorClient
+	 * @return
+	 * @throws KeeperException
+	 * @throws InterruptedException
+	 */
+	public static String findExperimentEntry(String experimentID, CuratorFramework curatorClient) throws Exception {
+		String experimentNode = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+		List<String> children = curatorClient.getChildren().forPath(experimentNode);
+		for (String pickedChild : children) {
+			String experimentPath = experimentNode + File.separator + pickedChild;
+			String newExpNode = experimentPath + File.separator + experimentID;
+			Stat exists = curatorClient.checkExists().forPath(newExpNode);
+			if (exists == null) {
+				continue;
+			} else {
+				return newExpNode;
+			}
+		}
+		return null;
+	}
+
+    public static boolean setExperimentCancel(String experimentId, CuratorFramework curatorClient, long deliveryTag) throws Exception {
+        String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
+        if (experimentEntry == null) {
+            // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
+            log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
+                    "This happen when experiment completed and already removed from the zookeeper");
+            return false;
+        } else {
+            // check cancel operation is being processed for the same experiment.
+            Stat cancelState = curatorClient.checkExists().forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
+            if (cancelState != null) {
+                // another cancel operation is being processed. only one cancel operation can exist for a given experiment.
+                return false;
+            }
+
+			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+					.forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag)); // save cancel delivery tag to be acknowledge at the end.
+			return true;
+        }
+
+    }
+    public static boolean isCancelled(String experimentID, CuratorFramework curatorClient ) throws Exception {
+		String experimentEntry = GFacUtils.findExperimentEntry(experimentID, curatorClient);
+        if(experimentEntry == null){
+            return false;
+        }else {
+            Stat exists = curatorClient.checkExists().forPath(experimentEntry);
+            if (exists != null) {
+				String operation = new String(curatorClient.getData().storingStatIn(exists).forPath(experimentEntry + File.separator + "operation"));
+				if ("cancel".equals(operation)) {
+					return true;
+				}
+			}
+		}
+        return false;
+    }
+
+    public static void saveHandlerData(JobExecutionContext jobExecutionContext,
+                                       StringBuffer data, String className) throws GFacHandlerException {
+		try {
+			CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
+			if (curatorClient != null) {
+				String expZnodeHandlerPath = AiravataZKUtils
+						.getExpZnodeHandlerPath(
+								jobExecutionContext.getExperimentID(),
+								className);
+				Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
+                if (exists != null) {
+					curatorClient.setData().withVersion(exists.getVersion()).forPath(expZnodeHandlerPath, data.toString().getBytes());
+				} else {
+                    log.error("Saving Handler data failed, Stat is null");
+                }
+            }
+		} catch (Exception e) {
+			throw new GFacHandlerException(e);
+		}
+	}
+
+	public static String getHandlerData(JobExecutionContext jobExecutionContext, String className) throws Exception {
+		CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
+		if (curatorClient != null) {
+			String expZnodeHandlerPath = AiravataZKUtils
+					.getExpZnodeHandlerPath(
+							jobExecutionContext.getExperimentID(),
+							className);
+			Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
+			return new String(jobExecutionContext.getCuratorClient().getData().storingStatIn(exists).forPath(expZnodeHandlerPath));
+		}
+		return null;
+	}
+
+	public static CredentialReader getCredentialReader()
+			throws ApplicationSettingsException, IllegalAccessException,
+			InstantiationException {
+		try{
+		String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
+		String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
+		String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
+		String driver = ServerSettings.getCredentialStoreDBDriver();
+		return new CredentialReaderImpl(new DBUtil(jdbcUrl, jdbcUsr, jdbcPass,
+				driver));
+		}catch(ClassNotFoundException e){
+			log.error("Not able to find driver: " + e.getLocalizedMessage());
+			return null;	
+		}
+	}
+
+    public static LOCALSubmission getLocalJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getLocalJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
+    public static UnicoreJobSubmission getUnicoreJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving UNICORE job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
+    public static SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException{
+        try {
+            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getSSHJobSubmission(submissionId);
+        }catch (Exception e){
+            String errorMsg = "Error while retrieving SSH job submission with submission id : " + submissionId;
+            log.error(errorMsg, e);
+            throw new AppCatalogException(errorMsg, e);
+        }
+    }
+
+    /**
+     * To convert list to separated value
+     * @param listOfStrings
+     * @param separator
+     * @return
+     */
+    public static  String listToCsv(List<String> listOfStrings, char separator) {
+        StringBuilder sb = new StringBuilder();
+
+        // all but last
+        for(int i = 0; i < listOfStrings.size() - 1 ; i++) {
+            sb.append(listOfStrings.get(i));
+            sb.append(separator);
+        }
+
+        // last string, no separator
+        if(listOfStrings.size() > 0){
+            sb.append(listOfStrings.get(listOfStrings.size()-1));
+        }
+
+        return sb.toString();
+    }
+
+	public static byte[] longToBytes(long x) {
+		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
+		buffer.putLong(x);
+		return buffer.array();
+	}
+
+	public static long bytesToLong(byte[] bytes) {
+		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
+		buffer.put(bytes);
+		buffer.flip();//need flip
+		return buffer.getLong();
+	}
+
+    public static ExperimentState updateExperimentStatus(String experimentId, ExperimentState state) throws RegistryException {
+        Registry airavataRegistry = RegistryFactory.getDefaultRegistry();
+        Experiment details = (Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
+        if (details == null) {
+            details = new Experiment();
+            details.setExperimentID(experimentId);
+        }
+        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
+        status.setExperimentState(state);
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        if (!ExperimentState.CANCELED.equals(details.getExperimentStatus().getExperimentState()) &&
+                !ExperimentState.CANCELING.equals(details.getExperimentStatus().getExperimentState())) {
+            status.setExperimentState(state);
+        } else {
+            status.setExperimentState(details.getExperimentStatus().getExperimentState());
+        }
+        details.setExperimentStatus(status);
+        log.info("Updating the experiment status of experiment: " + experimentId + " to " + status.getExperimentState().toString());
+        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
+        return details.getExperimentStatus().getExperimentState();
+    }
+
+    public static boolean isFailedJob (JobExecutionContext jec) {
+        JobStatus jobStatus = jec.getJobDetails().getJobStatus();
+        if (jobStatus.getJobState() == JobState.FAILED) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean ackCancelRequest(String experimentId, CuratorFramework curatorClient) throws Exception {
+        String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
+        String cancelNodePath = experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX;
+        if (experimentEntry == null) {
+            // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
+            log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
+                    "This happen when experiment completed and already removed from the CuratorFramework");
+        } else {
+            // check cancel operation is being processed for the same experiment.
+            Stat cancelState = curatorClient.checkExists().forPath(cancelNodePath);
+            if (cancelState != null) {
+				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), cancelNodePath, true);
+				return true;
+			}
+		}
+        return false;
+    }
+
+    public static void publishTaskStatus (JobExecutionContext jobExecutionContext, MonitorPublisher publisher, TaskState state){
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getGatewayID());
+        publisher.publish(new TaskStatusChangeRequestEvent(state, taskIdentity));
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/AuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/AuthenticationInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/AuthenticationInfo.java
new file mode 100644
index 0000000..2a01e9d
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/AuthenticationInfo.java
@@ -0,0 +1,32 @@
+package org.apache.airavata.gfac.core.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:25 AM
+ */
+
+/**
+ * An empty interface that represents authentication data to the API.
+ */
+public interface AuthenticationInfo {
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/GSIAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/GSIAuthenticationInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/GSIAuthenticationInfo.java
new file mode 100644
index 0000000..91b3d83
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/GSIAuthenticationInfo.java
@@ -0,0 +1,43 @@
+package org.apache.airavata.gfac.core.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+import org.ietf.jgss.GSSCredential;
+
+import java.util.Properties;
+
+/**
+ * Authentication data. Could be MyProxy user name, password, could be GSSCredentials
+ * or could be SSH keys.
+ */
+public abstract class GSIAuthenticationInfo implements AuthenticationInfo {
+
+    public Properties properties = new Properties();
+
+    public abstract GSSCredential getCredentials() throws SecurityException;
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHKeyAuthentication.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHKeyAuthentication.java
new file mode 100644
index 0000000..41b8c9e
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHKeyAuthentication.java
@@ -0,0 +1,46 @@
+package org.apache.airavata.gfac.core.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 2:39 PM
+ */
+
+/**
+ * Abstracts out common methods for SSH key authentication.
+ */
+public interface SSHKeyAuthentication extends AuthenticationInfo {
+
+    /**
+     * This is needed only if private key and public keys are encrypted.
+     * If they are not encrypted we can just return null.
+     * @return User should return pass phrase if keys are encrypted. If not null.
+     */
+    String getPassPhrase();
+
+    /**
+     * Callback with the banner message. API user can get hold of banner message
+     * by implementing this method.
+     * @param message The banner message.
+     */
+    void bannerMessage(String message);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPasswordAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPasswordAuthentication.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPasswordAuthentication.java
new file mode 100644
index 0000000..e5b867b
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPasswordAuthentication.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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.core.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:22 AM
+ */
+
+/**
+ * Password authentication for vanilla SSH.
+ */
+public interface SSHPasswordAuthentication extends AuthenticationInfo {
+
+    /**
+     * Gets the password for given host name and given user name.
+     * @param userName The connecting user name name.
+     * @param hostName The connecting host.
+     * @return Password for the given user.
+     */
+    String getPassword(String userName, String hostName);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyAuthentication.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyAuthentication.java
new file mode 100644
index 0000000..8824f5b
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyAuthentication.java
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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.core.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 9:48 AM
+ */
+
+
+/**
+ * Public key authentication for vanilla SSH.
+ * The public key and private key are returned as byte arrays. Useful when we store private key/public key
+ * in a secure storage such as credential store. API user should implement this.
+ */
+public interface SSHPublicKeyAuthentication extends SSHKeyAuthentication {
+
+    /**
+     * Gets the public key as byte array.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The public key as a byte array.
+     */
+    byte[] getPrivateKey(String userName, String hostName);
+
+    /**
+     * Gets the private key as byte array.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The private key as a byte array.
+     */
+    byte[] getPublicKey(String userName, String hostName);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyFileAuthentication.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyFileAuthentication.java
new file mode 100644
index 0000000..f98e945
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/authentication/SSHPublicKeyFileAuthentication.java
@@ -0,0 +1,52 @@
+package org.apache.airavata.gfac.core.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 9:52 AM
+ */
+
+/**
+ * Public key authentication for vanilla SSH.
+ * The public key and private key stored files are returned. API user should implement this.
+ */
+public interface SSHPublicKeyFileAuthentication extends SSHKeyAuthentication {
+
+    /**
+     * The file which contains the public key.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The name of the file which contains the public key.
+     */
+    String getPublicKeyFile(String userName, String hostName);
+
+    /**
+     * The file which contains the public key.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The name of the file which contains the private key.
+     */
+    String getPrivateKeyFile(String userName, String hostName);
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 1baf792..67c80cf 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -34,8 +34,7 @@ import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacConfiguration;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.notification.GFacNotifier;
+import org.apache.airavata.gfac.core.GFac;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.workspace.experiment.Experiment;
@@ -54,7 +53,6 @@ public class JobExecutionContext extends AbstractContext implements Serializable
     private ApplicationContext applicationContext;
     private MessageContext inMessageContext;
     private MessageContext outMessageContext;
-    private GFacNotifier notifier;
     //FIXME : not needed for gfac
     private Experiment experiment;
     private TaskDetails taskData;
@@ -166,7 +164,6 @@ public class JobExecutionContext extends AbstractContext implements Serializable
 
     public JobExecutionContext(GFacConfiguration gFacConfiguration,String applicationName){
         this.gfacConfiguration = gFacConfiguration;
-        notifier = new GFacNotifier();
         setApplicationName(applicationName);
         outputFileList = new ArrayList<String>();
     }
@@ -223,10 +220,6 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         return gfacConfiguration;
     }
 
-    public GFacNotifier getNotificationService(){
-        return notifier;
-    }
-
     public GFacProvider getProvider() {
         return provider;
     }
@@ -259,10 +252,6 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         this.applicationName = applicationName;
     }
 
-    public GFacNotifier getNotifier() {
-        return notifier;
-    }
-
     public boolean isInPath() {
         return inPath;
     }


[41/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
index f9c7f33..26941cd 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
@@ -18,9 +18,11 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.commons.io.FilenameUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
index c6dea17..76012d6 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
@@ -18,10 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.SSHApiException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
deleted file mode 100644
index 9730c33..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * 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.ssh.api.job;
-
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
-
-import java.util.Map;
-
-public interface OutputParser {
-
-    /**
-     * Tihs can be used to fill a jobdescriptor based on the output
-     * @param descriptor
-     * @return
-     */
-    public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
-
-    /**
-     * This can be used to parseSingleJob the result of a job submission to get the JobID
-     * @param rawOutput
-     * @return
-     */
-    public String parseJobSubmission(String rawOutput)throws SSHApiException;
-
-
-    /**
-     * This can be used to get the job status from the output
-     * @param jobID
-     * @param rawOutput
-     */
-    public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
-
-    /**
-     * This can be used to parseSingleJob a big output and get multipleJob statuses
-     * @param statusMap list of status map will return and key will be the job ID
-     * @param rawOutput
-     */
-    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
-
-    /**
-     * filter the jobId value of given JobName from rawOutput
-     * @param jobName
-     * @param rawOutput
-     * @return
-     * @throws SSHApiException
-     */
-    public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
index 0179e01..d3f6c9c 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
@@ -18,9 +18,11 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.commons.io.FilenameUtils;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
index 2f17787..a86d7f0 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
@@ -18,10 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.SSHApiException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
index 54d8f40..48ba48e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
@@ -18,14 +18,16 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.commons.io.FilenameUtils;
 
 import java.io.File;
 
-public class SlurmJobConfiguration implements JobManagerConfiguration{
+public class SlurmJobConfiguration implements JobManagerConfiguration {
 
     private String jobDescriptionTemplateName;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
index 11fb4ce..3d2dc48 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
@@ -18,10 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.SSHApiException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
index 4fbbe30..fddf210 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
@@ -18,9 +18,11 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.commons.io.FilenameUtils;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
index a6cc3ed..3419b3a 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
@@ -18,10 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api.job;
+package org.apache.airavata.gfac.gsi.ssh.api.job;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.SSHApiException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,7 +33,7 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-public class UGEOutputParser implements OutputParser{
+public class UGEOutputParser implements OutputParser {
     private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
     public static final String JOB_ID = "jobId";
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
index 9658fba..c40059e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.config;
+package org.apache.airavata.gfac.gsi.ssh.config;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
index d60ea32..18371b1 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
@@ -18,11 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.listener.JobSubmissionListener;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.gsi.ssh.listener.JobSubmissionListener;
 
 public class DefaultJobSubmissionListener extends JobSubmissionListener {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
index 814a7e1..f89cb98 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -18,56 +18,56 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URL;
-import java.security.SecureRandom;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.CommandExecutor;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.GSISSHIdentityFile;
+import com.jcraft.jsch.GSISSHIdentityRepository;
+import com.jcraft.jsch.Identity;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.SSHApiException;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
 import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
 import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;
 import org.apache.airavata.gfac.core.authentication.SSHPasswordAuthentication;
 import org.apache.airavata.gfac.core.authentication.SSHPublicKeyAuthentication;
 import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gfac.ssh.api.job.OutputParser;
-import org.apache.airavata.gfac.ssh.config.ConfigReader;
-import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
-import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
-import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
-import org.apache.airavata.gfac.ssh.util.SSHUtils;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.gsi.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.gsi.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.gsi.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.gsi.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.gsi.ssh.util.SSHKeyPasswordHandler;
+import org.apache.airavata.gfac.gsi.ssh.util.SSHUtils;
 import org.apache.commons.io.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.jcraft.jsch.ExtendedSession;
-import com.jcraft.jsch.GSISSHIdentityFile;
-import com.jcraft.jsch.GSISSHIdentityRepository;
-import com.jcraft.jsch.Identity;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URL;
+import java.security.SecureRandom;
+import java.util.List;
+import java.util.Map;
 
 public class GSISSHAbstractCluster implements Cluster {
 
@@ -278,6 +278,8 @@ public class GSISSHAbstractCluster implements Cluster {
         return  outputParser.parseJobSubmission(outputifAvailable);
     }
 
+
+    @Override
     public synchronized String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException {
         TransformerFactory factory = TransformerFactory.newInstance();
         URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
deleted file mode 100644
index 648d955..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
+++ /dev/null
@@ -1,110 +0,0 @@
- /*
- *
- * 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.ssh.impl;
-
- /**
-  * This will contains all the PBS specific job statuses.
-  * C -  Job is completed after having run/
-  * E -  Job is exiting after having run.
-  * H -  Job is held.
-  * Q -  job is queued, eligible to run or routed.
-  * R -  job is running.
-  * T -  job is being moved to new location.
-  * W -  job is waiting for its execution time
-  * (-a option) to be reached.
-  * S -  (Unicos only) job is suspend.
-  */
- public enum JobStatus {
-     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
-
-     public static JobStatus fromString(String status){
-        if(status != null){
-            if("C".equals(status)){
-                return JobStatus.C;
-            }else if("E".equals(status)){
-                return JobStatus.E;
-            }else if("H".equals(status)){
-                return JobStatus.H;
-            }else if("Q".equals(status)){
-                return JobStatus.Q;
-            }else if("R".equals(status)){
-                return JobStatus.R;
-            }else if("T".equals(status)){
-                return JobStatus.T;
-            }else if("W".equals(status)){
-                return JobStatus.W;
-            }else if("S".equals(status)){
-                return JobStatus.S;
-            }else if("F".equals(status)){
-                return JobStatus.F;
-            }else if("S".equals(status)){
-                return JobStatus.S;
-            }else if("CA".equals(status)){
-                return JobStatus.CA;
-            }else if("CF".equals(status)){
-                return JobStatus.CF;
-            }else if("CD".equals(status)){
-                return JobStatus.CD;
-            }else if("CG".equals(status)){
-                return JobStatus.CG;
-            }else if("NF".equals(status)){
-                return JobStatus.NF;
-            }else if("PD".equals(status)){
-                return JobStatus.PD;
-            }else if("PR".equals(status)){
-                return JobStatus.PR;
-            }else if("TO".equals(status)){
-                return JobStatus.TO;
-            }else if("U".equals(status)){
-                return JobStatus.U;
-            }else if("qw".equals(status)){
-                return JobStatus.qw;
-            }else if("t".equals(status)){
-                return JobStatus.t;
-            }else if("r".equals(status)){
-                return JobStatus.r;
-            }else if("h".equals(status)){
-                return JobStatus.h;
-            }else if("Er".equals(status)){
-                return JobStatus.Er;
-            }else if("Eqw".equals(status)){
-                return JobStatus.Er;
-            }else if("RUN".equals(status)){      // LSF starts here
-                return JobStatus.RUN;
-            }else if("PEND".equals(status)){
-                return JobStatus.PEND;
-            }else if("DONE".equals(status)){
-                return JobStatus.DONE;
-            }else if("PSUSP".equals(status)){
-                return JobStatus.PSUSP;
-            }else if("USUSP".equals(status)){
-                return JobStatus.USUSP;
-            }else if("SSUSP".equals(status)){
-                return JobStatus.SSUSP;
-            }else if("EXIT".equals(status)){
-                return JobStatus.EXIT;
-            }else if("ZOMBI".equals(status)){
-                return JobStatus.ZOMBI;
-            }
-        }
-         return JobStatus.U;
-     }
- }

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
index def84d5..1d514f8 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
@@ -18,11 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
-import org.apache.airavata.gfac.ssh.api.*;
-import org.apache.airavata.gfac.ssh.api.authentication.*;
-import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
deleted file mode 100644
index 9ac2ba0..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * 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.ssh.impl;
-
-import org.apache.airavata.gfac.ssh.api.CommandInfo;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 8/14/13
- * Time: 5:18 PM
- */
-
-/**
- * The raw command information. String returned by getCommand is directly executed in SSH
- * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
- */
-public class RawCommandInfo implements CommandInfo {
-
-    private String rawCommand;
-
-    public RawCommandInfo(String cmd) {
-        this.rawCommand = cmd;
-    }
-
-    public String getCommand() {
-        return this.rawCommand;
-    }
-
-    public String getRawCommand() {
-        return rawCommand;
-    }
-
-    public void setRawCommand(String rawCommand) {
-        this.rawCommand = rawCommand;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
index e878dff..ee630cf 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
 import com.jcraft.jsch.UserInfo;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
index 265a57d..6a2d11a 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
@@ -18,11 +18,11 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
 import com.jcraft.jsch.Channel;
 
-import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
index 24d218b..e2bfd84 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
@@ -19,10 +19,10 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl;
+package org.apache.airavata.gfac.gsi.ssh.impl;
 
 import com.jcraft.jsch.Channel;
-import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
index 29cd154..e56cae3 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl.authentication;
+package org.apache.airavata.gfac.gsi.ssh.impl.authentication;
 
 /**
  * User: AmilaJ (amilaj@apache.org)

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
index 35595ed..529cccc 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl.authentication;
+package org.apache.airavata.gfac.gsi.ssh.impl.authentication;
 
 import org.apache.airavata.gfac.core.authentication.SSHPublicKeyAuthentication;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
index 480213c..67c56cd 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl.authentication;
+package org.apache.airavata.gfac.gsi.ssh.impl.authentication;
 
 import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
index 23fb06b..a2e2f42 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.impl.authentication;
+package org.apache.airavata.gfac.gsi.ssh.impl.authentication;
 
 import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
 import org.globus.myproxy.MyProxy;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
index de99b24..617d7cd 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.jsch;
+package org.apache.airavata.gfac.gsi.ssh.jsch;
 
 import com.jcraft.jsch.ExtendedSession;
 import com.jcraft.jsch.JSch;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
index 21aa1e3..dd492ad 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
@@ -18,11 +18,11 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.listener;
+package org.apache.airavata.gfac.gsi.ssh.listener;
 
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
 
 /**
  * This interface can be implemented by the end user of the API

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
index 6ff4fa6..216459e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
@@ -18,10 +18,12 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.util;
+package org.apache.airavata.gfac.gsi.ssh.util;
 
-import org.apache.airavata.gfac.ssh.api.job.*;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.gsi.ssh.api.job.*;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
 
 public class CommonUtils {
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
index bd700e9..3f60a59 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.util;
+package org.apache.airavata.gfac.gsi.ssh.util;
 
 import com.jcraft.jsch.UIKeyboardInteractive;
 import com.jcraft.jsch.UserInfo;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
index 1def97c..ad9a5d5 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh.util;
+package org.apache.airavata.gfac.gsi.ssh.util;
 
 import com.jcraft.jsch.UserInfo;
 import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
index b278767..3271744 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
@@ -18,18 +18,22 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.util;
+package org.apache.airavata.gfac.gsi.ssh.util;
 
 import com.jcraft.jsch.*;
-
 import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
-import org.apache.airavata.gfac.ssh.config.ConfigReader;
-import org.apache.airavata.gfac.ssh.impl.StandardOutReader;
-import org.slf4j.*;
-
-import java.io.*;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.gsi.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.gsi.ssh.impl.StandardOutReader;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.Arrays;
 import java.util.List;
 
@@ -87,8 +91,7 @@ public class SSHUtils {
      * @param lFile local file path to use in scp
      * @throws IOException
      * @throws JSchException
-     * @throws org.apache.airavata.gfac.ssh.api.SSHApiException
-     *
+     * @throws SSHApiException
      */
     public void scpTo(String rFile, String lFile) throws IOException, JSchException, SSHApiException {
         FileInputStream fis = null;
@@ -161,9 +164,9 @@ public class SSHUtils {
             out.write(command.getBytes());
             out.flush();
             if (checkAck(in) != 0) {
-                 String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
+                String error = "Error Reading input Stream";
+                log.error(error);
+                throw new SSHApiException(error);
             }
         }
 
@@ -199,7 +202,7 @@ public class SSHUtils {
         out.write(buf, 0, 1);
         out.flush();
         if (checkAck(in) != 0) {
-             String error = "Error Reading input Stream";
+            String error = "Error Reading input Stream";
             log.error(error);
             throw new SSHApiException(error);
         }
@@ -250,7 +253,7 @@ public class SSHUtils {
         channel.connect();
 
         if (checkAck(in) != 0) {
-             String error = "Error Reading input Stream";
+            String error = "Error Reading input Stream";
             log.error(error);
             throw new SSHApiException(error);
         }
@@ -265,9 +268,9 @@ public class SSHUtils {
             out.write(command.getBytes());
             out.flush();
             if (checkAck(in) != 0) {
-                 String error = "Error Reading input Stream";
-            log.error(error);
-            throw new SSHApiException(error);
+                String error = "Error Reading input Stream";
+                log.error(error);
+                throw new SSHApiException(error);
             }
         }
 
@@ -421,8 +424,8 @@ public class SSHUtils {
             }
             stdOutReader.onOutput(channel);
             if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
+                throw new SSHApiException(stdOutReader.getStdErrorString());
+            }
 
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -593,7 +596,7 @@ public class SSHUtils {
         FileOutputStream fos = null;
         try {
             String prefix = null;
-         
+
             // exec 'scp -f remotefile' remotely
             String command = "scp -3 " + remoteFileSource + " " + remoteFileTarget;
             Channel channel = session.openChannel("exec");
@@ -634,14 +637,14 @@ public class SSHUtils {
                 }
                 int foo;
                 while (true) {
-                	   if (buf.length < filesize) foo = buf.length;
-                       else foo = (int) filesize;
-                    
+                    if (buf.length < filesize) foo = buf.length;
+                    else foo = (int) filesize;
+
                     int len = in.read(buf, 0, foo);
                     if (len <= 0) break;
-                    out.write(buf, 0, len); 
+                    out.write(buf, 0, len);
                 }
-             // send '\0'
+                // send '\0'
                 buf[0] = 0;
                 out.write(buf, 0, 1);
                 out.flush();
@@ -656,8 +659,8 @@ public class SSHUtils {
 
             stdOutReader.onOutput(channel);
             if (stdOutReader.getStdErrorString().contains("scp:")) {
-            throw new SSHApiException(stdOutReader.getStdErrorString());
-        }
+                throw new SSHApiException(stdOutReader.getStdErrorString());
+            }
 
         } catch (Exception e) {
             log.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
index 2d82278..8151647 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
@@ -27,7 +27,7 @@ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
index 3031bac..72f738f 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
@@ -29,7 +29,7 @@ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
index b052a28..4ad4ae5 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
@@ -31,7 +31,7 @@ import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.impl.OutputUtils;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
index 864e487..03ebb94 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
@@ -12,7 +12,7 @@ import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
 import org.apache.airavata.gfac.ssh.util.HandleOutputs;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 9f369b1..1578b9d 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -26,7 +26,6 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
 import org.apache.airavata.gfac.core.GFacUtils;
@@ -34,9 +33,9 @@ import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
 import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
 import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.JobDescriptor;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
@@ -80,7 +79,6 @@ public class GSISSHProvider extends AbstractProvider {
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
         log.info("Invoking GSISSH Provider Invoke ...");
         StringBuffer data = new StringBuffer();
-        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
                 .getComputeResourceDescription();
         ApplicationDeploymentDescription appDeployDesc = jobExecutionContext.getApplicationContext()

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
index 85e9e29..2f3956c 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
@@ -23,14 +23,7 @@ package org.apache.airavata.gfac.gsissh.security;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.gfac.AbstractSecurityContext;
 import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.globus.gsi.X509Credential;
-import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
-import org.globus.gsi.provider.GlobusProvider;
-import org.globus.myproxy.GetParams;
-import org.globus.myproxy.MyProxy;
-import org.globus.myproxy.MyProxyException;
-import org.gridforum.jgss.ExtendedGSSCredential;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index c3978b1..3a9e83e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -30,15 +30,15 @@ import org.apache.airavata.gfac.RequestData;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.gsissh.security.TokenizedMyProxyAuthInfo;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gfac.ssh.impl.GSISSHAbstractCluster;
-import org.apache.airavata.gfac.ssh.impl.PBSCluster;
-import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.gsi.ssh.impl.GSISSHAbstractCluster;
+import org.apache.airavata.gfac.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
index 5519ee0..f00e62a 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
@@ -32,7 +32,6 @@ import java.util.TreeSet;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
 import org.apache.airavata.gfac.core.GFacUtils;
@@ -128,7 +127,6 @@ public class LocalProvider extends AbstractProvider {
     }
 
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
-        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         JobDetails jobDetails = new JobDetails();
         try {
         	jobId = jobExecutionContext.getTaskData().getTaskID();

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
index 8eba250..a1a5bd2 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
@@ -21,13 +21,13 @@ package org.apache.airavata.gfac.monitor;/*
 
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.SecurityContext;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
-import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
index e31458d..58c0946 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -24,16 +24,16 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gfac.monitor.HPCMonitorID;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
 import org.apache.airavata.gfac.monitor.util.CommonUtils;
-import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
index 6db7da5..d6da22a 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
@@ -27,14 +27,14 @@ import java.util.concurrent.LinkedBlockingQueue;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gfac.monitor.HPCMonitorID;
 import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 553ded9..54dd8e3 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -25,18 +25,18 @@ import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.impl.OutHandlerWorker;
 import org.apache.airavata.gfac.monitor.util.CommonUtils;
 import org.apache.airavata.gfac.core.GFac;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
-import org.apache.airavata.gfac.core.utils.OutHandlerWorker;
 import org.apache.airavata.gfac.monitor.HostMonitorData;
 import org.apache.airavata.gfac.monitor.UserMonitorData;
 import org.apache.airavata.gfac.monitor.core.PullMonitor;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.messaging.event.JobIdentifier;
 import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
index 41e9bd2..a159fdf 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
@@ -22,14 +22,14 @@ package org.apache.airavata.gfac.monitor.impl.pull.qstat;
 
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.SecurityContext;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gfac.monitor.HostMonitorData;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
-import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/ComputingActivity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/ComputingActivity.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/ComputingActivity.java
new file mode 100644
index 0000000..5a36b4a
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/ComputingActivity.java
@@ -0,0 +1,19 @@
+package org.apache.airavata.gfac.monitor.impl.push.amqp;
+
+import java.util.List;
+
+/**
+ * Created by syodage on 6/3/15.
+ */
+public class ComputingActivity {
+    String idFromEndpoint;
+    private List<String> state;
+
+    public String getIDFromEndpoint() {
+        return idFromEndpoint;
+    }
+
+    public List<String> getState() {
+        return state;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
index 72c77d5..15cdf4f 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
@@ -21,7 +21,6 @@
 package org.apache.airavata.gfac.monitor.impl.push.amqp;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.airavata.ComputingActivity;
 import org.apache.airavata.gfac.monitor.core.MessageParser;
 import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
 import org.apache.airavata.model.workspace.experiment.JobState;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
index 74642dc..59c5cf0 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
@@ -20,8 +20,8 @@
 */
 package org.apache.airavata.gfac.ssh.context;
 
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
 
 public class SSHAuthWrapper {
     private ServerInfo serverInfo;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
index 9481188..db9522e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -21,18 +21,18 @@
 package org.apache.airavata.gfac.ssh.handler;
 
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index 320f236..ad7df41 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -22,17 +22,17 @@ package org.apache.airavata.gfac.ssh.handler;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
index 61a1805..0df9eab 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
@@ -14,7 +15,6 @@ import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
 import org.apache.airavata.gfac.ssh.util.HandleOutputs;
-import org.apache.airavata.gfac.ssh.api.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
index fb86dd3..c96e5d9 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
@@ -21,13 +21,13 @@
 package org.apache.airavata.gfac.ssh.handler;
 
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
index 277ff0e..1c83e88 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
@@ -22,6 +22,7 @@ package org.apache.airavata.gfac.ssh.handler;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
@@ -29,7 +30,6 @@ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
index 7c5538a..17a48e7 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
@@ -23,6 +23,7 @@ package org.apache.airavata.gfac.ssh.handler;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
@@ -31,7 +32,6 @@ import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.gfac.impl.OutputUtils;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 5162e36..44f24fa 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -27,27 +27,26 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.JobStatus;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsi.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.gsi.ssh.impl.StandardOutReader;
 import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
 import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.CommandExecutor;
-import org.apache.airavata.gfac.ssh.api.SSHApiException;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
-import org.apache.airavata.gfac.ssh.impl.StandardOutReader;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
@@ -140,7 +139,6 @@ public class SSHProvider extends AbstractProvider {
         } else {
             try {
                 StringBuffer data = new StringBuffer();
-                jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
                 JobDetails jobDetails = new JobDetails();
                 String hostAddress = jobExecutionContext.getHostName();
                 MonitorPublisher monitorPublisher = jobExecutionContext.getMonitorPublisher();

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
index c6cac79..4b41d9c 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
@@ -27,7 +27,7 @@ import net.schmizz.sshj.connection.channel.direct.Session;
 import net.schmizz.sshj.userauth.keyprovider.KeyProvider;
 
 import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index f2afedc..307d8c3 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -28,21 +28,22 @@ import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.JobManagerConfiguration;
+import org.apache.airavata.gfac.core.cluster.Cluster;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsi.ssh.impl.GSISSHAbstractCluster;
+import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
-import org.apache.airavata.gfac.ssh.api.Cluster;
-import org.apache.airavata.gfac.ssh.api.ServerInfo;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gfac.ssh.impl.GSISSHAbstractCluster;
-import org.apache.airavata.gfac.ssh.impl.PBSCluster;
-import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;


[19/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
new file mode 100644
index 0000000..5162e36
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -0,0 +1,467 @@
+/*
+ *
+ * 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.ssh.provider.impl;
+
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
+import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
+import org.apache.airavata.gfac.core.provider.AbstractProvider;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.states.GfacExperimentState;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
+import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.ssh.impl.StandardOutReader;
+import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.xmlbeans.XmlException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Execute application using remote SSH
+ */
+public class SSHProvider extends AbstractProvider {
+    private static final Logger log = LoggerFactory.getLogger(SSHProvider.class);
+    private Cluster cluster;
+    private String jobID = null;
+    private String taskID = null;
+    // we keep gsisshprovider to support qsub submission incase of hpc scenario with ssh
+    private boolean hpcType = false;
+
+    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        try {
+            super.initialize(jobExecutionContext);
+            String hostAddress = jobExecutionContext.getHostName();
+            ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
+            ResourceJobManagerType resourceJobManagerType = resourceJobManager.getResourceJobManagerType();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACSSHUtils.addSecurityContext(jobExecutionContext);
+            }
+            taskID = jobExecutionContext.getTaskData().getTaskID();
+
+            JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+            if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH && resourceJobManagerType == ResourceJobManagerType.FORK) {
+                jobID = "SSH_" + jobExecutionContext.getHostName() + "_" + Calendar.getInstance().getTimeInMillis();
+                cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+
+                String remoteFile = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
+                details.setJobID(taskID);
+                details.setJobDescription(remoteFile);
+                jobExecutionContext.setJobDetails(details);
+                // FIXME : Why cluster is passed as null
+                JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
+                details.setJobDescription(jobDescriptor.toXML());
+
+                GFacUtils.saveJobStatus(jobExecutionContext, details, JobState.SETUP);
+                log.info(remoteFile);
+                File runscript = createShellScript(jobExecutionContext);
+                cluster.scpTo(remoteFile, runscript.getAbsolutePath());
+            } else {
+                hpcType = true;
+            }
+        } catch (ApplicationSettingsException e) {
+            log.error(e.getMessage());
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        } catch (Exception e) {
+            throw new GFacProviderException(e.getLocalizedMessage(), e);
+        }
+    }
+
+
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
+        if (!hpcType) {
+            try {
+                /*
+                 * Execute
+                 */
+                String executable = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
+                details.setJobDescription(executable);
+                RawCommandInfo rawCommandInfo = new RawCommandInfo("/bin/chmod 755 " + executable + "; " + executable);
+                StandardOutReader jobIDReaderCommandOutput = new StandardOutReader();
+                log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+                CommandExecutor.executeCommand(rawCommandInfo, cluster.getSession(), jobIDReaderCommandOutput);
+                String stdOutputString = getOutputifAvailable(jobIDReaderCommandOutput, "Error submitting job to resource");
+                log.info("stdout=" + stdOutputString);
+            } catch (Exception e) {
+                throw new GFacProviderException(e.getMessage(), e);
+            }
+        } else {
+            try {
+                StringBuffer data = new StringBuffer();
+                jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
+                JobDetails jobDetails = new JobDetails();
+                String hostAddress = jobExecutionContext.getHostName();
+                MonitorPublisher monitorPublisher = jobExecutionContext.getMonitorPublisher();
+                try {
+                    Cluster cluster = null;
+                    if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                        GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                    }
+                    cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+                    if (cluster == null) {
+                        throw new GFacProviderException("Security context is not set properly");
+                    } else {
+                        log.info("Successfully retrieved the Security Context");
+                    }
+                    // This installed path is a mandetory field, because this could change based on the computing resource
+                    JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
+                    jobDetails.setJobName(jobDescriptor.getJobName());
+                    log.info(jobDescriptor.toXML());
+                    jobDetails.setJobDescription(jobDescriptor.toXML());
+                    String jobID = cluster.submitBatchJob(jobDescriptor);
+                    if (jobID != null && !jobID.isEmpty()) {
+                        jobDetails.setJobID(jobID);
+                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
+                                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                                        , GfacExperimentState.JOBSUBMITTED));
+                        jobExecutionContext.setJobDetails(jobDetails);
+                        if (verifyJobSubmissionByJobId(cluster, jobID)) {
+                            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                                    , GfacExperimentState.JOBSUBMITTED));
+                            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
+                        }
+                    } else {
+                        jobExecutionContext.setJobDetails(jobDetails);
+                        String verifyJobId = verifyJobSubmission(cluster, jobDetails);
+                        if (verifyJobId != null && !verifyJobId.isEmpty()) {
+                            // JobStatus either changed from SUBMITTED to QUEUED or directly to QUEUED
+                            jobID = verifyJobId;
+                            jobDetails.setJobID(jobID);
+                            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                                    , GfacExperimentState.JOBSUBMITTED));
+                            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
+                        }
+                    }
+
+                    if (jobID == null || jobID.isEmpty()) {
+                        log.error("Couldn't find remote jobId for JobName:" + jobDetails.getJobName() + ", ExperimentId:" + jobExecutionContext.getExperimentID());
+                        GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
+                        return;
+                    }
+                    data.append("jobDesc=").append(jobDescriptor.toXML());
+                    data.append(",jobId=").append(jobDetails.getJobID());
+                    monitor(jobExecutionContext);
+                } catch (SSHApiException e) {
+                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+                    log.error(error);
+                    jobDetails.setJobID("none");
+                    GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+                    GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                    throw new GFacProviderException(error, e);
+                } catch (Exception e) {
+                    String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+                    log.error(error);
+                    jobDetails.setJobID("none");
+                    GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+                    GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                    throw new GFacProviderException(error, e);
+                } finally {
+                    log.info("Saving data for future recovery: ");
+                    log.info(data.toString());
+                    GFacUtils.saveHandlerData(jobExecutionContext, data, this.getClass().getName());
+                }
+            } catch (GFacException e) {
+                throw new GFacProviderException(e.getMessage(), e);
+            }
+        }
+    }
+
+    private boolean verifyJobSubmissionByJobId(Cluster cluster, String jobID) throws SSHApiException {
+        JobStatus status = cluster.getJobStatus(jobID);
+        return status != null &&  status != JobStatus.U;
+    }
+
+    private String verifyJobSubmission(Cluster cluster, JobDetails jobDetails) {
+        String jobName = jobDetails.getJobName();
+        String jobId = null;
+        try {
+          jobId  = cluster.getJobIdByJobName(jobName, cluster.getServerInfo().getUserName());
+        } catch (SSHApiException e) {
+            log.error("Error while verifying JobId from JobName");
+        }
+        return jobId;
+    }
+
+    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
+
+    }
+
+    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        JobDetails jobDetails = jobExecutionContext.getJobDetails();
+        StringBuffer data = new StringBuffer();
+        String hostAddress = jobExecutionContext.getHostName();
+        if (!hpcType) {
+            throw new NotImplementedException();
+        } else {
+            Cluster cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                throw new GFacProviderException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+            // This installed path is a mandetory field, because this could change based on the computing resource
+            if (jobDetails == null) {
+                log.error("There is not JobDetails, Cancel request can't be performed !!!");
+                return false;
+            }
+            try {
+                if (jobDetails.getJobID() != null) {
+                    if (cluster.cancelJob(jobDetails.getJobID()) != null) {
+                        // if this operation success without any exceptions, we can assume cancel operation succeeded.
+                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
+                        return true;
+                    } else {
+                        log.info("Job Cancel operation failed");
+                    }
+                } else {
+                    log.error("No Job Id is set, so cannot perform the cancel operation !!!");
+                    throw new GFacProviderException("Cancel request failed to cancel job as JobId is null in Job Execution Context");
+                }
+            } catch (SSHApiException e) {
+                String error = "Cancel request failed " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+                log.error(error);
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+//                throw new GFacProviderException(error, e);
+            } catch (Exception e) {
+                String error = "Cancel request failed " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+                log.error(error);
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+//                throw new GFacProviderException(error, e);
+            }
+            return false;
+        }
+    }
+
+    private File createShellScript(JobExecutionContext context) throws IOException {
+        String uniqueDir = jobExecutionContext.getApplicationName() + System.currentTimeMillis()
+                + new Random().nextLong();
+
+        File shellScript = File.createTempFile(uniqueDir, "sh");
+        OutputStream out = new FileOutputStream(shellScript);
+
+        out.write("#!/bin/bash\n".getBytes());
+        out.write(("cd " + jobExecutionContext.getWorkingDir() + "\n").getBytes());
+        out.write(("export " + Constants.INPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getInputDir() + "\n").getBytes());
+        out.write(("export " + Constants.OUTPUT_DATA_DIR_VAR_NAME + "=" + jobExecutionContext.getOutputDir() + "\n")
+                .getBytes());
+        // get the env of the host and the application
+        List<SetEnvPaths> envPathList = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getSetEnvironment();
+        for (SetEnvPaths setEnvPaths : envPathList) {
+            log.debug("Env[" + setEnvPaths.getName() + "] = " + setEnvPaths.getValue());
+            out.write(("export " + setEnvPaths.getName() + "=" + setEnvPaths.getValue() + "\n").getBytes());
+        }
+
+        // prepare the command
+        final String SPACE = " ";
+        StringBuffer cmd = new StringBuffer();
+        cmd.append(jobExecutionContext.getExecutablePath());
+        cmd.append(SPACE);
+
+        MessageContext input = context.getInMessageContext();
+        Map<String, Object> inputs = input.getParameters();
+        Set<String> keys = inputs.keySet();
+        for (String paramName : keys) {
+            InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
+            //if ("URIArray".equals(actualParameter.getType().getType().toString())) {
+            if (inputParamType.getType() == DataType.URI) {
+                String value = inputParamType.getValue();
+                cmd.append(value);
+                cmd.append(SPACE);
+            } else {
+                String paramValue = inputParamType.getValue();
+                cmd.append(paramValue);
+                cmd.append(SPACE);
+            }
+        }
+        // We redirect the error and stdout to remote files, they will be read
+        // in later
+        cmd.append(SPACE);
+        cmd.append("1>");
+        cmd.append(SPACE);
+        cmd.append(jobExecutionContext.getStandardOutput());
+        cmd.append(SPACE);
+        cmd.append("2>");
+        cmd.append(SPACE);
+        cmd.append(jobExecutionContext.getStandardError());
+
+        String cmdStr = cmd.toString();
+        log.info("Command = " + cmdStr);
+        out.write((cmdStr + "\n").getBytes());
+        String message = "\"execuationSuceeded\"";
+        out.write(("echo " + message + "\n").getBytes());
+        out.close();
+
+        return shellScript;
+    }
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
+
+    /**
+     * This method will read standard output and if there's any it will be parsed
+     *
+     * @param jobIDReaderCommandOutput
+     * @param errorMsg
+     * @return
+     * @throws SSHApiException
+     */
+    private String getOutputifAvailable(StandardOutReader jobIDReaderCommandOutput, String errorMsg) throws SSHApiException {
+        String stdOutputString = jobIDReaderCommandOutput.getStdOutputString();
+        String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
+
+        if (stdOutputString == null || stdOutputString.isEmpty() || (stdErrorString != null && !stdErrorString.isEmpty())) {
+            log.error("Standard Error output : " + stdErrorString);
+            throw new SSHApiException(errorMsg + stdErrorString);
+        }
+        return stdOutputString;
+    }
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        // have to implement the logic to recover a gfac failure
+        initialize(jobExecutionContext);
+        if(hpcType) {
+            log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
+            String hostName = jobExecutionContext.getHostName();
+            String jobId = "";
+            String jobDesc = "";
+            String jobName = "";
+            try {
+                String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
+                String[] split = pluginData.split(",");
+                if (split.length < 2) {
+                    this.execute(jobExecutionContext);
+                    return;
+                }
+                jobDesc = split[0].substring(8);
+                jobId = split[1].substring(6);
+                try {
+                    JobDescriptor jobDescriptor = JobDescriptor.fromXML(jobDesc);
+                    jobName = jobDescriptor.getJobName();
+                } catch (XmlException e) {
+                    log.error(e.getMessage(), e);
+                    log.error("Cannot parse plugin data stored, but trying to recover");
+
+                }
+                log.info("Following data have recovered: ");
+                log.info("Job Description: " + jobDesc);
+                log.info("Job Id: " + jobId);
+                if (jobName.isEmpty() || jobId.isEmpty() || "none".equals(jobId) ||
+                        "".equals(jobId)) {
+                    log.info("Cannot recover data so submitting the job again !!!");
+                    this.execute(jobExecutionContext);
+                    return;
+                }
+            } catch (Exception e) {
+                log.error("Error while  recovering provider", e);
+            }
+            try {
+                // Now we are we have enough data to recover
+                JobDetails jobDetails = new JobDetails();
+                jobDetails.setJobDescription(jobDesc);
+                jobDetails.setJobID(jobId);
+                jobDetails.setJobName(jobName);
+                jobExecutionContext.setJobDetails(jobDetails);
+                if (jobExecutionContext.getSecurityContext(hostName) == null) {
+                    try {
+                        GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                    } catch (ApplicationSettingsException e) {
+                        log.error(e.getMessage());
+                        throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                    }
+                }
+                monitor(jobExecutionContext);
+            } catch (Exception e) {
+                log.error("Error while recover the job", e);
+                throw new GFacProviderException("Error delegating already ran job to Monitoring", e);
+            }
+        }else{
+            log.info("We do not handle non hpc recovery so we simply run the Job directly");
+            this.execute(jobExecutionContext);
+        }
+    }
+
+    @Override
+    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+            String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
+            SSHJobSubmission sshJobSubmission = null;
+            try {
+                sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
+            } catch (AppCatalogException e) {
+                throw new GFacException("Error while reading compute resource", e);
+            }
+            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR) {
+                try {
+                    EmailBasedMonitor emailBasedMonitor = EmailMonitorFactory.getEmailBasedMonitor(
+                            sshJobSubmission.getResourceJobManager().getResourceJobManagerType());
+                    emailBasedMonitor.addToJobMonitorMap(jobExecutionContext);
+                } catch (AiravataException e) {
+                    throw new GFacHandlerException("Error while activating email job monitoring ", e);
+                }
+                return;
+            }
+        } else {
+            throw new IllegalArgumentException("Monitoring is implemented only for SSH, "
+                    + jobExecutionContext.getPreferredJobSubmissionProtocol().name() + " is not yet implemented");
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
new file mode 100644
index 0000000..c6cac79
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/SSHSecurityContext.java
@@ -0,0 +1,118 @@
+/*
+ *
+ * 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.ssh.security;
+
+import java.io.IOException;
+
+import net.schmizz.sshj.SSHClient;
+import net.schmizz.sshj.connection.channel.direct.Session;
+import net.schmizz.sshj.userauth.keyprovider.KeyProvider;
+
+import org.apache.airavata.gfac.SecurityContext;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Handle SSH security
+ */
+public class SSHSecurityContext implements SecurityContext {
+	private static final Logger log = LoggerFactory.getLogger(SSHSecurityContext.class);
+
+	private String username;
+	private String privateKeyLoc;
+	private String keyPass;
+	private SSHClient sshClient;
+	private Session session;
+
+    private Cluster pbsCluster;
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getPrivateKeyLoc() {
+		return privateKeyLoc;
+	}
+
+	public void setPrivateKeyLoc(String privateKeyLoc) {
+		this.privateKeyLoc = privateKeyLoc;
+	}
+
+	public String getKeyPass() {
+		return keyPass;
+	}
+
+	public void setKeyPass(String keyPass) {
+		this.keyPass = keyPass;
+	}
+
+	public void closeSession(Session session) {
+		if (session != null) {
+			try {
+				session.close();
+			} catch (Exception e) {
+				log.warn("Cannot Close SSH Session");
+			}
+		}
+	}
+
+	public Session getSession(String hostAddress) throws IOException {
+		try {
+			if (sshClient == null) {
+				sshClient = new SSHClient();
+			}
+			if (getSSHClient().isConnected())
+				return getSSHClient().startSession();
+
+			KeyProvider pkey = getSSHClient().loadKeys(getPrivateKeyLoc(), getKeyPass());
+
+			getSSHClient().loadKnownHosts();
+
+			getSSHClient().connect(hostAddress);
+			getSSHClient().authPublickey(getUsername(), pkey);
+			session = getSSHClient().startSession();
+			return session;
+
+		} catch (NullPointerException ne) {
+			throw new SecurityException("Cannot load security context for SSH", ne);
+		}
+	}
+
+	public SSHClient getSSHClient() {
+		if (sshClient == null) {
+			sshClient = new SSHClient();
+		}
+		return sshClient;
+	}
+
+    public void setPbsCluster(Cluster pbsCluster) {
+        this.pbsCluster = pbsCluster;
+    }
+
+    public Cluster getPbsCluster() {
+        return this.pbsCluster;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
new file mode 100644
index 0000000..3b90b40
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
@@ -0,0 +1,184 @@
+/*
+ *
+ * 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.ssh.security;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.IOUtil;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.credential.Credential;
+import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.util.Properties;
+
+public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication {
+    protected static final Logger log = LoggerFactory.getLogger(TokenizedSSHAuthInfo.class);
+
+    private String publicKeyFile;
+
+    private String privateKeyFile;
+
+    private String passPhrase = null;
+
+    private SSHCredential gssCredentials = null;
+
+    private CredentialReader credentialReader;
+
+    private RequestData requestData;
+
+    public TokenizedSSHAuthInfo(CredentialReader credentialReader, RequestData requestData) {
+        this.credentialReader = credentialReader;
+        this.requestData = requestData;
+    }
+
+    public TokenizedSSHAuthInfo(RequestData requestData) {
+        this.requestData = requestData;
+    }
+
+    public String getPublicKeyFile(String userName, String hostName) {
+        return publicKeyFile;
+    }
+
+    public String getPrivateKeyFile(String userName, String hostName) {
+        return privateKeyFile;
+    }
+
+    public String getPassPhrase() {
+        return passPhrase;
+    }
+
+    public void bannerMessage(String message) {
+
+    }
+
+    public SSHCredential getCredentials() throws SecurityException {
+
+        if (gssCredentials == null) {
+
+            try {
+                gssCredentials = getCredentialsFromStore();
+            } catch (Exception e) {
+                log.error("An exception occurred while retrieving credentials from the credential store. " +
+                        "Will continue with my proxy user name and password. Provided TokenId:" + requestData.getTokenId() + e.getMessage(), e);
+            }
+
+            if (gssCredentials == null) {
+                System.out.println("Authenticating with provided token failed, so falling back to authenticate with defaultCredentials");
+                try {
+                    gssCredentials = getDefaultCredentials();
+                } catch (Exception e) {
+                    throw new SecurityException("Error retrieving my proxy using username password",e.getCause());
+                }
+            }
+            // if still null, throw an exception
+            if (gssCredentials == null) {
+                throw new SecurityException("Unable to retrieve my proxy credentials to continue operation.");
+            }
+        }
+
+        return gssCredentials;
+    }
+
+
+    /**
+     * Reads the credentials from credential store.
+     *
+     * @return If token is found in the credential store, will return a valid credential. Else returns null.
+     * @throws Exception If an error occurred while retrieving credentials.
+     */
+    public SSHCredential getCredentialsFromStore() throws Exception {
+
+        if (getCredentialReader() == null) {
+            credentialReader = GFacUtils.getCredentialReader();
+            if(credentialReader == null){
+            	 return null;
+            }
+        }
+
+        Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
+                getRequestData().getTokenId());
+
+        if (credential instanceof SSHCredential) {
+            SSHCredential credential1 = (SSHCredential) credential;
+            this.publicKeyFile = writeFileToDisk(credential1.getPublicKey());
+            this.privateKeyFile = writeFileToDisk(credential1.getPrivateKey());
+            this.passPhrase = credential1.getPassphrase();
+            System.out.println(this.publicKeyFile);
+            System.out.println(this.privateKeyFile);
+            System.out.println(this.passPhrase);
+            this.getRequestData().setRequestUser(credential1.getPortalUserName());
+            return credential1;
+        } else {
+            log.info("Could not find SSH credentials for token - " + getRequestData().getTokenId() + " and "
+                    + "gateway id - " + getRequestData().getGatewayId());
+        }
+
+        return null;
+    }
+
+    /**
+     * Gets the default proxy certificate.
+     *
+     * @return Default my proxy credentials.
+     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while retrieving credentials.
+     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
+     */
+    public SSHCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException, IOException {
+        Properties configurationProperties = ServerSettings.getProperties();
+        String sshUserName = configurationProperties.getProperty(Constants.SSH_USER_NAME);
+        this.getRequestData().setRequestUser(sshUserName);
+        this.privateKeyFile = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY);
+        this.publicKeyFile = configurationProperties.getProperty(Constants.SSH_PUBLIC_KEY);
+        this.passPhrase = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY_PASS);
+        this.getRequestData().setRequestUser(sshUserName);
+        return new SSHCredential(IOUtil.readToByteArray(new File(this.privateKeyFile)), IOUtil.readToByteArray(new File(this.publicKeyFile)), this.passPhrase, requestData.getGatewayId(), sshUserName);
+    }
+
+    public CredentialReader getCredentialReader() {
+        return credentialReader;
+    }
+
+    public RequestData getRequestData() {
+        return requestData;
+    }
+
+    private String writeFileToDisk(byte[] data) {
+        File temp = null;
+        try {
+            temp = File.createTempFile("id_rsa", "");
+            //write it
+            FileOutputStream bw = new FileOutputStream(temp);
+            bw.write(data);
+            bw.close();
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+        }
+        return temp.getAbsolutePath();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
new file mode 100644
index 0000000..f2afedc
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -0,0 +1,561 @@
+/*
+ *
+ * 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.ssh.util;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.apache.airavata.gfac.ssh.impl.GSISSHAbstractCluster;
+import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.*;
+
+public class GFACSSHUtils {
+    private final static Logger logger = LoggerFactory.getLogger(GFACSSHUtils.class);
+
+    public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
+
+    public static final String PBS_JOB_MANAGER = "pbs";
+    public static final String SLURM_JOB_MANAGER = "slurm";
+    public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
+    public static final String LSF_JOB_MANAGER = "LSF";
+
+    public static int maxClusterCount = 5;
+
+    /**
+     * This method is to add computing resource specific authentication, if its a third party machine, use the other addSecurityContext
+     * @param jobExecutionContext
+     * @throws GFacException
+     * @throws ApplicationSettingsException
+     */
+    public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
+        JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+        if (preferredJobSubmissionProtocol == JobSubmissionProtocol.GLOBUS || preferredJobSubmissionProtocol == JobSubmissionProtocol.UNICORE) {
+            logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
+        } else if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH) {
+            try {
+                AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
+                SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
+                SecurityProtocol securityProtocol = sshJobSubmission.getSecurityProtocol();
+                if (securityProtocol == SecurityProtocol.GSI || securityProtocol == SecurityProtocol.SSH_KEYS) {
+                    SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+                    String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
+                    RequestData requestData = new RequestData(jobExecutionContext.getGatewayID());
+                    requestData.setTokenId(credentialStoreToken);
+
+                    ServerInfo serverInfo = new ServerInfo(null, jobExecutionContext.getHostName());
+
+                    Cluster pbsCluster = null;
+                    try {
+                        AuthenticationInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
+                        String installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
+                        if (installedParentPath == null) {
+                            installedParentPath = "/";
+                        }
+
+                        SSHCredential credentials =((TokenizedSSHAuthInfo)tokenizedSSHAuthInfo).getCredentials();// this is just a call to get and set credentials in to this object,data will be used
+                        if(credentials.getPrivateKey()==null || credentials.getPublicKey()==null){
+                            // now we fall back to username password authentication
+                            Properties configurationProperties = ServerSettings.getProperties();
+                            tokenizedSSHAuthInfo = new DefaultPasswordAuthenticationInfo(configurationProperties.getProperty(Constants.SSH_PASSWORD));
+                        }
+                        // This should be the login user name from compute resource preference
+                        String loginUser = jobExecutionContext.getLoginUserName();
+                        if (loginUser == null) {
+                            loginUser = credentials.getPortalUserName();
+                        }
+                        serverInfo.setUserName(loginUser);
+                        jobExecutionContext.getExperiment().setUserName(loginUser);
+
+
+                        // inside the pbsCluser object
+
+                        String key = loginUser + jobExecutionContext.getHostName() + serverInfo.getPort();
+                        boolean recreate = false;
+                        synchronized (clusters) {
+                            if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                                recreate = true;
+                            } else if (clusters.containsKey(key)) {
+                                int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                                if (clusters.get(key).get(i).getSession().isConnected()) {
+                                    pbsCluster = clusters.get(key).get(i);
+                                } else {
+                                    clusters.get(key).remove(i);
+                                    recreate = true;
+                                }
+                                if (!recreate) {
+                                    try {
+                                        pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                                    } catch (Exception e) {
+                                        clusters.get(key).remove(i);
+                                        logger.info("Connection found the connection map is expired, so we create from the scratch");
+                                        maxClusterCount++;
+                                        recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                                    }
+                                }
+                                logger.info("Re-using the same connection used with the connection string:" + key);
+                            } else {
+                                recreate = true;
+                            }
+                            if (recreate) {
+                            	 JobManagerConfiguration jConfig = null;
+                                 String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
+                                 if (jobManager == null) {
+                                     logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
+                                     jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                                 } else {
+                                     if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                         jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                                     } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                         jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
+                                     } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                         jConfig = CommonUtils.getUGEJobManager(installedParentPath);
+                                     } else if (LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                         jConfig = CommonUtils.getLSFJobManager(installedParentPath);
+                                     }
+                                 }
+
+                                pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,jConfig);
+                                List<Cluster> pbsClusters = null;
+                                if (!(clusters.containsKey(key))) {
+                                    pbsClusters = new ArrayList<Cluster>();
+                                } else {
+                                    pbsClusters = clusters.get(key);
+                                }
+                                pbsClusters.add(pbsCluster);
+                                clusters.put(key, pbsClusters);
+                            }
+                        }
+                    } catch (Exception e) {
+                        throw new GFacException("Error occurred...", e);
+                    }
+                    sshSecurityContext.setPbsCluster(pbsCluster);
+                    jobExecutionContext.addSecurityContext(jobExecutionContext.getHostName(), sshSecurityContext);
+                }
+            } catch (AppCatalogException e) {
+                throw new GFacException("Error while getting SSH Submission object from app catalog", e);
+            }
+        }
+    }
+
+    /**
+     * This method can be used to add third party resource security contexts
+     * @param jobExecutionContext
+     * @param sshAuth
+     * @throws GFacException
+     * @throws ApplicationSettingsException
+     */
+    public static void addSecurityContext(JobExecutionContext jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException, ApplicationSettingsException {
+        try {
+            if(sshAuth== null) {
+                throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
+            }
+            SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+            AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
+            JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            SSHJobSubmission sshJobSubmission = null;
+			try {
+				sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
+			} catch (Exception e1) {
+				 logger.error("Not able to get SSHJobSubmission from registry");
+			}
+
+            Cluster pbsCluster = null;
+            String key=sshAuth.getKey();
+            boolean recreate = false;
+            synchronized (clusters) {
+                if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                    recreate = true;
+                } else if (clusters.containsKey(key)) {
+                    int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                    if (clusters.get(key).get(i).getSession().isConnected()) {
+                        pbsCluster = clusters.get(key).get(i);
+                    } else {
+                        clusters.get(key).remove(i);
+                        recreate = true;
+                    }
+                    if (!recreate) {
+                        try {
+                            pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                        } catch (Exception e) {
+                            clusters.get(key).remove(i);
+                            logger.info("Connection found the connection map is expired, so we create from the scratch");
+                            maxClusterCount++;
+                            recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                        }
+                    }
+                    logger.info("Re-using the same connection used with the connection string:" + key);
+                } else {
+                    recreate = true;
+                }
+                if (recreate) {
+               	 JobManagerConfiguration jConfig = null;
+               	 String installedParentPath = null;
+               	 if(jobExecutionContext.getResourceJobManager()!= null){
+               		installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
+               	 }
+                 if (installedParentPath == null) {
+                     installedParentPath = "/";
+                 }
+					if (sshJobSubmission != null) {
+						String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
+						if (jobManager == null) {
+							logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
+							jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+						} else {
+							if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+								jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+							} else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+								jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
+							} else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+								jConfig = CommonUtils.getUGEJobManager(installedParentPath);
+							} else if (LSF_JOB_MANAGER.equals(jobManager)) {
+								jConfig = CommonUtils.getLSFJobManager(installedParentPath);
+							}
+						}
+					}
+                    pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),jConfig);
+                    key = sshAuth.getKey();
+                    List<Cluster> pbsClusters = null;
+                    if (!(clusters.containsKey(key))) {
+                        pbsClusters = new ArrayList<Cluster>();
+                    } else {
+                        pbsClusters = clusters.get(key);
+                    }
+                    pbsClusters.add(pbsCluster);
+                    clusters.put(key, pbsClusters);
+                }
+            }
+            sshSecurityContext.setPbsCluster(pbsCluster);
+            jobExecutionContext.addSecurityContext(key, sshSecurityContext);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new GFacException("Error adding security Context", e);
+        }
+    }
+
+
+    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) throws AppCatalogException, ApplicationSettingsException {
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        TaskDetails taskData = jobExecutionContext.getTaskData();
+
+
+        // set email based job monitoring email  address if monitor mode is JOB_EMAIL_NOTIFICATION_MONITOR
+        boolean addJobNotifMail = isEmailBasedJobMonitor(jobExecutionContext);
+        String emailIds = null;
+        if (addJobNotifMail) {
+            emailIds = ServerSettings.getEmailBasedMonitorAddress();
+        }
+        // add all configured job notification email addresses.
+        if (ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")) {
+            String flags = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS);
+            if (flags != null && jobExecutionContext.getApplicationContext().getComputeResourceDescription().getHostName().equals("stampede.tacc.xsede.org")) {
+                flags = "ALL";
+            }
+            jobDescriptor.setMailOptions(flags);
+
+            String userJobNotifEmailIds = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
+            if (userJobNotifEmailIds != null && !userJobNotifEmailIds.isEmpty()) {
+                if (emailIds != null && !emailIds.isEmpty()) {
+                    emailIds += ("," + userJobNotifEmailIds);
+                } else {
+                    emailIds = userJobNotifEmailIds;
+                }
+            }
+
+            if (taskData.isEnableEmailNotification()) {
+                List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
+                String elist = GFacUtils.listToCsv(emailList, ',');
+                if (elist != null && !elist.isEmpty()) {
+                    if (emailIds != null && !emailIds.isEmpty()) {
+                        emailIds = emailIds + "," + elist;
+                    } else {
+                        emailIds = elist;
+                    }
+                }
+            }
+        }
+        if (emailIds != null && !emailIds.isEmpty()) {
+            logger.info("Email list: " + emailIds);
+            jobDescriptor.setMailAddress(emailIds);
+        }
+        // this is common for any application descriptor
+
+        jobDescriptor.setCallBackIp(ServerSettings.getIp());
+        jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
+        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
+        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
+        jobDescriptor.setExecutablePath(jobExecutionContext.getApplicationContext()
+                .getApplicationDeploymentDescription().getExecutablePath());
+        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
+        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
+        String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
+        if (computationalProjectAccount == null){
+            ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
+            if (computeResourcePreference != null) {
+                computationalProjectAccount = computeResourcePreference.getAllocationProjectNumber();
+            }
+        }
+        if (computationalProjectAccount != null) {
+            jobDescriptor.setAcountString(computationalProjectAccount);
+        }
+        // To make job name alpha numeric
+        jobDescriptor.setJobName("A" + String.valueOf(generateJobName()));
+        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
+
+        List<String> inputValues = new ArrayList<String>();
+        MessageContext input = jobExecutionContext.getInMessageContext();
+
+        // sort the inputs first and then build the command ListR
+        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
+            @Override
+            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
+                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
+            }
+        };
+        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
+        for (Object object : input.getParameters().values()) {
+            if (object instanceof InputDataObjectType) {
+                InputDataObjectType inputDOT = (InputDataObjectType) object;
+                sortedInputSet.add(inputDOT);
+            }
+        }
+        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
+            if (!inputDataObjectType.isRequiredToAddedToCommandLine()) {
+                continue;
+            }
+            if (inputDataObjectType.getApplicationArgument() != null
+                    && !inputDataObjectType.getApplicationArgument().equals("")) {
+                inputValues.add(inputDataObjectType.getApplicationArgument());
+            }
+
+            if (inputDataObjectType.getValue() != null
+                    && !inputDataObjectType.getValue().equals("")) {
+                if (inputDataObjectType.getType() == DataType.URI) {
+                    // set only the relative path
+                    String filePath = inputDataObjectType.getValue();
+                    filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                    inputValues.add(filePath);
+                }else {
+                    inputValues.add(inputDataObjectType.getValue());
+                }
+
+            }
+        }
+        Map<String, Object> outputParams = jobExecutionContext.getOutMessageContext().getParameters();
+        for (Object outputParam : outputParams.values()) {
+            if (outputParam instanceof OutputDataObjectType) {
+                OutputDataObjectType output = (OutputDataObjectType) outputParam;
+                if (output.getApplicationArgument() != null
+                        && !output.getApplicationArgument().equals("")) {
+                    inputValues.add(output.getApplicationArgument());
+                }
+                if (output.getValue() != null && !output.getValue().equals("") && output.isRequiredToAddedToCommandLine()) {
+                    if (output.getType() == DataType.URI){
+                        String filePath = output.getValue();
+                        filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                        inputValues.add(filePath);
+                    }
+                }
+            }
+        }
+
+        jobDescriptor.setInputValues(inputValues);
+        jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
+
+        ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
+
+
+        ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
+        if (taskScheduling != null) {
+            int totalNodeCount = taskScheduling.getNodeCount();
+            int totalCPUCount = taskScheduling.getTotalCPUCount();
+
+
+            if (taskScheduling.getComputationalProjectAccount() != null) {
+                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+            }
+            if (taskScheduling.getQueueName() != null) {
+                jobDescriptor.setQueueName(taskScheduling.getQueueName());
+            }
+
+            if (totalNodeCount > 0) {
+                jobDescriptor.setNodes(totalNodeCount);
+            }
+            if (taskScheduling.getComputationalProjectAccount() != null) {
+                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+            }
+            if (taskScheduling.getQueueName() != null) {
+                jobDescriptor.setQueueName(taskScheduling.getQueueName());
+            }
+            if (totalCPUCount > 0) {
+                int ppn = totalCPUCount / totalNodeCount;
+                jobDescriptor.setProcessesPerNode(ppn);
+                jobDescriptor.setCPUCount(totalCPUCount);
+            }
+            if (taskScheduling.getWallTimeLimit() > 0) {
+                jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
+                if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
+                    jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
+                }
+            }
+            if (taskScheduling.getTotalPhysicalMemory() > 0) {
+                jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
+            }
+        } else {
+            logger.error("Task scheduling cannot be null at this point..");
+        }
+        ApplicationDeploymentDescription appDepDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+        List<String> moduleCmds = appDepDescription.getModuleLoadCmds();
+        if (moduleCmds != null) {
+            for (String moduleCmd : moduleCmds) {
+                jobDescriptor.addModuleLoadCommands(moduleCmd);
+            }
+        }
+        List<String> preJobCommands = appDepDescription.getPreJobCommands();
+        if (preJobCommands != null) {
+            for (String preJobCommand : preJobCommands) {
+                jobDescriptor.addPreJobCommand(parseCommand(preJobCommand, jobExecutionContext));
+            }
+        }
+
+        List<String> postJobCommands = appDepDescription.getPostJobCommands();
+        if (postJobCommands != null) {
+            for (String postJobCommand : postJobCommands) {
+                jobDescriptor.addPostJobCommand(parseCommand(postJobCommand, jobExecutionContext));
+            }
+        }
+
+        ApplicationParallelismType parallelism = appDepDescription.getParallelism();
+        if (parallelism != null){
+            if (parallelism == ApplicationParallelismType.MPI || parallelism == ApplicationParallelismType.OPENMP || parallelism == ApplicationParallelismType.OPENMP_MPI){
+                Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
+                if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
+                    for (JobManagerCommand command : jobManagerCommands.keySet()) {
+                        if (command == JobManagerCommand.SUBMISSION) {
+                            String commandVal = jobManagerCommands.get(command);
+                            jobDescriptor.setJobSubmitter(commandVal);
+                        }
+                    }
+                }
+            }
+        }
+        return jobDescriptor;
+    }
+
+    public static boolean isEmailBasedJobMonitor(JobExecutionContext jobExecutionContext) throws AppCatalogException {
+        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+            String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
+            SSHJobSubmission sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
+            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+            return monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR;
+        } else {
+            return false;
+        }
+    }
+
+    private static int generateJobName() {
+        Random random = new Random();
+        int i = random.nextInt(Integer.MAX_VALUE);
+        i = i + 99999999;
+        if(i<0) {
+            i = i * (-1);
+        }
+        return i;
+    }
+
+    private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
+        String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
+        parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
+        parsedValue = parsedValue.replaceAll("\\$outputDir", jobExecutionContext.getOutputDir());
+        return parsedValue;
+    }
+    /**
+     * This method can be used to set the Security Context if its not set and later use it in other places
+     * @param jobExecutionContext
+     * @param authenticationInfo
+     * @param userName
+     * @param hostName
+     * @param port
+     * @return
+     * @throws GFacException
+     */
+    public static String prepareSecurityContext(JobExecutionContext jobExecutionContext, AuthenticationInfo authenticationInfo
+            , String userName, String hostName, int port) throws GFacException {
+        ServerInfo serverInfo = new ServerInfo(userName, hostName);
+        String key = userName+hostName+port;
+        SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
+        if (jobExecutionContext.getSecurityContext(key) == null) {
+            try {
+                GFACSSHUtils.addSecurityContext(jobExecutionContext, sshAuthWrapper);
+            } catch (ApplicationSettingsException e) {
+                logger.error(e.getMessage());
+                try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    logger.error(e1.getLocalizedMessage());
+                }
+                throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+            }
+        }
+        return key;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
new file mode 100644
index 0000000..72c032b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
@@ -0,0 +1,96 @@
+package org.apache.airavata.gfac.ssh.util;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * To handle outputs of different data types
+ * 
+ */
+public class HandleOutputs {
+	private static final Logger log = LoggerFactory.getLogger(HandleOutputs.class);
+
+	public static List<OutputDataObjectType> handleOutputs(JobExecutionContext jobExecutionContext, Cluster cluster) throws GFacHandlerException {
+		List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
+		try {
+			String outputDataDir = File.separator + "tmp" + File.separator + jobExecutionContext.getExperimentID();
+			(new File(outputDataDir)).mkdirs();
+
+			List<OutputDataObjectType> outputs = jobExecutionContext.getTaskData().getApplicationOutputs();
+			List<String> outputList = cluster.listDirectory(jobExecutionContext.getWorkingDir());
+			boolean missingOutput = false;
+
+			for (OutputDataObjectType output : outputs) {
+				// FIXME: Validation of outputs based on required and optional and search based on REGEX provided in search.
+
+				if (DataType.URI == output.getType()) {
+                    // for failed jobs outputs are not generated. So we should not download outputs
+                    if (GFacUtils.isFailedJob(jobExecutionContext)){
+                       continue;
+                    }
+					String outputFile = output.getValue();
+					String fileName = outputFile.substring(outputFile.lastIndexOf(File.separatorChar) + 1, outputFile.length());
+
+					if (output.getLocation() == null && !outputList.contains(fileName) && output.isIsRequired()) {
+						missingOutput = true;
+					} else {
+						cluster.scpFrom(outputFile, outputDataDir);
+						String localFile = outputDataDir + File.separator + fileName;
+						jobExecutionContext.addOutputFile(localFile);
+						output.setValue(localFile);
+						outputArray.add(output);
+					}
+
+				} else if (DataType.STDOUT == output.getType()) {
+					String downloadFile = jobExecutionContext.getStandardOutput();
+					String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
+					cluster.scpFrom(downloadFile, outputDataDir);
+					String localFile = outputDataDir + File.separator + fileName;
+					jobExecutionContext.addOutputFile(localFile);
+					jobExecutionContext.setStandardOutput(localFile);
+					output.setValue(localFile);
+					outputArray.add(output);
+
+				} else if (DataType.STDERR == output.getType()) {
+					String downloadFile = jobExecutionContext.getStandardError();
+					String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
+					cluster.scpFrom(downloadFile, outputDataDir);
+					String localFile = outputDataDir + File.separator + fileName;
+					jobExecutionContext.addOutputFile(localFile);
+					jobExecutionContext.setStandardError(localFile);
+					output.setValue(localFile);
+					outputArray.add(output);
+
+				}
+			}
+			if (outputArray == null || outputArray.isEmpty()) {
+				log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
+				if (jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null) {
+					throw new GFacHandlerException("Empty Output returned from the Application, Double check the application"
+							+ "and ApplicationDescriptor output Parameter Names");
+				}
+			}
+
+			if (missingOutput) {
+				String arrayString = Arrays.deepToString(outputArray.toArray());
+				log.error(arrayString);
+				throw new GFacHandlerException("Required output is missing");
+			}
+		} catch (Exception e) {
+			throw new GFacHandlerException(e);
+		}
+		jobExecutionContext.getTaskData().setApplicationOutputs(outputArray);
+		return outputArray;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/LSFTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/LSFTemplate.xslt b/modules/gfac/gfac-impl/src/main/resources/LSFTemplate.xslt
new file mode 100644
index 0000000..c548d8e
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/LSFTemplate.xslt
@@ -0,0 +1,93 @@
+<!--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. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+    <xsl:output method="text" />
+    <xsl:template match="/ns:JobDescriptor">
+        <xsl:param name="quote">"</xsl:param>
+#! /bin/bash
+# LSF batch job submission script generated by Apache Airavata
+#
+        <xsl:choose>
+            <xsl:when test="ns:shellName">
+#BSUB -L <xsl:value-of select="ns:shellName"/>
+            </xsl:when></xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:queueName">
+#BSUB -q <xsl:value-of select="ns:queueName"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:nodes">
+#BSUB -n <xsl:value-of select="ns:nodes"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:mailAddress">
+#BSUB -u <xsl:value-of select="ns:mailAddress"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:jobName">
+#BSUB -J <xsl:value-of select="ns:jobName"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:acountString">
+#BSUB -P <xsl:value-of select="ns:acountString"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:maxWallTime">
+#BSUB -W <xsl:value-of select="ns:maxWallTime"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:standardOutFile">
+#BSUB -o "<xsl:value-of select="ns:standardOutFile"/>"
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:standardOutFile">
+#BSUB -e "<xsl:value-of select="ns:standardErrorFile"/>"
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:chassisName">
+#BSUB -m c<xsl:value-of select="ns:chassisName"/>
+            </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+            <xsl:when test="ns:usedMem">
+#BSUB -R rusage[mem=<xsl:value-of select="ns:usedMem"/>]
+            </xsl:when>
+        </xsl:choose>
+
+        <xsl:text>&#xa;</xsl:text>
+
+        <xsl:text>&#xa;</xsl:text>
+        <xsl:for-each select="ns:moduleLoadCommands/ns:command">
+            <xsl:text>&#xa;</xsl:text>
+            <xsl:value-of select="."/><xsl:text>   </xsl:text>
+        </xsl:for-each>
+        <xsl:text>&#xa;</xsl:text>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+        <xsl:for-each select="ns:preJobCommands/ns:command">
+            <xsl:value-of select="."/><xsl:text>   </xsl:text>
+            <xsl:text>&#xa;</xsl:text>
+        </xsl:for-each>
+        <xsl:text>&#xa;</xsl:text>
+        <xsl:choose><xsl:when test="ns:jobSubmitterCommand != ''">
+            <xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text>
+        </xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+        <xsl:for-each select="ns:inputs/ns:input">
+            <xsl:value-of select="."/><xsl:text>   </xsl:text>
+        </xsl:for-each>
+        <xsl:text>&#xa;</xsl:text>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/PBSTemplate.xslt b/modules/gfac/gfac-impl/src/main/resources/PBSTemplate.xslt
new file mode 100644
index 0000000..73c5eb6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/PBSTemplate.xslt
@@ -0,0 +1,82 @@
+<!--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. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+<xsl:output method="text" />
+<xsl:template match="/ns:JobDescriptor">
+#! /bin/sh
+#   <xsl:choose>
+    <xsl:when test="ns:shellName">
+##PBS -S <xsl:value-of select="ns:shellName"/>
+    </xsl:when></xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:queueName">
+#PBS -q <xsl:value-of select="ns:queueName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:mailOptions">
+#PBS -m <xsl:value-of select="ns:mailOptions"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+<xsl:when test="ns:acountString">
+#PBS -A <xsl:value-of select="ns:acountString"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:maxWallTime">
+#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:jobName">
+#PBS -N <xsl:value-of select="ns:jobName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -o <xsl:value-of select="ns:standardOutFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:usedMem">
+#PBS -l mem=<xsl:value-of select="ns:usedMem"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
+#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
+<xsl:text>&#xa;</xsl:text>
+    </xsl:when>
+    </xsl:choose>
+<xsl:for-each select="ns:exports/ns:name">
+<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
+export<xsl:text>   </xsl:text><xsl:value-of select="."/>
+<xsl:text>&#xa;</xsl:text>
+</xsl:for-each>
+<xsl:for-each select="ns:preJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
+<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+<xsl:for-each select="ns:inputs/ns:input">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+<xsl:for-each select="ns:postJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+</xsl:for-each>
+
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt b/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
new file mode 100644
index 0000000..4a62722
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
@@ -0,0 +1,78 @@
+<!--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. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+<xsl:output method="text" />
+<xsl:template match="/ns:JobDescriptor">
+<xsl:choose>
+<xsl:when test="ns:shellName">
+#!<xsl:value-of select="ns:shellName"/>
+    </xsl:when>
+    </xsl:choose>
+<xsl:choose>
+    <xsl:when test="ns:queueName">
+#SBATCH -p <xsl:value-of select="ns:queueName"/>
+    </xsl:when>
+    </xsl:choose>
+<xsl:choose>
+    <xsl:when test="ns:nodes">
+#SBATCH -N <xsl:value-of select="ns:nodes"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:cpuCount">
+#SBATCH -n <xsl:value-of select="ns:cpuCount"/>
+        </xsl:when>
+        </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:mailAddress">
+#SBATCH -mail-user=<xsl:value-of select="ns:mailAddress"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:mailType">
+#SBATCH -mail-type=<xsl:value-of select="ns:mailType"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+<xsl:when test="ns:acountString">
+#SBATCH -A <xsl:value-of select="ns:acountString"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:maxWallTime">
+#SBATCH -t <xsl:value-of select="ns:maxWallTime"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:jobName">
+#SBATCH -J <xsl:value-of select="ns:jobName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#SBATCH -o <xsl:value-of select="ns:standardOutFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#SBATCH -e <xsl:value-of select="ns:standardErrorFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:for-each select="ns:preJobCommands/ns:command">
+        <xsl:text>&#xa;</xsl:text>
+        <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
+<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+<xsl:for-each select="ns:inputs/ns:input">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file


[02/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
deleted file mode 100644
index 7a04f11..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ /dev/null
@@ -1,768 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URL;
-import java.security.SecureRandom;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.CommandExecutor;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHKeyAuthentication;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPasswordAuthentication;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPublicKeyAuthentication;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPublicKeyFileAuthentication;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.apache.airavata.gsi.ssh.api.job.OutputParser;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.jsch.ExtendedJSch;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.gsi.ssh.util.SSHAPIUIKeyboardInteractive;
-import org.apache.airavata.gsi.ssh.util.SSHKeyPasswordHandler;
-import org.apache.airavata.gsi.ssh.util.SSHUtils;
-import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.jcraft.jsch.ExtendedSession;
-import com.jcraft.jsch.GSISSHIdentityFile;
-import com.jcraft.jsch.GSISSHIdentityRepository;
-import com.jcraft.jsch.Identity;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-
-public class GSISSHAbstractCluster implements Cluster {
-
-    private static final Logger log = LoggerFactory.getLogger(GSISSHAbstractCluster.class);
-    public static final String X509_CERT_DIR = "X509_CERT_DIR";
-    public static final String SSH_SESSION_TIMEOUT = "ssh.session.timeout";
-
-    public JobManagerConfiguration jobManagerConfiguration;
-
-    private ServerInfo serverInfo;
-
-    private AuthenticationInfo authenticationInfo;
-
-    private Session session;
-
-    private ConfigReader configReader;
-	
-    private JSch defaultJSch;
-
-    private static Identity identityFile = null;
-
-    public GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
-        this(serverInfo, authenticationInfo);
-        this.jobManagerConfiguration = config;
-    }
-
-    public  GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
-
-        reconnect(serverInfo, authenticationInfo);
-    }
-
-    public GSISSHAbstractCluster(JobManagerConfiguration config) {
-        this.jobManagerConfiguration = config;
-    }
-    private synchronized void reconnect(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
-        this.serverInfo = serverInfo;
-
-        this.authenticationInfo = authenticationInfo;
-
-        if (authenticationInfo instanceof GSIAuthenticationInfo) {
-            JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
-            JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
-            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo) authenticationInfo).getProperties().
-                    get("X509_CERT_DIR"));
-        }
-
-
-        try {
-            this.configReader = new ConfigReader();
-        } catch (IOException e) {
-            throw new SSHApiException("Unable to load system configurations.", e);
-        }
-        try {
-        	 if(defaultJSch == null){
-             	defaultJSch = createJSch(authenticationInfo);
-             }
-     	        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
-                     + serverInfo.getUserName());
-
-        	session = createSession(defaultJSch,serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
-        	}
-        	catch (Exception e) {
-            throw new SSHApiException("An exception occurred while creating SSH session." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        //=============================================================
-        // Handling vanilla SSH pieces
-        //=============================================================
-        if (authenticationInfo instanceof SSHPasswordAuthentication) {
-            String password = ((SSHPasswordAuthentication) authenticationInfo).
-                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
-
-            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
-
-            // TODO figure out why we need to set password to session
-            session.setPassword(password);
-
-        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
-
-            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
-                    = (SSHPublicKeyFileAuthentication) authenticationInfo;
-            String privateKeyFile = sshPublicKeyFileAuthentication.
-                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
-
-            logDebug("The private key file for vanilla SSH " + privateKeyFile);
-
-            String publicKeyFile = sshPublicKeyFileAuthentication.
-                    getPublicKeyFile(serverInfo.getUserName(), serverInfo.getHost());
-
-            logDebug("The public key file for vanilla SSH " + publicKeyFile);
-
-            try {
-                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, defaultJSch);
-            } catch (JSchException e) {
-                throw new SSHApiException("An exception occurred while initializing keys using files. " +
-                        "(private key and public key)." +
-                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                        " connecting user name - "
-                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
-                        publicKeyFile, e);
-            }
-
-            // Add identity to identity repository
-            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
-            identityRepository.add(identityFile);
-
-            // Set repository to session
-            session.setIdentityRepository(identityRepository);
-
-            // Set the user info
-            SSHKeyPasswordHandler sshKeyPasswordHandler
-                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
-
-            session.setUserInfo(sshKeyPasswordHandler);
-
-        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
-
-            SSHPublicKeyAuthentication sshPublicKeyAuthentication
-                    = (SSHPublicKeyAuthentication) authenticationInfo;
-            try {
-                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
-                identityFile = GSISSHIdentityFile.newInstance(name,
-                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
-                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), defaultJSch);
-            } catch (JSchException e) {
-                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
-                        "(private key and public key)." +
-                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                        " connecting user name - "
-                        + serverInfo.getUserName(), e);
-            }
-
-            // Add identity to identity repository
-            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
-            identityRepository.add(identityFile);
-
-            // Set repository to session
-            session.setIdentityRepository(identityRepository);
-
-            // Set the user info
-            SSHKeyPasswordHandler sshKeyPasswordHandler
-                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
-
-            session.setUserInfo(sshKeyPasswordHandler);
-
-        }
-
-        // Not a good way, but we dont have any choice
-        if (session instanceof ExtendedSession) {
-            if (authenticationInfo instanceof GSIAuthenticationInfo) {
-                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo) authenticationInfo);
-            }
-        }
-
-        try {
-            session.connect(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
-        } catch (Exception e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-    }
-
-    public synchronized JobDescriptor cancelJob(String jobID) throws SSHApiException {
-        JobStatus jobStatus = getJobStatus(jobID);
-        if (jobStatus == null || jobStatus == JobStatus.U) {
-            log.info("Validation before cancel is failed, couldn't found job in remote host to cancel. Job may be already completed|failed|canceled");
-            return null;
-        }
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getCancelCommand(jobID);
-
-        StandardOutReader stdOutReader = new StandardOutReader();
-        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
-        String outputifAvailable = getOutputifAvailable(stdOutReader, "Error reading output of job submission", jobManagerConfiguration.getBaseCancelCommand());
-        // this might not be the case for all teh resources, if so Cluster implementation can override this method
-        // because here after cancelling we try to get the job description and return it back
-        try {
-            return this.getJobDescriptorById(jobID);
-        } catch (Exception e) {
-            //its ok to fail to get status when the job is gone
-            return null;
-        }
-    }
-
-    public synchronized String submitBatchJobWithScript(String scriptPath, String workingDirectory) throws SSHApiException {
-        this.scpTo(workingDirectory, scriptPath);
-
-        // since this is a constant we do not ask users to fill this
-
-//        RawCommandInfo rawCommandInfo = new RawCommandInfo(this.installedPath + this.jobManagerConfiguration.getSubmitCommand() + " " +
-//                workingDirectory + File.separator + FilenameUtils.getName(scriptPath));
-
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getSubmitCommand(workingDirectory,scriptPath);
-        StandardOutReader standardOutReader = new StandardOutReader();
-        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-        CommandExecutor.executeCommand(rawCommandInfo, this.session, standardOutReader);
-
-        //Check whether pbs submission is successful or not, if it failed throw and exception in submitJob method
-        // with the error thrown in qsub command
-        //
-        String outputifAvailable = getOutputifAvailable(standardOutReader,"Error reading output of job submission",jobManagerConfiguration.getBaseSubmitCommand());
-        OutputParser outputParser = jobManagerConfiguration.getParser();
-        return  outputParser.parseJobSubmission(outputifAvailable);
-    }
-
-    public synchronized String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException {
-        TransformerFactory factory = TransformerFactory.newInstance();
-        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
-
-        if (resource == null) {
-            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
-                    + "' not found in the classpath";
-            throw new SSHApiException(error);
-        }
-
-        Source xslt = new StreamSource(new File(resource.getPath()));
-        Transformer transformer;
-        StringWriter results = new StringWriter();
-        File tempPBSFile = null;
-        try {
-            // generate the pbs script using xslt
-            transformer = factory.newTransformer(xslt);
-            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
-            transformer.transform(text, new StreamResult(results));
-            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
-            if (scriptContent.startsWith("\n")) {
-                scriptContent = scriptContent.substring(1);
-            }
-//            log.debug("generated PBS:" + results.toString());
-
-            // creating a temporary file using pbs script generated above
-            int number = new SecureRandom().nextInt();
-            number = (number < 0 ? -number : number);
-
-            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
-            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
-
-            //reusing submitBatchJobWithScript method to submit a job
-            String jobID = null;
-            int retry = 3;
-            while(retry>0) {
-                try {
-                    jobID = this.submitBatchJobWithScript(tempPBSFile.getAbsolutePath(),
-                            jobDescriptor.getWorkingDirectory());
-                    retry=0;
-                } catch (SSHApiException e) {
-                    retry--;
-                    if(retry==0) {
-                        throw e;
-                    }else{
-                        try {
-                            Thread.sleep(5000);
-                        } catch (InterruptedException e1) {
-                            log.error(e1.getMessage(), e1);
-                        }
-                        log.error("Error occured during job submission but doing a retry");
-                    }
-                }
-            }
-            log.debug("Job has successfully submitted, JobID : " + jobID);
-            if (jobID != null) {
-                return jobID.replace("\n", "");
-            } else {
-                return null;
-            }
-            } catch (TransformerConfigurationException e) {
-            throw new SSHApiException("Error parsing PBS transformation", e);
-        } catch (TransformerException e) {
-            throw new SSHApiException("Error generating PBS script", e);
-        } catch (IOException e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        } finally {
-            if (tempPBSFile != null) {
-                tempPBSFile.delete();
-            }
-        }
-    }
-
-
-    public void generateJobScript(JobDescriptor jobDescriptor) throws SSHApiException {
-        TransformerFactory factory = TransformerFactory.newInstance();
-        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
-
-        if (resource == null) {
-            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
-                    + "' not found in the classpath";
-            throw new SSHApiException(error);
-        }
-
-        Source xslt = new StreamSource(new File(resource.getPath()));
-        Transformer transformer;
-        StringWriter results = new StringWriter();
-        File tempPBSFile = null;
-        try {
-            // generate the pbs script using xslt
-            transformer = factory.newTransformer(xslt);
-            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
-            transformer.transform(text, new StreamResult(results));
-            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
-            if (scriptContent.startsWith("\n")) {
-                scriptContent = scriptContent.substring(1);
-            }
-//            log.debug("generated PBS:" + results.toString());
-
-            // creating a temporary file using pbs script generated above
-            int number = new SecureRandom().nextInt();
-            number = (number < 0 ? -number : number);
-
-            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
-            log.info("File Path: " + tempPBSFile.getAbsolutePath());
-            log.info("File Content: " + scriptContent);
-            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
-        } catch (TransformerConfigurationException e) {
-            throw new SSHApiException("Error parsing PBS transformation", e);
-        } catch (TransformerException e) {
-            throw new SSHApiException("Error generating PBS script", e);
-        } catch (IOException e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        } finally {
-            if (tempPBSFile != null) {
-                tempPBSFile.delete();
-            }
-        }
-    }
-
-
-
-    public synchronized JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException {
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
-        StandardOutReader stdOutReader = new StandardOutReader();
-        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
-        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",jobManagerConfiguration.getBaseMonitorCommand());
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobManagerConfiguration.getParser().parseSingleJob(jobDescriptor, result);
-        return jobDescriptor;
-    }
-
-    public synchronized JobStatus getJobStatus(String jobID) throws SSHApiException {
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
-        StandardOutReader stdOutReader = new StandardOutReader();
-        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
-        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
-        return jobManagerConfiguration.getParser().parseJobStatus(jobID, result);
-    }
-
-    @Override
-    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException {
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getJobIdMonitorCommand(jobName, userName);
-        StandardOutReader stdOutReader = new StandardOutReader();
-        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
-        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",
-                jobManagerConfiguration.getJobIdMonitorCommand(jobName,userName).getCommand());
-        return jobManagerConfiguration.getParser().parseJobId(jobName, result);
-    }
-
-    private static void logDebug(String message) {
-        if (log.isDebugEnabled()) {
-            log.debug(message);
-        }
-    }
-
-    public JobManagerConfiguration getJobManagerConfiguration() {
-        return jobManagerConfiguration;
-    }
-
-    public void setJobManagerConfiguration(JobManagerConfiguration jobManagerConfiguration) {
-        this.jobManagerConfiguration = jobManagerConfiguration;
-    }
-
-    public synchronized void scpTo(String remoteFile, String localFile) throws SSHApiException {
-        int retry = 3;
-        while (retry > 0) {
-            try {
-                if (!session.isConnected()) {
-                    session.connect();
-                }
-                log.info("Transfering file:/" + localFile + " To:" + serverInfo.getHost() + ":" + remoteFile);
-                SSHUtils.scpTo(remoteFile, localFile, session);
-                retry = 0;
-            } catch (IOException e) {
-                retry--;
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
-                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
-                }
-            } catch (JSchException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
-                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
-                }
-            }
-        }
-    }
-
-    public synchronized void scpFrom(String remoteFile, String localFile) throws SSHApiException {
-        int retry = 3;
-        while(retry>0) {
-            try {
-                if (!session.isConnected()) {
-                    session.connect();
-                }
-                log.info("Transfering from:" + serverInfo.getHost() + ":" + remoteFile + " To:" + "file:/" + localFile);
-                SSHUtils.scpFrom(remoteFile, localFile, session);
-                retry=0;
-            } catch (IOException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
-                }else{
-                    log.error("Error performing scp but doing a retry");
-                }
-            } catch (JSchException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if(retry==0) {
-                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
-                }else{
-                    log.error("Error performing scp but doing a retry");
-                }
-            }
-        }
-    }
-    
-    public synchronized void scpThirdParty(String remoteFileSource, String remoteFileTarget) throws SSHApiException {
-        try {
-            if(!session.isConnected()){
-                session.connect();
-            }
-            log.info("Transfering from:" + remoteFileSource + " To: " + remoteFileTarget);
-            SSHUtils.scpThirdParty(remoteFileSource, remoteFileTarget, session);
-        } catch (IOException e) {
-            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
-                    +remoteFileTarget , e);
-        } catch (JSchException e) {
-            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
-                    +remoteFileTarget, e);
-        }
-    }
-
-    public synchronized void makeDirectory(String directoryPath) throws SSHApiException {
-        int retry = 3;
-        while (retry > 0) {
-            try {
-                if (!session.isConnected()) {
-                    session.connect();
-                }
-                log.info("Creating directory: " + serverInfo.getHost() + ":" + directoryPath);
-                SSHUtils.makeDirectory(directoryPath, session);
-                retry = 0;
-            } catch (IOException e) {
-                throw new SSHApiException("Failed during creating directory:" + directoryPath + " to remote file "
-                        + serverInfo.getHost() + ":rFile", e);
-            } catch (JSchException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
-                }
-            } catch (SSHApiException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
-                }
-            }
-        }
-    }
-
-    public synchronized List<String> listDirectory(String directoryPath) throws SSHApiException {
-        int retry = 3;
-        List<String> files = null;
-        while (retry > 0) {
-            try {
-                if (!session.isConnected()) {
-                    session.connect();
-                }
-                log.info("Listing directory: " + serverInfo.getHost() + ":" + directoryPath);
-                files = SSHUtils.listDirectory(directoryPath, session);
-                retry=0;
-            } catch (IOException e) {
-                log.error(e.getMessage(), e);
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during listing directory:" + directoryPath + " to remote file ", e);
-                }
-            } catch (JSchException e) {
-                retry--;
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file ", e);
-                }
-            }catch (SSHApiException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
-                }
-            }
-        }
-        return files;
-    }
-
-    public synchronized void getJobStatuses(String userName, Map<String,JobStatus> jobIDs)throws SSHApiException {
-        int retry = 3;
-        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getUserBasedMonitorCommand(userName);
-        StandardOutReader stdOutReader = new StandardOutReader();
-        while (retry > 0){
-            try {
-                log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
-                CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
-                retry=0;
-            } catch (SSHApiException e) {
-                retry--;
-                try {
-                    Thread.sleep(5000);
-                } catch (InterruptedException e1) {
-                    log.error(e1.getMessage(), e1);
-                }
-                reconnect(serverInfo, authenticationInfo);
-                if (retry == 0) {
-                    throw new SSHApiException("Failed Getting statuses  to remote file", e);
-                }
-            }
-        }
-        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
-        jobManagerConfiguration.getParser().parseJobStatuses(userName, jobIDs, result);
-    }
-
-    public ServerInfo getServerInfo() {
-        return serverInfo;
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    /**
-     * This gaurantee to return a valid session
-     *
-     * @return
-     */
-    public Session getSession() {
-        return this.session;
-    }
-
-    /**
-     * This method will read standard output and if there's any it will be parsed
-     *
-     * @param jobIDReaderCommandOutput
-     * @param errorMsg
-     * @return
-     * @throws SSHApiException
-     */
-    private String getOutputifAvailable(StandardOutReader jobIDReaderCommandOutput, String errorMsg, String command) throws SSHApiException {
-        String stdOutputString = jobIDReaderCommandOutput.getStdOutputString();
-        String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
-        log.info("StandardOutput Returned:" + stdOutputString);
-        log.info("StandardError  Returned:" +stdErrorString);
-        String[] list = command.split(File.separator);
-        command = list[list.length - 1];
-        // We are checking for stderr containing the command issued. Thus ignores the verbose logs in stderr.
-        if (stdErrorString != null && stdErrorString.contains(command.trim()) && !stdErrorString.contains("Warning")) {
-            log.error("Standard Error output : " + stdErrorString);
-            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
-        }else if(stdOutputString.contains("error")){
-            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
-        }
-        return stdOutputString;
-    }
-
-    public void disconnect() throws SSHApiException {
-    	if(getSession().isConnected()){
-    		getSession().disconnect();
-    	}
-    }
-    /**
-	
-	 *            the file system abstraction which will be necessary to
-	 *            perform certain file system operations.
-	 * @return the new default JSch implementation.
-	 * @throws JSchException
-	 *             known host keys cannot be loaded.
-	 */
-	protected JSch createJSch(AuthenticationInfo authenticationInfo) throws JSchException {
-//		final File fs = new File(System.getProperty("user.home"));
-		if(authenticationInfo instanceof GSIAuthenticationInfo){
-			final JSch jsch = new ExtendedJSch();
-//			knownHosts(jsch, fs);
-			return jsch;
-		}else{
-		final JSch jsch = new JSch();
-//		knownHosts(jsch, fs);
-		return jsch;
-		}
-		
-	}
-	/**
-	 * Create a new remote session for the requested address.
-	 *
-	 * @param user
-	 *            login to authenticate as.
-	 * @param host
-	 *            server name to connect to.
-	 * @param port
-	 *            port number of the SSH daemon (typically 22).
-	 * @return new session instance, but otherwise unconfigured.
-	 * @throws JSchException
-	 *             the session could not be created.
-	 */
-	private Session createSession(JSch jsch, String user, String host, int port) throws JSchException {
-		final Session session = jsch.getSession(user, host, port);
-		// We retry already in getSession() method. JSch must not retry
-		// on its own.
-		session.setConfig("MaxAuthTries", "1"); //$NON-NLS-1$ //$NON-NLS-2$
-		session.setTimeout(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
-	    java.util.Properties config = this.configReader.getProperties();
-	    session.setConfig(config);
-	    
-    	return session;
-	}
-	private static void knownHosts(final JSch sch,final File home) throws JSchException {
-		if (home == null)
-			return;
-		final File known_hosts = new File(new File(home, ".ssh"), "known_hosts"); //$NON-NLS-1$ //$NON-NLS-2$
-		try {
-			final FileInputStream in = new FileInputStream(known_hosts);
-			try {
-				sch.setKnownHosts(in);
-			} finally {
-				in.close();
-			}
-		} catch (FileNotFoundException none) {
-			// Oh well. They don't have a known hosts in home.
-		} catch (IOException err) {
-			// Oh well. They don't have a known hosts in home.
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
deleted file mode 100644
index 66c5e62..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
+++ /dev/null
@@ -1,112 +0,0 @@
- /*
- *
- * 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.gsi.ssh.impl;
-
- import javax.print.attribute.standard.JobState;
-
- /**
-  * This will contains all the PBS specific job statuses.
-  * C -  Job is completed after having run/
-  * E -  Job is exiting after having run.
-  * H -  Job is held.
-  * Q -  job is queued, eligible to run or routed.
-  * R -  job is running.
-  * T -  job is being moved to new location.
-  * W -  job is waiting for its execution time
-  * (-a option) to be reached.
-  * S -  (Unicos only) job is suspend.
-  */
- public enum JobStatus {
-     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
-
-     public static JobStatus fromString(String status){
-        if(status != null){
-            if("C".equals(status)){
-                return JobStatus.C;
-            }else if("E".equals(status)){
-                return JobStatus.E;
-            }else if("H".equals(status)){
-                return JobStatus.H;
-            }else if("Q".equals(status)){
-                return JobStatus.Q;
-            }else if("R".equals(status)){
-                return JobStatus.R;
-            }else if("T".equals(status)){
-                return JobStatus.T;
-            }else if("W".equals(status)){
-                return JobStatus.W;
-            }else if("S".equals(status)){
-                return JobStatus.S;
-            }else if("F".equals(status)){
-                return JobStatus.F;
-            }else if("S".equals(status)){
-                return JobStatus.S;
-            }else if("CA".equals(status)){
-                return JobStatus.CA;
-            }else if("CF".equals(status)){
-                return JobStatus.CF;
-            }else if("CD".equals(status)){
-                return JobStatus.CD;
-            }else if("CG".equals(status)){
-                return JobStatus.CG;
-            }else if("NF".equals(status)){
-                return JobStatus.NF;
-            }else if("PD".equals(status)){
-                return JobStatus.PD;
-            }else if("PR".equals(status)){
-                return JobStatus.PR;
-            }else if("TO".equals(status)){
-                return JobStatus.TO;
-            }else if("U".equals(status)){
-                return JobStatus.U;
-            }else if("qw".equals(status)){
-                return JobStatus.qw;
-            }else if("t".equals(status)){
-                return JobStatus.t;
-            }else if("r".equals(status)){
-                return JobStatus.r;
-            }else if("h".equals(status)){
-                return JobStatus.h;
-            }else if("Er".equals(status)){
-                return JobStatus.Er;
-            }else if("Eqw".equals(status)){
-                return JobStatus.Er;
-            }else if("RUN".equals(status)){      // LSF starts here
-                return JobStatus.RUN;
-            }else if("PEND".equals(status)){
-                return JobStatus.PEND;
-            }else if("DONE".equals(status)){
-                return JobStatus.DONE;
-            }else if("PSUSP".equals(status)){
-                return JobStatus.PSUSP;
-            }else if("USUSP".equals(status)){
-                return JobStatus.USUSP;
-            }else if("SSUSP".equals(status)){
-                return JobStatus.SSUSP;
-            }else if("EXIT".equals(status)){
-                return JobStatus.EXIT;
-            }else if("ZOMBI".equals(status)){
-                return JobStatus.ZOMBI;
-            }
-        }
-         return JobStatus.U;
-     }
- }

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/PBSCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/PBSCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/PBSCluster.java
deleted file mode 100644
index 58d6a3f..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/PBSCluster.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import com.jcraft.jsch.*;
-import org.apache.airavata.gsi.ssh.api.*;
-import org.apache.airavata.gsi.ssh.api.authentication.*;
-import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * This is the default implementation of a cluster.
- * this has most of the methods to be used by the end user of the
- * library.
- */
-public class PBSCluster extends GSISSHAbstractCluster {
-    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
-
-
-    public PBSCluster(JobManagerConfiguration jobManagerConfiguration) {
-        super(jobManagerConfiguration);
-    }
-    public PBSCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
-        super(serverInfo, authenticationInfo,config);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
deleted file mode 100644
index 0e9d16e..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import org.apache.airavata.gsi.ssh.api.CommandInfo;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 8/14/13
- * Time: 5:18 PM
- */
-
-/**
- * The raw command information. String returned by getCommand is directly executed in SSH
- * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
- */
-public class RawCommandInfo implements CommandInfo {
-
-    private String rawCommand;
-
-    public RawCommandInfo(String cmd) {
-        this.rawCommand = cmd;
-    }
-
-    public String getCommand() {
-        return this.rawCommand;
-    }
-
-    public String getRawCommand() {
-        return rawCommand;
-    }
-
-    public void setRawCommand(String rawCommand) {
-        this.rawCommand = rawCommand;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SSHUserInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SSHUserInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SSHUserInfo.java
deleted file mode 100644
index 68d7ff7..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SSHUserInfo.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import com.jcraft.jsch.UserInfo;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 9/20/13
- * Time: 2:31 PM
- */
-
-public class SSHUserInfo implements UserInfo {
-
-    private String password;
-
-    public SSHUserInfo(String pwd) {
-        this.password = pwd;
-    }
-
-    public String getPassphrase() {
-        return this.password;
-    }
-
-    public String getPassword() {
-        return this.password;
-    }
-
-    public boolean promptPassword(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public boolean promptPassphrase(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public boolean promptYesNo(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public void showMessage(String message) {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/StandardOutReader.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/StandardOutReader.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/StandardOutReader.java
deleted file mode 100644
index 9f5fa4c..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/StandardOutReader.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelExec;
-
-import org.apache.airavata.gsi.ssh.api.CommandOutput;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class StandardOutReader implements CommandOutput {
-
-    private static final Logger logger = LoggerFactory.getLogger(StandardOutReader.class);
-    String stdOutputString = null;
-    ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
-    public void onOutput(Channel channel) {
-        try {
-            StringBuffer pbsOutput = new StringBuffer("");
-            InputStream inputStream =  channel.getInputStream();
-            byte[] tmp = new byte[1024];
-            do {
-                while (inputStream.available() > 0) {
-                    int i = inputStream.read(tmp, 0, 1024);
-                    if (i < 0) break;
-                    pbsOutput.append(new String(tmp, 0, i));
-                }
-            } while (!channel.isClosed()) ;
-            String output = pbsOutput.toString();
-            this.setStdOutputString(output);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-    }
-
-
-    public void exitCode(int code) {
-        System.out.println("Program exit code - " + code);
-    }
-
-    public String getStdOutputString() {
-        return stdOutputString;
-    }
-
-    public void setStdOutputString(String stdOutputString) {
-        this.stdOutputString = stdOutputString;
-    }
-
-    public String getStdErrorString() {
-        return errorStream.toString();
-    }
-
-    public OutputStream getStandardError() {
-        return errorStream;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SystemCommandOutput.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SystemCommandOutput.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SystemCommandOutput.java
deleted file mode 100644
index 37e1d69..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/SystemCommandOutput.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl;
-
-import com.jcraft.jsch.Channel;
-import org.apache.airavata.gsi.ssh.api.CommandOutput;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 8/15/13
- * Time: 10:44 AM
- */
-
-public class SystemCommandOutput implements CommandOutput {
-
-    private static final Logger logger = LoggerFactory.getLogger(SystemCommandOutput.class);
-    public void onOutput(Channel channel) {
-        try {
-            InputStream inputStream = channel.getInputStream();
-
-            byte[] tmp = new byte[1024];
-            while (true) {
-                while (inputStream.available() > 0) {
-                    int i = inputStream.read(tmp, 0, 1024);
-                    if (i < 0) break;
-                    System.out.print(new String(tmp, 0, i));
-                }
-                if (channel.isClosed()) {
-                    System.out.println("exit-status: " + channel.getExitStatus());
-                    break;
-                }
-                try {
-                    Thread.sleep(1000);
-                } catch (Exception ignored) {
-                }
-            }
-
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-    }
-
-    public OutputStream getStandardError() {
-        return System.err;
-    }
-
-    public void exitCode(int code) {
-        System.out.println("Program exit code - " + code);
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
deleted file mode 100644
index 2679f57..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl.authentication;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 9/20/13
- * Time: 12:15 PM
- */
-
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPasswordAuthentication;
-import org.ietf.jgss.*;
-
-/**
- * An authenticator used for raw SSH sessions. Gives SSH user name, password
- * directly.
- * This is only an example implementation.
- */
-public class DefaultPasswordAuthenticationInfo implements SSHPasswordAuthentication {
-
-    private String password;
-
-    public DefaultPasswordAuthenticationInfo(String pwd) {
-        this.password = pwd;
-    }
-
-    public String getPassword(String userName, String hostName) {
-        return password;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
deleted file mode 100644
index cadee38..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl.authentication;
-
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPublicKeyAuthentication;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 11:44 AM
- */
-
-/**
- * Default public key authentication.
- * Note : This is only a sample implementation.
- */
-public class DefaultPublicKeyAuthentication implements SSHPublicKeyAuthentication {
-
-    private byte[] privateKey;
-    private byte[] publicKey;
-    private String passPhrase = null;
-
-    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub) {
-        this.privateKey = priv;
-        this.publicKey = pub;
-    }
-
-    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub, String pass) {
-        this.privateKey = priv;
-        this.publicKey = pub;
-        this.passPhrase = pass;
-    }
-
-    public String getPassPhrase() {
-        return passPhrase;
-    }
-
-    public void bannerMessage(String message) {
-        System.out.println(message);
-    }
-
-    public byte[] getPrivateKey(String userName, String hostName) {
-        return privateKey;
-    }
-
-    public byte[] getPublicKey(String userName, String hostName) {
-        return publicKey;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
deleted file mode 100644
index 495d8e1..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl.authentication;
-
-import org.apache.airavata.gsi.ssh.api.authentication.SSHPublicKeyFileAuthentication;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 11:40 AM
- */
-
-/**
- * Default public key authentication using files.
- * Note : This is only a sample implementation.
- */
-public class DefaultPublicKeyFileAuthentication implements SSHPublicKeyFileAuthentication {
-
-    private String publicKeyFile;
-    private String privateKeyFile;
-    private String passPhrase = null;
-
-    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile) {
-        this.publicKeyFile = pubFile;
-        this.privateKeyFile = privFile;
-
-    }
-
-    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile, String pass) {
-        this.publicKeyFile = pubFile;
-        this.privateKeyFile = privFile;
-        this.passPhrase = pass;
-
-    }
-
-    public String getPassPhrase() {
-        return passPhrase;
-    }
-
-    public void bannerMessage(String message) {
-        System.out.println(message);
-    }
-
-    public String getPublicKeyFile(String userName, String hostName) {
-        return publicKeyFile;
-    }
-
-    public String getPrivateKeyFile(String userName, String hostName) {
-        return privateKeyFile;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
deleted file mode 100644
index b95ae99..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *
- * 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.gsi.ssh.impl.authentication;
-
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.globus.myproxy.MyProxy;
-import org.globus.myproxy.MyProxyException;
-import org.ietf.jgss.GSSCredential;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 8/14/13
- * Time: 5:22 PM
- */
-
-public class MyProxyAuthenticationInfo extends GSIAuthenticationInfo {
-
-    public static final String X509_CERT_DIR = "X509_CERT_DIR";
-    private String userName;
-    private String password;
-    private String myProxyUrl;
-    private int myProxyPort;
-    private int lifeTime;
-
-    public MyProxyAuthenticationInfo(String userName, String password, String myProxyUrl, int myProxyPort,
-                                     int life, String certificatePath) {
-        this.userName = userName;
-        this.password = password;
-        this.myProxyUrl = myProxyUrl;
-        this.myProxyPort = myProxyPort;
-        this.lifeTime = life;
-        properties.setProperty(X509_CERT_DIR, certificatePath);
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getMyProxyUrl() {
-        return myProxyUrl;
-    }
-
-    public void setMyProxyUrl(String myProxyUrl) {
-        this.myProxyUrl = myProxyUrl;
-    }
-
-    public int getMyProxyPort() {
-        return myProxyPort;
-    }
-
-    public void setMyProxyPort(int myProxyPort) {
-        this.myProxyPort = myProxyPort;
-    }
-
-    public int getLifeTime() {
-        return lifeTime;
-    }
-
-    public void setLifeTime(int lifeTime) {
-        this.lifeTime = lifeTime;
-    }
-
-    public GSSCredential getCredentials() throws SecurityException {
-        return getMyProxyCredentials();
-    }
-
-    private GSSCredential getMyProxyCredentials() throws SecurityException {
-        MyProxy myproxy = new MyProxy(this.myProxyUrl, this.myProxyPort);
-        try {
-            return myproxy.get(this.getUserName(), this.password, this.lifeTime);
-        } catch (MyProxyException e) {
-            throw new SecurityException("Error getting proxy credentials", e);
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/jsch/ExtendedJSch.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/jsch/ExtendedJSch.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/jsch/ExtendedJSch.java
deleted file mode 100644
index 047580e..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/jsch/ExtendedJSch.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * 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.gsi.ssh.jsch;
-
-import com.jcraft.jsch.ExtendedSession;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 8/15/13
- * Time: 10:03 AM
- */
-
-/**
- * Extended JSch to incorporate authentication info.
- */
-public class ExtendedJSch extends JSch {
-
-    private GSIAuthenticationInfo authenticationInfo;
-
-    public ExtendedJSch() {
-        super();
-    }
-
-    public GSIAuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public void setAuthenticationInfo(GSIAuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-
-    public Session getSession(String username, String host, int port) throws JSchException {
-
-        if(host==null){
-            throw new JSchException("host must not be null.");
-        }
-        Session s = new ExtendedSession(this, username, host, port);
-        return s;
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/listener/JobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/listener/JobSubmissionListener.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/listener/JobSubmissionListener.java
deleted file mode 100644
index 426cf20..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/listener/JobSubmissionListener.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * 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.gsi.ssh.listener;
-
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-
-/**
- * This interface can be implemented by the end user of the API
- * to do desired operations based on the job status change. API has a
- * default joblistener which can be used by the end users, but its
- * configurable and can be parseSingleJob to jobsubmission methods.
- */
-public abstract class JobSubmissionListener {
-
-    private JobStatus jobStatus = JobStatus.U;
-
-    /**
-     * This can be usd to perform some operation during status change
-     *
-     * @param jobDescriptor
-     * @throws SSHApiException
-     */
-    public abstract void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException;
-
-    /**
-     * This can be usd to perform some operation during status change
-     * @param jobStatus
-     * @throws SSHApiException
-     */
-    public abstract void statusChanged(JobStatus jobStatus) throws SSHApiException;
-
-
-    public JobStatus getJobStatus() {
-        return jobStatus;
-    }
-
-    public void setJobStatus(JobStatus jobStatus) {
-        this.jobStatus = jobStatus;
-    }
-
-    /**
-     * This method is used to block the process until the currentStatus of the job is DONE or FAILED
-     */
-    public void waitFor()  throws SSHApiException{
-        while (!isJobDone()) {
-            synchronized (this) {
-                try {
-                    wait();
-                } catch (InterruptedException e) {}
-            }
-        }
-    }
-
-    /**
-     * BAsed on the implementation user can define how to decide the job done
-     * scenario
-     * @return
-     * @throws SSHApiException
-     */
-    public abstract boolean isJobDone() throws SSHApiException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
deleted file mode 100644
index c6cd5c8..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * 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.gsi.ssh.util;
-
-import org.apache.airavata.gsi.ssh.api.job.*;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-
-public class CommonUtils {
-    /**
-     * This returns true if the give job is finished
-     * otherwise false
-     *
-     * @param job
-     * @return
-     */
-    public static boolean isJobFinished(JobDescriptor job) {
-        if (JobStatus.C.toString().equals(job.getStatus())) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * This will read
-     *
-     * @param maxWalltime
-     * @return
-     */
-    public static String maxWallTimeCalculator(int maxWalltime) {
-        if (maxWalltime < 60) {
-            return "00:" + maxWalltime + ":00";
-        } else {
-            int minutes = maxWalltime % 60;
-            int hours = maxWalltime / 60;
-            return hours + ":" + minutes + ":00";
-        }
-    }
-    public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
-        if (maxWalltime < 60) {
-            return "00:" + maxWalltime;
-        } else {
-            int minutes = maxWalltime % 60;
-            int hours = maxWalltime / 60;
-            return hours + ":" + minutes;
-        }
-    }
-    public static JobManagerConfiguration getPBSJobManager(String installedPath) {
-        return new PBSJobConfiguration("PBSTemplate.xslt",".pbs", installedPath, new PBSOutputParser());
-    }
-
-    public static JobManagerConfiguration getSLURMJobManager(String installedPath) {
-        return new SlurmJobConfiguration("SLURMTemplate.xslt", ".slurm", installedPath, new SlurmOutputParser());
-    }
-
-     public static JobManagerConfiguration getUGEJobManager(String installedPath) {
-        return new UGEJobConfiguration("UGETemplate.xslt", ".pbs", installedPath, new UGEOutputParser());
-    }
-
-    public static JobManagerConfiguration getLSFJobManager(String installedPath) {
-        return new LSFJobConfiguration("LSFTemplate.xslt", ".lsf", installedPath, new LSFOutputParser());
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
deleted file mode 100644
index e3c0671..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * 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.gsi.ssh.util;
-
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 8:34 AM
- */
-
-/**
- * This is dummy class, the keyboard interactivity is not really used when acting as an API.
- * But to get things working we have this.
- */
-public class SSHAPIUIKeyboardInteractive implements UIKeyboardInteractive, UserInfo {
-
-    private String password;
-
-    public SSHAPIUIKeyboardInteractive(String pwd) {
-        this.password = pwd;
-    }
-
-    public String[] promptKeyboardInteractive(String destination, String name,
-                                              String instruction, String[] prompt, boolean[] echo) {
-        return null;
-    }
-
-    public String getPassphrase() {
-        return password;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public boolean promptPassword(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public boolean promptPassphrase(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public boolean promptYesNo(String message) {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public void showMessage(String message) {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHKeyPasswordHandler.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHKeyPasswordHandler.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHKeyPasswordHandler.java
deleted file mode 100644
index 0e1fc2a..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHKeyPasswordHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * 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.gsi.ssh.util;
-
-import com.jcraft.jsch.UserInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.SSHKeyAuthentication;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 2:22 PM
- */
-
-/**
- * This class is used to get the pass phrase to decrypt public/private keys.
- */
-public class SSHKeyPasswordHandler implements UserInfo {
-
-    private SSHKeyAuthentication keyAuthenticationHandler;
-
-    public SSHKeyPasswordHandler(SSHKeyAuthentication handler) {
-        this.keyAuthenticationHandler = handler;
-    }
-
-    public String getPassphrase() {
-        return keyAuthenticationHandler.getPassPhrase();
-    }
-
-    public String getPassword() {
-        throw new NotImplementedException();
-    }
-
-    public boolean promptPassword(String message) {
-        return false;
-    }
-
-    public boolean promptPassphrase(String message) {
-        return true;
-    }
-
-    public boolean promptYesNo(String message) {
-        return false;
-    }
-
-    public void showMessage(String message) {
-        keyAuthenticationHandler.bannerMessage(message);
-    }
-}


[51/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/LICENSE b/modules/distribution/xbaya-gui/src/main/resources/LICENSE
deleted file mode 100644
index 6c147f8..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2273 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-    Everyone is permitted to copy and distribute copies of this Agreement,
-    but in order to avoid inconsistency the Agreement is copyrighted and may
-    only be modified in the following manner. The Agreement Steward reserves
-    the right to publish new versions (including revisions) of this Agreement
-    from time to time. No one other than the Agreement Steward has the right
-    to modify this Agreement. The Eclipse Foundation is the initial Agreement
-    Steward. The Eclipse Foundation may assign the responsibility to serve as
-    the Agreement Steward to a suitable separate entity. Each new version of
-    the Agreement will be given a distinguishing version number. The Program
-    (including Contributions) may always be distributed subject to the version
-    of the Agreement under which it was received. In addition, after a new
-    version of the Agreement is published, Contributor may elect to distribute
-    the Program (including its Contributions) under the new version. Except as
-    expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-    rights or licenses to the intellectual property of any Contributor under
-    this Agreement, whether expressly, by implication, estoppel or otherwise.
-    All rights in the Program not expressly granted under this Agreement
-    are reserved.
-
-    This Agreement is governed by the

<TRUNCATED>

[05/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
new file mode 100644
index 0000000..c7d6279
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -0,0 +1,767 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URL;
+import java.security.SecureRandom;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.SSHKeyAuthentication;
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPasswordAuthentication;
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPublicKeyAuthentication;
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.apache.airavata.gfac.ssh.api.job.OutputParser;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
+import org.apache.airavata.gfac.ssh.util.SSHUtils;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.GSISSHIdentityFile;
+import com.jcraft.jsch.GSISSHIdentityRepository;
+import com.jcraft.jsch.Identity;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+
+public class GSISSHAbstractCluster implements Cluster {
+
+    private static final Logger log = LoggerFactory.getLogger(GSISSHAbstractCluster.class);
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+    public static final String SSH_SESSION_TIMEOUT = "ssh.session.timeout";
+
+    public JobManagerConfiguration jobManagerConfiguration;
+
+    private ServerInfo serverInfo;
+
+    private AuthenticationInfo authenticationInfo;
+
+    private Session session;
+
+    private ConfigReader configReader;
+	
+    private JSch defaultJSch;
+
+    private static Identity identityFile = null;
+
+    public GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
+        this(serverInfo, authenticationInfo);
+        this.jobManagerConfiguration = config;
+    }
+
+    public  GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
+
+        reconnect(serverInfo, authenticationInfo);
+    }
+
+    public GSISSHAbstractCluster(JobManagerConfiguration config) {
+        this.jobManagerConfiguration = config;
+    }
+    private synchronized void reconnect(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
+        this.serverInfo = serverInfo;
+
+        this.authenticationInfo = authenticationInfo;
+
+        if (authenticationInfo instanceof GSIAuthenticationInfo) {
+            JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+            JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo) authenticationInfo).getProperties().
+                    get("X509_CERT_DIR"));
+        }
+
+
+        try {
+            this.configReader = new ConfigReader();
+        } catch (IOException e) {
+            throw new SSHApiException("Unable to load system configurations.", e);
+        }
+        try {
+        	 if(defaultJSch == null){
+             	defaultJSch = createJSch(authenticationInfo);
+             }
+     	        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                     + serverInfo.getUserName());
+
+        	session = createSession(defaultJSch,serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        	}
+        	catch (Exception e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        //=============================================================
+        // Handling vanilla SSH pieces
+        //=============================================================
+        if (authenticationInfo instanceof SSHPasswordAuthentication) {
+            String password = ((SSHPasswordAuthentication) authenticationInfo).
+                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
+
+            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
+
+            // TODO figure out why we need to set password to session
+            session.setPassword(password);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
+
+            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
+                    = (SSHPublicKeyFileAuthentication) authenticationInfo;
+            String privateKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The private key file for vanilla SSH " + privateKeyFile);
+
+            String publicKeyFile = sshPublicKeyFileAuthentication.
+                    getPublicKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The public key file for vanilla SSH " + publicKeyFile);
+
+            try {
+                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, defaultJSch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using files. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
+                        publicKeyFile, e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
+
+            SSHPublicKeyAuthentication sshPublicKeyAuthentication
+                    = (SSHPublicKeyAuthentication) authenticationInfo;
+            try {
+                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
+                identityFile = GSISSHIdentityFile.newInstance(name,
+                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
+                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), defaultJSch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName(), e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        }
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            if (authenticationInfo instanceof GSIAuthenticationInfo) {
+                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo) authenticationInfo);
+            }
+        }
+
+        try {
+            session.connect(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
+        } catch (Exception e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+    }
+
+    public synchronized JobDescriptor cancelJob(String jobID) throws SSHApiException {
+        JobStatus jobStatus = getJobStatus(jobID);
+        if (jobStatus == null || jobStatus == JobStatus.U) {
+            log.info("Validation before cancel is failed, couldn't found job in remote host to cancel. Job may be already completed|failed|canceled");
+            return null;
+        }
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getCancelCommand(jobID);
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String outputifAvailable = getOutputifAvailable(stdOutReader, "Error reading output of job submission", jobManagerConfiguration.getBaseCancelCommand());
+        // this might not be the case for all teh resources, if so Cluster implementation can override this method
+        // because here after cancelling we try to get the job description and return it back
+        try {
+            return this.getJobDescriptorById(jobID);
+        } catch (Exception e) {
+            //its ok to fail to get status when the job is gone
+            return null;
+        }
+    }
+
+    public synchronized String submitBatchJobWithScript(String scriptPath, String workingDirectory) throws SSHApiException {
+        this.scpTo(workingDirectory, scriptPath);
+
+        // since this is a constant we do not ask users to fill this
+
+//        RawCommandInfo rawCommandInfo = new RawCommandInfo(this.installedPath + this.jobManagerConfiguration.getSubmitCommand() + " " +
+//                workingDirectory + File.separator + FilenameUtils.getName(scriptPath));
+
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getSubmitCommand(workingDirectory,scriptPath);
+        StandardOutReader standardOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.session, standardOutReader);
+
+        //Check whether pbs submission is successful or not, if it failed throw and exception in submitJob method
+        // with the error thrown in qsub command
+        //
+        String outputifAvailable = getOutputifAvailable(standardOutReader,"Error reading output of job submission",jobManagerConfiguration.getBaseSubmitCommand());
+        OutputParser outputParser = jobManagerConfiguration.getParser();
+        return  outputParser.parseJobSubmission(outputifAvailable);
+    }
+
+    public synchronized String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException {
+        TransformerFactory factory = TransformerFactory.newInstance();
+        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
+
+        if (resource == null) {
+            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
+                    + "' not found in the classpath";
+            throw new SSHApiException(error);
+        }
+
+        Source xslt = new StreamSource(new File(resource.getPath()));
+        Transformer transformer;
+        StringWriter results = new StringWriter();
+        File tempPBSFile = null;
+        try {
+            // generate the pbs script using xslt
+            transformer = factory.newTransformer(xslt);
+            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
+            transformer.transform(text, new StreamResult(results));
+            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
+            if (scriptContent.startsWith("\n")) {
+                scriptContent = scriptContent.substring(1);
+            }
+//            log.debug("generated PBS:" + results.toString());
+
+            // creating a temporary file using pbs script generated above
+            int number = new SecureRandom().nextInt();
+            number = (number < 0 ? -number : number);
+
+            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
+            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
+
+            //reusing submitBatchJobWithScript method to submit a job
+            String jobID = null;
+            int retry = 3;
+            while(retry>0) {
+                try {
+                    jobID = this.submitBatchJobWithScript(tempPBSFile.getAbsolutePath(),
+                            jobDescriptor.getWorkingDirectory());
+                    retry=0;
+                } catch (SSHApiException e) {
+                    retry--;
+                    if(retry==0) {
+                        throw e;
+                    }else{
+                        try {
+                            Thread.sleep(5000);
+                        } catch (InterruptedException e1) {
+                            log.error(e1.getMessage(), e1);
+                        }
+                        log.error("Error occured during job submission but doing a retry");
+                    }
+                }
+            }
+            log.debug("Job has successfully submitted, JobID : " + jobID);
+            if (jobID != null) {
+                return jobID.replace("\n", "");
+            } else {
+                return null;
+            }
+            } catch (TransformerConfigurationException e) {
+            throw new SSHApiException("Error parsing PBS transformation", e);
+        } catch (TransformerException e) {
+            throw new SSHApiException("Error generating PBS script", e);
+        } catch (IOException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        } finally {
+            if (tempPBSFile != null) {
+                tempPBSFile.delete();
+            }
+        }
+    }
+
+
+    public void generateJobScript(JobDescriptor jobDescriptor) throws SSHApiException {
+        TransformerFactory factory = TransformerFactory.newInstance();
+        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
+
+        if (resource == null) {
+            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
+                    + "' not found in the classpath";
+            throw new SSHApiException(error);
+        }
+
+        Source xslt = new StreamSource(new File(resource.getPath()));
+        Transformer transformer;
+        StringWriter results = new StringWriter();
+        File tempPBSFile = null;
+        try {
+            // generate the pbs script using xslt
+            transformer = factory.newTransformer(xslt);
+            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
+            transformer.transform(text, new StreamResult(results));
+            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
+            if (scriptContent.startsWith("\n")) {
+                scriptContent = scriptContent.substring(1);
+            }
+//            log.debug("generated PBS:" + results.toString());
+
+            // creating a temporary file using pbs script generated above
+            int number = new SecureRandom().nextInt();
+            number = (number < 0 ? -number : number);
+
+            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
+            log.info("File Path: " + tempPBSFile.getAbsolutePath());
+            log.info("File Content: " + scriptContent);
+            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
+        } catch (TransformerConfigurationException e) {
+            throw new SSHApiException("Error parsing PBS transformation", e);
+        } catch (TransformerException e) {
+            throw new SSHApiException("Error generating PBS script", e);
+        } catch (IOException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        } finally {
+            if (tempPBSFile != null) {
+                tempPBSFile.delete();
+            }
+        }
+    }
+
+
+
+    public synchronized JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",jobManagerConfiguration.getBaseMonitorCommand());
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobManagerConfiguration.getParser().parseSingleJob(jobDescriptor, result);
+        return jobDescriptor;
+    }
+
+    public synchronized JobStatus getJobStatus(String jobID) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
+        return jobManagerConfiguration.getParser().parseJobStatus(jobID, result);
+    }
+
+    @Override
+    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getJobIdMonitorCommand(jobName, userName);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",
+                jobManagerConfiguration.getJobIdMonitorCommand(jobName,userName).getCommand());
+        return jobManagerConfiguration.getParser().parseJobId(jobName, result);
+    }
+
+    private static void logDebug(String message) {
+        if (log.isDebugEnabled()) {
+            log.debug(message);
+        }
+    }
+
+    public JobManagerConfiguration getJobManagerConfiguration() {
+        return jobManagerConfiguration;
+    }
+
+    public void setJobManagerConfiguration(JobManagerConfiguration jobManagerConfiguration) {
+        this.jobManagerConfiguration = jobManagerConfiguration;
+    }
+
+    public synchronized void scpTo(String remoteFile, String localFile) throws SSHApiException {
+        int retry = 3;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Transfering file:/" + localFile + " To:" + serverInfo.getHost() + ":" + remoteFile);
+                SSHUtils.scpTo(remoteFile, localFile, session);
+                retry = 0;
+            } catch (IOException e) {
+                retry--;
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
+                }
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
+                }
+            }
+        }
+    }
+
+    public synchronized void scpFrom(String remoteFile, String localFile) throws SSHApiException {
+        int retry = 3;
+        while(retry>0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Transfering from:" + serverInfo.getHost() + ":" + remoteFile + " To:" + "file:/" + localFile);
+                SSHUtils.scpFrom(remoteFile, localFile, session);
+                retry=0;
+            } catch (IOException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }else{
+                    log.error("Error performing scp but doing a retry");
+                }
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if(retry==0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }else{
+                    log.error("Error performing scp but doing a retry");
+                }
+            }
+        }
+    }
+    
+    public synchronized void scpThirdParty(String remoteFileSource, String remoteFileTarget) throws SSHApiException {
+        try {
+            if(!session.isConnected()){
+                session.connect();
+            }
+            log.info("Transfering from:" + remoteFileSource + " To: " + remoteFileTarget);
+            SSHUtils.scpThirdParty(remoteFileSource, remoteFileTarget, session);
+        } catch (IOException e) {
+            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
+                    +remoteFileTarget , e);
+        } catch (JSchException e) {
+            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
+                    +remoteFileTarget, e);
+        }
+    }
+
+    public synchronized void makeDirectory(String directoryPath) throws SSHApiException {
+        int retry = 3;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Creating directory: " + serverInfo.getHost() + ":" + directoryPath);
+                SSHUtils.makeDirectory(directoryPath, session);
+                retry = 0;
+            } catch (IOException e) {
+                throw new SSHApiException("Failed during creating directory:" + directoryPath + " to remote file "
+                        + serverInfo.getHost() + ":rFile", e);
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            } catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            }
+        }
+    }
+
+    public synchronized List<String> listDirectory(String directoryPath) throws SSHApiException {
+        int retry = 3;
+        List<String> files = null;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Listing directory: " + serverInfo.getHost() + ":" + directoryPath);
+                files = SSHUtils.listDirectory(directoryPath, session);
+                retry=0;
+            } catch (IOException e) {
+                log.error(e.getMessage(), e);
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory:" + directoryPath + " to remote file ", e);
+                }
+            } catch (JSchException e) {
+                retry--;
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file ", e);
+                }
+            }catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            }
+        }
+        return files;
+    }
+
+    public synchronized void getJobStatuses(String userName, Map<String,JobStatus> jobIDs)throws SSHApiException {
+        int retry = 3;
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getUserBasedMonitorCommand(userName);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        while (retry > 0){
+            try {
+                log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+                CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+                retry=0;
+            } catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed Getting statuses  to remote file", e);
+                }
+            }
+        }
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
+        jobManagerConfiguration.getParser().parseJobStatuses(userName, jobIDs, result);
+    }
+
+    public ServerInfo getServerInfo() {
+        return serverInfo;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    /**
+     * This gaurantee to return a valid session
+     *
+     * @return
+     */
+    public Session getSession() {
+        return this.session;
+    }
+
+    /**
+     * This method will read standard output and if there's any it will be parsed
+     *
+     * @param jobIDReaderCommandOutput
+     * @param errorMsg
+     * @return
+     * @throws SSHApiException
+     */
+    private String getOutputifAvailable(StandardOutReader jobIDReaderCommandOutput, String errorMsg, String command) throws SSHApiException {
+        String stdOutputString = jobIDReaderCommandOutput.getStdOutputString();
+        String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
+        log.info("StandardOutput Returned:" + stdOutputString);
+        log.info("StandardError  Returned:" +stdErrorString);
+        String[] list = command.split(File.separator);
+        command = list[list.length - 1];
+        // We are checking for stderr containing the command issued. Thus ignores the verbose logs in stderr.
+        if (stdErrorString != null && stdErrorString.contains(command.trim()) && !stdErrorString.contains("Warning")) {
+            log.error("Standard Error output : " + stdErrorString);
+            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
+        }else if(stdOutputString.contains("error")){
+            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
+        }
+        return stdOutputString;
+    }
+
+    public void disconnect() throws SSHApiException {
+    	if(getSession().isConnected()){
+    		getSession().disconnect();
+    	}
+    }
+    /**
+	
+	 *            the file system abstraction which will be necessary to
+	 *            perform certain file system operations.
+	 * @return the new default JSch implementation.
+	 * @throws JSchException
+	 *             known host keys cannot be loaded.
+	 */
+	protected JSch createJSch(AuthenticationInfo authenticationInfo) throws JSchException {
+//		final File fs = new File(System.getProperty("user.home"));
+		if(authenticationInfo instanceof GSIAuthenticationInfo){
+			final JSch jsch = new ExtendedJSch();
+//			knownHosts(jsch, fs);
+			return jsch;
+		}else{
+		final JSch jsch = new JSch();
+//		knownHosts(jsch, fs);
+		return jsch;
+		}
+		
+	}
+	/**
+	 * Create a new remote session for the requested address.
+	 *
+	 * @param user
+	 *            login to authenticate as.
+	 * @param host
+	 *            server name to connect to.
+	 * @param port
+	 *            port number of the SSH daemon (typically 22).
+	 * @return new session instance, but otherwise unconfigured.
+	 * @throws JSchException
+	 *             the session could not be created.
+	 */
+	private Session createSession(JSch jsch, String user, String host, int port) throws JSchException {
+		final Session session = jsch.getSession(user, host, port);
+		// We retry already in getSession() method. JSch must not retry
+		// on its own.
+		session.setConfig("MaxAuthTries", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+		session.setTimeout(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
+	    java.util.Properties config = this.configReader.getProperties();
+	    session.setConfig(config);
+	    
+    	return session;
+	}
+	private static void knownHosts(final JSch sch,final File home) throws JSchException {
+		if (home == null)
+			return;
+		final File known_hosts = new File(new File(home, ".ssh"), "known_hosts"); //$NON-NLS-1$ //$NON-NLS-2$
+		try {
+			final FileInputStream in = new FileInputStream(known_hosts);
+			try {
+				sch.setKnownHosts(in);
+			} finally {
+				in.close();
+			}
+		} catch (FileNotFoundException none) {
+			// Oh well. They don't have a known hosts in home.
+		} catch (IOException err) {
+			// Oh well. They don't have a known hosts in home.
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
new file mode 100644
index 0000000..648d955
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
@@ -0,0 +1,110 @@
+ /*
+ *
+ * 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.ssh.impl;
+
+ /**
+  * This will contains all the PBS specific job statuses.
+  * C -  Job is completed after having run/
+  * E -  Job is exiting after having run.
+  * H -  Job is held.
+  * Q -  job is queued, eligible to run or routed.
+  * R -  job is running.
+  * T -  job is being moved to new location.
+  * W -  job is waiting for its execution time
+  * (-a option) to be reached.
+  * S -  (Unicos only) job is suspend.
+  */
+ public enum JobStatus {
+     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
+
+     public static JobStatus fromString(String status){
+        if(status != null){
+            if("C".equals(status)){
+                return JobStatus.C;
+            }else if("E".equals(status)){
+                return JobStatus.E;
+            }else if("H".equals(status)){
+                return JobStatus.H;
+            }else if("Q".equals(status)){
+                return JobStatus.Q;
+            }else if("R".equals(status)){
+                return JobStatus.R;
+            }else if("T".equals(status)){
+                return JobStatus.T;
+            }else if("W".equals(status)){
+                return JobStatus.W;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("F".equals(status)){
+                return JobStatus.F;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("CA".equals(status)){
+                return JobStatus.CA;
+            }else if("CF".equals(status)){
+                return JobStatus.CF;
+            }else if("CD".equals(status)){
+                return JobStatus.CD;
+            }else if("CG".equals(status)){
+                return JobStatus.CG;
+            }else if("NF".equals(status)){
+                return JobStatus.NF;
+            }else if("PD".equals(status)){
+                return JobStatus.PD;
+            }else if("PR".equals(status)){
+                return JobStatus.PR;
+            }else if("TO".equals(status)){
+                return JobStatus.TO;
+            }else if("U".equals(status)){
+                return JobStatus.U;
+            }else if("qw".equals(status)){
+                return JobStatus.qw;
+            }else if("t".equals(status)){
+                return JobStatus.t;
+            }else if("r".equals(status)){
+                return JobStatus.r;
+            }else if("h".equals(status)){
+                return JobStatus.h;
+            }else if("Er".equals(status)){
+                return JobStatus.Er;
+            }else if("Eqw".equals(status)){
+                return JobStatus.Er;
+            }else if("RUN".equals(status)){      // LSF starts here
+                return JobStatus.RUN;
+            }else if("PEND".equals(status)){
+                return JobStatus.PEND;
+            }else if("DONE".equals(status)){
+                return JobStatus.DONE;
+            }else if("PSUSP".equals(status)){
+                return JobStatus.PSUSP;
+            }else if("USUSP".equals(status)){
+                return JobStatus.USUSP;
+            }else if("SSUSP".equals(status)){
+                return JobStatus.SSUSP;
+            }else if("EXIT".equals(status)){
+                return JobStatus.EXIT;
+            }else if("ZOMBI".equals(status)){
+                return JobStatus.ZOMBI;
+            }
+        }
+         return JobStatus.U;
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
new file mode 100644
index 0000000..def84d5
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.api.authentication.*;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This is the default implementation of a cluster.
+ * this has most of the methods to be used by the end user of the
+ * library.
+ */
+public class PBSCluster extends GSISSHAbstractCluster {
+    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
+
+
+    public PBSCluster(JobManagerConfiguration jobManagerConfiguration) {
+        super(jobManagerConfiguration);
+    }
+    public PBSCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
+        super(serverInfo, authenticationInfo,config);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
new file mode 100644
index 0000000..9ac2ba0
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.CommandInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:18 PM
+ */
+
+/**
+ * The raw command information. String returned by getCommand is directly executed in SSH
+ * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
+ */
+public class RawCommandInfo implements CommandInfo {
+
+    private String rawCommand;
+
+    public RawCommandInfo(String cmd) {
+        this.rawCommand = cmd;
+    }
+
+    public String getCommand() {
+        return this.rawCommand;
+    }
+
+    public String getRawCommand() {
+        return rawCommand;
+    }
+
+    public void setRawCommand(String rawCommand) {
+        this.rawCommand = rawCommand;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
new file mode 100644
index 0000000..e878dff
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 9/20/13
+ * Time: 2:31 PM
+ */
+
+public class SSHUserInfo implements UserInfo {
+
+    private String password;
+
+    public SSHUserInfo(String pwd) {
+        this.password = pwd;
+    }
+
+    public String getPassphrase() {
+        return this.password;
+    }
+
+    public String getPassword() {
+        return this.password;
+    }
+
+    public boolean promptPassword(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptPassphrase(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void showMessage(String message) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
new file mode 100644
index 0000000..265a57d
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.Channel;
+
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class StandardOutReader implements CommandOutput {
+
+    private static final Logger logger = LoggerFactory.getLogger(StandardOutReader.class);
+    String stdOutputString = null;
+    ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
+    public void onOutput(Channel channel) {
+        try {
+            StringBuffer pbsOutput = new StringBuffer("");
+            InputStream inputStream =  channel.getInputStream();
+            byte[] tmp = new byte[1024];
+            do {
+                while (inputStream.available() > 0) {
+                    int i = inputStream.read(tmp, 0, 1024);
+                    if (i < 0) break;
+                    pbsOutput.append(new String(tmp, 0, i));
+                }
+            } while (!channel.isClosed()) ;
+            String output = pbsOutput.toString();
+            this.setStdOutputString(output);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+
+    }
+
+
+    public void exitCode(int code) {
+        System.out.println("Program exit code - " + code);
+    }
+
+    public String getStdOutputString() {
+        return stdOutputString;
+    }
+
+    public void setStdOutputString(String stdOutputString) {
+        this.stdOutputString = stdOutputString;
+    }
+
+    public String getStdErrorString() {
+        return errorStream.toString();
+    }
+
+    public OutputStream getStandardError() {
+        return errorStream;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
new file mode 100644
index 0000000..24d218b
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.Channel;
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/15/13
+ * Time: 10:44 AM
+ */
+
+public class SystemCommandOutput implements CommandOutput {
+
+    private static final Logger logger = LoggerFactory.getLogger(SystemCommandOutput.class);
+    public void onOutput(Channel channel) {
+        try {
+            InputStream inputStream = channel.getInputStream();
+
+            byte[] tmp = new byte[1024];
+            while (true) {
+                while (inputStream.available() > 0) {
+                    int i = inputStream.read(tmp, 0, 1024);
+                    if (i < 0) break;
+                    System.out.print(new String(tmp, 0, i));
+                }
+                if (channel.isClosed()) {
+                    System.out.println("exit-status: " + channel.getExitStatus());
+                    break;
+                }
+                try {
+                    Thread.sleep(1000);
+                } catch (Exception ignored) {
+                }
+            }
+
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+
+    }
+
+    public OutputStream getStandardError() {
+        return System.err;
+    }
+
+    public void exitCode(int code) {
+        System.out.println("Program exit code - " + code);
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
new file mode 100644
index 0000000..8e76528
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 9/20/13
+ * Time: 12:15 PM
+ */
+
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPasswordAuthentication;
+
+/**
+ * An authenticator used for raw SSH sessions. Gives SSH user name, password
+ * directly.
+ * This is only an example implementation.
+ */
+public class DefaultPasswordAuthenticationInfo implements SSHPasswordAuthentication {
+
+    private String password;
+
+    public DefaultPasswordAuthenticationInfo(String pwd) {
+        this.password = pwd;
+    }
+
+    public String getPassword(String userName, String hostName) {
+        return password;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
new file mode 100644
index 0000000..be8e1f9
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPublicKeyAuthentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:44 AM
+ */
+
+/**
+ * Default public key authentication.
+ * Note : This is only a sample implementation.
+ */
+public class DefaultPublicKeyAuthentication implements SSHPublicKeyAuthentication {
+
+    private byte[] privateKey;
+    private byte[] publicKey;
+    private String passPhrase = null;
+
+    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub) {
+        this.privateKey = priv;
+        this.publicKey = pub;
+    }
+
+    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub, String pass) {
+        this.privateKey = priv;
+        this.publicKey = pub;
+        this.passPhrase = pass;
+    }
+
+    public String getPassPhrase() {
+        return passPhrase;
+    }
+
+    public void bannerMessage(String message) {
+        System.out.println(message);
+    }
+
+    public byte[] getPrivateKey(String userName, String hostName) {
+        return privateKey;
+    }
+
+    public byte[] getPublicKey(String userName, String hostName) {
+        return publicKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
new file mode 100644
index 0000000..5351dd2
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.ssh.api.authentication.SSHPublicKeyFileAuthentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:40 AM
+ */
+
+/**
+ * Default public key authentication using files.
+ * Note : This is only a sample implementation.
+ */
+public class DefaultPublicKeyFileAuthentication implements SSHPublicKeyFileAuthentication {
+
+    private String publicKeyFile;
+    private String privateKeyFile;
+    private String passPhrase = null;
+
+    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile) {
+        this.publicKeyFile = pubFile;
+        this.privateKeyFile = privFile;
+
+    }
+
+    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile, String pass) {
+        this.publicKeyFile = pubFile;
+        this.privateKeyFile = privFile;
+        this.passPhrase = pass;
+
+    }
+
+    public String getPassPhrase() {
+        return passPhrase;
+    }
+
+    public void bannerMessage(String message) {
+        System.out.println(message);
+    }
+
+    public String getPublicKeyFile(String userName, String hostName) {
+        return publicKeyFile;
+    }
+
+    public String getPrivateKeyFile(String userName, String hostName) {
+        return privateKeyFile;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
new file mode 100644
index 0000000..5e47a86
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
@@ -0,0 +1,108 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+import org.ietf.jgss.GSSCredential;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:22 PM
+ */
+
+public class MyProxyAuthenticationInfo extends GSIAuthenticationInfo {
+
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+    private String userName;
+    private String password;
+    private String myProxyUrl;
+    private int myProxyPort;
+    private int lifeTime;
+
+    public MyProxyAuthenticationInfo(String userName, String password, String myProxyUrl, int myProxyPort,
+                                     int life, String certificatePath) {
+        this.userName = userName;
+        this.password = password;
+        this.myProxyUrl = myProxyUrl;
+        this.myProxyPort = myProxyPort;
+        this.lifeTime = life;
+        properties.setProperty(X509_CERT_DIR, certificatePath);
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getMyProxyUrl() {
+        return myProxyUrl;
+    }
+
+    public void setMyProxyUrl(String myProxyUrl) {
+        this.myProxyUrl = myProxyUrl;
+    }
+
+    public int getMyProxyPort() {
+        return myProxyPort;
+    }
+
+    public void setMyProxyPort(int myProxyPort) {
+        this.myProxyPort = myProxyPort;
+    }
+
+    public int getLifeTime() {
+        return lifeTime;
+    }
+
+    public void setLifeTime(int lifeTime) {
+        this.lifeTime = lifeTime;
+    }
+
+    public GSSCredential getCredentials() throws SecurityException {
+        return getMyProxyCredentials();
+    }
+
+    private GSSCredential getMyProxyCredentials() throws SecurityException {
+        MyProxy myproxy = new MyProxy(this.myProxyUrl, this.myProxyPort);
+        try {
+            return myproxy.get(this.getUserName(), this.password, this.lifeTime);
+        } catch (MyProxyException e) {
+            throw new SecurityException("Error getting proxy credentials", e);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
new file mode 100644
index 0000000..cee852f
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.ssh.jsch;
+
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/15/13
+ * Time: 10:03 AM
+ */
+
+/**
+ * Extended JSch to incorporate authentication info.
+ */
+public class ExtendedJSch extends JSch {
+
+    private GSIAuthenticationInfo authenticationInfo;
+
+    public ExtendedJSch() {
+        super();
+    }
+
+    public GSIAuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(GSIAuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+
+    public Session getSession(String username, String host, int port) throws JSchException {
+
+        if(host==null){
+            throw new JSchException("host must not be null.");
+        }
+        Session s = new ExtendedSession(this, username, host, port);
+        return s;
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
new file mode 100644
index 0000000..21aa1e3
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.ssh.listener;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+/**
+ * This interface can be implemented by the end user of the API
+ * to do desired operations based on the job status change. API has a
+ * default joblistener which can be used by the end users, but its
+ * configurable and can be parseSingleJob to jobsubmission methods.
+ */
+public abstract class JobSubmissionListener {
+
+    private JobStatus jobStatus = JobStatus.U;
+
+    /**
+     * This can be usd to perform some operation during status change
+     *
+     * @param jobDescriptor
+     * @throws SSHApiException
+     */
+    public abstract void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException;
+
+    /**
+     * This can be usd to perform some operation during status change
+     * @param jobStatus
+     * @throws SSHApiException
+     */
+    public abstract void statusChanged(JobStatus jobStatus) throws SSHApiException;
+
+
+    public JobStatus getJobStatus() {
+        return jobStatus;
+    }
+
+    public void setJobStatus(JobStatus jobStatus) {
+        this.jobStatus = jobStatus;
+    }
+
+    /**
+     * This method is used to block the process until the currentStatus of the job is DONE or FAILED
+     */
+    public void waitFor()  throws SSHApiException{
+        while (!isJobDone()) {
+            synchronized (this) {
+                try {
+                    wait();
+                } catch (InterruptedException e) {}
+            }
+        }
+    }
+
+    /**
+     * BAsed on the implementation user can define how to decide the job done
+     * scenario
+     * @return
+     * @throws SSHApiException
+     */
+    public abstract boolean isJobDone() throws SSHApiException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
new file mode 100644
index 0000000..6ff4fa6
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.ssh.util;
+
+import org.apache.airavata.gfac.ssh.api.job.*;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+public class CommonUtils {
+    /**
+     * This returns true if the give job is finished
+     * otherwise false
+     *
+     * @param job
+     * @return
+     */
+    public static boolean isJobFinished(JobDescriptor job) {
+        if (JobStatus.C.toString().equals(job.getStatus())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * This will read
+     *
+     * @param maxWalltime
+     * @return
+     */
+    public static String maxWallTimeCalculator(int maxWalltime) {
+        if (maxWalltime < 60) {
+            return "00:" + maxWalltime + ":00";
+        } else {
+            int minutes = maxWalltime % 60;
+            int hours = maxWalltime / 60;
+            return hours + ":" + minutes + ":00";
+        }
+    }
+    public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
+        if (maxWalltime < 60) {
+            return "00:" + maxWalltime;
+        } else {
+            int minutes = maxWalltime % 60;
+            int hours = maxWalltime / 60;
+            return hours + ":" + minutes;
+        }
+    }
+    public static JobManagerConfiguration getPBSJobManager(String installedPath) {
+        return new PBSJobConfiguration("PBSTemplate.xslt",".pbs", installedPath, new PBSOutputParser());
+    }
+
+    public static JobManagerConfiguration getSLURMJobManager(String installedPath) {
+        return new SlurmJobConfiguration("SLURMTemplate.xslt", ".slurm", installedPath, new SlurmOutputParser());
+    }
+
+     public static JobManagerConfiguration getUGEJobManager(String installedPath) {
+        return new UGEJobConfiguration("UGETemplate.xslt", ".pbs", installedPath, new UGEOutputParser());
+    }
+
+    public static JobManagerConfiguration getLSFJobManager(String installedPath) {
+        return new LSFJobConfiguration("LSFTemplate.xslt", ".lsf", installedPath, new LSFOutputParser());
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
new file mode 100644
index 0000000..bd700e9
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.UIKeyboardInteractive;
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 8:34 AM
+ */
+
+/**
+ * This is dummy class, the keyboard interactivity is not really used when acting as an API.
+ * But to get things working we have this.
+ */
+public class SSHAPIUIKeyboardInteractive implements UIKeyboardInteractive, UserInfo {
+
+    private String password;
+
+    public SSHAPIUIKeyboardInteractive(String pwd) {
+        this.password = pwd;
+    }
+
+    public String[] promptKeyboardInteractive(String destination, String name,
+                                              String instruction, String[] prompt, boolean[] echo) {
+        return null;
+    }
+
+    public String getPassphrase() {
+        return password;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public boolean promptPassword(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptPassphrase(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void showMessage(String message) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
new file mode 100644
index 0000000..569cd3c
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.UserInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.SSHKeyAuthentication;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 2:22 PM
+ */
+
+/**
+ * This class is used to get the pass phrase to decrypt public/private keys.
+ */
+public class SSHKeyPasswordHandler implements UserInfo {
+
+    private SSHKeyAuthentication keyAuthenticationHandler;
+
+    public SSHKeyPasswordHandler(SSHKeyAuthentication handler) {
+        this.keyAuthenticationHandler = handler;
+    }
+
+    public String getPassphrase() {
+        return keyAuthenticationHandler.getPassPhrase();
+    }
+
+    public String getPassword() {
+        throw new NotImplementedException();
+    }
+
+    public boolean promptPassword(String message) {
+        return false;
+    }
+
+    public boolean promptPassphrase(String message) {
+        return true;
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;
+    }
+
+    public void showMessage(String message) {
+        keyAuthenticationHandler.bannerMessage(message);
+    }
+}


[34/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
new file mode 100644
index 0000000..eb8ddf7
--- /dev/null
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -0,0 +1,2867 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.gfac.cpi;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class GfacService {
+
+  public interface Iface {
+
+    /**
+     * Query gfac server to fetch the CPI version
+     */
+    public String getGFACServiceVersion() throws org.apache.thrift.TException;
+
+    /**
+     *  * After creating the experiment Data and Task Data in the orchestrator
+     *  * Orchestrator has to invoke this operation for each Task per experiment to run
+     *  * the actual Job related actions.
+     *  *
+     *  * @param experimentID
+     *  * @param taskID
+     *  * @param gatewayId:
+     *  *  The GatewayId is inferred from security context and passed onto gfac.
+     *  * @return sucess/failure
+     *  *
+     * *
+     * 
+     * @param experimentId
+     * @param taskId
+     * @param gatewayId
+     */
+    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException;
+
+    /**
+     *  *
+     *  * Terminate the running job.At this point user
+     *  * does not have to know the job ID so in the argument
+     *  * we do not make it to required jobID to provide.
+     *  *
+     *  *
+     *  * @param experimentID
+     *  * @param taskID
+     *  * @return sucess/failure
+     *  *
+     * *
+     * 
+     * @param experimentId
+     * @param taskId
+     */
+    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public String getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      send_getGFACServiceVersion();
+      return recv_getGFACServiceVersion();
+    }
+
+    public void send_getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      getGFACServiceVersion_args args = new getGFACServiceVersion_args();
+      sendBase("getGFACServiceVersion", args);
+    }
+
+    public String recv_getGFACServiceVersion() throws org.apache.thrift.TException
+    {
+      getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+      receiveBase(result, "getGFACServiceVersion");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
+    }
+
+    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
+    {
+      send_submitJob(experimentId, taskId, gatewayId);
+      return recv_submitJob();
+    }
+
+    public void send_submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
+    {
+      submitJob_args args = new submitJob_args();
+      args.setExperimentId(experimentId);
+      args.setTaskId(taskId);
+      args.setGatewayId(gatewayId);
+      sendBase("submitJob", args);
+    }
+
+    public boolean recv_submitJob() throws org.apache.thrift.TException
+    {
+      submitJob_result result = new submitJob_result();
+      receiveBase(result, "submitJob");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
+    }
+
+    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
+    {
+      send_cancelJob(experimentId, taskId);
+      return recv_cancelJob();
+    }
+
+    public void send_cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
+    {
+      cancelJob_args args = new cancelJob_args();
+      args.setExperimentId(experimentId);
+      args.setTaskId(taskId);
+      sendBase("cancelJob", args);
+    }
+
+    public boolean recv_cancelJob() throws org.apache.thrift.TException
+    {
+      cancelJob_result result = new cancelJob_result();
+      receiveBase(result, "cancelJob");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result");
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      super(protocolFactory, clientManager, transport);
+    }
+
+    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getGFACServiceVersion_args args = new getGFACServiceVersion_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getGFACServiceVersion();
+      }
+    }
+
+    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String experimentId;
+      private String taskId;
+      private String gatewayId;
+      public submitJob_call(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.experimentId = experimentId;
+        this.taskId = taskId;
+        this.gatewayId = gatewayId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        submitJob_args args = new submitJob_args();
+        args.setExperimentId(experimentId);
+        args.setTaskId(taskId);
+        args.setGatewayId(gatewayId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_submitJob();
+      }
+    }
+
+    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String experimentId;
+      private String taskId;
+      public cancelJob_call(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.experimentId = experimentId;
+        this.taskId = taskId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        cancelJob_args args = new cancelJob_args();
+        args.setExperimentId(experimentId);
+        args.setTaskId(taskId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_cancelJob();
+      }
+    }
+
+  }
+
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
+      processMap.put("submitJob", new submitJob());
+      processMap.put("cancelJob", new cancelJob());
+      return processMap;
+    }
+
+    public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
+      public getGFACServiceVersion() {
+        super("getGFACServiceVersion");
+      }
+
+      public getGFACServiceVersion_args getEmptyArgsInstance() {
+        return new getGFACServiceVersion_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException {
+        getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+        result.success = iface.getGFACServiceVersion();
+        return result;
+      }
+    }
+
+    public static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
+      public submitJob() {
+        super("submitJob");
+      }
+
+      public submitJob_args getEmptyArgsInstance() {
+        return new submitJob_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
+        submitJob_result result = new submitJob_result();
+        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
+      public cancelJob() {
+        super("cancelJob");
+      }
+
+      public cancelJob_args getEmptyArgsInstance() {
+        return new cancelJob_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
+        cancelJob_result result = new cancelJob_result();
+        result.success = iface.cancelJob(args.experimentId, args.taskId);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+  }
+
+  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+    public AsyncProcessor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+    }
+
+    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
+      processMap.put("submitJob", new submitJob());
+      processMap.put("cancelJob", new cancelJob());
+      return processMap;
+    }
+
+    public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
+      public getGFACServiceVersion() {
+        super("getGFACServiceVersion");
+      }
+
+      public getGFACServiceVersion_args getEmptyArgsInstance() {
+        return new getGFACServiceVersion_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.getGFACServiceVersion(resultHandler);
+      }
+    }
+
+    public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
+      public submitJob() {
+        super("submitJob");
+      }
+
+      public submitJob_args getEmptyArgsInstance() {
+        return new submitJob_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            submitJob_result result = new submitJob_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            submitJob_result result = new submitJob_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.submitJob(args.experimentId, args.taskId, args.gatewayId,resultHandler);
+      }
+    }
+
+    public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
+      public cancelJob() {
+        super("cancelJob");
+      }
+
+      public cancelJob_args getEmptyArgsInstance() {
+        return new cancelJob_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            cancelJob_result result = new cancelJob_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            cancelJob_result result = new cancelJob_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.cancelJob(args.experimentId, args.taskId,resultHandler);
+      }
+    }
+
+  }
+
+  public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
+
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory());
+    }
+
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap);
+    }
+
+    public getGFACServiceVersion_args() {
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getGFACServiceVersion_args(getGFACServiceVersion_args other) {
+    }
+
+    public getGFACServiceVersion_args deepCopy() {
+      return new getGFACServiceVersion_args(this);
+    }
+
+    @Override
+    public void clear() {
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getGFACServiceVersion_args)
+        return this.equals((getGFACServiceVersion_args)that);
+      return false;
+    }
+
+    public boolean equals(getGFACServiceVersion_args that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getGFACServiceVersion_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getGFACServiceVersion_args(");
+      boolean first = true;
+
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_argsStandardScheme getScheme() {
+        return new getGFACServiceVersion_argsStandardScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_argsTupleScheme getScheme() {
+        return new getGFACServiceVersion_argsTupleScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
+  }
+
+  public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory());
+    }
+
+    public String success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
+    }
+
+    public getGFACServiceVersion_result() {
+    }
+
+    public getGFACServiceVersion_result(
+      String success)
+    {
+      this();
+      this.success = success;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getGFACServiceVersion_result(getGFACServiceVersion_result other) {
+      if (other.isSetSuccess()) {
+        this.success = other.success;
+      }
+    }
+
+    public getGFACServiceVersion_result deepCopy() {
+      return new getGFACServiceVersion_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+    }
+
+    public String getSuccess() {
+      return this.success;
+    }
+
+    public getGFACServiceVersion_result setSuccess(String success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getGFACServiceVersion_result)
+        return this.equals((getGFACServiceVersion_result)that);
+      return false;
+    }
+
+    public boolean equals(getGFACServiceVersion_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getGFACServiceVersion_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getGFACServiceVersion_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_resultStandardScheme getScheme() {
+        return new getGFACServiceVersion_resultStandardScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.success = iprot.readString();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeString(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
+      public getGFACServiceVersion_resultTupleScheme getScheme() {
+        return new getGFACServiceVersion_resultTupleScheme();
+      }
+    }
+
+    private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeString(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readString();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args");
+
+    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
+    }
+
+    public String experimentId; // required
+    public String taskId; // required
+    public String gatewayId; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EXPERIMENT_ID((short)1, "experimentId"),
+      TASK_ID((short)2, "taskId"),
+      GATEWAY_ID((short)3, "gatewayId");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EXPERIMENT_ID
+            return EXPERIMENT_ID;
+          case 2: // TASK_ID
+            return TASK_ID;
+          case 3: // GATEWAY_ID
+            return GATEWAY_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
+    }
+
+    public submitJob_args() {
+    }
+
+    public submitJob_args(
+      String experimentId,
+      String taskId,
+      String gatewayId)
+    {
+      this();
+      this.experimentId = experimentId;
+      this.taskId = taskId;
+      this.gatewayId = gatewayId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public submitJob_args(submitJob_args other) {
+      if (other.isSetExperimentId()) {
+        this.experimentId = other.experimentId;
+      }
+      if (other.isSetTaskId()) {
+        this.taskId = other.taskId;
+      }
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+    }
+
+    public submitJob_args deepCopy() {
+      return new submitJob_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.experimentId = null;
+      this.taskId = null;
+      this.gatewayId = null;
+    }
+
+    public String getExperimentId() {
+      return this.experimentId;
+    }
+
+    public submitJob_args setExperimentId(String experimentId) {
+      this.experimentId = experimentId;
+      return this;
+    }
+
+    public void unsetExperimentId() {
+      this.experimentId = null;
+    }
+
+    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetExperimentId() {
+      return this.experimentId != null;
+    }
+
+    public void setExperimentIdIsSet(boolean value) {
+      if (!value) {
+        this.experimentId = null;
+      }
+    }
+
+    public String getTaskId() {
+      return this.taskId;
+    }
+
+    public submitJob_args setTaskId(String taskId) {
+      this.taskId = taskId;
+      return this;
+    }
+
+    public void unsetTaskId() {
+      this.taskId = null;
+    }
+
+    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTaskId() {
+      return this.taskId != null;
+    }
+
+    public void setTaskIdIsSet(boolean value) {
+      if (!value) {
+        this.taskId = null;
+      }
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public submitJob_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        if (value == null) {
+          unsetExperimentId();
+        } else {
+          setExperimentId((String)value);
+        }
+        break;
+
+      case TASK_ID:
+        if (value == null) {
+          unsetTaskId();
+        } else {
+          setTaskId((String)value);
+        }
+        break;
+
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        return getExperimentId();
+
+      case TASK_ID:
+        return getTaskId();
+
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case EXPERIMENT_ID:
+        return isSetExperimentId();
+      case TASK_ID:
+        return isSetTaskId();
+      case GATEWAY_ID:
+        return isSetGatewayId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof submitJob_args)
+        return this.equals((submitJob_args)that);
+      return false;
+    }
+
+    public boolean equals(submitJob_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_experimentId = true && this.isSetExperimentId();
+      boolean that_present_experimentId = true && that.isSetExperimentId();
+      if (this_present_experimentId || that_present_experimentId) {
+        if (!(this_present_experimentId && that_present_experimentId))
+          return false;
+        if (!this.experimentId.equals(that.experimentId))
+          return false;
+      }
+
+      boolean this_present_taskId = true && this.isSetTaskId();
+      boolean that_present_taskId = true && that.isSetTaskId();
+      if (this_present_taskId || that_present_taskId) {
+        if (!(this_present_taskId && that_present_taskId))
+          return false;
+        if (!this.taskId.equals(that.taskId))
+          return false;
+      }
+
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(submitJob_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetExperimentId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTaskId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGatewayId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("submitJob_args(");
+      boolean first = true;
+
+      sb.append("experimentId:");
+      if (this.experimentId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.experimentId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("taskId:");
+      if (this.taskId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.taskId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (experimentId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
+      }
+      if (taskId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
+      }
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
+      public submitJob_argsStandardScheme getScheme() {
+        return new submitJob_argsStandardScheme();
+      }
+    }
+
+    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // EXPERIMENT_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.experimentId = iprot.readString();
+                struct.setExperimentIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // TASK_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.taskId = iprot.readString();
+                struct.setTaskIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // GATEWAY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.gatewayId = iprot.readString();
+                struct.setGatewayIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.experimentId != null) {
+          oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
+          oprot.writeString(struct.experimentId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.taskId != null) {
+          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+          oprot.writeString(struct.taskId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
+      public submitJob_argsTupleScheme getScheme() {
+        return new submitJob_argsTupleScheme();
+      }
+    }
+
+    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.experimentId);
+        oprot.writeString(struct.taskId);
+        oprot.writeString(struct.gatewayId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.experimentId = iprot.readString();
+        struct.setExperimentIdIsSet(true);
+        struct.taskId = iprot.readString();
+        struct.setTaskIdIsSet(true);
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
+    }
+
+    public boolean success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
+    }
+
+    public submitJob_result() {
+    }
+
+    public submitJob_result(
+      boolean success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public submitJob_result(submitJob_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public submitJob_result deepCopy() {
+      return new submitJob_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = false;
+    }
+
+    public boolean isSuccess() {
+      return this.success;
+    }
+
+    public submitJob_result setSuccess(boolean success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Boolean)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Boolean.valueOf(isSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof submitJob_result)
+        return this.equals((submitJob_result)that);
+      return false;
+    }
+
+    public boolean equals(submitJob_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(submitJob_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("submitJob_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
+      public submitJob_resultStandardScheme getScheme() {
+        return new submitJob_resultStandardScheme();
+      }
+    }
+
+    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.success = iprot.readBool();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeBool(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
+      public submitJob_resultTupleScheme getScheme() {
+        return new submitJob_resultTupleScheme();
+      }
+    }
+
+    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeBool(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readBool();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class cancelJob_args implements org.apache.thrift.TBase<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_args");
+
+    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
+    }
+
+    public String experimentId; // required
+    public String taskId; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EXPERIMENT_ID((short)1, "experimentId"),
+      TASK_ID((short)2, "taskId");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EXPERIMENT_ID
+            return EXPERIMENT_ID;
+          case 2: // TASK_ID
+            return TASK_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
+    }
+
+    public cancelJob_args() {
+    }
+
+    public cancelJob_args(
+      String experimentId,
+      String taskId)
+    {
+      this();
+      this.experimentId = experimentId;
+      this.taskId = taskId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public cancelJob_args(cancelJob_args other) {
+      if (other.isSetExperimentId()) {
+        this.experimentId = other.experimentId;
+      }
+      if (other.isSetTaskId()) {
+        this.taskId = other.taskId;
+      }
+    }
+
+    public cancelJob_args deepCopy() {
+      return new cancelJob_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.experimentId = null;
+      this.taskId = null;
+    }
+
+    public String getExperimentId() {
+      return this.experimentId;
+    }
+
+    public cancelJob_args setExperimentId(String experimentId) {
+      this.experimentId = experimentId;
+      return this;
+    }
+
+    public void unsetExperimentId() {
+      this.experimentId = null;
+    }
+
+    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+    public boolean isSetExperimentId() {
+      return this.experimentId != null;
+    }
+
+    public void setExperimentIdIsSet(boolean value) {
+      if (!value) {
+        this.experimentId = null;
+      }
+    }
+
+    public String getTaskId() {
+      return this.taskId;
+    }
+
+    public cancelJob_args setTaskId(String taskId) {
+      this.taskId = taskId;
+      return this;
+    }
+
+    public void unsetTaskId() {
+      this.taskId = null;
+    }
+
+    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTaskId() {
+      return this.taskId != null;
+    }
+
+    public void setTaskIdIsSet(boolean value) {
+      if (!value) {
+        this.taskId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        if (value == null) {
+          unsetExperimentId();
+        } else {
+          setExperimentId((String)value);
+        }
+        break;
+
+      case TASK_ID:
+        if (value == null) {
+          unsetTaskId();
+        } else {
+          setTaskId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case EXPERIMENT_ID:
+        return getExperimentId();
+
+      case TASK_ID:
+        return getTaskId();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case EXPERIMENT_ID:
+        return isSetExperimentId();
+      case TASK_ID:
+        return isSetTaskId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof cancelJob_args)
+        return this.equals((cancelJob_args)that);
+      return false;
+    }
+
+    public boolean equals(cancelJob_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_experimentId = true && this.isSetExperimentId();
+      boolean that_present_experimentId = true && that.isSetExperimentId();
+      if (this_present_experimentId || that_present_experimentId) {
+        if (!(this_present_experimentId && that_present_experimentId))
+          return false;
+        if (!this.experimentId.equals(that.experimentId))
+          return false;
+      }
+
+      boolean this_present_taskId = true && this.isSetTaskId();
+      boolean that_present_taskId = true && that.isSetTaskId();
+      if (this_present_taskId || that_present_taskId) {
+        if (!(this_present_taskId && that_present_taskId))
+          return false;
+        if (!this.taskId.equals(that.taskId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(cancelJob_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetExperimentId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTaskId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("cancelJob_args(");
+      boolean first = true;
+
+      sb.append("experimentId:");
+      if (this.experimentId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.experimentId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("taskId:");
+      if (this.taskId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.taskId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (experimentId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
+      }
+      if (taskId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class cancelJob_argsStandardSchemeFactory implements SchemeFactory {
+      public cancelJob_argsStandardScheme getScheme() {
+        return new cancelJob_argsStandardScheme();
+      }
+    }
+
+    private static class cancelJob_argsStandardScheme extends StandardScheme<cancelJob_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelJob_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // EXPERIMENT_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.experimentId = iprot.readString();
+                struct.setExperimentIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // TASK_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STR

<TRUNCATED>

[80/81] [abbrv] airavata git commit: Merge moduleRefactor branch

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 0000000,b716099..3756140
mode 000000,100644..100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@@ -1,0 -1,747 +1,747 @@@
+ /*
+  *
+  * 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.core;
+ 
+ import org.airavata.appcatalog.cpi.AppCatalog;
+ import org.airavata.appcatalog.cpi.AppCatalogException;
+ import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.utils.AiravataZKUtils;
+ import org.apache.airavata.common.utils.DBUtil;
+ import org.apache.airavata.common.utils.MonitorPublisher;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.credential.store.store.CredentialReader;
+ import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
+ import org.apache.airavata.gfac.Constants;
+ import org.apache.airavata.gfac.ExecutionMode;
+ import org.apache.airavata.gfac.GFacConfiguration;
+ import org.apache.airavata.gfac.GFacException;
+ import org.apache.airavata.gfac.core.context.JobExecutionContext;
+ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+ import org.apache.airavata.gfac.core.states.GfacExperimentState;
+ import org.apache.airavata.gfac.core.states.GfacHandlerState;
+ import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+ import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+ import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+ import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+ import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
+ import org.apache.airavata.model.messaging.event.JobIdentifier;
+ import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
+ import org.apache.airavata.model.messaging.event.TaskIdentifier;
+ import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+ import org.apache.airavata.model.workspace.experiment.ActionableGroup;
+ import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+ import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+ import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+ import org.apache.airavata.model.workspace.experiment.Experiment;
+ import org.apache.airavata.model.workspace.experiment.ExperimentState;
+ import org.apache.airavata.model.workspace.experiment.JobDetails;
+ import org.apache.airavata.model.workspace.experiment.JobState;
+ import org.apache.airavata.model.workspace.experiment.JobStatus;
+ import org.apache.airavata.model.workspace.experiment.TaskState;
 -import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
++import org.apache.airavata.experiment.catalog.impl.RegistryFactory;
+ import org.apache.airavata.registry.cpi.ChildDataType;
+ import org.apache.airavata.registry.cpi.CompositeIdentifier;
+ import org.apache.airavata.registry.cpi.Registry;
+ import org.apache.airavata.registry.cpi.RegistryException;
+ import org.apache.airavata.registry.cpi.RegistryModelType;
+ import org.apache.curator.framework.CuratorFramework;
+ import org.apache.curator.utils.ZKPaths;
+ import org.apache.zookeeper.CreateMode;
+ import org.apache.zookeeper.KeeperException;
+ import org.apache.zookeeper.ZooDefs;
+ import org.apache.zookeeper.data.ACL;
+ import org.apache.zookeeper.data.Stat;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ import org.w3c.dom.NodeList;
+ 
+ import javax.xml.xpath.XPath;
+ import javax.xml.xpath.XPathConstants;
+ import javax.xml.xpath.XPathExpression;
+ import javax.xml.xpath.XPathExpressionException;
+ import javax.xml.xpath.XPathFactory;
+ import java.io.BufferedReader;
+ import java.io.File;
+ import java.io.FileNotFoundException;
+ import java.io.FileReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.net.InetAddress;
+ import java.net.URISyntaxException;
+ import java.net.UnknownHostException;
+ import java.nio.ByteBuffer;
+ import java.util.ArrayList;
+ import java.util.Calendar;
+ import java.util.Date;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ //import org.apache.airavata.commons.gfac.type.ActualParameter;
+ 
+ public class GFacUtils {
+ 	private final static Logger log = LoggerFactory.getLogger(GFacUtils.class);
+ 	public static final ArrayList<ACL> OPEN_ACL_UNSAFE = ZooDefs.Ids.OPEN_ACL_UNSAFE;
+ 
+ 	private GFacUtils() {
+ 	}
+ 
+ 	/**
+ 	 * Read data from inputStream and convert it to String.
+ 	 * 
+ 	 * @param in
+ 	 * @return String read from inputStream
+ 	 * @throws java.io.IOException
+ 	 */
+ 	public static String readFromStream(InputStream in) throws IOException {
+ 		try {
+ 			StringBuffer wsdlStr = new StringBuffer();
+ 
+ 			int read;
+ 
+ 			byte[] buf = new byte[1024];
+ 			while ((read = in.read(buf)) > 0) {
+ 				wsdlStr.append(new String(buf, 0, read));
+ 			}
+ 			return wsdlStr.toString();
+ 		} finally {
+ 			if (in != null) {
+ 				try {
+ 					in.close();
+ 				} catch (IOException e) {
+ 					log.warn("Cannot close InputStream: "
+ 							+ in.getClass().getName(), e);
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	/**
+ 	 * This returns true if the give job is finished
+ 	 * otherwise false
+ 	 *
+ 	 * @param job
+ 	 * @return
+ 	 */
+ 	public static boolean isJobFinished(JobDescriptor job) {
+ 		if (org.apache.airavata.gfac.core.cluster.JobStatus.C.toString().equals(job.getStatus())) {
+ 			return true;
+ 		} else {
+ 			return false;
+ 		}
+ 	}
+ 
+ 	/**
+ 	 * This will read
+ 	 *
+ 	 * @param maxWalltime
+ 	 * @return
+ 	 */
+ 	public static String maxWallTimeCalculator(int maxWalltime) {
+ 		if (maxWalltime < 60) {
+ 			return "00:" + maxWalltime + ":00";
+ 		} else {
+ 			int minutes = maxWalltime % 60;
+ 			int hours = maxWalltime / 60;
+ 			return hours + ":" + minutes + ":00";
+ 		}
+ 	}
+ 	public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
+ 		if (maxWalltime < 60) {
+ 			return "00:" + maxWalltime;
+ 		} else {
+ 			int minutes = maxWalltime % 60;
+ 			int hours = maxWalltime / 60;
+ 			return hours + ":" + minutes;
+ 		}
+ 	}
+ 	/**
+ 	 * this can be used to do framework opertaions specific to different modes
+ 	 * 
+ 	 * @param jobExecutionContext
+ 	 * @return
+ 	 */
+ 	public static boolean isSynchronousMode(
+ 			JobExecutionContext jobExecutionContext) {
+ 		GFacConfiguration gFacConfiguration = jobExecutionContext
+ 				.getGFacConfiguration();
+ 		if (ExecutionMode.ASYNCHRONOUS.equals(gFacConfiguration
+ 				.getExecutionMode())) {
+ 			return false;
+ 		}
+ 		return true;
+ 	}
+ 
+ 	public static String readFileToString(String file)
+ 			throws FileNotFoundException, IOException {
+ 		BufferedReader instream = null;
+ 		try {
+ 
+ 			instream = new BufferedReader(new FileReader(file));
+ 			StringBuffer buff = new StringBuffer();
+ 			String temp = null;
+ 			while ((temp = instream.readLine()) != null) {
+ 				buff.append(temp);
+ 				buff.append(Constants.NEWLINE);
+ 			}
+ 			return buff.toString();
+ 		} finally {
+ 			if (instream != null) {
+ 				try {
+ 					instream.close();
+ 				} catch (IOException e) {
+ 					log.warn("Cannot close FileinputStream", e);
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	public static boolean isLocalHost(String appHost)
+ 			throws UnknownHostException {
+ 		String localHost = InetAddress.getLocalHost().getCanonicalHostName();
+ 		return (localHost.equals(appHost)
+ 				|| Constants.LOCALHOST.equals(appHost) || Constants._127_0_0_1
+ 					.equals(appHost));
+ 	}
+ 
+ 	public static String createUniqueNameWithDate(String name) {
+ 		String date = new Date().toString();
+ 		date = date.replaceAll(" ", "_");
+ 		date = date.replaceAll(":", "_");
+ 		return name + "_" + date;
+ 	}
+ 
+     public static List<Element> getElementList(Document doc, String expression) throws XPathExpressionException {
+         XPathFactory xPathFactory = XPathFactory.newInstance();
+         XPath xPath = xPathFactory.newXPath();
+         XPathExpression expr = xPath.compile(expression);
+         NodeList nodeList = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
+         List<Element> elementList = new ArrayList<Element>();
+         for (int i = 0; i < nodeList.getLength(); i++) {
+             Node item = nodeList.item(i);
+             if (item instanceof Element) {
+                 elementList.add((Element) item);
+             }
+         }
+         return elementList;
+     }
+ 
+ 	public static String createGsiftpURIAsString(String host, String localPath)
+ 			throws URISyntaxException {
+ 		StringBuffer buf = new StringBuffer();
+ 		if (!host.startsWith("gsiftp://"))
+ 			buf.append("gsiftp://");
+ 		buf.append(host);
+ 		if (!host.endsWith("/"))
+ 			buf.append("/");
+ 		buf.append(localPath);
+ 		return buf.toString();
+ 	}
+ 
+ 	public static void saveJobStatus(JobExecutionContext jobExecutionContext,
+                                      JobDetails details, JobState state) throws GFacException {
+ 		try {
+             // first we save job details to the registry for sa and then save the job status.
+             Registry registry = jobExecutionContext.getRegistry();
+             JobStatus status = new JobStatus();
+             status.setJobState(state);
+             details.setJobStatus(status);
+             registry.add(ChildDataType.JOB_DETAIL, details,
+                     new CompositeIdentifier(jobExecutionContext.getTaskData()
+                             .getTaskID(), details.getJobID()));
+             JobIdentifier identifier = new JobIdentifier(details.getJobID(), jobExecutionContext.getTaskData().getTaskID(),
+                     jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
+                     jobExecutionContext.getGatewayID());
+             JobStatusChangeRequestEvent jobStatusChangeRequestEvent = new JobStatusChangeRequestEvent(state, identifier);
+             jobExecutionContext.getMonitorPublisher().publish(jobStatusChangeRequestEvent);
+         } catch (Exception e) {
+ 			throw new GFacException("Error persisting job status"
+ 					+ e.getLocalizedMessage(), e);
+ 		}
+ 	}
+ 
+ 	public static void updateJobStatus(JobExecutionContext jobExecutionContext,
+ 			JobDetails details, JobState state) throws GFacException {
+ 		try {
+ 			Registry registry = jobExecutionContext.getRegistry();
+ 			JobStatus status = new JobStatus();
+ 			status.setJobState(state);
+ 			status.setTimeOfStateChange(Calendar.getInstance()
+ 					.getTimeInMillis());
+ 			details.setJobStatus(status);
+ 			registry.update(
+ 					org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL,
+ 					details, details.getJobID());
+ 		} catch (Exception e) {
+ 			throw new GFacException("Error persisting job status"
+ 					+ e.getLocalizedMessage(), e);
+ 		}
+ 	}
+ 
+ 	public static void saveErrorDetails(
+ 			JobExecutionContext jobExecutionContext, String errorMessage,
+ 			CorrectiveAction action, ErrorCategory errorCatogory)
+ 			throws GFacException {
+ 		try {
+ 			Registry registry = jobExecutionContext.getRegistry();
+ 			ErrorDetails details = new ErrorDetails();
+ 			details.setActualErrorMessage(errorMessage);
+ 			details.setCorrectiveAction(action);
+ 			details.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS);
+ 			details.setCreationTime(Calendar.getInstance().getTimeInMillis());
+ 			details.setErrorCategory(errorCatogory);
+ 			registry.add(ChildDataType.ERROR_DETAIL, details,
+ 					jobExecutionContext.getTaskData().getTaskID());
+ 		} catch (Exception e) {
+ 			throw new GFacException("Error persisting job status"
+ 					+ e.getLocalizedMessage(), e);
+ 		}
+ 	}
+ 
+     public static Map<String, Object> getInputParamMap(List<InputDataObjectType> experimentData) throws GFacException {
+         Map<String, Object> map = new HashMap<String, Object>();
+         for (InputDataObjectType objectType : experimentData) {
+             map.put(objectType.getName(), objectType);
+         }
+         return map;
+     }
+ 
+     public static Map<String, Object> getOuputParamMap(List<OutputDataObjectType> experimentData) throws GFacException {
+         Map<String, Object> map = new HashMap<String, Object>();
+         for (OutputDataObjectType objectType : experimentData) {
+             map.put(objectType.getName(), objectType);
+         }
+         return map;
+     }
+ 
+ 	public static GfacExperimentState getZKExperimentState(CuratorFramework curatorClient,
+ 			JobExecutionContext jobExecutionContext)
+ 			throws Exception {
+ 		String expState = AiravataZKUtils.getExpState(curatorClient, jobExecutionContext
+ 				.getExperimentID());
+         if (expState == null || expState.isEmpty()) {
+             return GfacExperimentState.UNKNOWN;
+         }
+         return GfacExperimentState.findByValue(Integer.valueOf(expState));
+     }
+ 
+ 	public static boolean createHandlerZnode(CuratorFramework curatorClient,
+                                              JobExecutionContext jobExecutionContext, String className)
+ 			throws Exception {
+ 		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
+ 				jobExecutionContext.getExperimentID(), className);
+ 		Stat exists = curatorClient.checkExists().forPath(expState);
+ 		if (exists == null) {
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(expState, new byte[0]);
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+ 		} else {
+ 			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 			if (exists == null) {
+ 				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+ 			}
+ 		}
+ 
+ 		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 		if (exists != null) {
+ 			curatorClient.setData().withVersion(exists.getVersion())
+ 					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+ 							String.valueOf(GfacHandlerState.INVOKING.getValue()).getBytes());
+ 		}
+ 		return true;
+ 	}
+ 
+ 	public static boolean createHandlerZnode(CuratorFramework curatorClient,
+                                              JobExecutionContext jobExecutionContext, String className,
+                                              GfacHandlerState state) throws Exception {
+ 		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
+ 				jobExecutionContext.getExperimentID(), className);
+ 		Stat exists = curatorClient.checkExists().forPath(expState);
+ 		if (exists == null) {
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(expState, new byte[0]);
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+ 		} else {
+ 			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 			if (exists == null) {
+ 				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
+ 			}
+ 		}
+ 
+ 		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 		if (exists != null) {
+ 			curatorClient.setData().withVersion(exists.getVersion())
+ 					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+ 							String.valueOf(state.getValue()).getBytes());
+ 		}
+ 		return true;
+ 	}
+ 
+ 	public static boolean updateHandlerState(CuratorFramework curatorClient,
+                                              JobExecutionContext jobExecutionContext, String className,
+                                              GfacHandlerState state) throws Exception {
+ 		String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath(
+ 				jobExecutionContext.getExperimentID(), className);
+ 		Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 		if (exists != null) {
+ 			curatorClient.setData().withVersion(exists.getVersion())
+ 					.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, String.valueOf(state.getValue()).getBytes());
+ 		} else {
+ 			createHandlerZnode(curatorClient, jobExecutionContext, className, state);
+ 		}
+ 		return false;
+ 	}
+ 
+ 	public static GfacHandlerState getHandlerState(CuratorFramework curatorClient,
+                                                   JobExecutionContext jobExecutionContext, String className) {
+ 		try {
+ 			String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath( jobExecutionContext.getExperimentID(), className);
+ 			Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+ 			if (exists != null) {
+ 				String stateVal = new String(curatorClient.getData().storingStatIn(exists)
+ 						.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE));
+ 				return GfacHandlerState.findByValue(Integer.valueOf(stateVal));
+ 			}
+ 			return GfacHandlerState.UNKNOWN; // if the node doesn't exist or any other error we
+ 							// return false
+ 		} catch (Exception e) {
+ 			log.error("Error occured while getting zk node status", e);
+ 			return null;
+ 		}
+ 	}
+ 
+ 	// This method is dangerous because of moving the experiment data
+ 	public static boolean createExperimentEntryForPassive(String experimentID,
+ 														  String taskID, CuratorFramework curatorClient, String experimentNode,
+ 														  String pickedChild, String tokenId, long deliveryTag) throws Exception {
+ 		String experimentPath = experimentNode + File.separator + pickedChild;
+ 		String newExperimentPath = experimentPath + File.separator + experimentID;
+ 		Stat exists1 = curatorClient.checkExists().forPath(newExperimentPath);
+ 		String oldExperimentPath = GFacUtils.findExperimentEntry(experimentID, curatorClient);
+ 		if (oldExperimentPath == null) {  // this means this is a very new experiment
+ 			// are going to create a new node
+ 			log.info("This is a new Job, so creating all the experiment docs from the scratch");
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath, new byte[0]);
+             String stateNodePath = curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(newExperimentPath + File.separator + "state",
+ 							String .valueOf(GfacExperimentState.LAUNCHED.getValue()) .getBytes());
+ 
+ 			if(curatorClient.checkExists().forPath(stateNodePath)!=null) {
+ 				log.info("Created the node: " + stateNodePath + " successfully !");
+ 			}else {
+ 				log.error("Error creating node: " + stateNodePath + " successfully !");
+ 			}
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag));
+ 		} else {
+ 			log.error("ExperimentID: " + experimentID + " taskID: " + taskID + " was running by some Gfac instance,but it failed");
+             removeCancelDeliveryTagNode(oldExperimentPath, curatorClient); // remove previous cancel deliveryTagNode
+             if(newExperimentPath.equals(oldExperimentPath)){
+                 log.info("Re-launch experiment came to the same GFac instance");
+             }else {
+ 				log.info("Re-launch experiment came to a new GFac instance so we are moving data to new gfac node");
+ 				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath,
+ 						curatorClient.getData().storingStatIn(exists1).forPath(oldExperimentPath)); // recursively copy children
+                 copyChildren(curatorClient, oldExperimentPath, newExperimentPath, 2); // we need to copy children up to depth 2
+ 				String oldDeliveryTag = oldExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX;
+ 				Stat exists = curatorClient.checkExists().forPath(oldDeliveryTag);
+ 				if(exists!=null) {
+ 					curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 							.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX,
+ 									curatorClient.getData().storingStatIn(exists).forPath(oldDeliveryTag));
+ 					ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldDeliveryTag, true);
+ 				}
+ 				// After all the files are successfully transfered we delete the // old experiment,otherwise we do
+ 				// not delete a single file
+ 				log.info("After a successful copying of experiment data for an old experiment we delete the old data");
+ 				log.info("Deleting experiment data: " + oldExperimentPath);
+ 				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldExperimentPath, true);
+ 			}
+ 		}
+ 		return true;
+ 	}
+ 
+     private static void removeCancelDeliveryTagNode(String experimentPath, CuratorFramework curatorClient) throws Exception {
+         Stat exists = curatorClient.checkExists().forPath(experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
+         if (exists != null) {
+ 			ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, true);
+ 		}
+ 	}
+ 
+     private static void copyChildren(CuratorFramework curatorClient, String oldPath, String newPath, int depth) throws Exception {
+         for (String childNode : curatorClient.getChildren().forPath(oldPath)) {
+             String oldChildPath = oldPath + File.separator + childNode;
+             Stat stat = curatorClient.checkExists().forPath(oldChildPath); // no need to check exists
+             String newChildPath = newPath + File.separator + childNode;
+             log.info("Creating new znode: " + newChildPath);
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(newChildPath, curatorClient.getData().storingStatIn(stat).forPath(oldChildPath));
+ 			if (--depth > 0) {
+                 copyChildren(curatorClient , oldChildPath, newChildPath, depth );
+             }
+         }
+     }
+ 
+ 	/**
+ 	 * This will return a value if the server is down because we iterate through exisiting experiment nodes, not
+ 	 * through gfac-server nodes
+ 	 *
+ 	 * @param experimentID
+ 	 * @param curatorClient
+ 	 * @return
+ 	 * @throws KeeperException
+ 	 * @throws InterruptedException
+ 	 */
+ 	public static String findExperimentEntry(String experimentID, CuratorFramework curatorClient) throws Exception {
+ 		String experimentNode = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+ 		List<String> children = curatorClient.getChildren().forPath(experimentNode);
+ 		for (String pickedChild : children) {
+ 			String experimentPath = experimentNode + File.separator + pickedChild;
+ 			String newExpNode = experimentPath + File.separator + experimentID;
+ 			Stat exists = curatorClient.checkExists().forPath(newExpNode);
+ 			if (exists == null) {
+ 				continue;
+ 			} else {
+ 				return newExpNode;
+ 			}
+ 		}
+ 		return null;
+ 	}
+ 
+     public static boolean setExperimentCancel(String experimentId, CuratorFramework curatorClient, long deliveryTag) throws Exception {
+         String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
+         if (experimentEntry == null) {
+             // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
+             log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
+                     "This happen when experiment completed and already removed from the zookeeper");
+             return false;
+         } else {
+             // check cancel operation is being processed for the same experiment.
+             Stat cancelState = curatorClient.checkExists().forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
+             if (cancelState != null) {
+                 // another cancel operation is being processed. only one cancel operation can exist for a given experiment.
+                 return false;
+             }
+ 
+ 			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
+ 					.forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag)); // save cancel delivery tag to be acknowledge at the end.
+ 			return true;
+         }
+ 
+     }
+     public static boolean isCancelled(String experimentID, CuratorFramework curatorClient ) throws Exception {
+ 		String experimentEntry = GFacUtils.findExperimentEntry(experimentID, curatorClient);
+         if(experimentEntry == null){
+             return false;
+         }else {
+             Stat exists = curatorClient.checkExists().forPath(experimentEntry);
+             if (exists != null) {
+ 				String operation = new String(curatorClient.getData().storingStatIn(exists).forPath(experimentEntry + File.separator + "operation"));
+ 				if ("cancel".equals(operation)) {
+ 					return true;
+ 				}
+ 			}
+ 		}
+         return false;
+     }
+ 
+     public static void saveHandlerData(JobExecutionContext jobExecutionContext,
+                                        StringBuffer data, String className) throws GFacHandlerException {
+ 		try {
+ 			CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
+ 			if (curatorClient != null) {
+ 				String expZnodeHandlerPath = AiravataZKUtils
+ 						.getExpZnodeHandlerPath(
+ 								jobExecutionContext.getExperimentID(),
+ 								className);
+ 				Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
+                 if (exists != null) {
+ 					curatorClient.setData().withVersion(exists.getVersion()).forPath(expZnodeHandlerPath, data.toString().getBytes());
+ 				} else {
+                     log.error("Saving Handler data failed, Stat is null");
+                 }
+             }
+ 		} catch (Exception e) {
+ 			throw new GFacHandlerException(e);
+ 		}
+ 	}
+ 
+ 	public static String getHandlerData(JobExecutionContext jobExecutionContext, String className) throws Exception {
+ 		CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
+ 		if (curatorClient != null) {
+ 			String expZnodeHandlerPath = AiravataZKUtils
+ 					.getExpZnodeHandlerPath(
+ 							jobExecutionContext.getExperimentID(),
+ 							className);
+ 			Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
+ 			return new String(jobExecutionContext.getCuratorClient().getData().storingStatIn(exists).forPath(expZnodeHandlerPath));
+ 		}
+ 		return null;
+ 	}
+ 
+ 	public static CredentialReader getCredentialReader()
+ 			throws ApplicationSettingsException, IllegalAccessException,
+ 			InstantiationException {
+ 		try{
+ 		String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
+ 		String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
+ 		String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
+ 		String driver = ServerSettings.getCredentialStoreDBDriver();
+ 		return new CredentialReaderImpl(new DBUtil(jdbcUrl, jdbcUsr, jdbcPass,
+ 				driver));
+ 		}catch(ClassNotFoundException e){
+ 			log.error("Not able to find driver: " + e.getLocalizedMessage());
+ 			return null;	
+ 		}
+ 	}
+ 
+     public static LOCALSubmission getLocalJobSubmission (String submissionId) throws AppCatalogException{
+         try {
+             AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+             return appCatalog.getComputeResource().getLocalJobSubmission(submissionId);
+         }catch (Exception e){
+             String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
+             log.error(errorMsg, e);
+             throw new AppCatalogException(errorMsg, e);
+         }
+     }
+ 
+     public static UnicoreJobSubmission getUnicoreJobSubmission (String submissionId) throws AppCatalogException{
+         try {
+             AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+             return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
+         }catch (Exception e){
+             String errorMsg = "Error while retrieving UNICORE job submission with submission id : " + submissionId;
+             log.error(errorMsg, e);
+             throw new AppCatalogException(errorMsg, e);
+         }
+     }
+ 
+     public static SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException{
+         try {
+             AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+             return appCatalog.getComputeResource().getSSHJobSubmission(submissionId);
+         }catch (Exception e){
+             String errorMsg = "Error while retrieving SSH job submission with submission id : " + submissionId;
+             log.error(errorMsg, e);
+             throw new AppCatalogException(errorMsg, e);
+         }
+     }
+ 
+     /**
+      * To convert list to separated value
+      * @param listOfStrings
+      * @param separator
+      * @return
+      */
+     public static  String listToCsv(List<String> listOfStrings, char separator) {
+         StringBuilder sb = new StringBuilder();
+ 
+         // all but last
+         for(int i = 0; i < listOfStrings.size() - 1 ; i++) {
+             sb.append(listOfStrings.get(i));
+             sb.append(separator);
+         }
+ 
+         // last string, no separator
+         if(listOfStrings.size() > 0){
+             sb.append(listOfStrings.get(listOfStrings.size()-1));
+         }
+ 
+         return sb.toString();
+     }
+ 
+ 	public static byte[] longToBytes(long x) {
+ 		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
+ 		buffer.putLong(x);
+ 		return buffer.array();
+ 	}
+ 
+ 	public static long bytesToLong(byte[] bytes) {
+ 		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
+ 		buffer.put(bytes);
+ 		buffer.flip();//need flip
+ 		return buffer.getLong();
+ 	}
+ 
+     public static ExperimentState updateExperimentStatus(String experimentId, ExperimentState state) throws RegistryException {
+         Registry airavataRegistry = RegistryFactory.getDefaultRegistry();
+         Experiment details = (Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
+         if (details == null) {
+             details = new Experiment();
+             details.setExperimentID(experimentId);
+         }
+         org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
+         status.setExperimentState(state);
+         status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+         if (!ExperimentState.CANCELED.equals(details.getExperimentStatus().getExperimentState()) &&
+                 !ExperimentState.CANCELING.equals(details.getExperimentStatus().getExperimentState())) {
+             status.setExperimentState(state);
+         } else {
+             status.setExperimentState(details.getExperimentStatus().getExperimentState());
+         }
+         details.setExperimentStatus(status);
+         log.info("Updating the experiment status of experiment: " + experimentId + " to " + status.getExperimentState().toString());
+         airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
+         return details.getExperimentStatus().getExperimentState();
+     }
+ 
+     public static boolean isFailedJob (JobExecutionContext jec) {
+         JobStatus jobStatus = jec.getJobDetails().getJobStatus();
+         if (jobStatus.getJobState() == JobState.FAILED) {
+             return true;
+         }
+         return false;
+     }
+ 
+     public static boolean ackCancelRequest(String experimentId, CuratorFramework curatorClient) throws Exception {
+         String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
+         String cancelNodePath = experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX;
+         if (experimentEntry == null) {
+             // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
+             log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
+                     "This happen when experiment completed and already removed from the CuratorFramework");
+         } else {
+             // check cancel operation is being processed for the same experiment.
+             Stat cancelState = curatorClient.checkExists().forPath(cancelNodePath);
+             if (cancelState != null) {
+ 				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), cancelNodePath, true);
+ 				return true;
+ 			}
+ 		}
+         return false;
+     }
+ 
+     public static void publishTaskStatus (JobExecutionContext jobExecutionContext, MonitorPublisher publisher, TaskState state){
+         TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                 jobExecutionContext.getExperimentID(),
+                 jobExecutionContext.getGatewayID());
+         publisher.publish(new TaskStatusChangeRequestEvent(state, taskIdentity));
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 0000000,307d8c3..f28b6e4
mode 000000,100644..100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@@ -1,0 -1,562 +1,562 @@@
+ /*
+  *
+  * 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.ssh.util;
+ 
+ import org.airavata.appcatalog.cpi.AppCatalog;
+ import org.airavata.appcatalog.cpi.AppCatalogException;
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+ import org.apache.airavata.gfac.Constants;
+ import org.apache.airavata.gfac.GFacException;
+ import org.apache.airavata.gfac.RequestData;
+ import org.apache.airavata.gfac.core.JobDescriptor;
+ import org.apache.airavata.gfac.core.JobManagerConfiguration;
+ import org.apache.airavata.gfac.core.cluster.Cluster;
+ import org.apache.airavata.gfac.core.cluster.ServerInfo;
+ import org.apache.airavata.gfac.core.context.JobExecutionContext;
+ import org.apache.airavata.gfac.core.context.MessageContext;
+ import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+ import org.apache.airavata.gfac.core.GFacUtils;
+ import org.apache.airavata.gfac.gsi.ssh.impl.GSISSHAbstractCluster;
+ import org.apache.airavata.gfac.gsi.ssh.impl.PBSCluster;
+ import org.apache.airavata.gfac.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+ import org.apache.airavata.gfac.gsi.ssh.util.CommonUtils;
+ import org.apache.airavata.gfac.ssh.context.SSHAuthWrapper;
+ import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+ import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
+ import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
+ import org.apache.airavata.model.appcatalog.appinterface.DataType;
+ import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+ import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+ import org.apache.airavata.model.appcatalog.computeresource.*;
+ import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+ import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+ import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+ import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+ import org.apache.airavata.model.workspace.experiment.TaskDetails;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ 
+ import java.io.File;
+ import java.io.PrintWriter;
+ import java.io.StringWriter;
+ import java.util.*;
+ 
+ public class GFACSSHUtils {
+     private final static Logger logger = LoggerFactory.getLogger(GFACSSHUtils.class);
+ 
+     public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
+ 
+     public static final String PBS_JOB_MANAGER = "pbs";
+     public static final String SLURM_JOB_MANAGER = "slurm";
+     public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
+     public static final String LSF_JOB_MANAGER = "LSF";
+ 
+     public static int maxClusterCount = 5;
+ 
+     /**
+      * This method is to add computing resource specific authentication, if its a third party machine, use the other addSecurityContext
+      * @param jobExecutionContext
+      * @throws GFacException
+      * @throws ApplicationSettingsException
+      */
+     public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
+         JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+         JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+         if (preferredJobSubmissionProtocol == JobSubmissionProtocol.GLOBUS || preferredJobSubmissionProtocol == JobSubmissionProtocol.UNICORE) {
+             logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
+         } else if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH) {
+             try {
+                 AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
+                 SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
+                 SecurityProtocol securityProtocol = sshJobSubmission.getSecurityProtocol();
 -                if (securityProtocol == SecurityProtocol.GSI || securityProtocol == SecurityProtocol.SSH_KEYS) {
++                if (securityProtocol == SecurityProtocol.GSI || securityProtocol == SecurityProtocol.SSH_KEYS || securityProtocol == SecurityProtocol.USERNAME_PASSWORD) {
+                     SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+                     String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
+                     RequestData requestData = new RequestData(jobExecutionContext.getGatewayID());
+                     requestData.setTokenId(credentialStoreToken);
+ 
+                     ServerInfo serverInfo = new ServerInfo(null, jobExecutionContext.getHostName());
+ 
+                     Cluster pbsCluster = null;
+                     try {
+                         AuthenticationInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
+                         String installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
+                         if (installedParentPath == null) {
+                             installedParentPath = "/";
+                         }
+ 
+                         SSHCredential credentials =((TokenizedSSHAuthInfo)tokenizedSSHAuthInfo).getCredentials();// this is just a call to get and set credentials in to this object,data will be used
 -                        if(credentials.getPrivateKey()==null || credentials.getPublicKey()==null){
++                        if(credentials.getPrivateKey()==null || credentials.getPublicKey()==null || securityProtocol == SecurityProtocol.USERNAME_PASSWORD){
+                             // now we fall back to username password authentication
+                             Properties configurationProperties = ServerSettings.getProperties();
+                             tokenizedSSHAuthInfo = new DefaultPasswordAuthenticationInfo(configurationProperties.getProperty(Constants.SSH_PASSWORD));
+                         }
+                         // This should be the login user name from compute resource preference
+                         String loginUser = jobExecutionContext.getLoginUserName();
+                         if (loginUser == null) {
+                             loginUser = credentials.getPortalUserName();
+                         }
+                         serverInfo.setUserName(loginUser);
+                         jobExecutionContext.getExperiment().setUserName(loginUser);
+ 
+ 
+                         // inside the pbsCluser object
+ 
+                         String key = loginUser + jobExecutionContext.getHostName() + serverInfo.getPort();
+                         boolean recreate = false;
+                         synchronized (clusters) {
+                             if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                                 recreate = true;
+                             } else if (clusters.containsKey(key)) {
+                                 int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                                 if (clusters.get(key).get(i).getSession().isConnected()) {
+                                     pbsCluster = clusters.get(key).get(i);
+                                 } else {
+                                     clusters.get(key).remove(i);
+                                     recreate = true;
+                                 }
+                                 if (!recreate) {
+                                     try {
+                                         pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                                     } catch (Exception e) {
+                                         clusters.get(key).remove(i);
+                                         logger.info("Connection found the connection map is expired, so we create from the scratch");
+                                         maxClusterCount++;
+                                         recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                                     }
+                                 }
+                                 logger.info("Re-using the same connection used with the connection string:" + key);
+                             } else {
+                                 recreate = true;
+                             }
+                             if (recreate) {
+                             	 JobManagerConfiguration jConfig = null;
+                                  String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
+                                  if (jobManager == null) {
+                                      logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
+                                      jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                                  } else {
+                                      if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                          jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                                      } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                          jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
+                                      } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                          jConfig = CommonUtils.getUGEJobManager(installedParentPath);
+                                      } else if (LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                          jConfig = CommonUtils.getLSFJobManager(installedParentPath);
+                                      }
+                                  }
+ 
+                                 pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,jConfig);
+                                 List<Cluster> pbsClusters = null;
+                                 if (!(clusters.containsKey(key))) {
+                                     pbsClusters = new ArrayList<Cluster>();
+                                 } else {
+                                     pbsClusters = clusters.get(key);
+                                 }
+                                 pbsClusters.add(pbsCluster);
+                                 clusters.put(key, pbsClusters);
+                             }
+                         }
+                     } catch (Exception e) {
+                         throw new GFacException("Error occurred...", e);
+                     }
+                     sshSecurityContext.setPbsCluster(pbsCluster);
+                     jobExecutionContext.addSecurityContext(jobExecutionContext.getHostName(), sshSecurityContext);
+                 }
+             } catch (AppCatalogException e) {
+                 throw new GFacException("Error while getting SSH Submission object from app catalog", e);
+             }
+         }
+     }
+ 
+     /**
+      * This method can be used to add third party resource security contexts
+      * @param jobExecutionContext
+      * @param sshAuth
+      * @throws GFacException
+      * @throws ApplicationSettingsException
+      */
+     public static void addSecurityContext(JobExecutionContext jobExecutionContext,SSHAuthWrapper sshAuth) throws GFacException, ApplicationSettingsException {
+         try {
+             if(sshAuth== null) {
+                 throw new GFacException("Error adding security Context, because sshAuthWrapper is null");
+             }
+             SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
+             AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
+             JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+             SSHJobSubmission sshJobSubmission = null;
+ 			try {
+ 				sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId());
+ 			} catch (Exception e1) {
+ 				 logger.error("Not able to get SSHJobSubmission from registry");
+ 			}
+ 
+             Cluster pbsCluster = null;
+             String key=sshAuth.getKey();
+             boolean recreate = false;
+             synchronized (clusters) {
+                 if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                     recreate = true;
+                 } else if (clusters.containsKey(key)) {
+                     int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                     if (clusters.get(key).get(i).getSession().isConnected()) {
+                         pbsCluster = clusters.get(key).get(i);
+                     } else {
+                         clusters.get(key).remove(i);
+                         recreate = true;
+                     }
+                     if (!recreate) {
+                         try {
+                             pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                         } catch (Exception e) {
+                             clusters.get(key).remove(i);
+                             logger.info("Connection found the connection map is expired, so we create from the scratch");
+                             maxClusterCount++;
+                             recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                         }
+                     }
+                     logger.info("Re-using the same connection used with the connection string:" + key);
+                 } else {
+                     recreate = true;
+                 }
+                 if (recreate) {
+                	 JobManagerConfiguration jConfig = null;
+                	 String installedParentPath = null;
+                	 if(jobExecutionContext.getResourceJobManager()!= null){
+                		installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
+                	 }
+                  if (installedParentPath == null) {
+                      installedParentPath = "/";
+                  }
+ 					if (sshJobSubmission != null) {
+ 						String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
+ 						if (jobManager == null) {
+ 							logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
+ 							jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+ 						} else {
+ 							if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+ 								jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+ 							} else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+ 								jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
+ 							} else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+ 								jConfig = CommonUtils.getUGEJobManager(installedParentPath);
+ 							} else if (LSF_JOB_MANAGER.equals(jobManager)) {
+ 								jConfig = CommonUtils.getLSFJobManager(installedParentPath);
+ 							}
+ 						}
+ 					}
+                     pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),jConfig);
+                     key = sshAuth.getKey();
+                     List<Cluster> pbsClusters = null;
+                     if (!(clusters.containsKey(key))) {
+                         pbsClusters = new ArrayList<Cluster>();
+                     } else {
+                         pbsClusters = clusters.get(key);
+                     }
+                     pbsClusters.add(pbsCluster);
+                     clusters.put(key, pbsClusters);
+                 }
+             }
+             sshSecurityContext.setPbsCluster(pbsCluster);
+             jobExecutionContext.addSecurityContext(key, sshSecurityContext);
+         } catch (Exception e) {
+             logger.error(e.getMessage(), e);
+             throw new GFacException("Error adding security Context", e);
+         }
+     }
+ 
+ 
+     public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) throws AppCatalogException, ApplicationSettingsException {
+         JobDescriptor jobDescriptor = new JobDescriptor();
+         TaskDetails taskData = jobExecutionContext.getTaskData();
+ 
+ 
+         // set email based job monitoring email  address if monitor mode is JOB_EMAIL_NOTIFICATION_MONITOR
+         boolean addJobNotifMail = isEmailBasedJobMonitor(jobExecutionContext);
+         String emailIds = null;
+         if (addJobNotifMail) {
+             emailIds = ServerSettings.getEmailBasedMonitorAddress();
+         }
+         // add all configured job notification email addresses.
+         if (ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")) {
+             String flags = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS);
+             if (flags != null && jobExecutionContext.getApplicationContext().getComputeResourceDescription().getHostName().equals("stampede.tacc.xsede.org")) {
+                 flags = "ALL";
+             }
+             jobDescriptor.setMailOptions(flags);
+ 
+             String userJobNotifEmailIds = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
+             if (userJobNotifEmailIds != null && !userJobNotifEmailIds.isEmpty()) {
+                 if (emailIds != null && !emailIds.isEmpty()) {
+                     emailIds += ("," + userJobNotifEmailIds);
+                 } else {
+                     emailIds = userJobNotifEmailIds;
+                 }
+             }
+ 
+             if (taskData.isEnableEmailNotification()) {
+                 List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
+                 String elist = GFacUtils.listToCsv(emailList, ',');
+                 if (elist != null && !elist.isEmpty()) {
+                     if (emailIds != null && !emailIds.isEmpty()) {
+                         emailIds = emailIds + "," + elist;
+                     } else {
+                         emailIds = elist;
+                     }
+                 }
+             }
+         }
+         if (emailIds != null && !emailIds.isEmpty()) {
+             logger.info("Email list: " + emailIds);
+             jobDescriptor.setMailAddress(emailIds);
+         }
+         // this is common for any application descriptor
+ 
+         jobDescriptor.setCallBackIp(ServerSettings.getIp());
+         jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
+         jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
+         jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
+         jobDescriptor.setExecutablePath(jobExecutionContext.getApplicationContext()
+                 .getApplicationDeploymentDescription().getExecutablePath());
+         jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
+         jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
+         String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
+         if (computationalProjectAccount == null){
+             ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
+             if (computeResourcePreference != null) {
+                 computationalProjectAccount = computeResourcePreference.getAllocationProjectNumber();
+             }
+         }
+         if (computationalProjectAccount != null) {
+             jobDescriptor.setAcountString(computationalProjectAccount);
+         }
+         // To make job name alpha numeric
+         jobDescriptor.setJobName("A" + String.valueOf(generateJobName()));
+         jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
+ 
+         List<String> inputValues = new ArrayList<String>();
+         MessageContext input = jobExecutionContext.getInMessageContext();
+ 
+         // sort the inputs first and then build the command ListR
+         Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
+             @Override
+             public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
+                 return inputDataObjectType.getInputOrder() - t1.getInputOrder();
+             }
+         };
+         Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
+         for (Object object : input.getParameters().values()) {
+             if (object instanceof InputDataObjectType) {
+                 InputDataObjectType inputDOT = (InputDataObjectType) object;
+                 sortedInputSet.add(inputDOT);
+             }
+         }
+         for (InputDataObjectType inputDataObjectType : sortedInputSet) {
+             if (!inputDataObjectType.isRequiredToAddedToCommandLine()) {
+                 continue;
+             }
+             if (inputDataObjectType.getApplicationArgument() != null
+                     && !inputDataObjectType.getApplicationArgument().equals("")) {
+                 inputValues.add(inputDataObjectType.getApplicationArgument());
+             }
+ 
+             if (inputDataObjectType.getValue() != null
+                     && !inputDataObjectType.getValue().equals("")) {
+                 if (inputDataObjectType.getType() == DataType.URI) {
+                     // set only the relative path
+                     String filePath = inputDataObjectType.getValue();
+                     filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                     inputValues.add(filePath);
+                 }else {
+                     inputValues.add(inputDataObjectType.getValue());
+                 }
+ 
+             }
+         }
+         Map<String, Object> outputParams = jobExecutionContext.getOutMessageContext().getParameters();
+         for (Object outputParam : outputParams.values()) {
+             if (outputParam instanceof OutputDataObjectType) {
+                 OutputDataObjectType output = (OutputDataObjectType) outputParam;
+                 if (output.getApplicationArgument() != null
+                         && !output.getApplicationArgument().equals("")) {
+                     inputValues.add(output.getApplicationArgument());
+                 }
+                 if (output.getValue() != null && !output.getValue().equals("") && output.isRequiredToAddedToCommandLine()) {
+                     if (output.getType() == DataType.URI){
+                         String filePath = output.getValue();
+                         filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                         inputValues.add(filePath);
+                     }
+                 }
+             }
+         }
+ 
+         jobDescriptor.setInputValues(inputValues);
+         jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
+         jobDescriptor.setShellName("/bin/bash");
+         jobDescriptor.setAllEnvExport(true);
+         jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
+ 
+         ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
+ 
+ 
+         ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
+         if (taskScheduling != null) {
+             int totalNodeCount = taskScheduling.getNodeCount();
+             int totalCPUCount = taskScheduling.getTotalCPUCount();
+ 
+ 
+             if (taskScheduling.getComputationalProjectAccount() != null) {
+                 jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+             }
+             if (taskScheduling.getQueueName() != null) {
+                 jobDescriptor.setQueueName(taskScheduling.getQueueName());
+             }
+ 
+             if (totalNodeCount > 0) {
+                 jobDescriptor.setNodes(totalNodeCount);
+             }
+             if (taskScheduling.getComputationalProjectAccount() != null) {
+                 jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+             }
+             if (taskScheduling.getQueueName() != null) {
+                 jobDescriptor.setQueueName(taskScheduling.getQueueName());
+             }
+             if (totalCPUCount > 0) {
+                 int ppn = totalCPUCount / totalNodeCount;
+                 jobDescriptor.setProcessesPerNode(ppn);
+                 jobDescriptor.setCPUCount(totalCPUCount);
+             }
+             if (taskScheduling.getWallTimeLimit() > 0) {
+                 jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
+                 if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
+                     jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
+                 }
+             }
+             if (taskScheduling.getTotalPhysicalMemory() > 0) {
+                 jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
+             }
+         } else {
+             logger.error("Task scheduling cannot be null at this point..");
+         }
+         ApplicationDeploymentDescription appDepDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+         List<String> moduleCmds = appDepDescription.getModuleLoadCmds();
+         if (moduleCmds != null) {
+             for (String moduleCmd : moduleCmds) {
+                 jobDescriptor.addModuleLoadCommands(moduleCmd);
+             }
+         }
+         List<String> preJobCommands = appDepDescription.getPreJobCommands();
+         if (preJobCommands != null) {
+             for (String preJobCommand : preJobCommands) {
+                 jobDescriptor.addPreJobCommand(parseCommand(preJobCommand, jobExecutionContext));
+             }
+         }
+ 
+         List<String> postJobCommands = appDepDescription.getPostJobCommands();
+         if (postJobCommands != null) {
+             for (String postJobCommand : postJobCommands) {
+                 jobDescriptor.addPostJobCommand(parseCommand(postJobCommand, jobExecutionContext));
+             }
+         }
+ 
+         ApplicationParallelismType parallelism = appDepDescription.getParallelism();
+         if (parallelism != null){
+             if (parallelism == ApplicationParallelismType.MPI || parallelism == ApplicationParallelismType.OPENMP || parallelism == ApplicationParallelismType.OPENMP_MPI){
+                 Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
+                 if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
+                     for (JobManagerCommand command : jobManagerCommands.keySet()) {
+                         if (command == JobManagerCommand.SUBMISSION) {
+                             String commandVal = jobManagerCommands.get(command);
+                             jobDescriptor.setJobSubmitter(commandVal);
+                         }
+                     }
+                 }
+             }
+         }
+         return jobDescriptor;
+     }
+ 
+     public static boolean isEmailBasedJobMonitor(JobExecutionContext jobExecutionContext) throws AppCatalogException {
+         if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+             String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
+             SSHJobSubmission sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
+             MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+             return monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR;
+         } else {
+             return false;
+         }
+     }
+ 
+     private static int generateJobName() {
+         Random random = new Random();
+         int i = random.nextInt(Integer.MAX_VALUE);
+         i = i + 99999999;
+         if(i<0) {
+             i = i * (-1);
+         }
+         return i;
+     }
+ 
+     private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
+         String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
+         parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
+         parsedValue = parsedValue.replaceAll("\\$outputDir", jobExecutionContext.getOutputDir());
+         return parsedValue;
+     }
+     /**
+      * This method can be used to set the Security Context if its not set and later use it in other places
+      * @param jobExecutionContext
+      * @param authenticationInfo
+      * @param userName
+      * @param hostName
+      * @param port
+      * @return
+      * @throws GFacException
+      */
+     public static String prepareSecurityContext(JobExecutionContext jobExecutionContext, AuthenticationInfo authenticationInfo
+             , String userName, String hostName, int port) throws GFacException {
+         ServerInfo serverInfo = new ServerInfo(userName, hostName);
+         String key = userName+hostName+port;
+         SSHAuthWrapper sshAuthWrapper = new SSHAuthWrapper(serverInfo, authenticationInfo, key);
+         if (jobExecutionContext.getSecurityContext(key) == null) {
+             try {
+                 GFACSSHUtils.addSecurityContext(jobExecutionContext, sshAuthWrapper);
+             } catch (ApplicationSettingsException e) {
+                 logger.error(e.getMessage());
+                 try {
+                     StringWriter errors = new StringWriter();
+                     e.printStackTrace(new PrintWriter(errors));
+                     GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                 } catch (GFacException e1) {
+                     logger.error(e1.getLocalizedMessage());
+                 }
+                 throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+             }
+         }
+         return key;
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index 0000000,73a6e4a..38981aa
mode 000000,100644..100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@@ -1,0 -1,252 +1,252 @@@
+ ///*
+ // *
+ // * 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.core.gfac.services.impl;
+ //
+ //import org.apache.airavata.commons.gfac.type.ActualParameter;
+ //import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+ //import org.apache.airavata.commons.gfac.type.HostDescription;
+ //import org.apache.airavata.commons.gfac.type.ServiceDescription;
+ //import org.apache.airavata.gfac.GFacConfiguration;
+ //import org.apache.airavata.gfac.GFacException;
+ //import org.apache.airavata.gfac.SecurityContext;
+ //import org.apache.airavata.gfac.core.context.ApplicationContext;
+ //import org.apache.airavata.gfac.core.context.JobExecutionContext;
+ //import org.apache.airavata.gfac.core.context.MessageContext;
+ //import org.apache.airavata.gfac.impl.BetterGfacImpl;
+ //import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+ //import org.apache.airavata.gfac.ssh.api.Cluster;
+ //import org.apache.airavata.gfac.ssh.api.SSHApiException;
+ //import org.apache.airavata.gfac.ssh.api.ServerInfo;
+ //import AuthenticationInfo;
+ //import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+ //import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+ //import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+ //import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+ //import org.apache.airavata.gfac.ssh.util.CommonUtils;
+ //import org.apache.airavata.model.workspace.experiment.TaskDetails;
 -//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
++//import org.apache.airavata.experiment.registry.jpa.impl.RegistryFactory;
+ //import org.apache.airavata.schemas.gfac.*;
+ //import org.testng.annotations.BeforeClass;
+ //import org.testng.annotations.Test;
+ //
+ //import java.io.File;
+ //import java.net.URL;
+ //import java.util.ArrayList;
+ //import java.util.Date;
+ //import java.util.List;
+ //import java.util.UUID;
+ //
+ //public class BigRed2TestWithSSHAuth {
+ //    private JobExecutionContext jobExecutionContext;
+ //
+ //    private String userName;
+ //    private String password;
+ //    private String passPhrase;
+ //    private String hostName;
+ //    private String workingDirectory;
+ //    private String privateKeyPath;
+ //    private String publicKeyPath;
+ //
+ //    @BeforeClass
+ //    public void setUp() throws Exception {
+ //
+ //        System.out.println("Test case name " + this.getClass().getName());
+ ////        System.setProperty("ssh.host","bigred2.uits.iu.edu");        //default ssh host
+ ////        System.setProperty("ssh.user", "lginnali");
+ ////        System.setProperty("ssh.private.key.path", "/Users/lahirugunathilake/.ssh/id_dsa");
+ ////        System.setProperty("ssh.public.key.path", "/Users/lahirugunathilake/.ssh/id_dsa.pub");
+ ////        System.setProperty("ssh.working.directory", "/tmp");
+ //
+ //        this.hostName = "bigred2.uits.iu.edu";
+ //        this.hostName = System.getProperty("ssh.host");
+ //        this.userName = System.getProperty("ssh.username");
+ //        this.password = System.getProperty("ssh.password");
+ //        this.privateKeyPath = System.getProperty("private.ssh.key");
+ //        this.publicKeyPath = System.getProperty("public.ssh.key");
+ //        this.passPhrase = System.getProperty("ssh.keypass");
+ //        this.workingDirectory = System.getProperty("ssh.working.directory");
+ //
+ //
+ //         if (this.userName == null
+ //                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
+ //            System.out.println("########### In order to test you have to either username password or private,public keys");
+ //            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
+ //                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
+ //        }
+ //        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+ //        assert resource != null;
+ //        System.out.println(resource.getFile());
+ //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+ //
+ ////        gFacConfiguration.setMyProxyLifeCycle(3600);
+ ////        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
+ ////        gFacConfiguration.setMyProxyUser("*****");
+ ////        gFacConfiguration.setMyProxyPassphrase("*****");
+ ////        gFacConfiguration.setTrustedCertLocation("./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"}));
+ //
+ //        /*
+ //        * Host
+ //        */
+ //        HostDescription host = new HostDescription(SSHHostType.type);
+ //        host.getType().setHostAddress(hostName);
+ //        host.getType().setHostName(hostName);
+ //        ((SSHHostType)host.getType()).setHpcResource(true);
+ //        /*
+ //        * App
+ //        */
+ //        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+ //        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+ //        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+ //        name.setStringValue("EchoLocal");
+ //        app.setApplicationName(name);
+ //
+ //        app.setCpuCount(1);
+ //        app.setJobType(JobTypeType.SERIAL);
+ //        app.setNodeCount(1);
+ //        app.setProcessorsPerNode(1);
+ //
+ //        /*
+ //        * Use bat file if it is compiled on Windows
+ //        */
+ //        app.setExecutableLocation("/bin/echo");
+ //
+ //        /*
+ //        * Default tmp location
+ //        */
+ //        String tempDir = "/tmp";
+ //        String date = (new Date()).toString();
+ //        date = date.replaceAll(" ", "_");
+ //        date = date.replaceAll(":", "_");
+ //
+ //        tempDir = tempDir + File.separator
+ //                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+ //
+ //        System.out.println(tempDir);
+ //        app.setScratchWorkingDirectory(tempDir);
+ //        app.setStaticWorkingDirectory(tempDir);
+ //        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+ //        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+ //        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+ //        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+ //        app.setMaxWallTime(5);
+ //        app.setJobSubmitterCommand("aprun -n 1");
+ //        app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
+ //
+ //        /*
+ //        * Service
+ //        */
+ //        ServiceDescription serv = new ServiceDescription();
+ //        serv.getType().setName("SimpleEcho");
+ //
+ //        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+ //
+ //        InputParameterType input = InputParameterType.Factory.newInstance();
+ //        input.setParameterName("echo_input");
+ //        input.setParameterType(StringParameterType.Factory.newInstance());
+ //        inputList.add(input);
+ //
+ //        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+ //
+ //                .size()]);
+ //        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+ //        OutputParameterType output = OutputParameterType.Factory.newInstance();
+ //        output.setParameterName("echo_output");
+ //        output.setParameterType(StringParameterType.Factory.newInstance());
+ //        outputList.add(output);
+ //
+ //        OutputParameterType[] outputParamList = outputList
+ //                .toArray(new OutputParameterType[outputList.size()]);
+ //
+ //        serv.getType().setInputParametersArray(inputParamList);
+ //        serv.getType().setOutputParametersArray(outputParamList);
+ //
+ //        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+ //        // Adding security context
+ //        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
+ //        ApplicationContext applicationContext = new ApplicationContext();
+ //        jobExecutionContext.setApplicationContext(applicationContext);
+ //        applicationContext.setServiceDescription(serv);
+ //        applicationContext.setApplicationDeploymentDescription(appDesc);
+ //        applicationContext.setHostDescription(host);
+ //
+ //        MessageContext inMessage = new MessageContext();
+ //        ActualParameter echo_input = new ActualParameter();
+ //        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+ //        inMessage.addParameter("echo_input", echo_input);
+ //
+ //
+ //        jobExecutionContext.setInMessageContext(inMessage);
+ //
+ //        MessageContext outMessage = new MessageContext();
+ //        ActualParameter echo_out = new ActualParameter();
+ ////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+ //        outMessage.addParameter("echo_output", echo_out);
+ //        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+ //        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+ //        jobExecutionContext.setOutMessageContext(outMessage);
+ //
+ //    }
+ //
+ //
+ //    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+ //         try {
+ //
+ //        AuthenticationInfo authenticationInfo = null;
+ //        if (password != null) {
+ //            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+ //        } else {
+ //            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+ //                    this.passPhrase);
+ //        }
+ //        // Server info
+ //        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+ //
+ //        Cluster pbsCluster = null;
+ //        SSHSecurityContext sshSecurityContext = null;
+ //
+ //            JobManagerConfiguration pbsJobManager = CommonUtils.getPBSJobManager(app.getInstalledParentPath());
+ //            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, pbsJobManager);
+ //
+ //
+ //            sshSecurityContext = new SSHSecurityContext();
+ //            sshSecurityContext.setPbsCluster(pbsCluster);
+ //            sshSecurityContext.setUsername(userName);
+ //            sshSecurityContext.setKeyPass(passPhrase);
+ //            sshSecurityContext.setPrivateKeyLoc(privateKeyPath);
+ //             return sshSecurityContext;
+ //        } catch (SSHApiException e) {
+ //            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+ //        }
+ //        return null;
+ //    }
+ //
+ //    @Test
+ //    public void testSSHProvider() throws GFacException {
+ //        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+ //        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+ //        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
+ //        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
+ //    }
+ //
+ //}


[53/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/LICENSE b/modules/distribution/server/src/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/modules/distribution/server/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-    Ever

<TRUNCATED>

[45/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
new file mode 100644
index 0000000..5a80c25
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
@@ -0,0 +1,1421 @@
+/*
+ * XML Type:  pbsParams
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PbsParams
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML pbsParams(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface PbsParams extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PbsParams.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("pbsparams7913type");
+    
+    /**
+     * Gets the "jobID" element
+     */
+    java.lang.String getJobID();
+    
+    /**
+     * Gets (as xml) the "jobID" element
+     */
+    org.apache.xmlbeans.XmlString xgetJobID();
+    
+    /**
+     * True if has "jobID" element
+     */
+    boolean isSetJobID();
+    
+    /**
+     * Sets the "jobID" element
+     */
+    void setJobID(java.lang.String jobID);
+    
+    /**
+     * Sets (as xml) the "jobID" element
+     */
+    void xsetJobID(org.apache.xmlbeans.XmlString jobID);
+    
+    /**
+     * Unsets the "jobID" element
+     */
+    void unsetJobID();
+    
+    /**
+     * Gets the "userName" element
+     */
+    java.lang.String getUserName();
+    
+    /**
+     * Gets (as xml) the "userName" element
+     */
+    org.apache.xmlbeans.XmlString xgetUserName();
+    
+    /**
+     * True if has "userName" element
+     */
+    boolean isSetUserName();
+    
+    /**
+     * Sets the "userName" element
+     */
+    void setUserName(java.lang.String userName);
+    
+    /**
+     * Sets (as xml) the "userName" element
+     */
+    void xsetUserName(org.apache.xmlbeans.XmlString userName);
+    
+    /**
+     * Unsets the "userName" element
+     */
+    void unsetUserName();
+    
+    /**
+     * Gets the "shellName" element
+     */
+    java.lang.String getShellName();
+    
+    /**
+     * Gets (as xml) the "shellName" element
+     */
+    org.apache.xmlbeans.XmlString xgetShellName();
+    
+    /**
+     * True if has "shellName" element
+     */
+    boolean isSetShellName();
+    
+    /**
+     * Sets the "shellName" element
+     */
+    void setShellName(java.lang.String shellName);
+    
+    /**
+     * Sets (as xml) the "shellName" element
+     */
+    void xsetShellName(org.apache.xmlbeans.XmlString shellName);
+    
+    /**
+     * Unsets the "shellName" element
+     */
+    void unsetShellName();
+    
+    /**
+     * Gets the "queueName" element
+     */
+    java.lang.String getQueueName();
+    
+    /**
+     * Gets (as xml) the "queueName" element
+     */
+    org.apache.xmlbeans.XmlString xgetQueueName();
+    
+    /**
+     * True if has "queueName" element
+     */
+    boolean isSetQueueName();
+    
+    /**
+     * Sets the "queueName" element
+     */
+    void setQueueName(java.lang.String queueName);
+    
+    /**
+     * Sets (as xml) the "queueName" element
+     */
+    void xsetQueueName(org.apache.xmlbeans.XmlString queueName);
+    
+    /**
+     * Unsets the "queueName" element
+     */
+    void unsetQueueName();
+    
+    /**
+     * Gets the "jobName" element
+     */
+    java.lang.String getJobName();
+    
+    /**
+     * Gets (as xml) the "jobName" element
+     */
+    org.apache.xmlbeans.XmlString xgetJobName();
+    
+    /**
+     * True if has "jobName" element
+     */
+    boolean isSetJobName();
+    
+    /**
+     * Sets the "jobName" element
+     */
+    void setJobName(java.lang.String jobName);
+    
+    /**
+     * Sets (as xml) the "jobName" element
+     */
+    void xsetJobName(org.apache.xmlbeans.XmlString jobName);
+    
+    /**
+     * Unsets the "jobName" element
+     */
+    void unsetJobName();
+    
+    /**
+     * Gets the "allEnvExport" element
+     */
+    boolean getAllEnvExport();
+    
+    /**
+     * Gets (as xml) the "allEnvExport" element
+     */
+    org.apache.xmlbeans.XmlBoolean xgetAllEnvExport();
+    
+    /**
+     * True if has "allEnvExport" element
+     */
+    boolean isSetAllEnvExport();
+    
+    /**
+     * Sets the "allEnvExport" element
+     */
+    void setAllEnvExport(boolean allEnvExport);
+    
+    /**
+     * Sets (as xml) the "allEnvExport" element
+     */
+    void xsetAllEnvExport(org.apache.xmlbeans.XmlBoolean allEnvExport);
+    
+    /**
+     * Unsets the "allEnvExport" element
+     */
+    void unsetAllEnvExport();
+    
+    /**
+     * Gets the "mailOptions" element
+     */
+    java.lang.String getMailOptions();
+    
+    /**
+     * Gets (as xml) the "mailOptions" element
+     */
+    org.apache.xmlbeans.XmlString xgetMailOptions();
+    
+    /**
+     * True if has "mailOptions" element
+     */
+    boolean isSetMailOptions();
+    
+    /**
+     * Sets the "mailOptions" element
+     */
+    void setMailOptions(java.lang.String mailOptions);
+    
+    /**
+     * Sets (as xml) the "mailOptions" element
+     */
+    void xsetMailOptions(org.apache.xmlbeans.XmlString mailOptions);
+    
+    /**
+     * Unsets the "mailOptions" element
+     */
+    void unsetMailOptions();
+    
+    /**
+     * Gets the "mailAddress" element
+     */
+    java.lang.String getMailAddress();
+    
+    /**
+     * Gets (as xml) the "mailAddress" element
+     */
+    org.apache.xmlbeans.XmlString xgetMailAddress();
+    
+    /**
+     * True if has "mailAddress" element
+     */
+    boolean isSetMailAddress();
+    
+    /**
+     * Sets the "mailAddress" element
+     */
+    void setMailAddress(java.lang.String mailAddress);
+    
+    /**
+     * Sets (as xml) the "mailAddress" element
+     */
+    void xsetMailAddress(org.apache.xmlbeans.XmlString mailAddress);
+    
+    /**
+     * Unsets the "mailAddress" element
+     */
+    void unsetMailAddress();
+    
+    /**
+     * Gets the "partition" element
+     */
+    java.lang.String getPartition();
+    
+    /**
+     * Gets (as xml) the "partition" element
+     */
+    org.apache.xmlbeans.XmlString xgetPartition();
+    
+    /**
+     * True if has "partition" element
+     */
+    boolean isSetPartition();
+    
+    /**
+     * Sets the "partition" element
+     */
+    void setPartition(java.lang.String partition);
+    
+    /**
+     * Sets (as xml) the "partition" element
+     */
+    void xsetPartition(org.apache.xmlbeans.XmlString partition);
+    
+    /**
+     * Unsets the "partition" element
+     */
+    void unsetPartition();
+    
+    /**
+     * Gets the "mailType" element
+     */
+    java.lang.String getMailType();
+    
+    /**
+     * Gets (as xml) the "mailType" element
+     */
+    org.apache.xmlbeans.XmlString xgetMailType();
+    
+    /**
+     * True if has "mailType" element
+     */
+    boolean isSetMailType();
+    
+    /**
+     * Sets the "mailType" element
+     */
+    void setMailType(java.lang.String mailType);
+    
+    /**
+     * Sets (as xml) the "mailType" element
+     */
+    void xsetMailType(org.apache.xmlbeans.XmlString mailType);
+    
+    /**
+     * Unsets the "mailType" element
+     */
+    void unsetMailType();
+    
+    /**
+     * Gets the "acountString" element
+     */
+    java.lang.String getAcountString();
+    
+    /**
+     * Gets (as xml) the "acountString" element
+     */
+    org.apache.xmlbeans.XmlString xgetAcountString();
+    
+    /**
+     * True if has "acountString" element
+     */
+    boolean isSetAcountString();
+    
+    /**
+     * Sets the "acountString" element
+     */
+    void setAcountString(java.lang.String acountString);
+    
+    /**
+     * Sets (as xml) the "acountString" element
+     */
+    void xsetAcountString(org.apache.xmlbeans.XmlString acountString);
+    
+    /**
+     * Unsets the "acountString" element
+     */
+    void unsetAcountString();
+    
+    /**
+     * Gets the "maxWallTime" element
+     */
+    java.lang.String getMaxWallTime();
+    
+    /**
+     * Gets (as xml) the "maxWallTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetMaxWallTime();
+    
+    /**
+     * True if has "maxWallTime" element
+     */
+    boolean isSetMaxWallTime();
+    
+    /**
+     * Sets the "maxWallTime" element
+     */
+    void setMaxWallTime(java.lang.String maxWallTime);
+    
+    /**
+     * Sets (as xml) the "maxWallTime" element
+     */
+    void xsetMaxWallTime(org.apache.xmlbeans.XmlString maxWallTime);
+    
+    /**
+     * Unsets the "maxWallTime" element
+     */
+    void unsetMaxWallTime();
+    
+    /**
+     * Gets the "standardOutFile" element
+     */
+    java.lang.String getStandardOutFile();
+    
+    /**
+     * Gets (as xml) the "standardOutFile" element
+     */
+    org.apache.xmlbeans.XmlString xgetStandardOutFile();
+    
+    /**
+     * True if has "standardOutFile" element
+     */
+    boolean isSetStandardOutFile();
+    
+    /**
+     * Sets the "standardOutFile" element
+     */
+    void setStandardOutFile(java.lang.String standardOutFile);
+    
+    /**
+     * Sets (as xml) the "standardOutFile" element
+     */
+    void xsetStandardOutFile(org.apache.xmlbeans.XmlString standardOutFile);
+    
+    /**
+     * Unsets the "standardOutFile" element
+     */
+    void unsetStandardOutFile();
+    
+    /**
+     * Gets the "standardErrorFile" element
+     */
+    java.lang.String getStandardErrorFile();
+    
+    /**
+     * Gets (as xml) the "standardErrorFile" element
+     */
+    org.apache.xmlbeans.XmlString xgetStandardErrorFile();
+    
+    /**
+     * True if has "standardErrorFile" element
+     */
+    boolean isSetStandardErrorFile();
+    
+    /**
+     * Sets the "standardErrorFile" element
+     */
+    void setStandardErrorFile(java.lang.String standardErrorFile);
+    
+    /**
+     * Sets (as xml) the "standardErrorFile" element
+     */
+    void xsetStandardErrorFile(org.apache.xmlbeans.XmlString standardErrorFile);
+    
+    /**
+     * Unsets the "standardErrorFile" element
+     */
+    void unsetStandardErrorFile();
+    
+    /**
+     * Gets the "outputDirectory" element
+     */
+    java.lang.String getOutputDirectory();
+    
+    /**
+     * Gets (as xml) the "outputDirectory" element
+     */
+    org.apache.xmlbeans.XmlString xgetOutputDirectory();
+    
+    /**
+     * True if has "outputDirectory" element
+     */
+    boolean isSetOutputDirectory();
+    
+    /**
+     * Sets the "outputDirectory" element
+     */
+    void setOutputDirectory(java.lang.String outputDirectory);
+    
+    /**
+     * Sets (as xml) the "outputDirectory" element
+     */
+    void xsetOutputDirectory(org.apache.xmlbeans.XmlString outputDirectory);
+    
+    /**
+     * Unsets the "outputDirectory" element
+     */
+    void unsetOutputDirectory();
+    
+    /**
+     * Gets the "inputDirectory" element
+     */
+    java.lang.String getInputDirectory();
+    
+    /**
+     * Gets (as xml) the "inputDirectory" element
+     */
+    org.apache.xmlbeans.XmlString xgetInputDirectory();
+    
+    /**
+     * True if has "inputDirectory" element
+     */
+    boolean isSetInputDirectory();
+    
+    /**
+     * Sets the "inputDirectory" element
+     */
+    void setInputDirectory(java.lang.String inputDirectory);
+    
+    /**
+     * Sets (as xml) the "inputDirectory" element
+     */
+    void xsetInputDirectory(org.apache.xmlbeans.XmlString inputDirectory);
+    
+    /**
+     * Unsets the "inputDirectory" element
+     */
+    void unsetInputDirectory();
+    
+    /**
+     * Gets the "nodes" element
+     */
+    int getNodes();
+    
+    /**
+     * Gets (as xml) the "nodes" element
+     */
+    org.apache.xmlbeans.XmlInt xgetNodes();
+    
+    /**
+     * True if has "nodes" element
+     */
+    boolean isSetNodes();
+    
+    /**
+     * Sets the "nodes" element
+     */
+    void setNodes(int nodes);
+    
+    /**
+     * Sets (as xml) the "nodes" element
+     */
+    void xsetNodes(org.apache.xmlbeans.XmlInt nodes);
+    
+    /**
+     * Unsets the "nodes" element
+     */
+    void unsetNodes();
+    
+    /**
+     * Gets the "processesPerNode" element
+     */
+    int getProcessesPerNode();
+    
+    /**
+     * Gets (as xml) the "processesPerNode" element
+     */
+    org.apache.xmlbeans.XmlInt xgetProcessesPerNode();
+    
+    /**
+     * True if has "processesPerNode" element
+     */
+    boolean isSetProcessesPerNode();
+    
+    /**
+     * Sets the "processesPerNode" element
+     */
+    void setProcessesPerNode(int processesPerNode);
+    
+    /**
+     * Sets (as xml) the "processesPerNode" element
+     */
+    void xsetProcessesPerNode(org.apache.xmlbeans.XmlInt processesPerNode);
+    
+    /**
+     * Unsets the "processesPerNode" element
+     */
+    void unsetProcessesPerNode();
+    
+    /**
+     * Gets the "cpuCount" element
+     */
+    int getCpuCount();
+    
+    /**
+     * Gets (as xml) the "cpuCount" element
+     */
+    org.apache.xmlbeans.XmlInt xgetCpuCount();
+    
+    /**
+     * True if has "cpuCount" element
+     */
+    boolean isSetCpuCount();
+    
+    /**
+     * Sets the "cpuCount" element
+     */
+    void setCpuCount(int cpuCount);
+    
+    /**
+     * Sets (as xml) the "cpuCount" element
+     */
+    void xsetCpuCount(org.apache.xmlbeans.XmlInt cpuCount);
+    
+    /**
+     * Unsets the "cpuCount" element
+     */
+    void unsetCpuCount();
+    
+    /**
+     * Gets the "nodeList" element
+     */
+    java.lang.String getNodeList();
+    
+    /**
+     * Gets (as xml) the "nodeList" element
+     */
+    org.apache.xmlbeans.XmlString xgetNodeList();
+    
+    /**
+     * True if has "nodeList" element
+     */
+    boolean isSetNodeList();
+    
+    /**
+     * Sets the "nodeList" element
+     */
+    void setNodeList(java.lang.String nodeList);
+    
+    /**
+     * Sets (as xml) the "nodeList" element
+     */
+    void xsetNodeList(org.apache.xmlbeans.XmlString nodeList);
+    
+    /**
+     * Unsets the "nodeList" element
+     */
+    void unsetNodeList();
+    
+    /**
+     * Gets the "workingDirectory" element
+     */
+    java.lang.String getWorkingDirectory();
+    
+    /**
+     * Gets (as xml) the "workingDirectory" element
+     */
+    org.apache.xmlbeans.XmlString xgetWorkingDirectory();
+    
+    /**
+     * True if has "workingDirectory" element
+     */
+    boolean isSetWorkingDirectory();
+    
+    /**
+     * Sets the "workingDirectory" element
+     */
+    void setWorkingDirectory(java.lang.String workingDirectory);
+    
+    /**
+     * Sets (as xml) the "workingDirectory" element
+     */
+    void xsetWorkingDirectory(org.apache.xmlbeans.XmlString workingDirectory);
+    
+    /**
+     * Unsets the "workingDirectory" element
+     */
+    void unsetWorkingDirectory();
+    
+    /**
+     * Gets the "executablePath" element
+     */
+    java.lang.String getExecutablePath();
+    
+    /**
+     * Gets (as xml) the "executablePath" element
+     */
+    org.apache.xmlbeans.XmlString xgetExecutablePath();
+    
+    /**
+     * True if has "executablePath" element
+     */
+    boolean isSetExecutablePath();
+    
+    /**
+     * Sets the "executablePath" element
+     */
+    void setExecutablePath(java.lang.String executablePath);
+    
+    /**
+     * Sets (as xml) the "executablePath" element
+     */
+    void xsetExecutablePath(org.apache.xmlbeans.XmlString executablePath);
+    
+    /**
+     * Unsets the "executablePath" element
+     */
+    void unsetExecutablePath();
+    
+    /**
+     * Gets the "inputs" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.InputList getInputs();
+    
+    /**
+     * Sets the "inputs" element
+     */
+    void setInputs(org.apache.airavata.gfac.core.x2012.x12.InputList inputs);
+    
+    /**
+     * Appends and returns a new empty "inputs" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.InputList addNewInputs();
+    
+    /**
+     * Gets the "exports" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties getExports();
+    
+    /**
+     * Sets the "exports" element
+     */
+    void setExports(org.apache.airavata.gfac.core.x2012.x12.ExportProperties exports);
+    
+    /**
+     * Appends and returns a new empty "exports" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties addNewExports();
+    
+    /**
+     * Gets the "status" element
+     */
+    java.lang.String getStatus();
+    
+    /**
+     * Gets (as xml) the "status" element
+     */
+    org.apache.xmlbeans.XmlString xgetStatus();
+    
+    /**
+     * True if has "status" element
+     */
+    boolean isSetStatus();
+    
+    /**
+     * Sets the "status" element
+     */
+    void setStatus(java.lang.String status);
+    
+    /**
+     * Sets (as xml) the "status" element
+     */
+    void xsetStatus(org.apache.xmlbeans.XmlString status);
+    
+    /**
+     * Unsets the "status" element
+     */
+    void unsetStatus();
+    
+    /**
+     * Gets the "afterAny" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.AfterAnyList getAfterAny();
+    
+    /**
+     * True if has "afterAny" element
+     */
+    boolean isSetAfterAny();
+    
+    /**
+     * Sets the "afterAny" element
+     */
+    void setAfterAny(org.apache.airavata.gfac.core.x2012.x12.AfterAnyList afterAny);
+    
+    /**
+     * Appends and returns a new empty "afterAny" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.AfterAnyList addNewAfterAny();
+    
+    /**
+     * Unsets the "afterAny" element
+     */
+    void unsetAfterAny();
+    
+    /**
+     * Gets the "afterOKList" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.AfterOKList getAfterOKList();
+    
+    /**
+     * True if has "afterOKList" element
+     */
+    boolean isSetAfterOKList();
+    
+    /**
+     * Sets the "afterOKList" element
+     */
+    void setAfterOKList(org.apache.airavata.gfac.core.x2012.x12.AfterOKList afterOKList);
+    
+    /**
+     * Appends and returns a new empty "afterOKList" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.AfterOKList addNewAfterOKList();
+    
+    /**
+     * Unsets the "afterOKList" element
+     */
+    void unsetAfterOKList();
+    
+    /**
+     * Gets the "cTime" element
+     */
+    java.lang.String getCTime();
+    
+    /**
+     * Gets (as xml) the "cTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetCTime();
+    
+    /**
+     * True if has "cTime" element
+     */
+    boolean isSetCTime();
+    
+    /**
+     * Sets the "cTime" element
+     */
+    void setCTime(java.lang.String cTime);
+    
+    /**
+     * Sets (as xml) the "cTime" element
+     */
+    void xsetCTime(org.apache.xmlbeans.XmlString cTime);
+    
+    /**
+     * Unsets the "cTime" element
+     */
+    void unsetCTime();
+    
+    /**
+     * Gets the "qTime" element
+     */
+    java.lang.String getQTime();
+    
+    /**
+     * Gets (as xml) the "qTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetQTime();
+    
+    /**
+     * True if has "qTime" element
+     */
+    boolean isSetQTime();
+    
+    /**
+     * Sets the "qTime" element
+     */
+    void setQTime(java.lang.String qTime);
+    
+    /**
+     * Sets (as xml) the "qTime" element
+     */
+    void xsetQTime(org.apache.xmlbeans.XmlString qTime);
+    
+    /**
+     * Unsets the "qTime" element
+     */
+    void unsetQTime();
+    
+    /**
+     * Gets the "mTime" element
+     */
+    java.lang.String getMTime();
+    
+    /**
+     * Gets (as xml) the "mTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetMTime();
+    
+    /**
+     * True if has "mTime" element
+     */
+    boolean isSetMTime();
+    
+    /**
+     * Sets the "mTime" element
+     */
+    void setMTime(java.lang.String mTime);
+    
+    /**
+     * Sets (as xml) the "mTime" element
+     */
+    void xsetMTime(org.apache.xmlbeans.XmlString mTime);
+    
+    /**
+     * Unsets the "mTime" element
+     */
+    void unsetMTime();
+    
+    /**
+     * Gets the "sTime" element
+     */
+    java.lang.String getSTime();
+    
+    /**
+     * Gets (as xml) the "sTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetSTime();
+    
+    /**
+     * True if has "sTime" element
+     */
+    boolean isSetSTime();
+    
+    /**
+     * Sets the "sTime" element
+     */
+    void setSTime(java.lang.String sTime);
+    
+    /**
+     * Sets (as xml) the "sTime" element
+     */
+    void xsetSTime(org.apache.xmlbeans.XmlString sTime);
+    
+    /**
+     * Unsets the "sTime" element
+     */
+    void unsetSTime();
+    
+    /**
+     * Gets the "compTime" element
+     */
+    java.lang.String getCompTime();
+    
+    /**
+     * Gets (as xml) the "compTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetCompTime();
+    
+    /**
+     * True if has "compTime" element
+     */
+    boolean isSetCompTime();
+    
+    /**
+     * Sets the "compTime" element
+     */
+    void setCompTime(java.lang.String compTime);
+    
+    /**
+     * Sets (as xml) the "compTime" element
+     */
+    void xsetCompTime(org.apache.xmlbeans.XmlString compTime);
+    
+    /**
+     * Unsets the "compTime" element
+     */
+    void unsetCompTime();
+    
+    /**
+     * Gets the "owner" element
+     */
+    java.lang.String getOwner();
+    
+    /**
+     * Gets (as xml) the "owner" element
+     */
+    org.apache.xmlbeans.XmlString xgetOwner();
+    
+    /**
+     * True if has "owner" element
+     */
+    boolean isSetOwner();
+    
+    /**
+     * Sets the "owner" element
+     */
+    void setOwner(java.lang.String owner);
+    
+    /**
+     * Sets (as xml) the "owner" element
+     */
+    void xsetOwner(org.apache.xmlbeans.XmlString owner);
+    
+    /**
+     * Unsets the "owner" element
+     */
+    void unsetOwner();
+    
+    /**
+     * Gets the "executeNode" element
+     */
+    java.lang.String getExecuteNode();
+    
+    /**
+     * Gets (as xml) the "executeNode" element
+     */
+    org.apache.xmlbeans.XmlString xgetExecuteNode();
+    
+    /**
+     * True if has "executeNode" element
+     */
+    boolean isSetExecuteNode();
+    
+    /**
+     * Sets the "executeNode" element
+     */
+    void setExecuteNode(java.lang.String executeNode);
+    
+    /**
+     * Sets (as xml) the "executeNode" element
+     */
+    void xsetExecuteNode(org.apache.xmlbeans.XmlString executeNode);
+    
+    /**
+     * Unsets the "executeNode" element
+     */
+    void unsetExecuteNode();
+    
+    /**
+     * Gets the "ellapsedTime" element
+     */
+    java.lang.String getEllapsedTime();
+    
+    /**
+     * Gets (as xml) the "ellapsedTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetEllapsedTime();
+    
+    /**
+     * True if has "ellapsedTime" element
+     */
+    boolean isSetEllapsedTime();
+    
+    /**
+     * Sets the "ellapsedTime" element
+     */
+    void setEllapsedTime(java.lang.String ellapsedTime);
+    
+    /**
+     * Sets (as xml) the "ellapsedTime" element
+     */
+    void xsetEllapsedTime(org.apache.xmlbeans.XmlString ellapsedTime);
+    
+    /**
+     * Unsets the "ellapsedTime" element
+     */
+    void unsetEllapsedTime();
+    
+    /**
+     * Gets the "usedCPUTime" element
+     */
+    java.lang.String getUsedCPUTime();
+    
+    /**
+     * Gets (as xml) the "usedCPUTime" element
+     */
+    org.apache.xmlbeans.XmlString xgetUsedCPUTime();
+    
+    /**
+     * True if has "usedCPUTime" element
+     */
+    boolean isSetUsedCPUTime();
+    
+    /**
+     * Sets the "usedCPUTime" element
+     */
+    void setUsedCPUTime(java.lang.String usedCPUTime);
+    
+    /**
+     * Sets (as xml) the "usedCPUTime" element
+     */
+    void xsetUsedCPUTime(org.apache.xmlbeans.XmlString usedCPUTime);
+    
+    /**
+     * Unsets the "usedCPUTime" element
+     */
+    void unsetUsedCPUTime();
+    
+    /**
+     * Gets the "usedMem" element
+     */
+    java.lang.String getUsedMem();
+    
+    /**
+     * Gets (as xml) the "usedMem" element
+     */
+    org.apache.xmlbeans.XmlString xgetUsedMem();
+    
+    /**
+     * True if has "usedMem" element
+     */
+    boolean isSetUsedMem();
+    
+    /**
+     * Sets the "usedMem" element
+     */
+    void setUsedMem(java.lang.String usedMem);
+    
+    /**
+     * Sets (as xml) the "usedMem" element
+     */
+    void xsetUsedMem(org.apache.xmlbeans.XmlString usedMem);
+    
+    /**
+     * Unsets the "usedMem" element
+     */
+    void unsetUsedMem();
+    
+    /**
+     * Gets the "submitArgs" element
+     */
+    java.lang.String getSubmitArgs();
+    
+    /**
+     * Gets (as xml) the "submitArgs" element
+     */
+    org.apache.xmlbeans.XmlString xgetSubmitArgs();
+    
+    /**
+     * True if has "submitArgs" element
+     */
+    boolean isSetSubmitArgs();
+    
+    /**
+     * Sets the "submitArgs" element
+     */
+    void setSubmitArgs(java.lang.String submitArgs);
+    
+    /**
+     * Sets (as xml) the "submitArgs" element
+     */
+    void xsetSubmitArgs(org.apache.xmlbeans.XmlString submitArgs);
+    
+    /**
+     * Unsets the "submitArgs" element
+     */
+    void unsetSubmitArgs();
+    
+    /**
+     * Gets the "variableList" element
+     */
+    java.lang.String getVariableList();
+    
+    /**
+     * Gets (as xml) the "variableList" element
+     */
+    org.apache.xmlbeans.XmlString xgetVariableList();
+    
+    /**
+     * True if has "variableList" element
+     */
+    boolean isSetVariableList();
+    
+    /**
+     * Sets the "variableList" element
+     */
+    void setVariableList(java.lang.String variableList);
+    
+    /**
+     * Sets (as xml) the "variableList" element
+     */
+    void xsetVariableList(org.apache.xmlbeans.XmlString variableList);
+    
+    /**
+     * Unsets the "variableList" element
+     */
+    void unsetVariableList();
+    
+    /**
+     * Gets the "preJobCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PreJobCommands getPreJobCommands();
+    
+    /**
+     * True if has "preJobCommands" element
+     */
+    boolean isSetPreJobCommands();
+    
+    /**
+     * Sets the "preJobCommands" element
+     */
+    void setPreJobCommands(org.apache.airavata.gfac.core.x2012.x12.PreJobCommands preJobCommands);
+    
+    /**
+     * Appends and returns a new empty "preJobCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PreJobCommands addNewPreJobCommands();
+    
+    /**
+     * Unsets the "preJobCommands" element
+     */
+    void unsetPreJobCommands();
+    
+    /**
+     * Gets the "moduleLoadCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands getModuleLoadCommands();
+    
+    /**
+     * True if has "moduleLoadCommands" element
+     */
+    boolean isSetModuleLoadCommands();
+    
+    /**
+     * Sets the "moduleLoadCommands" element
+     */
+    void setModuleLoadCommands(org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands moduleLoadCommands);
+    
+    /**
+     * Appends and returns a new empty "moduleLoadCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands addNewModuleLoadCommands();
+    
+    /**
+     * Unsets the "moduleLoadCommands" element
+     */
+    void unsetModuleLoadCommands();
+    
+    /**
+     * Gets the "postJobCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PostJobCommands getPostJobCommands();
+    
+    /**
+     * True if has "postJobCommands" element
+     */
+    boolean isSetPostJobCommands();
+    
+    /**
+     * Sets the "postJobCommands" element
+     */
+    void setPostJobCommands(org.apache.airavata.gfac.core.x2012.x12.PostJobCommands postJobCommands);
+    
+    /**
+     * Appends and returns a new empty "postJobCommands" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PostJobCommands addNewPostJobCommands();
+    
+    /**
+     * Unsets the "postJobCommands" element
+     */
+    void unsetPostJobCommands();
+    
+    /**
+     * Gets the "jobSubmitterCommand" element
+     */
+    java.lang.String getJobSubmitterCommand();
+    
+    /**
+     * Gets (as xml) the "jobSubmitterCommand" element
+     */
+    org.apache.xmlbeans.XmlString xgetJobSubmitterCommand();
+    
+    /**
+     * True if has "jobSubmitterCommand" element
+     */
+    boolean isSetJobSubmitterCommand();
+    
+    /**
+     * Sets the "jobSubmitterCommand" element
+     */
+    void setJobSubmitterCommand(java.lang.String jobSubmitterCommand);
+    
+    /**
+     * Sets (as xml) the "jobSubmitterCommand" element
+     */
+    void xsetJobSubmitterCommand(org.apache.xmlbeans.XmlString jobSubmitterCommand);
+    
+    /**
+     * Unsets the "jobSubmitterCommand" element
+     */
+    void unsetJobSubmitterCommand();
+    
+    /**
+     * Gets the "callBackIp" element
+     */
+    java.lang.String getCallBackIp();
+    
+    /**
+     * Gets (as xml) the "callBackIp" element
+     */
+    org.apache.xmlbeans.XmlString xgetCallBackIp();
+    
+    /**
+     * True if has "callBackIp" element
+     */
+    boolean isSetCallBackIp();
+    
+    /**
+     * Sets the "callBackIp" element
+     */
+    void setCallBackIp(java.lang.String callBackIp);
+    
+    /**
+     * Sets (as xml) the "callBackIp" element
+     */
+    void xsetCallBackIp(org.apache.xmlbeans.XmlString callBackIp);
+    
+    /**
+     * Unsets the "callBackIp" element
+     */
+    void unsetCallBackIp();
+    
+    /**
+     * Gets the "callBackPort" element
+     */
+    java.lang.String getCallBackPort();
+    
+    /**
+     * Gets (as xml) the "callBackPort" element
+     */
+    org.apache.xmlbeans.XmlString xgetCallBackPort();
+    
+    /**
+     * True if has "callBackPort" element
+     */
+    boolean isSetCallBackPort();
+    
+    /**
+     * Sets the "callBackPort" element
+     */
+    void setCallBackPort(java.lang.String callBackPort);
+    
+    /**
+     * Sets (as xml) the "callBackPort" element
+     */
+    void xsetCallBackPort(org.apache.xmlbeans.XmlString callBackPort);
+    
+    /**
+     * Unsets the "callBackPort" element
+     */
+    void unsetCallBackPort();
+    
+    /**
+     * Gets the "chassisName" element
+     */
+    java.lang.String getChassisName();
+    
+    /**
+     * Gets (as xml) the "chassisName" element
+     */
+    org.apache.xmlbeans.XmlString xgetChassisName();
+    
+    /**
+     * True if has "chassisName" element
+     */
+    boolean isSetChassisName();
+    
+    /**
+     * Sets the "chassisName" element
+     */
+    void setChassisName(java.lang.String chassisName);
+    
+    /**
+     * Sets (as xml) the "chassisName" element
+     */
+    void xsetChassisName(org.apache.xmlbeans.XmlString chassisName);
+    
+    /**
+     * Unsets the "chassisName" element
+     */
+    void unsetChassisName();
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PbsParams parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PbsParams) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
new file mode 100644
index 0000000..1e288bd
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  postJobCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PostJobCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML postJobCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface PostJobCommands extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PostJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("postjobcommandsf415type");
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    java.lang.String[] getCommandArray();
+    
+    /**
+     * Gets ith "command" element
+     */
+    java.lang.String getCommandArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetCommandArray();
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    org.apache.xmlbeans.XmlString xgetCommandArray(int i);
+    
+    /**
+     * Returns number of "command" element
+     */
+    int sizeOfCommandArray();
+    
+    /**
+     * Sets array of all "command" element
+     */
+    void setCommandArray(java.lang.String[] commandArray);
+    
+    /**
+     * Sets ith "command" element
+     */
+    void setCommandArray(int i, java.lang.String command);
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    void xsetCommandArray(org.apache.xmlbeans.XmlString[] commandArray);
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command);
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    void insertCommand(int i, java.lang.String command);
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    void addCommand(java.lang.String command);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    org.apache.xmlbeans.XmlString insertNewCommand(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    org.apache.xmlbeans.XmlString addNewCommand();
+    
+    /**
+     * Removes the ith "command" element
+     */
+    void removeCommand(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PostJobCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PostJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
new file mode 100644
index 0000000..520da34
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  preJobCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PreJobCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML preJobCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface PreJobCommands extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PreJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("prejobcommands6a26type");
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    java.lang.String[] getCommandArray();
+    
+    /**
+     * Gets ith "command" element
+     */
+    java.lang.String getCommandArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetCommandArray();
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    org.apache.xmlbeans.XmlString xgetCommandArray(int i);
+    
+    /**
+     * Returns number of "command" element
+     */
+    int sizeOfCommandArray();
+    
+    /**
+     * Sets array of all "command" element
+     */
+    void setCommandArray(java.lang.String[] commandArray);
+    
+    /**
+     * Sets ith "command" element
+     */
+    void setCommandArray(int i, java.lang.String command);
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    void xsetCommandArray(org.apache.xmlbeans.XmlString[] commandArray);
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command);
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    void insertCommand(int i, java.lang.String command);
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    void addCommand(java.lang.String command);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    org.apache.xmlbeans.XmlString insertNewCommand(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    org.apache.xmlbeans.XmlString addNewCommand();
+    
+    /**
+     * Removes the ith "command" element
+     */
+    void removeCommand(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.PreJobCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.PreJobCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterAnyListImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterAnyListImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterAnyListImpl.java
new file mode 100644
index 0000000..4cdcb57
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterAnyListImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  afterAnyList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.AfterAnyList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML afterAnyList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class AfterAnyListImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.AfterAnyList
+{
+    private static final long serialVersionUID = 1L;
+    
+    public AfterAnyListImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName AFTERANY$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "afterAny");
+    
+    
+    /**
+     * Gets array of all "afterAny" elements
+     */
+    public java.lang.String[] getAfterAnyArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(AFTERANY$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "afterAny" element
+     */
+    public java.lang.String getAfterAnyArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AFTERANY$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "afterAny" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetAfterAnyArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(AFTERANY$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "afterAny" element
+     */
+    public org.apache.xmlbeans.XmlString xgetAfterAnyArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(AFTERANY$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "afterAny" element
+     */
+    public int sizeOfAfterAnyArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(AFTERANY$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "afterAny" element
+     */
+    public void setAfterAnyArray(java.lang.String[] afterAnyArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(afterAnyArray, AFTERANY$0);
+        }
+    }
+    
+    /**
+     * Sets ith "afterAny" element
+     */
+    public void setAfterAnyArray(int i, java.lang.String afterAny)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AFTERANY$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(afterAny);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "afterAny" element
+     */
+    public void xsetAfterAnyArray(org.apache.xmlbeans.XmlString[]afterAnyArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(afterAnyArray, AFTERANY$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "afterAny" element
+     */
+    public void xsetAfterAnyArray(int i, org.apache.xmlbeans.XmlString afterAny)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(AFTERANY$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(afterAny);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "afterAny" element
+     */
+    public void insertAfterAny(int i, java.lang.String afterAny)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(AFTERANY$0, i);
+            target.setStringValue(afterAny);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "afterAny" element
+     */
+    public void addAfterAny(java.lang.String afterAny)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AFTERANY$0);
+            target.setStringValue(afterAny);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "afterAny" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewAfterAny(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(AFTERANY$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "afterAny" element
+     */
+    public org.apache.xmlbeans.XmlString addNewAfterAny()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(AFTERANY$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "afterAny" element
+     */
+    public void removeAfterAny(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(AFTERANY$0, i);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterOKListImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterOKListImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterOKListImpl.java
new file mode 100644
index 0000000..ce61221
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/AfterOKListImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  afterOKList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.AfterOKList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML afterOKList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class AfterOKListImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.AfterOKList
+{
+    private static final long serialVersionUID = 1L;
+    
+    public AfterOKListImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName AFTEROKLIST$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "afterOKList");
+    
+    
+    /**
+     * Gets array of all "afterOKList" elements
+     */
+    public java.lang.String[] getAfterOKListArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(AFTEROKLIST$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "afterOKList" element
+     */
+    public java.lang.String getAfterOKListArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AFTEROKLIST$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "afterOKList" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetAfterOKListArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(AFTEROKLIST$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "afterOKList" element
+     */
+    public org.apache.xmlbeans.XmlString xgetAfterOKListArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(AFTEROKLIST$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "afterOKList" element
+     */
+    public int sizeOfAfterOKListArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(AFTEROKLIST$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "afterOKList" element
+     */
+    public void setAfterOKListArray(java.lang.String[] afterOKListArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(afterOKListArray, AFTEROKLIST$0);
+        }
+    }
+    
+    /**
+     * Sets ith "afterOKList" element
+     */
+    public void setAfterOKListArray(int i, java.lang.String afterOKList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AFTEROKLIST$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(afterOKList);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "afterOKList" element
+     */
+    public void xsetAfterOKListArray(org.apache.xmlbeans.XmlString[]afterOKListArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(afterOKListArray, AFTEROKLIST$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "afterOKList" element
+     */
+    public void xsetAfterOKListArray(int i, org.apache.xmlbeans.XmlString afterOKList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(AFTEROKLIST$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(afterOKList);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "afterOKList" element
+     */
+    public void insertAfterOKList(int i, java.lang.String afterOKList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(AFTEROKLIST$0, i);
+            target.setStringValue(afterOKList);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "afterOKList" element
+     */
+    public void addAfterOKList(java.lang.String afterOKList)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AFTEROKLIST$0);
+            target.setStringValue(afterOKList);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "afterOKList" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewAfterOKList(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(AFTEROKLIST$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "afterOKList" element
+     */
+    public org.apache.xmlbeans.XmlString addNewAfterOKList()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(AFTEROKLIST$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "afterOKList" element
+     */
+    public void removeAfterOKList(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(AFTEROKLIST$0, i);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ExportPropertiesImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ExportPropertiesImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ExportPropertiesImpl.java
new file mode 100644
index 0000000..cca50a8
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/ExportPropertiesImpl.java
@@ -0,0 +1,233 @@
+/*
+ * XML Type:  exportProperties
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.ExportProperties
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML exportProperties(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class ExportPropertiesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.ExportProperties
+{
+    private static final long serialVersionUID = 1L;
+    
+    public ExportPropertiesImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName NAME$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "name");
+    
+    
+    /**
+     * Gets array of all "name" elements
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[] getNameArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(NAME$0, targetList);
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[] result = new org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "name" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name getNameArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name)get_store().find_element_user(NAME$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target;
+        }
+    }
+    
+    /**
+     * Returns number of "name" element
+     */
+    public int sizeOfNameArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(NAME$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "name" element
+     */
+    public void setNameArray(org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[] nameArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(nameArray, NAME$0);
+        }
+    }
+    
+    /**
+     * Sets ith "name" element
+     */
+    public void setNameArray(int i, org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name name)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name)get_store().find_element_user(NAME$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(name);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "name" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name insertNewName(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name)get_store().insert_element_user(NAME$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "name" element
+     */
+    public org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name addNewName()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name target = null;
+            target = (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name)get_store().add_element_user(NAME$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "name" element
+     */
+    public void removeName(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(NAME$0, i);
+        }
+    }
+    /**
+     * An XML name(@http://airavata.apache.org/gfac/core/2012/12).
+     *
+     * This is an atomic type that is a restriction of org.apache.airavata.gfac.core.x2012.x12.ExportProperties$Name.
+     */
+    public static class NameImpl extends org.apache.xmlbeans.impl.values.JavaStringHolderEx implements org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name
+    {
+        private static final long serialVersionUID = 1L;
+        
+        public NameImpl(org.apache.xmlbeans.SchemaType sType)
+        {
+            super(sType, true);
+        }
+        
+        protected NameImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
+        {
+            super(sType, b);
+        }
+        
+        private static final javax.xml.namespace.QName VALUE$0 = 
+            new javax.xml.namespace.QName("", "value");
+        
+        
+        /**
+         * Gets the "value" attribute
+         */
+        public java.lang.String getValue()
+        {
+            synchronized (monitor())
+            {
+                check_orphaned();
+                org.apache.xmlbeans.SimpleValue target = null;
+                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$0);
+                if (target == null)
+                {
+                    return null;
+                }
+                return target.getStringValue();
+            }
+        }
+        
+        /**
+         * Gets (as xml) the "value" attribute
+         */
+        public org.apache.xmlbeans.XmlString xgetValue()
+        {
+            synchronized (monitor())
+            {
+                check_orphaned();
+                org.apache.xmlbeans.XmlString target = null;
+                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(VALUE$0);
+                return target;
+            }
+        }
+        
+        /**
+         * Sets the "value" attribute
+         */
+        public void setValue(java.lang.String value)
+        {
+            synchronized (monitor())
+            {
+                check_orphaned();
+                org.apache.xmlbeans.SimpleValue target = null;
+                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$0);
+                if (target == null)
+                {
+                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(VALUE$0);
+                }
+                target.setStringValue(value);
+            }
+        }
+        
+        /**
+         * Sets (as xml) the "value" attribute
+         */
+        public void xsetValue(org.apache.xmlbeans.XmlString value)
+        {
+            synchronized (monitor())
+            {
+                check_orphaned();
+                org.apache.xmlbeans.XmlString target = null;
+                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(VALUE$0);
+                if (target == null)
+                {
+                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(VALUE$0);
+                }
+                target.set(value);
+            }
+        }
+    }
+}


[71/81] [abbrv] airavata git commit: adding a parent distribution

Posted by sh...@apache.org.
adding a parent distribution


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

Branch: refs/heads/master
Commit: 8e451b3145d9c3df975b7395665b1c7d98690aa6
Parents: 29cd57f
Author: Suresh Marru <sm...@apache.org>
Authored: Thu Jun 4 15:05:40 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Jun 4 15:05:40 2015 -0400

----------------------------------------------------------------------
 distribution/main/assembly/bin-assembly.xml     |  189 ++
 distribution/main/assembly/src-assembly.xml     |   75 +
 distribution/main/resources/INSTALL             |   30 +
 distribution/main/resources/LICENSE             | 2387 ++++++++++++++++++
 distribution/main/resources/NOTICE              |  163 ++
 distribution/main/resources/README              |  145 ++
 .../main/resources/bin/airavata-server.bat      |   55 +
 .../main/resources/bin/airavata-server.sh       |  118 +
 distribution/main/resources/bin/api-server.sh   |  118 +
 distribution/main/resources/bin/derby.sh        |   23 +
 distribution/main/resources/bin/gfac-server.sh  |  118 +
 distribution/main/resources/bin/logo.txt        |   34 +
 .../main/resources/bin/orchestrator-server.sh   |  118 +
 distribution/main/resources/bin/setenv.bat      |   43 +
 distribution/main/resources/bin/setenv.sh       |   77 +
 .../main/resources/bin/startNetworkServer       |  189 ++
 .../main/resources/bin/workflow-server.sh       |  118 +
 .../main/resources/samples/registerSample.sh    |   25 +
 .../main/resources/samples/scripts/add.sh       |   21 +
 .../main/resources/samples/scripts/echo.sh      |   22 +
 .../main/resources/samples/scripts/multiply.sh  |   22 +
 .../main/resources/samples/scripts/subtract.sh  |   22 +
 distribution/pom.xml                            |  601 +++++
 pom.xml                                         |    1 +
 24 files changed, 4714 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/main/assembly/bin-assembly.xml b/distribution/main/assembly/bin-assembly.xml
new file mode 100644
index 0000000..6c290b8
--- /dev/null
+++ b/distribution/main/assembly/bin-assembly.xml
@@ -0,0 +1,189 @@
+<!--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. -->
+
+<!DOCTYPE assembly [
+        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
+        <!ELEMENT id (#PCDATA)>
+        <!ELEMENT includeBaseDirectory (#PCDATA)>
+        <!ELEMENT baseDirectory (#PCDATA)>
+        <!ELEMENT formats (format)*>
+        <!ELEMENT format (#PCDATA)>
+        <!ELEMENT fileSets (fileSet)*>
+        <!ELEMENT fileSet (directory|outputDirectory|fileMode|includes)*>
+        <!ELEMENT directory (#PCDATA)>
+        <!ELEMENT outputDirectory (#PCDATA)>
+        <!ELEMENT includes (include)*>
+        <!ELEMENT include (#PCDATA)>
+        <!ELEMENT dependencySets (dependencySet)*>
+        <!ELEMENT dependencySet (outputDirectory|outputFileNameMapping|includes)*>
+        ]>
+<assembly>
+	<id>bin</id>
+	<includeBaseDirectory>true</includeBaseDirectory>
+	<baseDirectory>${archieve.name}-${version}</baseDirectory>
+	<formats>
+		<format>tar.gz</format>
+		<format>zip</format>
+	</formats>
+
+	<fileSets>
+
+		<!-- ********************** copy release notes files ********************** -->
+		<fileSet>
+			<directory>../../../</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>RELEASE_NOTES</include>
+			</includes>
+		</fileSet>
+		<!-- ********************** copy licenses, readme etc. ********************** -->
+		<fileSet>
+			<directory>src/main/resources/</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>LICENSE</include>
+				<include>NOTICE</include>
+				<include>README</include>
+				<include>INSTALL</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** copy database scripts ********************** -->
+		<fileSet>
+			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../registry/airavata-jpa-registry/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../app-catalog/app-catalog-data/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources/bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+				<include>logo.txt</include>
+				<include>startNetworkServer</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources/samples</directory>
+			<outputDirectory>samples</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>**/*.sh</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>${project.build.directory}/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>airavata-server.properties</include>
+				<include>zoo.cfg</include>
+				<include>registry.properties</include>
+				<include>log4j.properties</include>
+				<include>host.xml</include>
+				<include>persistence.xml</include>
+				<include>provenance.sql</include>
+				<include>gfac-config.xml</include>
+				<include>PBSTemplate.xslt</include>
+				<include>SLURMTemplate.xslt</include>
+				<include>LSFTemplate.xslt</include>
+				<include>UGETemplate.xslt</include>
+				<include>gsissh.properties</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
+			********************** -->
+		<fileSet>
+			<directory>src/main/resources/axis2-standalone-bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
+
+		<fileSet>
+			<directory>src/main/resources/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>**/*</include>
+			</includes>
+		</fileSet>
+
+		<!-- ********************** Copy samples ********************** -->
+		<fileSet>
+			<directory>${project.build.directory}/samples/applications
+			</directory>
+			<outputDirectory>samples</outputDirectory>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
+
+	</fileSets>
+
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+			<includes>
+				<include>org.apache.derby:derby:jar</include>
+				<include>org.apache.derby:derbytools:jar</include>
+				<include>org.apache.derby:derbynet:jar</include>
+				<include>org.apache.derby:derbyclient:jar</include>
+			</includes>
+		</dependencySet>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<includes>
+				<include>*:*:jar</include>
+            </includes>
+		</dependencySet>
+
+	</dependencySets>
+
+</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/distribution/main/assembly/src-assembly.xml b/distribution/main/assembly/src-assembly.xml
new file mode 100644
index 0000000..6a093ed
--- /dev/null
+++ b/distribution/main/assembly/src-assembly.xml
@@ -0,0 +1,75 @@
+<!--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.
+  -->
+
+<assembly>
+    <id>src</id>
+    <includeBaseDirectory>true</includeBaseDirectory> 
+    <baseDirectory>${archieve.name}-${version}</baseDirectory>
+    <formats>
+        <format>tar.gz</format>  
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+        <fileSet>
+            <directory>../..</directory>
+            <outputDirectory></outputDirectory>
+            <includes>
+                <include>NOTICE</include>
+                <include>LICENSE</include>
+                <include>README</include>
+                <include>RELEASE_NOTES</include>
+		<include>DISCLAIMER</include>
+		<include>INSTALL</include>
+            </includes>
+            <filtered>true</filtered>
+        </fileSet>
+        <fileSet>
+            <directory>../..</directory>
+            <outputDirectory></outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+            <includes>
+                <include>pom.xml</include>
+                <include>modules/**</include>
+                <include>samples/**</include>
+            </includes>
+
+            <excludes>
+                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
+                     Note that they assume that all sources are located under an "src" directory. This
+                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
+                     Thus we may still encounter some issues here. -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
+            </excludes>
+
+        </fileSet>
+          </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8e451b31/distribution/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/distribution/main/resources/INSTALL b/distribution/main/resources/INSTALL
new file mode 100644
index 0000000..53d0550
--- /dev/null
+++ b/distribution/main/resources/INSTALL
@@ -0,0 +1,30 @@
+Installing  Apache Airavata 0.14
+-------------------------------
+
+Prerequisites
+-------------
+Java 1.5 or later
+Maven (tested on v 3.0.2)
+
+Build Apache Airavata from Source
+---------------------------------
+* Unzip/untar the source file or clone from git.
+* cd to project folder and type
+	$ mvn clean install
+	Note: in order to skip tests use the command
+			$ mvn clean install -Dmaven.test.skip=true
+* Alternatively, all  compressed binary distributions can be found at <PROJECT DIR>/modules/distribution/release/target/release-artifacts
+
+Running Tests
+-------------
+* Unit tests & integrations tests will run while Apache Airavata is built from source (without "-Dmaven.test.skip=true").
+* To run the test samples
+    - You can find the binary distributions at <PROJECT DIR>/modules/distribution/release/target/release-artifacts or from
+      the Apache Airavata download site.
+    - Extract the binary distributions and once the binary is unzipped, instructions to run the tests should be followed
+      from README files found within.
+
+Tutorials
+----------
+The airavata website has instructions for basic tutorials:
+* Describing and executing applications using Airavata - follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial
\ No newline at end of file


[47/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
Resolve compilation issues in gfac module after module refactoring


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

Branch: refs/heads/master
Commit: 19afc7e0d90502f592f1c73aafbf17ae3f4648a1
Parents: 7b80974
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Wed Jun 3 17:24:47 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Wed Jun 3 17:24:47 2015 -0400

----------------------------------------------------------------------
 modules/distribution/gfac-server/pom.xml        |   33 +-
 modules/distribution/server/pom.xml             |   55 +-
 .../gfac-application-specific-handlers/pom.xml  |    4 +-
 modules/gfac/gfac-bes/pom.xml                   |    4 +-
 modules/gfac/gfac-client/pom.xml                |    2 +-
 modules/gfac/gfac-core/pom.xml                  |   30 +-
 .../apache/airavata/gfac/core/GFacUtils.java    |   39 +
 .../airavata/gfac/core/JobDescriptor.java       |  475 ++
 .../gfac/core/JobManagerConfiguration.java      |   52 +
 .../airavata/gfac/core/SSHApiException.java     |   36 +
 .../airavata/gfac/core/cluster/Cluster.java     |  161 +
 .../airavata/gfac/core/cluster/CommandInfo.java |   34 +
 .../gfac/core/cluster/CommandOutput.java        |   49 +
 .../airavata/gfac/core/cluster/JobStatus.java   |  110 +
 .../gfac/core/cluster/OutputParser.java         |   67 +
 .../gfac/core/cluster/RawCommandInfo.java       |   53 +
 .../airavata/gfac/core/cluster/ServerInfo.java  |   65 +
 .../gfac/core/handler/AbstractHandler.java      |    1 -
 .../gfac/core/x2012/x12/AfterAnyList.java       |  166 +
 .../gfac/core/x2012/x12/AfterOKList.java        |  166 +
 .../gfac/core/x2012/x12/ExportProperties.java   |  183 +
 .../airavata/gfac/core/x2012/x12/InputList.java |  166 +
 .../core/x2012/x12/JobDescriptorDocument.java   |  112 +
 .../gfac/core/x2012/x12/ModuleLoadCommands.java |  166 +
 .../airavata/gfac/core/x2012/x12/PbsParams.java | 1421 ++++++
 .../gfac/core/x2012/x12/PostJobCommands.java    |  166 +
 .../gfac/core/x2012/x12/PreJobCommands.java     |  166 +
 .../core/x2012/x12/impl/AfterAnyListImpl.java   |  235 +
 .../core/x2012/x12/impl/AfterOKListImpl.java    |  235 +
 .../x2012/x12/impl/ExportPropertiesImpl.java    |  233 +
 .../gfac/core/x2012/x12/impl/InputListImpl.java |  235 +
 .../x12/impl/JobDescriptorDocumentImpl.java     |   77 +
 .../x2012/x12/impl/ModuleLoadCommandsImpl.java  |  235 +
 .../gfac/core/x2012/x12/impl/PbsParamsImpl.java | 4174 ++++++++++++++++++
 .../x2012/x12/impl/PostJobCommandsImpl.java     |  235 +
 .../core/x2012/x12/impl/PreJobCommandsImpl.java |  235 +
 .../src/main/resources/PBSJobDescriptor.xsd     |  114 +
 .../src/main/resources/gsissh-schemas.xsdconfig |   14 +
 modules/gfac/gfac-impl/pom.xml                  |   32 +-
 .../java/com/jcraft/jsch/ExtendedSession.java   |   42 +
 .../com/jcraft/jsch/GSISSHIdentityFile.java     |  126 +
 .../jcraft/jsch/GSISSHIdentityRepository.java   |   29 +
 .../UserAuthGSSAPIWithMICGSSCredentials.java    |  308 ++
 .../airavata/gfac/gsi/ssh/GSSContextX509.java   |    2 +-
 .../airavata/gfac/gsi/ssh/api/Cluster.java      |  162 -
 .../gfac/gsi/ssh/api/CommandExecutor.java       |   33 +-
 .../airavata/gfac/gsi/ssh/api/CommandInfo.java  |   34 -
 .../gfac/gsi/ssh/api/CommandOutput.java         |   49 -
 .../apache/airavata/gfac/gsi/ssh/api/Core.java  |    4 +-
 .../apache/airavata/gfac/gsi/ssh/api/Node.java  |    2 +-
 .../gfac/gsi/ssh/api/SSHApiException.java       |   36 -
 .../airavata/gfac/gsi/ssh/api/ServerInfo.java   |   65 -
 .../gfac/gsi/ssh/api/job/JobDescriptor.java     |  473 --
 .../ssh/api/job/JobManagerConfiguration.java    |   51 -
 .../airavata/gfac/gsi/ssh/api/job/JobType.java  |   32 -
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |    6 +-
 .../gfac/gsi/ssh/api/job/LSFOutputParser.java   |    8 +-
 .../gfac/gsi/ssh/api/job/OutputParser.java      |   67 -
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |    6 +-
 .../gfac/gsi/ssh/api/job/PBSOutputParser.java   |    8 +-
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |    8 +-
 .../gfac/gsi/ssh/api/job/SlurmOutputParser.java |    8 +-
 .../gsi/ssh/api/job/UGEJobConfiguration.java    |    6 +-
 .../gfac/gsi/ssh/api/job/UGEOutputParser.java   |   10 +-
 .../gfac/gsi/ssh/config/ConfigReader.java       |    2 +-
 .../ssh/impl/DefaultJobSubmissionListener.java  |    9 +-
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |   80 +-
 .../airavata/gfac/gsi/ssh/impl/JobStatus.java   |  110 -
 .../airavata/gfac/gsi/ssh/impl/PBSCluster.java  |    9 +-
 .../gfac/gsi/ssh/impl/RawCommandInfo.java       |   55 -
 .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java |    2 +-
 .../gfac/gsi/ssh/impl/StandardOutReader.java    |    4 +-
 .../gfac/gsi/ssh/impl/SystemCommandOutput.java  |    4 +-
 .../DefaultPasswordAuthenticationInfo.java      |    2 +-
 .../DefaultPublicKeyAuthentication.java         |    2 +-
 .../DefaultPublicKeyFileAuthentication.java     |    2 +-
 .../MyProxyAuthenticationInfo.java              |    2 +-
 .../gfac/gsi/ssh/jsch/ExtendedJSch.java         |    2 +-
 .../gsi/ssh/listener/JobSubmissionListener.java |    8 +-
 .../airavata/gfac/gsi/ssh/util/CommonUtils.java |    8 +-
 .../ssh/util/SSHAPIUIKeyboardInteractive.java   |    2 +-
 .../gsi/ssh/util/SSHKeyPasswordHandler.java     |    2 +-
 .../airavata/gfac/gsi/ssh/util/SSHUtils.java    |   61 +-
 .../handler/GSISSHDirectorySetupHandler.java    |    2 +-
 .../gfac/gsissh/handler/GSISSHInputHandler.java |    2 +-
 .../gsissh/handler/GSISSHOutputHandler.java     |    2 +-
 .../gsissh/handler/NewGSISSHOutputHandler.java  |    2 +-
 .../gsissh/provider/impl/GSISSHProvider.java    |    8 +-
 .../gsissh/security/GSISecurityContext.java     |    9 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |   14 +-
 .../gfac/local/provider/impl/LocalProvider.java |    2 -
 .../airavata/gfac/monitor/HPCMonitorID.java     |    6 +-
 .../handlers/GridPullMonitorHandler.java        |    4 +-
 .../handlers/GridPushMonitorHandler.java        |    4 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |    6 +-
 .../impl/pull/qstat/ResourceConnection.java     |    8 +-
 .../impl/push/amqp/ComputingActivity.java       |   19 +
 .../impl/push/amqp/JSONMessageParser.java       |    1 -
 .../gfac/ssh/context/SSHAuthWrapper.java        |    2 +-
 .../ssh/handler/AdvancedSCPInputHandler.java    |    8 +-
 .../ssh/handler/AdvancedSCPOutputHandler.java   |    8 +-
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |    2 +-
 .../ssh/handler/SSHDirectorySetupHandler.java   |    2 +-
 .../gfac/ssh/handler/SSHInputHandler.java       |    2 +-
 .../gfac/ssh/handler/SSHOutputHandler.java      |    2 +-
 .../gfac/ssh/provider/impl/SSHProvider.java     |   16 +-
 .../gfac/ssh/security/SSHSecurityContext.java   |    2 +-
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |   15 +-
 .../airavata/gfac/ssh/util/HandleOutputs.java   |    2 +-
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |    1 +
 modules/gfac/gfac-service/pom.xml               |   11 +-
 .../airavata/gfac/server/GfacServerHandler.java |    4 +-
 modules/orchestrator/orchestrator-core/pom.xml  |   22 +-
 modules/workflow-model/workflow-engine/pom.xml  |    4 +-
 modules/xbaya-gui/pom.xml                       |    7 +-
 115 files changed, 10720 insertions(+), 1456 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/distribution/gfac-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/pom.xml b/modules/distribution/gfac-server/pom.xml
index 2496ae7..6e80212 100644
--- a/modules/distribution/gfac-server/pom.xml
+++ b/modules/distribution/gfac-server/pom.xml
@@ -133,49 +133,24 @@
 			<artifactId>airavata-standalone-server</artifactId>
 			<version>${project.version}</version>
 	   </dependency>
-      <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-gfac-gram</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-gfac-bes</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-gsissh</artifactId>
+            <artifactId>gfac-impl</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-hpc-monitor</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-local</artifactId>
+            <artifactId>gfac-service</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-gfac-hadoop</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-service</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-application-specific-handlers</artifactId>
+            <artifactId>gfac-application-specific-handlers</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index fc2df04..cf8a73c 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -268,7 +268,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-stubs</artifactId>
+			<artifactId>gfac-client</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
@@ -298,47 +298,22 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-ssh</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-gfac-gram</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-bes</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-gsissh</artifactId>
+			<artifactId>gfac-impl</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-hpc-monitor</artifactId>
+			<artifactId>gfac-bes</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-local</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-gfac-hadoop</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-core</artifactId>
+			<artifactId>gfac-core</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-service</artifactId>
+			<artifactId>gfac-service</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<!--<dependency> -->
@@ -351,26 +326,6 @@
 			<artifactId>airavata-workflow-model-core</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-messenger-commons</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-messenger-client</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<!--<dependency> -->
-		<!--<groupId>org.apache.airavata</groupId> -->
-		<!--<artifactId>airavata-workflow-tracking</artifactId> -->
-		<!--<version>${project.version}</version> -->
-		<!--</dependency> -->
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>gsissh</artifactId>
-			<version>${project.version}</version>
-		</dependency>
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
 			<artifactId>airavata-model-utils</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-application-specific-handlers/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-application-specific-handlers/pom.xml b/modules/gfac/gfac-application-specific-handlers/pom.xml
index 801313d..638c81f 100644
--- a/modules/gfac/gfac-application-specific-handlers/pom.xml
+++ b/modules/gfac/gfac-application-specific-handlers/pom.xml
@@ -7,11 +7,11 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>airavata-gfac-application-specific-handlers</artifactId>
+    <artifactId>gfac-application-specific-handlers</artifactId>
     <dependencies>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-bes/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml
index 7335d53..4e61ae0 100644
--- a/modules/gfac/gfac-bes/pom.xml
+++ b/modules/gfac/gfac-bes/pom.xml
@@ -20,7 +20,7 @@
 	</parent>
 
 	<modelVersion>4.0.0</modelVersion>
-	<artifactId>airavata-gfac-bes</artifactId>
+	<artifactId>gfac-bes</artifactId>
 	<name>Airavata GFac BES implementation</name>
 	<description>This is the extension of GFAC to use GRAM </description>
 	<url>http://airavata.apache.org/</url>
@@ -36,7 +36,7 @@
 		<!-- GFAC schemas -->
 		<dependency>
 			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-gfac-core</artifactId>
+			<artifactId>gfac-core</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<!-- Credential Store -->

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/pom.xml b/modules/gfac/gfac-client/pom.xml
index f94d85b..20423e0 100644
--- a/modules/gfac/gfac-client/pom.xml
+++ b/modules/gfac/gfac-client/pom.xml
@@ -20,7 +20,7 @@
     </parent>
 
     <name>Airavata Gfac Client SDK</name>
-    <artifactId>airavata-gfac-stubs</artifactId>
+    <artifactId>gfac-client</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index 2169734..0203865 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -17,7 +17,7 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-core</artifactId>
+    <artifactId>gfac-core</artifactId>
     <name>Airavata GFac Core</name>
     <description>The core GFAC functionality independent from any webservice implementation.</description>
     <url>http://airavata.apache.org/</url>
@@ -50,6 +50,11 @@
             <artifactId>airavata-jpa-registry</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
+            <version>${xmlbeans.version}</version>
+        </dependency>
         <!-- Credential Store -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
@@ -112,6 +117,7 @@
             <groupId>org.apache.xmlbeans</groupId>
             <artifactId>xmlbeans</artifactId>
             <version>${xmlbeans.version}</version>
+            <scope>compile</scope>
         </dependency>
         <!-- this is the dependency for amqp implementation -->
         <!-- zookeeper dependencies -->
@@ -125,6 +131,28 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>xmlbeans-maven-plugin</artifactId>
+                <version>2.3.3</version>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>xmlbeans</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <inherited>true</inherited>
+                <configuration>
+                    <schemaDirectory>src/main/resources</schemaDirectory>
+                    <xmlConfigs>
+                        <xmlConfig implementation="java.io.File">src/main/resources/gsissh-schemas.xsdconfig </xmlConfig>
+                    </xmlConfigs>
+                    <sourceGenerationDirectory>src/main/java</sourceGenerationDirectory>
+                    <outputJar>target/generated/${project.artifactId}-${project.version}.jar</outputJar>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 407db94..b716099 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -139,6 +139,45 @@ public class GFacUtils {
 	}
 
 	/**
+	 * This returns true if the give job is finished
+	 * otherwise false
+	 *
+	 * @param job
+	 * @return
+	 */
+	public static boolean isJobFinished(JobDescriptor job) {
+		if (org.apache.airavata.gfac.core.cluster.JobStatus.C.toString().equals(job.getStatus())) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * This will read
+	 *
+	 * @param maxWalltime
+	 * @return
+	 */
+	public static String maxWallTimeCalculator(int maxWalltime) {
+		if (maxWalltime < 60) {
+			return "00:" + maxWalltime + ":00";
+		} else {
+			int minutes = maxWalltime % 60;
+			int hours = maxWalltime / 60;
+			return hours + ":" + minutes + ":00";
+		}
+	}
+	public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
+		if (maxWalltime < 60) {
+			return "00:" + maxWalltime;
+		} else {
+			int minutes = maxWalltime % 60;
+			int hours = maxWalltime / 60;
+			return hours + ":" + minutes;
+		}
+	}
+	/**
 	 * this can be used to do framework opertaions specific to different modes
 	 * 
 	 * @param jobExecutionContext

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
new file mode 100644
index 0000000..678f41f
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
@@ -0,0 +1,475 @@
+/*
+ *
+ * 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.core;
+
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
+import org.apache.airavata.gfac.core.x2012.x12.AfterAnyList;
+import org.apache.airavata.gfac.core.x2012.x12.AfterOKList;
+import org.apache.airavata.gfac.core.x2012.x12.InputList;
+import org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument;
+import org.apache.xmlbeans.XmlException;
+
+import java.util.List;
+
+/**
+ * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
+ * submit the job to the computing resource
+ */
+public class JobDescriptor {
+
+    private JobDescriptorDocument jobDescriptionDocument;
+
+
+    public JobDescriptor() {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+    public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
+        this.jobDescriptionDocument = jobDescriptorDocument;
+    }
+
+
+    public JobDescriptor(CommandOutput commandOutput) {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+
+    public String toXML() {
+        return jobDescriptionDocument.xmlText();
+    }
+
+    public JobDescriptorDocument getJobDescriptorDocument() {
+        return this.jobDescriptionDocument;
+    }
+
+    /**
+     * With new app catalog thrift object integration, we don't use this
+     * @param xml
+     * @return
+     * @throws XmlException
+     */
+    @Deprecated
+    public static JobDescriptor fromXML(String xml)
+            throws XmlException {
+        JobDescriptorDocument parse = JobDescriptorDocument.Factory
+                .parse(xml);
+        JobDescriptor jobDescriptor = new JobDescriptor(parse);
+        return jobDescriptor;
+    }
+
+
+    //todo write bunch of setter getters to set and get jobdescription parameters
+    public void setWorkingDirectory(String workingDirectory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
+    }
+
+    public String getWorkingDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
+    }
+
+    public void setShellName(String shellName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
+    }
+
+    public void setJobName(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
+    }
+
+    public void setExecutablePath(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
+    }
+
+    public void setAllEnvExport(boolean name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
+    }
+
+    public void setMailOptions(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
+    }
+
+    public void setStandardOutFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
+    }
+
+    public void setStandardErrorFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
+    }
+
+    public void setNodes(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
+    }
+
+    public void setProcessesPerNode(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
+    }
+
+    public String getOutputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
+    }
+
+    public String getInputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
+    }
+    public void setOutputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
+    }
+
+    public void setInputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
+    }
+
+    /**
+     * Users can pass the minute count for maxwalltime
+     * @param minutes
+     */
+    public void setMaxWallTime(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                GFacUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
+
+    }
+
+
+    public void setMaxWallTimeForLSF(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                GFacUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
+
+    }
+    public void setAcountString(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
+    }
+
+    public void setInputValues(List<String> inputValue) {
+        InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
+        inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
+    }
+
+    public void setJobID(String jobID) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
+    }
+
+    public void setQueueName(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
+    }
+
+    public void setStatus(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
+    }
+
+    public void setAfterAnyList(String[] afterAnyList) {
+        AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
+        afterAny.setAfterAnyArray(afterAnyList);
+    }
+
+    public void setAfterOKList(String[] afterOKList) {
+        AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
+        afterAnyList.setAfterOKListArray(afterOKList);
+    }
+    public void setCTime(String cTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
+    }
+    public void setQTime(String qTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
+    }
+    public void setMTime(String mTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
+    }
+    public void setSTime(String sTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
+    }
+    public void setCompTime(String compTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
+    }
+    public void setOwner(String owner) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
+    }
+    public void setExecuteNode(String executeNode) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
+    }
+    public void setEllapsedTime(String ellapsedTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
+    }
+
+    public void setUsedCPUTime(String usedCPUTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
+    }
+    public void setCPUCount(int usedCPUTime) {
+            this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
+        }
+    public void setUsedMemory(String usedMemory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
+    }
+    public void setVariableList(String variableList) {
+        this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
+    }
+    public void setSubmitArgs(String submitArgs) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
+    }
+
+    public void setPreJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
+    }
+
+     public void setPostJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
+    }
+
+    public void setModuleLoadCommands(String[] commands) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
+    }
+
+    public void addModuleLoadCommands(String command) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
+    }
+
+    public void addPreJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
+    }
+
+     public void addPostJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
+    }
+
+    public void setPartition(String partition){
+        this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
+    }
+
+     public void setUserName(String userName){
+        this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
+    }
+     public void setNodeList(String nodeList){
+        this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
+    }
+    public void setJobSubmitter(String jobSubmitter){
+           this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
+    }
+    public String getNodeList(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
+    }
+    public String getExecutablePath() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
+    }
+
+    public boolean getAllEnvExport() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
+    }
+
+    public String getMailOptions() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
+    }
+
+    public String getStandardOutFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
+    }
+
+    public String getStandardErrorFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
+    }
+
+    public int getNodes(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
+    }
+
+    public int getCPUCount(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
+    }
+
+    public int getProcessesPerNode() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
+    }
+
+    public String getMaxWallTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
+    }
+
+    public String getAcountString() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
+    }
+
+    public String[] getInputValues() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
+    }
+
+    public String getJobID() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String getQueueName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
+    }
+
+    public String getStatus() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
+    }
+
+    public String[] getAfterAnyList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
+    }
+
+    public String[] getAfterOKList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
+    }
+    public String getCTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
+    }
+    public String getQTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
+    }
+    public String getMTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
+    }
+    public String getSTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
+    }
+    public String getCompTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
+    }
+    public String getOwner() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
+    }
+    public String getExecuteNode() {
+         return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
+    }
+    public String getEllapsedTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
+    }
+
+    public String getUsedCPUTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
+    }
+
+    public String getUsedMemory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
+    }
+    public void getShellName() {
+        this.getJobDescriptorDocument().getJobDescriptor().getShellName();
+    }
+
+    public String getJobName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
+    }
+
+    public String getJobId() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+
+    public String getVariableList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+    public String getSubmitArgs() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String[] getPostJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getModuleCommands() {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getPreJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String getJobSubmitterCommand(){
+          return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
+    }
+
+    public String getPartition(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
+    }
+
+    public String getUserName(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
+    }
+
+    public void setCallBackIp(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
+    }
+
+    public void setCallBackPort(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
+    }
+
+
+    public String getCallBackIp(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
+    }
+    public String getCallBackPort(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
+    }
+
+    public void setMailType(String emailType) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
+    }
+
+    public String getMailType() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
+    }
+    public void setMailAddress(String emailAddress) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
+    }
+
+    public String getMailAddress() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
+    }
+
+    public String getChassisName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
+    }
+
+    public void setChassisName(String chassisName){
+        this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
+    }
+    
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
new file mode 100644
index 0000000..661aba0
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.core;
+
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
+
+public interface JobManagerConfiguration {
+
+	public RawCommandInfo getCancelCommand(String jobID);
+
+	public String getJobDescriptionTemplateName();
+
+	public RawCommandInfo getMonitorCommand(String jobID);
+
+	public RawCommandInfo getUserBasedMonitorCommand(String userName);
+
+    public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
+
+	public String getScriptExtension();
+
+	public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
+
+	public OutputParser getParser();
+
+	public String getInstalledPath();
+
+	public String getBaseCancelCommand();
+
+	public String getBaseMonitorCommand();
+
+	public String getBaseSubmitCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
new file mode 100644
index 0000000..a2db122
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.core;
+
+/**
+ * An exception class to wrap SSH command execution related errors.
+ */
+public class SSHApiException extends Exception {
+
+    public SSHApiException(String message) {
+        super(message);
+    }
+
+    public SSHApiException(String message, Exception e) {
+        super(message, e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
new file mode 100644
index 0000000..b116bdc
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
@@ -0,0 +1,161 @@
+/*
+ *
+ * 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.core.cluster;
+
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This interface represents a Cluster machine
+ * End users of the API can implement this and come up with their own
+ * implementations, but mostly this interface is for internal usage.
+ */
+public interface Cluster {
+
+    /**
+     * This will submit a job to the cluster with a given pbs file and some parameters
+     *
+     * @param pbsFilePath  path of the pbs file
+     * @param workingDirectory working directory where pbs should has to copy
+     * @return jobId after successful job submission
+     * @throws SSHApiException throws exception during error
+     */
+    public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
+
+    /**
+     * This will submit the given job and not performing any monitoring
+     *
+     * @param jobDescriptor  job descriptor to submit to cluster, this contains all the parameter
+     * @return jobID after successful job submission.
+     * @throws SSHApiException  throws exception during error
+     */
+    public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
+
+    /**
+     * This will copy the localFile to remoteFile location in configured cluster
+     *
+     * @param remoteFile remote file location, this can be a directory too
+     * @param localFile local file path of the file which needs to copy to remote location
+     * @throws SSHApiException throws exception during error
+     */
+    public void scpTo(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
+    
+    /**
+     * This will create directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public void makeDirectory(String directoryPath) throws SSHApiException;
+
+
+    /**
+     * This will get the job description of a job which is there in the cluster
+     * if jbo is not available with the given ID it returns
+     * @param jobID jobId has to pass
+     * @return Returns full job description of the job which submitted successfully
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
+
+    /**
+     * This will delete the given job from the queue
+     *
+     * @param jobID  jobId of the job which user wants to delete
+     * @return return the description of the deleted job
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor cancelJob(String jobID) throws SSHApiException;
+
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobID jobId of the job user want to get the status
+     * @return job status of the given jobID
+     * @throws SSHApiException throws exception during error
+     */
+    public JobStatus getJobStatus(String jobID) throws SSHApiException;
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobName jobName of the job user want to get the status
+     * @return jobId of the given jobName
+     * @throws SSHApiException throws exception during error
+     */
+    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
+
+    /**
+     * This method can be used to poll the jobstatuses based on the given
+     * user but we should pass the jobID list otherwise we will get unwanted
+     * job statuses which submitted by different middleware outside apache
+     * airavata with the same uername which we are not considering
+     * @param userName userName of the jobs which required to get the status
+     * @param jobIDs precises set of jobIDs
+     * @return
+     */
+    public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
+    /**
+     * This will list directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public List<String> listDirectory(String directoryPath) throws SSHApiException;
+
+    /**
+     * This method can be used to get created ssh session
+     * to reuse the created session.
+     * @throws SSHApiException
+     */
+    public Session getSession() throws SSHApiException;
+    
+    /**
+     * This method can be used to close the connections initialized
+     * to handle graceful shutdown of the system
+     * @throws SSHApiException
+     */
+    public void disconnect() throws SSHApiException;
+
+    /**
+     * This gives the server Info
+     * @return
+     */
+    public ServerInfo getServerInfo();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
new file mode 100644
index 0000000..18e3e4e
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
@@ -0,0 +1,34 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulates information about
+ */
+public interface CommandInfo {
+
+    /**
+     * Gets the executable command as a string.
+     * @return String encoded command. Should be able to execute
+     * directly on remote shell. Should includes appropriate parameters.
+     */
+    String getCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
new file mode 100644
index 0000000..e50d25a
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
@@ -0,0 +1,49 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+
+import com.jcraft.jsch.Channel;
+
+import java.io.OutputStream;
+
+/**
+ * Output of a certain command. TODO rethink
+ */
+public interface CommandOutput {
+
+    /**
+     * Gets the output of the command as a stream.
+     * @param  channel Command output as a stream.
+     */
+    void onOutput(Channel channel);
+
+    /**
+     * Gets standard error as a output stream.
+     * @return Command error as a stream.
+     */
+    OutputStream getStandardError();
+
+    /**
+     * The command exit code.
+     * @param code The program exit code
+     */
+    void exitCode(int code);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
new file mode 100644
index 0000000..6e8e144
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
@@ -0,0 +1,110 @@
+ /*
+ *
+ * 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.core.cluster;
+
+ /**
+  * This will contains all the PBS specific job statuses.
+  * C -  Job is completed after having run/
+  * E -  Job is exiting after having run.
+  * H -  Job is held.
+  * Q -  job is queued, eligible to run or routed.
+  * R -  job is running.
+  * T -  job is being moved to new location.
+  * W -  job is waiting for its execution time
+  * (-a option) to be reached.
+  * S -  (Unicos only) job is suspend.
+  */
+ public enum JobStatus {
+     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
+
+     public static JobStatus fromString(String status){
+        if(status != null){
+            if("C".equals(status)){
+                return JobStatus.C;
+            }else if("E".equals(status)){
+                return JobStatus.E;
+            }else if("H".equals(status)){
+                return JobStatus.H;
+            }else if("Q".equals(status)){
+                return JobStatus.Q;
+            }else if("R".equals(status)){
+                return JobStatus.R;
+            }else if("T".equals(status)){
+                return JobStatus.T;
+            }else if("W".equals(status)){
+                return JobStatus.W;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("F".equals(status)){
+                return JobStatus.F;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("CA".equals(status)){
+                return JobStatus.CA;
+            }else if("CF".equals(status)){
+                return JobStatus.CF;
+            }else if("CD".equals(status)){
+                return JobStatus.CD;
+            }else if("CG".equals(status)){
+                return JobStatus.CG;
+            }else if("NF".equals(status)){
+                return JobStatus.NF;
+            }else if("PD".equals(status)){
+                return JobStatus.PD;
+            }else if("PR".equals(status)){
+                return JobStatus.PR;
+            }else if("TO".equals(status)){
+                return JobStatus.TO;
+            }else if("U".equals(status)){
+                return JobStatus.U;
+            }else if("qw".equals(status)){
+                return JobStatus.qw;
+            }else if("t".equals(status)){
+                return JobStatus.t;
+            }else if("r".equals(status)){
+                return JobStatus.r;
+            }else if("h".equals(status)){
+                return JobStatus.h;
+            }else if("Er".equals(status)){
+                return JobStatus.Er;
+            }else if("Eqw".equals(status)){
+                return JobStatus.Er;
+            }else if("RUN".equals(status)){      // LSF starts here
+                return JobStatus.RUN;
+            }else if("PEND".equals(status)){
+                return JobStatus.PEND;
+            }else if("DONE".equals(status)){
+                return JobStatus.DONE;
+            }else if("PSUSP".equals(status)){
+                return JobStatus.PSUSP;
+            }else if("USUSP".equals(status)){
+                return JobStatus.USUSP;
+            }else if("SSUSP".equals(status)){
+                return JobStatus.SSUSP;
+            }else if("EXIT".equals(status)){
+                return JobStatus.EXIT;
+            }else if("ZOMBI".equals(status)){
+                return JobStatus.ZOMBI;
+            }
+        }
+         return JobStatus.U;
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
new file mode 100644
index 0000000..658a5bc
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.core.cluster;
+
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+
+import java.util.Map;
+
+public interface OutputParser {
+
+    /**
+     * Tihs can be used to fill a jobdescriptor based on the output
+     * @param descriptor
+     * @return
+     */
+    public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob the result of a job submission to get the JobID
+     * @param rawOutput
+     * @return
+     */
+    public String parseJobSubmission(String rawOutput)throws SSHApiException;
+
+
+    /**
+     * This can be used to get the job status from the output
+     * @param jobID
+     * @param rawOutput
+     */
+    public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob a big output and get multipleJob statuses
+     * @param statusMap list of status map will return and key will be the job ID
+     * @param rawOutput
+     */
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
+
+    /**
+     * filter the jobId value of given JobName from rawOutput
+     * @param jobName
+     * @param rawOutput
+     * @return
+     * @throws SSHApiException
+     */
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
new file mode 100644
index 0000000..80f5d0a
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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.core.cluster;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:18 PM
+ */
+
+/**
+ * The raw command information. String returned by getCommand is directly executed in SSH
+ * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
+ */
+public class RawCommandInfo implements CommandInfo {
+
+    private String rawCommand;
+
+    public RawCommandInfo(String cmd) {
+        this.rawCommand = cmd;
+    }
+
+    public String getCommand() {
+        return this.rawCommand;
+    }
+
+    public String getRawCommand() {
+        return rawCommand;
+    }
+
+    public void setRawCommand(String rawCommand) {
+        this.rawCommand = rawCommand;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
new file mode 100644
index 0000000..183f60b
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
@@ -0,0 +1,65 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulate server information.
+ */
+public class ServerInfo {
+
+    private String host;
+    private String userName;
+    private int port = 22;
+
+    public ServerInfo(String userName, String host) {
+        this.userName = userName;
+        this.host = host;
+    }
+
+    public ServerInfo(String userName,String host,  int port) {
+        this.host = host;
+        this.userName = userName;
+        this.port = port;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index aa98ef6..8d2609a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -22,7 +22,6 @@ package org.apache.airavata.gfac.core.handler;
 
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.states.GfacHandlerState;
 import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
new file mode 100644
index 0000000..e552eb7
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  afterAnyList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.AfterAnyList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML afterAnyList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface AfterAnyList extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterAnyList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("afteranylisteefatype");
+    
+    /**
+     * Gets array of all "afterAny" elements
+     */
+    java.lang.String[] getAfterAnyArray();
+    
+    /**
+     * Gets ith "afterAny" element
+     */
+    java.lang.String getAfterAnyArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "afterAny" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetAfterAnyArray();
+    
+    /**
+     * Gets (as xml) ith "afterAny" element
+     */
+    org.apache.xmlbeans.XmlString xgetAfterAnyArray(int i);
+    
+    /**
+     * Returns number of "afterAny" element
+     */
+    int sizeOfAfterAnyArray();
+    
+    /**
+     * Sets array of all "afterAny" element
+     */
+    void setAfterAnyArray(java.lang.String[] afterAnyArray);
+    
+    /**
+     * Sets ith "afterAny" element
+     */
+    void setAfterAnyArray(int i, java.lang.String afterAny);
+    
+    /**
+     * Sets (as xml) array of all "afterAny" element
+     */
+    void xsetAfterAnyArray(org.apache.xmlbeans.XmlString[] afterAnyArray);
+    
+    /**
+     * Sets (as xml) ith "afterAny" element
+     */
+    void xsetAfterAnyArray(int i, org.apache.xmlbeans.XmlString afterAny);
+    
+    /**
+     * Inserts the value as the ith "afterAny" element
+     */
+    void insertAfterAny(int i, java.lang.String afterAny);
+    
+    /**
+     * Appends the value as the last "afterAny" element
+     */
+    void addAfterAny(java.lang.String afterAny);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "afterAny" element
+     */
+    org.apache.xmlbeans.XmlString insertNewAfterAny(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "afterAny" element
+     */
+    org.apache.xmlbeans.XmlString addNewAfterAny();
+    
+    /**
+     * Removes the ith "afterAny" element
+     */
+    void removeAfterAny(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}


[14/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
deleted file mode 100644
index a003f55..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * 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.monitor.core;
-
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.model.workspace.experiment.JobState;
-
-/**
- * This is an interface to implement messageparser, it could be
- * pull based or push based still monitor has to parse the content of
- * the message it gets from remote monitoring system and finalize
- * them to internal job state, Ex: JSON parser for AMQP and Qstat reader
- * for pull based monitor.
- */
-public interface MessageParser {
-    /**
-     * This method is to implement how to parse the incoming message
-     * and implement a logic to finalize the status of the job,
-     * we have to makesure the correct message is given to the messageparser
-     * parse method, it will not do any filtering
-     * @param message content of the message
-     * @return
-     */
-    JobState parseMessage(String message)throws AiravataMonitorException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
deleted file mode 100644
index 614d606..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * 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.monitor.core;
-
-
-/**
- * This is the primary interface for Monitors,
- * This can be used to implement different methods of monitoring
- */
-public interface Monitor {
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
deleted file mode 100644
index efdf89c..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * 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.monitor.core;
-
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-
-/**
- * PullMonitors can implement this interface
- * Since the pull and push based monitoring required different
- * operations, PullMonitor will be useful.
- * This will allow users to program Pull monitors separately
- */
-public abstract class PullMonitor extends AiravataAbstractMonitor {
-
-    private int pollingFrequence;
-    /**
-     * This method will can invoke when PullMonitor needs to start
-     * and it has to invoke in the frequency specified below,
-     * @return if the start process is successful return true else false
-     */
-    public abstract boolean startPulling() throws AiravataMonitorException;
-
-    /**
-     * This is the method to stop the polling process
-     * @return if the stopping process is successful return true else false
-     */
-    public abstract boolean stopPulling()throws AiravataMonitorException;
-
-    /**
-     * this method can be used to set the polling frequencey or otherwise
-     * can implement a polling mechanism, and implement how to do
-     * @param frequence
-     */
-    public void setPollingFrequence(int frequence){
-        this.pollingFrequence = frequence;
-    }
-
-    /**
-     * this method can be used to get the polling frequencey or otherwise
-     * can implement a polling mechanism, and implement how to do
-     * @return
-     */
-    public int getPollingFrequence(){
-        return this.pollingFrequence;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
deleted file mode 100644
index 1b6a228..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * 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.monitor.core;
-
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-
-/**
- * PushMonitors can implement this interface
- * Since the pull and push based monitoring required different
- * operations, PullMonitor will be useful.
- * This interface will allow users to program Push monitors separately
- */
-public abstract class PushMonitor extends AiravataAbstractMonitor {
-    /**
-     * This method can be invoked to register a listener with the
-     * remote monitoring system, ideally inside this method users will be
-     * writing some client listener code for the remote monitoring system,
-     * this will be a simple wrapper around any client for the remote Monitor.
-     * @param monitorID
-     * @return
-     */
-    public abstract boolean registerListener(MonitorID monitorID)throws AiravataMonitorException;
-
-    /**
-     * This method can be invoked to unregister a listener with the
-     * remote monitoring system, ideally inside this method users will be
-     * writing some client listener code for the remote monitoring system,
-     * this will be a simple wrapper around any client for the remote Monitor.
-     * @param monitorID
-     * @return
-     */
-    public abstract boolean unRegisterListener(MonitorID monitorID)throws AiravataMonitorException;
-
-    /**
-     * This can be used to stop the registration thread
-     * @return
-     * @throws org.apache.airavata.gfac.monitor.exception.AiravataMonitorException
-     */
-    public abstract boolean stopRegister()throws AiravataMonitorException;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
deleted file mode 100644
index 3acef66..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * 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.monitor.exception;
-
-public class AiravataMonitorException extends Exception {
-    private static final long serialVersionUID = -2849422320139467602L;
-
-    public AiravataMonitorException(Throwable e) {
-        super(e);
-    }
-
-    public AiravataMonitorException(String message) {
-        super(message, null);
-    }
-
-    public AiravataMonitorException(String message, Throwable e) {
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
deleted file mode 100644
index 10192b7..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *
- * 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.monitor.handlers;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.monitor.HPCMonitorID;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
-import org.apache.airavata.gfac.monitor.util.CommonUtils;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
-
-import java.io.File;
-import java.util.Properties;
-
-/**
- * this handler is responsible for monitoring jobs in a pull mode
- * and currently this support multiple pull monitoring in grid resource and uses
- * commands like qstat,squeue and this supports sun grid enging monitoring too
- * which is a slight variation of qstat monitoring.
- */
-public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GridPullMonitorHandler.class);
-
-    private HPCPullMonitor hpcPullMonitor;
-
-    private AuthenticationInfo authenticationInfo;
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-        String myProxyUser = null;
-        try {
-            myProxyUser = ServerSettings.getSetting("myproxy.username");
-            String myProxyPass = ServerSettings.getSetting("myproxy.password");
-            String certPath = ServerSettings.getSetting("trusted.cert.location");
-            String myProxyServer = ServerSettings.getSetting("myproxy.server");
-            setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
-                    7512, 17280000, certPath));
-            hpcPullMonitor = new HPCPullMonitor(null,getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
-        } catch (ApplicationSettingsException e) {
-            logger.error("Error while  reading server properties", e);
-            throw new GFacHandlerException("Error while  reading server properties", e);
-        }
-    }
-
-    public void run() {
-        hpcPullMonitor.run();
-    }
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        super.invoke(jobExecutionContext);
-        hpcPullMonitor.setGfac(jobExecutionContext.getGfac());
-        hpcPullMonitor.setPublisher(jobExecutionContext.getMonitorPublisher());
-        MonitorID monitorID = new HPCMonitorID(getAuthenticationInfo(), jobExecutionContext);
-        try {
-           /* ZooKeeper zk = jobExecutionContext.getZk();
-            try {
-                String experimentEntry = GFacUtils.findExperimentEntry(jobExecutionContext.getExperimentID(), zk);
-                String path = experimentEntry + File.separator + "operation";
-                Stat exists = zk.exists(path, this);
-                if (exists != null) {
-                    zk.getData(path, this, exists); // watching the operations node
-                }
-            } catch (KeeperException e) {
-                logger.error(e.getMessage(), e);
-            } catch (InterruptedException e) {
-                logger.error(e.getMessage(), e);
-            }*/
-            CommonUtils.addMonitortoQueue(hpcPullMonitor.getQueue(), monitorID, jobExecutionContext);
-            CommonUtils.increaseZkJobCount(monitorID); // update change job count to zookeeper
-        } catch (AiravataMonitorException e) {
-            logger.errorId(monitorID.getJobID(), "Error adding job {} monitorID object to the queue with experiment {}",
-                    monitorID.getJobID(),  monitorID.getExperimentID());
-        }
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public HPCPullMonitor getHpcPullMonitor() {
-        return hpcPullMonitor;
-    }
-
-    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-
-    public void setHpcPullMonitor(HPCPullMonitor hpcPullMonitor) {
-        this.hpcPullMonitor = hpcPullMonitor;
-    }
-
-
-    public void process(WatchedEvent watchedEvent) {
-        logger.info(watchedEvent.getPath());
-        if(Event.EventType.NodeDataChanged.equals(watchedEvent.getType())){
-            // node data is changed, this means node is cancelled.
-            logger.info("Experiment is cancelled with this path:"+watchedEvent.getPath());
-
-            String[] split = watchedEvent.getPath().split("/");
-            for(String element:split) {
-                if (element.contains("+")) {
-                    logger.info("Adding experimentID+TaskID to be removed from monitoring:"+element);
-                    hpcPullMonitor.getCancelJobList().add(element);
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
deleted file mode 100644
index 8b445df..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *
- * 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.monitor.handlers;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.HPCMonitorID;
-import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *   this handler is responsible monitoring jobs in push mode
- *   and currently this support multiple push monitoring in grid resource
- */
-public class GridPushMonitorHandler extends ThreadedHandler {
-    private final static Logger logger= LoggerFactory.getLogger(GridPushMonitorHandler.class);
-
-    private AMQPMonitor amqpMonitor;
-
-    private AuthenticationInfo authenticationInfo;
-
-    @Override
-    public void initProperties(Properties properties) throws GFacHandlerException {
-        String myProxyUser=null;
-        try{
-            myProxyUser = ServerSettings.getSetting("myproxy.username");
-            String myProxyPass = ServerSettings.getSetting("myproxy.password");
-            String certPath = ServerSettings.getSetting("trusted.cert.location");
-            String myProxyServer = ServerSettings.getSetting("myproxy.server");
-            setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
-                    7512, 17280000, certPath));
-
-            String hostList=(String)properties.get("hosts");
-            String proxyFilePath = ServerSettings.getSetting("proxy.file.path");
-            String connectionName=ServerSettings.getSetting("connection.name");
-            LinkedBlockingQueue<MonitorID> pushQueue = new LinkedBlockingQueue<MonitorID>();
-            LinkedBlockingQueue<MonitorID> finishQueue = new LinkedBlockingQueue<MonitorID>();
-            List<String> hosts= Arrays.asList(hostList.split(","));
-            amqpMonitor=new AMQPMonitor(null,pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
-        }catch (ApplicationSettingsException e){
-            logger.error(e.getMessage(), e);
-            throw new GFacHandlerException(e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public void run() {
-        amqpMonitor.run();
-    }
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException{
-        super.invoke(jobExecutionContext);
-        MonitorID monitorID=new HPCMonitorID(getAuthenticationInfo(),jobExecutionContext);
-        amqpMonitor.getRunningQueue().add(monitorID);
-    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    public AMQPMonitor getAmqpMonitor() {
-        return amqpMonitor;
-    }
-
-    public void setAmqpMonitor(AMQPMonitor amqpMonitor) {
-        this.amqpMonitor = amqpMonitor;
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
deleted file mode 100644
index 3442367..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- *
- * 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.monitor.impl.pull.qstat;
-
-import com.google.common.eventbus.EventBus;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.monitor.util.CommonUtils;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
-import org.apache.airavata.gfac.core.utils.OutHandlerWorker;
-import org.apache.airavata.gfac.monitor.HostMonitorData;
-import org.apache.airavata.gfac.monitor.UserMonitorData;
-import org.apache.airavata.gfac.monitor.core.PullMonitor;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
-import org.apache.airavata.model.workspace.experiment.JobState;
-
-import java.sql.Timestamp;
-import java.util.*;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.LinkedBlockingQueue;
-
-/**
- * This monitor is based on qstat command which can be run
- * in grid resources and retrieve the job status.
- */
-public class HPCPullMonitor extends PullMonitor {
-
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(HPCPullMonitor.class);
-    public static final int FAILED_COUNT = 5;
-
-    // I think this should use DelayedBlocking Queue to do the monitoring*/
-    private BlockingQueue<UserMonitorData> queue;
-
-    private boolean startPulling = false;
-
-    private Map<String, ResourceConnection> connections;
-
-    private MonitorPublisher publisher;
-
-    private LinkedBlockingQueue<String> cancelJobList;
-
-    private List<String> completedJobsFromPush;
-
-    private GFac gfac;
-
-    private AuthenticationInfo authenticationInfo;
-
-    private ArrayList<MonitorID> removeList;
-
-    public HPCPullMonitor() {
-        connections = new HashMap<String, ResourceConnection>();
-        queue = new LinkedBlockingDeque<UserMonitorData>();
-        publisher = new MonitorPublisher(new EventBus());
-        cancelJobList = new LinkedBlockingQueue<String>();
-        completedJobsFromPush = new ArrayList<String>();
-        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
-        removeList = new ArrayList<MonitorID>();
-    }
-
-    public HPCPullMonitor(MonitorPublisher monitorPublisher, AuthenticationInfo authInfo) {
-        connections = new HashMap<String, ResourceConnection>();
-        queue = new LinkedBlockingDeque<UserMonitorData>();
-        publisher = monitorPublisher;
-        authenticationInfo = authInfo;
-        cancelJobList = new LinkedBlockingQueue<String>();
-        this.completedJobsFromPush = new ArrayList<String>();
-        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
-        removeList = new ArrayList<MonitorID>();
-    }
-
-    public HPCPullMonitor(BlockingQueue<UserMonitorData> queue, MonitorPublisher publisher) {
-        this.queue = queue;
-        this.publisher = publisher;
-        connections = new HashMap<String, ResourceConnection>();
-        cancelJobList = new LinkedBlockingQueue<String>();
-        this.completedJobsFromPush = new ArrayList<String>();
-        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
-        removeList = new ArrayList<MonitorID>();
-    }
-
-
-    public void run() {
-        /* implement a logic to pick each monitorID object from the queue and do the
-        monitoring
-         */
-        this.startPulling = true;
-        while (this.startPulling && !ServerSettings.isStopAllThreads()) {
-            try {
-                // After finishing one iteration of the full queue this thread sleeps 1 second
-                synchronized (this.queue) {
-                    if (this.queue.size() > 0) {
-                        startPulling();
-                }
-            }
-                Thread.sleep(10000);
-            } catch (Exception e) {
-                // we catch all the exceptions here because no matter what happens we do not stop running this
-                // thread, but ideally we should report proper error messages, but this is handled in startPulling
-                // method, incase something happen in Thread.sleep we handle it with this catch block.
-                logger.error(e.getMessage(),e);
-            }
-        }
-        // thread is going to return so we close all the connections
-        Iterator<String> iterator = connections.keySet().iterator();
-        while (iterator.hasNext()) {
-            String next = iterator.next();
-            ResourceConnection resourceConnection = connections.get(next);
-            try {
-                resourceConnection.getCluster().disconnect();
-            } catch (SSHApiException e) {
-                logger.error("Erro while connecting to the cluster", e);
-            }
-        }
-    }
-
-    /**
-     * This method will can invoke when PullMonitor needs to start
-     * and it has to invoke in the frequency specified below,
-     *
-     * @return if the start process is successful return true else false
-     */
-     public boolean startPulling() throws AiravataMonitorException {
-        // take the top element in the queue and pull the data and put that element
-        // at the tail of the queue
-        //todo this polling will not work with multiple usernames but with single user
-        // and multiple hosts, currently monitoring will work
-        UserMonitorData take = null;
-        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        MonitorID currentMonitorID = null;
-        try {
-            take = this.queue.take();
-            List<HostMonitorData> hostMonitorData = take.getHostMonitorData();
-            for (ListIterator<HostMonitorData> hostIterator = hostMonitorData.listIterator(); hostIterator.hasNext();) {
-                HostMonitorData iHostMonitorData = hostIterator.next();
-                if (iHostMonitorData.getJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
-                    String hostName = iHostMonitorData.getComputeResourceDescription().getHostName();
-                    ResourceConnection connection = null;
-                    if (connections.containsKey(hostName)) {
-                        if (!connections.get(hostName).isConnected()) {
-                            connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
-                            connections.put(hostName, connection);
-                        } else {
-                            logger.debug("We already have this connection so not going to create one");
-                            connection = connections.get(hostName);
-                        }
-                    } else {
-                        connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
-                        connections.put(hostName, connection);
-                    }
-
-                    // before we get the statuses, we check the cancel job list and remove them permanently
-                    List<MonitorID> monitorID = iHostMonitorData.getMonitorIDs();
-                    Iterator<String> iterator1 = cancelJobList.iterator();
-                    ListIterator<MonitorID> monitorIDListIterator = monitorID.listIterator();
-                    while (monitorIDListIterator.hasNext()) {
-                        MonitorID iMonitorID = monitorIDListIterator.next();
-                        while (iterator1.hasNext()) {
-                            String cancelMId = iterator1.next();
-                            if (cancelMId.equals(iMonitorID.getExperimentID() + "+" + iMonitorID.getTaskID())) {
-                                iMonitorID.setStatus(JobState.CANCELED);
-//                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
-                                removeList.add(iMonitorID);
-                                logger.debugId(cancelMId, "Found a match in cancel monitor queue, hence moved to the " +
-                                                "completed job queue, experiment {}, task {} , job {}",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobID());
-                                logger.info("Job cancelled: marking the Job as ************CANCELLED************ experiment {}, task {}, job name {} .",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
-                                sendNotification(iMonitorID);
-                                logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
-                                Thread.sleep(10000);
-                                GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
-                                break;
-                            }
-                        }
-                        iterator1 = cancelJobList.iterator();
-                    }
-
-                    cleanup(take);
-
-                    synchronized (completedJobsFromPush) {
-                        for (ListIterator<String> iterator = completedJobsFromPush.listIterator(); iterator.hasNext(); ) {
-                            String completeId = iterator.next();
-                            for (monitorIDListIterator = monitorID.listIterator(); monitorIDListIterator.hasNext(); ) {
-                                MonitorID iMonitorID = monitorIDListIterator.next();
-                                if (completeId.equals(iMonitorID.getUserName() + "," + iMonitorID.getJobName())) {
-                                    logger.info("This job is finished because push notification came with <username,jobName> " + completeId);
-                                    iMonitorID.setStatus(JobState.COMPLETE);
-//                                    CommonUtils.removeMonitorFromQueue(take, iMonitorID);//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
-                                    removeList.add(iMonitorID);
-                                    logger.debugId(completeId, "Push notification updated job {} status to {}. " +
-                                                    "experiment {} , task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
-                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID());
-                                    logger.info("AMQP message recieved: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
-
-                                    sendNotification(iMonitorID);
-                                    logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
-                                    Thread.sleep(10000);
-                                    GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
-                                    break;
-                                }
-                            }
-                        }
-                    }
-
-                    cleanup(take);
-
-                    // we have to get this again because we removed the already completed jobs with amqp messages
-                    monitorID = iHostMonitorData.getMonitorIDs();
-                    Map<String, JobState> jobStatuses = connection.getJobStatuses(monitorID);
-                    for (Iterator<MonitorID> iterator = monitorID.listIterator(); iterator.hasNext(); ) {
-                        MonitorID iMonitorID = iterator.next();
-                        currentMonitorID = iMonitorID;
-                        if (!JobState.CANCELED.equals(iMonitorID.getStatus()) &&
-                                !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
-                            iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
-                        } else if (JobState.COMPLETE.equals(iMonitorID.getStatus())) {
-                            logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
-                                    "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
-//                            CommonUtils.removeMonitorFromQueue(take, iMonitorID);
-                            removeList.add(iMonitorID);
-                            logger.info("PULL Notification is complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                    iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
-                            GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
-                        }
-                        iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is not a simple setter we have a logic
-                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
-                        sendNotification(iMonitorID);
-                        // if the job is completed we do not have to put the job to the queue again
-                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
-                    }
-
-                    cleanup(take);
-
-
-                    for (Iterator<MonitorID> iterator = monitorID.listIterator(); iterator.hasNext(); ) {
-                        MonitorID iMonitorID = iterator.next();
-                        if (iMonitorID.getFailedCount() > FAILED_COUNT) {
-                            iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
-                            String outputDir = iMonitorID.getJobExecutionContext().getOutputDir();
-                            List<String> stdOut = null;
-                            try {
-                                stdOut = connection.getCluster().listDirectory(outputDir); // check the outputs directory
-                            } catch (SSHApiException e) {
-                                if (e.getMessage().contains("No such file or directory")) {
-                                    // this is because while we run output handler something failed and during exception
-                                    // we store all the jobs in the monitor queue again
-                                    logger.error("We know this  job is already attempted to run out-handlers");
-//                                    CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
-                                }
-                            }
-                            if (stdOut != null && stdOut.size() > 0 && !stdOut.get(0).isEmpty()) { // have to be careful with this
-                                iMonitorID.setStatus(JobState.COMPLETE);
-                                logger.errorId(iMonitorID.getJobID(), "Job monitoring failed {} times, " +
-                                                " Experiment {} , task {}", iMonitorID.getFailedCount(),
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID());
-                                logger.info("Listing directory came as complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
-                                sendNotification(iMonitorID);
-//                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
-                                removeList.add(iMonitorID);
-                                GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
-                            } else {
-                                iMonitorID.setFailedCount(0);
-                            }
-                        } else {
-                            // Evey
-                            iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
-                            // if the job is complete we remove it from the Map, if any of these maps
-                            // get empty this userMonitorData will get delete from the queue
-                        }
-                    }
-
-                    cleanup(take);
-
-
-                } else {
-                    logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.
-                            getComputeResourceDescription().getHostName());
-                }
-            }
-            // We have finished all the HostMonitorData object in userMonitorData, now we need to put it back
-            // now the userMonitorData goes back to the tail of the queue
-            // during individual monitorID removal we remove the HostMonitorData object if it become empty
-            // so if all the jobs are finished for all the hostMOnitorId objects in userMonitorData object
-            // we should remove it from the queue so here we do not put it back.
-            for (ListIterator<HostMonitorData> iterator1 = take.getHostMonitorData().listIterator(); iterator1.hasNext(); ) {
-                HostMonitorData iHostMonitorID = iterator1.next();
-                if (iHostMonitorID.getMonitorIDs().size() == 0) {
-                    iterator1.remove();
-                    logger.debug("Removed host {} from monitoring queue", iHostMonitorID.getComputeResourceDescription().getHostName());
-                }
-            }
-            if(take.getHostMonitorData().size()!=0) {
-                queue.put(take);
-            }
-        } catch (InterruptedException e) {
-            if (!this.queue.contains(take)) {
-                try {
-                    this.queue.put(take);
-                } catch (InterruptedException e1) {
-                    e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                }
-            }
-            logger.error("Error handling the job with Job ID:" + currentMonitorID.getJobID());
-            throw new AiravataMonitorException(e);
-        } catch (SSHApiException e) {
-            logger.error(e.getMessage());
-            if (e.getMessage().contains("Unknown Job Id Error")) {
-                // in this case job is finished or may be the given job ID is wrong
-                jobStatus.setState(JobState.UNKNOWN);
-                JobIdentifier jobIdentifier = new JobIdentifier("UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN");
-                if (currentMonitorID != null){
-                    jobIdentifier.setExperimentId(currentMonitorID.getExperimentID());
-                    jobIdentifier.setTaskId(currentMonitorID.getTaskID());
-                    jobIdentifier.setWorkflowNodeId(currentMonitorID.getWorkflowNodeID());
-                    jobIdentifier.setJobId(currentMonitorID.getJobID());
-                    jobIdentifier.setGatewayId(currentMonitorID.getJobExecutionContext().getGatewayID());
-                }
-                jobStatus.setJobIdentity(jobIdentifier);
-                publisher.publish(jobStatus);
-            } else if (e.getMessage().contains("illegally formed job identifier")) {
-                logger.error("Wrong job ID is given so dropping the job from monitoring system");
-            } else if (!this.queue.contains(take)) {
-                try {
-                    queue.put(take);
-                } catch (InterruptedException e1) {
-                    e1.printStackTrace();
-                }
-            }
-            throw new AiravataMonitorException("Error retrieving the job status", e);
-        } catch (Exception e) {
-            try {
-                queue.put(take);
-            } catch (InterruptedException e1) {
-                e1.printStackTrace();
-            }
-            throw new AiravataMonitorException("Error retrieving the job status", e);
-        }
-        return true;
-    }
-
-    private void sendNotification(MonitorID iMonitorID) {
-        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobID(),
-                iMonitorID.getTaskID(),
-                iMonitorID.getWorkflowNodeID(),
-                iMonitorID.getExperimentID(),
-                iMonitorID.getJobExecutionContext().getGatewayID());
-        jobStatus.setJobIdentity(jobIdentity);
-        jobStatus.setState(iMonitorID.getStatus());
-        // we have this JobStatus class to handle amqp monitoring
-        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status change request, " +
-                "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
-        jobStatus.getJobIdentity().getTaskId());
-
-        publisher.publish(jobStatus);
-    }
-
-    /**
-     * This is the method to stop the polling process
-     *
-     * @return if the stopping process is successful return true else false
-     */
-    public boolean stopPulling() {
-        this.startPulling = false;
-        return true;
-    }
-
-    public MonitorPublisher getPublisher() {
-        return publisher;
-    }
-
-    public void setPublisher(MonitorPublisher publisher) {
-        this.publisher = publisher;
-    }
-
-    public BlockingQueue<UserMonitorData> getQueue() {
-        return queue;
-    }
-
-    public void setQueue(BlockingQueue<UserMonitorData> queue) {
-        this.queue = queue;
-    }
-
-    public boolean authenticate() {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public Map<String, ResourceConnection> getConnections() {
-        return connections;
-    }
-
-    public boolean isStartPulling() {
-        return startPulling;
-    }
-
-    public void setConnections(Map<String, ResourceConnection> connections) {
-        this.connections = connections;
-    }
-
-    public void setStartPulling(boolean startPulling) {
-        this.startPulling = startPulling;
-    }
-
-    public GFac getGfac() {
-        return gfac;
-    }
-
-    public void setGfac(GFac gfac) {
-        this.gfac = gfac;
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
-        this.authenticationInfo = authenticationInfo;
-    }
-
-    public LinkedBlockingQueue<String> getCancelJobList() {
-        return cancelJobList;
-    }
-
-    public void setCancelJobList(LinkedBlockingQueue<String> cancelJobList) {
-        this.cancelJobList = cancelJobList;
-    }
-
-
-    private void cleanup(UserMonitorData userMonitorData){
-        for(MonitorID iMonitorId:removeList){
-            try {
-                CommonUtils.removeMonitorFromQueue(userMonitorData, iMonitorId);
-            } catch (AiravataMonitorException e) {
-                logger.error(e.getMessage(), e);
-                logger.error("Error deleting the monitor data: " + iMonitorId.getJobID());
-            }
-        }
-        removeList.clear();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
deleted file mode 100644
index f718535..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- * 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.monitor.impl.pull.qstat;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.SecurityContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.monitor.HostMonitorData;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-
-public class ResourceConnection {
-    private static final Logger log = LoggerFactory.getLogger(ResourceConnection.class);
-
-    private PBSCluster cluster;
-
-    private AuthenticationInfo authenticationInfo;
-
-
-    public ResourceConnection(HostMonitorData hostMonitorData,AuthenticationInfo authInfo) throws SSHApiException {
-        MonitorID monitorID = hostMonitorData.getMonitorIDs().get(0);
-        try {
-            SecurityContext securityContext = monitorID.getJobExecutionContext().getSecurityContext(monitorID.getComputeResourceDescription().getHostName());
-            if(securityContext != null) {
-                if (securityContext instanceof GSISecurityContext) {
-                    GSISecurityContext gsiSecurityContext = (GSISecurityContext) securityContext;
-                    cluster = (PBSCluster) gsiSecurityContext.getPbsCluster();
-                } else if (securityContext instanceof  SSHSecurityContext) {
-                    SSHSecurityContext sshSecurityContext = (SSHSecurityContext)
-                            securityContext;
-                    cluster = (PBSCluster) sshSecurityContext.getPbsCluster();
-                }
-            }
-            // we just use cluster configuration from the incoming request and construct a new cluster because for monitoring
-            // we are using our own credentials and not using one users account to do everything.
-            authenticationInfo = authInfo;
-        } catch (GFacException e) {
-            log.error("Error reading data from job ExecutionContext");
-        }
-    }
-
-    public ResourceConnection(HostMonitorData hostMonitorData) throws SSHApiException {
-        MonitorID monitorID = hostMonitorData.getMonitorIDs().get(0);
-        try {
-            GSISecurityContext securityContext = (GSISecurityContext)
-                    monitorID.getJobExecutionContext().getSecurityContext(monitorID.getComputeResourceDescription().getHostName());
-            cluster = (PBSCluster) securityContext.getPbsCluster();
-
-            // we just use cluster configuration from the incoming request and construct a new cluster because for monitoring
-            // we are using our own credentials and not using one users account to do everything.
-            cluster = new PBSCluster(cluster.getServerInfo(), authenticationInfo, cluster.getJobManagerConfiguration());
-        } catch (GFacException e) {
-            log.error("Error reading data from job ExecutionContext");
-        }
-    }
-
-    public JobState getJobStatus(MonitorID monitorID) throws SSHApiException {
-        String jobID = monitorID.getJobID();
-        //todo so currently we execute the qstat for each job but we can use user based monitoring
-        //todo or we should concatenate all the commands and execute them in one go and parseSingleJob the response
-        return getStatusFromString(cluster.getJobStatus(jobID).toString());
-    }
-
-    public Map<String, JobState> getJobStatuses(List<MonitorID> monitorIDs) throws SSHApiException {
-        Map<String, JobStatus> treeMap = new TreeMap<String, JobStatus>();
-        Map<String, JobState> treeMap1 = new TreeMap<String, JobState>();
-        // creating a sorted map with all the jobIds and with the predefined
-        // status as UNKNOWN
-        for (MonitorID monitorID : monitorIDs) {
-            treeMap.put(monitorID.getJobID()+","+monitorID.getJobName(), JobStatus.U);
-        }
-        String userName = cluster.getServerInfo().getUserName();
-        //todo so currently we execute the qstat for each job but we can use user based monitoring
-        //todo or we should concatenate all the commands and execute them in one go and parseSingleJob the response
-        //
-        cluster.getJobStatuses(userName, treeMap);
-        for (String key : treeMap.keySet()) {
-            treeMap1.put(key, getStatusFromString(treeMap.get(key).toString()));
-        }
-        return treeMap1;
-    }
-
-    private JobState getStatusFromString(String status) {
-        log.info("parsing the job status returned : " + status);
-        if (status != null) {
-            if ("C".equals(status) || "CD".equals(status) || "E".equals(status) || "CG".equals(status) || "DONE".equals(status)) {
-                return JobState.COMPLETE;
-            } else if ("H".equals(status) || "h".equals(status)) {
-                return JobState.HELD;
-            } else if ("Q".equals(status) || "qw".equals(status) || "PEND".equals(status)) {
-                return JobState.QUEUED;
-            } else if ("R".equals(status) || "CF".equals(status) || "r".equals(status) || "RUN".equals(status)) {
-                return JobState.ACTIVE;
-            } else if ("T".equals(status)) {
-                return JobState.HELD;
-            } else if ("W".equals(status) || "PD".equals(status)) {
-                return JobState.QUEUED;
-            } else if ("S".equals(status) || "PSUSP".equals(status) || "USUSP".equals(status) || "SSUSP".equals(status)) {
-                return JobState.SUSPENDED;
-            } else if ("CA".equals(status)) {
-                return JobState.CANCELED;
-            } else if ("F".equals(status) || "NF".equals(status) || "TO".equals(status) || "EXIT".equals(status)) {
-                return JobState.FAILED;
-            } else if ("PR".equals(status) || "Er".equals(status)) {
-                return JobState.FAILED;
-            } else if ("U".equals(status) || ("UNKWN".equals(status))) {
-                return JobState.UNKNOWN;
-            }
-        }
-        return JobState.UNKNOWN;
-    }
-
-    public PBSCluster getCluster() {
-        return cluster;
-    }
-
-    public void setCluster(PBSCluster cluster) {
-        this.cluster = cluster;
-    }
-
-    public boolean isConnected(){
-        return this.cluster.getSession().isConnected();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
deleted file mode 100644
index de8cd8c..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *
- * 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.monitor.impl.push.amqp;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.core.PushMonitor;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.gfac.monitor.util.AMQPConnectionUtil;
-import org.apache.airavata.gfac.monitor.util.CommonUtils;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
-import com.rabbitmq.client.Channel;
-import com.rabbitmq.client.Connection;
-
-/**
- * This is the implementation for AMQP based finishQueue, this uses
- * rabbitmq client to recieve AMQP based monitoring data from
- * mostly excede resources.
- */
-public class AMQPMonitor extends PushMonitor {
-    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitor.class);
-
-
-    /* this will keep all the channels available in the system, we do not create
-      channels for all the jobs submitted, but we create channels for each user for each
-      host.
-    */
-    private Map<String, Channel> availableChannels;
-
-    private MonitorPublisher publisher;
-
-    private MonitorPublisher localPublisher;
-
-    private BlockingQueue<MonitorID> runningQueue;
-
-    private BlockingQueue<MonitorID> finishQueue;
-
-    private String connectionName;
-
-    private String proxyPath;
-
-    private List<String> amqpHosts;
-
-    private boolean startRegister;
-
-    public AMQPMonitor(){
-
-    }
-    public AMQPMonitor(MonitorPublisher publisher, BlockingQueue<MonitorID> runningQueue,
-                       BlockingQueue<MonitorID> finishQueue,
-                       String proxyPath,String connectionName,List<String> hosts) {
-        this.publisher = publisher;
-        this.runningQueue = runningQueue;        // these will be initialized by the MonitorManager
-        this.finishQueue = finishQueue;          // these will be initialized by the MonitorManager
-        this.availableChannels = new HashMap<String, Channel>();
-        this.connectionName = connectionName;
-        this.proxyPath = proxyPath;
-        this.amqpHosts = hosts;
-        this.localPublisher = new MonitorPublisher(new EventBus());
-        this.localPublisher.registerListener(this);
-    }
-
-    public void initialize(String proxyPath, String connectionName, List<String> hosts) {
-        this.availableChannels = new HashMap<String, Channel>();
-        this.connectionName = connectionName;
-        this.proxyPath = proxyPath;
-        this.amqpHosts = hosts;
-        this.localPublisher = new MonitorPublisher(new EventBus());
-        this.localPublisher.registerListener(this);
-    }
-
-    @Override
-    public boolean registerListener(MonitorID monitorID) throws AiravataMonitorException {
-        // we subscribe to read user-host based subscription
-        ComputeResourceDescription computeResourceDescription = monitorID.getComputeResourceDescription();
-        if (computeResourceDescription.isSetIpAddresses() && computeResourceDescription.getIpAddresses().size() > 0) {
-            // we get first ip address for the moment
-            String hostAddress = computeResourceDescription.getIpAddresses().get(0);
-            // in amqp case there are no multiple jobs per each host, because once a job is put in to the queue it
-            // will be picked by the Monitor, so jobs will not stay in this queueu but jobs will stay in finishQueue
-            String channelID = CommonUtils.getChannelID(monitorID);
-            if (availableChannels.get(channelID) == null) {
-                try {
-                    //todo need to fix this rather getting it from a file
-                    Connection connection = AMQPConnectionUtil.connect(amqpHosts, connectionName, proxyPath);
-                    Channel channel = null;
-                    channel = connection.createChannel();
-                    availableChannels.put(channelID, channel);
-                    String queueName = channel.queueDeclare().getQueue();
-
-                    BasicConsumer consumer = new
-                            BasicConsumer(new JSONMessageParser(), localPublisher);          // here we use local publisher
-                    channel.basicConsume(queueName, true, consumer);
-                    String filterString = CommonUtils.getRoutingKey(monitorID.getUserName(), hostAddress);
-                    // here we queuebind to a particular user in a particular machine
-                    channel.queueBind(queueName, "glue2.computing_activity", filterString);
-                    logger.info("Using filtering string to monitor: " + filterString);
-                } catch (IOException e) {
-                    logger.error("Error creating the connection to finishQueue the job:" + monitorID.getUserName());
-                }
-            }
-        } else {
-            throw new AiravataMonitorException("Couldn't register monitor for jobId :" + monitorID.getJobID() +
-                    " , ComputeResourceDescription " + computeResourceDescription.getHostName() + " doesn't has an " +
-                    "IpAddress with it");
-        }
-        return true;
-    }
-
-    public void run() {
-        // before going to the while true mode we start unregister thread
-        startRegister = true; // this will be unset by someone else
-        while (startRegister || !ServerSettings.isStopAllThreads()) {
-            try {
-                MonitorID take = runningQueue.take();
-                this.registerListener(take);
-            } catch (AiravataMonitorException e) { // catch any exceptino inside the loop
-                logger.error(e.getMessage(), e);
-            } catch (InterruptedException e) {
-                logger.error(e.getMessage(), e);
-            } catch (Exception e){
-                logger.error(e.getMessage(), e);
-            }
-        }
-        Set<String> strings = availableChannels.keySet();
-        for(String key:strings) {
-            Channel channel = availableChannels.get(key);
-            try {
-                channel.close();
-            } catch (IOException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    @Subscribe
-    public boolean unRegisterListener(MonitorID monitorID) throws AiravataMonitorException {
-        Iterator<MonitorID> iterator = finishQueue.iterator();
-        MonitorID next = null;
-        while(iterator.hasNext()){
-            next = iterator.next();
-            if(next.getJobID().endsWith(monitorID.getJobID())){
-                break;
-            }
-        }
-        if(next == null) {
-            logger.error("Job has removed from the queue, old obsolete message recieved");
-            return false;
-        }
-        String channelID = CommonUtils.getChannelID(next);
-        if (JobState.FAILED.equals(monitorID.getStatus()) || JobState.COMPLETE.equals(monitorID.getStatus())) {
-            finishQueue.remove(next);
-
-            // if this is the last job in the queue at this point with the same username and same host we
-            // close the channel and close the connection and remove it from availableChannels
-            if (CommonUtils.isTheLastJobInQueue(finishQueue, next)) {
-                logger.info("There are no jobs to monitor for common ChannelID:" + channelID + " , so we unsubscribe it" +
-                        ", incase new job created we do subscribe again");
-                Channel channel = availableChannels.get(channelID);
-                if (channel == null) {
-                    logger.error("Already Unregistered the listener");
-                    throw new AiravataMonitorException("Already Unregistered the listener");
-                } else {
-                    try {
-                        channel.queueUnbind(channel.queueDeclare().getQueue(), "glue2.computing_activity", CommonUtils.getRoutingKey(next));
-                        channel.close();
-                        channel.getConnection().close();
-                        availableChannels.remove(channelID);
-                    } catch (IOException e) {
-                        logger.error("Error unregistering the listener");
-                        throw new AiravataMonitorException("Error unregistering the listener");
-                    }
-                }
-            }
-        }
-        next.setStatus(monitorID.getStatus());
-        JobIdentifier jobIdentity = new JobIdentifier(next.getJobID(),
-                                                     next.getTaskID(),
-                                                     next.getWorkflowNodeID(),
-                                                     next.getExperimentID(),
-                                                     next.getJobExecutionContext().getGatewayID());
-        publisher.publish(new JobStatusChangeEvent(next.getStatus(),jobIdentity));
-        return true;
-    }
-    @Override
-    public boolean stopRegister() throws AiravataMonitorException {
-        return false;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public Map<String, Channel> getAvailableChannels() {
-        return availableChannels;
-    }
-
-    public void setAvailableChannels(Map<String, Channel> availableChannels) {
-        this.availableChannels = availableChannels;
-    }
-
-    public MonitorPublisher getPublisher() {
-        return publisher;
-    }
-
-    public void setPublisher(MonitorPublisher publisher) {
-        this.publisher = publisher;
-    }
-
-    public BlockingQueue<MonitorID> getRunningQueue() {
-        return runningQueue;
-    }
-
-    public void setRunningQueue(BlockingQueue<MonitorID> runningQueue) {
-        this.runningQueue = runningQueue;
-    }
-
-    public BlockingQueue<MonitorID> getFinishQueue() {
-        return finishQueue;
-    }
-
-    public void setFinishQueue(BlockingQueue<MonitorID> finishQueue) {
-        this.finishQueue = finishQueue;
-    }
-
-    public String getProxyPath() {
-        return proxyPath;
-    }
-
-    public void setProxyPath(String proxyPath) {
-        this.proxyPath = proxyPath;
-    }
-
-    public List<String> getAmqpHosts() {
-        return amqpHosts;
-    }
-
-    public void setAmqpHosts(List<String> amqpHosts) {
-        this.amqpHosts = amqpHosts;
-    }
-
-    public boolean isStartRegister() {
-        return startRegister;
-    }
-
-    public void setStartRegister(boolean startRegister) {
-        this.startRegister = startRegister;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
deleted file mode 100644
index bd5c625..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * 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.monitor.impl.push.amqp;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.core.MessageParser;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.rabbitmq.client.AMQP;
-import com.rabbitmq.client.Consumer;
-import com.rabbitmq.client.Envelope;
-import com.rabbitmq.client.ShutdownSignalException;
-
-public class BasicConsumer implements Consumer {
-    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitor.class);
-
-    private MessageParser parser;
-
-    private MonitorPublisher publisher;
-
-    public BasicConsumer(MessageParser parser, MonitorPublisher publisher) {
-        this.parser = parser;
-        this.publisher = publisher;
-    }
-
-    public void handleCancel(String consumerTag) {
-    }
-
-    public void handleCancelOk(String consumerTag) {
-    }
-
-    public void handleConsumeOk(String consumerTag) {
-    }
-
-    public void handleDelivery(String consumerTag,
-                               Envelope envelope,
-                               AMQP.BasicProperties properties,
-                               byte[] body) {
-
-        logger.debug("job update for: " + envelope.getRoutingKey());
-        String message = new String(body);
-        message = message.replaceAll("(?m)^", "    ");
-        // Here we parse the message and get the job status and push it
-        // to the Event bus, this will be picked by
-//        AiravataJobStatusUpdator and store in to registry
-
-        logger.debug("************************************************************");
-        logger.debug("AMQP Message recieved \n" + message);
-        logger.debug("************************************************************");
-        try {
-            String jobID = envelope.getRoutingKey().split("\\.")[0];
-            MonitorID monitorID = new MonitorID(null, jobID, null, null, null, null,null);
-            monitorID.setStatus(parser.parseMessage(message));
-            publisher.publish(monitorID);
-        } catch (AiravataMonitorException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    public void handleRecoverOk(String consumerTag) {
-    }
-
-    public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig) {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
deleted file mode 100644
index 72c77d5..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.monitor.impl.push.amqp;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.airavata.ComputingActivity;
-import org.apache.airavata.gfac.monitor.core.MessageParser;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-
-public class JSONMessageParser implements MessageParser {
-    private final static Logger logger = LoggerFactory.getLogger(JSONMessageParser.class);
-
-    public JobState parseMessage(String message)throws AiravataMonitorException {
-        /*todo write a json message parser here*/
-        logger.debug(message);
-        ObjectMapper objectMapper = new ObjectMapper();
-        try {
-            ComputingActivity computingActivity = objectMapper.readValue(message.getBytes(), ComputingActivity.class);
-            logger.info(computingActivity.getIDFromEndpoint());
-            List<String> stateList = computingActivity.getState();
-            JobState jobState = null;
-            for (String aState : stateList) {
-                jobState = getStatusFromString(aState);
-            }
-            // we get the last value of the state array
-            return jobState;
-        } catch (IOException e) {
-            throw new AiravataMonitorException(e);
-        }
-    }
-
-private JobState getStatusFromString(String status) {
-        logger.info("parsing the job status returned : " + status);
-        if(status != null){
-            if("ipf:finished".equals(status)){
-                return JobState.COMPLETE;
-            }else if("ipf:pending".equals(status)|| "ipf:starting".equals(status)){
-                return JobState.QUEUED;
-            }else if("ipf:running".equals(status) || "ipf:finishing".equals(status)){
-                return JobState.ACTIVE;
-            }else if ("ipf:held".equals(status) || "ipf:teminating".equals(status) || "ipf:teminated".equals(status)) {
-                return JobState.HELD;
-            } else if ("ipf:suspending".equals(status)) {
-                return JobState.SUSPENDED;
-            }else if ("ipf:failed".equals(status)) {
-                return JobState.FAILED;
-            }else if ("ipf:unknown".equals(status)){
-                return JobState.UNKNOWN;
-            }
-        }
-        return JobState.UNKNOWN;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
deleted file mode 100644
index c4275f1..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * 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.monitor.impl.push.amqp;
-
-import com.rabbitmq.client.Channel;
-import com.rabbitmq.client.Connection;
-import com.rabbitmq.client.ConnectionFactory;
-import com.rabbitmq.client.QueueingConsumer;
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class SimpleJobFinishConsumer {
-    private final static Logger logger = LoggerFactory.getLogger(SimpleJobFinishConsumer.class);
-
-    private List<String> completedJobsFromPush;
-
-    public SimpleJobFinishConsumer(List<String> completedJobsFromPush) {
-        this.completedJobsFromPush = completedJobsFromPush;
-    }
-
-    public void listen() {
-        try {
-            String queueName = ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950");
-            String uri = "amqp://localhost";
-
-            ConnectionFactory connFactory = new ConnectionFactory();
-            connFactory.setUri(uri);
-            Connection conn = connFactory.newConnection();
-            logger.info("--------Created the connection to Rabbitmq server successfully-------");
-
-            final Channel ch = conn.createChannel();
-
-            logger.info("--------Created the channel with Rabbitmq server successfully-------");
-
-            ch.queueDeclare(queueName, false, false, false, null);
-
-            logger.info("--------Declare the queue " + queueName + " in Rabbitmq server successfully-------");
-
-            final QueueingConsumer consumer = new QueueingConsumer(ch);
-            ch.basicConsume(queueName, consumer);
-            (new Thread() {
-                public void run() {
-                    try {
-                        while (true) {
-                            QueueingConsumer.Delivery delivery = consumer.nextDelivery();
-                            String message = new String(delivery.getBody());
-                            logger.info("---------------- Job Finish message received:" + message + " --------------");
-                            synchronized (completedJobsFromPush) {
-                                completedJobsFromPush.add(message);
-                            }
-                            ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
-                        }
-                    } catch (Exception ex) {
-                        logger.error("--------Cannot connect to a RabbitMQ Server--------" , ex);
-                    }
-                }
-
-            }).start();
-        } catch (Exception ex) {
-            logger.error("Cannot connect to a RabbitMQ Server: " , ex);
-            logger.info("------------- Push monitoring for HPC jobs is disabled -------------");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
deleted file mode 100644
index a701326..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * 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.monitor.impl.push.amqp;
-
-import com.google.common.eventbus.Subscribe;
-import com.rabbitmq.client.Channel;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.gfac.monitor.util.CommonUtils;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Map;
-
-public class UnRegisterWorker{
-    private final static Logger logger = LoggerFactory.getLogger(UnRegisterWorker.class);
-    private Map<String, Channel> availableChannels;
-
-    public UnRegisterWorker(Map<String, Channel> channels) {
-        this.availableChannels = channels;
-    }
-
-    @Subscribe
-    private boolean unRegisterListener(JobStatusChangeEvent jobStatus, MonitorID monitorID) throws AiravataMonitorException {
-        String channelID = CommonUtils.getChannelID(monitorID);
-        if (JobState.FAILED.equals(jobStatus.getState()) || JobState.COMPLETE.equals(jobStatus.getState())){
-            Channel channel = availableChannels.get(channelID);
-            if (channel == null) {
-                logger.error("Already Unregistered the listener");
-                throw new AiravataMonitorException("Already Unregistered the listener");
-            } else {
-                try {
-                    channel.queueUnbind(channel.queueDeclare().getQueue(), "glue2.computing_activity", CommonUtils.getRoutingKey(monitorID));
-                    channel.close();
-                    channel.getConnection().close();
-                    availableChannels.remove(channelID);
-                } catch (IOException e) {
-                    logger.error("Error unregistering the listener");
-                    throw new AiravataMonitorException("Error unregistering the listener");
-                }
-            }
-        }
-        return true;
-    }
-}
-


[61/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/client/java/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/resources/LICENSE b/modules/distribution/client/java/src/main/resources/LICENSE
deleted file mode 100644
index 24cb886..0000000
--- a/modules/distribution/client/java/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2272 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and survive.
-
-    Everyone is permitted to copy and distribute copies of this Agreement,
-    but in order to avoid inconsistency the Agreement is copyrighted and may
-    only be modified in the following manner. The Agreement Steward reserves
-    the right to publish new versions (including revisions) of this Agreement
-    from time to time. No one other than the Agreement Steward has the right
-    to modify this Agreement. The Eclipse Foundation is the initial Agreement
-    Steward. The Eclipse Foundation may assign the responsibility to serve as
-    the Agreement Steward to a suitable separate entity. Each new version of
-    the Agreement will be given a distinguishing version number. The Program
-    (including Contributions) may always be distributed subject to the version
-    of the Agreement under which it was received. In addition, after a new
-    version of the Agreement is published, Contributor may elect to distribute
-    the Program (including its Contributions) under the new version. Except as
-    expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-    rights or licenses to the intellectual property of any Contributor under
-    this Agreement, whether expressly, by implication, estoppel or otherwise.
-    All rights in the Program not expressly granted under this Agreement
-    are reserved.
-
-    This Agreement is governe

<TRUNCATED>

[29/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
deleted file mode 100644
index f027ccb..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * 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.core.utils;
-
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.model.messaging.event.TaskIdentifier;
-import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-public class OutHandlerWorker implements Runnable {
-    private final static Logger logger = LoggerFactory.getLogger(OutHandlerWorker.class);
-
-    private GFac gfac;
-
-    private MonitorID monitorID;
-
-    private MonitorPublisher monitorPublisher;
-    private JobExecutionContext jEC;
-
-    public OutHandlerWorker(GFac gfac, MonitorID monitorID,MonitorPublisher monitorPublisher) {
-        this.gfac = gfac;
-        this.monitorID = monitorID;
-        this.monitorPublisher = monitorPublisher;
-        this.jEC = monitorID.getJobExecutionContext();
-    }
-
-    public OutHandlerWorker(JobExecutionContext jEC) {
-        this.jEC = jEC;
-        this.gfac = jEC.getGfac();
-        this.monitorPublisher = jEC.getMonitorPublisher();
-    }
-
-    @Override
-    public void run() {
-        try {
-//            gfac.invokeOutFlowHandlers(monitorID.getJobExecutionContext());
-            gfac.invokeOutFlowHandlers(jEC);
-        } catch (Exception e) {
-            logger.error(e.getMessage(),e);
-            TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskID(), monitorID.getWorkflowNodeID(),monitorID.getExperimentID(), monitorID.getJobExecutionContext().getGatewayID());
-            //FIXME this is a case where the output retrieving fails even if the job execution was a success. Thus updating the task status
-            monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(monitorID.getJobExecutionContext(),  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            } catch (GFacException e1) {
-                logger.error("Error while persisting error details", e);
-            }
-            logger.info(e.getLocalizedMessage(), e);
-            // Save error details to registry
-
-        }
-//        monitorPublisher.publish(monitorID.getStatus());
-        monitorPublisher.publish(jEC.getJobDetails().getJobStatus());
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
deleted file mode 100644
index 3c8bbf0..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * 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.core.utils;
-
-import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class OutputUtils {
-    private static String regexPattern = "\\s*=\\s*(.*)\\r?\\n";
-
-	public static void fillOutputFromStdout(Map<String, Object> output, String stdout, String stderr, List<OutputDataObjectType> outputArray) throws Exception {
-        // this is no longer correct
-//		if (stdout == null || stdout.equals("")) {
-//			throw new GFacHandlerException("Standard output is empty.");
-//		}
-
-		Set<String> keys = output.keySet();
-        OutputDataObjectType actual = null;
-        OutputDataObjectType resultOutput = null;
-		for (String paramName : keys) {
-			actual = (OutputDataObjectType) output.get(paramName);
-			// if parameter value is not already set, we let it go
-
-			if (actual == null) {
-				continue;
-			}
-            resultOutput = new OutputDataObjectType();
-            if (DataType.STDOUT == actual.getType()) {
-                actual.setValue(stdout);
-                resultOutput.setName(paramName);
-                resultOutput.setType(DataType.STDOUT);
-                resultOutput.setValue(stdout);
-                outputArray.add(resultOutput);
-			} else if (DataType.STDERR == actual.getType()) {
-                actual.setValue(stderr);
-                resultOutput.setName(paramName);
-                resultOutput.setType(DataType.STDERR);
-                resultOutput.setValue(stderr);
-                outputArray.add(resultOutput);
-            }
-//			else if ("URI".equals(actual.getType().getType().toString())) {
-//				continue;
-//			} 
-            else {
-                String parseStdout = parseStdout(stdout, paramName);
-                if (parseStdout != null) {
-                    actual.setValue(parseStdout);
-                    resultOutput.setName(paramName);
-                    resultOutput.setType(DataType.STRING);
-                    resultOutput.setValue(parseStdout);
-                    outputArray.add(resultOutput);
-                }
-            }
-        }
-	}
-
-    private static String parseStdout(String stdout, String outParam) throws Exception {
-        String regex = Pattern.quote(outParam) + regexPattern;
-        String match = null;
-        Pattern pattern = Pattern.compile(regex);
-        Matcher matcher = pattern.matcher(stdout);
-        while (matcher.find()) {
-            match = matcher.group(1);
-        }
-        if (match != null) {
-            match = match.trim();
-            return match;
-        } 
-        return null;
-    }
-
-    public static String[] parseStdoutArray(String stdout, String outParam) throws Exception {
-        String regex = Pattern.quote(outParam) + regexPattern;
-        StringBuffer match = new StringBuffer();
-        Pattern pattern = Pattern.compile(regex);
-        Matcher matcher = pattern.matcher(stdout);
-        while (matcher.find()) {
-            match.append(matcher.group(1) + StringUtil.DELIMETER);
-        }
-        if (match != null && match.length() >0) {
-        	return StringUtil.getElementsFromString(match.toString());
-        } 
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/pom.xml b/modules/gfac/gfac-gsissh/pom.xml
deleted file mode 100644
index 81c3ec9..0000000
--- a/modules/gfac/gfac-gsissh/pom.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-gsissh</artifactId>
-    <name>Airavata GFac GSI-SSH implementation</name>
-    <description>This is the extension of </description>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-email-monitor</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- GFAC dependencies -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-ssh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Credential Store -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-
-        <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- gsi-ssh api dependencies -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.jcraft</groupId>
-            <artifactId>jsch</artifactId>
-            <version>0.1.50</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>net.schmizz</groupId>
-            <artifactId>sshj</artifactId>
-            <version>0.6.1</version>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
deleted file mode 100644
index b4790c7..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- * 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.gsissh.handler;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-
-public class GSISSHDirectorySetupHandler extends AbstractHandler {
-      private static final Logger log = LoggerFactory.getLogger(GSISSHDirectorySetupHandler.class);
-
-	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-            }
-        } catch (Exception e) {
-        	 try {
-                 StringWriter errors = new StringWriter();
-                 e.printStackTrace(new PrintWriter(errors));
-  				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-  			} catch (GFacException e1) {
-  				 log.error(e1.getLocalizedMessage());
-  			}
-        	throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        }
-
-        log.info("Setup SSH job directorties");
-        super.invoke(jobExecutionContext);
-        makeDirectory(jobExecutionContext);
-	}
-	private void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        Cluster cluster = null;
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                try {
-                    GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                } catch (GFacException e1) {
-                    log.error(e1.getLocalizedMessage());
-                }
-                throw new GFacHandlerException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-
-            String workingDirectory = jobExecutionContext.getWorkingDir();
-            cluster.makeDirectory(workingDirectory);
-            if(!jobExecutionContext.getInputDir().equals(workingDirectory))
-                cluster.makeDirectory(jobExecutionContext.getInputDir());
-            if(!jobExecutionContext.getOutputDir().equals(workingDirectory))
-            	cluster.makeDirectory(jobExecutionContext.getOutputDir());
-            
-            DataTransferDetails detail = new DataTransferDetails();
-            TransferStatus status = new TransferStatus();
-            status.setTransferState(TransferState.DIRECTORY_SETUP);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("Working directory = " + workingDirectory);
-
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-		} catch (Exception e) {
-			DataTransferDetails detail = new DataTransferDetails();
-			TransferStatus status = new TransferStatus();
-			detail.setTransferDescription("Working directory = " + jobExecutionContext.getWorkingDir());
-			status.setTransferState(TransferState.FAILED);
-			detail.setTransferStatus(status);
-			try {
-				registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-			} catch (Exception e1) {
-				throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-			}
-			throw new GFacHandlerException("Error executing the Handler: " + GSISSHDirectorySetupHandler.class, e);
-		}
-	}
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-         this.invoke(jobExecutionContext);
-    }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
deleted file mode 100644
index 3b36e86..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- *
- * 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.gsissh.handler;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TransferState;
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-/**
- * Recoverability for this handler assumes the same input values will come in the second
- * run, and assume nobody is changing registry during the original submission and re-submission
- */
-public class GSISSHInputHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(GSISSHInputHandler.class);
-
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        super.invoke(jobExecutionContext);
-        int index = 0;
-        int oldIndex = 0;
-        List<String> oldFiles = new ArrayList<String>();
-        MessageContext inputNew = new MessageContext();
-        DataTransferDetails detail = new DataTransferDetails();
-        TransferStatus status = new TransferStatus();
-        StringBuffer data = new StringBuffer("|");
-        Cluster cluster = null;
-
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-            }
-
-            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                throw new GFacException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-
-            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
-            if (pluginData != null) {
-                try {
-                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
-                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
-                    if (oldIndex == oldFiles.size()) {
-                        log.info("Old data looks good !!!!");
-                    } else {
-                        oldIndex = 0;
-                        oldFiles.clear();
-                    }
-                } catch (NumberFormatException e) {
-                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
-                }
-            }
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                try {
-                    GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    try {
-                        GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-                    } catch (GFacException e1) {
-                        log.error(e1.getLocalizedMessage());
-                    }
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-            log.info("Invoking SCPInputHandler");
-
-            MessageContext input = jobExecutionContext.getInMessageContext();
-            Set<String> parameters = input.getParameters().keySet();
-            for (String paramName : parameters) {
-                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
-                String paramValue = inputParamType.getValue();
-                //TODO: Review this with type
-                if (inputParamType.getType() == DataType.URI) {
-                    if (index < oldIndex) {
-                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-                        inputParamType.setValue(oldFiles.get(index));
-                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
-                    } else {
-                        String stageInputFile = stageInputFiles(cluster, jobExecutionContext, paramValue);
-                        inputParamType.setValue(stageInputFile);
-                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
-                        status.setTransferState(TransferState.UPLOAD);
-                        detail.setTransferStatus(status);
-                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                    }
-                } // FIXME: what is the thrift model DataType equivalent for URIArray type?
-//                else if ("URIArray".equals(inputParamType.getType().getType().toString())) {
-//                    List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
-//                    List<String> newFiles = new ArrayList<String>();
-//                    for (String paramValueEach : split) {
-//                        if (index < oldIndex) {
-//                            log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-//                            newFiles.add(oldFiles.get(index));
-//                            data.append(oldFiles.get(index++)).append(",");
-//                        } else {
-//                            String stageInputFiles = stageInputFiles(cluster, jobExecutionContext, paramValueEach);
-//                            status.setTransferState(TransferState.UPLOAD);
-//                            detail.setTransferStatus(status);
-//                            detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
-//                            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-//                            StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
-//                            GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-//                            newFiles.add(stageInputFiles);
-//                        }
-//
-//                    }
-//                    ((URIArrayType) inputParamType.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
-//                }
-                inputNew.getParameters().put(paramName, inputParamType);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage());
-            status.setTransferState(TransferState.FAILED);
-            detail.setTransferDescription(e.getLocalizedMessage());
-            detail.setTransferStatus(status);
-            try {
-                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            } catch (Exception e1) {
-                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-        }
-        jobExecutionContext.setInMessageContext(inputNew);
-    }
-
-    private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
-        int i = paramValue.lastIndexOf(File.separator);
-        String substring = paramValue.substring(i + 1);
-        try {
-            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
-            if (paramValue.startsWith("file")) {
-                paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
-            }
-            boolean success = false;
-            int j = 1;
-            while(!success){
-            try {
-				cluster.scpTo(targetFile, paramValue);
-				success = true;
-			} catch (Exception e) {
-				log.info(e.getLocalizedMessage());
-				Thread.sleep(2000);
-				 if(j==3) {
-					throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-				 }
-            }
-            j++;
-            }
-            return targetFile;
-        } catch (Exception e) {
-            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-        }
-    }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        this.invoke(jobExecutionContext);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
deleted file mode 100644
index 18dcb97..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- *
- * 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.gsissh.handler;
-
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-//import org.apache.airavata.commons.gfac.type.MappingFactory;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.core.utils.OutputUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TransferState;
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-public class GSISSHOutputHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(GSISSHOutputHandler.class);
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        super.invoke(jobExecutionContext);
-        int index = 0;
-        int oldIndex = 0;
-        List<String> oldFiles = new ArrayList<String>();
-        StringBuffer data = new StringBuffer("|");
-        String hostAddress = jobExecutionContext.getHostName();
-        try {
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-            }
-        }  catch (Exception e) {
-        	 try {
-  				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-  			} catch (GFacException e1) {
-  				 log.error(e1.getLocalizedMessage());
-  			}  
-            log.error(e.getMessage());
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        }
-        DataTransferDetails detail = new DataTransferDetails();
-        TransferStatus status = new TransferStatus();
-
-        Cluster cluster = null;
-        
-        try {
-            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-            if (cluster == null) {
-                GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-                
-                throw new GFacProviderException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-
-            // Get the Stdouts and StdErrs
-            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
-            if (pluginData != null) {
-                try {
-                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
-                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
-                    if (oldIndex == oldFiles.size()) {
-                        log.info("Old data looks good !!!!");
-                    } else {
-                        oldIndex = 0;
-                        oldFiles.clear();
-                    }
-                } catch (NumberFormatException e) {
-                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
-                }
-            }
-
-            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
-
-            TaskDetails taskData = jobExecutionContext.getTaskData();
-            String outputDataDir = null;
-            File localStdOutFile;
-            File localStdErrFile;
-            //FIXME: AdvancedOutput is remote location and third party transfer should work to make this work 
-//            if (taskData.getAdvancedOutputDataHandling() != null) {
-//                outputDataDir = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
-//            }
-            if (outputDataDir == null) {
-                outputDataDir = File.separator + "tmp";
-            }
-            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
-            (new File(outputDataDir)).mkdirs();
-         	
-            String stdOutStr = "";
-            if (index < oldIndex) {
-                localStdOutFile = new File(oldFiles.get(index));
-                data.append(oldFiles.get(index++)).append(",");
-            } else {
-            	int i = 0;
-                localStdOutFile = new File(outputDataDir + File.separator + jobExecutionContext.getApplicationName() + ".stdout");
-                while(stdOutStr.isEmpty()){
-                try {
-                	cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
-                	stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
-				} catch (Exception e) {
-					log.error(e.getLocalizedMessage());
-					  Thread.sleep(2000);
-		        }
-                i++;
-                if(i==3)break;
-                }
-                
-                StringBuffer temp = new StringBuffer(data.append(localStdOutFile.getAbsolutePath()).append(",").toString());
-                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-            }
-            if (index < oldIndex) {
-                localStdErrFile = new File(oldFiles.get(index));
-                data.append(oldFiles.get(index++)).append(",");
-            } else {
-                localStdErrFile = new File(outputDataDir + File.separator + jobExecutionContext.getApplicationName() + ".stderr");
-                cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
-                StringBuffer temp = new StringBuffer(data.append(localStdErrFile.getAbsolutePath()).append(",").toString());
-                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-            }
-
-            String stdErrStr = GFacUtils.readFileToString(localStdErrFile.getAbsolutePath());
-            status.setTransferState(TransferState.STDOUT_DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-            status.setTransferState(TransferState.STDERROR_DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-            //todo this is a mess we have to fix this
-            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
-            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
-            Set<String> keys = output.keySet();
-            for (String paramName : keys) {
-                OutputDataObjectType outputDataObjectType = (OutputDataObjectType) output.get(paramName);
-                if (DataType.URI == outputDataObjectType.getType()) {
-
-                    List<String> outputList = null;
-                    int retry=3;
-                    while(retry>0){
-                    	 outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
-                        if (outputList.size() == 1 && outputList.get(0).isEmpty()) {
-                            Thread.sleep(10000);
-                        } else if (outputList.size() > 0) {
-                            break;
-                        }else{
-                            Thread.sleep(10000);
-                        }
-                        retry--;
-                        if(retry==0){
-                        }
-                    	 Thread.sleep(10000);
-                    }
-                    if (outputList.size() == 0 || outputList.get(0).isEmpty() || outputList.size() > 1) {
-                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-                        Set<String> strings = output.keySet();
-                        outputArray.clear();
-                        for (String key : strings) {
-                            OutputDataObjectType outputDataObjectType1 = (OutputDataObjectType) output.get(key);
-                            if (DataType.URI == outputDataObjectType1.getType()) {
-                                String downloadFile = outputDataObjectType1.getValue();
-                                String localFile;
-                                if (index < oldIndex) {
-                                    localFile = oldFiles.get(index);
-                                    data.append(oldFiles.get(index++)).append(",");
-                                } else {
-                                    cluster.scpFrom(downloadFile, outputDataDir);
-                                    String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
-                                    localFile = outputDataDir + File.separator + fileName;
-                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
-                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                                }
-                                jobExecutionContext.addOutputFile(localFile);
-                                outputDataObjectType1.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.URI);
-                                outputArray.add(dataObjectType);
-                            }else if (DataType.STDOUT == outputDataObjectType1.getType()) {
-                                String localFile;
-                                if (index < oldIndex) {
-                                    localFile = oldFiles.get(index);
-                                    data.append(oldFiles.get(index++)).append(",");
-                                } else {
-                                    String fileName = localStdOutFile.getName();
-                                    localFile = outputDataDir + File.separator + fileName;
-                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
-                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                                }
-                                jobExecutionContext.addOutputFile(localFile);
-                                outputDataObjectType1.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.STDOUT);
-                                outputArray.add(dataObjectType);
-                            }else if (DataType.STDERR == outputDataObjectType1.getType()) {
-                                String localFile;
-                                if (index < oldIndex) {
-                                    localFile = oldFiles.get(index);
-                                    data.append(oldFiles.get(index++)).append(",");
-                                } else {
-                                    String fileName = localStdErrFile.getName();
-                                    localFile = outputDataDir + File.separator + fileName;
-                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
-                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                                }
-                                jobExecutionContext.addOutputFile(localFile);
-                                outputDataObjectType1.setValue(localFile);
-                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
-                                dataObjectType.setValue(localFile);
-                                dataObjectType.setName(key);
-                                dataObjectType.setType(DataType.STDERR);
-                                outputArray.add(dataObjectType);
-                            }
-                        }
-                        break;
-                    } else if(outputList.size() == 1) { //FIXME: this is ultrascan specific
-                        String valueList = outputList.get(0);
-                        String outputFile;
-                        if (index < oldIndex) {
-                            outputFile = oldFiles.get(index);
-                            data.append(oldFiles.get(index++)).append(",");
-                        } else {
-                            cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
-                            outputFile = outputDataDir + File.separator + valueList;
-                            jobExecutionContext.addOutputFile(outputFile);
-                            StringBuffer temp = new StringBuffer(data.append(outputFile).append(",").toString());
-                            GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                        }
-                        jobExecutionContext.addOutputFile(outputFile);
-                        outputDataObjectType.setValue(outputFile);
-                        OutputDataObjectType dataObjectType  = new OutputDataObjectType();
-                        dataObjectType.setValue(valueList);
-                        dataObjectType.setName(paramName);
-                        dataObjectType.setType(DataType.URI);
-                        outputArray.add(dataObjectType);
-                    }
-                } else {
-                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-//                    break;
-                }
-            }
-            if (outputArray == null || outputArray.isEmpty()) {
-                if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null){
-                throw new GFacHandlerException(
-                        "Empty Output returned from the Application, Double check the application"
-                                + "and ApplicationDescriptor output Parameter Names"
-                );
-                }
-            }
-            // Why we set following?
-            jobExecutionContext.setStandardError(localStdErrFile.getAbsolutePath());
-            jobExecutionContext.setStandardOutput(localStdOutFile.getAbsolutePath());
-            jobExecutionContext.setOutputDir(outputDataDir);
-            status.setTransferState(TransferState.DOWNLOAD);
-            detail.setTransferStatus(status);
-            detail.setTransferDescription(outputDataDir);
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-            fireTaskOutputChangeEvent(jobExecutionContext, outputArray);
-        } catch (Exception e) {
-            try {
-                status.setTransferState(TransferState.FAILED);
-                detail.setTransferStatus(status);
-                detail.setTransferDescription(e.getLocalizedMessage());
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-            } catch (Exception e1) {
-                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error in retrieving results", e);
-        }
-     }
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-
-    }
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        this.invoke(jobExecutionContext);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
deleted file mode 100644
index ed94312..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.airavata.gfac.gsissh.handler;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gfac.ssh.util.HandleOutputs;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NewGSISSHOutputHandler extends AbstractHandler{
-	 private static final Logger log = LoggerFactory.getLogger(NewGSISSHOutputHandler.class);
-	  public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-	        super.invoke(jobExecutionContext);
-	        String hostAddress = jobExecutionContext.getHostName();
-	        try {
-	            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-	                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-	            }
-	        }  catch (Exception e) {
-	        	 try {
-	  				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-	  			} catch (GFacException e1) {
-	  				 log.error(e1.getLocalizedMessage());
-	  			}  
-	            log.error(e.getMessage());
-	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-	        }
-	        Cluster cluster = null;
-	        
-	        try {
-	            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
-	            if (cluster == null) {
-	                GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-	                
-	                throw new GFacProviderException("Security context is not set properly");
-	            } else {
-	                log.info("Successfully retrieved the Security Context");
-	            }
-	        } catch (Exception e) {
-	            log.error(e.getMessage());
-	            try {
-	                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-	            } catch (GFacException e1) {
-	                log.error(e1.getLocalizedMessage());
-	            }
-	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-	        }
-
-	        super.invoke(jobExecutionContext);
-	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
-            try {
-				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-			} catch (RegistryException e) {
-				throw new GFacHandlerException(e);
-			}
-	    }
-
-    @Override
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        // TODO: Auto generated method body.
-    }
-
-    @Override
-	public void initProperties(Properties properties) throws GFacHandlerException {
-		// TODO Auto-generated method stub
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
deleted file mode 100644
index 36aac4c..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- *
- * 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.gsissh.provider.impl;
-
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.gfac.ExecutionMode;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
-import org.apache.airavata.gfac.core.provider.AbstractProvider;
-import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
-import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
-import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
-import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.zookeeper.KeeperException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.List;
-import java.util.Map;
-
-//import org.apache.airavata.schemas.gfac.GsisshHostType;
-
-public class GSISSHProvider extends AbstractProvider {
-    private static final Logger log = LoggerFactory.getLogger(GSISSHProvider.class);
-
-    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
-
-    }
-
-    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        super.initialize(jobExecutionContext);
-        try {
-            String hostAddress = jobExecutionContext.getHostName();
-            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
-                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-            }
-        } catch (ApplicationSettingsException e) {
-            log.error(e.getMessage());
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        } catch (GFacException e) {
-            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-        }
-    }
-
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        log.info("Invoking GSISSH Provider Invoke ...");
-        StringBuffer data = new StringBuffer();
-        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
-        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
-                .getComputeResourceDescription();
-        ApplicationDeploymentDescription appDeployDesc = jobExecutionContext.getApplicationContext()
-                .getApplicationDeploymentDescription();
-        JobDetails jobDetails = new JobDetails();
-        Cluster cluster = null;
-
-        try {
-            if (jobExecutionContext.getSecurityContext(jobExecutionContext.getHostName()) != null) {
-                cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(jobExecutionContext.getHostName())).getPbsCluster();
-            }
-            if (cluster == null) {
-                throw new GFacProviderException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-            // This installed path is a mandetory field, because this could change based on the computing resource
-            JobDescriptor jobDescriptor = GFACGSISSHUtils.createJobDescriptor(jobExecutionContext, cluster);
-            jobDetails.setJobName(jobDescriptor.getJobName());
-
-            log.info(jobDescriptor.toXML());
-            data.append("jobDesc=").append(jobDescriptor.toXML());
-            jobDetails.setJobDescription(jobDescriptor.toXML());
-            String jobID = cluster.submitBatchJob(jobDescriptor);
-            jobExecutionContext.setJobDetails(jobDetails);
-            if (jobID == null) {
-                jobDetails.setJobID("none");
-                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-            } else {
-                jobDetails.setJobID(jobID.split("\\.")[0]);
-                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
-            }
-            data.append(",jobId=").append(jobDetails.getJobID());
-
-            // Now job has submitted to the resource, its up to the Provider to parse the information to daemon handler
-            // to perform monitoring, daemon handlers can be accessed from anywhere
-            monitor(jobExecutionContext);
-            // we know this host is type GsiSSHHostType
-        } catch (Exception e) {
-		    String error = "Error submitting the job to host " + computeResourceDescription.getHostName() + " message: " + e.getMessage();
-            log.error(error);
-            jobDetails.setJobID("none");
-            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-            StringWriter errors = new StringWriter();
-            e.printStackTrace(new PrintWriter(errors));
-            GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            throw new GFacProviderException(error, e);
-        } finally {
-            log.info("Saving data for future recovery: ");
-            log.info(data.toString());
-            GFacUtils.saveHandlerData(jobExecutionContext, data, this.getClass().getName());
-        } 
-          
-    }
-
-    public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, SSHJobSubmission sshJobSubmission, String jobID) throws GFacHandlerException {
-/*        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
-        if (daemonHandlers == null) {
-            daemonHandlers = BetterGfacImpl.getDaemonHandlers();
-        }
-        ThreadedHandler pullMonitorHandler = null;
-        ThreadedHandler pushMonitorHandler = null;
-        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-        for (ThreadedHandler threadedHandler : daemonHandlers) {
-            if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
-                pullMonitorHandler = threadedHandler;
-                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
-                    jobExecutionContext.setProperty("cancel","true");
-                    pullMonitorHandler.invoke(jobExecutionContext);
-                } else {
-                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PULL" +
-                            " to handle by the GridPullMonitorHandler");
-                }
-            } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
-                pushMonitorHandler = threadedHandler;
-                if ( monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
-                    pushMonitorHandler.invoke(jobExecutionContext);
-                } else {
-                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PUSH" +
-                            " to handle by the GridPushMonitorHandler");
-                }
-            }
-            // have to handle the GridPushMonitorHandler logic
-        }
-        if (pullMonitorHandler == null && pushMonitorHandler == null && ExecutionMode.ASYNCHRONOUS.equals(jobExecutionContext.getGFacConfiguration().getExecutionMode())) {
-            log.error("No Daemon handler is configured in gfac-config.xml, either pull or push, so monitoring will not invoked" +
-                    ", execution is configured as asynchronous, so Outhandler will not be invoked");
-        }*/
-    }
-
-    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
-        //To change body of implemented methods use File | Settings | File Templates.
-        log.info("canceling the job status in GSISSHProvider!!!!!");
-        JobDetails jobDetails = jobExecutionContext.getJobDetails();
-        String hostName = jobExecutionContext.getHostName();
-        try {
-            Cluster cluster = null;
-            if (jobExecutionContext.getSecurityContext(hostName) == null) {
-                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-            }
-            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostName)).getPbsCluster();
-            if (cluster == null) {
-                throw new GFacProviderException("Security context is not set properly");
-            } else {
-                log.info("Successfully retrieved the Security Context");
-            }
-            // This installed path is a mandetory field, because this could change based on the computing resource
-            if(jobDetails == null) {
-                log.error("There is not JobDetails so cancelations cannot perform !!!");
-                return false;
-            }
-            if (jobDetails.getJobID() != null) {
-                // if this operation success without any exceptions, we can assume cancel operation succeeded.
-                cluster.cancelJob(jobDetails.getJobID());
-            } else {
-                log.error("No Job Id is set, so cannot perform the cancel operation !!!");
-                return false;
-            }
-            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
-            return true;
-            // we know this host is type GsiSSHHostType
-        } catch (SSHApiException e) {
-            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-            log.error(error);
-            jobDetails.setJobID("none");
-            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            throw new GFacProviderException(error, e);
-        } catch (Exception e) {
-            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
-            log.error(error);
-            jobDetails.setJobID("none");
-            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
-            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            throw new GFacProviderException(error, e);
-        }
-    }
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
-        // have to implement the logic to recover a gfac failure
-        log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
-        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
-                .getComputeResourceDescription();
-        String hostName = jobExecutionContext.getHostName();
-        String jobId = "";
-        String jobDesc = "";
-        try {
-            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
-            String[] split = pluginData.split(",");
-            if (split.length < 2) {
-                try {
-                    this.execute(jobExecutionContext);
-                } catch (GFacException e) {
-                    log.error("Error while  recovering provider", e);
-                    throw new GFacProviderException("Error recovering provider", e);
-                }
-                return;
-            }
-            jobDesc = split[0].substring(7);
-            jobId = split[1].substring(6);
-
-            log.info("Following data have recovered: ");
-            log.info("Job Description: " + jobDesc);
-            log.info("Job Id: " + jobId);
-            if (jobId == null || "none".equals(jobId) ||
-                    "".equals(jobId)) {
-                try {
-                    this.execute(jobExecutionContext);
-                } catch (GFacException e) {
-                    log.error("Error while  recovering provider", e);
-                    throw new GFacProviderException("Error recovering provider", e);
-                }
-                return;
-            }
-        } catch (Exception e) {
-            log.error("Error while  recovering provider", e);
-        }
-        try {
-            // Now we are we have enough data to recover
-            JobDetails jobDetails = new JobDetails();
-            jobDetails.setJobDescription(jobDesc);
-            jobDetails.setJobID(jobId);
-            jobExecutionContext.setJobDetails(jobDetails);
-            if (jobExecutionContext.getSecurityContext(hostName) == null) {
-                try {
-                    GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
-                } catch (ApplicationSettingsException e) {
-                    log.error(e.getMessage());
-                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
-                }
-            }
-            monitor(jobExecutionContext);
-        } catch (Exception e) {
-            log.error("Error while recover the job", e);
-            throw new GFacProviderException("Error delegating already ran job to Monitoring", e);
-        }
-    }
-
-    @Override
-    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
-        String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
-        SSHJobSubmission sshJobSubmission = null;
-        try {
-            sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
-        } catch (AppCatalogException e) {
-            throw new GFacException("Error while reading compute resource", e);
-        }
-        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
-            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR) {
-                try {
-                    EmailBasedMonitor emailBasedMonitor = EmailMonitorFactory.getEmailBasedMonitor(
-                            sshJobSubmission.getResourceJobManager().getResourceJobManagerType());
-                    emailBasedMonitor.addToJobMonitorMap(jobExecutionContext);
-                } catch (AiravataException e) {
-                    throw new GFacHandlerException("Error while activating email job monitoring ", e);
-                }
-                return;
-            }
-        }
-/*
-        // if email monitor is not activeated or not configure we use pull or push monitor
-        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
-        if (daemonHandlers == null) {
-            daemonHandlers = BetterGfacImpl.getDaemonHandlers();
-        }
-        ThreadedHandler pullMonitorHandler = null;
-        ThreadedHandler pushMonitorHandler = null;
-        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-        String jobID = jobExecutionContext.getJobDetails().getJobID();
-        for (ThreadedHandler threadedHandler : daemonHandlers) {
-            if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
-                pullMonitorHandler = threadedHandler;
-                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
-                    log.info("Job is launched successfully now parsing it to monitoring in pull mode, JobID Returned:  " + jobID);
-                    pullMonitorHandler.invoke(jobExecutionContext);
-                } else {
-                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PULL" +
-                            " to handle by the GridPullMonitorHandler");
-                }
-            } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
-                pushMonitorHandler = threadedHandler;
-                if (monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
-                    log.info("Job is launched successfully now parsing it to monitoring in push mode, JobID Returned:  " + jobID);
-                    pushMonitorHandler.invoke(jobExecutionContext);
-                } else {
-                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PUSH" +
-                            " to handle by the GridPushMonitorHandler");
-                }
-            }
-            // have to handle the GridPushMonitorHandler logic
-        }
-        if (pullMonitorHandler == null && pushMonitorHandler == null && ExecutionMode.ASYNCHRONOUS.equals(jobExecutionContext.getGFacConfiguration().getExecutionMode())) {
-            log.error("No Daemon handler is configured in gfac-config.xml, either pull or push, so monitoring will not invoked" +
-                    ", execution is configured as asynchronous, so Outhandler will not be invoked");
-
-        }*/
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
deleted file mode 100644
index 46e7acd..0000000
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * 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.gsissh.security;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.credential.Credential;
-import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.gfac.AbstractSecurityContext;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.RequestData;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.globus.gsi.X509Credential;
-import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
-import org.globus.gsi.provider.GlobusProvider;
-import org.globus.myproxy.GetParams;
-import org.globus.myproxy.MyProxy;
-import org.globus.myproxy.MyProxyException;
-import org.gridforum.jgss.ExtendedGSSCredential;
-import org.ietf.jgss.GSSCredential;
-import org.ietf.jgss.GSSException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.security.Security;
-import java.security.cert.X509Certificate;
-
-/**
- * Handles GRID related security.
- */
-public class GSISecurityContext extends AbstractSecurityContext {
-
-    protected static final Logger log = LoggerFactory.getLogger(GSISecurityContext.class);
-    /*
-     * context name
-     */
-
-    private Cluster pbsCluster = null;
-
-
-    public GSISecurityContext(CredentialReader credentialReader, RequestData requestData, Cluster pbsCluster) {
-        super(credentialReader, requestData);
-        this.pbsCluster = pbsCluster;
-    }
-
-
-    public GSISecurityContext(CredentialReader credentialReader, RequestData requestData) {
-        super(credentialReader, requestData);
-    }
-
-
-    public GSISecurityContext(Cluster pbsCluster) {
-        this.setPbsCluster(pbsCluster);
-    }
-
-
-
-    public Cluster getPbsCluster() {
-        return pbsCluster;
-    }
-
-    public void setPbsCluster(Cluster pbsCluster) {
-        this.pbsCluster = pbsCluster;
-    }
-}


[26/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
new file mode 100644
index 0000000..11fb4ce
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
@@ -0,0 +1,190 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class SlurmOutputParser implements OutputParser {
+    private static final Logger log = LoggerFactory.getLogger(SlurmOutputParser.class);
+    public static final int JOB_NAME_OUTPUT_LENGTH = 8;
+    public static final String STATUS = "status";
+
+    public void parseSingleJob(JobDescriptor descriptor, String rawOutput) throws SSHApiException {
+        log.info(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String lastString = info[info.length - 1];
+        if (lastString.contains("JOB ID")) {
+            // because there's no state
+            descriptor.setStatus("U");
+        } else {
+            int column = 0;
+            System.out.println(lastString);
+            for (String each : lastString.split(" ")) {
+                if (each.trim().isEmpty()) {
+                    continue;
+                } else {
+                    switch (column) {
+                        case 0:
+                            descriptor.setJobID(each);
+                            column++;
+                            break;
+                        case 1:
+                            descriptor.setPartition(each);
+                            column++;
+                            break;
+                        case 2:
+                            descriptor.setJobName(each);
+                            column++;
+                            break;
+                        case 3:
+                            descriptor.setUserName(each);
+                            column++;
+                            break;
+                        case 4:
+                            descriptor.setStatus(each);
+                            column++;
+                            break;
+                        case 5:
+                            descriptor.setUsedCPUTime(each);
+                            column++;
+                            break;
+                        case 6:
+                            try {
+                                int nodes = Integer.parseInt(each);
+                                descriptor.setNodes(nodes);
+                            }catch (Exception e){
+                                log.error("Node count read from command output is not an integer !!!");
+                            }
+                            column++;
+                            break;
+                        case 7:
+                            descriptor.setNodeList(each);
+                            column++;
+                            break;
+                    }
+                }
+            }
+        }
+
+    }
+
+    /**
+     * This can be used to parseSingleJob the outpu of sbatch and extrac the jobID from the content
+     *
+     * @param rawOutput
+     * @return
+     */
+    public String parseJobSubmission(String rawOutput) throws SSHApiException {
+        // FIXME : use regex to match correct jobId;
+        log.info(rawOutput);
+        String[] info = rawOutput.split("\n");
+        for (String anInfo : info) {
+            if (anInfo.contains("Submitted batch job")) {
+                String[] split = anInfo.split("Submitted batch job");
+                return split[1].trim();
+            }
+        }
+        return "";
+//        throw new SSHApiException(rawOutput);  //todo//To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
+        log.info(rawOutput);
+        Pattern pattern = Pattern.compile(jobID + "(?=\\s+\\S+\\s+\\S+\\s+\\S+\\s+(?<" + STATUS + ">\\w+))");
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return JobStatus.valueOf(matcher.group(STATUS));
+        }
+        return null;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String lastString = info[info.length - 1];
+        if (lastString.contains("JOBID") || lastString.contains("PARTITION")) {
+            log.info("There are no jobs with this username ... ");
+            return;
+        }
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobId = jobID.split(",")[0];
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0, 8))) {
+                    // now starts processing this line
+                    log.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
+                    } catch (IndexOutOfBoundsException e) {
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) {
+                log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobId);
+            }
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        if (jobName == null) {
+            return null;
+        } else if(jobName.length() > JOB_NAME_OUTPUT_LENGTH) {
+            jobName = jobName.substring(0, JOB_NAME_OUTPUT_LENGTH);
+        }
+        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                log.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            log.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
new file mode 100644
index 0000000..4fbbe30
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class UGEJobConfiguration implements JobManagerConfiguration {
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public UGEJobConfiguration() {
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+
+    public UGEJobConfiguration(String jobDescriptionTemplateName,
+                               String scriptExtension, String installedPath, OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qstat -j " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "qsub " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        // For PBS there is no option to get jobDetails by JobName, so we search with userName
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public String  getBaseCancelCommand() {
+        return "qdel";
+    }
+
+    @Override
+    public String  getBaseMonitorCommand() {
+        return "qstat";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "qsub ";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
new file mode 100644
index 0000000..a6cc3ed
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
@@ -0,0 +1,188 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class UGEOutputParser implements OutputParser{
+    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
+    public static final String JOB_ID = "jobId";
+
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line;
+        for (int i = 0; i < info.length; i++) {
+            if (info[i].contains("=")) {
+                line = info[i].split("=", 2);
+            } else {
+                line = info[i].split(":", 2);
+            }
+            if (line.length >= 2) {
+                String header = line[0].trim();
+                log.debug("Header = " + header);
+                String value = line[1].trim();
+                log.debug("value = " + value);
+
+                if (header.equals("Variable_List")) {
+                    while (info[i + 1].startsWith("\t")) {
+                        value += info[i + 1];
+                        i++;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setVariableList(value);
+                } else if ("Job Id".equals(header)) {
+                    jobDescriptor.setJobID(value);
+                } else if ("Job_Name".equals(header)) {
+                    jobDescriptor.setJobName(value);
+                } else if ("Account_Name".equals(header)) {
+                    jobDescriptor.setAcountString(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("Job_Owner".equals(header)) {
+                    jobDescriptor.setOwner(value);
+                } else if ("resources_used.cput".equals(header)) {
+                    jobDescriptor.setUsedCPUTime(value);
+                } else if ("resources_used.mem".equals(header)) {
+                    jobDescriptor.setUsedMemory(value);
+                } else if ("resources_used.walltime".equals(header)) {
+                    jobDescriptor.setEllapsedTime(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("queue".equals(header))
+                    jobDescriptor.setQueueName(value);
+                else if ("ctime".equals(header)) {
+                    jobDescriptor.setCTime(value);
+                } else if ("qtime".equals(header)) {
+                    jobDescriptor.setQTime(value);
+                } else if ("mtime".equals(header)) {
+                    jobDescriptor.setMTime(value);
+                } else if ("start_time".equals(header)) {
+                    jobDescriptor.setSTime(value);
+                } else if ("comp_time".equals(header)) {
+                    jobDescriptor.setCompTime(value);
+                } else if ("exec_host".equals(header)) {
+                    jobDescriptor.setExecuteNode(value);
+                } else if ("Output_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardOutFile(value);
+                    else {
+                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
+                        i++;
+                    }
+                } else if ("Error_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardErrorFile(value);
+                    else {
+                        String st = info[i + 1].trim();
+                        jobDescriptor.setStandardErrorFile(value + st);
+                        i++;
+                    }
+
+                } else if ("submit_args".equals(header)) {
+                    while (i + 1 < info.length) {
+                        if (info[i + 1].startsWith("\t")) {
+                            value += info[i + 1];
+                            i++;
+                        } else
+                            break;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setSubmitArgs(value);
+                }
+            }
+        }
+    }
+
+	public String parseJobSubmission(String rawOutput) {
+		log.debug(rawOutput);
+		if (rawOutput != null && !rawOutput.isEmpty()) {
+			String[] info = rawOutput.split("\n");
+			String lastLine = info[info.length - 1];
+			return lastLine.split(" ")[2]; // In PBS stdout is going to be directly the jobID
+		} else {
+			return "";
+		}
+	}
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) {
+        Pattern pattern = Pattern.compile("job_number:[\\s]+" + jobID);
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return JobStatus.Q; // fixme; return correct status.
+        }
+        return JobStatus.U;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            for(int i=lastStop;i<info.length;i++){
+               if(jobID.split(",")[0].contains(info[i].split(" ")[0]) && !"".equals(info[i].split(" ")[0])){
+                   // now starts processing this line
+                   log.info(info[i]);
+                   String correctLine = info[i];
+                   String[] columns = correctLine.split(" ");
+                   List<String> columnList = new ArrayList<String>();
+                   for (String s : columns) {
+                       if (!"".equals(s)) {
+                           columnList.add(s);
+                       }
+                   }
+                   lastStop = i+1;
+                   if ("E".equals(columnList.get(4))) {
+                       // There is another status with the same letter E other than error status
+                       // to avoid that we make a small tweek to the job status
+                       columnList.set(4, "Er");
+                   }
+                   statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
+                   break;
+               }
+            }
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        if (jobName.length() > 10) {
+            jobName = jobName.substring(0, 10);
+        }
+        Pattern pattern = Pattern.compile("(?<" + JOB_ID + ">\\S+)\\s+\\S+\\s+(" + jobName + ")");
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return matcher.group(JOB_ID);
+        }
+        return null;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
new file mode 100644
index 0000000..9658fba
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.ssh.config;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * Reads basic configurations.
+ */
+public class ConfigReader {
+
+    private static final String CONFIGURATION_FILE = "gsissh.properties";
+
+
+    private Properties properties;
+
+    /**
+     * Reads configurations from the class path configuration file.
+     * @throws IOException If an error occurred while reading configurations.
+     */
+    public ConfigReader() throws IOException {
+        this.properties = getPropertiesFromClasspath(CONFIGURATION_FILE);
+    }
+
+    private Properties getPropertiesFromClasspath(String propFileName) throws IOException {
+        Properties props = new Properties();
+        InputStream inputStream = this.getClass().getClassLoader()
+                .getResourceAsStream(propFileName);
+
+        if (inputStream == null) {
+            throw new FileNotFoundException("System configuration file '" + propFileName
+                    + "' not found in the classpath");
+        }
+
+        props.load(inputStream);
+
+        return props;
+    }
+
+    public String getConfiguration(String key) {
+        return this.properties.getProperty(key);
+    }
+
+
+    /**
+     * Gets all the SSH related properties used by JSch.
+     * @return All properties.
+     */
+    public Properties getProperties() {
+        return this.properties;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
new file mode 100644
index 0000000..d60ea32
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.listener.JobSubmissionListener;
+
+public class DefaultJobSubmissionListener extends JobSubmissionListener {
+
+    public void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException {
+        System.out.println("Job status has changed to : " + jobDescriptor.getStatus());
+    }
+
+    @Override
+    public void statusChanged(JobStatus jobStatus) throws SSHApiException {
+        System.out.println("Job status has changed to : " + jobStatus.toString());
+    }
+
+    @Override
+    public boolean isJobDone() throws SSHApiException {
+        return getJobStatus().equals(JobStatus.C);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
new file mode 100644
index 0000000..814a7e1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -0,0 +1,767 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URL;
+import java.security.SecureRandom;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.CommandExecutor;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;
+import org.apache.airavata.gfac.core.authentication.SSHPasswordAuthentication;
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyAuthentication;
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.apache.airavata.gfac.ssh.api.job.OutputParser;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
+import org.apache.airavata.gfac.ssh.util.SSHUtils;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.GSISSHIdentityFile;
+import com.jcraft.jsch.GSISSHIdentityRepository;
+import com.jcraft.jsch.Identity;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+
+public class GSISSHAbstractCluster implements Cluster {
+
+    private static final Logger log = LoggerFactory.getLogger(GSISSHAbstractCluster.class);
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+    public static final String SSH_SESSION_TIMEOUT = "ssh.session.timeout";
+
+    public JobManagerConfiguration jobManagerConfiguration;
+
+    private ServerInfo serverInfo;
+
+    private AuthenticationInfo authenticationInfo;
+
+    private Session session;
+
+    private ConfigReader configReader;
+	
+    private JSch defaultJSch;
+
+    private static Identity identityFile = null;
+
+    public GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
+        this(serverInfo, authenticationInfo);
+        this.jobManagerConfiguration = config;
+    }
+
+    public  GSISSHAbstractCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
+
+        reconnect(serverInfo, authenticationInfo);
+    }
+
+    public GSISSHAbstractCluster(JobManagerConfiguration config) {
+        this.jobManagerConfiguration = config;
+    }
+    private synchronized void reconnect(ServerInfo serverInfo, AuthenticationInfo authenticationInfo) throws SSHApiException {
+        this.serverInfo = serverInfo;
+
+        this.authenticationInfo = authenticationInfo;
+
+        if (authenticationInfo instanceof GSIAuthenticationInfo) {
+            JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+            JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo) authenticationInfo).getProperties().
+                    get("X509_CERT_DIR"));
+        }
+
+
+        try {
+            this.configReader = new ConfigReader();
+        } catch (IOException e) {
+            throw new SSHApiException("Unable to load system configurations.", e);
+        }
+        try {
+        	 if(defaultJSch == null){
+             	defaultJSch = createJSch(authenticationInfo);
+             }
+     	        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                     + serverInfo.getUserName());
+
+        	session = createSession(defaultJSch,serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        	}
+        	catch (Exception e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        //=============================================================
+        // Handling vanilla SSH pieces
+        //=============================================================
+        if (authenticationInfo instanceof SSHPasswordAuthentication) {
+            String password = ((SSHPasswordAuthentication) authenticationInfo).
+                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
+
+            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
+
+            // TODO figure out why we need to set password to session
+            session.setPassword(password);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
+
+            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
+                    = (SSHPublicKeyFileAuthentication) authenticationInfo;
+            String privateKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The private key file for vanilla SSH " + privateKeyFile);
+
+            String publicKeyFile = sshPublicKeyFileAuthentication.
+                    getPublicKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The public key file for vanilla SSH " + publicKeyFile);
+
+            try {
+                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, defaultJSch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using files. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
+                        publicKeyFile, e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
+
+            SSHPublicKeyAuthentication sshPublicKeyAuthentication
+                    = (SSHPublicKeyAuthentication) authenticationInfo;
+            try {
+                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
+                identityFile = GSISSHIdentityFile.newInstance(name,
+                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
+                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), defaultJSch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName(), e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(defaultJSch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication) authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        }
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            if (authenticationInfo instanceof GSIAuthenticationInfo) {
+                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo) authenticationInfo);
+            }
+        }
+
+        try {
+            session.connect(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
+        } catch (Exception e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+    }
+
+    public synchronized JobDescriptor cancelJob(String jobID) throws SSHApiException {
+        JobStatus jobStatus = getJobStatus(jobID);
+        if (jobStatus == null || jobStatus == JobStatus.U) {
+            log.info("Validation before cancel is failed, couldn't found job in remote host to cancel. Job may be already completed|failed|canceled");
+            return null;
+        }
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getCancelCommand(jobID);
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String outputifAvailable = getOutputifAvailable(stdOutReader, "Error reading output of job submission", jobManagerConfiguration.getBaseCancelCommand());
+        // this might not be the case for all teh resources, if so Cluster implementation can override this method
+        // because here after cancelling we try to get the job description and return it back
+        try {
+            return this.getJobDescriptorById(jobID);
+        } catch (Exception e) {
+            //its ok to fail to get status when the job is gone
+            return null;
+        }
+    }
+
+    public synchronized String submitBatchJobWithScript(String scriptPath, String workingDirectory) throws SSHApiException {
+        this.scpTo(workingDirectory, scriptPath);
+
+        // since this is a constant we do not ask users to fill this
+
+//        RawCommandInfo rawCommandInfo = new RawCommandInfo(this.installedPath + this.jobManagerConfiguration.getSubmitCommand() + " " +
+//                workingDirectory + File.separator + FilenameUtils.getName(scriptPath));
+
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getSubmitCommand(workingDirectory,scriptPath);
+        StandardOutReader standardOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.session, standardOutReader);
+
+        //Check whether pbs submission is successful or not, if it failed throw and exception in submitJob method
+        // with the error thrown in qsub command
+        //
+        String outputifAvailable = getOutputifAvailable(standardOutReader,"Error reading output of job submission",jobManagerConfiguration.getBaseSubmitCommand());
+        OutputParser outputParser = jobManagerConfiguration.getParser();
+        return  outputParser.parseJobSubmission(outputifAvailable);
+    }
+
+    public synchronized String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException {
+        TransformerFactory factory = TransformerFactory.newInstance();
+        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
+
+        if (resource == null) {
+            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
+                    + "' not found in the classpath";
+            throw new SSHApiException(error);
+        }
+
+        Source xslt = new StreamSource(new File(resource.getPath()));
+        Transformer transformer;
+        StringWriter results = new StringWriter();
+        File tempPBSFile = null;
+        try {
+            // generate the pbs script using xslt
+            transformer = factory.newTransformer(xslt);
+            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
+            transformer.transform(text, new StreamResult(results));
+            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
+            if (scriptContent.startsWith("\n")) {
+                scriptContent = scriptContent.substring(1);
+            }
+//            log.debug("generated PBS:" + results.toString());
+
+            // creating a temporary file using pbs script generated above
+            int number = new SecureRandom().nextInt();
+            number = (number < 0 ? -number : number);
+
+            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
+            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
+
+            //reusing submitBatchJobWithScript method to submit a job
+            String jobID = null;
+            int retry = 3;
+            while(retry>0) {
+                try {
+                    jobID = this.submitBatchJobWithScript(tempPBSFile.getAbsolutePath(),
+                            jobDescriptor.getWorkingDirectory());
+                    retry=0;
+                } catch (SSHApiException e) {
+                    retry--;
+                    if(retry==0) {
+                        throw e;
+                    }else{
+                        try {
+                            Thread.sleep(5000);
+                        } catch (InterruptedException e1) {
+                            log.error(e1.getMessage(), e1);
+                        }
+                        log.error("Error occured during job submission but doing a retry");
+                    }
+                }
+            }
+            log.debug("Job has successfully submitted, JobID : " + jobID);
+            if (jobID != null) {
+                return jobID.replace("\n", "");
+            } else {
+                return null;
+            }
+            } catch (TransformerConfigurationException e) {
+            throw new SSHApiException("Error parsing PBS transformation", e);
+        } catch (TransformerException e) {
+            throw new SSHApiException("Error generating PBS script", e);
+        } catch (IOException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        } finally {
+            if (tempPBSFile != null) {
+                tempPBSFile.delete();
+            }
+        }
+    }
+
+
+    public void generateJobScript(JobDescriptor jobDescriptor) throws SSHApiException {
+        TransformerFactory factory = TransformerFactory.newInstance();
+        URL resource = this.getClass().getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
+
+        if (resource == null) {
+            String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()
+                    + "' not found in the classpath";
+            throw new SSHApiException(error);
+        }
+
+        Source xslt = new StreamSource(new File(resource.getPath()));
+        Transformer transformer;
+        StringWriter results = new StringWriter();
+        File tempPBSFile = null;
+        try {
+            // generate the pbs script using xslt
+            transformer = factory.newTransformer(xslt);
+            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
+            transformer.transform(text, new StreamResult(results));
+            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
+            if (scriptContent.startsWith("\n")) {
+                scriptContent = scriptContent.substring(1);
+            }
+//            log.debug("generated PBS:" + results.toString());
+
+            // creating a temporary file using pbs script generated above
+            int number = new SecureRandom().nextInt();
+            number = (number < 0 ? -number : number);
+
+            tempPBSFile = new File(Integer.toString(number) + jobManagerConfiguration.getScriptExtension());
+            log.info("File Path: " + tempPBSFile.getAbsolutePath());
+            log.info("File Content: " + scriptContent);
+            FileUtils.writeStringToFile(tempPBSFile, scriptContent);
+        } catch (TransformerConfigurationException e) {
+            throw new SSHApiException("Error parsing PBS transformation", e);
+        } catch (TransformerException e) {
+            throw new SSHApiException("Error generating PBS script", e);
+        } catch (IOException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        } finally {
+            if (tempPBSFile != null) {
+                tempPBSFile.delete();
+            }
+        }
+    }
+
+
+
+    public synchronized JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",jobManagerConfiguration.getBaseMonitorCommand());
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        jobManagerConfiguration.getParser().parseSingleJob(jobDescriptor, result);
+        return jobDescriptor;
+    }
+
+    public synchronized JobStatus getJobStatus(String jobID) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
+        return jobManagerConfiguration.getParser().parseJobStatus(jobID, result);
+    }
+
+    @Override
+    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException {
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getJobIdMonitorCommand(jobName, userName);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+        CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",
+                jobManagerConfiguration.getJobIdMonitorCommand(jobName,userName).getCommand());
+        return jobManagerConfiguration.getParser().parseJobId(jobName, result);
+    }
+
+    private static void logDebug(String message) {
+        if (log.isDebugEnabled()) {
+            log.debug(message);
+        }
+    }
+
+    public JobManagerConfiguration getJobManagerConfiguration() {
+        return jobManagerConfiguration;
+    }
+
+    public void setJobManagerConfiguration(JobManagerConfiguration jobManagerConfiguration) {
+        this.jobManagerConfiguration = jobManagerConfiguration;
+    }
+
+    public synchronized void scpTo(String remoteFile, String localFile) throws SSHApiException {
+        int retry = 3;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Transfering file:/" + localFile + " To:" + serverInfo.getHost() + ":" + remoteFile);
+                SSHUtils.scpTo(remoteFile, localFile, session);
+                retry = 0;
+            } catch (IOException e) {
+                retry--;
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
+                }
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile : " + remoteFile, e);
+                }
+            }
+        }
+    }
+
+    public synchronized void scpFrom(String remoteFile, String localFile) throws SSHApiException {
+        int retry = 3;
+        while(retry>0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Transfering from:" + serverInfo.getHost() + ":" + remoteFile + " To:" + "file:/" + localFile);
+                SSHUtils.scpFrom(remoteFile, localFile, session);
+                retry=0;
+            } catch (IOException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }else{
+                    log.error("Error performing scp but doing a retry");
+                }
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if(retry==0) {
+                    throw new SSHApiException("Failed during scping local file:" + localFile + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }else{
+                    log.error("Error performing scp but doing a retry");
+                }
+            }
+        }
+    }
+    
+    public synchronized void scpThirdParty(String remoteFileSource, String remoteFileTarget) throws SSHApiException {
+        try {
+            if(!session.isConnected()){
+                session.connect();
+            }
+            log.info("Transfering from:" + remoteFileSource + " To: " + remoteFileTarget);
+            SSHUtils.scpThirdParty(remoteFileSource, remoteFileTarget, session);
+        } catch (IOException e) {
+            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
+                    +remoteFileTarget , e);
+        } catch (JSchException e) {
+            throw new SSHApiException("Failed during scping  file:" + remoteFileSource + " to remote file "
+                    +remoteFileTarget, e);
+        }
+    }
+
+    public synchronized void makeDirectory(String directoryPath) throws SSHApiException {
+        int retry = 3;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Creating directory: " + serverInfo.getHost() + ":" + directoryPath);
+                SSHUtils.makeDirectory(directoryPath, session);
+                retry = 0;
+            } catch (IOException e) {
+                throw new SSHApiException("Failed during creating directory:" + directoryPath + " to remote file "
+                        + serverInfo.getHost() + ":rFile", e);
+            } catch (JSchException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            } catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during creating directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            }
+        }
+    }
+
+    public synchronized List<String> listDirectory(String directoryPath) throws SSHApiException {
+        int retry = 3;
+        List<String> files = null;
+        while (retry > 0) {
+            try {
+                if (!session.isConnected()) {
+                    session.connect();
+                }
+                log.info("Listing directory: " + serverInfo.getHost() + ":" + directoryPath);
+                files = SSHUtils.listDirectory(directoryPath, session);
+                retry=0;
+            } catch (IOException e) {
+                log.error(e.getMessage(), e);
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory:" + directoryPath + " to remote file ", e);
+                }
+            } catch (JSchException e) {
+                retry--;
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file ", e);
+                }
+            }catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath + " to remote file "
+                            + serverInfo.getHost() + ":rFile", e);
+                }
+            }
+        }
+        return files;
+    }
+
+    public synchronized void getJobStatuses(String userName, Map<String,JobStatus> jobIDs)throws SSHApiException {
+        int retry = 3;
+        RawCommandInfo rawCommandInfo = jobManagerConfiguration.getUserBasedMonitorCommand(userName);
+        StandardOutReader stdOutReader = new StandardOutReader();
+        while (retry > 0){
+            try {
+                log.info("Executing RawCommand : " + rawCommandInfo.getCommand());
+                CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
+                retry=0;
+            } catch (SSHApiException e) {
+                retry--;
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException e1) {
+                    log.error(e1.getMessage(), e1);
+                }
+                reconnect(serverInfo, authenticationInfo);
+                if (retry == 0) {
+                    throw new SSHApiException("Failed Getting statuses  to remote file", e);
+                }
+            }
+        }
+        String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
+        jobManagerConfiguration.getParser().parseJobStatuses(userName, jobIDs, result);
+    }
+
+    public ServerInfo getServerInfo() {
+        return serverInfo;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    /**
+     * This gaurantee to return a valid session
+     *
+     * @return
+     */
+    public Session getSession() {
+        return this.session;
+    }
+
+    /**
+     * This method will read standard output and if there's any it will be parsed
+     *
+     * @param jobIDReaderCommandOutput
+     * @param errorMsg
+     * @return
+     * @throws SSHApiException
+     */
+    private String getOutputifAvailable(StandardOutReader jobIDReaderCommandOutput, String errorMsg, String command) throws SSHApiException {
+        String stdOutputString = jobIDReaderCommandOutput.getStdOutputString();
+        String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
+        log.info("StandardOutput Returned:" + stdOutputString);
+        log.info("StandardError  Returned:" +stdErrorString);
+        String[] list = command.split(File.separator);
+        command = list[list.length - 1];
+        // We are checking for stderr containing the command issued. Thus ignores the verbose logs in stderr.
+        if (stdErrorString != null && stdErrorString.contains(command.trim()) && !stdErrorString.contains("Warning")) {
+            log.error("Standard Error output : " + stdErrorString);
+            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
+        }else if(stdOutputString.contains("error")){
+            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString + "\n\r StandardError: "+ stdErrorString);
+        }
+        return stdOutputString;
+    }
+
+    public void disconnect() throws SSHApiException {
+    	if(getSession().isConnected()){
+    		getSession().disconnect();
+    	}
+    }
+    /**
+	
+	 *            the file system abstraction which will be necessary to
+	 *            perform certain file system operations.
+	 * @return the new default JSch implementation.
+	 * @throws JSchException
+	 *             known host keys cannot be loaded.
+	 */
+	protected JSch createJSch(AuthenticationInfo authenticationInfo) throws JSchException {
+//		final File fs = new File(System.getProperty("user.home"));
+		if(authenticationInfo instanceof GSIAuthenticationInfo){
+			final JSch jsch = new ExtendedJSch();
+//			knownHosts(jsch, fs);
+			return jsch;
+		}else{
+		final JSch jsch = new JSch();
+//		knownHosts(jsch, fs);
+		return jsch;
+		}
+		
+	}
+	/**
+	 * Create a new remote session for the requested address.
+	 *
+	 * @param user
+	 *            login to authenticate as.
+	 * @param host
+	 *            server name to connect to.
+	 * @param port
+	 *            port number of the SSH daemon (typically 22).
+	 * @return new session instance, but otherwise unconfigured.
+	 * @throws JSchException
+	 *             the session could not be created.
+	 */
+	private Session createSession(JSch jsch, String user, String host, int port) throws JSchException {
+		final Session session = jsch.getSession(user, host, port);
+		// We retry already in getSession() method. JSch must not retry
+		// on its own.
+		session.setConfig("MaxAuthTries", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+		session.setTimeout(Integer.parseInt(configReader.getConfiguration(SSH_SESSION_TIMEOUT)));
+	    java.util.Properties config = this.configReader.getProperties();
+	    session.setConfig(config);
+	    
+    	return session;
+	}
+	private static void knownHosts(final JSch sch,final File home) throws JSchException {
+		if (home == null)
+			return;
+		final File known_hosts = new File(new File(home, ".ssh"), "known_hosts"); //$NON-NLS-1$ //$NON-NLS-2$
+		try {
+			final FileInputStream in = new FileInputStream(known_hosts);
+			try {
+				sch.setKnownHosts(in);
+			} finally {
+				in.close();
+			}
+		} catch (FileNotFoundException none) {
+			// Oh well. They don't have a known hosts in home.
+		} catch (IOException err) {
+			// Oh well. They don't have a known hosts in home.
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
new file mode 100644
index 0000000..648d955
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/JobStatus.java
@@ -0,0 +1,110 @@
+ /*
+ *
+ * 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.ssh.impl;
+
+ /**
+  * This will contains all the PBS specific job statuses.
+  * C -  Job is completed after having run/
+  * E -  Job is exiting after having run.
+  * H -  Job is held.
+  * Q -  job is queued, eligible to run or routed.
+  * R -  job is running.
+  * T -  job is being moved to new location.
+  * W -  job is waiting for its execution time
+  * (-a option) to be reached.
+  * S -  (Unicos only) job is suspend.
+  */
+ public enum JobStatus {
+     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
+
+     public static JobStatus fromString(String status){
+        if(status != null){
+            if("C".equals(status)){
+                return JobStatus.C;
+            }else if("E".equals(status)){
+                return JobStatus.E;
+            }else if("H".equals(status)){
+                return JobStatus.H;
+            }else if("Q".equals(status)){
+                return JobStatus.Q;
+            }else if("R".equals(status)){
+                return JobStatus.R;
+            }else if("T".equals(status)){
+                return JobStatus.T;
+            }else if("W".equals(status)){
+                return JobStatus.W;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("F".equals(status)){
+                return JobStatus.F;
+            }else if("S".equals(status)){
+                return JobStatus.S;
+            }else if("CA".equals(status)){
+                return JobStatus.CA;
+            }else if("CF".equals(status)){
+                return JobStatus.CF;
+            }else if("CD".equals(status)){
+                return JobStatus.CD;
+            }else if("CG".equals(status)){
+                return JobStatus.CG;
+            }else if("NF".equals(status)){
+                return JobStatus.NF;
+            }else if("PD".equals(status)){
+                return JobStatus.PD;
+            }else if("PR".equals(status)){
+                return JobStatus.PR;
+            }else if("TO".equals(status)){
+                return JobStatus.TO;
+            }else if("U".equals(status)){
+                return JobStatus.U;
+            }else if("qw".equals(status)){
+                return JobStatus.qw;
+            }else if("t".equals(status)){
+                return JobStatus.t;
+            }else if("r".equals(status)){
+                return JobStatus.r;
+            }else if("h".equals(status)){
+                return JobStatus.h;
+            }else if("Er".equals(status)){
+                return JobStatus.Er;
+            }else if("Eqw".equals(status)){
+                return JobStatus.Er;
+            }else if("RUN".equals(status)){      // LSF starts here
+                return JobStatus.RUN;
+            }else if("PEND".equals(status)){
+                return JobStatus.PEND;
+            }else if("DONE".equals(status)){
+                return JobStatus.DONE;
+            }else if("PSUSP".equals(status)){
+                return JobStatus.PSUSP;
+            }else if("USUSP".equals(status)){
+                return JobStatus.USUSP;
+            }else if("SSUSP".equals(status)){
+                return JobStatus.SSUSP;
+            }else if("EXIT".equals(status)){
+                return JobStatus.EXIT;
+            }else if("ZOMBI".equals(status)){
+                return JobStatus.ZOMBI;
+            }
+        }
+         return JobStatus.U;
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
new file mode 100644
index 0000000..def84d5
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/PBSCluster.java
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.api.authentication.*;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This is the default implementation of a cluster.
+ * this has most of the methods to be used by the end user of the
+ * library.
+ */
+public class PBSCluster extends GSISSHAbstractCluster {
+    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
+
+
+    public PBSCluster(JobManagerConfiguration jobManagerConfiguration) {
+        super(jobManagerConfiguration);
+    }
+    public PBSCluster(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, JobManagerConfiguration config) throws SSHApiException {
+        super(serverInfo, authenticationInfo,config);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
new file mode 100644
index 0000000..9ac2ba0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/RawCommandInfo.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.CommandInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:18 PM
+ */
+
+/**
+ * The raw command information. String returned by getCommand is directly executed in SSH
+ * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
+ */
+public class RawCommandInfo implements CommandInfo {
+
+    private String rawCommand;
+
+    public RawCommandInfo(String cmd) {
+        this.rawCommand = cmd;
+    }
+
+    public String getCommand() {
+        return this.rawCommand;
+    }
+
+    public String getRawCommand() {
+        return rawCommand;
+    }
+
+    public void setRawCommand(String rawCommand) {
+        this.rawCommand = rawCommand;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
new file mode 100644
index 0000000..e878dff
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SSHUserInfo.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 9/20/13
+ * Time: 2:31 PM
+ */
+
+public class SSHUserInfo implements UserInfo {
+
+    private String password;
+
+    public SSHUserInfo(String pwd) {
+        this.password = pwd;
+    }
+
+    public String getPassphrase() {
+        return this.password;
+    }
+
+    public String getPassword() {
+        return this.password;
+    }
+
+    public boolean promptPassword(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptPassphrase(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void showMessage(String message) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
new file mode 100644
index 0000000..265a57d
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/StandardOutReader.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.Channel;
+
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class StandardOutReader implements CommandOutput {
+
+    private static final Logger logger = LoggerFactory.getLogger(StandardOutReader.class);
+    String stdOutputString = null;
+    ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
+    public void onOutput(Channel channel) {
+        try {
+            StringBuffer pbsOutput = new StringBuffer("");
+            InputStream inputStream =  channel.getInputStream();
+            byte[] tmp = new byte[1024];
+            do {
+                while (inputStream.available() > 0) {
+                    int i = inputStream.read(tmp, 0, 1024);
+                    if (i < 0) break;
+                    pbsOutput.append(new String(tmp, 0, i));
+                }
+            } while (!channel.isClosed()) ;
+            String output = pbsOutput.toString();
+            this.setStdOutputString(output);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+
+    }
+
+
+    public void exitCode(int code) {
+        System.out.println("Program exit code - " + code);
+    }
+
+    public String getStdOutputString() {
+        return stdOutputString;
+    }
+
+    public void setStdOutputString(String stdOutputString) {
+        this.stdOutputString = stdOutputString;
+    }
+
+    public String getStdErrorString() {
+        return errorStream.toString();
+    }
+
+    public OutputStream getStandardError() {
+        return errorStream;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
new file mode 100644
index 0000000..24d218b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/SystemCommandOutput.java
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import com.jcraft.jsch.Channel;
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/15/13
+ * Time: 10:44 AM
+ */
+
+public class SystemCommandOutput implements CommandOutput {
+
+    private static final Logger logger = LoggerFactory.getLogger(SystemCommandOutput.class);
+    public void onOutput(Channel channel) {
+        try {
+            InputStream inputStream = channel.getInputStream();
+
+            byte[] tmp = new byte[1024];
+            while (true) {
+                while (inputStream.available() > 0) {
+                    int i = inputStream.read(tmp, 0, 1024);
+                    if (i < 0) break;
+                    System.out.print(new String(tmp, 0, i));
+                }
+                if (channel.isClosed()) {
+                    System.out.println("exit-status: " + channel.getExitStatus());
+                    break;
+                }
+                try {
+                    Thread.sleep(1000);
+                } catch (Exception ignored) {
+                }
+            }
+
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+
+    }
+
+    public OutputStream getStandardError() {
+        return System.err;
+    }
+
+    public void exitCode(int code) {
+        System.out.println("Program exit code - " + code);
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
new file mode 100644
index 0000000..29cd154
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPasswordAuthenticationInfo.java
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 9/20/13
+ * Time: 12:15 PM
+ */
+
+import org.apache.airavata.gfac.core.authentication.SSHPasswordAuthentication;
+
+/**
+ * An authenticator used for raw SSH sessions. Gives SSH user name, password
+ * directly.
+ * This is only an example implementation.
+ */
+public class DefaultPasswordAuthenticationInfo implements SSHPasswordAuthentication {
+
+    private String password;
+
+    public DefaultPasswordAuthenticationInfo(String pwd) {
+        this.password = pwd;
+    }
+
+    public String getPassword(String userName, String hostName) {
+        return password;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
new file mode 100644
index 0000000..35595ed
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyAuthentication.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyAuthentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:44 AM
+ */
+
+/**
+ * Default public key authentication.
+ * Note : This is only a sample implementation.
+ */
+public class DefaultPublicKeyAuthentication implements SSHPublicKeyAuthentication {
+
+    private byte[] privateKey;
+    private byte[] publicKey;
+    private String passPhrase = null;
+
+    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub) {
+        this.privateKey = priv;
+        this.publicKey = pub;
+    }
+
+    public DefaultPublicKeyAuthentication(byte[] priv, byte[] pub, String pass) {
+        this.privateKey = priv;
+        this.publicKey = pub;
+        this.passPhrase = pass;
+    }
+
+    public String getPassPhrase() {
+        return passPhrase;
+    }
+
+    public void bannerMessage(String message) {
+        System.out.println(message);
+    }
+
+    public byte[] getPrivateKey(String userName, String hostName) {
+        return privateKey;
+    }
+
+    public byte[] getPublicKey(String userName, String hostName) {
+        return publicKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
new file mode 100644
index 0000000..480213c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/DefaultPublicKeyFileAuthentication.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:40 AM
+ */
+
+/**
+ * Default public key authentication using files.
+ * Note : This is only a sample implementation.
+ */
+public class DefaultPublicKeyFileAuthentication implements SSHPublicKeyFileAuthentication {
+
+    private String publicKeyFile;
+    private String privateKeyFile;
+    private String passPhrase = null;
+
+    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile) {
+        this.publicKeyFile = pubFile;
+        this.privateKeyFile = privFile;
+
+    }
+
+    public DefaultPublicKeyFileAuthentication(String pubFile, String privFile, String pass) {
+        this.publicKeyFile = pubFile;
+        this.privateKeyFile = privFile;
+        this.passPhrase = pass;
+
+    }
+
+    public String getPassPhrase() {
+        return passPhrase;
+    }
+
+    public void bannerMessage(String message) {
+        System.out.println(message);
+    }
+
+    public String getPublicKeyFile(String userName, String hostName) {
+        return publicKeyFile;
+    }
+
+    public String getPrivateKeyFile(String userName, String hostName) {
+        return privateKeyFile;
+    }
+}


[10/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
new file mode 100644
index 0000000..14fd7fe
--- /dev/null
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
@@ -0,0 +1,55 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.gfac.cpi;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class gfac_cpi_serviceConstants {
+
+  public static final String GFAC_CPI_VERSION = "0.13.0";
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
new file mode 100644
index 0000000..b076145
--- /dev/null
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
@@ -0,0 +1,143 @@
+/*
+ *
+ * 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.server;
+
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.IServer;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
+import org.apache.airavata.gfac.cpi.GfacService;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.InetSocketAddress;
+
+public class GfacServer implements IServer{
+
+    private final static Logger logger = LoggerFactory.getLogger(GfacServer.class);
+	private static final String SERVER_NAME = "Gfac Server";
+	private static final String SERVER_VERSION = "1.0";
+
+    private IServer.ServerStatus status;
+
+	private TServer server;
+
+	public GfacServer() {
+		setStatus(IServer.ServerStatus.STOPPED);
+	}
+
+    public void StartGfacServer(GfacService.Processor<GfacServerHandler> gfacServerHandlerProcessor)
+            throws Exception {
+        try {
+            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950"));
+            final String serverHost = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST, null);
+
+            InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
+
+			TServerTransport serverTransport = new TServerSocket(inetSocketAddress);
+
+            server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(gfacServerHandlerProcessor));
+
+            new Thread() {
+				public void run() {
+					server.serve();
+					setStatus(IServer.ServerStatus.STOPPED);
+					logger.info("Gfac Server Stopped.");
+				}
+			}.start();
+			new Thread() {
+				public void run() {
+					while(!server.isServing()){
+						try {
+							Thread.sleep(500);
+						} catch (InterruptedException e) {
+							break;
+						}
+					}
+					if (server.isServing()){
+						setStatus(IServer.ServerStatus.STARTED);
+			            logger.info("Starting Gfac Server on Port " + serverPort);
+			            logger.info("Listening to Gfac Clients ....");
+					}
+				}
+			}.start();
+        } catch (TTransportException e) {
+            logger.error(e.getMessage());
+            setStatus(IServer.ServerStatus.FAILED);
+        }
+    }
+
+    public static void main(String[] args) {
+    	try {
+			new GfacServer().start();
+		} catch (Exception e) {
+            logger.error(e.getMessage(), e);
+		}
+    }
+
+	public void start() throws Exception {
+		setStatus(IServer.ServerStatus.STARTING);
+        GfacService.Processor<GfacServerHandler> gfacService =
+                new GfacService.Processor<GfacServerHandler>(new GfacServerHandler());
+		StartGfacServer(gfacService);
+	}
+
+	public void stop() throws Exception {
+        if (server!=null && server.isServing()){
+			setStatus(IServer.ServerStatus.STOPING);
+			server.stop();
+		}
+		GFacThreadPoolExecutor.getCachedThreadPool().shutdownNow();
+
+	}
+
+	public void restart() throws Exception {
+		stop();
+		start();
+	}
+
+	public void configure() throws Exception {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IServer.ServerStatus getStatus() throws Exception {
+		return status;
+	}
+
+	private void setStatus(IServer.ServerStatus stat){
+		status=stat;
+		status.updateTime();
+	}
+
+	public String getName() {
+		return SERVER_NAME;
+	}
+
+	public String getVersion() {
+		return SERVER_VERSION;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
new file mode 100644
index 0000000..77a89cc
--- /dev/null
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -0,0 +1,421 @@
+/*
+ *
+ * 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.server;
+
+import com.google.common.eventbus.EventBus;
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.ThriftUtils;
+import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
+import org.apache.airavata.gfac.core.GFac;
+import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.core.utils.InputHandlerWorker;
+import org.apache.airavata.gfac.cpi.GfacService;
+import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.MessageHandler;
+import org.apache.airavata.messaging.core.MessagingConstants;
+import org.apache.airavata.messaging.core.Publisher;
+import org.apache.airavata.messaging.core.PublisherFactory;
+import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
+import org.apache.airavata.model.messaging.event.MessageType;
+import org.apache.airavata.model.messaging.event.TaskSubmitEvent;
+import org.apache.airavata.model.messaging.event.TaskTerminateEvent;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.curator.RetryPolicy;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TException;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.Stat;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+
+public class GfacServerHandler implements GfacService.Iface {
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GfacServerHandler.class);
+    private static RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer;
+    private static int requestCount=0;
+    private Registry registry;
+    private AppCatalog appCatalog;
+    private String gatewayName;
+    private String airavataUserName;
+    private CuratorFramework curatorClient;
+    private MonitorPublisher publisher;
+    private String gfacServer;
+    private String gfacExperiments;
+    private String airavataServerHostPort;
+    private BlockingQueue<TaskSubmitEvent> taskSubmitEvents;
+    private static File gfacConfigFile;
+    private static List<ThreadedHandler> daemonHandlers = new ArrayList<ThreadedHandler>();
+    private static List<AbstractActivityListener> activityListeners = new ArrayList<AbstractActivityListener>();
+
+    public GfacServerHandler() throws Exception {
+        try {
+            // start curator client
+            String zkhostPort = AiravataZKUtils.getZKhostPort();
+            RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 5);
+            curatorClient = CuratorFrameworkFactory.newClient(zkhostPort, retryPolicy);
+            curatorClient.start();
+            gfacServer = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NODE, "/gfac-server");
+            gfacExperiments = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+            airavataServerHostPort = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST)
+                    + ":" + ServerSettings.getSetting(Constants.GFAC_SERVER_PORT);
+            storeServerConfig();
+            publisher = new MonitorPublisher(new EventBus());
+            registry = RegistryFactory.getDefaultRegistry();
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            setGatewayProperties();
+            startDaemonHandlers();
+            // initializing Better Gfac Instance
+            BetterGfacImpl.getInstance().init(registry, appCatalog, curatorClient, publisher);
+            if (ServerSettings.isGFacPassiveMode()) {
+                rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
+                rabbitMQTaskLaunchConsumer.listen(new TaskLaunchMessageHandler());
+            }
+            startStatusUpdators(registry, curatorClient, publisher, rabbitMQTaskLaunchConsumer);
+
+        } catch (Exception e) {
+            throw new Exception("Error initialising GFAC", e);
+        }
+    }
+
+    public static void main(String[] args) {
+        RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer = null;
+        try {
+            rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
+            rabbitMQTaskLaunchConsumer.listen(new TestHandler());
+        } catch (AiravataException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+    private void storeServerConfig() throws Exception {
+        Stat stat = curatorClient.checkExists().forPath(gfacServer);
+        if (stat == null) {
+            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
+                    .forPath(gfacServer, new byte[0]);
+        }
+        String instanceId = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME);
+        String instanceNode = gfacServer + File.separator + instanceId;
+        stat = curatorClient.checkExists().forPath(instanceNode);
+        if (stat == null) {
+            curatorClient.create().withMode(CreateMode.EPHEMERAL).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(instanceNode, airavataServerHostPort.getBytes());
+            curatorClient.getChildren().watched().forPath(instanceNode);
+        }
+        stat = curatorClient.checkExists().forPath(gfacExperiments);
+        if (stat == null) {
+            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(gfacExperiments, airavataServerHostPort.getBytes());
+        }
+        stat = curatorClient.checkExists().forPath(gfacExperiments + File.separator + instanceId);
+        if (stat == null) {
+            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
+                    .forPath(gfacExperiments + File.separator + instanceId, airavataServerHostPort.getBytes());
+        }
+    }
+
+    private long ByateArrayToLong(byte[] data) {
+        long value = 0;
+        for (int i = 0; i < data.length; i++)
+        {
+            value += ((long) data[i] & 0xffL) << (8 * i);
+        }
+        return value;
+    }
+
+    public String getGFACServiceVersion() throws TException {
+        return gfac_cpi_serviceConstants.GFAC_CPI_VERSION;
+    }
+
+    /**
+     * * After creating the experiment Data and Task Data in the orchestrator
+     * * Orchestrator has to invoke this operation for each Task per experiment to run
+     * * the actual Job related actions.
+     * *
+     * * @param experimentID
+     * * @param taskID
+     * * @param gatewayId:
+     * *  The GatewayId is inferred from security context and passed onto gfac.
+     * * @return sucess/failure
+     * *
+     * *
+     *
+     * @param experimentId
+     * @param taskId
+     * @param gatewayId
+     */
+    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
+        requestCount++;
+        logger.info("-----------------------------------------------------" + requestCount + "-----------------------------------------------------");
+        logger.infoId(experimentId, "GFac Received submit job request for the Experiment: {} TaskId: {}", experimentId, taskId);
+        InputHandlerWorker inputHandlerWorker = new InputHandlerWorker(BetterGfacImpl.getInstance(), experimentId,
+                taskId, gatewayId, tokenId);
+//        try {
+//            if( gfac.submitJob(experimentId, taskId, gatewayId)){
+        logger.debugId(experimentId, "Submitted job to the Gfac Implementation, experiment {}, task {}, gateway " +
+                "{}", experimentId, taskId, gatewayId);
+
+        GFacThreadPoolExecutor.getCachedThreadPool().execute(inputHandlerWorker);
+
+        // we immediately return when we have a threadpool
+        return true;
+    }
+
+    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
+        logger.infoId(experimentId, "GFac Received cancel job request for Experiment: {} TaskId: {} ", experimentId, taskId);
+        try {
+            if (BetterGfacImpl.getInstance().cancel(experimentId, taskId, gatewayId, tokenId)) {
+                logger.debugId(experimentId, "Successfully cancelled job, experiment {} , task {}", experimentId, taskId);
+                return true;
+            } else {
+                logger.errorId(experimentId, "Job cancellation failed, experiment {} , task {}", experimentId, taskId);
+                return false;
+            }
+        } catch (Exception e) {
+            logger.errorId(experimentId, "Error cancelling the experiment {}.", experimentId);
+            throw new TException("Error cancelling the experiment : " + e.getMessage(), e);
+        }
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+    public String getGatewayName() {
+        return gatewayName;
+    }
+
+    public void setGatewayName(String gatewayName) {
+        this.gatewayName = gatewayName;
+    }
+
+    public String getAiravataUserName() {
+        return airavataUserName;
+    }
+
+    public void setAiravataUserName(String airavataUserName) {
+        this.airavataUserName = airavataUserName;
+    }
+
+    protected void setGatewayProperties() throws ApplicationSettingsException {
+        setAiravataUserName(ServerSettings.getDefaultUser());
+        setGatewayName(ServerSettings.getDefaultUserGateway());
+    }
+
+    private GFac getGfac() throws TException {
+        GFac gFac = BetterGfacImpl.getInstance();
+        gFac.init(registry, appCatalog, curatorClient, publisher);
+        return gFac;
+    }
+
+    public void startDaemonHandlers() {
+        List<GFacHandlerConfig> daemonHandlerConfig = null;
+        String className = null;
+        try {
+            URL resource = GfacServerHandler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+            if (resource != null) {
+                gfacConfigFile = new File(resource.getPath());
+            }
+            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
+            for (GFacHandlerConfig handlerConfig : daemonHandlerConfig) {
+                className = handlerConfig.getClassName();
+                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
+                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
+                threadedHandler.initProperties(handlerConfig.getProperties());
+                daemonHandlers.add(threadedHandler);
+            }
+        } catch (ParserConfigurationException | IOException | XPathExpressionException | ClassNotFoundException |
+                InstantiationException | IllegalAccessException | GFacHandlerException | SAXException e) {
+            logger.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+        }
+        for (ThreadedHandler tHandler : daemonHandlers) {
+            (new Thread(tHandler)).start();
+        }
+    }
+
+
+    public static void startStatusUpdators(Registry registry, CuratorFramework curatorClient, MonitorPublisher publisher,
+
+                                           RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer) {
+        try {
+            String[] listenerClassList = ServerSettings.getActivityListeners();
+            Publisher rabbitMQPublisher = PublisherFactory.createActivityPublisher();
+            for (String listenerClass : listenerClassList) {
+                Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
+                AbstractActivityListener abstractActivityListener = aClass.newInstance();
+                activityListeners.add(abstractActivityListener);
+                abstractActivityListener.setup(publisher, registry, curatorClient, rabbitMQPublisher, rabbitMQTaskLaunchConsumer);
+                logger.info("Registering listener: " + listenerClass);
+                publisher.registerListener(abstractActivityListener);
+            }
+        } catch (Exception e) {
+            logger.error("Error loading the listener classes configured in airavata-server.properties", e);
+        }
+    }
+    private static  class TestHandler implements MessageHandler{
+        @Override
+        public Map<String, Object> getProperties() {
+            Map<String, Object> props = new HashMap<String, Object>();
+            ArrayList<String> keys = new ArrayList<String>();
+            keys.add(ServerSettings.getLaunchQueueName());
+            keys.add(ServerSettings.getCancelQueueName());
+            props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
+            props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
+            return props;
+        }
+
+        @Override
+        public void onMessage(MessageContext message) {
+            TaskSubmitEvent event = new TaskSubmitEvent();
+            TBase messageEvent = message.getEvent();
+            byte[] bytes = new byte[0];
+            try {
+                bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                ThriftUtils.createThriftFromBytes(bytes, event);
+                System.out.println(event.getExperimentId());
+            } catch (TException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    private class TaskLaunchMessageHandler implements MessageHandler {
+        private String experimentNode;
+        private String nodeName;
+
+        public TaskLaunchMessageHandler() {
+            experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+            nodeName = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME,"gfac-node0");
+        }
+
+        public Map<String, Object> getProperties() {
+            Map<String, Object> props = new HashMap<String, Object>();
+            ArrayList<String> keys = new ArrayList<String>();
+            keys.add(ServerSettings.getLaunchQueueName());
+            keys.add(ServerSettings.getCancelQueueName());
+            props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
+            props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
+            return props;
+        }
+
+        public void onMessage(MessageContext message) {
+            System.out.println(" Message Received with message id '" + message.getMessageId()
+                    + "' and with message type '" + message.getType());
+            if (message.getType().equals(MessageType.LAUNCHTASK)) {
+                try {
+                    TaskSubmitEvent event = new TaskSubmitEvent();
+                    TBase messageEvent = message.getEvent();
+                    byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                    ThriftUtils.createThriftFromBytes(bytes, event);
+                    // update experiment status to executing
+                    ExperimentStatus status = new ExperimentStatus();
+                    status.setExperimentState(ExperimentState.EXECUTING);
+                    status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+                    registry.update(RegistryModelType.EXPERIMENT_STATUS, status, event.getExperimentId());
+                    experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+                    try {
+                        GFacUtils.createExperimentEntryForPassive(event.getExperimentId(), event.getTaskId(), curatorClient,
+                                experimentNode, nodeName, event.getTokenId(), message.getDeliveryTag());
+                        AiravataZKUtils.getExpStatePath(event.getExperimentId());
+                        submitJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
+                    } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
+                    }
+                } catch (TException e) {
+                    logger.error(e.getMessage(), e); //nobody is listening so nothing to throw
+                } catch (RegistryException e) {
+                    logger.error("Error while updating experiment status", e);
+                }
+            } else if (message.getType().equals(MessageType.TERMINATETASK)) {
+                boolean cancelSuccess = false;
+                TaskTerminateEvent event = new TaskTerminateEvent();
+                TBase messageEvent = message.getEvent();
+                try {
+                    byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                    ThriftUtils.createThriftFromBytes(bytes, event);
+                    boolean saveDeliveryTagSuccess = GFacUtils.setExperimentCancel(event.getExperimentId(), curatorClient, message.getDeliveryTag());
+                    if (saveDeliveryTagSuccess) {
+                        cancelSuccess = cancelJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
+                        System.out.println(" Message Received with message id '" + message.getMessageId()
+                                + "' and with message type '" + message.getType());
+                    } else {
+                        throw new GFacException("Terminate Task fail to save delivery tag : " + String.valueOf(message.getDeliveryTag()) + " \n" +
+                                "This happens when another cancel operation is being processed or experiment is in one of final states, complete|failed|cancelled.");
+                    }
+                } catch (Exception e) {
+                    logger.error(e.getMessage(), e);
+                }finally {
+                    if (cancelSuccess) {
+                        // if cancel success , AiravataExperimentStatusUpdator will send an ack to this message.
+                    } else {
+                        try {
+                            if (GFacUtils.ackCancelRequest(event.getExperimentId(), curatorClient)) {
+                                if (!rabbitMQTaskLaunchConsumer.isOpen()) {
+                                    rabbitMQTaskLaunchConsumer.reconnect();
+                                }
+                                rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
+                            }
+                        } catch (Exception e) {
+                            logger.error("Error while ack to cancel request, experimentId: " + event.getExperimentId());
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/main/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/resources/gsissh.properties b/modules/gfac/gfac-service/src/main/resources/gsissh.properties
new file mode 100644
index 0000000..3fdf76d
--- /dev/null
+++ b/modules/gfac/gfac-service/src/main/resources/gsissh.properties
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+
+###########################################################################
+# Specifies system level configurations as a key/value pairs.
+###########################################################################
+
+StrictHostKeyChecking=no
+ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
new file mode 100644
index 0000000..21c137f
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
@@ -0,0 +1,103 @@
+/*
+ *
+ * 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.client;
+
+//import org.apache.airavata.client.AiravataAPIFactory;
+//import org.apache.airavata.client.api.AiravataAPI;
+//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+//import org.apache.airavata.client.tools.DocumentCreator;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.client.util.Initialize;
+import org.apache.airavata.gfac.cpi.GfacService;
+import org.apache.airavata.gfac.server.GfacServer;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.apache.zookeeper.server.ServerConfig;
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class GfacClientFactoryTest {
+    private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
+//    private DocumentCreator documentCreator;
+    private GfacService.Client gfacClient;
+    private Registry registry;
+    private int NUM_CONCURRENT_REQUESTS = 1;
+    Initialize initialize;
+    GfacServer service;
+    private static ServerCnxnFactory cnxnFactory;
+/*
+    @Test
+    public void setUp() {
+    	AiravataUtils.setExecutionAsServer();
+        initialize = new Initialize("registry-derby.sql");
+        initialize.initializeDB();
+        AiravataZKUtils.startEmbeddedZK(cnxnFactory);
+        try {
+            service = (new GfacServer());
+            service.start();
+            registry = RegistryFactory.getDefaultRegistry();
+        } catch (Exception e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        AiravataUtils.setExecutionAsServer();
+        documentCreator = new DocumentCreator(getAiravataAPI());
+        documentCreator.createLocalHostDocs();
+
+        try {
+            service.stop();
+            cnxnFactory.shutdown();
+        } catch (Exception e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+    }
+
+    private AiravataAPI getAiravataAPI() {
+        AiravataAPI airavataAPI = null;
+            try {
+                String systemUserName = ServerSettings.getDefaultUser();
+                String gateway = ServerSettings.getDefaultUserGateway();
+                airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
+            } catch (ApplicationSettingsException e) {
+                e.printStackTrace();
+            } catch (AiravataAPIInvocationException e) {
+                e.printStackTrace();
+            }
+        return airavataAPI;
+    }
+*/
+
+    private void storeDescriptors() {
+
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
new file mode 100644
index 0000000..651f414
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
@@ -0,0 +1,330 @@
+/*
+ *
+ * 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.client.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class Initialize {
+    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName = "registry-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    public static final String PERSISTANT_DATA = "Configuration";
+
+    public Initialize(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() throws SQLException{
+        String jdbcUrl = null;
+        String jdbcUser = null;
+        String jdbcPassword = null;
+        try{
+            jdbcUrl = ServerSettings.getSetting("registry.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("registry.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("registry.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server cound not started within five seconds...");
+        }
+
+        Connection conn = null;
+        try {
+            Class.forName(Utils.getJDBCDriver()).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for Registry");
+            } else {
+                logger.debug("Database already created for Registry!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+
+        try{
+            GatewayResource gatewayResource = new GatewayResource();
+            gatewayResource.setGatewayId(ServerSettings.getSetting("default.registry.gateway"));
+            gatewayResource.setGatewayName(ServerSettings.getSetting("default.registry.gateway"));
+            gatewayResource.setDomain("test-domain");
+            gatewayResource.setEmailAddress("test-email");
+            gatewayResource.save();
+            
+            UserResource userResource = new UserResource();
+            userResource.setUserName(ServerSettings.getSetting("default.registry.user"));
+            userResource.setPassword(ServerSettings.getSetting("default.registry.password"));
+            userResource.save();
+
+            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+            workerResource.setUser(userResource.getUserName());
+            workerResource.save();
+            
+            ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
+            projectResource.setGatewayId(gatewayResource.getGatewayId());
+            projectResource.setId("default");
+            projectResource.setName("default");
+            projectResource.setWorker(workerResource);
+            projectResource.save();
+        
+          
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+            throw new SQLException(e.getMessage(), e);
+        } catch (RegistryException e) {
+            logger.error("Unable to save data to registry", e);
+            throw new SQLException(e.getMessage(), e);
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+
+        }
+
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName(Utils.getHost()),
+                    20000,
+                    Utils.getJDBCUser(), Utils.getJDBCPassword());
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public void stopDerbyServer() throws SQLException{
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new SQLException("Error while stopping derby server", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/resources/gsissh.properties b/modules/gfac/gfac-service/src/test/resources/gsissh.properties
new file mode 100644
index 0000000..3fdf76d
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/resources/gsissh.properties
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+
+###########################################################################
+# Specifies system level configurations as a key/value pairs.
+###########################################################################
+
+StrictHostKeyChecking=no
+ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/resources/monitor.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/resources/monitor.properties b/modules/gfac/gfac-service/src/test/resources/monitor.properties
new file mode 100644
index 0000000..7f0299a
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/resources/monitor.properties
@@ -0,0 +1,30 @@
+#
+#
+# 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.
+#
+
+primaryMonitor=org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
+secondaryMonitor=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor
+amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
+connection.name=xsede_private
+trusted.certificate.location=/Users/chathuri/dev/airavata/cert/certificates
+certificate.path=/Users/chathuri/dev/airavata/cert/certificates
+myproxy.server=myproxy.teragrid.org
+myproxy.user=ogce
+myproxy.password=
+myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/resources/orchestrator.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/resources/orchestrator.properties b/modules/gfac/gfac-service/src/test/resources/orchestrator.properties
new file mode 100644
index 0000000..35c0427
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/resources/orchestrator.properties
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator
+submitter.interval=10000
+threadpool.size=0
+start.submitter=true
+embedded.mode=true
+enable.validation=false

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/resources/registry-derby.sql b/modules/gfac/gfac-service/src/test/resources/registry-derby.sql
new file mode 100644
index 0000000..9ed5ca9
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/resources/registry-derby.sql
@@ -0,0 +1,361 @@
+/*
+ *
+ * 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.
+ *
+ */
+CREATE TABLE GATEWAY
+(
+        GATEWAY_NAME VARCHAR(255),
+	      OWNER VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME)
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        CATEGORY_ID VARCHAR (255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+
+CREATE TABLE USERS
+(
+        USER_NAME VARCHAR(255),
+        PASSWORD VARCHAR(255),
+        PRIMARY KEY(USER_NAME)
+);
+
+CREATE TABLE GATEWAY_WORKER
+(
+        GATEWAY_NAME VARCHAR(255),
+        USER_NAME VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME, USER_NAME),
+        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT
+(
+         GATEWAY_NAME VARCHAR(255),
+         USER_NAME VARCHAR(255) NOT NULL,
+         PROJECT_ID VARCHAR(255),
+         PROJECT_NAME VARCHAR(255) NOT NULL,
+         DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         PRIMARY KEY (PROJECT_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT_USER
+(
+    PROJECT_ID VARCHAR(255),
+    USER_NAME VARCHAR(255),
+    PRIMARY KEY (PROJECT_ID,USER_NAME),
+    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
+    FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PUBLISHED_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         CREATED_USER VARCHAR(255),
+         PUBLISH_WORKFLOW_NAME VARCHAR(255),
+         VERSION VARCHAR(255),
+         PUBLISHED_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PATH VARCHAR (255),
+         WORKFLOW_CONTENT BLOB,
+         PRIMARY KEY(GATEWAY_NAME, PUBLISH_WORKFLOW_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE USER_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         OWNER VARCHAR(255),
+         TEMPLATE_NAME VARCHAR(255),
+         LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
+         PATH VARCHAR (255),
+         WORKFLOW_GRAPH BLOB,
+         PRIMARY KEY(GATEWAY_NAME, OWNER, TEMPLATE_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        GATEWAY_NAME VARCHAR(255),
+        EXECUTION_USER VARCHAR(255) NOT NULL,
+        PROJECT_ID VARCHAR(255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        EXPERIMENT_NAME VARCHAR(255) NOT NULL,
+        EXPERIMENT_DESCRIPTION VARCHAR(255),
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        WORKFLOW_TEMPLATE_ID VARCHAR(255),
+        WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
+        WORKFLOW_EXECUTION_ID VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID),
+        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_INPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        INPUT_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE CLOB,
+        PRIMARY KEY(EXPERIMENT_ID,INPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_OUTPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        OUTPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE CLOB,
+        PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+
+CREATE TABLE WORKFLOW_NODE_DETAIL
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        NODE_NAME VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT_DATA VARCHAR(255),
+        PRIMARY KEY(NODE_INSTANCE_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE TASK_DETAIL
+(
+        TASK_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
+        PRIMARY KEY(TASK_ID),
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ERROR_DETAIL
+(
+         ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+         EXPERIMENT_ID VARCHAR(255),
+         TASK_ID VARCHAR(255),
+         NODE_INSTANCE_ID VARCHAR(255),
+         JOB_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         ACTUAL_ERROR_MESSAGE CLOB,
+         USER_FRIEDNLY_ERROR_MSG VARCHAR(255),
+         TRANSIENT_OR_PERSISTENT SMALLINT,
+         ERROR_CATEGORY VARCHAR(255),
+         CORRECTIVE_ACTION VARCHAR(255),
+         ACTIONABLE_GROUP VARCHAR(255),
+         PRIMARY KEY(ERROR_ID),
+         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+        TASK_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        INPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE CLOB,
+        PRIMARY KEY(TASK_ID,INPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+        TASK_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        OUTPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE CLOB,
+        PRIMARY KEY(TASK_ID,OUTPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_INPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       INPUT_KEY VARCHAR(255) NOT NULL,
+       INPUT_KEY_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       VALUE VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,INPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_OUTPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       OUTPUT_KEY VARCHAR(255) NOT NULL,
+       OUTPUT_KEY_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       VALUE VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE JOB_DETAIL
+(
+        JOB_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_DESCRIPTION CLOB NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        PRIMARY KEY (TASK_ID, JOB_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_TRANSFER_DETAIL
+(
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        TRANSFER_DESC CLOB NOT NULL,
+        PRIMARY KEY(TRANSFER_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE STATUS
+(
+        STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_ID VARCHAR(255),
+        STATE VARCHAR(255),
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_TYPE VARCHAR(255),
+        PRIMARY KEY(STATUS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE CONFIG_DATA
+(
+        EXPERIMENT_ID VARCHAR(255),
+        AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
+        OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
+        SHARE_EXPERIMENT SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID)
+);
+
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        RESOURCE_HOST_ID VARCHAR(255),
+        CPU_COUNT INTEGER,
+        NODE_COUNT INTEGER,
+        NO_OF_THREADS INTEGER,
+        QUEUE_NAME VARCHAR(255),
+        WALLTIME_LIMIT INTEGER,
+        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        TOTAL_PHYSICAL_MEMORY INTEGER,
+        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
+(
+       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       WORKING_DIR_PARENT VARCHAR(255),
+       UNIQUE_WORKING_DIR VARCHAR(255),
+       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+       CLEAN_AFTER_JOB SMALLINT,
+       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
+(
+       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       OUTPUT_DATA_DIR VARCHAR(255),
+       DATA_REG_URL VARCHAR (255),
+       PERSIST_OUTPUT_DATA SMALLINT,
+       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE QOS_PARAM
+(
+        QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        START_EXECUTION_AT VARCHAR(255),
+        EXECUTE_BEFORE VARCHAR(255),
+        NO_OF_RETRIES INTEGER,
+        PRIMARY KEY(QOS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMMUNITY_USER
+(
+        GATEWAY_NAME VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)
+);
+
+CREATE TABLE CREDENTIALS
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        CREDENTIAL BLOB NOT NULL,
+        PORTAL_USER_ID VARCHAR(256) NOT NULL,
+        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/src/test/resources/zoo.cfg
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/resources/zoo.cfg b/modules/gfac/gfac-service/src/test/resources/zoo.cfg
new file mode 100644
index 0000000..add0758
--- /dev/null
+++ b/modules/gfac/gfac-service/src/test/resources/zoo.cfg
@@ -0,0 +1,22 @@
+# 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.
+
+tickTime=2000
+initLimit=10
+syncLimit=5
+dataDir=data
+clientPort=2181
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/pom.xml b/modules/gfac/gfac-ssh/pom.xml
deleted file mode 100644
index 316568e..0000000
--- a/modules/gfac/gfac-ssh/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-ssh</artifactId>
-    <name>Airavata GFac SSH implementation</name>
-    <description>This is the extension of</description>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-
-        <!--email monitoring-->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-email-monitor</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <!-- GFAC schemas -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!-- Credential Store -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-
-        <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- gsi-ssh api dependencies -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.jcraft</groupId>
-            <artifactId>jsch</artifactId>
-            <version>0.1.50</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>net.schmizz</groupId>
-            <artifactId>sshj</artifactId>
-            <version>0.6.1</version>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
deleted file mode 100644
index 1c31138..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * 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.ssh.context;
-
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-
-public class SSHAuthWrapper {
-    private ServerInfo serverInfo;
-
-    private AuthenticationInfo authenticationInfo;
-
-    private String key;
-
-    public SSHAuthWrapper(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, String key) {
-        this.serverInfo = serverInfo;
-        this.authenticationInfo = authenticationInfo;
-        this.key = key;
-    }
-
-    public ServerInfo getServerInfo() {
-        return serverInfo;
-    }
-
-    public AuthenticationInfo getAuthenticationInfo() {
-        return authenticationInfo;
-    }
-
-    public String getKey() {
-        return key;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
deleted file mode 100644
index 46f1dc3..0000000
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * 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.ssh.handler;
-
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.AbstractHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
-import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * This handler will copy input data from gateway machine to airavata
- * installed machine, later running handlers can copy the input files to computing resource
- * <Handler class="AdvancedSCPOutputHandler">
- * <property name="privateKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa"/>
- * <property name="publicKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa.pub"/>
- * <property name="userName" value="airavata"/>
- * <property name="hostName" value="gw98.iu.xsede.org"/>
- * <property name="inputPath" value="/home/airavata/outputData"/>
- */
-public class AdvancedSCPInputHandler extends AbstractHandler {
-    private static final Logger log = LoggerFactory.getLogger(AdvancedSCPInputHandler.class);
-    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
-    public static final int DEFAULT_SSH_PORT = 22;
-
-    private String password = null;
-
-    private String publicKeyPath;
-
-    private String passPhrase;
-
-    private String privateKeyPath;
-
-    private String userName;
-
-    private String hostName;
-
-    private String inputPath;
-
-    public void initProperties(Properties properties) throws GFacHandlerException {
-        password = (String) properties.get("password");
-        passPhrase = (String) properties.get("passPhrase");
-        privateKeyPath = (String) properties.get("privateKeyPath");
-        publicKeyPath = (String) properties.get("publicKeyPath");
-        userName = (String) properties.get("userName");
-        hostName = (String) properties.get("hostName");
-        inputPath = (String) properties.get("inputPath");
-    }
-
-    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        super.invoke(jobExecutionContext);
-        int index = 0;
-        int oldIndex = 0;
-        List<String> oldFiles = new ArrayList<String>();
-        MessageContext inputNew = new MessageContext();
-        StringBuffer data = new StringBuffer("|");
-        Cluster pbsCluster = null;
-
-        try {
-            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
-            if (pluginData != null) {
-                try {
-                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
-                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
-                    if (oldIndex == oldFiles.size()) {
-                        log.info("Old data looks good !!!!");
-                    } else {
-                        oldIndex = 0;
-                        oldFiles.clear();
-                    }
-                } catch (NumberFormatException e) {
-                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
-                }
-            }
-
-            AuthenticationInfo authenticationInfo = null;
-            if (password != null) {
-                authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
-            } else {
-                authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
-                        this.passPhrase);
-            }
-
-            // Server info
-            String parentPath = inputPath + File.separator + jobExecutionContext.getExperimentID() + File.separator + jobExecutionContext.getTaskData().getTaskID();
-            if (index < oldIndex) {
-                parentPath = oldFiles.get(index);
-                data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
-            } else {
-                (new File(parentPath)).mkdirs();
-                StringBuffer temp = new StringBuffer(data.append(parentPath).append(",").toString());
-                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-            }
-            DataTransferDetails detail = new DataTransferDetails();
-            TransferStatus status = new TransferStatus();
-            // here doesn't matter what the job manager is because we are only doing some file handling
-            // not really dealing with monitoring or job submission, so we pa
-
-            MessageContext input = jobExecutionContext.getInMessageContext();
-            Set<String> parameters = input.getParameters().keySet();
-            for (String paramName : parameters) {
-                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
-                String paramValue = inputParamType.getValue();
-                // TODO: Review this with type
-                if (inputParamType.getType() == DataType.URI) {
-                    try {
-                        URL file = new URL(paramValue);
-                        String key = file.getUserInfo() + file.getHost() + DEFAULT_SSH_PORT;
-                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, file.getUserInfo(), file.getHost(), DEFAULT_SSH_PORT);
-                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
-                        paramValue = file.getPath();
-                    } catch (MalformedURLException e) {
-                        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
-                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
-                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
-                        log.error(e.getLocalizedMessage(), e);
-                    }
-
-                    if (index < oldIndex) {
-                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-                        inputParamType.setValue(oldFiles.get(index));
-                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
-                    } else {
-                        String stageInputFile = stageInputFiles(pbsCluster, paramValue, parentPath);
-                        inputParamType.setValue(stageInputFile);
-                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
-                        status.setTransferState(TransferState.UPLOAD);
-                        detail.setTransferStatus(status);
-                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-
-                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-                    }
-                }
-                // FIXME: what is the thrift model DataType equivalent for URIArray type?
-//                else if ("URIArray".equals(actualParameter.getType().getType().toString())) {
-//                    List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
-//                    List<String> newFiles = new ArrayList<String>();
-//                    for (String paramValueEach : split) {
-//                        try {
-//                            URL file = new URL(paramValue);
-//                            this.userName = file.getUserInfo();
-//                            this.hostName = file.getHost();
-//                            paramValueEach = file.getPath();
-//                        } catch (MalformedURLException e) {
-//                            log.error(e.getLocalizedMessage(), e);
-//                        }
-//                        if (index < oldIndex) {
-//                            log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
-//                            newFiles.add(oldFiles.get(index));
-//                            data.append(oldFiles.get(index++)).append(",");
-//                        } else {
-//                            String stageInputFiles = stageInputFiles(pbsCluster, paramValueEach, parentPath);
-//                            StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
-//                            GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
-//                            newFiles.add(stageInputFiles);
-//                        }
-//                    }
-//                    ((URIArrayType) actualParameter.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
-//                }
-                inputNew.getParameters().put(paramName, inputParamType);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage());
-            try {
-                StringWriter errors = new StringWriter();
-                e.printStackTrace(new PrintWriter(errors));
-                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
-            } catch (GFacException e1) {
-                log.error(e1.getLocalizedMessage());
-            }
-            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
-        }
-        jobExecutionContext.setInMessageContext(inputNew);
-    }
-
-    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
-        this.invoke(jobExecutionContext);
-    }
-
-    private String stageInputFiles(Cluster cluster, String paramValue, String parentPath) throws GFacException {
-        try {
-            cluster.scpFrom(paramValue, parentPath);
-            return "file://" + parentPath + File.separator + (new File(paramValue)).getName();
-        } catch (SSHApiException e) {
-            log.error("Error tranfering remote file to local file, remote path: " + paramValue);
-            throw new GFacException(e);
-        }
-    }
-}


[48/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/jnlp/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/jnlp/NOTICE b/modules/distribution/xbaya-gui/src/main/resources/jnlp/NOTICE
deleted file mode 100644
index 61d74b8..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/jnlp/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/jnlp/README
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/jnlp/README b/modules/distribution/xbaya-gui/src/main/resources/jnlp/README
deleted file mode 100644
index 092c20e..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/jnlp/README
+++ /dev/null
@@ -1,91 +0,0 @@
-Apache Airavata XBaya JNLP - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata can be used as individual components or 
-as an integrated solution to build science gateways or general-purpose distributed 
-application and workflow management systems. Users can use Airavata back end services 
-and build gadgets to deploy in open social containers such as Apache Rave and modify them 
-to suit their needs. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration.
-
-This distribution is a client gui application designed to be hosted on a web server as 
-a web start application that can compose workflows, application descriptors & communicate 
-with the airavata server to persist user data, run & monitor experiments and analyze 
-the results.
-
-Release Notes
-=============
-0.11 is the tenth release of Airavata (skipped 0.1-INCUBATNG). This release focuses GFac rearchitecturing and more GFac level changes. For detailed tasks list, please see RELEASE_NOTES.
-
-Building from source
-====================
-For brief installation instructions, see INSTALL
-For detailed installation and further instructions refer http://airavata.apache.org/ - Documentation section in left hand panel. Step by step with proper documentation are provided.
-
-Known Issues in This Release
-============================
-This is the base release and is focused on a good foundation and less on features. This 
-version is not recommended for production usage.
-
-Airavata XBaya JNLP Distribution Directory Structure
-====================================================
-
-    AIRAVATA_XBAYA_JNLP
-		├── lib
-		├── airavata-logo.gif
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		├── README
-		└── xbaya.jnlp
-
-How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "Airavata in Five Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* For intermediate level Airavata features, follow "Airavata in Ten Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html 
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html
-
-Description of Directory Structure
-==================================
-
-    - lib
-      This contains all the libraries required to run the XBaya GUI as a Java Web Start Application.
-
-	- xbaya.jnlp
-      Java Web start file
-	
-    - README
-      This document.
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata XBaya.
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry.
-
-* Airavata Server Web Application
-  The Airavata Server Web Application distribution allows you to run Airavata Server in a tomcat hosted environment. It includes 
-  all the airavata services shipped with a default derby database as the backend registry.
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client gui application capable of composing workflows, application descriptors & communicating 
-  with the airavata server to persist user data, run & monitor experiments and analyze the results.
-
-* Airavata Client
-  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
-  access Airavata functionality through Airavata API. 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/jnlp/xbaya.jnlp
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/jnlp/xbaya.jnlp b/modules/distribution/xbaya-gui/src/main/resources/jnlp/xbaya.jnlp
deleted file mode 100644
index 7f196d3..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/jnlp/xbaya.jnlp
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ~ 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. -->
-
-<jnlp spec="1.0+"
-   codebase="http://localhost:8080/airavata-xbaya/"
-   href="xbaya.jnlp">
-<information>
-	<title>XBaya</title>
-	<vendor>Apache Airavata</vendor>
-	<icon href="airavata-logo.gif"/>
-	<offline-allowed/>
-</information>
-<security>
-	<all-permissions/>
-</security>
-<resources>
-	<j2se version="1.5+" java-vm-args="-Xmx1024m" />
-
-	    DEPENDENT_JARS
-
-    <property name="log" value="org.apache.airavata.xbaya:ALL"/>
-    <!--property name="javax.net.ssl.trustStore" value="client.jks"/>
-    <property name="javax.net.ssl.trustStorePassword" value="airavata"/>
-    <property name="javax.net.ssl.trustStoreType" value="JKS"/>
-    <property name="javax.net.ssl.keyStore" value="client.jks"/>
-    <property name="javax.net.ssl.keyStorePassword" value="airavata"/-->
-</resources>
-<application-desc main-class="org.apache.airavata.xbaya.XBaya">
-
-</application-desc>
-</jnlp>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/xbaya.jks
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/xbaya.jks b/modules/distribution/xbaya-gui/src/main/resources/xbaya.jks
deleted file mode 100644
index 15ee6f9..0000000
Binary files a/modules/distribution/xbaya-gui/src/main/resources/xbaya.jks and /dev/null differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 23f5f16..418178d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -558,7 +558,6 @@
 				<module>modules/orchestrator</module>
 				<module>modules/server</module>
 				<module>modules/test-suite</module>
-				<module>modules/distribution</module>
 				<!--<module>modules/integration-tests</module>-->
 				<module>modules/workflow</module>
 				<module>modules/xbaya-gui</module>
@@ -642,7 +641,6 @@
 				<module>tools</module>
 				<module>modules/server</module>
                 <module>samples/java-client</module>
-				<module>modules/distribution</module>
 				<module>modules/test-suite</module>
 				<module>modules/integration-tests</module>
 			</modules>


[38/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
deleted file mode 100644
index 213b834..0000000
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ /dev/null
@@ -1,3170 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class GfacService {
-
-  public interface Iface {
-
-    /**
-     * Query gfac server to fetch the CPI version
-     */
-    public String getGFACServiceVersion() throws org.apache.thrift.TException;
-
-    /**
-     *  * After creating the experiment Data and Task Data in the orchestrator
-     *  * Orchestrator has to invoke this operation for each Task per experiment to run
-     *  * the actual Job related actions.
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @param gatewayId:
-     *  *  The GatewayId is inferred from security context and passed onto gfac.
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     * @param tokenId
-     */
-    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
-
-    /**
-     *  *
-     *  * Terminate the running job.At this point user
-     *  * does not have to know the job ID so in the argument
-     *  * we do not make it to required jobID to provide.
-     *  *
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     * @param tokenId
-     */
-    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
-
-  }
-
-  public interface AsyncIface {
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-  }
-
-  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
-    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
-      public Factory() {}
-      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
-        return new Client(prot);
-      }
-      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-        return new Client(iprot, oprot);
-      }
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol prot)
-    {
-      super(prot, prot);
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-      super(iprot, oprot);
-    }
-
-    public String getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      send_getGFACServiceVersion();
-      return recv_getGFACServiceVersion();
-    }
-
-    public void send_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-      sendBase("getGFACServiceVersion", args);
-    }
-
-    public String recv_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-      receiveBase(result, "getGFACServiceVersion");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
-    }
-
-    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      send_submitJob(experimentId, taskId, gatewayId, tokenId);
-      return recv_submitJob();
-    }
-
-    public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      submitJob_args args = new submitJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      args.setGatewayId(gatewayId);
-      args.setTokenId(tokenId);
-      sendBase("submitJob", args);
-    }
-
-    public boolean recv_submitJob() throws org.apache.thrift.TException
-    {
-      submitJob_result result = new submitJob_result();
-      receiveBase(result, "submitJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
-    }
-
-    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      send_cancelJob(experimentId, taskId, gatewayId, tokenId);
-      return recv_cancelJob();
-    }
-
-    public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
-    {
-      cancelJob_args args = new cancelJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      args.setGatewayId(gatewayId);
-      args.setTokenId(tokenId);
-      sendBase("cancelJob", args);
-    }
-
-    public boolean recv_cancelJob() throws org.apache.thrift.TException
-    {
-      cancelJob_result result = new cancelJob_result();
-      receiveBase(result, "cancelJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result");
-    }
-
-  }
-  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
-    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
-      private org.apache.thrift.async.TAsyncClientManager clientManager;
-      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
-        this.clientManager = clientManager;
-        this.protocolFactory = protocolFactory;
-      }
-      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
-        return new AsyncClient(protocolFactory, clientManager, transport);
-      }
-    }
-
-    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
-      super(protocolFactory, clientManager, transport);
-    }
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public String getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getGFACServiceVersion();
-      }
-    }
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      private String gatewayId;
-      private String tokenId;
-      public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-        this.tokenId = tokenId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        submitJob_args args = new submitJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.setGatewayId(gatewayId);
-        args.setTokenId(tokenId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_submitJob();
-      }
-    }
-
-    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      private String gatewayId;
-      private String tokenId;
-      public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-        this.tokenId = tokenId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        cancelJob_args args = new cancelJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.setGatewayId(gatewayId);
-        args.setTokenId(tokenId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_cancelJob();
-      }
-    }
-
-  }
-
-  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
-    }
-
-    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException {
-        getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-        result.success = iface.getGFACServiceVersion();
-        return result;
-      }
-    }
-
-    public static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
-        submitJob_result result = new submitJob_result();
-        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-    public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
-        cancelJob_result result = new cancelJob_result();
-        result.success = iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-  }
-
-  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
-    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
-    public AsyncProcessor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
-    }
-
-    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.getGFACServiceVersion(resultHandler);
-      }
-    }
-
-    public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            submitJob_result result = new submitJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            submitJob_result result = new submitJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
-      }
-    }
-
-    public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            cancelJob_result result = new cancelJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            cancelJob_result result = new cancelJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
-
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory());
-    }
-
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_args() {
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_args(getGFACServiceVersion_args other) {
-    }
-
-    public getGFACServiceVersion_args deepCopy() {
-      return new getGFACServiceVersion_args(this);
-    }
-
-    @Override
-    public void clear() {
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_args)
-        return this.equals((getGFACServiceVersion_args)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_args that) {
-      if (that == null)
-        return false;
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_args(");
-      boolean first = true;
-
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsStandardScheme getScheme() {
-        return new getGFACServiceVersion_argsStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsTupleScheme getScheme() {
-        return new getGFACServiceVersion_argsTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory());
-    }
-
-    public String success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_result() {
-    }
-
-    public getGFACServiceVersion_result(
-      String success)
-    {
-      this();
-      this.success = success;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_result(getGFACServiceVersion_result other) {
-      if (other.isSetSuccess()) {
-        this.success = other.success;
-      }
-    }
-
-    public getGFACServiceVersion_result deepCopy() {
-      return new getGFACServiceVersion_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.success = null;
-    }
-
-    public String getSuccess() {
-      return this.success;
-    }
-
-    public getGFACServiceVersion_result setSuccess(String success) {
-      this.success = success;
-      return this;
-    }
-
-    public void unsetSuccess() {
-      this.success = null;
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return this.success != null;
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      if (!value) {
-        this.success = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return getSuccess();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_result)
-        return this.equals((getGFACServiceVersion_result)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true && this.isSetSuccess();
-      boolean that_present_success = true && that.isSetSuccess();
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (!this.success.equals(that.success))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      if (this.success == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.success);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultStandardScheme getScheme() {
-        return new getGFACServiceVersion_resultStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.success = iprot.readString();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.success != null) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeString(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultTupleScheme getScheme() {
-        return new getGFACServiceVersion_resultTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeString(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readString();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-    public String gatewayId; // required
-    public String tokenId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId"),
-      TOKEN_ID((short)4, "tokenId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          case 3: // GATEWAY_ID
-            return GATEWAY_ID;
-          case 4: // TOKEN_ID
-            return TOKEN_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
-    }
-
-    public submitJob_args() {
-    }
-
-    public submitJob_args(
-      String experimentId,
-      String taskId,
-      String gatewayId,
-      String tokenId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-      this.gatewayId = gatewayId;
-      this.tokenId = tokenId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_args(submitJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-      if (other.isSetGatewayId()) {
-        this.gatewayId = other.gatewayId;
-      }
-      if (other.isSetTokenId()) {
-        this.tokenId = other.tokenId;
-      }
-    }
-
-    public submitJob_args deepCopy() {
-      return new submitJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-      this.gatewayId = null;
-      this.tokenId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public submitJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public submitJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public String getGatewayId() {
-      return this.gatewayId;
-    }
-
-    public submitJob_args setGatewayId(String gatewayId) {
-      this.gatewayId = gatewayId;
-      return this;
-    }
-
-    public void unsetGatewayId() {
-      this.gatewayId = null;
-    }
-
-    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
-    public boolean isSetGatewayId() {
-      return this.gatewayId != null;
-    }
-
-    public void setGatewayIdIsSet(boolean value) {
-      if (!value) {
-        this.gatewayId = null;
-      }
-    }
-
-    public String getTokenId() {
-      return this.tokenId;
-    }
-
-    public submitJob_args setTokenId(String tokenId) {
-      this.tokenId = tokenId;
-      return this;
-    }
-
-    public void unsetTokenId() {
-      this.tokenId = null;
-    }
-
-    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTokenId() {
-      return this.tokenId != null;
-    }
-
-    public void setTokenIdIsSet(boolean value) {
-      if (!value) {
-        this.tokenId = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        if (value == null) {
-          unsetExperimentId();
-        } else {
-          setExperimentId((String)value);
-        }
-        break;
-
-      case TASK_ID:
-        if (value == null) {
-          unsetTaskId();
-        } else {
-          setTaskId((String)value);
-        }
-        break;
-
-      case GATEWAY_ID:
-        if (value == null) {
-          unsetGatewayId();
-        } else {
-          setGatewayId((String)value);
-        }
-        break;
-
-      case TOKEN_ID:
-        if (value == null) {
-          unsetTokenId();
-        } else {
-          setTokenId((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        return getExperimentId();
-
-      case TASK_ID:
-        return getTaskId();
-
-      case GATEWAY_ID:
-        return getGatewayId();
-
-      case TOKEN_ID:
-        return getTokenId();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EXPERIMENT_ID:
-        return isSetExperimentId();
-      case TASK_ID:
-        return isSetTaskId();
-      case GATEWAY_ID:
-        return isSetGatewayId();
-      case TOKEN_ID:
-        return isSetTokenId();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_args)
-        return this.equals((submitJob_args)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
-      if (this_present_experimentId || that_present_experimentId) {
-        if (!(this_present_experimentId && that_present_experimentId))
-          return false;
-        if (!this.experimentId.equals(that.experimentId))
-          return false;
-      }
-
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
-      if (this_present_taskId || that_present_taskId) {
-        if (!(this_present_taskId && that_present_taskId))
-          return false;
-        if (!this.taskId.equals(that.taskId))
-          return false;
-      }
-
-      boolean this_present_gatewayId = true && this.isSetGatewayId();
-      boolean that_present_gatewayId = true && that.isSetGatewayId();
-      if (this_present_gatewayId || that_present_gatewayId) {
-        if (!(this_present_gatewayId && that_present_gatewayId))
-          return false;
-        if (!this.gatewayId.equals(that.gatewayId))
-          return false;
-      }
-
-      boolean this_present_tokenId = true && this.isSetTokenId();
-      boolean that_present_tokenId = true && that.isSetTokenId();
-      if (this_present_tokenId || that_present_tokenId) {
-        if (!(this_present_tokenId && that_present_tokenId))
-          return false;
-        if (!this.tokenId.equals(that.tokenId))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetExperimentId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTaskId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetGatewayId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTokenId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_args(");
-      boolean first = true;
-
-      sb.append("experimentId:");
-      if (this.experimentId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.experimentId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("taskId:");
-      if (this.taskId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.taskId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("gatewayId:");
-      if (this.gatewayId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.gatewayId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("tokenId:");
-      if (this.tokenId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.tokenId);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      if (experimentId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
-      }
-      if (taskId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
-      }
-      if (gatewayId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
-      }
-      if (tokenId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
-      }
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
-      public submitJob_argsStandardScheme getScheme() {
-        return new submitJob_argsStandardScheme();
-      }
-    }
-
-    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EXPERIMENT_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.experimentId = iprot.readString();
-                struct.setExperimentIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // TASK_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.taskId = iprot.readString();
-                struct.setTaskIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // GATEWAY_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.gatewayId = iprot.readString();
-                struct.setGatewayIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 4: // TOKEN_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.tokenId = iprot.readString();
-                struct.setTokenIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.experimentId != null) {
-          oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
-          oprot.writeString(struct.experimentId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.taskId != null) {
-          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
-          oprot.writeString(struct.taskId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.gatewayId != null) {
-          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
-          oprot.writeString(struct.gatewayId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.tokenId != null) {
-          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
-          oprot.writeString(struct.tokenId);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
-      public submitJob_argsTupleScheme getScheme() {
-        return new submitJob_argsTupleScheme();
-      }
-    }
-
-    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.experimentId);
-        oprot.writeString(struct.taskId);
-        oprot.writeString(struct.gatewayId);
-        oprot.writeString(struct.tokenId);
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.experimentId = iprot.readString();
-        struct.setExperimentIdIsSet(true);
-        struct.taskId = iprot.readString();
-        struct.setTaskIdIsSet(true);
-        struct.gatewayId = iprot.readString();
-        struct.setGatewayIdIsSet(true);
-        struct.tokenId = iprot.readString();
-        struct.setTokenIdIsSet(true);
-      }
-    }
-
-  }
-
-  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
-    }
-
-    public boolean success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
-    }
-
-    public submitJob_result() {
-    }
-
-    public submitJob_result(
-      boolean success)
-    {
-      this();
-      this.success = success;
-      setSuccessIsSet(true);
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_result(submitJob_result other) {
-      __isset_bitfield = other.__isset_bitfield;
-      this.success = other.success;
-    }
-
-    public submitJob_result deepCopy() {
-      return new submitJob_result(this);
-    }
-
-    @Override
-    public void clear() {
-      setSuccessIsSet(false);
-      this.success = false;
-    }
-
-    public boolean isSuccess() {
-      return this.success;
-    }
-
-    public submitJob_result setSuccess(boolean success) {
-      this.success = success;
-      setSuccessIsSet(true);
-      return this;
-    }
-
-    public void unsetSuccess() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((Boolean)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return Boolean.valueOf(isSuccess());
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_result)
-        return this.equals((submitJob_result)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true;
-      boolean that_present_success = true;
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (this.success != that.success)
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      sb.append(this.success);
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-        __isset_bitfield = 0;
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
-      public submitJob_resultStandardScheme getScheme() {
-        return new submitJob_resultStandardScheme();
-      }
-    }
-
-    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-                struct.success = iprot.readBool();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.isSetSuccess()) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeBool(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
-      public submitJob_resultTupleScheme getScheme() {
-        return new submitJob_resultTupleScheme();
-      }
-    }
-
-    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeBool(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readBool();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class cancelJob_args implements org.apache.thrift.TBase<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-    public String gatewayId; // required
-    public String tokenId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId"),
-      TOKEN_ID((short)4, "tokenId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          case 3: // GATEWAY_ID
-            return GATEWAY_ID;
-          case 4: // TOKEN_ID
-            return TOKEN_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
-    }
-
-    public cancelJob_args() {
-    }
-
-    public cancelJob_args(
-      String experimentId,
-      String taskId,
-      String gatewayId,
-      String tokenId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-      this.gatewayId = gatewayId;
-      this.tokenId = tokenId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public cancelJob_args(cancelJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-      if (other.isSetGatewayId()) {
-        this.gatewayId = other.gatewayId;
-      }
-      if (other.isSetTokenId()) {
-        this.tokenId = other.tokenId;
-      }
-    }
-
-    public cancelJob_args deepCopy() {
-      return new cancelJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-      this.gatewayId = null;
-      this.tokenId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public cancelJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public cancelJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public String getGatewayId() {
-      return this.gatewayId;
-    }
-
-    public cancelJob_args setGatewayId(String gatewayId) {
-      this.gatewayId = gatewayId;
-      return this;
-    }
-
-    public void unsetGatewayId() {
-      this.gatewayId = null;
-    }
-
-    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
-    public boolean isSetGatewayId() {
-      return this.gatewayId != null;
-    }
-
-    public void setGatewayIdIsSet(boolean value) {
-      if (!value) {
-        this.gatewayId = null;
-      }
-    }
-
-    public String getTokenId() {
-      return this.tokenId;
-    }
-
-    public cancelJob_args setTokenId(String tokenId) {
-      this.tokenId = tokenId;
-      return this;
-    }
-
-    public void unsetTokenId() {
-      this.tokenId = null;
-    }
-
-    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTokenId() {
-      return this.tokenId != null;
-    }
-
-    public void setToken

<TRUNCATED>

[66/81] [abbrv] airavata git commit: removed thrift generated client code from gfac-service module and move it to gfac-client module. Refactored module dependency of gfac

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
deleted file mode 100644
index 14fd7fe..0000000
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class gfac_cpi_serviceConstants {
-
-  public static final String GFAC_CPI_VERSION = "0.13.0";
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
index 21c137f..b01c8a5 100644
--- a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
+++ b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
@@ -21,29 +21,14 @@
 
 package org.apache.airavata.gfac.client;
 
-//import org.apache.airavata.client.AiravataAPIFactory;
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.client.util.Initialize;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.gfac.server.GfacServer;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.zookeeper.server.ServerCnxnFactory;
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.net.URL;
-
 public class GfacClientFactoryTest {
     private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
 //    private DocumentCreator documentCreator;


[68/81] [abbrv] airavata git commit: removed thrift generated client code from gfac-service module and move it to gfac-client module. Refactored module dependency of gfac

Posted by sh...@apache.org.
removed thrift generated client code from gfac-service module and move it to gfac-client module. Refactored module dependency of gfac


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

Branch: refs/heads/master
Commit: 29cd57fdf1d5a707e398cc2db11c55f37c7b30e8
Parents: 30f9d70
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Thu Jun 4 11:45:37 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Thu Jun 4 11:45:37 2015 -0400

----------------------------------------------------------------------
 .../airavata-api/generate-thrift-files.sh       |    2 +-
 .../gfac/generate-gfac-stubs.sh                 |    4 +-
 .../orchestrator/generate-orchestrator-stubs.sh |    2 +-
 .../apache/airavata/gfac/cpi/GfacService.java   |  434 ++-
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |    3 +-
 modules/gfac/gfac-impl/pom.xml                  |    2 +-
 modules/gfac/gfac-service/pom.xml               |   10 +-
 .../apache/airavata/gfac/cpi/GfacService.java   | 3170 ------------------
 .../gfac/cpi/gfac_cpi_serviceConstants.java     |   55 -
 .../gfac/client/GfacClientFactoryTest.java      |   15 -
 10 files changed, 415 insertions(+), 3282 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/airavata-api/generate-thrift-files.sh b/component-interface-descriptions/airavata-api/generate-thrift-files.sh
index a0951f9..30046c9 100755
--- a/component-interface-descriptions/airavata-api/generate-thrift-files.sh
+++ b/component-interface-descriptions/airavata-api/generate-thrift-files.sh
@@ -45,7 +45,7 @@ fi
 # Generation of thrift files will require installing Apache Thrift. Please add thrift to your path.
 #  Verify is thrift is installed, is in the path is at a specified version.
 
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
 THRIFT_EXEC=/usr/local/bin/thrift
 
 VERSION=$($THRIFT_EXEC -version 2>/dev/null | grep -F "${REQUIRED_THRIFT_VERSION}" |  wc -l)

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/gfac/generate-gfac-stubs.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/gfac/generate-gfac-stubs.sh b/component-interface-descriptions/gfac/generate-gfac-stubs.sh
index d34eaef..9e7483d 100755
--- a/component-interface-descriptions/gfac/generate-gfac-stubs.sh
+++ b/component-interface-descriptions/gfac/generate-gfac-stubs.sh
@@ -19,9 +19,9 @@
 
 
 # Global Constants used across the script
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
 BASE_TARGET_DIR='target'
-GFAC_SERVICE_DIR='../../modules/gfac/airavata-gfac-service/src/main/java/'
+GFAC_SERVICE_DIR='../../modules/gfac/gfac-client/src/main/java/'
 
 # The Funcation fail prints error messages on failure and quits the script.
 fail() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh b/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
index df526d2..b4a4779 100755
--- a/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
+++ b/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
@@ -19,7 +19,7 @@
 
 
 # Global Constants used across the script
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
 BASE_TARGET_DIR='target'
 ORCHESTRATOR_SERVICE_DIR='../../modules/orchestrator/orchestrator-client/src/main/java'
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
index eb8ddf7..948bf8f 100644
--- a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -15,7 +15,7 @@
      * limitations under the License.
      */
 /**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.2)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -45,9 +45,11 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-3")
 @SuppressWarnings("all") public class GfacService {
 
   public interface Iface {
@@ -73,8 +75,9 @@ import org.slf4j.LoggerFactory;
      * @param experimentId
      * @param taskId
      * @param gatewayId
+     * @param tokenId
      */
-    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException;
+    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
 
     /**
      *  *
@@ -91,8 +94,10 @@ import org.slf4j.LoggerFactory;
      * 
      * @param experimentId
      * @param taskId
+     * @param gatewayId
+     * @param tokenId
      */
-    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException;
+    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
 
   }
 
@@ -100,9 +105,9 @@ import org.slf4j.LoggerFactory;
 
     public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
   }
 
@@ -148,18 +153,19 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
     }
 
-    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
+    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
     {
-      send_submitJob(experimentId, taskId, gatewayId);
+      send_submitJob(experimentId, taskId, gatewayId, tokenId);
       return recv_submitJob();
     }
 
-    public void send_submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
+    public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
     {
       submitJob_args args = new submitJob_args();
       args.setExperimentId(experimentId);
       args.setTaskId(taskId);
       args.setGatewayId(gatewayId);
+      args.setTokenId(tokenId);
       sendBase("submitJob", args);
     }
 
@@ -173,17 +179,19 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
     }
 
-    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
+    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
     {
-      send_cancelJob(experimentId, taskId);
+      send_cancelJob(experimentId, taskId, gatewayId, tokenId);
       return recv_cancelJob();
     }
 
-    public void send_cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
+    public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
     {
       cancelJob_args args = new cancelJob_args();
       args.setExperimentId(experimentId);
       args.setTaskId(taskId);
+      args.setGatewayId(gatewayId);
+      args.setTokenId(tokenId);
       sendBase("cancelJob", args);
     }
 
@@ -244,9 +252,9 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -255,11 +263,13 @@ import org.slf4j.LoggerFactory;
       private String experimentId;
       private String taskId;
       private String gatewayId;
-      public submitJob_call(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private String tokenId;
+      public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.experimentId = experimentId;
         this.taskId = taskId;
         this.gatewayId = gatewayId;
+        this.tokenId = tokenId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -268,6 +278,7 @@ import org.slf4j.LoggerFactory;
         args.setExperimentId(experimentId);
         args.setTaskId(taskId);
         args.setGatewayId(gatewayId);
+        args.setTokenId(tokenId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -282,9 +293,9 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, resultHandler, this, ___protocolFactory, ___transport);
+      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -292,10 +303,14 @@ import org.slf4j.LoggerFactory;
     public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String experimentId;
       private String taskId;
-      public cancelJob_call(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private String gatewayId;
+      private String tokenId;
+      public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.experimentId = experimentId;
         this.taskId = taskId;
+        this.gatewayId = gatewayId;
+        this.tokenId = tokenId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -303,6 +318,8 @@ import org.slf4j.LoggerFactory;
         cancelJob_args args = new cancelJob_args();
         args.setExperimentId(experimentId);
         args.setTaskId(taskId);
+        args.setGatewayId(gatewayId);
+        args.setTokenId(tokenId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -371,7 +388,7 @@ import org.slf4j.LoggerFactory;
 
       public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
         submitJob_result result = new submitJob_result();
-        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId);
+        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -392,7 +409,7 @@ import org.slf4j.LoggerFactory;
 
       public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
         cancelJob_result result = new cancelJob_result();
-        result.success = iface.cancelJob(args.experimentId, args.taskId);
+        result.success = iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -516,7 +533,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.submitJob(args.experimentId, args.taskId, args.gatewayId,resultHandler);
+        iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
       }
     }
 
@@ -568,7 +585,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.cancelJob(args.experimentId, args.taskId,resultHandler);
+        iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
       }
     }
 
@@ -704,7 +721,9 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      return list.hashCode();
     }
 
     @Override
@@ -1015,7 +1034,14 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true && (isSetSuccess());
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      return list.hashCode();
     }
 
     @Override
@@ -1180,6 +1206,7 @@ import org.slf4j.LoggerFactory;
     private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
     private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
     private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -1190,12 +1217,14 @@ import org.slf4j.LoggerFactory;
     public String experimentId; // required
     public String taskId; // required
     public String gatewayId; // required
+    public String tokenId; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       EXPERIMENT_ID((short)1, "experimentId"),
       TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId");
+      GATEWAY_ID((short)3, "gatewayId"),
+      TOKEN_ID((short)4, "tokenId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -1216,6 +1245,8 @@ import org.slf4j.LoggerFactory;
             return TASK_ID;
           case 3: // GATEWAY_ID
             return GATEWAY_ID;
+          case 4: // TOKEN_ID
+            return TOKEN_ID;
           default:
             return null;
         }
@@ -1265,6 +1296,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
     }
@@ -1275,12 +1308,14 @@ import org.slf4j.LoggerFactory;
     public submitJob_args(
       String experimentId,
       String taskId,
-      String gatewayId)
+      String gatewayId,
+      String tokenId)
     {
       this();
       this.experimentId = experimentId;
       this.taskId = taskId;
       this.gatewayId = gatewayId;
+      this.tokenId = tokenId;
     }
 
     /**
@@ -1296,6 +1331,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetGatewayId()) {
         this.gatewayId = other.gatewayId;
       }
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
     }
 
     public submitJob_args deepCopy() {
@@ -1307,6 +1345,7 @@ import org.slf4j.LoggerFactory;
       this.experimentId = null;
       this.taskId = null;
       this.gatewayId = null;
+      this.tokenId = null;
     }
 
     public String getExperimentId() {
@@ -1381,6 +1420,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public String getTokenId() {
+      return this.tokenId;
+    }
+
+    public submitJob_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
+      return this;
+    }
+
+    public void unsetTokenId() {
+      this.tokenId = null;
+    }
+
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
+    }
+
+    public void setTokenIdIsSet(boolean value) {
+      if (!value) {
+        this.tokenId = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case EXPERIMENT_ID:
@@ -1407,6 +1470,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case TOKEN_ID:
+        if (value == null) {
+          unsetTokenId();
+        } else {
+          setTokenId((String)value);
+        }
+        break;
+
       }
     }
 
@@ -1421,6 +1492,9 @@ import org.slf4j.LoggerFactory;
       case GATEWAY_ID:
         return getGatewayId();
 
+      case TOKEN_ID:
+        return getTokenId();
+
       }
       throw new IllegalStateException();
     }
@@ -1438,6 +1512,8 @@ import org.slf4j.LoggerFactory;
         return isSetTaskId();
       case GATEWAY_ID:
         return isSetGatewayId();
+      case TOKEN_ID:
+        return isSetTokenId();
       }
       throw new IllegalStateException();
     }
@@ -1482,12 +1558,43 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_tokenId = true && this.isSetTokenId();
+      boolean that_present_tokenId = true && that.isSetTokenId();
+      if (this_present_tokenId || that_present_tokenId) {
+        if (!(this_present_tokenId && that_present_tokenId))
+          return false;
+        if (!this.tokenId.equals(that.tokenId))
+          return false;
+      }
+
       return true;
     }
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_experimentId = true && (isSetExperimentId());
+      list.add(present_experimentId);
+      if (present_experimentId)
+        list.add(experimentId);
+
+      boolean present_taskId = true && (isSetTaskId());
+      list.add(present_taskId);
+      if (present_taskId)
+        list.add(taskId);
+
+      boolean present_gatewayId = true && (isSetGatewayId());
+      list.add(present_gatewayId);
+      if (present_gatewayId)
+        list.add(gatewayId);
+
+      boolean present_tokenId = true && (isSetTokenId());
+      list.add(present_tokenId);
+      if (present_tokenId)
+        list.add(tokenId);
+
+      return list.hashCode();
     }
 
     @Override
@@ -1528,6 +1635,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTokenId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -1571,6 +1688,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.gatewayId);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("tokenId:");
+      if (this.tokenId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tokenId);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -1586,6 +1711,9 @@ import org.slf4j.LoggerFactory;
       if (gatewayId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
       }
+      if (tokenId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
     }
 
@@ -1647,6 +1775,14 @@ import org.slf4j.LoggerFactory;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 4: // TOKEN_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.tokenId = iprot.readString();
+                struct.setTokenIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -1677,6 +1813,11 @@ import org.slf4j.LoggerFactory;
           oprot.writeString(struct.gatewayId);
           oprot.writeFieldEnd();
         }
+        if (struct.tokenId != null) {
+          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+          oprot.writeString(struct.tokenId);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -1697,6 +1838,7 @@ import org.slf4j.LoggerFactory;
         oprot.writeString(struct.experimentId);
         oprot.writeString(struct.taskId);
         oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.tokenId);
       }
 
       @Override
@@ -1708,6 +1850,8 @@ import org.slf4j.LoggerFactory;
         struct.setTaskIdIsSet(true);
         struct.gatewayId = iprot.readString();
         struct.setGatewayIdIsSet(true);
+        struct.tokenId = iprot.readString();
+        struct.setTokenIdIsSet(true);
       }
     }
 
@@ -1910,7 +2054,14 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true;
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      return list.hashCode();
     }
 
     @Override
@@ -2072,6 +2223,8 @@ import org.slf4j.LoggerFactory;
 
     private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
     private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -2081,11 +2234,15 @@ import org.slf4j.LoggerFactory;
 
     public String experimentId; // required
     public String taskId; // required
+    public String gatewayId; // required
+    public String tokenId; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId");
+      TASK_ID((short)2, "taskId"),
+      GATEWAY_ID((short)3, "gatewayId"),
+      TOKEN_ID((short)4, "tokenId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -2104,6 +2261,10 @@ import org.slf4j.LoggerFactory;
             return EXPERIMENT_ID;
           case 2: // TASK_ID
             return TASK_ID;
+          case 3: // GATEWAY_ID
+            return GATEWAY_ID;
+          case 4: // TOKEN_ID
+            return TOKEN_ID;
           default:
             return null;
         }
@@ -2151,6 +2312,10 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
     }
@@ -2160,11 +2325,15 @@ import org.slf4j.LoggerFactory;
 
     public cancelJob_args(
       String experimentId,
-      String taskId)
+      String taskId,
+      String gatewayId,
+      String tokenId)
     {
       this();
       this.experimentId = experimentId;
       this.taskId = taskId;
+      this.gatewayId = gatewayId;
+      this.tokenId = tokenId;
     }
 
     /**
@@ -2177,6 +2346,12 @@ import org.slf4j.LoggerFactory;
       if (other.isSetTaskId()) {
         this.taskId = other.taskId;
       }
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
     }
 
     public cancelJob_args deepCopy() {
@@ -2187,6 +2362,8 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       this.experimentId = null;
       this.taskId = null;
+      this.gatewayId = null;
+      this.tokenId = null;
     }
 
     public String getExperimentId() {
@@ -2237,6 +2414,54 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public cancelJob_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public String getTokenId() {
+      return this.tokenId;
+    }
+
+    public cancelJob_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
+      return this;
+    }
+
+    public void unsetTokenId() {
+      this.tokenId = null;
+    }
+
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
+    }
+
+    public void setTokenIdIsSet(boolean value) {
+      if (!value) {
+        this.tokenId = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case EXPERIMENT_ID:
@@ -2255,6 +2480,22 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      case TOKEN_ID:
+        if (value == null) {
+          unsetTokenId();
+        } else {
+          setTokenId((String)value);
+        }
+        break;
+
       }
     }
 
@@ -2266,6 +2507,12 @@ import org.slf4j.LoggerFactory;
       case TASK_ID:
         return getTaskId();
 
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      case TOKEN_ID:
+        return getTokenId();
+
       }
       throw new IllegalStateException();
     }
@@ -2281,6 +2528,10 @@ import org.slf4j.LoggerFactory;
         return isSetExperimentId();
       case TASK_ID:
         return isSetTaskId();
+      case GATEWAY_ID:
+        return isSetGatewayId();
+      case TOKEN_ID:
+        return isSetTokenId();
       }
       throw new IllegalStateException();
     }
@@ -2316,12 +2567,52 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
+          return false;
+      }
+
+      boolean this_present_tokenId = true && this.isSetTokenId();
+      boolean that_present_tokenId = true && that.isSetTokenId();
+      if (this_present_tokenId || that_present_tokenId) {
+        if (!(this_present_tokenId && that_present_tokenId))
+          return false;
+        if (!this.tokenId.equals(that.tokenId))
+          return false;
+      }
+
       return true;
     }
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_experimentId = true && (isSetExperimentId());
+      list.add(present_experimentId);
+      if (present_experimentId)
+        list.add(experimentId);
+
+      boolean present_taskId = true && (isSetTaskId());
+      list.add(present_taskId);
+      if (present_taskId)
+        list.add(taskId);
+
+      boolean present_gatewayId = true && (isSetGatewayId());
+      list.add(present_gatewayId);
+      if (present_gatewayId)
+        list.add(gatewayId);
+
+      boolean present_tokenId = true && (isSetTokenId());
+      list.add(present_tokenId);
+      if (present_tokenId)
+        list.add(tokenId);
+
+      return list.hashCode();
     }
 
     @Override
@@ -2352,6 +2643,26 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGatewayId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTokenId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -2387,6 +2698,22 @@ import org.slf4j.LoggerFactory;
         sb.append(this.taskId);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("tokenId:");
+      if (this.tokenId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tokenId);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -2399,6 +2726,12 @@ import org.slf4j.LoggerFactory;
       if (taskId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
       }
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+      }
+      if (tokenId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
     }
 
@@ -2452,6 +2785,22 @@ import org.slf4j.LoggerFactory;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 3: // GATEWAY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.gatewayId = iprot.readString();
+                struct.setGatewayIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // TOKEN_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.tokenId = iprot.readString();
+                struct.setTokenIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -2477,6 +2826,16 @@ import org.slf4j.LoggerFactory;
           oprot.writeString(struct.taskId);
           oprot.writeFieldEnd();
         }
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.tokenId != null) {
+          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+          oprot.writeString(struct.tokenId);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -2496,6 +2855,8 @@ import org.slf4j.LoggerFactory;
         TTupleProtocol oprot = (TTupleProtocol) prot;
         oprot.writeString(struct.experimentId);
         oprot.writeString(struct.taskId);
+        oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.tokenId);
       }
 
       @Override
@@ -2505,6 +2866,10 @@ import org.slf4j.LoggerFactory;
         struct.setExperimentIdIsSet(true);
         struct.taskId = iprot.readString();
         struct.setTaskIdIsSet(true);
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+        struct.tokenId = iprot.readString();
+        struct.setTokenIdIsSet(true);
       }
     }
 
@@ -2707,7 +3072,14 @@ import org.slf4j.LoggerFactory;
 
     @Override
     public int hashCode() {
-      return 0;
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true;
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      return list.hashCode();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
index 14fd7fe..9cf65c6 100644
--- a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
@@ -15,7 +15,7 @@
      * limitations under the License.
      */
 /**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.2)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -45,6 +45,7 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
index 4733253..0326782 100644
--- a/modules/gfac/gfac-impl/pom.xml
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -18,7 +18,7 @@
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>gfac-impl</artifactId>
-    <name>Airavata GFac Local implementation</name>
+    <name>Airavata GFac Implementation</name>
     <description>This is the extension of GFAC Local.</description>
     <url>http://airavata.apache.org/</url>
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/pom.xml b/modules/gfac/gfac-service/pom.xml
index b911385..fefc8cd 100644
--- a/modules/gfac/gfac-service/pom.xml
+++ b/modules/gfac/gfac-service/pom.xml
@@ -57,6 +57,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
+            <artifactId>gfac-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
             <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -75,11 +80,6 @@
             <artifactId>airavata-api-stubs</artifactId>
             <version>${project.version}</version>
         </dependency>
-         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gfac-client</artifactId>
-            <version>${project.version}</version>
-        </dependency>
 	    <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-server-configuration</artifactId>


[65/81] [abbrv] airavata git commit: Removing the unused grid-tests profile

Posted by sh...@apache.org.
Removing the unused grid-tests profile


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

Branch: refs/heads/master
Commit: 30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa
Parents: 8c4ea1f
Author: Suresh Marru <sm...@apache.org>
Authored: Wed Jun 3 23:26:31 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Wed Jun 3 23:26:31 2015 -0400

----------------------------------------------------------------------
 pom.xml | 82 ------------------------------------------------------------
 1 file changed, 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/30f9d70a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 418178d..5fe2d34 100644
--- a/pom.xml
+++ b/pom.xml
@@ -564,88 +564,6 @@
 			</modules>
 		</profile>
 		<profile>
-			<id>gridTests</id>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-remote-resources-plugin</artifactId>
-						<executions>
-							<execution>
-								<goals>
-									<goal>process</goal>
-								</goals>
-							</execution>
-						</executions>
-					</plugin>
-					<plugin>
-						<artifactId>maven-resources-plugin</artifactId>
-						<version>2.5</version>
-						<executions>
-							<execution>
-								<id>copy-resources</id>
-								<phase>validate</phase>
-								<goals>
-									<goal>copy-resources</goal>
-								</goals>
-								<configuration>
-									<outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
-									<resources>
-										<resource>
-											<directory>${basedir}/src/main/assembly/dist</directory>
-											<filtering>true</filtering>
-										</resource>
-									</resources>
-								</configuration>
-							</execution>
-						</executions>
-					</plugin>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-compiler-plugin</artifactId>
-						<version>3.1</version>
-						<configuration>
-							<source>1.8</source>
-							<target>1.8</target>
-						</configuration>
-					</plugin>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-surefire-plugin</artifactId>
-						<version>${surefire.version}</version>
-						<configuration>
-							<failIfNoTests>false</failIfNoTests>
-							<skipTests>${skipTests}</skipTests>
-							<workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
-							<excludes>
-								<exclude>**/IT.java</exclude>
-							</excludes>
-							<includes>
-								<include>**/*TestWithMyProxyAuth.java</include>
-								<include>**/*TestWithSSHAuth.java</include>
-							</includes>
-						</configuration>
-					</plugin>
-				</plugins>
-			</build>
-			<modules>
-				<module>modules/configuration</module>
-				<module>airavata-api</module>
-				<module>modules/commons</module>
-				<module>modules/gfac</module>
-				<module>modules/workflow-model</module>
-				<module>modules/registry</module>
-				<module>modules/security</module>
-				<module>modules/credential-store</module>
-				<module>modules/orchestrator</module>
-				<module>tools</module>
-				<module>modules/server</module>
-                <module>samples/java-client</module>
-				<module>modules/test-suite</module>
-				<module>modules/integration-tests</module>
-			</modules>
-		</profile>
-		<profile>
 			<id>pedantic</id>
 			<build>
 				<plugins>


[12/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
deleted file mode 100644
index bb80505..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Glue2.json
+++ /dev/null
@@ -1,246 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Glue2.json",
-  "description": "A GLUE 2 document",
-  "type": "object",
-  "properties": {
-    "Entity": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}]
-      }
-    },
-    "Location": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json"}]
-      }
-    },
-    "Contact": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Contact.json"}]
-      }
-    },
-    "Domain": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}]
-      }
-    },
-    "AdminDomain": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AdminDomain.json"}]
-      }
-    },
-    "UserDomain": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json"}]
-      }
-    },
-    "Service": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}]
-      }
-    },
-    "Endpoint": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}]
-      }
-    },
-    "Share": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}]
-      }
-    },
-    "Manager": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json"}]
-      }
-    },
-    "Resource": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}]
-      }
-    },
-    "Activity": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json"}]
-      }
-    },
-    "Policy": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}]
-      }
-    },
-    "AccessPolicy": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AccessPolicy.json"}]
-      }
-    },
-    "MappingPolicy": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json"}]
-      }
-    },
-    "ComputingService": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingService.json"}]
-      }
-    },
-    "ComputingEndpoint": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingEndpoint.json"}]
-      }
-    },
-    "ComputingShare": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingShare.json"}]
-      }
-    },
-    "ComputingManager": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingManager.json"}]
-      }
-    },
-    "Benchmark": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Benchmark.json"}]
-      }
-    },
-    "ExecutionEnvironment": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json"}]
-      }
-    },
-    "ApplicationEnvironment": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationEnvironment.json"}]
-      }
-    },
-    "ApplicationHandle": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationHandle.json"}]
-      }
-    },
-    "ComputingActivity": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingActivity.json"}]
-      }
-    },
-    "ToStorageService": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json"}]
-      }
-    },
-    "StorageService": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json"}]
-      }
-    },
-    "StorageServiceCapacity": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json"}]
-      }
-    },
-    "StorageAccessProtocol": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json"}]
-      }
-    },
-    "StorageEndpoint": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json"}]
-      }
-    },
-    "StorageShare": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json"}]
-      }
-    },
-    "StorageShareCapacity": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json"}]
-      }
-    },
-    "StorageManager": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json"}]
-      }
-    },
-    "DataStore": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/DataStore.json"}]
-      }
-    },
-    "ToComputingService": {
-      "type": "array",
-      "items": {
-        "type": "object",
-        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json"}]
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
deleted file mode 100644
index 8491cc0..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Location.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json",
-  "description": "A GLUE 2 Location",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Address": {
-      "type": "string",
-      "description": "A free format street address"
-    },
-    "Place": {
-      "type": "string",
-      "description": "Name of town/city"
-    },
-    "Country": {
-      "type": "string",
-      "description": "Name of country"
-    },
-    "PostalCode": {
-      "type": "string",
-      "description": "Postal code"
-    },
-    "Latitude": {
-      "type": "number",
-      "description": "Position north (positive) or south (negative) of the equator in degrees"
-    },
-    "Longitude": {
-      "type": "number",
-      "description": "Position east (positive) or west (negative) of the primary meridian in degrees"
-    },
-    "ServiceID": {
-      "type": "array",
-      "description": "The IDs of Services at this location",
-      "items": {
-        "type": "string"
-      }
-    },
-    "DomainID": {
-      "type": "array",
-      "description": "The IDs of Domains at this location",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
deleted file mode 100644
index d1df50a..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Manager.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "ProductName": {
-      "type": "string",
-      "description": "The name of the software product which implements the Manager"
-    },
-    "ProductVersion": {
-      "type": "string",
-      "description": "The version of the software product which implements the Manager"
-    },
-    "ServiceID": {
-      "type": "string",
-      "description": "The ID of the Service this Share participates in"
-    },
-    "ResourceID": {
-      "type": "array",
-      "description": "ID(s) of Resources associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ProductName","ServiceID","ResourceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
deleted file mode 100644
index 268844d..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/MappingPolicy.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
-  "properties": {
-    "ShareID": {
-      "type": "string",
-      "description": "The ID of the Share this MappingPolicy is for"
-    }
-  },
-  "required": ["ShareID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
deleted file mode 100644
index f936699..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Policy.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Scheme": {
-      "type": "string",
-      "description": "PolicyScheme_t (open enumeration)"
-    },
-    "Rule": {
-      "type": "array",
-      "description": "Policy rules",
-      "items": {
-        "type": "string"
-      }
-    },
-    "UserDomainID": {
-      "type": "array",
-      "description": "The ID(s) of the UserDomains this Policy applies to",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Scheme","Rule","UserDomainID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
deleted file mode 100644
index 88d08ad..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Resource.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "ManagerID": {
-      "type": "string",
-      "description": "The ID of the Manager for this Resource"
-    },
-    "ShareID": {
-      "type": "array",
-      "description": "The ID(s) of the Shares this Resource is part of",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "The ID(s) of Activities consuming from this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ManagerID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
deleted file mode 100644
index 4662407..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Service.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Capability": {
-      "type": "array",
-      "description": "Capability_t (open enumeration)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Type": {
-      "type": "string",
-      "description": "ServiceType_t (open enumeration)"
-    },
-    "QualityLevel": {
-      "type": "string",
-      "description": "QualityLevel_t",
-      "enum": ["development","pre-production","production","testing"]
-    },
-    "StatusInfo": {
-      "type": "array",
-      "description": "URLs of web pages providing additional information",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Complexity": {
-      "type": "string",
-      "description": "A human-readable description of the number of endpoint types, shares, and resources"
-    },
-    "EndpointID": {
-      "type": "array",
-      "description": "The IDs of Endpoints for this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ShareID": {
-      "type": "array",
-      "description": "The IDs of the Shares offered by this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ManagerID": {
-      "type": "array",
-      "description": "The IDs of the Managers of this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ContactID": {
-      "type": "array",
-      "description": "The IDs of Contacts for this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "LocationID": {
-      "type": "string",
-      "description": "The ID of the primary Location of this Service"
-    },
-    "ServiceID": {
-      "type": "array",
-      "description": "The IDs of Services related to this Service",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Type","QualityLevel"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
deleted file mode 100644
index 258fc1b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/Share.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Description": {
-      "type": "string",
-      "description": "A human-readable description of the Share"
-    },
-    "EndpointID": {
-      "type": "array",
-      "description": "The ID(s) of the Endpoints that can be used to access this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ResourceID": {
-      "type": "array",
-      "description": "The ID(s) of the Resources associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ServiceID": {
-      "type": "string",
-      "description": "The ID of the Service this Share participates in"
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "The ID(s) of Activities consuming from this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "MappingPolicyID": {
-      "type": "array",
-      "description": "ID(s) of MappingPolicies associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
deleted file mode 100644
index 05a830b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageAccessProtocol.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of the protocol - StorageAccessProtocol_t"
-    },
-    "Version": {
-      "type": "string",
-      "description": "The version of the protocol supported"
-    },
-    "MaxStreams": {
-      "type": "integer",
-      "description": "The maximum number of parallel network streams which can be usef for a single transfer"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService this protocol is available for"
-    },
-    "ToComputingServiceID": {
-      "type": "array",
-      "description": "The ID(s) ToComputingService objects that describe connectivity to ComputingServices",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Type","Version","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
deleted file mode 100644
index 38b27c4..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageEndpoint.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
-  "properties": {
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
deleted file mode 100644
index f3984f6..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageManager.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
deleted file mode 100644
index a03d111..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageService.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
-  "properties": {
-    "StorageAccessProtocolID": {
-      "type": "array",
-      "description": "The ID(s) of the StorageAccessProtocols supported by this service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "StorageServiceCapacityID": {
-      "type": "array",
-      "description": "The ID(s) of the StorageServiceCapacities for this Service",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
deleted file mode 100644
index a25c204..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageServiceCapacity.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of storage capacity - StorageCapacity_t"
-    },
-    "TotalSize": {
-      "type": "integer",
-      "description": "The total amount of storage of this type (GB)"
-    },
-    "FreeSize": {
-      "type": "integer",
-      "description": "The amount of currently available storage of this type (GB)"
-    },
-    "UsedSize": {
-      "type": "integer",
-      "description": "The amount storage of this type in use (GB)"
-    },
-    "ReservedSize": {
-      "type": "integer",
-      "description": "The amount storage of this type which is not in use, but has been reserved for use in use (GB)"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService this capacity describes"
-    }
-  },
-  "required": ["Type","StorageServiceID"]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
deleted file mode 100644
index 9703118..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShare.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-    "ServingState": {
-      "type": "string",
-      "description": "How the Share is currently serving jobs",
-      "enum": ["closed","draining","production","queueing"]
-    },
-    "Path": {
-      "type": "string",
-      "description": "A default namespace where files are logically placed when they are stored in this Share"
-    },
-    "AccessMode": {
-      "type": "array",
-      "description": "The type of access allowed for this share - AccessMode_t (undefined)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "SharingID": {
-      "type": "string",
-      "description": "A local identifier common to the set of StorageShares which use the same underling extents"
-    },
-    "AccessLatency": {
-      "type": "string",
-      "description": "The maximum latency category under normal operating conditions",
-      "enum": ["nearline","offline","online"]
-    },
-    "RetentionPolicy": {
-      "type": "string",
-      "description": "The quality of data retention - RetentionPolicy_t"
-    },
-    "ExpirationMode": {
-      "type": "array",
-      "description": "Supported file lifetime modes",
-      "items": {
-        "type": "string",
-        "enum": ["neverexpire","releasewhenexpired","warnwhenexpired"]
-      }
-    },
-    "DefaultLifeTime": {
-      "type": "integer",
-      "description": "The default lifetime assigned to a new file"
-    },
-    "MaximumLifeTime": {
-      "type": "integer",
-      "description": "The maximum lifetime that can be requested for a file"
-    },
-    "Tag": {
-      "type": "string",
-      "description": "An identifier defined by a UserDomain"
-    },
-    "StorageShareCapacityID": {
-      "type": "array",
-      "description": "ID of the StorageShareCapacities associated with this share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ServingState","SharingID","AccessLatency"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
deleted file mode 100644
index f392c94..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/StorageShareCapacity.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of storage capacity - StorageCapacity_t"
-    },
-    "TotalSize": {
-      "type": "integer",
-      "description": "The total amount of storage (GB)"
-    },
-    "FreeSize": {
-      "type": "integer",
-      "description": "The amount of available storage (GB)"
-    },
-    "UsedSize": {
-      "type": "integer",
-      "description": "The amount of used storage (GB)"
-    },
-    "ReservedSize": {
-      "type": "integer",
-      "description": "The amount storage which is not occupied, but has been reserved for use (GB)"
-    },
-    "StorageShareID": {
-      "type": "string",
-      "description": "The ID of the StorageShare related to this capacity"
-    }
-  },
-  "required": ["Type","StorageShareID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
deleted file mode 100644
index 6d81b80..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToComputingService.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "NetworkInfo": {
-      "type": "string",
-      "description": "Type of network connections between the Storage and Computing services (NetworkInfo_t)"
-    },
-    "Bandwidth": {
-      "type": "integer",
-      "description": "The normal bandwidth available between the Storage and Computing services (Mb/s)"
-    },
-    "StorageAccessProtocolID": {
-      "type": "array",
-      "description": "IDs of the protocols that can be used to access the StorageService",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ComputingServiceID": {
-      "type": "string",
-      "description": "The ID of the ComputingService"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService"
-    }
-  },
-  "required": ["ComputingServiceID","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
deleted file mode 100644
index 644f3d1..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/ToStorageService.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "LocalPath": {
-      "type": "string",
-      "description": "The path within the ComputingService that is used to access the StorageService"
-    },
-    "RemotePath": {
-      "type": "string",
-      "description": "The path in the StorageService which is associated with the LocalPath"
-    },
-    "ComputingServiceID": {
-      "type": "string",
-      "description": "The ID of the ComputingService"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService"
-    }
-  },
-  "required": ["LocalPath","RemotePath","ComputingServiceID","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
deleted file mode 100644
index 7acda31..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/schema/UserDomain.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
-  "properties": {
-    "Level": {
-      "type": "integer",
-      "description": "the number of hops to reach the root of the hierarchy of UserDomains"
-    },
-    "UserManagerID": {
-      "type": "array",
-      "description": "ID for the Endpoint of a Service managing users in this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Member": {
-      "type": "array",
-      "description": "Identifiers for users in this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "PolicyID": {
-      "type": "array",
-      "description": "IDs for Policies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ChildDomainID": {
-      "type": "array",
-      "description": "IDs of UserDomains aggregated by this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ParentDomainID": {
-      "type": "string",
-      "description": "The ID of the UserDomain that this UserDomain participates in"
-    },
-    "AccessPolicyID": {
-      "type": "array",
-      "description": "IDs of AccessPolicies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "MappingPolicyID": {
-      "type": "array",
-      "description": "IDs of MappingPolicies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
deleted file mode 100644
index 391bfea..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/resources/service.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-#
-# 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.
-#
-#
-
-
-#
-# Class which implemented Scheduler interface. It will be used to determine a Provider
-#
-scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# SSH private key location. It will be used by SSHProvider
-#
-# ssh.key=/home/user/.ssh/id_rsa
-# ssh.keypass=
-# ssh.username=usernameAtHost
-
-#
-# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
-#
-# myproxy.server=myproxy.teragrid.org
-# myproxy.user=username
-# myproxy.pass=password
-# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
deleted file mode 100644
index daa2e91..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/AMQPMonitorTest.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * 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.job;
-
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
-import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
-import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-public class AMQPMonitorTest {
-
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private MonitorPublisher monitorPublisher;
-    private BlockingQueue<MonitorID> finishQueue;
-    private BlockingQueue<MonitorID> pushQueue;
-    private Thread pushThread;
-    private String proxyFilePath;
-    private ComputeResourceDescription computeResourceDescription;
-    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitorTest.class);
-
-    @Before
-    public void setUp() throws Exception {
-        System.setProperty("myproxy.username", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        System.setProperty("gsi.working.directory", "/home1/01437/ogce");
-        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
-        System.setProperty("proxy.file.path", "/Users/lahirugunathilake/Downloads/x509up_u503876");
-        myProxyUserName = System.getProperty("myproxy.username");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        certificateLocation = System.getProperty("trusted.cert.location");
-        proxyFilePath = System.getProperty("proxy.file.path");
-        System.setProperty("connection.name", "xsede");
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorPublisher =  new MonitorPublisher(new EventBus());
-        pushQueue = new LinkedBlockingQueue<MonitorID>();
-        finishQueue = new LinkedBlockingQueue<MonitorID>();
-
-
-        final AMQPMonitor amqpMonitor = new
-                AMQPMonitor(monitorPublisher,
-                pushQueue, finishQueue,proxyFilePath,"xsede",
-                Arrays.asList("info1.dyn.teragrid.org,info2.dyn.teragrid.org".split(",")));
-        try {
-            (new Thread(){
-                public void run(){
-                    amqpMonitor.run();
-                }
-            }).start();
-        } catch (Exception e) {
-           logger.error(e.getMessage(), e);
-        }
-        computeResourceDescription = new ComputeResourceDescription("TestComputerResoruceId", "TestHostName");
-        computeResourceDescription.setHostName("stampede-host");
-        computeResourceDescription.addToIpAddresses("login1.stampede.tacc.utexas.edu");
-        ResourceJobManager resourceJobManager = new ResourceJobManager("1234", ResourceJobManagerType.SLURM);
-        Map<JobManagerCommand, String> commandMap = new HashMap<JobManagerCommand, String>();
-        commandMap.put(JobManagerCommand.SUBMISSION, "test");
-        resourceJobManager.setJobManagerCommands(commandMap);
-        resourceJobManager.setJobManagerBinPath("/usr/bin/");
-        resourceJobManager.setPushMonitoringEndpoint("push"); // TODO - add monitor mode
-        SSHJobSubmission sshJobSubmission = new SSHJobSubmission("TestSSHJobSubmissionInterfaceId", SecurityProtocol.GSI,
-                resourceJobManager);
-
-        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-        String jobSubmissionID = appCatalog.getComputeResource().addSSHJobSubmission(sshJobSubmission);
-
-        JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface(jobSubmissionID, JobSubmissionProtocol.SSH, 1);
-
-        computeResourceDescription.addToJobSubmissionInterfaces(jobSubmissionInterface);
-        computeResourceDescription.addToDataMovementInterfaces(new DataMovementInterface("4532", DataMovementProtocol.SCP, 1));
-
-    }
-
-    @Test
-    public void testAMQPMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", "login1.stampede.tacc.utexas.edu",2222);
-
-
-        Cluster pbsCluster = new
-                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gsi.ssh.util.CommonUtils.getPBSJobManager("/usr/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        String jobName = "GSI_SSH_SLEEP_JOB";
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName(jobName);
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("TG-STA110014S");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-        System.out.println(jobID);
-        try {
-            pushQueue.add(new MonitorID(computeResourceDescription, jobID,null,null,null, "ogce", jobName));
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        try {
-            pushThread.join();
-        } catch (InterruptedException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        class InnerClassAMQP{
-            @Subscribe
-            private void getStatus(JobStatusChangeEvent status){
-                Assert.assertNotNull(status);
-                pushThread.interrupt();
-            }
-        }
-        monitorPublisher.registerListener(new InnerClassAMQP());
-//        try {
-//            pushThread.join(5000);
-//            Iterator<MonitorID> iterator = pushQueue.iterator();
-//            MonitorID next = iterator.next();
-//            org.junit.Assert.assertNotNull(next.getStatus());
-//        } catch (Exception e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
deleted file mode 100644
index 610934e..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
+++ /dev/null
@@ -1,172 +0,0 @@
-///*
-// *
-// * 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.job;
-//
-//import java.io.File;
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.concurrent.BlockingQueue;
-//import java.util.concurrent.LinkedBlockingQueue;
-//
-//import org.apache.airavata.common.utils.MonitorPublisher;
-//import org.apache.airavata.commons.gfac.type.HostDescription;
-//import org.apache.airavata.gfac.core.monitor.MonitorID;
-//import org.apache.airavata.gfac.monitor.HPCMonitorID;
-//import org.apache.airavata.gfac.monitor.UserMonitorData;
-//import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
-//import org.apache.airavata.gsi.ssh.api.Cluster;
-//import org.apache.airavata.gsi.ssh.api.SSHApiException;
-//import org.apache.airavata.gsi.ssh.api.ServerInfo;
-//import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-//import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-//import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-//import org.apache.airavata.gsi.ssh.util.CommonUtils;
-//import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
-//import org.apache.airavata.schemas.gfac.GsisshHostType;
-//import org.junit.Assert;
-//import org.testng.annotations.Test;
-//
-//import com.google.common.eventbus.EventBus;
-//import com.google.common.eventbus.Subscribe;
-//
-//public class QstatMonitorTestWithMyProxyAuth {
-//    private String myProxyUserName;
-//    private String myProxyPassword;
-//    private String certificateLocation;
-//    private String pbsFilePath;
-//    private String workingDirectory;
-//    private HostDescription hostDescription;
-//    private MonitorPublisher monitorPublisher;
-//    private BlockingQueue<UserMonitorData> pullQueue;
-//    private Thread monitorThread;
-//
-//    @org.testng.annotations.BeforeClass
-//    public void setUp() throws Exception {
-////        System.setProperty("myproxy.username", "ogce");
-////        System.setProperty("myproxy.password", "");
-////        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-////        System.setProperty("gsi.working.directory", "/home/ogce");
-////        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
-//        myProxyUserName = System.getProperty("myproxy.username");
-//        myProxyPassword = System.getProperty("myproxy.password");
-//        workingDirectory = System.getProperty("gsi.working.directory");
-//        certificateLocation = System.getProperty("trusted.cert.location");
-//        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-//            throw new Exception("Need my proxy user name password to run tests.");
-//        }
-//
-//        monitorPublisher =  new MonitorPublisher(new EventBus());
-//        class InnerClassQstat {
-//
-//            @Subscribe
-//            private void getStatus(JobStatusChangeEvent status) {
-//                Assert.assertNotNull(status);
-//                System.out.println(status.getState().toString());
-//                monitorThread.interrupt();
-//            }
-//        }
-//        monitorPublisher.registerListener(this);
-//        pullQueue = new LinkedBlockingQueue<UserMonitorData>();
-//        final HPCPullMonitor qstatMonitor = new
-//                HPCPullMonitor(pullQueue, monitorPublisher);
-//        try {
-//            (new Thread(){
-//                public void run(){
-//                    qstatMonitor.run();
-//                }
-//            }).start();
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
-//
-//        hostDescription = new HostDescription(GsisshHostType.type);
-//        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
-//        hostDescription.getType().setHostName("gsissh-gordon");
-//        ((GsisshHostType) hostDescription.getType()).setPort(22);
-//        ((GsisshHostType)hostDescription.getType()).setInstalledPath("/opt/torque/bin/");
-//    }
-//
-//    @Test
-//    public void testQstatMonitor() throws SSHApiException {
-//        /* now have to submit a job to some machine and add that job to the queue */
-//        //Create authentication
-//        GSIAuthenticationInfo authenticationInfo
-//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-//                7512, 17280000, certificateLocation);
-//
-//        // Server info
-//        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
-//
-//
-//        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-//
-//
-//        // Execute command
-//        System.out.println("Target PBS file path: " + workingDirectory);
-//        // constructing the job object
-//        JobDescriptor jobDescriptor = new JobDescriptor();
-//        jobDescriptor.setWorkingDirectory(workingDirectory);
-//        jobDescriptor.setShellName("/bin/bash");
-//        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-//        jobDescriptor.setExecutablePath("/bin/echo");
-//        jobDescriptor.setAllEnvExport(true);
-//        jobDescriptor.setMailOptions("n");
-//        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-//        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-//        jobDescriptor.setNodes(1);
-//        jobDescriptor.setProcessesPerNode(1);
-//        jobDescriptor.setQueueName("normal");
-//        jobDescriptor.setMaxWallTime("60");
-//        jobDescriptor.setAcountString("sds128");
-//        List<String> inputs = new ArrayList<String>();
-//        jobDescriptor.setOwner("ogce");
-//        inputs.add("Hello World");
-//        jobDescriptor.setInputValues(inputs);
-//        //finished construction of job object
-//        System.out.println(jobDescriptor.toXML());
-//        for (int i = 0; i < 1; i++) {
-//            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-//            System.out.println("Job submitted successfully, Job ID: " +  jobID);
-//            MonitorID monitorID = new HPCMonitorID(hostDescription, jobID,null,null,null, "ogce","");
-//            ((HPCMonitorID)monitorID).setAuthenticationInfo(authenticationInfo);
-//            try {
-//                org.apache.airavata.gfac.monitor.util.CommonUtils.addMonitortoQueue(pullQueue, monitorID, jobExecutionContext);
-//            } catch (Exception e) {
-//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//            }
-//        }
-//        try {
-//
-//            monitorThread.join();
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
-//    }
-//
-//    @Subscribe
-//    public void testCaseShutDown(JobStatusChangeEvent status) {
-//        Assert.assertNotNull(status.getState());
-//        monitorThread.stop();
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
deleted file mode 100644
index e749e9c..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/PBSTemplate.xslt
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--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. -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
-<xsl:output method="text" />
-<xsl:template match="/ns:JobDescriptor">
-#! /bin/sh
-# PBS batch job script built by Globus job manager
-#   <xsl:choose>
-    <xsl:when test="ns:shellName">
-##PBS -S <xsl:value-of select="ns:shellName"/>
-    </xsl:when></xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:queueName">
-#PBS -q <xsl:value-of select="ns:queueName"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:mailOptions">
-#PBS -m <xsl:value-of select="ns:mailOptions"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-<xsl:when test="ns:acountString">
-#PBS -A <xsl:value-of select="ns:acountString"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:maxWallTime">
-#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -o <xsl:value-of select="ns:standardOutFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="ns:standardOutFile">
-#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
-    </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
-#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/>
-<xsl:text>&#xa;</xsl:text>
-    </xsl:when>
-    </xsl:choose>
-<xsl:for-each select="ns:exports/ns:name">
-<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
-export<xsl:text>   </xsl:text><xsl:value-of select="."/>
-<xsl:text>&#xa;</xsl:text>
-</xsl:for-each>
-<xsl:for-each select="ns:preJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
-    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
-<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
-<xsl:for-each select="ns:inputs/ns:input">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-    </xsl:for-each>
-<xsl:for-each select="ns:postJobCommands/ns:command">
-      <xsl:value-of select="."/><xsl:text>   </xsl:text>
-</xsl:for-each>
-
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
deleted file mode 100644
index c6b849b..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/echo.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-::
-::
-:: 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.
-::
-::
-@echo off
-echo %1^=%2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
deleted file mode 100644
index 0584d38..0000000
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/test/resources/logging.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-#
-#default/fallback log4j configuration
-#
-
-# Set root logger level to WARN and its only appender to A1.
-log4j.rootLogger=INFO, A1, A2
-
-# A1 is set to be a rolling file appender with default params
-log4j.appender.A1=org.apache.log4j.RollingFileAppender
-log4j.appender.A1.File=target/seclogs.txt
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
-
-# A2 is a console appender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
-
-log4j.logger.unicore.security=INFO
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/pom.xml b/modules/gfac/gfac-monitor/pom.xml
deleted file mode 100644
index b5b1869..0000000
--- a/modules/gfac/gfac-monitor/pom.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>gfac</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-gfac-monitor</artifactId>
-    <packaging>pom</packaging>
-    <name>Airavata GFac Monitor</name>
-    <url>http://airavata.apache.org/</url>
-    <modules>
-        <module>gfac-hpc-monitor</module>
-        <module>gfac-email-monitor</module>
-    </modules>
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/pom.xml b/modules/gfac/gfac-service/pom.xml
new file mode 100644
index 0000000..224537f
--- /dev/null
+++ b/modules/gfac/gfac-service/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>gfac</artifactId>
+        <groupId>org.apache.airavata</groupId>
+        <version>0.16-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <name>Airavata Gfac Service</name>
+    <artifactId>airavata-gfac-service</artifactId>
+    <packaging>jar</packaging>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${org.slf4j.version}</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.airavata</groupId>-->
+            <!--<artifactId>airavata-client-api</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+	    <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-model-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-api-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+         <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+	    <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+            <version>${curator.version}</version>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    </properties>
+    
+</project>


[20/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
new file mode 100644
index 0000000..e53fe09
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
@@ -0,0 +1,280 @@
+/*
+ *
+ * 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.monitor.util;
+
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.HostMonitorData;
+import org.apache.airavata.gfac.monitor.UserMonitorData;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooDefs;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+
+public class CommonUtils {
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(CommonUtils.class);
+
+    public static String getChannelID(MonitorID monitorID) {
+        return monitorID.getUserName() + "-" + monitorID.getComputeResourceDescription().getHostName();
+    }
+
+    public static String getRoutingKey(MonitorID monitorID) {
+        return "*." + monitorID.getUserName() + "." + monitorID.getComputeResourceDescription().getIpAddresses().get(0);
+    }
+
+    public static String getChannelID(String userName,String hostAddress) {
+        return userName + "-" + hostAddress;
+    }
+
+    public static String getRoutingKey(String userName,String hostAddress) {
+        return "*." + userName + "." + hostAddress;
+    }
+
+    public static void addMonitortoQueue(BlockingQueue<UserMonitorData> queue, MonitorID monitorID, JobExecutionContext jobExecutionContext) throws AiravataMonitorException {
+        synchronized (queue) {
+            Iterator<UserMonitorData> iterator = queue.iterator();
+            while (iterator.hasNext()) {
+                UserMonitorData next = iterator.next();
+                if (next.getUserName().equals(monitorID.getUserName())) {
+                    // then this is the right place to update
+                    List<HostMonitorData> monitorIDs = next.getHostMonitorData();
+                    for (HostMonitorData host : monitorIDs) {
+                        if (isEqual(host.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
+                            // ok we found right place to add this monitorID
+                            host.addMonitorIDForHost(monitorID);
+                            logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
+                                    " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+                            return;
+                        }
+                    }
+                    // there is a userMonitor object for this user name but no Hosts for this host
+                    // so we have to create new Hosts
+                    HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
+                    hostMonitorData.addMonitorIDForHost(monitorID);
+                    next.addHostMonitorData(hostMonitorData);
+                    logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
+                            " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+                    return;
+                }
+            }
+            HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
+            hostMonitorData.addMonitorIDForHost(monitorID);
+
+            UserMonitorData userMonitorData = new UserMonitorData(monitorID.getUserName());
+            userMonitorData.addHostMonitorData(hostMonitorData);
+            try {
+                queue.put(userMonitorData);
+                logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
+                        " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+            } catch (InterruptedException e) {
+                throw new AiravataMonitorException(e);
+            }
+        }
+    }
+
+    private static boolean isEqual(ComputeResourceDescription comRes_1, ComputeResourceDescription comRes_2) {
+        return comRes_1.getComputeResourceId().equals(comRes_2.getComputeResourceId()) &&
+                comRes_1.getHostName().equals(comRes_2.getHostName());
+    }
+
+    public static boolean isTheLastJobInQueue(BlockingQueue<MonitorID> queue,MonitorID monitorID){
+        Iterator<MonitorID> iterator = queue.iterator();
+        while(iterator.hasNext()){
+            MonitorID next = iterator.next();
+            if (monitorID.getUserName().equals(next.getUserName()) &&
+                    CommonUtils.isEqual(monitorID.getComputeResourceDescription(), next.getComputeResourceDescription())) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * This method doesn't have to be synchronized because it will be invoked by HPCPullMonitor which already synchronized
+     * @param monitorID
+     * @throws AiravataMonitorException
+     */
+    public static void removeMonitorFromQueue(UserMonitorData userMonitorData, MonitorID monitorID) throws AiravataMonitorException {
+                if (userMonitorData.getUserName().equals(monitorID.getUserName())) {
+                    // then this is the right place to update
+                    List<HostMonitorData> hostMonitorData = userMonitorData.getHostMonitorData();
+                    Iterator<HostMonitorData> iterator1 = hostMonitorData.iterator();
+                    while (iterator1.hasNext()) {
+                        HostMonitorData iHostMonitorID = iterator1.next();
+                        if (isEqual(iHostMonitorID.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
+                            Iterator<MonitorID> iterator2 = iHostMonitorID.getMonitorIDs().iterator();
+                            while (iterator2.hasNext()) {
+                                MonitorID iMonitorID = iterator2.next();
+                                if (iMonitorID.getJobID().equals(monitorID.getJobID())
+                                        || iMonitorID.getJobName().equals(monitorID.getJobName())) {
+                                    // OK we found the object, we cannot do list.remove(object) states of two objects
+                                    // could be different, thats why we check the jobID
+                                    iterator2.remove();
+                                    logger.infoId(monitorID.getJobID(), "Removed the jobId: {} JobName: {} from monitoring last " +
+                                            "status:{}", monitorID.getJobID(),monitorID.getJobName(), monitorID.getStatus().toString());
+
+                                    return;
+                                }
+                            }
+                        }
+                    }
+                }
+        logger.info("Cannot find the given MonitorID in the queue with userName " +
+                monitorID.getUserName() + "  and jobID " + monitorID.getJobID());
+        logger.info("This might not be an error because someone else removed this job from the queue");
+    }
+
+
+    public static void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
+
+        for (GFacHandlerConfig handlerClassName : handlers) {
+            Class<? extends GFacHandler> handlerClass;
+            GFacHandler handler;
+            try {
+                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+                handler = handlerClass.newInstance();
+                handler.initProperties(handlerClassName.getProperties());
+            } catch (ClassNotFoundException e) {
+                logger.error(e.getMessage());
+                throw new GFacException("Cannot load handler class " + handlerClassName, e);
+            } catch (InstantiationException e) {
+                logger.error(e.getMessage());
+                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+            } catch (IllegalAccessException e) {
+                logger.error(e.getMessage());
+                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+            }
+            try {
+                handler.invoke(jobExecutionContext);
+            } catch (Exception e) {
+                // TODO: Better error reporting.
+                throw new GFacException("Error Executing a OutFlow Handler", e);
+            }
+        }
+    }
+
+        /**
+         *  Update job count for a given set of paths.
+         * @param curatorClient - CuratorFramework instance
+         * @param changeCountMap - map of change job count with relevant path
+         * @param isAdd - Should add or reduce existing job count by the given job count.
+         */
+    public static void updateZkWithJobCount(CuratorFramework curatorClient, final Map<String, Integer> changeCountMap, boolean isAdd) {
+        StringBuilder changeZNodePaths = new StringBuilder();
+        try {
+            for (String path : changeCountMap.keySet()) {
+                if (isAdd) {
+                    CommonUtils.checkAndCreateZNode(curatorClient, path);
+                }
+                byte[] byteData = curatorClient.getData().forPath(path);
+                String nodeData;
+                if (byteData == null) {
+                    if (isAdd) {
+                        curatorClient.setData().withVersion(-1).forPath(path, String.valueOf(changeCountMap.get(path)).getBytes());
+                    } else {
+                        // This is not possible, but we handle in case there any data zookeeper communication failure
+                        logger.warn("Couldn't reduce job count in " + path + " as it returns null data. Hence reset the job count to 0");
+                        curatorClient.setData().withVersion(-1).forPath(path, "0".getBytes());
+                    }
+                } else {
+                    nodeData = new String(byteData);
+                    if (isAdd) {
+                        curatorClient.setData().withVersion(-1).forPath(path,
+                                String.valueOf(changeCountMap.get(path) + Integer.parseInt(nodeData)).getBytes());
+                    } else {
+                        int previousCount = Integer.parseInt(nodeData);
+                        int removeCount = changeCountMap.get(path);
+                        if (previousCount >= removeCount) {
+                            curatorClient.setData().withVersion(-1).forPath(path,
+                                    String.valueOf(previousCount - removeCount).getBytes());
+                        } else {
+                            // This is not possible, do we need to reset the job count to 0 ?
+                            logger.error("Requested remove job count is " + removeCount +
+                                    " which is higher than the existing job count " + previousCount
+                                    + " in  " + path + " path.");
+                        }
+                    }
+                }
+                changeZNodePaths.append(path).append(":");
+            }
+
+            // update stat node to trigger orchestrator watchers
+            if (changeCountMap.size() > 0) {
+                changeZNodePaths.deleteCharAt(changeZNodePaths.length() - 1);
+                curatorClient.setData().withVersion(-1).forPath("/" + Constants.STAT, changeZNodePaths.toString().getBytes());
+            }
+        } catch (Exception e) {
+            logger.error("Error while writing job count to zookeeper", e);
+        }
+
+    }
+
+    /**
+     * Increase job count by one and update the zookeeper
+     * @param monitorID - Job monitorId
+     */
+    public static void increaseZkJobCount(MonitorID monitorID) {
+        Map<String, Integer> addMap = new HashMap<String, Integer>();
+        addMap.put(CommonUtils.getJobCountUpdatePath(monitorID), 1);
+        updateZkWithJobCount(monitorID.getJobExecutionContext().getCuratorClient(), addMap, true);
+    }
+
+    /**
+     * Construct and return the path for a given MonitorID , eg: /stat/{username}/{resourceName}/job
+     * @param monitorID - Job monitorId
+     * @return
+     */
+    public static String getJobCountUpdatePath(MonitorID monitorID){
+        return new StringBuilder("/").append(Constants.STAT).append("/").append(monitorID.getUserName())
+                .append("/").append(monitorID.getComputeResourceDescription().getHostName()).append("/").append(Constants.JOB).toString();
+    }
+
+    /**
+     * Check whether znode is exist in given path if not create a new znode
+     * @param curatorClient - zookeeper instance
+     * @param path - path to check znode
+     * @throws KeeperException
+     * @throws InterruptedException
+     */
+    private static void checkAndCreateZNode(CuratorFramework curatorClient , String path) throws Exception {
+        if (curatorClient.checkExists().forPath(path) == null) { // if znode doesn't exist
+            if (path.lastIndexOf("/") > 1) {  // recursively traverse to parent znode and check parent exist
+                checkAndCreateZNode(curatorClient, (path.substring(0, path.lastIndexOf("/"))));
+            }
+            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(path);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
new file mode 100644
index 0000000..08c3f67
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
@@ -0,0 +1,164 @@
+/*
+ *
+ * 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.monitor.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+
+
+import java.io.*;
+import java.security.*;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.CertificateParsingException;
+import java.security.cert.X509Certificate;
+import java.security.spec.InvalidKeySpecException;
+
+public class X509Helper {
+
+    static {
+        // parsing of RSA key fails without this
+        java.security.Security.addProvider(new BouncyCastleProvider());
+    }
+
+
+
+    public static KeyStore keyStoreFromPEM(String proxyFile,
+                                           String keyPassPhrase) throws IOException,
+            CertificateException,
+            NoSuchAlgorithmException,
+            InvalidKeySpecException,
+            KeyStoreException {
+        return keyStoreFromPEM(proxyFile,proxyFile,keyPassPhrase);
+    }
+
+    public static KeyStore keyStoreFromPEM(String certFile,
+                                           String keyFile,
+                                           String keyPassPhrase) throws IOException,
+                                                                        CertificateException,
+                                                                        NoSuchAlgorithmException,
+                                                                        InvalidKeySpecException,
+                                                                        KeyStoreException {
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        X509Certificate cert = (X509Certificate)cf.generateCertificate(new FileInputStream(certFile));
+        //System.out.println(cert.toString());
+
+        // this works for proxy files, too, since it skips over the certificate
+        BufferedReader reader = new BufferedReader(new FileReader(keyFile));
+        String line = null;
+        StringBuilder builder = new StringBuilder();
+        boolean inKey = false;
+        while((line=reader.readLine()) != null) {
+            if (line.contains("-----BEGIN RSA PRIVATE KEY-----")) {
+                inKey = true;
+            }
+            if (inKey) {
+                builder.append(line);
+                builder.append(System.getProperty("line.separator"));
+            }
+            if (line.contains("-----END RSA PRIVATE KEY-----")) {
+                inKey = false;
+            }
+        }
+        String privKeyPEM = builder.toString();
+        //System.out.println(privKeyPEM);
+
+        // using BouncyCastle
+//        PEMReader pemParser = new PEMReader(new StringReader(privKeyPEM));
+//        Object object = pemParser.readObject();
+//
+//        PrivateKey privKey = null;
+//        if(object instanceof KeyPair){
+//            privKey = ((KeyPair)object).getPrivate();
+//        }
+        // PEMParser from BouncyCastle is good for reading PEM files, but I didn't want to add that dependency
+        /*
+        // Base64 decode the data
+        byte[] encoded = javax.xml.bind.DatatypeConverter.parseBase64Binary(privKeyPEM);
+
+        // PKCS8 decode the encoded RSA private key
+        java.security.spec.PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encoded);
+        KeyFactory kf = KeyFactory.getInstance("RSA");
+        PrivateKey privKey = kf.generatePrivate(keySpec);
+        //RSAPrivateKey privKey = (RSAPrivateKey)kf.generatePrivate(keySpec);
+        */
+        //System.out.println(privKey.toString());
+
+//        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+//        keyStore.load(null,null);
+//
+//        KeyStore.PrivateKeyEntry entry =
+//            new KeyStore.PrivateKeyEntry(privKey,
+//                                         new java.security.cert.Certificate[] {(java.security.cert.Certificate)cert});
+//        KeyStore.PasswordProtection prot = new KeyStore.PasswordProtection(keyPassPhrase.toCharArray());
+//        keyStore.setEntry(cert.getSubjectX500Principal().getName(), entry, prot);
+
+//        return keyStore;
+        //TODO: Problem with BouncyCastle version used in gsissh 
+        throw new CertificateException("Method not implemented");
+
+    }
+
+
+    public static KeyStore trustKeyStoreFromCertDir() throws IOException,
+                                                             KeyStoreException,
+                                                             CertificateException,
+                                                             NoSuchAlgorithmException, ApplicationSettingsException {
+        return trustKeyStoreFromCertDir(ServerSettings.getSetting("trusted.cert.location"));
+    }
+
+    public static KeyStore trustKeyStoreFromCertDir(String certDir) throws IOException,
+                                                                           KeyStoreException,
+                                                                           CertificateException,
+                                                                           NoSuchAlgorithmException {
+        KeyStore ks = KeyStore.getInstance("JKS");
+        ks.load(null,null);
+
+        File dir = new File(certDir);
+        for(File file : dir.listFiles()) {
+            if (!file.isFile()) {
+                continue;
+            }
+            if (!file.getName().endsWith(".0")) {
+                continue;
+            }
+
+            try {
+                //System.out.println("reading file "+file.getName());
+                CertificateFactory cf = CertificateFactory.getInstance("X.509");
+                X509Certificate cert = (X509Certificate) cf.generateCertificate(new FileInputStream(file));
+                //System.out.println(cert.toString());
+
+                KeyStore.TrustedCertificateEntry entry = new KeyStore.TrustedCertificateEntry(cert);
+
+                ks.setEntry(cert.getSubjectX500Principal().getName(), entry, null);
+            } catch (KeyStoreException e) {
+            } catch (CertificateParsingException e) {
+                continue;
+            }
+
+        }
+
+        return ks;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
new file mode 100644
index 0000000..74642dc
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/context/SSHAuthWrapper.java
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.ssh.context;
+
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+
+public class SSHAuthWrapper {
+    private ServerInfo serverInfo;
+
+    private AuthenticationInfo authenticationInfo;
+
+    private String key;
+
+    public SSHAuthWrapper(ServerInfo serverInfo, AuthenticationInfo authenticationInfo, String key) {
+        this.serverInfo = serverInfo;
+        this.authenticationInfo = authenticationInfo;
+        this.key = key;
+    }
+
+    public ServerInfo getServerInfo() {
+        return serverInfo;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public String getKey() {
+        return key;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
new file mode 100644
index 0000000..9481188
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -0,0 +1,229 @@
+/*
+ *
+ * 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.ssh.handler;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+/**
+ * This handler will copy input data from gateway machine to airavata
+ * installed machine, later running handlers can copy the input files to computing resource
+ * <Handler class="AdvancedSCPOutputHandler">
+ * <property name="privateKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa"/>
+ * <property name="publicKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa.pub"/>
+ * <property name="userName" value="airavata"/>
+ * <property name="hostName" value="gw98.iu.xsede.org"/>
+ * <property name="inputPath" value="/home/airavata/outputData"/>
+ */
+public class AdvancedSCPInputHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(AdvancedSCPInputHandler.class);
+    public static final String ADVANCED_SSH_AUTH = "advanced.ssh.auth";
+    public static final int DEFAULT_SSH_PORT = 22;
+
+    private String password = null;
+
+    private String publicKeyPath;
+
+    private String passPhrase;
+
+    private String privateKeyPath;
+
+    private String userName;
+
+    private String hostName;
+
+    private String inputPath;
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+        password = (String) properties.get("password");
+        passPhrase = (String) properties.get("passPhrase");
+        privateKeyPath = (String) properties.get("privateKeyPath");
+        publicKeyPath = (String) properties.get("publicKeyPath");
+        userName = (String) properties.get("userName");
+        hostName = (String) properties.get("hostName");
+        inputPath = (String) properties.get("inputPath");
+    }
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        super.invoke(jobExecutionContext);
+        int index = 0;
+        int oldIndex = 0;
+        List<String> oldFiles = new ArrayList<String>();
+        MessageContext inputNew = new MessageContext();
+        StringBuffer data = new StringBuffer("|");
+        Cluster pbsCluster = null;
+
+        try {
+            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
+            if (pluginData != null) {
+                try {
+                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
+                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
+                    if (oldIndex == oldFiles.size()) {
+                        log.info("Old data looks good !!!!");
+                    } else {
+                        oldIndex = 0;
+                        oldFiles.clear();
+                    }
+                } catch (NumberFormatException e) {
+                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
+                }
+            }
+
+            AuthenticationInfo authenticationInfo = null;
+            if (password != null) {
+                authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+            } else {
+                authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                        this.passPhrase);
+            }
+
+            // Server info
+            String parentPath = inputPath + File.separator + jobExecutionContext.getExperimentID() + File.separator + jobExecutionContext.getTaskData().getTaskID();
+            if (index < oldIndex) {
+                parentPath = oldFiles.get(index);
+                data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
+            } else {
+                (new File(parentPath)).mkdirs();
+                StringBuffer temp = new StringBuffer(data.append(parentPath).append(",").toString());
+                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+            }
+            DataTransferDetails detail = new DataTransferDetails();
+            TransferStatus status = new TransferStatus();
+            // here doesn't matter what the job manager is because we are only doing some file handling
+            // not really dealing with monitoring or job submission, so we pa
+
+            MessageContext input = jobExecutionContext.getInMessageContext();
+            Set<String> parameters = input.getParameters().keySet();
+            for (String paramName : parameters) {
+                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
+                String paramValue = inputParamType.getValue();
+                // TODO: Review this with type
+                if (inputParamType.getType() == DataType.URI) {
+                    try {
+                        URL file = new URL(paramValue);
+                        String key = file.getUserInfo() + file.getHost() + DEFAULT_SSH_PORT;
+                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, file.getUserInfo(), file.getHost(), DEFAULT_SSH_PORT);
+                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
+                        paramValue = file.getPath();
+                    } catch (MalformedURLException e) {
+                        String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
+                        GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
+                        pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
+                        log.error(e.getLocalizedMessage(), e);
+                    }
+
+                    if (index < oldIndex) {
+                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+                        inputParamType.setValue(oldFiles.get(index));
+                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
+                    } else {
+                        String stageInputFile = stageInputFiles(pbsCluster, paramValue, parentPath);
+                        inputParamType.setValue(stageInputFile);
+                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
+                        status.setTransferState(TransferState.UPLOAD);
+                        detail.setTransferStatus(status);
+                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                    }
+                }
+                // FIXME: what is the thrift model DataType equivalent for URIArray type?
+//                else if ("URIArray".equals(actualParameter.getType().getType().toString())) {
+//                    List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
+//                    List<String> newFiles = new ArrayList<String>();
+//                    for (String paramValueEach : split) {
+//                        try {
+//                            URL file = new URL(paramValue);
+//                            this.userName = file.getUserInfo();
+//                            this.hostName = file.getHost();
+//                            paramValueEach = file.getPath();
+//                        } catch (MalformedURLException e) {
+//                            log.error(e.getLocalizedMessage(), e);
+//                        }
+//                        if (index < oldIndex) {
+//                            log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+//                            newFiles.add(oldFiles.get(index));
+//                            data.append(oldFiles.get(index++)).append(",");
+//                        } else {
+//                            String stageInputFiles = stageInputFiles(pbsCluster, paramValueEach, parentPath);
+//                            StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
+//                            GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+//                            newFiles.add(stageInputFiles);
+//                        }
+//                    }
+//                    ((URIArrayType) actualParameter.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
+//                }
+                inputNew.getParameters().put(paramName, inputParamType);
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                log.error(e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+        }
+        jobExecutionContext.setInMessageContext(inputNew);
+    }
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        this.invoke(jobExecutionContext);
+    }
+
+    private String stageInputFiles(Cluster cluster, String paramValue, String parentPath) throws GFacException {
+        try {
+            cluster.scpFrom(paramValue, parentPath);
+            return "file://" + parentPath + File.separator + (new File(paramValue)).getName();
+        } catch (SSHApiException e) {
+            log.error("Error tranfering remote file to local file, remote path: " + paramValue);
+            throw new GFacException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
new file mode 100644
index 0000000..320f236
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -0,0 +1,225 @@
+/*
+ *
+ * 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.ssh.handler;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+/**
+ * This handler will copy outputs from airavata installed local directory
+ * to a remote location, prior to this handler SCPOutputHandler should be invoked
+ * Should add following configuration to gfac-config.xml and configure the keys properly
+ * <Handler class="AdvancedSCPOutputHandler">
+                            <property name="privateKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa"/>
+                            <property name="publicKeyPath" value="/Users/lahirugunathilake/.ssh/id_dsa.pub"/>
+                        <property name="userName" value="airavata"/>
+                        <property name="hostName" value="gw98.iu.xsede.org"/>
+                        <property name="outputPath" value="/home/airavata/outputData"/>
+                        <property name="passPhrase" value="/home/airavata/outputData"/>
+                        <property name="password" value="/home/airavata/outputData"/>
+
+ */
+public class AdvancedSCPOutputHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(AdvancedSCPOutputHandler.class);
+
+    public static final int DEFAULT_SSH_PORT = 22;
+
+    private String password = null;
+
+    private String publicKeyPath;
+
+    private String passPhrase;
+
+    private String privateKeyPath;
+
+    private String userName;
+
+    private String hostName;
+
+    private String outputPath;
+
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+        password = (String)properties.get("password");
+        passPhrase = (String)properties.get("passPhrase");
+        privateKeyPath = (String)properties.get("privateKeyPath");
+        publicKeyPath = (String)properties.get("publicKeyPath");
+        userName = (String)properties.get("userName");
+        hostName = (String)properties.get("hostName");
+        outputPath = (String)properties.get("outputPath");
+    }
+
+    @Override
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+    	Cluster pbsCluster = null;
+        AuthenticationInfo authenticationInfo = null;
+        if (password != null) {
+            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+        } else {
+            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+                    this.passPhrase);
+        }
+        try {
+            String hostName = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostName) == null) {
+                try {
+                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                } catch (ApplicationSettingsException e) {
+                    log.error(e.getMessage());
+                    try {
+                        StringWriter errors = new StringWriter();
+                        e.printStackTrace(new PrintWriter(errors));
+         				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+         			} catch (GFacException e1) {
+         				 log.error(e1.getLocalizedMessage());
+         			}
+                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                }
+            }
+            String standardError = jobExecutionContext.getStandardError();
+            String standardOutput = jobExecutionContext.getStandardOutput();
+            super.invoke(jobExecutionContext);
+            // Server info
+            if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir() != null){
+                try{
+                    URL outputPathURL = new URL(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().getOutputDataDir());
+                    this.userName = outputPathURL.getUserInfo();
+                    this.hostName = outputPathURL.getHost();
+                    outputPath = outputPathURL.getPath();
+                } catch (MalformedURLException e) {
+                    log.error(e.getLocalizedMessage(),e);
+                }
+            }
+            String key = GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
+            pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
+            if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && !jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().isPersistOutputData()){
+            outputPath = outputPath + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID()
+                    + File.separator;
+                pbsCluster.makeDirectory(outputPath);
+            }
+            pbsCluster.scpTo(outputPath, standardError);
+            pbsCluster.scpTo(outputPath, standardOutput);
+            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
+            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
+            Set<String> keys = output.keySet();
+            for (String paramName : keys) {
+                OutputDataObjectType outputDataObjectType = (OutputDataObjectType) output.get(paramName);
+                if (outputDataObjectType.getType() == DataType.URI) {
+                    // for failed jobs outputs are not generated. So we should not download outputs
+                    if (GFacUtils.isFailedJob(jobExecutionContext)){
+                        continue;
+                    }
+                	String downloadFile = outputDataObjectType.getValue();
+                    if(downloadFile == null || !(new File(downloadFile).isFile())){
+                        GFacUtils.saveErrorDetails(jobExecutionContext, "Empty Output returned from the application", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                		throw new GFacHandlerException("Empty Output returned from the application.." );
+                	}
+                	pbsCluster.scpTo(outputPath, downloadFile);
+                    String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar)+1, downloadFile.length());
+                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
+                    dataObjectType.setName(paramName);
+                    dataObjectType.setType(DataType.URI);
+                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
+                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
+                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
+                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
+                    outputArray.add(dataObjectType);
+                }else if (outputDataObjectType.getType() == DataType.STDOUT) {
+                    pbsCluster.scpTo(outputPath, standardOutput);
+                    String fileName = standardOutput.substring(standardOutput.lastIndexOf(File.separatorChar)+1, standardOutput.length());
+                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
+                    dataObjectType.setName(paramName);
+                    dataObjectType.setType(DataType.STDOUT);
+                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
+                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
+                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
+                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
+                    outputArray.add(dataObjectType);
+                }else if (outputDataObjectType.getType() == DataType.STDERR) {
+                    pbsCluster.scpTo(outputPath, standardError);
+                    String fileName = standardError.substring(standardError.lastIndexOf(File.separatorChar)+1, standardError.length());
+                    OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                    dataObjectType.setValue(outputPath + File.separatorChar + fileName);
+                    dataObjectType.setName(paramName);
+                    dataObjectType.setType(DataType.STDERR);
+                    dataObjectType.setIsRequired(outputDataObjectType.isIsRequired());
+                    dataObjectType.setRequiredToAddedToCommandLine(outputDataObjectType.isRequiredToAddedToCommandLine());
+                    dataObjectType.setApplicationArgument(outputDataObjectType.getApplicationArgument());
+                    dataObjectType.setSearchQuery(outputDataObjectType.getSearchQuery());
+                    outputArray.add(dataObjectType);
+                }
+             }
+           registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+        } catch (SSHApiException e) {
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+			} catch (GFacException e1) {
+				 log.error(e1.getLocalizedMessage());
+			}
+            log.error("Error transfering files to remote host : " + hostName + " with the user: " + userName);
+            log.error(e.getMessage());
+            throw new GFacHandlerException(e);
+        } catch (Exception e) {
+        	 try {
+ 				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+ 			} catch (GFacException e1) {
+ 				 log.error(e1.getLocalizedMessage());
+ 			}
+        	throw new GFacHandlerException(e);
+        }
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
new file mode 100644
index 0000000..61a1805
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
@@ -0,0 +1,78 @@
+package org.apache.airavata.gfac.ssh.handler;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.util.HandleOutputs;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NewSSHOutputHandler extends AbstractHandler{
+
+	 private static final Logger log = LoggerFactory.getLogger(NewSSHOutputHandler.class);
+
+	    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+	        String hostAddress = jobExecutionContext.getHostName();
+	      	Cluster cluster = null;
+	      	// Security Context and connection
+	        try {
+	            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+	                GFACSSHUtils.addSecurityContext(jobExecutionContext);
+	            }
+	            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+	            if (cluster == null) {
+	                throw new GFacProviderException("Security context is not set properly");
+	            } else {
+	                log.info("Successfully retrieved the Security Context");
+	            }
+	        } catch (Exception e) {
+	            log.error(e.getMessage());
+	            try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+	                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+	            } catch (GFacException e1) {
+	                log.error(e1.getLocalizedMessage());
+	            }
+	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+	        }
+
+	        super.invoke(jobExecutionContext);
+	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
+	        try {
+				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+			} catch (RegistryException e) {
+				throw new GFacHandlerException(e);
+			}
+
+	       
+	    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    @Override
+	public void initProperties(Properties properties) throws GFacHandlerException {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
new file mode 100644
index 0000000..fb86dd3
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.ssh.handler;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Properties;
+
+public class SSHDirectorySetupHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(SSHDirectorySetupHandler.class);
+
+	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACSSHUtils.addSecurityContext(jobExecutionContext);
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+ 				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+ 			} catch (GFacException e1) {
+ 				 log.error(e1.getLocalizedMessage());
+ 			}
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        } 
+
+        log.info("Setup SSH job directorties");
+        super.invoke(jobExecutionContext);
+        makeDirectory(jobExecutionContext);
+
+	}
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    private void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+		Cluster cluster = null;
+		try{
+            String hostAddress = jobExecutionContext.getHostName();
+            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+        if (cluster == null) {
+            throw new GFacHandlerException("Security context is not set properly");
+        } else {
+            log.info("Successfully retrieved the Security Context");
+        }
+            String workingDirectory = jobExecutionContext.getWorkingDir();
+            cluster.makeDirectory(workingDirectory);
+            if(!jobExecutionContext.getInputDir().equals(workingDirectory))
+            	cluster.makeDirectory(jobExecutionContext.getInputDir());
+            if(!jobExecutionContext.getOutputDir().equals(workingDirectory))
+            	cluster.makeDirectory(jobExecutionContext.getOutputDir());
+            
+            DataTransferDetails detail = new DataTransferDetails();
+            TransferStatus status = new TransferStatus();
+            status.setTransferState(TransferState.DIRECTORY_SETUP);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("Working directory = " + workingDirectory);
+
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+        } catch (Exception e) {
+			DataTransferDetails detail = new DataTransferDetails();
+            TransferStatus status = new TransferStatus();
+            status.setTransferState(TransferState.FAILED);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("Working directory = " + jobExecutionContext.getWorkingDir());
+            try {
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+            } catch (Exception e1) {
+                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error executing the Handler: " + SSHDirectorySetupHandler.class, e);
+        }
+        
+	}
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
new file mode 100644
index 0000000..277ff0e
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
@@ -0,0 +1,198 @@
+/*
+ *
+ * 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.ssh.handler;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+public class SSHInputHandler extends AbstractHandler {
+
+    private static final Logger log = LoggerFactory.getLogger(SSHInputHandler.class);
+
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        DataTransferDetails detail = new DataTransferDetails();
+        detail.setTransferDescription("Input Data Staging");
+        TransferStatus status = new TransferStatus();
+        int index = 0;
+        int oldIndex = 0;
+        List<String> oldFiles = new ArrayList<String>();
+        StringBuffer data = new StringBuffer("|");
+        MessageContext inputNew = new MessageContext();
+        Cluster cluster = null;
+        
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                try {
+                    GFACSSHUtils.addSecurityContext(jobExecutionContext);
+                } catch (ApplicationSettingsException e) {
+                    log.error(e.getMessage());
+                    try {
+                        StringWriter errors = new StringWriter();
+                        e.printStackTrace(new PrintWriter(errors));
+         				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+         			} catch (GFacException e1) {
+         				 log.error(e1.getLocalizedMessage());
+         			}
+                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                }
+            }
+
+            cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                throw new GFacException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+            log.info("Invoking SCPInputHandler");
+            super.invoke(jobExecutionContext);
+
+
+            MessageContext input = jobExecutionContext.getInMessageContext();
+            Set<String> parameters = input.getParameters().keySet();
+            for (String paramName : parameters) {
+                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
+                String paramValue = inputParamType.getValue();
+                //TODO: Review this with type
+                if (inputParamType.getType() == DataType.URI) {
+                    if (index < oldIndex) {
+                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+                        inputParamType.setValue(oldFiles.get(index));
+                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
+                    } else {
+                        String stageInputFile = stageInputFiles(cluster, jobExecutionContext, paramValue);
+                        inputParamType.setValue(stageInputFile);
+                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
+                        status.setTransferState(TransferState.UPLOAD);
+                        detail.setTransferStatus(status);
+                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                    }
+                }// FIXME: what is the thrift model DataType equivalent for URIArray type?
+//                else if ("URIArray".equals(actualParameter.getType().getType().toString())) {
+//                	if (index < oldIndex) {
+//                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+//                        ((URIParameterType) actualParameter.getType()).setValue(oldFiles.get(index));
+//                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
+//                    }else{
+//                	List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
+//                    List<String> newFiles = new ArrayList<String>();
+//                    for (String paramValueEach : split) {
+//                        String stageInputFiles = stageInputFiles(cluster,jobExecutionContext, paramValueEach);
+//                        status.setTransferState(TransferState.UPLOAD);
+//                        detail.setTransferStatus(status);
+//                        detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
+//                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+//                        newFiles.add(stageInputFiles);
+//                        StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
+//                        GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+//                    }
+//                    ((URIArrayType) actualParameter.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
+//                    }
+//                }
+                inputNew.getParameters().put(paramName, inputParamType);
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            status.setTransferState(TransferState.FAILED);
+            detail.setTransferStatus(status);
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            } catch (Exception e1) {
+                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+        }
+        jobExecutionContext.setInMessageContext(inputNew);
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
+        int i = paramValue.lastIndexOf(File.separator);
+        String substring = paramValue.substring(i + 1);
+        try {
+            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
+            if(paramValue.startsWith("scp:")){
+            	paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
+            	cluster.scpThirdParty(paramValue, targetFile);
+            }else{
+            if(paramValue.startsWith("file")){
+                paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
+            }
+            boolean success = false;
+            int j = 1;
+            while(!success){
+            try {
+				cluster.scpTo(targetFile, paramValue);
+				success = true;
+			} catch (Exception e) {
+				log.info(e.getLocalizedMessage());
+				Thread.sleep(2000);
+				 if(j==3) {
+					throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+				 }
+            }
+            j++;
+            }
+            }
+            return targetFile;
+        } catch (Exception e) {
+            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+        }
+    }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
new file mode 100644
index 0000000..7c5538a
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
@@ -0,0 +1,256 @@
+/*
+ *
+ * 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.ssh.handler;
+
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.impl.OutputUtils;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.util.GFACSSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TransferState;
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+public class SSHOutputHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(SSHOutputHandler.class);
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        String hostAddress = jobExecutionContext.getHostName();
+        try {
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACSSHUtils.addSecurityContext(jobExecutionContext);
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                log.error(e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        }
+
+        super.invoke(jobExecutionContext);
+        DataTransferDetails detail = new DataTransferDetails();
+        detail.setTransferDescription("Output data staging");
+        TransferStatus status = new TransferStatus();
+
+        Cluster cluster = null;
+        try {
+             cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                throw new GFacProviderException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+
+            // Get the Stdouts and StdErrs
+            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
+
+            TaskDetails taskData = jobExecutionContext.getTaskData();
+            String outputDataDir = ServerSettings.getSetting(Constants.OUTPUT_DATA_DIR, File.separator + "tmp");
+            File localStdOutFile;
+            File localStdErrFile;
+            //FIXME: AdvancedOutput is remote location and third party transfer should work to make this work 
+//            if (taskData.getAdvancedOutputDataHandling() != null) {
+//                outputDataDir = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
+//            }
+            if (outputDataDir == null) {
+                outputDataDir = File.separator + "tmp";
+            }
+            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
+            (new File(outputDataDir)).mkdirs();
+
+
+            localStdOutFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stdout");
+            localStdErrFile = new File(outputDataDir + File.separator + timeStampedExperimentID + "stderr");
+//            cluster.makeDirectory(outputDataDir);
+            int i = 0;
+            String stdOutStr = "";
+            while (stdOutStr.isEmpty()) {
+                try {
+                    cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
+                    stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
+                } catch (Exception e) {
+                    log.error(e.getLocalizedMessage());
+                    Thread.sleep(2000);
+                }
+                i++;
+                if (i == 3) break;
+            }
+            Thread.sleep(1000);
+            cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
+            Thread.sleep(1000);
+
+            String stdErrStr = GFacUtils.readFileToString(localStdErrFile.getAbsolutePath());
+            status.setTransferState(TransferState.STDOUT_DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+            status.setTransferState(TransferState.STDERROR_DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+
+            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
+            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
+            Set<String> keys = output.keySet();
+            for (String paramName : keys) {
+                OutputDataObjectType actualParameter = (OutputDataObjectType) output.get(paramName);
+                if (DataType.URI == actualParameter.getType()) {
+                    List<String> outputList = null;
+                    int retry = 3;
+                    while (retry > 0) {
+                        outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
+                        if (outputList.size() > 0) {
+                            break;
+                        }
+                        retry--;
+                        Thread.sleep(2000);
+                    }
+
+                    if (outputList.size() == 0 || outputList.get(0).isEmpty() || outputList.size() > 1) {
+                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
+                        Set<String> strings = output.keySet();
+                        outputArray.clear();
+                        for (String key : strings) {
+                            OutputDataObjectType actualParameter1 = (OutputDataObjectType) output.get(key);
+                            if (DataType.URI == actualParameter1.getType()) {
+                                String downloadFile = actualParameter1.getValue();
+                                cluster.scpFrom(downloadFile, outputDataDir);
+                                String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
+                                String localFile = outputDataDir + File.separator + fileName;
+                                jobExecutionContext.addOutputFile(localFile);
+                                actualParameter1.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.URI);
+                                outputArray.add(dataObjectType);
+                            }else if (DataType.STDOUT == actualParameter.getType()) {
+                                String fileName = localStdOutFile.getName();
+                                String localFile = outputDataDir + File.separator + fileName;
+                                jobExecutionContext.addOutputFile(localFile);
+                                actualParameter.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.STDOUT);
+                                outputArray.add(dataObjectType);
+                            }else if (DataType.STDERR == actualParameter.getType()) {
+                                String fileName = localStdErrFile.getName();
+                                String localFile = outputDataDir + File.separator + fileName;
+                                jobExecutionContext.addOutputFile(localFile);
+                                actualParameter.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.STDERR);
+                                outputArray.add(dataObjectType);
+                            }
+                        }
+                        break;
+                    } else if (outputList.size() == 1) {//FIXME: Ultrascan case
+                        String valueList = outputList.get(0);
+                        cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
+                        String outputPath = outputDataDir + File.separator + valueList;
+                        jobExecutionContext.addOutputFile(outputPath);
+                        actualParameter.setValue(outputPath);
+                        OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                        dataObjectType.setValue(outputPath);
+                        dataObjectType.setName(paramName);
+                        dataObjectType.setType(DataType.URI);
+                        outputArray.add(dataObjectType);
+                    }
+                } else {
+                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
+                }
+            }
+            if (outputArray == null || outputArray.isEmpty()) {
+                log.error("Empty Output returned from the Application, Double check the application and ApplicationDescriptor output Parameter Names");
+                if (jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null) {
+                    throw new GFacHandlerException(
+                            "Empty Output returned from the Application, Double check the application"
+                                    + "and ApplicationDescriptor output Parameter Names");
+                }
+            }
+            jobExecutionContext.setStandardError(localStdErrFile.getAbsolutePath());
+            jobExecutionContext.setStandardOutput(localStdOutFile.getAbsolutePath());
+            jobExecutionContext.setOutputDir(outputDataDir);
+            status.setTransferState(TransferState.DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription(outputDataDir);
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+
+        } catch (Exception e) {
+            try {
+                status.setTransferState(TransferState.FAILED);
+                detail.setTransferStatus(status);
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+            } catch (Exception e1) {
+                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error in retrieving results", e);
+        }
+
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}


[23/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/BetterGfacImpl.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/BetterGfacImpl.java
new file mode 100644
index 0000000..f4c627f
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/BetterGfacImpl.java
@@ -0,0 +1,1151 @@
+/*
+ *
+ * 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.impl;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.Scheduler;
+import org.apache.airavata.gfac.core.context.ApplicationContext;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.GFac;
+import org.apache.airavata.gfac.core.handler.GFacHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
+import org.apache.airavata.gfac.core.provider.GFacProvider;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.states.GfacExperimentState;
+import org.apache.airavata.gfac.core.states.GfacHandlerState;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.FileSystems;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.utils.ZKPaths;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
+ * the resource, required data for the job has to be stored in registry prior to invoke this object.
+ */
+public class BetterGfacImpl implements GFac {
+    private static final Logger log = LoggerFactory.getLogger(BetterGfacImpl.class);
+    private static String ERROR_SENT = "ErrorSent";
+    private Registry registry;
+    private CuratorFramework curatorClient;
+    private MonitorPublisher monitorPublisher;
+    private static GFac gfacInstance;
+    private boolean initialized = false;
+
+    private BetterGfacImpl() {
+
+    }
+
+    public static GFac getInstance() {
+        if (gfacInstance == null) {
+            synchronized (BetterGfacImpl.class) {
+                if (gfacInstance == null) {
+                    gfacInstance = new BetterGfacImpl();
+                }
+            }
+        }
+        return gfacInstance;
+    }
+
+    @Override
+    public boolean init(Registry registry, AppCatalog appCatalog, CuratorFramework curatorClient,
+                        MonitorPublisher publisher) {
+        this.registry = registry;
+        monitorPublisher = publisher;     // This is a EventBus common for gfac
+        this.curatorClient = curatorClient;
+        return initialized = true;
+    }
+
+
+    /**
+     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
+     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
+     *
+     * @param experimentID
+     * @return
+     * @throws GFacException
+     */
+    @Override
+    public boolean submitJob(String experimentID, String taskID, String gatewayID, String tokenId) throws GFacException {
+        if (!initialized) {
+            throw new GFacException("Initialize the Gfac instance before use it");
+        }
+        JobExecutionContext jobExecutionContext = null;
+        try {
+            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+            jobExecutionContext.setCredentialStoreToken(tokenId);
+            return submitJob(jobExecutionContext);
+        } catch (Exception e) {
+            log.error("Error inovoking the job with experiment ID: " + experimentID + ":" + e.getMessage());
+            StringWriter errors = new StringWriter();
+            e.printStackTrace(new PrintWriter(errors));
+            GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            // FIXME: Here we need to update Experiment status to Failed, as we used chained update approach updating
+            // task status will cause to update Experiment status. Remove this chained update approach and fix this correctly (update experiment status)
+            if (jobExecutionContext != null) {
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getGatewayID());
+                TaskStatusChangeRequestEvent event = new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentity);
+                monitorPublisher.publish(event);
+            }
+            throw new GFacException(e);
+        }
+    }
+
+    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
+
+        JobExecutionContext jobExecutionContext;
+
+        /** FIXME:
+         * A temporary wrapper to co-relate the app catalog and experiment thrift models to old gfac schema documents.
+         * The serviceName in ExperimentData and service name in ServiceDescriptor has to be same.
+         * 1. Get the Task from the task ID and construct the Job object and save it in to registry
+         * 2. Add properties of description documents to jobExecutionContext which will be used inside the providers.
+         */
+
+        //Fetch the Task details for the requested experimentID from the registry. Extract required pointers from the Task object.
+        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
+
+        String applicationInterfaceId = taskData.getApplicationId();
+        String applicationDeploymentId = taskData.getApplicationDeploymentId();
+        if (null == applicationInterfaceId) {
+            throw new GFacException("Error executing the job. The required Application Id is missing");
+        }
+        if (null == applicationDeploymentId) {
+            throw new GFacException("Error executing the job. The required Application deployment Id is missing");
+        }
+
+        AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+
+        //fetch the compute resource, application interface and deployment information from app catalog
+        ApplicationInterfaceDescription applicationInterface = appCatalog.
+                getApplicationInterface().getApplicationInterface(applicationInterfaceId);
+        ApplicationDeploymentDescription applicationDeployment = appCatalog.
+                getApplicationDeployment().getApplicationDeployement(applicationDeploymentId);
+        ComputeResourceDescription computeResource = appCatalog.getComputeResource().
+                getComputeResource(applicationDeployment.getComputeHostId());
+        ComputeResourcePreference gatewayResourcePreferences = appCatalog.getGatewayProfile().
+                getComputeResourcePreference(gatewayID, applicationDeployment.getComputeHostId());
+        if (gatewayResourcePreferences == null) {
+            List<String> gatewayProfileIds = appCatalog.getGatewayProfile()
+                    .getGatewayProfileIds(gatewayID);
+            for (String profileId : gatewayProfileIds) {
+                gatewayID = profileId;
+                gatewayResourcePreferences = appCatalog.getGatewayProfile().
+                        getComputeResourcePreference(gatewayID, applicationDeployment.getComputeHostId());
+                if (gatewayResourcePreferences != null) {
+                    break;
+                }
+            }
+        }
+
+        URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+        Properties configurationProperties = ServerSettings.getProperties();
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), configurationProperties);
+
+        // start constructing jobexecutioncontext
+        jobExecutionContext = new JobExecutionContext(gFacConfiguration, applicationInterface.getApplicationName());
+
+        // setting experiment/task/workflownode related information
+        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
+        jobExecutionContext.setExperiment(experiment);
+        jobExecutionContext.setExperimentID(experimentID);
+        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
+        jobExecutionContext.setTaskData(taskData);
+        jobExecutionContext.setGatewayID(gatewayID);
+        jobExecutionContext.setAppCatalog(appCatalog);
+
+
+        List<JobDetails> jobDetailsList = taskData.getJobDetailsList();
+        //FIXME: Following for loop only set last jobDetails element to the jobExecutionContext
+        for (JobDetails jDetails : jobDetailsList) {
+            jobExecutionContext.setJobDetails(jDetails);
+        }
+        // setting the registry
+        jobExecutionContext.setRegistry(registry);
+
+        ApplicationContext applicationContext = new ApplicationContext();
+        applicationContext.setComputeResourceDescription(computeResource);
+        applicationContext.setApplicationDeploymentDescription(applicationDeployment);
+        applicationContext.setApplicationInterfaceDescription(applicationInterface);
+        applicationContext.setComputeResourcePreference(gatewayResourcePreferences);
+        jobExecutionContext.setApplicationContext(applicationContext);
+
+
+//        List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
+//        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInputParamMap(experimentInputs)));
+        List<InputDataObjectType> taskInputs = taskData.getApplicationInputs();
+        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInputParamMap(taskInputs)));
+
+        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
+        jobExecutionContext.setGfac(gfacInstance);
+        jobExecutionContext.setCuratorClient(curatorClient);
+        jobExecutionContext.setMonitorPublisher(monitorPublisher);
+
+        // handle job submission protocol
+        List<JobSubmissionInterface> jobSubmissionInterfaces = computeResource.getJobSubmissionInterfaces();
+        if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()) {
+            Collections.sort(jobSubmissionInterfaces, new Comparator<JobSubmissionInterface>() {
+                @Override
+                public int compare(JobSubmissionInterface jobSubmissionInterface, JobSubmissionInterface jobSubmissionInterface2) {
+                    return jobSubmissionInterface.getPriorityOrder() - jobSubmissionInterface2.getPriorityOrder();
+                }
+            });
+
+            jobExecutionContext.setHostPrioritizedJobSubmissionInterfaces(jobSubmissionInterfaces);
+        } else {
+            throw new GFacException("Compute resource should have at least one job submission interface defined...");
+        }
+        // handle data movement protocol
+        List<DataMovementInterface> dataMovementInterfaces = computeResource.getDataMovementInterfaces();
+        if (dataMovementInterfaces != null && !dataMovementInterfaces.isEmpty()) {
+            Collections.sort(dataMovementInterfaces, new Comparator<DataMovementInterface>() {
+                @Override
+                public int compare(DataMovementInterface dataMovementInterface, DataMovementInterface dataMovementInterface2) {
+                    return dataMovementInterface.getPriorityOrder() - dataMovementInterface2.getPriorityOrder();
+                }
+            });
+            jobExecutionContext.setHostPrioritizedDataMovementInterfaces(dataMovementInterfaces);
+        }
+
+        // set compute resource configuration as default preferred values, after that replace those with gateway user preferences.
+        populateDefaultComputeResourceConfiguration(jobExecutionContext, applicationInterface, computeResource);
+        populateResourceJobManager(jobExecutionContext);
+        // if gateway resource preference is set
+        if (gatewayResourcePreferences != null) {
+            if (gatewayResourcePreferences.getScratchLocation() == null) {
+                gatewayResourcePreferences.setScratchLocation("/tmp");
+            }
+            setUpWorkingLocation(jobExecutionContext, applicationInterface, gatewayResourcePreferences.getScratchLocation());
+
+            jobExecutionContext.setPreferredJobSubmissionProtocol(gatewayResourcePreferences.getPreferredJobSubmissionProtocol());
+            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+                jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
+                jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
+            } else {
+                for (JobSubmissionInterface jobSubmissionInterface : jobSubmissionInterfaces) {
+                    if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == jobSubmissionInterface.getJobSubmissionProtocol()) {
+                        jobExecutionContext.setPreferredJobSubmissionInterface(jobSubmissionInterface);
+                        break;
+                    }
+                }
+            }
+
+            if (gatewayResourcePreferences.getLoginUserName() != null) {
+                jobExecutionContext.setLoginUserName(gatewayResourcePreferences.getLoginUserName());
+            }
+
+            // set gatewayUserPreferred data movement protocol and interface
+            jobExecutionContext.setPreferredDataMovementProtocol(gatewayResourcePreferences.getPreferredDataMovementProtocol());
+            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+                jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
+                jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
+            } else {
+                // this check is to avoid NPE when job submission endpoints do
+                // not contain any data movement interfaces.
+                if ((dataMovementInterfaces != null) && (!dataMovementInterfaces.isEmpty())) {
+                    for (DataMovementInterface dataMovementInterface : dataMovementInterfaces) {
+                        if (gatewayResourcePreferences.getPreferredDataMovementProtocol() == dataMovementInterface.getDataMovementProtocol()) {
+                            jobExecutionContext.setPreferredDataMovementInterface(dataMovementInterface);
+                            break;
+                        }
+                    }
+                }
+            }
+        } else {
+            setUpWorkingLocation(jobExecutionContext, applicationInterface, "/tmp");
+        }
+        List<OutputDataObjectType> taskOutputs = taskData.getApplicationOutputs();
+        if (taskOutputs == null || taskOutputs.isEmpty()) {
+            taskOutputs = applicationInterface.getApplicationOutputs();
+        }
+
+        for (OutputDataObjectType objectType : taskOutputs) {
+            if (objectType.getType() == DataType.URI && objectType.getValue() != null) {
+                String filePath = objectType.getValue();
+                // if output is not in working folder
+                if (objectType.getLocation() != null && !objectType.getLocation().isEmpty()) {
+                    if (objectType.getLocation().startsWith(File.separator)) {
+                        filePath = objectType.getLocation() + File.separator + filePath;
+                    } else {
+                        filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation() + File.separator + filePath;
+                    }
+                } else {
+                    filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
+                }
+                objectType.setValue(filePath);
+
+            }
+            if (objectType.getType() == DataType.STDOUT) {
+                objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + jobExecutionContext.getApplicationName() + ".stdout");
+            }
+            if (objectType.getType() == DataType.STDERR) {
+                objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + jobExecutionContext.getApplicationName() + ".stderr");
+            }
+        }
+        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getOuputParamMap(taskOutputs)));
+        return jobExecutionContext;
+    }
+
+    private void setUpWorkingLocation(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, String scratchLocation) {
+        /**
+         * Scratch location
+         */
+        jobExecutionContext.setScratchLocation(scratchLocation);
+
+        /**
+         * Working dir
+         */
+        String workingDir = scratchLocation + File.separator + jobExecutionContext.getExperimentID();
+        jobExecutionContext.setWorkingDir(workingDir);
+
+            /*
+            * Input and Output Directory
+            */
+//        jobExecutionContext.setInputDir(workingDir + File.separator + Constants.INPUT_DATA_DIR_VAR_NAME);
+        jobExecutionContext.setInputDir(workingDir);
+//        jobExecutionContext.setOutputDir(workingDir + File.separator + Constants.OUTPUT_DATA_DIR_VAR_NAME);
+        jobExecutionContext.setOutputDir(workingDir);
+
+            /*
+            * Stdout and Stderr for Shell
+            */
+        jobExecutionContext.setStandardOutput(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stdout");
+        jobExecutionContext.setStandardError(workingDir + File.separator + applicationInterface.getApplicationName().replaceAll("\\s+", "") + ".stderr");
+    }
+
+    private void populateDefaultComputeResourceConfiguration(JobExecutionContext jobExecutionContext, ApplicationInterfaceDescription applicationInterface, ComputeResourceDescription computeResource) {
+        Map<FileSystems, String> fileSystems = computeResource.getFileSystems();
+        String scratchLocation = fileSystems.get(FileSystems.SCRATCH);
+        if (scratchLocation != null) {
+            setUpWorkingLocation(jobExecutionContext, applicationInterface, scratchLocation);
+        }
+
+        jobExecutionContext.setPreferredJobSubmissionInterface(jobExecutionContext.getHostPrioritizedJobSubmissionInterfaces().get(0));
+        jobExecutionContext.setPreferredJobSubmissionProtocol(jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionProtocol());
+
+        if (jobExecutionContext.getHostPrioritizedDataMovementInterfaces() != null) {
+            jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
+            jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
+        }
+    }
+
+    private void populateResourceJobManager(JobExecutionContext jobExecutionContext) {
+        try {
+            JobSubmissionProtocol submissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+            JobSubmissionInterface jobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+            if (submissionProtocol == JobSubmissionProtocol.SSH) {
+                SSHJobSubmission sshJobSubmission = GFacUtils.getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+                if (sshJobSubmission != null) {
+                    jobExecutionContext.setResourceJobManager(sshJobSubmission.getResourceJobManager());
+                }
+            } else if (submissionProtocol == JobSubmissionProtocol.LOCAL) {
+                LOCALSubmission localJobSubmission = GFacUtils.getLocalJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+                if (localJobSubmission != null) {
+                    jobExecutionContext.setResourceJobManager(localJobSubmission.getResourceJobManager());
+                }
+            }
+        } catch (AppCatalogException e) {
+            log.error("Error occured while retrieving job submission interface", e);
+        }
+    }
+
+    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
+        // We need to check whether this job is submitted as a part of a large workflow. If yes,
+        // we need to setup workflow tracking listerner.
+        try {
+            GfacExperimentState gfacExpState = GFacUtils.getZKExperimentState(curatorClient, jobExecutionContext);   // this is the original state came, if we query again it might be different,so we preserve this state in the environment
+            // Register log event listener. This is required in all scenarios.
+            if (isNewJob(gfacExpState)) {
+                // In this scenario We do everything from the beginning
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                        , GfacExperimentState.ACCEPTED));                  // immediately we get the request we update the status
+                launch(jobExecutionContext);
+            } else if (isCompletedJob(gfacExpState)) {
+                log.info("There is nothing to recover in this job so we do not re-submit");
+                ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(),
+                        AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID()), true);
+            } else {
+                // Now we know this is an old Job, so we have to handle things gracefully
+                log.info("Re-launching the job in GFac because this is re-submitted to GFac");
+                reLaunch(jobExecutionContext, gfacExpState);
+            }
+            return true;
+        } catch (Exception e) {
+            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            throw new GFacException("Error launching the Job", e);
+        }
+    }
+
+    private boolean isCompletedJob(GfacExperimentState gfacExpState) {
+        switch (gfacExpState) {
+            case COMPLETED:
+            case FAILED:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    private boolean isNewJob(GfacExperimentState stateVal) {
+        switch (stateVal) {
+            case UNKNOWN:
+            case LAUNCHED:
+            case ACCEPTED:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    @Override
+    public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId) throws GFacException {
+        if (!initialized) {
+            throw new GFacException("Initialize the Gfac instance before use it");
+        }
+        JobExecutionContext jobExecutionContext = null;
+        try {
+            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+            jobExecutionContext.setCredentialStoreToken(tokenId);
+            return cancel(jobExecutionContext);
+        } catch (Exception e) {
+            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            log.error("Error cancelling the job with experiment ID: " + experimentID);
+            throw new GFacException(e);
+        }
+    }
+
+    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
+        try {
+            GfacExperimentState gfacExpState = GFacUtils.getZKExperimentState(curatorClient, jobExecutionContext);   // this is the original state came, if we query again it might be different,so we preserve this state in the environment
+            String workflowInstanceID = null;
+            if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
+                //todo implement WorkflowTrackingListener properly
+            }
+            if (gfacExpState == GfacExperimentState.PROVIDERINVOKING || gfacExpState == GfacExperimentState.JOBSUBMITTED
+                    || gfacExpState == GfacExperimentState.PROVIDERINVOKED) { // we already have changed registry status, we need to handle job canceling scenario.
+                log.info("Job is in a position to perform a proper cancellation");
+                try {
+                    Scheduler.schedule(jobExecutionContext);
+                    invokeProviderCancel(jobExecutionContext);
+                } catch (GFacException e) {
+                    // we make the experiment as failed due to exception scenario
+                    monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
+                    jobExecutionContext.setProperty(ERROR_SENT, "true");
+                    throw new GFacException(e.getMessage(), e);
+                }
+            }
+//            else if (gfacExpState == GfacExperimentState.INHANDLERSINVOKING || gfacExpState == GfacExperimentState.INHANDLERSINVOKED || gfacExpState == GfacExperimentState.OUTHANDLERSINVOKING){
+//                log.info("Experiment should be immedietly cancelled");
+//                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.CANCELED);
+//
+//            }
+            return true;
+        } catch (Exception e) {
+            log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentID(), e);
+            throw new GFacException(e.getMessage(), e);
+        }
+    }
+
+    private void reLaunch(JobExecutionContext jobExecutionContext, GfacExperimentState state) throws GFacException {
+        // Scheduler will decide the execution flow of handlers and provider
+        // which handles
+        // the job.
+        String experimentID = jobExecutionContext.getExperimentID();
+        try {
+            Scheduler.schedule(jobExecutionContext);
+
+            // Executing in handlers in the order as they have configured in
+            // GFac configuration
+            // here we do not skip handler if some handler does not have to be
+            // run again during re-run it can implement
+            // that logic in to the handler
+
+            // After executing the in handlers provider instance should be set
+            // to job execution context.
+            // We get the provider instance and execute it.
+            switch (state) {
+                case INHANDLERSINVOKING:
+                    reInvokeInFlowHandlers(jobExecutionContext);
+                case INHANDLERSINVOKED:
+                    invokeProviderExecute(jobExecutionContext);
+                    break;
+                case PROVIDERINVOKING:
+                    reInvokeProviderExecute(jobExecutionContext, true);
+                    break;
+                case JOBSUBMITTED:
+                    reInvokeProviderExecute(jobExecutionContext, false);
+                case PROVIDERINVOKED:
+                    // no need to re-run the job
+                    log.info("Provider does not have to be recovered because it ran successfully for experiment: " + experimentID);
+                    if (!GFacUtils.isSynchronousMode(jobExecutionContext)) {
+                        monitorJob(jobExecutionContext);
+                    } else {
+                        // TODO - Need to handle this correctly , for now we will invoke ouput handlers.
+                        invokeOutFlowHandlers(jobExecutionContext);
+                    }
+                    break;
+                case OUTHANDLERSINVOKING:
+                    reInvokeOutFlowHandlers(jobExecutionContext);
+                    break;
+                case OUTHANDLERSINVOKED:
+                case COMPLETED:
+                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.COMPLETED);
+                    break;
+                case FAILED:
+                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
+                    break;
+                case UNKNOWN:
+                    log.info("All output handlers are invoked successfully, ExperimentId: " + experimentID + " taskId: " + jobExecutionContext.getTaskData().getTaskID());
+                    break;
+                default:
+                    throw new GFacException("Un-handled GfacExperimentState : " + state.name());
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            try {
+                // we make the experiment as failed due to exception scenario
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
+                JobIdentifier jobIdentity = new JobIdentifier(
+                        jobExecutionContext.getJobDetails().getJobID(), jobExecutionContext.getTaskData().getTaskID(),
+                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getGatewayID());
+                monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
+                GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (NullPointerException e1) {
+                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
+                        + "NullPointerException occurred because at this point there might not have Job Created", e1, e);
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getGatewayID());
+                monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
+                GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+
+            }
+            jobExecutionContext.setProperty(ERROR_SENT, "true");
+            throw new GFacException(e.getMessage(), e);
+        }
+    }
+
+    private void monitorJob(JobExecutionContext jobExecutionContext) throws GFacException, GFacProviderException {
+        GFacProvider provider = jobExecutionContext.getProvider();
+        if (provider != null) {
+            provider.monitor(jobExecutionContext);
+        }
+        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
+            invokeOutFlowHandlers(jobExecutionContext);
+        }
+
+    }
+
+    private void launch(JobExecutionContext jobExecutionContext) throws GFacException {
+        // Scheduler will decide the execution flow of handlers and provider
+        // which handles
+        // the job.
+        try {
+            Scheduler.schedule(jobExecutionContext);
+
+            // Executing in handlers in the order as they have configured in
+            // GFac configuration
+            // here we do not skip handler if some handler does not have to be
+            // run again during re-run it can implement
+            // that logic in to the handler
+            if (!isCancelling(jobExecutionContext)) {
+                invokeInFlowHandlers(jobExecutionContext); // to keep the
+                // consistency we always
+                // try to re-run to
+                // avoid complexity
+            } else {
+                log.info("Experiment is cancelled, so launch operation is stopping immediately");
+                GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
+                return; // if the job is cancelled, status change is handled in cancel operation this thread simply has to be returned
+            }
+            // if (experimentID != null){
+            // registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+            // }
+
+            // After executing the in handlers provider instance should be set
+            // to job execution context.
+            // We get the provider instance and execute it.
+            if (!isCancelling(jobExecutionContext)) {
+                invokeProviderExecute(jobExecutionContext);
+            } else {
+                log.info("Experiment is cancelled, so launch operation is stopping immediately");
+                GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
+                return;
+            }
+        } catch (Exception e) {
+            try {
+                // we make the experiment as failed due to exception scenario
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
+                // monitorPublisher.publish(new
+                // ExperimentStatusChangedEvent(new
+                // ExperimentIdentity(jobExecutionContext.getExperimentID()),
+                // ExperimentState.FAILED));
+                // Updating the task status if there's any task associated
+                // monitorPublisher.publish(new TaskStatusChangeRequest(
+                // new TaskIdentity(jobExecutionContext.getExperimentID(),
+                // jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                // jobExecutionContext.getTaskData().getTaskID()),
+                // TaskState.FAILED
+                // ));
+                JobIdentifier jobIdentity = new JobIdentifier(
+                        jobExecutionContext.getJobDetails().getJobID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getGatewayID());
+                monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
+            } catch (NullPointerException e1) {
+                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
+                        + "NullPointerException occurred because at this point there might not have Job Created", e1, e);
+                //monitorPublisher.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+                // Updating the task status if there's any task associated
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getGatewayID());
+                monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
+
+            }
+            jobExecutionContext.setProperty(ERROR_SENT, "true");
+            throw new GFacException(e.getMessage(), e);
+        }
+    }
+
+    private void invokeProviderExecute(JobExecutionContext jobExecutionContext) throws Exception {
+        GFacProvider provider = jobExecutionContext.getProvider();
+        if (provider != null) {
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
+            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
+            initProvider(provider, jobExecutionContext);
+            executeProvider(provider, jobExecutionContext);
+            disposeProvider(provider, jobExecutionContext);
+            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
+        }
+        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
+            invokeOutFlowHandlers(jobExecutionContext);
+        }
+    }
+
+    private void reInvokeProviderExecute(JobExecutionContext jobExecutionContext, boolean submit) throws Exception {
+        GFacProvider provider = jobExecutionContext.getProvider();
+        if (provider != null) {
+            if (submit) {
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
+                GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName());
+                GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
+                if (plState != null && plState == GfacHandlerState.INVOKING) {    // this will make sure if a plugin crashes it will not launch from the scratch, but plugins have to save their invoked state
+                    initProvider(provider, jobExecutionContext);
+                    executeProvider(provider, jobExecutionContext);
+                    disposeProvider(provider, jobExecutionContext);
+                } else {
+                    provider.recover(jobExecutionContext);
+                }
+                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
+            } else {
+                disposeProvider(provider, jobExecutionContext);
+                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
+            }
+        }
+
+        if (GFacUtils.isSynchronousMode(jobExecutionContext))  {
+            invokeOutFlowHandlers(jobExecutionContext);
+        }
+
+    }
+
+    private boolean invokeProviderCancel(JobExecutionContext jobExecutionContext) throws GFacException {
+        GFacProvider provider = jobExecutionContext.getProvider();
+        if (provider != null) {
+            initProvider(provider, jobExecutionContext);
+            cancelProvider(provider, jobExecutionContext);
+            disposeProvider(provider, jobExecutionContext);
+        }
+        if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
+            invokeOutFlowHandlers(jobExecutionContext);
+        }
+        return true;
+    }
+
+    // TODO - Did refactoring, but need to recheck the logic again.
+    private void reInvokeProviderCancel(JobExecutionContext jobExecutionContext) throws Exception {
+        GFacProvider provider = jobExecutionContext.getProvider();
+        if (provider != null) {
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKING));
+            GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName());
+            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, provider.getClass().getName());
+            if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {    // this will make sure if a plugin crashes it will not launch from the scratch, but plugins have to save their invoked state
+                initProvider(provider, jobExecutionContext);
+                cancelProvider(provider, jobExecutionContext);
+                disposeProvider(provider, jobExecutionContext);
+            } else {
+                provider.recover(jobExecutionContext);
+            }
+            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, provider.getClass().getName(), GfacHandlerState.COMPLETED);
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.PROVIDERINVOKED));
+        }
+
+        if (GFacUtils.isSynchronousMode(jobExecutionContext))
+
+        {
+            invokeOutFlowHandlers(jobExecutionContext);
+        }
+
+    }
+
+
+    private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+        try {
+            provider.initialize(jobExecutionContext);
+        } catch (Exception e) {
+            throw new GFacException("Error while initializing provider " + provider.getClass().getName() + ".", e);
+        }
+    }
+
+    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+        try {
+            provider.execute(jobExecutionContext);
+        } catch (Exception e) {
+            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
+        }
+    }
+
+    private boolean cancelProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+        try {
+            return provider.cancelJob(jobExecutionContext);
+        } catch (Exception e) {
+            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
+        }
+    }
+
+    private void disposeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+        try {
+            provider.dispose(jobExecutionContext);
+        } catch (Exception e) {
+            throw new GFacException("Error while invoking provider " + provider.getClass().getName() + " dispose method.", e);
+        }
+    }
+
+//    private void registerWorkflowTrackingListener(String workflowInstanceID, JobExecutionContext jobExecutionContext) {
+//        String workflowNodeID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID);
+//        String topic = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
+//        String brokerUrl = (String) jobExecutionContext.getProperty(Constants.PROP_BROKER_URL);
+//        jobExecutionContext.getNotificationService().registerListener(
+//                new WorkflowTrackingListener(workflowInstanceID, workflowNodeID, brokerUrl, topic));
+//
+//    }
+
+    private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
+        try {
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                    , GfacExperimentState.INHANDLERSINVOKING));
+            for (GFacHandlerConfig handlerClassName : handlers) {
+                if (!isCancelling(jobExecutionContext)) {
+                    Class<? extends GFacHandler> handlerClass;
+                    GFacHandler handler;
+                    try {
+                        GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName());
+                        handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+                        handler = handlerClass.newInstance();
+                        handler.initProperties(handlerClassName.getProperties());
+                    } catch (ClassNotFoundException e) {
+                        throw new GFacException("Cannot load handler class " + handlerClassName, e);
+                    } catch (InstantiationException e) {
+                        throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+                    } catch (IllegalAccessException e) {
+                        throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+                    }
+                    try {
+                        handler.invoke(jobExecutionContext);
+                        GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
+                        // if exception thrown before that we do not make it finished
+                    } catch (GFacHandlerException e) {
+                        throw new GFacException("Error Executing a InFlow Handler", e.getCause());
+                    }
+                } else {
+                    log.info("Experiment execution is cancelled, so InHandler invocation is going to stop");
+                    GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
+                    break;
+                }
+            }
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                    , GfacExperimentState.INHANDLERSINVOKED));
+        } catch (Exception e) {
+            throw new GFacException("Error Invoking Handlers:" + e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+        if (!initialized) {
+            throw new GFacException("Initialize the Gfac instance before use it");
+        }
+        String experimentPath = null;
+        try {
+            experimentPath = AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID());
+            if (curatorClient.checkExists().forPath(experimentPath) == null) {
+                log.error("Experiment is already finalized so no output handlers will be invoked");
+                return;
+            }
+            GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
+            List<GFacHandlerConfig> handlers = null;
+            if (gFacConfiguration != null) {
+                handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
+            } else {
+                try {
+                    jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
+                            jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+                } catch (Exception e) {
+                    log.error("Error constructing job execution context during outhandler invocation");
+                    throw new GFacException(e);
+                }
+            }
+            try {
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKING));
+                for (GFacHandlerConfig handlerClassName : handlers) {
+                    if (!isCancel(jobExecutionContext)) {
+                        Class<? extends GFacHandler> handlerClass;
+                        GFacHandler handler;
+                        try {
+                            GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName());
+                            handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+                            handler = handlerClass.newInstance();
+                            handler.initProperties(handlerClassName.getProperties());
+                        } catch (ClassNotFoundException e) {
+                            log.error(e.getMessage());
+                            throw new GFacException("Cannot load handler class " + handlerClassName, e);
+                        } catch (InstantiationException | IllegalAccessException e) {
+                            log.error(e.getMessage());
+                            throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+                        }
+                        try {
+                            handler.invoke(jobExecutionContext);
+                            GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
+                        } catch (Exception e) {
+                            GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.FAILED);
+                            try {
+                                StringWriter errors = new StringWriter();
+                                e.printStackTrace(new PrintWriter(errors));
+                                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                            } catch (GFacException e1) {
+                                log.error(e1.getLocalizedMessage());
+                            }
+                            throw new GFacException(e);
+                        }
+                    } else {
+                        log.info("Experiment execution is cancelled, so OutHandler invocation is stopped");
+                        if (isCancelling(jobExecutionContext)) {
+                            GFacUtils.publishTaskStatus(jobExecutionContext, monitorPublisher, TaskState.CANCELED);
+                        }
+                        break;
+                    }
+                }
+                monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKED));
+            } catch (Exception e) {
+                throw new GFacException("Cannot invoke OutHandlers\n" + e.getMessage(), e);
+            }
+        } catch (Exception e) {
+            throw new GFacException("Cannot invoke OutHandlers\n" + e.getMessage(), e);
+        }
+
+        // At this point all the execution is finished so we update the task and experiment statuses.
+        // Handler authors does not have to worry about updating experiment or task statuses.
+//        monitorPublisher.publish(new
+//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//                ExperimentState.COMPLETED));
+        // Updating the task status if there's any task associated
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getGatewayID());
+        monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
+        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
+
+    }
+
+    /**
+     * If handlers ran successfully we re-run only recoverable handlers
+     * If handler never ran we run the normal invoke method
+     *
+     * @param jobExecutionContext
+     * @throws GFacException
+     */
+    // TODO - Did refactoring, but need to recheck the logic again.
+    private void reInvokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
+        try {
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                    , GfacExperimentState.INHANDLERSINVOKING));
+            for (GFacHandlerConfig handlerClassName : handlers) {
+                Class<? extends GFacHandler> handlerClass;
+                GFacHandler handler;
+                try {
+                    handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+                    handler = handlerClass.newInstance();
+                    GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName());
+                    GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.INVOKING);
+                    handler.initProperties(handlerClassName.getProperties());
+                    if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {
+                        log.info(handlerClassName.getClassName() + " never ran so we run this is normal mode");
+                        handler.invoke(jobExecutionContext);
+                    } else {
+                        // if these already ran we re-run only recoverable handlers
+                        log.info(handlerClassName.getClassName() + " is a recoverable handler so we recover the handler");
+                        handler.recover(jobExecutionContext);
+                    }
+                    GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
+                } catch (GFacHandlerException e) {
+                    throw new GFacException("Error Executing a InFlow Handler", e.getCause());
+                } catch (ClassNotFoundException e) {
+                    throw new GFacException("Cannot load handler class " + handlerClassName, e);
+                } catch (InstantiationException e) {
+                    throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+                } catch (IllegalAccessException e) {
+                    throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+                }
+            }
+            monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
+                    , GfacExperimentState.INHANDLERSINVOKED));
+        } catch (Exception e) {
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                log.error(e1.getLocalizedMessage());
+            }
+            throw new GFacException("Error while re-invoking output handlers", e);
+        }
+    }
+
+    // TODO - Did refactoring, but need to recheck the logic again.
+    @Override
+    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+        if (!initialized) {
+            throw new GFacException("Initialize the Gfac instance before use it");
+        }
+        GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
+        List<GFacHandlerConfig> handlers = null;
+        if (gFacConfiguration != null) {
+            handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
+        } else {
+            try {
+                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+            } catch (Exception e) {
+                log.error("Error constructing job execution context during outhandler invocation");
+                throw new GFacException(e);
+            }
+            launch(jobExecutionContext);
+        }
+        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKING));
+        for (GFacHandlerConfig handlerClassName : handlers) {
+            Class<? extends GFacHandler> handlerClass;
+            GFacHandler handler;
+            try {
+                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+                handler = handlerClass.newInstance();
+                GfacHandlerState plState = GFacUtils.getHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName());
+                GFacUtils.createHandlerZnode(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.INVOKING);
+                if (plState == GfacHandlerState.UNKNOWN || plState == GfacHandlerState.INVOKING) {
+                    log.info(handlerClassName.getClassName() + " never ran so we run this in normal mode");
+                    handler.initProperties(handlerClassName.getProperties());
+                    handler.invoke(jobExecutionContext);
+                } else {
+                    // if these already ran we re-run only recoverable handlers
+                    handler.recover(jobExecutionContext);
+                }
+                GFacUtils.updateHandlerState(curatorClient, jobExecutionContext, handlerClassName.getClassName(), GfacHandlerState.COMPLETED);
+            } catch (ClassNotFoundException e) {
+                try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    log.error(e1.getLocalizedMessage());
+                }
+                log.error(e.getMessage());
+                throw new GFacException("Cannot load handler class " + handlerClassName, e);
+            } catch (InstantiationException e) {
+                try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    log.error(e1.getLocalizedMessage());
+                }
+                log.error(e.getMessage());
+                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+            } catch (IllegalAccessException e) {
+                try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    log.error(e1.getLocalizedMessage());
+                }
+                log.error(e.getMessage());
+                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+            } catch (Exception e) {
+                // TODO: Better error reporting.
+                try {
+                    StringWriter errors = new StringWriter();
+                    e.printStackTrace(new PrintWriter(errors));
+                    GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    log.error(e1.getLocalizedMessage());
+                }
+                throw new GFacException("Error Executing a OutFlow Handler", e);
+            }
+        }
+        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.OUTHANDLERSINVOKED));
+
+        // At this point all the execution is finished so we update the task and experiment statuses.
+        // Handler authors does not have to worry about updating experiment or task statuses.
+//        monitorPublisher.publish(new
+//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//                ExperimentState.COMPLETED));
+        // Updating the task status if there's any task associated
+
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getGatewayID());
+        monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
+        monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
+    }
+
+    private boolean isCancelled(JobExecutionContext executionContext) {
+        // we should check whether experiment is cancelled using registry
+        try {
+            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
+            if (status != null) {
+                ExperimentState experimentState = status.getExperimentState();
+                if (experimentState != null) {
+                    if (experimentState == ExperimentState.CANCELED) {
+                        return true;
+                    }
+                }
+            }
+        } catch (RegistryException e) {
+            // on error we return false.
+        }
+        return false;
+    }
+
+    private boolean isCancelling(JobExecutionContext executionContext) {
+        // check whether cancelling request came
+        try {
+            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
+            if (status != null) {
+                ExperimentState experimentState = status.getExperimentState();
+                if (experimentState != null) {
+                    if (experimentState == ExperimentState.CANCELING) {
+                        return true;
+                    }
+                }
+            }
+        } catch (RegistryException e) {
+            // on error we return false;
+        }
+        return false;
+    }
+
+    private boolean isCancel(JobExecutionContext jobExecutionContext) {
+        try {
+            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, jobExecutionContext.getExperimentID());
+            if (status != null) {
+                ExperimentState experimentState = status.getExperimentState();
+                if (experimentState != null) {
+                    if (experimentState == ExperimentState.CANCELING || experimentState == ExperimentState.CANCELED) {
+                        return true;
+                    }
+                }
+            }
+        } catch (RegistryException e) {
+            // on error we return false;
+        }
+        return false;
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GfacInternalStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GfacInternalStatusUpdator.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GfacInternalStatusUpdator.java
new file mode 100644
index 0000000..a45eb23
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GfacInternalStatusUpdator.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * 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.impl;
+
+import com.google.common.eventbus.Subscribe;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
+import org.apache.airavata.gfac.core.states.GfacExperimentState;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+
+public class GfacInternalStatusUpdator implements AbstractActivityListener, Watcher {
+    private final static Logger logger = LoggerFactory.getLogger(GfacInternalStatusUpdator.class);
+
+    private CuratorFramework curatorClient;
+
+    private static Integer mutex = -1;
+
+    @Subscribe
+    public void updateZK(GfacExperimentStateChangeRequest statusChangeRequest) throws Exception {
+        logger.info("Gfac internal state changed to: " + statusChangeRequest.getState().toString());
+        MonitorID monitorID = statusChangeRequest.getMonitorID();
+        String experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
+        String experimentPath = experimentNode + File.separator + ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME)
+                + File.separator + statusChangeRequest.getMonitorID().getExperimentID();
+        Stat exists = null;
+        if(!(GfacExperimentState.COMPLETED.equals(statusChangeRequest.getState()) || GfacExperimentState.FAILED.equals(statusChangeRequest.getState()))) {
+            exists = curatorClient.checkExists().forPath(experimentPath);
+            if (exists == null) {
+                logger.error("ZK path: " + experimentPath + " does not exists !!");
+                return;
+            }
+            Stat state = curatorClient.checkExists().forPath(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
+            if (state == null) {
+                // state znode has to be created
+                curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).
+                        forPath(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+                                String.valueOf(statusChangeRequest.getState().getValue()).getBytes());
+            } else {
+                curatorClient.setData().withVersion(state.getVersion()).forPath(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+                        String.valueOf(statusChangeRequest.getState().getValue()).getBytes());
+            }
+        }
+        switch (statusChangeRequest.getState()) {
+            case COMPLETED:
+                logger.info("Experiment Completed, So removing the ZK entry for the experiment" + monitorID.getExperimentID());
+                logger.info("Zookeeper experiment Path: " + experimentPath);
+                break;
+            case FAILED:
+                logger.info("Experiment Failed, So removing the ZK entry for the experiment" + monitorID.getExperimentID());
+                logger.info("Zookeeper experiment Path: " + experimentPath);
+                break;
+            default:
+        }
+    }
+
+    public void setup(Object... configurations) {
+        for (Object configuration : configurations) {
+            if (configuration instanceof CuratorFramework) {
+                this.curatorClient = (CuratorFramework) configuration;
+            }
+        }
+    }
+
+    public void process(WatchedEvent watchedEvent) {
+        logger.info(watchedEvent.getPath());
+        synchronized (mutex) {
+            Event.KeeperState state = watchedEvent.getState();
+            if (state == Event.KeeperState.SyncConnected) {
+                mutex.notify();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/InputHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/InputHandlerWorker.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/InputHandlerWorker.java
new file mode 100644
index 0000000..461cc1e
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/InputHandlerWorker.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.impl;
+
+import org.apache.airavata.gfac.core.GFac;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InputHandlerWorker implements Runnable {
+    private static Logger log = LoggerFactory.getLogger(InputHandlerWorker.class);
+
+    String experimentId;
+    String taskId;
+    String gatewayId;
+    String tokenId;
+
+    GFac gfac;
+    public InputHandlerWorker(GFac gfac, String experimentId,String taskId,String gatewayId, String tokenId) {
+        this.gfac = gfac;
+        this.experimentId = experimentId;
+        this.taskId = taskId;
+        this.gatewayId = gatewayId;
+        this.tokenId = tokenId;
+    }
+
+    @Override
+    public void run() {
+        try {
+            gfac.submitJob(experimentId, taskId, gatewayId, tokenId);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutHandlerWorker.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutHandlerWorker.java
new file mode 100644
index 0000000..5adaed6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutHandlerWorker.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * 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.impl;
+
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.GFac;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class OutHandlerWorker implements Runnable {
+    private final static Logger logger = LoggerFactory.getLogger(OutHandlerWorker.class);
+
+    private GFac gfac;
+
+    private MonitorID monitorID;
+
+    private MonitorPublisher monitorPublisher;
+    private JobExecutionContext jEC;
+
+    public OutHandlerWorker(GFac gfac, MonitorID monitorID,MonitorPublisher monitorPublisher) {
+        this.gfac = gfac;
+        this.monitorID = monitorID;
+        this.monitorPublisher = monitorPublisher;
+        this.jEC = monitorID.getJobExecutionContext();
+    }
+
+    public OutHandlerWorker(JobExecutionContext jEC) {
+        this.jEC = jEC;
+        this.gfac = jEC.getGfac();
+        this.monitorPublisher = jEC.getMonitorPublisher();
+    }
+
+    @Override
+    public void run() {
+        try {
+//            gfac.invokeOutFlowHandlers(monitorID.getJobExecutionContext());
+            gfac.invokeOutFlowHandlers(jEC);
+        } catch (Exception e) {
+            logger.error(e.getMessage(),e);
+            TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskID(), monitorID.getWorkflowNodeID(),monitorID.getExperimentID(), monitorID.getJobExecutionContext().getGatewayID());
+            //FIXME this is a case where the output retrieving fails even if the job execution was a success. Thus updating the task status
+            monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
+            try {
+                StringWriter errors = new StringWriter();
+                e.printStackTrace(new PrintWriter(errors));
+                GFacUtils.saveErrorDetails(monitorID.getJobExecutionContext(), errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                logger.error("Error while persisting error details", e);
+            }
+            logger.info(e.getLocalizedMessage(), e);
+            // Save error details to registry
+
+        }
+//        monitorPublisher.publish(monitorID.getStatus());
+        monitorPublisher.publish(jEC.getJobDetails().getJobStatus());
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutputUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutputUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutputUtils.java
new file mode 100644
index 0000000..81bcf66
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/OutputUtils.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * 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.impl;
+
+import org.apache.airavata.common.utils.StringUtil;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class OutputUtils {
+    private static String regexPattern = "\\s*=\\s*(.*)\\r?\\n";
+
+	public static void fillOutputFromStdout(Map<String, Object> output, String stdout, String stderr, List<OutputDataObjectType> outputArray) throws Exception {
+        // this is no longer correct
+//		if (stdout == null || stdout.equals("")) {
+//			throw new GFacHandlerException("Standard output is empty.");
+//		}
+
+		Set<String> keys = output.keySet();
+        OutputDataObjectType actual = null;
+        OutputDataObjectType resultOutput = null;
+		for (String paramName : keys) {
+			actual = (OutputDataObjectType) output.get(paramName);
+			// if parameter value is not already set, we let it go
+
+			if (actual == null) {
+				continue;
+			}
+            resultOutput = new OutputDataObjectType();
+            if (DataType.STDOUT == actual.getType()) {
+                actual.setValue(stdout);
+                resultOutput.setName(paramName);
+                resultOutput.setType(DataType.STDOUT);
+                resultOutput.setValue(stdout);
+                outputArray.add(resultOutput);
+			} else if (DataType.STDERR == actual.getType()) {
+                actual.setValue(stderr);
+                resultOutput.setName(paramName);
+                resultOutput.setType(DataType.STDERR);
+                resultOutput.setValue(stderr);
+                outputArray.add(resultOutput);
+            }
+//			else if ("URI".equals(actual.getType().getType().toString())) {
+//				continue;
+//			} 
+            else {
+                String parseStdout = parseStdout(stdout, paramName);
+                if (parseStdout != null) {
+                    actual.setValue(parseStdout);
+                    resultOutput.setName(paramName);
+                    resultOutput.setType(DataType.STRING);
+                    resultOutput.setValue(parseStdout);
+                    outputArray.add(resultOutput);
+                }
+            }
+        }
+	}
+
+    private static String parseStdout(String stdout, String outParam) throws Exception {
+        String regex = Pattern.quote(outParam) + regexPattern;
+        String match = null;
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(stdout);
+        while (matcher.find()) {
+            match = matcher.group(1);
+        }
+        if (match != null) {
+            match = match.trim();
+            return match;
+        } 
+        return null;
+    }
+
+    public static String[] parseStdoutArray(String stdout, String outParam) throws Exception {
+        String regex = Pattern.quote(outParam) + regexPattern;
+        StringBuffer match = new StringBuffer();
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(stdout);
+        while (matcher.find()) {
+            match.append(matcher.group(1) + StringUtil.DELIMETER);
+        }
+        if (match != null && match.length() >0) {
+        	return StringUtil.getElementsFromString(match.toString());
+        } 
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
new file mode 100644
index 0000000..2f9e3b0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalDirectorySetupHandler.java
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.local.handler;
+
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+
+public class LocalDirectorySetupHandler implements GFacHandler {
+    private static final Logger log = LoggerFactory.getLogger(LocalDirectorySetupHandler.class);
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        log.info("Invoking LocalDirectorySetupHandler ...");
+        log.debug("working directory = " + jobExecutionContext.getWorkingDir());
+        log.debug("temp directory = " + jobExecutionContext.getWorkingDir());
+
+        makeFileSystemDir(jobExecutionContext.getWorkingDir());
+        makeFileSystemDir(jobExecutionContext.getInputDir());
+        makeFileSystemDir(jobExecutionContext.getOutputDir());
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    private void makeFileSystemDir(String dir) throws GFacHandlerException {
+           File f = new File(dir);
+           if (f.isDirectory() && f.exists()) {
+               return;
+           } else if (!new File(dir).mkdir()) {
+               throw new GFacHandlerException("Cannot create directory " + dir);
+           }
+    }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}


[04/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
new file mode 100644
index 0000000..35f6a41
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
@@ -0,0 +1,757 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.*;
+
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.impl.StandardOutReader;
+import org.slf4j.*;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This class is going to be useful to SCP a file to a remote grid machine using my proxy credentials
+ */
+public class SSHUtils {
+    private static final org.slf4j.Logger log = LoggerFactory.getLogger(SSHUtils.class);
+
+    static {
+        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+
+    }
+
+    private ServerInfo serverInfo;
+
+    private GSIAuthenticationInfo authenticationInfo;
+
+    private ConfigReader configReader;
+
+    /**
+     * We need to pass certificateLocation when we use SCPTo method standalone
+     *
+     * @param serverInfo
+     * @param authenticationInfo
+     * @param certificateLocation
+     * @param configReader
+     */
+    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo, String certificateLocation, ConfigReader configReader) {
+        System.setProperty("X509_CERT_DIR", certificateLocation);
+        this.serverInfo = serverInfo;
+        this.authenticationInfo = authenticationInfo;
+        this.configReader = configReader;
+    }
+
+    /**
+     * This can be used when use SCPTo method within SSHAPi because SSHApiFactory already set the system property certificateLocation
+     *
+     * @param serverInfo
+     * @param authenticationInfo
+     * @param configReader
+     */
+    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo
+            , ConfigReader configReader) {
+        this.serverInfo = serverInfo;
+        this.authenticationInfo = authenticationInfo;
+        this.configReader = configReader;
+    }
+
+    /**
+     * This  method will scp the lFile to the rFile location
+     *
+     * @param rFile remote file Path to use in scp
+     * @param lFile local file path to use in scp
+     * @throws IOException
+     * @throws JSchException
+     * @throws org.apache.airavata.gfac.ssh.api.SSHApiException
+     *
+     */
+    public void scpTo(String rFile, String lFile) throws IOException, JSchException, SSHApiException {
+        FileInputStream fis = null;
+        String prefix = null;
+        if (new File(lFile).isDirectory()) {
+            prefix = lFile + File.separator;
+        }
+        JSch jsch = new JSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session = null;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = this.configReader.getProperties();
+        session.setConfig(config);
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        boolean ptimestamp = true;
+
+        // exec 'scp -t rfile' remotely
+        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + rFile;
+        Channel channel = session.openChannel("exec");
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        ((ChannelExec) channel).setCommand(command);
+
+        // get I/O streams for remote scp
+        OutputStream out = channel.getOutputStream();
+        InputStream in = channel.getInputStream();
+
+        channel.connect();
+
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        File _lfile = new File(lFile);
+
+        if (ptimestamp) {
+            command = "T" + (_lfile.lastModified() / 1000) + " 0";
+            // The access time should be sent here,
+            // but it is not accessible with JavaAPI ;-<
+            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
+            out.write(command.getBytes());
+            out.flush();
+            if (checkAck(in) != 0) {
+                 String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+            }
+        }
+
+        // send "C0644 filesize filename", where filename should not include '/'
+        long filesize = _lfile.length();
+        command = "C0644 " + filesize + " ";
+        if (lFile.lastIndexOf('/') > 0) {
+            command += lFile.substring(lFile.lastIndexOf('/') + 1);
+        } else {
+            command += lFile;
+        }
+        command += "\n";
+        out.write(command.getBytes());
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        // send a content of lFile
+        fis = new FileInputStream(lFile);
+        byte[] buf = new byte[1024];
+        while (true) {
+            int len = fis.read(buf, 0, buf.length);
+            if (len <= 0) break;
+            out.write(buf, 0, len); //out.flush();
+        }
+        fis.close();
+        fis = null;
+        // send '\0'
+        buf[0] = 0;
+        out.write(buf, 0, 1);
+        out.flush();
+        if (checkAck(in) != 0) {
+             String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+        out.close();
+
+        stdOutReader.onOutput(channel);
+
+
+        if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        channel.disconnect();
+    }
+
+    /**
+     * This will copy a local file to a remote location
+     *
+     * @param remoteFile remote location you want to transfer the file, this cannot be a directory, if user pass
+     *                   a dirctory we do copy it to that directory but we simply return the directory name
+     *                   todo handle the directory name as input and return the proper final output file name
+     * @param localFile  Local file to transfer, this can be a directory
+     * @param session
+     * @return returns the final remote file path, so that users can use the new file location
+     * @throws IOException
+     * @throws JSchException
+     * @throws SSHApiException
+     */
+    public static String scpTo(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
+        FileInputStream fis = null;
+        String prefix = null;
+        if (new File(localFile).isDirectory()) {
+            prefix = localFile + File.separator;
+        }
+        boolean ptimestamp = true;
+
+        // exec 'scp -t rfile' remotely
+        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + remoteFile;
+        Channel channel = session.openChannel("exec");
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        ((ChannelExec) channel).setCommand(command);
+
+        // get I/O streams for remote scp
+        OutputStream out = channel.getOutputStream();
+        InputStream in = channel.getInputStream();
+
+        channel.connect();
+
+        if (checkAck(in) != 0) {
+             String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        File _lfile = new File(localFile);
+
+        if (ptimestamp) {
+            command = "T" + (_lfile.lastModified() / 1000) + " 0";
+            // The access time should be sent here,
+            // but it is not accessible with JavaAPI ;-<
+            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
+            out.write(command.getBytes());
+            out.flush();
+            if (checkAck(in) != 0) {
+                 String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+            }
+        }
+
+        // send "C0644 filesize filename", where filename should not include '/'
+        long filesize = _lfile.length();
+        command = "C0644 " + filesize + " ";
+        if (localFile.lastIndexOf('/') > 0) {
+            command += localFile.substring(localFile.lastIndexOf('/') + 1);
+        } else {
+            command += localFile;
+        }
+        command += "\n";
+        out.write(command.getBytes());
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        // send a content of lFile
+        fis = new FileInputStream(localFile);
+        byte[] buf = new byte[1024];
+        while (true) {
+            int len = fis.read(buf, 0, buf.length);
+            if (len <= 0) break;
+            out.write(buf, 0, len); //out.flush();
+        }
+        fis.close();
+        fis = null;
+        // send '\0'
+        buf[0] = 0;
+        out.write(buf, 0, 1);
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+        out.close();
+        stdOutReader.onOutput(channel);
+
+
+        channel.disconnect();
+        if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        //since remote file is always a file  we just return the file
+        return remoteFile;
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     * @param session
+     * @return returns the final local file path of the new file came from the remote resource
+     */
+    public static void scpFrom(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+            if (new File(localFile).isDirectory()) {
+                prefix = localFile + File.separator;
+            }
+
+            // exec 'scp -f remotefile' remotely
+            String command = "scp -f " + remoteFile;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+
+            StandardOutReader stdOutReader = new StandardOutReader();
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+
+                String file = null;
+                for (int i = 0; ; i++) {
+                    in.read(buf, i, 1);
+                    if (buf[i] == (byte) 0x0a) {
+                        file = new String(buf, 0, i);
+                        break;
+                    }
+                }
+
+                //System.out.println("filesize="+filesize+", file="+file);
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+
+                // read a content of lfile
+                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
+                int foo;
+                while (true) {
+                    if (buf.length < filesize) foo = buf.length;
+                    else foo = (int) filesize;
+                    foo = in.read(buf, 0, foo);
+                    if (foo < 0) {
+                        // error
+                        break;
+                    }
+                    fos.write(buf, 0, foo);
+                    filesize -= foo;
+                    if (filesize == 0L) break;
+                }
+                fos.close();
+                fos = null;
+
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+            }
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     */
+    public void scpFrom(String remoteFile, String localFile) throws SSHApiException {
+        JSch jsch = new JSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session = null;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = this.configReader.getProperties();
+        session.setConfig(config);
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+            if (new File(localFile).isDirectory()) {
+                prefix = localFile + File.separator;
+            }
+
+            // exec 'scp -f remotefile' remotely
+            StandardOutReader stdOutReader = new StandardOutReader();
+            String command = "scp -f " + remoteFile;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+
+                String file = null;
+                for (int i = 0; ; i++) {
+                    in.read(buf, i, 1);
+                    if (buf[i] == (byte) 0x0a) {
+                        file = new String(buf, 0, i);
+                        break;
+                    }
+                }
+
+                //System.out.println("filesize="+filesize+", file="+file);
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+
+                // read a content of lfile
+                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
+                int foo;
+                while (true) {
+                    if (buf.length < filesize) foo = buf.length;
+                    else foo = (int) filesize;
+                    foo = in.read(buf, 0, foo);
+                    if (foo < 0) {
+                        // error
+                        break;
+                    }
+                    fos.write(buf, 0, foo);
+                    filesize -= foo;
+                    if (filesize == 0L) break;
+                }
+                fos.close();
+                fos = null;
+
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+            }
+
+//            session.disconnect();
+
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+                throw new SSHApiException(stdOutReader.getStdErrorString());
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     * @param session
+     * @return returns the final local file path of the new file came from the remote resource
+     */
+    public static void scpThirdParty(String remoteFileSource, String remoteFileTarget, Session session) throws IOException, JSchException, SSHApiException {
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+         
+            // exec 'scp -f remotefile' remotely
+            String command = "scp -3 " + remoteFileSource + " " + remoteFileTarget;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+
+            StandardOutReader stdOutReader = new StandardOutReader();
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+                int foo;
+                while (true) {
+                	   if (buf.length < filesize) foo = buf.length;
+                       else foo = (int) filesize;
+                    
+                    int len = in.read(buf, 0, foo);
+                    if (len <= 0) break;
+                    out.write(buf, 0, len); 
+                }
+             // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+            }
+            out.close();
+
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    public static void makeDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
+
+        // exec 'scp -t rfile' remotely
+        String command = "mkdir -p " + path;
+        Channel channel = session.openChannel("exec");
+        StandardOutReader stdOutReader = new StandardOutReader();
+
+        ((ChannelExec) channel).setCommand(command);
+
+
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + session.getHost() + ":" + session.getPort() +
+                    " connecting user name - "
+                    + session.getUserName(), e);
+        }
+        stdOutReader.onOutput(channel);
+        if (stdOutReader.getStdErrorString().contains("mkdir:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        channel.disconnect();
+    }
+
+    public static List<String> listDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
+
+        // exec 'scp -t rfile' remotely
+        String command = "ls " + path;
+        Channel channel = session.openChannel("exec");
+        StandardOutReader stdOutReader = new StandardOutReader();
+
+        ((ChannelExec) channel).setCommand(command);
+
+
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + session.getHost() + ":" + session.getPort() +
+                    " connecting user name - "
+                    + session.getUserName(), e);
+        }
+        stdOutReader.onOutput(channel);
+        stdOutReader.getStdOutputString();
+        if (stdOutReader.getStdErrorString().contains("ls:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        channel.disconnect();
+        return Arrays.asList(stdOutReader.getStdOutputString().split("\n"));
+    }
+
+    static int checkAck(InputStream in) throws IOException {
+        int b = in.read();
+        if (b == 0) return b;
+        if (b == -1) return b;
+
+        if (b == 1 || b == 2) {
+            StringBuffer sb = new StringBuffer();
+            int c;
+            do {
+                c = in.read();
+                sb.append((char) c);
+            }
+            while (c != '\n');
+            if (b == 1) { // error
+                System.out.print(sb.toString());
+            }
+            if (b == 2) { // fatal error
+                System.out.print(sb.toString());
+            }
+        }
+        return b;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
deleted file mode 100644
index 351e1af..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- *
- * 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.gsi.ssh;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.globus.common.CoGProperties;
-import org.globus.gsi.GSIConstants;
-import org.globus.gsi.gssapi.GSSConstants;
-import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
-import org.globus.gsi.gssapi.auth.HostAuthorization;
-import org.gridforum.jgss.ExtendedGSSContext;
-import org.gridforum.jgss.ExtendedGSSCredential;
-import org.gridforum.jgss.ExtendedGSSManager;
-import org.ietf.jgss.GSSContext;
-import org.ietf.jgss.GSSCredential;
-import org.ietf.jgss.GSSException;
-import org.ietf.jgss.GSSName;
-import org.ietf.jgss.MessageProp;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.jcraft.jsch.JSchException;
-
-/**
- * This class is based on GSSContextKrb5; it substitutes the globus
- * ExtendedGSSManager and uses the SecurityUtils method to get the credential if
- * one is not passed in from memory.
- *
- */
-public class GSSContextX509 implements com.jcraft.jsch.GSSContext {
-
-    private GSSContext context = null;
-    private GSSCredential credential;
-    private static final Logger logger = LoggerFactory.getLogger(GSSContextX509.class);
-
-    public void create(String user, String host) throws JSchException {
-        try {
-//			ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
-
-            if (credential == null) {
-                try {
-                    credential = getCredential();
-                } catch (SecurityException t) {
-                    System.out.printf("Could not get proxy: %s: %s\n", t.getClass().getSimpleName(), t.getMessage());
-                    throw new JSchException(t.toString());
-                }
-            }
-
-            String cname = host;
-
-            try {
-                cname = InetAddress.getByName(cname).getCanonicalHostName();
-            } catch (UnknownHostException e) {
-            }
-
-            GSSName name = HostAuthorization.getInstance().getExpectedName(credential, cname);
-
-//			context = manager.createContext(name, null, credential, GSSContext.DEFAULT_LIFETIME);
-//
-//			// RFC4462 3.4. GSS-API Session
-//			//
-//			// When calling GSS_Init_sec_context(), the client MUST set
-//			// integ_req_flag to "true" to request that per-message integrity
-//			// protection be supported for this context. In addition,
-//			// deleg_req_flag MAY be set to "true" to request access delegation,
-//			// if
-//			// requested by the user.
-//			//
-//			// Since the user authentication process by its nature authenticates
-//			// only the client, the setting of mutual_req_flag is not needed for
-//			// this process. This flag SHOULD be set to "false".
-//
-//			// TODO: OpenSSH's sshd does accept 'false' for mutual_req_flag
-//			// context.requestMutualAuth(false);
-//			context.requestMutualAuth(true);
-//			context.requestConf(true);
-//			context.requestInteg(true); // for MIC
-//			context.requestCredDeleg(true);
-//			context.requestAnonymity(false);
-
-//            context = new BCGSSContextImpl(name, (GlobusGSSCredentialImpl) credential);
-//            context.requestLifetime(GSSCredential.DEFAULT_LIFETIME);
-//            context.requestCredDeleg(true);
-//            context.requestMutualAuth(true);
-//            context.requestReplayDet(true);
-//            context.requestSequenceDet(true);
-//            context.requestConf(false);
-//            context.requestInteg(true);
-//            ((ExtendedGSSContext)context).setOption(GSSConstants.DELEGATION_TYPE, GSIConstants.DELEGATION_TYPE_FULL);
-
-            return;
-        } catch (GSSException ex) {
-            throw new JSchException(ex.toString());
-        }
-    }
-
-    private static GSSCredential getProxy() {
-        return getProxy(null, GSSCredential.DEFAULT_LIFETIME);
-    }
-
-    /**
-     * @param x509_USER_PROXY
-     *            path to the proxy.
-     * @param credentialLifetime
-     *            in seconds.
-     * @return valid credential.
-     *             if proxy task throws exception (or if proxy cannot be found).
-     */
-    private static GSSCredential getProxy(String x509_USER_PROXY, int credentialLifetime) throws SecurityException {
-        if (x509_USER_PROXY == null)
-            x509_USER_PROXY = System.getProperty("x509.user.proxy");
-
-//		if (x509_USER_PROXY == null) {
-//			SystemUtils.envToProperties();
-//			x509_USER_PROXY = System.getProperty("x509.user.proxy");
-//		}
-
-        if (x509_USER_PROXY == null || "".equals(x509_USER_PROXY))
-            x509_USER_PROXY = CoGProperties.getDefault().getProxyFile();
-
-        if (x509_USER_PROXY == null)
-            throw new SecurityException("could not get credential; no location defined");
-
-        ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
-
-        // file...load file into a buffer
-        try {
-            File f = new File(x509_USER_PROXY);
-            byte[] data = new byte[(int) f.length()];
-            FileInputStream in = new FileInputStream(f);
-            // read in the credential data
-            in.read(data);
-            in.close();
-            return manager.createCredential(data, ExtendedGSSCredential.IMPEXP_OPAQUE, credentialLifetime, null, // use
-                    // default
-                    // mechanism
-                    // -
-                    // GSI
-                    GSSCredential.INITIATE_AND_ACCEPT);
-        } catch (Throwable t) {
-            throw new SecurityException("could not get credential from " + x509_USER_PROXY, t);
-        }
-    }
-
-    public boolean isEstablished() {
-        // this must check to see if the call returned GSS_S_COMPLETE
-        if (context != null){
-            return context.isEstablished();
-        }
-        return false;
-    }
-
-    public byte[] init(byte[] token, int s, int l) throws JSchException {
-        try {
-            if (context != null){
-                return context.initSecContext(token, s, l);
-            }else {
-                throw new JSchException("Context is null..");
-            }
-        } catch (GSSException ex) {
-            throw new JSchException(ex.toString());
-        }
-    }
-
-    public byte[] getMIC(byte[] message, int s, int l) {
-        try {
-            MessageProp prop = new MessageProp(0, false);
-            return context.getMIC(message, s, l, prop);
-        } catch (GSSException ex) {
-            logger.error(ex.getMessage(), ex);
-            return null;
-        }
-    }
-
-    public void dispose() {
-        try {
-            context.dispose();
-        } catch (GSSException ex) {
-        }
-    }
-
-    public void setCredential(GSSCredential credential) {
-        this.credential = credential;
-    }
-
-    public GSSCredential getCredential() {
-        return credential;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Cluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Cluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Cluster.java
deleted file mode 100644
index 34e3b94..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Cluster.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.JobStatus;
-
-import com.jcraft.jsch.Session;
-
-/**
- * This interface represents a Cluster machine
- * End users of the API can implement this and come up with their own
- * implementations, but mostly this interface is for internal usage.
- */
-public interface Cluster {
-
-    /**
-     * This will submit a job to the cluster with a given pbs file and some parameters
-     *
-     * @param pbsFilePath  path of the pbs file
-     * @param workingDirectory working directory where pbs should has to copy
-     * @return jobId after successful job submission
-     * @throws SSHApiException throws exception during error
-     */
-    public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
-
-    /**
-     * This will submit the given job and not performing any monitoring
-     *
-     * @param jobDescriptor  job descriptor to submit to cluster, this contains all the parameter
-     * @return jobID after successful job submission.
-     * @throws SSHApiException  throws exception during error
-     */
-    public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
-
-    /**
-     * This will copy the localFile to remoteFile location in configured cluster
-     *
-     * @param remoteFile remote file location, this can be a directory too
-     * @param localFile local file path of the file which needs to copy to remote location
-     * @throws SSHApiException throws exception during error
-     */
-    public void scpTo(String remoteFile, String localFile) throws SSHApiException;
-
-    /**
-     * This will copy a remote file in path rFile to local file lFile
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile This is the local file to copy, this can be a directory too
-     * @throws SSHApiException
-     */
-    public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
-
-    /**
-     * This will copy a remote file in path rFile to local file lFile
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile This is the local file to copy, this can be a directory too
-     * @throws SSHApiException
-     */
-    public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
-    
-    /**
-     * This will create directories in computing resources
-     * @param directoryPath the full qualified path for the directory user wants to create
-     * @throws SSHApiException throws during error
-     */
-    public void makeDirectory(String directoryPath) throws SSHApiException;
-
-
-    /**
-     * This will get the job description of a job which is there in the cluster
-     * if jbo is not available with the given ID it returns
-     * @param jobID jobId has to pass
-     * @return Returns full job description of the job which submitted successfully
-     * @throws SSHApiException throws exception during error
-     */
-    public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
-
-    /**
-     * This will delete the given job from the queue
-     *
-     * @param jobID  jobId of the job which user wants to delete
-     * @return return the description of the deleted job
-     * @throws SSHApiException throws exception during error
-     */
-    public JobDescriptor cancelJob(String jobID) throws SSHApiException;
-
-    /**
-     * This will get the job status of the the job associated with this jobId
-     *
-     * @param jobID jobId of the job user want to get the status
-     * @return job status of the given jobID
-     * @throws SSHApiException throws exception during error
-     */
-    public JobStatus getJobStatus(String jobID) throws SSHApiException;
-    /**
-     * This will get the job status of the the job associated with this jobId
-     *
-     * @param jobName jobName of the job user want to get the status
-     * @return jobId of the given jobName
-     * @throws SSHApiException throws exception during error
-     */
-    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
-
-    /**
-     * This method can be used to poll the jobstatuses based on the given
-     * user but we should pass the jobID list otherwise we will get unwanted
-     * job statuses which submitted by different middleware outside apache
-     * airavata with the same uername which we are not considering
-     * @param userName userName of the jobs which required to get the status
-     * @param jobIDs precises set of jobIDs
-     * @return
-     */
-    public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
-    /**
-     * This will list directories in computing resources
-     * @param directoryPath the full qualified path for the directory user wants to create
-     * @throws SSHApiException throws during error
-     */
-    public List<String> listDirectory(String directoryPath) throws SSHApiException;
-
-    /**
-     * This method can be used to get created ssh session
-     * to reuse the created session.
-     * @throws SSHApiException
-     */
-    public Session getSession() throws SSHApiException;
-    
-    /**
-     * This method can be used to close the connections initialized
-     * to handle graceful shutdown of the system
-     * @throws SSHApiException
-     */
-    public void disconnect() throws SSHApiException;
-
-    /**
-     * This gives the server Info
-     * @return
-     */
-    public ServerInfo getServerInfo();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
deleted file mode 100644
index e8f92b0..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api;
-
-import com.jcraft.jsch.*;
-import org.apache.airavata.gsi.ssh.api.authentication.*;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.jsch.ExtendedJSch;
-import org.apache.airavata.gsi.ssh.util.SSHAPIUIKeyboardInteractive;
-import org.apache.airavata.gsi.ssh.util.SSHKeyPasswordHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This is a generic class which take care of command execution
- * in a shell, this is used through out the other places of the API.
- */
-public class CommandExecutor {
-    static {
-        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
-        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
-        JSch jSch = new JSch();
-    }
-
-    private static final Logger log = LoggerFactory.getLogger(CommandExecutor.class);
-    public static final String X509_CERT_DIR = "X509_CERT_DIR";
-
-    /**
-     * This will execute the given command with given session and session is not closed at the end.
-     *
-     * @param commandInfo
-     * @param session
-     * @param commandOutput
-     * @throws SSHApiException
-     */
-    public static Session executeCommand(CommandInfo commandInfo, Session session,
-                                         CommandOutput commandOutput) throws SSHApiException {
-
-        String command = commandInfo.getCommand();
-
-        Channel channel = null;
-        try {
-            if (!session.isConnected()) {
-                session.connect();
-            }
-            channel = session.openChannel("exec");
-            ((ChannelExec) channel).setCommand(command);
-        } catch (JSchException e) {
-//            session.disconnect();
-
-            throw new SSHApiException("Unable to execute command - ", e);
-        }
-
-        channel.setInputStream(null);
-        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
-        try {
-            channel.connect();
-        } catch (JSchException e) {
-
-            channel.disconnect();
-//            session.disconnect();
-            throw new SSHApiException("Unable to retrieve command output. Command - " + command, e);
-        }
-
-
-        commandOutput.onOutput(channel);
-        //Only disconnecting the channel, session can be reused
-        channel.disconnect();
-        return session;
-    }
-
-    /**
-     * This will not reuse any session, it will create the session and close it at the end
-     *
-     * @param commandInfo        Encapsulated information about command. E.g :- executable name
-     *                           parameters etc ...
-     * @param serverInfo         The SSHing server information.
-     * @param authenticationInfo Security data needs to be communicated with remote server.
-     * @param commandOutput      The output of the command.
-     * @param configReader       configuration required for ssh/gshissh connection
-     * @throws SSHApiException   throw exception when error occurs
-     */
-    public static void executeCommand(CommandInfo commandInfo, ServerInfo serverInfo,
-                                      AuthenticationInfo authenticationInfo,
-                                      CommandOutput commandOutput, ConfigReader configReader) throws SSHApiException {
-
-        if (authenticationInfo instanceof GSIAuthenticationInfo) {
-            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo)authenticationInfo).getProperties().
-                    get("X509_CERT_DIR"));
-        }
-
-
-        JSch jsch = new ExtendedJSch();
-
-        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
-                + serverInfo.getUserName());
-
-        Session session;
-
-        try {
-            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while creating SSH session." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        java.util.Properties config = configReader.getProperties();
-        session.setConfig(config);
-
-        //=============================================================
-        // Handling vanilla SSH pieces
-        //=============================================================
-        if (authenticationInfo instanceof SSHPasswordAuthentication) {
-            String password = ((SSHPasswordAuthentication) authenticationInfo).
-                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
-
-            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
-
-            // TODO figure out why we need to set password to session
-            session.setPassword(password);
-
-        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
-            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
-                    = (SSHPublicKeyFileAuthentication)authenticationInfo;
-
-            String privateKeyFile = sshPublicKeyFileAuthentication.
-                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
-
-            logDebug("The private key file for vanilla SSH " + privateKeyFile);
-
-            String publicKeyFile = sshPublicKeyFileAuthentication.
-                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
-
-            logDebug("The public key file for vanilla SSH " + publicKeyFile);
-
-            Identity identityFile;
-
-            try {
-                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, jsch);
-            } catch (JSchException e) {
-                throw new SSHApiException("An exception occurred while initializing keys using files. " +
-                        "(private key and public key)." +
-                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                        " connecting user name - "
-                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
-                        publicKeyFile, e);
-            }
-
-            // Add identity to identity repository
-            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
-            identityRepository.add(identityFile);
-
-            // Set repository to session
-            session.setIdentityRepository(identityRepository);
-
-            // Set the user info
-            SSHKeyPasswordHandler sshKeyPasswordHandler
-                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
-
-            session.setUserInfo(sshKeyPasswordHandler);
-
-        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
-
-            SSHPublicKeyAuthentication sshPublicKeyAuthentication
-                    = (SSHPublicKeyAuthentication)authenticationInfo;
-
-            Identity identityFile;
-
-            try {
-                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
-                identityFile = GSISSHIdentityFile.newInstance(name,
-                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
-                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), jsch);
-            } catch (JSchException e) {
-                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
-                        "(private key and public key)." +
-                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                        " connecting user name - "
-                        + serverInfo.getUserName(), e);
-            }
-
-            // Add identity to identity repository
-            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
-            identityRepository.add(identityFile);
-
-            // Set repository to session
-            session.setIdentityRepository(identityRepository);
-
-            // Set the user info
-            SSHKeyPasswordHandler sshKeyPasswordHandler
-                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
-
-            session.setUserInfo(sshKeyPasswordHandler);
-
-        }
-
-        // Not a good way, but we dont have any choice
-        if (session instanceof ExtendedSession) {
-            if (authenticationInfo instanceof GSIAuthenticationInfo) {
-                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo)authenticationInfo);
-            }
-        }
-
-        try {
-            session.connect();
-        } catch (JSchException e) {
-            throw new SSHApiException("An exception occurred while connecting to server." +
-                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        String command = commandInfo.getCommand();
-
-        Channel channel;
-        try {
-            channel = session.openChannel("exec");
-            ((ChannelExec) channel).setCommand(command);
-        } catch (JSchException e) {
-//            session.disconnect();
-
-            throw new SSHApiException("Unable to execute command - " + command +
-                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-
-        channel.setInputStream(null);
-        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
-
-        try {
-            channel.connect();
-        } catch (JSchException e) {
-
-            channel.disconnect();
-//            session.disconnect();
-
-            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
-                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
-                    " connecting user name - "
-                    + serverInfo.getUserName(), e);
-        }
-
-        commandOutput.onOutput(channel);
-
-        channel.disconnect();
-//        session.disconnect();
-    }
-
-    private static void logDebug(String message) {
-        if (log.isDebugEnabled()) {
-            log.debug(message);
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandInfo.java
deleted file mode 100644
index 988bc31..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.airavata.gsi.ssh.api;/*
- *
- * 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.
- *
- */
-
-/**
- * Encapsulates information about
- */
-public interface CommandInfo {
-
-    /**
-     * Gets the executable command as a string.
-     * @return String encoded command. Should be able to execute
-     * directly on remote shell. Should includes appropriate parameters.
-     */
-    String getCommand();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandOutput.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandOutput.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandOutput.java
deleted file mode 100644
index a7866ee..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandOutput.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.airavata.gsi.ssh.api;/*
- *
- * 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.
- *
- */
-
-
-import com.jcraft.jsch.Channel;
-
-import java.io.OutputStream;
-
-/**
- * Output of a certain command. TODO rethink
- */
-public interface CommandOutput {
-
-    /**
-     * Gets the output of the command as a stream.
-     * @param  channel Command output as a stream.
-     */
-    void onOutput(Channel channel);
-
-    /**
-     * Gets standard error as a output stream.
-     * @return Command error as a stream.
-     */
-    OutputStream getStandardError();
-
-    /**
-     * The command exit code.
-     * @param code The program exit code
-     */
-    void exitCode(int code);
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Core.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Core.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Core.java
deleted file mode 100644
index 16353bb..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Core.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api;
-
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-
-/**
- * This represents a CPU core of a machine in the cluster
- */
-public class Core {
-    private JobDescriptor job;
-    private String id;
-
-    public Core(String id) {
-        this.id = id;
-        this.job = null;
-    }
-
-    /**
-     * @return core's id
-     */
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     * @return job running on the core
-     */
-    public JobDescriptor getJob() {
-        return job;
-    }
-
-    public void setJob(JobDescriptor job) {
-        this.job = job;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Node.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Node.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Node.java
deleted file mode 100644
index 4650867..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/Node.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api;
-
-import java.util.HashMap;
-
-public class Node {
-    private String Name;
-    private Core[] Cores;
-    private String state;
-    private HashMap<String, String> status;
-    private String np;
-    private String ntype;
-
-    /**
-     * @return the machine's name
-     */
-    public String getName() {
-        return Name;
-    }
-
-    public void setName(String Name) {
-        this.Name = Name;
-    }
-
-    /**
-     * @return machine cores as an array
-     */
-    public Core[] getCores() {
-        return Cores;
-    }
-
-    public void setCores(Core[] Cores) {
-        this.Cores = Cores;
-    }
-
-
-    /**
-     * @return the machine state
-     */
-    public String getState() {
-        return state;
-    }
-
-    public void setState(String state) {
-        this.state = state;
-    }
-
-    /**
-     * @return the status
-     */
-    public HashMap<String, String> getStatus() {
-        return status;
-    }
-
-    public void setStatus(HashMap<String, String> status) {
-        this.setStatus(status);
-    }
-
-
-    /**
-     * @return the number of cores in the machine
-     */
-    public String getNp() {
-        return np;
-    }
-
-
-    public void setNp(String np) {
-        this.np = np;
-    }
-
-    /**
-     * @return the ntype of the machine
-     */
-    public String getNtype() {
-        return ntype;
-    }
-
-
-    public void setNtype(String ntype) {
-        this.ntype = ntype;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/SSHApiException.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/SSHApiException.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/SSHApiException.java
deleted file mode 100644
index f6f41d3..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/SSHApiException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api;
-
-/**
- * An exception class to wrap SSH command execution related errors.
- */
-public class SSHApiException extends Exception {
-
-    public SSHApiException(String message) {
-        super(message);
-    }
-
-    public SSHApiException(String message, Exception e) {
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/ServerInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/ServerInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/ServerInfo.java
deleted file mode 100644
index 7385f70..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/ServerInfo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.airavata.gsi.ssh.api;/*
- *
- * 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.
- *
- */
-
-/**
- * Encapsulate server information.
- */
-public class ServerInfo {
-
-    private String host;
-    private String userName;
-    private int port = 22;
-
-    public ServerInfo(String userName, String host) {
-        this.userName = userName;
-        this.host = host;
-    }
-
-    public ServerInfo(String userName,String host,  int port) {
-        this.host = host;
-        this.userName = userName;
-        this.port = port;
-    }
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public void setPort(int port) {
-        this.port = port;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/AuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/AuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/AuthenticationInfo.java
deleted file mode 100644
index 84cbae1..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/AuthenticationInfo.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.apache.airavata.gsi.ssh.api.authentication;/*
- *
- * 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.
- *
- */
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 11:25 AM
- */
-
-/**
- * An empty interface that represents authentication data to the API.
- */
-public interface AuthenticationInfo {
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/GSIAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
deleted file mode 100644
index 3ed81c0..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.airavata.gsi.ssh.api.authentication;/*
- *
- * 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.
- *
- */
-
-import org.ietf.jgss.GSSCredential;
-
-import java.util.Properties;
-
-/**
- * Authentication data. Could be MyProxy user name, password, could be GSSCredentials
- * or could be SSH keys.
- */
-public abstract class GSIAuthenticationInfo implements AuthenticationInfo {
-
-    public Properties properties = new Properties();
-
-    public abstract GSSCredential getCredentials() throws SecurityException;
-
-    public Properties getProperties() {
-        return properties;
-    }
-
-    public void setProperties(Properties properties) {
-        this.properties = properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHKeyAuthentication.java
deleted file mode 100644
index f56cdbf..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHKeyAuthentication.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.airavata.gsi.ssh.api.authentication;/*
- *
- * 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.
- *
- */
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 2:39 PM
- */
-
-/**
- * Abstracts out common methods for SSH key authentication.
- */
-public interface SSHKeyAuthentication extends AuthenticationInfo {
-
-    /**
-     * This is needed only if private key and public keys are encrypted.
-     * If they are not encrypted we can just return null.
-     * @return User should return pass phrase if keys are encrypted. If not null.
-     */
-    String getPassPhrase();
-
-    /**
-     * Callback with the banner message. API user can get hold of banner message
-     * by implementing this method.
-     * @param message The banner message.
-     */
-    void bannerMessage(String message);
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPasswordAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
deleted file mode 100644
index f9adcdb..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.authentication;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 11:22 AM
- */
-
-/**
- * Password authentication for vanilla SSH.
- */
-public interface SSHPasswordAuthentication extends AuthenticationInfo {
-
-    /**
-     * Gets the password for given host name and given user name.
-     * @param userName The connecting user name name.
-     * @param hostName The connecting host.
-     * @return Password for the given user.
-     */
-    String getPassword(String userName, String hostName);
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
deleted file mode 100644
index 7c3f5e7..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * 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.gsi.ssh.api.authentication;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 9:48 AM
- */
-
-
-/**
- * Public key authentication for vanilla SSH.
- * The public key and private key are returned as byte arrays. Useful when we store private key/public key
- * in a secure storage such as credential store. API user should implement this.
- */
-public interface SSHPublicKeyAuthentication extends SSHKeyAuthentication {
-
-    /**
-     * Gets the public key as byte array.
-     * @param userName The user who is trying to SSH
-     * @param hostName The host which user wants to connect to.
-     * @return The public key as a byte array.
-     */
-    byte[] getPrivateKey(String userName, String hostName);
-
-    /**
-     * Gets the private key as byte array.
-     * @param userName The user who is trying to SSH
-     * @param hostName The host which user wants to connect to.
-     * @return The private key as a byte array.
-     */
-    byte[] getPublicKey(String userName, String hostName);
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
deleted file mode 100644
index e074acd..0000000
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.airavata.gsi.ssh.api.authentication;/*
- *
- * 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.
- *
- */
-
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 10/4/13
- * Time: 9:52 AM
- */
-
-/**
- * Public key authentication for vanilla SSH.
- * The public key and private key stored files are returned. API user should implement this.
- */
-public interface SSHPublicKeyFileAuthentication extends SSHKeyAuthentication {
-
-    /**
-     * The file which contains the public key.
-     * @param userName The user who is trying to SSH
-     * @param hostName The host which user wants to connect to.
-     * @return The name of the file which contains the public key.
-     */
-    String getPublicKeyFile(String userName, String hostName);
-
-    /**
-     * The file which contains the public key.
-     * @param userName The user who is trying to SSH
-     * @param hostName The host which user wants to connect to.
-     * @return The name of the file which contains the private key.
-     */
-    String getPrivateKeyFile(String userName, String hostName);
-
-
-}


[40/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
index 72c032b..31550fd 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
@@ -8,7 +8,7 @@ import java.util.List;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.GFacUtils;
-import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.core.cluster.Cluster;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
index 61a7437..79f29e4 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.gfac.ssh.impl;
 
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
 import org.apache.airavata.gfac.ssh.api.*;
 import org.apache.airavata.gfac.ssh.config.ConfigReader;
 import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyAuthentication;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/pom.xml b/modules/gfac/gfac-service/pom.xml
index 224537f..b911385 100644
--- a/modules/gfac/gfac-service/pom.xml
+++ b/modules/gfac/gfac-service/pom.xml
@@ -20,7 +20,7 @@
     </parent>
 
     <name>Airavata Gfac Service</name>
-    <artifactId>airavata-gfac-service</artifactId>
+    <artifactId>gfac-service</artifactId>
     <packaging>jar</packaging>
     <url>http://airavata.apache.org/</url>
 
@@ -57,7 +57,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>gfac-impl</artifactId>
             <version>${project.version}</version>
         </dependency>
 	    <dependency>
@@ -72,7 +77,7 @@
         </dependency>
          <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-stubs</artifactId>
+            <artifactId>gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
 	    <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 77a89cc..64c06e4 100644
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -35,16 +35,16 @@ import org.apache.airavata.common.utils.ThriftUtils;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
 import org.apache.airavata.gfac.GFacConfiguration;
 import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.GFac;
 import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
 import org.apache.airavata.gfac.core.GFacUtils;
-import org.apache.airavata.gfac.core.utils.InputHandlerWorker;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
+import org.apache.airavata.gfac.impl.BetterGfacImpl;
+import org.apache.airavata.gfac.impl.InputHandlerWorker;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.messaging.core.MessagingConstants;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 80543df..3a9a48a 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -46,22 +46,16 @@ the License. -->
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-stubs</artifactId>
+            <artifactId>gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-hpc-monitor</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -71,18 +65,6 @@ the License. -->
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-local</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-gsissh</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
             <version>${derby.version}</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml
index 1c22c06..2928014 100644
--- a/modules/workflow-model/workflow-engine/pom.xml
+++ b/modules/workflow-model/workflow-engine/pom.xml
@@ -237,7 +237,7 @@
         </dependency>
          <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-stubs</artifactId>
+            <artifactId>gfac-client</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -259,7 +259,7 @@
         <!-- TODO need clean up -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
 <!--        <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index 8919f1d..520b076 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -229,14 +229,9 @@
         <!-- TODO need clean up -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-<!--        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-ec2</artifactId>
-            <version>${project.version}</version>
-        </dependency>-->
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>


[06/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
new file mode 100644
index 0000000..f9c7f33
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFJobConfiguration.java
@@ -0,0 +1,121 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+
+public class LSFJobConfiguration implements JobManagerConfiguration {
+    private final static Logger logger = LoggerFactory.getLogger(LSFJobConfiguration.class);
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public LSFJobConfiguration(){
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+    public LSFJobConfiguration(String jobDescriptionTemplateName,
+                                 String scriptExtension,String installedPath,OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/") || installedPath.isEmpty()) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    @Override
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "bkill " + jobID);
+    }
+
+    @Override
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    @Override
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "bjobs " + jobID);
+    }
+
+    @Override
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "bjobs -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        return new RawCommandInfo(this.installedPath + "bjobs -J " + jobName);
+    }
+
+    @Override
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    @Override
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "bsub < " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    @Override
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    @Override
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+
+    @Override
+    public String getBaseCancelCommand() {
+        return "bkill";
+    }
+
+    @Override
+    public String getBaseMonitorCommand() {
+        return "bjobs";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "bsub";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
new file mode 100644
index 0000000..c6dea17
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/LSFOutputParser.java
@@ -0,0 +1,130 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class LSFOutputParser implements OutputParser {
+    private final static Logger logger = LoggerFactory.getLogger(LSFOutputParser.class);
+
+    @Override
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+        //todo we need to implement this but we are not using it airavata runtime
+        // if someone is using the gsissh as a tool this will be useful to get a descriptive information about a single job
+    }
+
+    @Override
+    public String parseJobSubmission(String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+        return rawOutput.substring(rawOutput.indexOf("<")+1,rawOutput.indexOf(">"));
+    }
+
+    @Override
+    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
+        boolean jobFount = false;
+        logger.debug(rawOutput);
+        //todo this is not used anymore
+        return JobStatus.C;
+    }
+
+    @Override
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
+        logger.debug(rawOutput);
+
+        String[]    info = rawOutput.split("\n");
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0,8))) {
+                    // now starts processing this line
+                    logger.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+//                    lastStop = i + 1;
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(2)));
+                    }catch(IndexOutOfBoundsException e){
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if(!found)
+                logger.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                logger.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            logger.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+
+    public static void main(String[] args) {
+        String test = "Job <2477982> is submitted to queue <short>.";
+        System.out.println(test.substring(test.indexOf("<")+1, test.indexOf(">")));
+        String test1 = "JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME\n" +
+                "2636607 lg11w   RUN   long       ghpcc06     c11b02      *069656647 Mar  7 00:58\n" +
+                "2636582 lg11w   RUN   long       ghpcc06     c02b01      2134490944 Mar  7 00:48";
+        Map<String, JobStatus> statusMap = new HashMap<String, JobStatus>();
+        statusMap.put("2477983,2134490944", JobStatus.U);
+        LSFOutputParser lsfOutputParser = new LSFOutputParser();
+        try {
+            lsfOutputParser.parseJobStatuses("cjh", statusMap, test1);
+        } catch (SSHApiException e) {
+            logger.error(e.getMessage(), e);
+        }
+        System.out.println(statusMap.get("2477983,2134490944"));
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
new file mode 100644
index 0000000..9730c33
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/OutputParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+import java.util.Map;
+
+public interface OutputParser {
+
+    /**
+     * Tihs can be used to fill a jobdescriptor based on the output
+     * @param descriptor
+     * @return
+     */
+    public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob the result of a job submission to get the JobID
+     * @param rawOutput
+     * @return
+     */
+    public String parseJobSubmission(String rawOutput)throws SSHApiException;
+
+
+    /**
+     * This can be used to get the job status from the output
+     * @param jobID
+     * @param rawOutput
+     */
+    public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
+
+    /**
+     * This can be used to parseSingleJob a big output and get multipleJob statuses
+     * @param statusMap list of status map will return and key will be the job ID
+     * @param rawOutput
+     */
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
+
+    /**
+     * filter the jobId value of given JobName from rawOutput
+     * @param jobName
+     * @param rawOutput
+     * @return
+     * @throws SSHApiException
+     */
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
new file mode 100644
index 0000000..0179e01
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSJobConfiguration.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class PBSJobConfiguration implements JobManagerConfiguration {
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public PBSJobConfiguration() {
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+
+    public PBSJobConfiguration(String jobDescriptionTemplateName,
+                               String scriptExtension, String installedPath, OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qstat -f " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "qsub " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        // For PBS there is no option to get jobDetails by JobName, so we search with userName
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public String  getBaseCancelCommand() {
+        return "qdel";
+    }
+
+    @Override
+    public String  getBaseMonitorCommand() {
+        return "qstat";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "qsub ";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
new file mode 100644
index 0000000..2f17787
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/PBSOutputParser.java
@@ -0,0 +1,212 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class PBSOutputParser implements OutputParser {
+    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
+
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line;
+        for (int i = 0; i < info.length; i++) {
+            if (info[i].contains("=")) {
+                line = info[i].split("=", 2);
+            } else {
+                line = info[i].split(":", 2);
+            }
+            if (line.length >= 2) {
+                String header = line[0].trim();
+                log.debug("Header = " + header);
+                String value = line[1].trim();
+                log.debug("value = " + value);
+
+                if (header.equals("Variable_List")) {
+                    while (info[i + 1].startsWith("\t")) {
+                        value += info[i + 1];
+                        i++;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setVariableList(value);
+                } else if ("Job Id".equals(header)) {
+                    jobDescriptor.setJobID(value);
+                } else if ("Job_Name".equals(header)) {
+                    jobDescriptor.setJobName(value);
+                } else if ("Account_Name".equals(header)) {
+                    jobDescriptor.setAcountString(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("Job_Owner".equals(header)) {
+                    jobDescriptor.setOwner(value);
+                } else if ("resources_used.cput".equals(header)) {
+                    jobDescriptor.setUsedCPUTime(value);
+                } else if ("resources_used.mem".equals(header)) {
+                    jobDescriptor.setUsedMemory(value);
+                } else if ("resources_used.walltime".equals(header)) {
+                    jobDescriptor.setEllapsedTime(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("queue".equals(header))
+                    jobDescriptor.setQueueName(value);
+                else if ("ctime".equals(header)) {
+                    jobDescriptor.setCTime(value);
+                } else if ("qtime".equals(header)) {
+                    jobDescriptor.setQTime(value);
+                } else if ("mtime".equals(header)) {
+                    jobDescriptor.setMTime(value);
+                } else if ("start_time".equals(header)) {
+                    jobDescriptor.setSTime(value);
+                } else if ("comp_time".equals(header)) {
+                    jobDescriptor.setCompTime(value);
+                } else if ("exec_host".equals(header)) {
+                    jobDescriptor.setExecuteNode(value);
+                } else if ("Output_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardOutFile(value);
+                    else {
+                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
+                        i++;
+                    }
+                } else if ("Error_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardErrorFile(value);
+                    else {
+                        String st = info[i + 1].trim();
+                        jobDescriptor.setStandardErrorFile(value + st);
+                        i++;
+                    }
+
+                } else if ("submit_args".equals(header)) {
+                    while (i + 1 < info.length) {
+                        if (info[i + 1].startsWith("\t")) {
+                            value += info[i + 1];
+                            i++;
+                        } else
+                            break;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setSubmitArgs(value);
+                }
+            }
+        }
+    }
+
+    public String parseJobSubmission(String rawOutput) {
+        log.debug(rawOutput);
+        return rawOutput;  //In PBS stdout is going to be directly the jobID
+    }
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) {
+        boolean jobFount = false;
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line = null;
+        int index = 0;
+        for (String anInfo : info) {
+            index++;
+            if (anInfo.contains("Job Id:")) {
+                if (anInfo.contains(jobID)) {
+                    jobFount = true;
+                    break;
+                }
+            }
+        }
+        if (jobFount) {
+            for (int i=index;i<info.length;i++) {
+                String anInfo = info[i];
+                if (anInfo.contains("=")) {
+                    line = anInfo.split("=", 2);
+                    if (line.length != 0) {
+                        if (line[0].contains("job_state")) {
+                            return JobStatus.valueOf(line[1].replaceAll(" ", ""));
+                        }
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
+        log.debug(rawOutput);
+        String[]    info = rawOutput.split("\n");
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0,8))) {
+                    // now starts processing this line
+                    log.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+//                    lastStop = i + 1;
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(9)));
+                    }catch(IndexOutOfBoundsException e){
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if(!found)
+            log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobID.split(",")[0]);
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        Pattern pattern = Pattern.compile("\\s*(?<" + regJobId + ">[^\\s]*).* " + jobName + " "); // regex , JOB_ID will come as first column
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                log.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            log.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
new file mode 100644
index 0000000..54d8f40
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmJobConfiguration.java
@@ -0,0 +1,117 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class SlurmJobConfiguration implements JobManagerConfiguration{
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public SlurmJobConfiguration(){
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+    public SlurmJobConfiguration(String jobDescriptionTemplateName,
+                                   String scriptExtension,String installedPath,OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "scancel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "squeue -j " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory,String pbsFilePath) {
+          return new RawCommandInfo(this.installedPath + "sbatch " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "squeue -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        return new RawCommandInfo(this.installedPath + "squeue -n " + jobName + " -u " + userName);
+    }
+
+    @Override
+    public String getBaseCancelCommand() {
+        return "scancel";
+    }
+
+    @Override
+    public String getBaseMonitorCommand() {
+        return "squeue";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "sbatch";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
new file mode 100644
index 0000000..11fb4ce
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/SlurmOutputParser.java
@@ -0,0 +1,190 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class SlurmOutputParser implements OutputParser {
+    private static final Logger log = LoggerFactory.getLogger(SlurmOutputParser.class);
+    public static final int JOB_NAME_OUTPUT_LENGTH = 8;
+    public static final String STATUS = "status";
+
+    public void parseSingleJob(JobDescriptor descriptor, String rawOutput) throws SSHApiException {
+        log.info(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String lastString = info[info.length - 1];
+        if (lastString.contains("JOB ID")) {
+            // because there's no state
+            descriptor.setStatus("U");
+        } else {
+            int column = 0;
+            System.out.println(lastString);
+            for (String each : lastString.split(" ")) {
+                if (each.trim().isEmpty()) {
+                    continue;
+                } else {
+                    switch (column) {
+                        case 0:
+                            descriptor.setJobID(each);
+                            column++;
+                            break;
+                        case 1:
+                            descriptor.setPartition(each);
+                            column++;
+                            break;
+                        case 2:
+                            descriptor.setJobName(each);
+                            column++;
+                            break;
+                        case 3:
+                            descriptor.setUserName(each);
+                            column++;
+                            break;
+                        case 4:
+                            descriptor.setStatus(each);
+                            column++;
+                            break;
+                        case 5:
+                            descriptor.setUsedCPUTime(each);
+                            column++;
+                            break;
+                        case 6:
+                            try {
+                                int nodes = Integer.parseInt(each);
+                                descriptor.setNodes(nodes);
+                            }catch (Exception e){
+                                log.error("Node count read from command output is not an integer !!!");
+                            }
+                            column++;
+                            break;
+                        case 7:
+                            descriptor.setNodeList(each);
+                            column++;
+                            break;
+                    }
+                }
+            }
+        }
+
+    }
+
+    /**
+     * This can be used to parseSingleJob the outpu of sbatch and extrac the jobID from the content
+     *
+     * @param rawOutput
+     * @return
+     */
+    public String parseJobSubmission(String rawOutput) throws SSHApiException {
+        // FIXME : use regex to match correct jobId;
+        log.info(rawOutput);
+        String[] info = rawOutput.split("\n");
+        for (String anInfo : info) {
+            if (anInfo.contains("Submitted batch job")) {
+                String[] split = anInfo.split("Submitted batch job");
+                return split[1].trim();
+            }
+        }
+        return "";
+//        throw new SSHApiException(rawOutput);  //todo//To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) throws SSHApiException {
+        log.info(rawOutput);
+        Pattern pattern = Pattern.compile(jobID + "(?=\\s+\\S+\\s+\\S+\\s+\\S+\\s+(?<" + STATUS + ">\\w+))");
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return JobStatus.valueOf(matcher.group(STATUS));
+        }
+        return null;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String lastString = info[info.length - 1];
+        if (lastString.contains("JOBID") || lastString.contains("PARTITION")) {
+            log.info("There are no jobs with this username ... ");
+            return;
+        }
+//        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            String jobId = jobID.split(",")[0];
+            String jobName = jobID.split(",")[1];
+            boolean found = false;
+            for (int i = 0; i < info.length; i++) {
+                if (info[i].contains(jobName.substring(0, 8))) {
+                    // now starts processing this line
+                    log.info(info[i]);
+                    String correctLine = info[i];
+                    String[] columns = correctLine.split(" ");
+                    List<String> columnList = new ArrayList<String>();
+                    for (String s : columns) {
+                        if (!"".equals(s)) {
+                            columnList.add(s);
+                        }
+                    }
+                    try {
+                        statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
+                    } catch (IndexOutOfBoundsException e) {
+                        statusMap.put(jobID, JobStatus.valueOf("U"));
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) {
+                log.error("Couldn't find the status of the Job with JobName: " + jobName + "Job Id: " + jobId);
+            }
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        String regJobId = "jobId";
+        if (jobName == null) {
+            return null;
+        } else if(jobName.length() > JOB_NAME_OUTPUT_LENGTH) {
+            jobName = jobName.substring(0, JOB_NAME_OUTPUT_LENGTH);
+        }
+        Pattern pattern = Pattern.compile("(?=(?<" + regJobId + ">\\d+)\\s+\\w+\\s+" + jobName + ")"); // regex - look ahead and match
+        if (rawOutput != null) {
+            Matcher matcher = pattern.matcher(rawOutput);
+            if (matcher.find()) {
+                return matcher.group(regJobId);
+            } else {
+                log.error("No match is found for JobName");
+                return null;
+            }
+        } else {
+            log.error("Error: RawOutput shouldn't be null");
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
new file mode 100644
index 0000000..4fbbe30
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEJobConfiguration.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.File;
+
+public class UGEJobConfiguration implements JobManagerConfiguration {
+
+    private String jobDescriptionTemplateName;
+
+    private String scriptExtension;
+
+    private String installedPath;
+
+    private OutputParser parser;
+
+    public UGEJobConfiguration() {
+        // this can be used to construct and use setter methods to set all the params in order
+    }
+
+    public UGEJobConfiguration(String jobDescriptionTemplateName,
+                               String scriptExtension, String installedPath, OutputParser parser) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+        this.scriptExtension = scriptExtension;
+        this.parser = parser;
+        if (installedPath.endsWith("/")) {
+            this.installedPath = installedPath;
+        } else {
+            this.installedPath = installedPath + "/";
+        }
+    }
+
+    public RawCommandInfo getCancelCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qdel " + jobID);
+    }
+
+    public String getJobDescriptionTemplateName() {
+        return jobDescriptionTemplateName;
+    }
+
+    public void setJobDescriptionTemplateName(String jobDescriptionTemplateName) {
+        this.jobDescriptionTemplateName = jobDescriptionTemplateName;
+    }
+
+    public RawCommandInfo getMonitorCommand(String jobID) {
+        return new RawCommandInfo(this.installedPath + "qstat -j " + jobID);
+    }
+
+    public String getScriptExtension() {
+        return scriptExtension;
+    }
+
+    public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
+        return new RawCommandInfo(this.installedPath + "qsub " +
+                workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
+    }
+
+    public String getInstalledPath() {
+        return installedPath;
+    }
+
+    public void setInstalledPath(String installedPath) {
+        this.installedPath = installedPath;
+    }
+
+    public OutputParser getParser() {
+        return parser;
+    }
+
+    public void setParser(OutputParser parser) {
+        this.parser = parser;
+    }
+
+    public RawCommandInfo getUserBasedMonitorCommand(String userName) {
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
+        // For PBS there is no option to get jobDetails by JobName, so we search with userName
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+    }
+
+    @Override
+    public String  getBaseCancelCommand() {
+        return "qdel";
+    }
+
+    @Override
+    public String  getBaseMonitorCommand() {
+        return "qstat";
+    }
+
+    @Override
+    public String getBaseSubmitCommand() {
+        return "qsub ";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
new file mode 100644
index 0000000..a6cc3ed
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/UGEOutputParser.java
@@ -0,0 +1,188 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class UGEOutputParser implements OutputParser{
+    private static final Logger log = LoggerFactory.getLogger(PBSOutputParser.class);
+    public static final String JOB_ID = "jobId";
+
+    public void parseSingleJob(JobDescriptor jobDescriptor, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        String[] line;
+        for (int i = 0; i < info.length; i++) {
+            if (info[i].contains("=")) {
+                line = info[i].split("=", 2);
+            } else {
+                line = info[i].split(":", 2);
+            }
+            if (line.length >= 2) {
+                String header = line[0].trim();
+                log.debug("Header = " + header);
+                String value = line[1].trim();
+                log.debug("value = " + value);
+
+                if (header.equals("Variable_List")) {
+                    while (info[i + 1].startsWith("\t")) {
+                        value += info[i + 1];
+                        i++;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setVariableList(value);
+                } else if ("Job Id".equals(header)) {
+                    jobDescriptor.setJobID(value);
+                } else if ("Job_Name".equals(header)) {
+                    jobDescriptor.setJobName(value);
+                } else if ("Account_Name".equals(header)) {
+                    jobDescriptor.setAcountString(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("Job_Owner".equals(header)) {
+                    jobDescriptor.setOwner(value);
+                } else if ("resources_used.cput".equals(header)) {
+                    jobDescriptor.setUsedCPUTime(value);
+                } else if ("resources_used.mem".equals(header)) {
+                    jobDescriptor.setUsedMemory(value);
+                } else if ("resources_used.walltime".equals(header)) {
+                    jobDescriptor.setEllapsedTime(value);
+                } else if ("job_state".equals(header)) {
+                    jobDescriptor.setStatus(value);
+                } else if ("queue".equals(header))
+                    jobDescriptor.setQueueName(value);
+                else if ("ctime".equals(header)) {
+                    jobDescriptor.setCTime(value);
+                } else if ("qtime".equals(header)) {
+                    jobDescriptor.setQTime(value);
+                } else if ("mtime".equals(header)) {
+                    jobDescriptor.setMTime(value);
+                } else if ("start_time".equals(header)) {
+                    jobDescriptor.setSTime(value);
+                } else if ("comp_time".equals(header)) {
+                    jobDescriptor.setCompTime(value);
+                } else if ("exec_host".equals(header)) {
+                    jobDescriptor.setExecuteNode(value);
+                } else if ("Output_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardOutFile(value);
+                    else {
+                        jobDescriptor.setStandardOutFile(value + info[i + 1].trim());
+                        i++;
+                    }
+                } else if ("Error_Path".equals(header)) {
+                    if (info[i + 1].contains("=") || info[i + 1].contains(":"))
+                        jobDescriptor.setStandardErrorFile(value);
+                    else {
+                        String st = info[i + 1].trim();
+                        jobDescriptor.setStandardErrorFile(value + st);
+                        i++;
+                    }
+
+                } else if ("submit_args".equals(header)) {
+                    while (i + 1 < info.length) {
+                        if (info[i + 1].startsWith("\t")) {
+                            value += info[i + 1];
+                            i++;
+                        } else
+                            break;
+                    }
+                    value = value.replaceAll("\t", "");
+                    jobDescriptor.setSubmitArgs(value);
+                }
+            }
+        }
+    }
+
+	public String parseJobSubmission(String rawOutput) {
+		log.debug(rawOutput);
+		if (rawOutput != null && !rawOutput.isEmpty()) {
+			String[] info = rawOutput.split("\n");
+			String lastLine = info[info.length - 1];
+			return lastLine.split(" ")[2]; // In PBS stdout is going to be directly the jobID
+		} else {
+			return "";
+		}
+	}
+
+    public JobStatus parseJobStatus(String jobID, String rawOutput) {
+        Pattern pattern = Pattern.compile("job_number:[\\s]+" + jobID);
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return JobStatus.Q; // fixme; return correct status.
+        }
+        return JobStatus.U;
+    }
+
+    public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) {
+        log.debug(rawOutput);
+        String[] info = rawOutput.split("\n");
+        int lastStop = 0;
+        for (String jobID : statusMap.keySet()) {
+            for(int i=lastStop;i<info.length;i++){
+               if(jobID.split(",")[0].contains(info[i].split(" ")[0]) && !"".equals(info[i].split(" ")[0])){
+                   // now starts processing this line
+                   log.info(info[i]);
+                   String correctLine = info[i];
+                   String[] columns = correctLine.split(" ");
+                   List<String> columnList = new ArrayList<String>();
+                   for (String s : columns) {
+                       if (!"".equals(s)) {
+                           columnList.add(s);
+                       }
+                   }
+                   lastStop = i+1;
+                   if ("E".equals(columnList.get(4))) {
+                       // There is another status with the same letter E other than error status
+                       // to avoid that we make a small tweek to the job status
+                       columnList.set(4, "Er");
+                   }
+                   statusMap.put(jobID, JobStatus.valueOf(columnList.get(4)));
+                   break;
+               }
+            }
+        }
+    }
+
+    @Override
+    public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        if (jobName.length() > 10) {
+            jobName = jobName.substring(0, 10);
+        }
+        Pattern pattern = Pattern.compile("(?<" + JOB_ID + ">\\S+)\\s+\\S+\\s+(" + jobName + ")");
+        Matcher matcher = pattern.matcher(rawOutput);
+        if (matcher.find()) {
+            return matcher.group(JOB_ID);
+        }
+        return null;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
new file mode 100644
index 0000000..9658fba
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/config/ConfigReader.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.ssh.config;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * Reads basic configurations.
+ */
+public class ConfigReader {
+
+    private static final String CONFIGURATION_FILE = "gsissh.properties";
+
+
+    private Properties properties;
+
+    /**
+     * Reads configurations from the class path configuration file.
+     * @throws IOException If an error occurred while reading configurations.
+     */
+    public ConfigReader() throws IOException {
+        this.properties = getPropertiesFromClasspath(CONFIGURATION_FILE);
+    }
+
+    private Properties getPropertiesFromClasspath(String propFileName) throws IOException {
+        Properties props = new Properties();
+        InputStream inputStream = this.getClass().getClassLoader()
+                .getResourceAsStream(propFileName);
+
+        if (inputStream == null) {
+            throw new FileNotFoundException("System configuration file '" + propFileName
+                    + "' not found in the classpath");
+        }
+
+        props.load(inputStream);
+
+        return props;
+    }
+
+    public String getConfiguration(String key) {
+        return this.properties.getProperty(key);
+    }
+
+
+    /**
+     * Gets all the SSH related properties used by JSch.
+     * @return All properties.
+     */
+    public Properties getProperties() {
+        return this.properties;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
new file mode 100644
index 0000000..d60ea32
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/DefaultJobSubmissionListener.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.listener.JobSubmissionListener;
+
+public class DefaultJobSubmissionListener extends JobSubmissionListener {
+
+    public void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException {
+        System.out.println("Job status has changed to : " + jobDescriptor.getStatus());
+    }
+
+    @Override
+    public void statusChanged(JobStatus jobStatus) throws SSHApiException {
+        System.out.println("Job status has changed to : " + jobStatus.toString());
+    }
+
+    @Override
+    public boolean isJobDone() throws SSHApiException {
+        return getJobStatus().equals(JobStatus.C);
+    }
+}


[18/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/UGETemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/UGETemplate.xslt b/modules/gfac/gfac-impl/src/main/resources/UGETemplate.xslt
new file mode 100644
index 0000000..5b57265
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/UGETemplate.xslt
@@ -0,0 +1,74 @@
+<!--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. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12">
+<xsl:output method="text" />
+<xsl:template match="/ns:JobDescriptor">
+#! /bin/bash
+# Grid Engine batch job script built by Apache Airavata
+#   <xsl:choose>
+    <xsl:when test="ns:shellName">
+#$ -S <xsl:value-of select="ns:shellName"/>
+    </xsl:when></xsl:choose>
+#$ -V
+    <xsl:choose>
+    <xsl:when test="ns:queueName">
+#$ -q <xsl:value-of select="ns:queueName"/>
+    </xsl:when>
+    </xsl:choose>
+#$ -m beas <xsl:choose>
+<xsl:when test="ns:acountString">
+#$ -A <xsl:value-of select="ns:acountString"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:maxWallTime">
+#$ -l h_rt=<xsl:value-of select="ns:maxWallTime"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:jobName">
+#$ -N <xsl:value-of select="ns:jobName"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#$ -o <xsl:value-of select="ns:standardOutFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="ns:standardOutFile">
+#$ -e <xsl:value-of select="ns:standardErrorFile"/>
+    </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+    <xsl:when test="(ns:nodes) and (ns:processesPerNode)">
+#$ -pe <xsl:value-of select="ns:processesPerNode"/>way <xsl:value-of select="12 * ns:nodes"/>
+<xsl:text>&#xa;</xsl:text>
+    </xsl:when>
+    </xsl:choose>
+<xsl:for-each select="ns:exports/ns:name">
+<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>&#xa;</xsl:text>
+export<xsl:text>   </xsl:text><xsl:value-of select="."/>
+<xsl:text>&#xa;</xsl:text>
+</xsl:for-each>
+<xsl:for-each select="ns:preJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>&#xa;</xsl:text>
+    <xsl:choose><xsl:when test="ns:jobSubmitterCommand">
+<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text>   </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text>   </xsl:text>
+<xsl:for-each select="ns:inputs/ns:input">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+    </xsl:for-each>
+<xsl:for-each select="ns:postJobCommands/ns:command">
+      <xsl:value-of select="."/><xsl:text>   </xsl:text>
+</xsl:for-each>
+
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/errors.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/errors.properties b/modules/gfac/gfac-impl/src/main/resources/errors.properties
new file mode 100644
index 0000000..88c41b8
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/errors.properties
@@ -0,0 +1,197 @@
+#
+#
+# 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.
+#
+
+# Directly copied from jglobus. Not a good way to manager error properties.
+1 = Parameter not supported
+2 = The RSL length is greater than the maximum allowed
+3 = No resources available
+4 = Bad directory specified
+5 = The executable does not exist
+6 = Insufficient funds
+7 = Authentication with the remote server failed
+8 = Job cancelled by user
+9 = Job cancelled by system
+
+10 = Data transfer to the server failed
+11 = The stdin file does not exist
+12 = The connection to the server failed (check host and port)
+13 = The provided RSL 'maxtime' value is invalid (not an integer or must be greater than 0)
+14 = The provided RSL 'count' value is invalid (not an integer or must be greater than 0)
+15 = The job manager received an invalid RSL
+16 = Could not connect to job manager
+17 = The job failed when the job manager attempted to run it
+18 = Paradyn error
+19 = The provided RSL 'jobtype' value is invalid
+
+20 = The provided RSL 'myjob' value is invalid
+21 = The job manager failed to locate an internal script argument file
+22 = The job manager failed to create an internal script argument file
+23 = The job manager detected an invalid job state
+24 = The job manager detected an invalid script response
+25 = The job manager detected an invalid job state
+26 = The provided RSL 'jobtype' value is not supported by this job manager
+27 = Unimplemented
+28 = The job manager failed to create an internal script submission file
+29 = The job manager cannot find the user proxy
+
+30 = The job manager failed to open the user proxy
+31 = The job manager failed to cancel the job as requested
+32 = System memory allocation failed
+33 = The interprocess job communication initialization failed
+34 = The interprocess job communication setup failed
+35 = The provided RSL 'host count' value is invalid
+36 = One of the provided RSL parameters is unsupported
+37 = The provided RSL 'queue' parameter is invalid
+38 = The provided RSL 'project' parameter is invalid
+39 = The provided RSL string includes variables that could not be identified
+
+40 = The provided RSL 'environment' parameter is invalid
+41 = The provided RSL 'dryrun' parameter is invalid
+42 = The provided RSL is invalid (an empty string)
+43 = The job manager failed to stage the executable
+44 = The job manager failed to stage the stdin file
+45 = The requested job manager type is invalid
+46 = The provided RSL 'arguments' parameter is invalid
+47 = The gatekeeper failed to run the job manager
+48 = The provided RSL could not be properly parsed
+49 = There is a version mismatch between GRAM components
+
+50 = The provided RSL 'arguments' parameter is invalid
+51 = The provided RSL 'count' parameter is invalid
+52 = The provided RSL 'directory' parameter is invalid
+53 = The provided RSL 'dryrun' parameter is invalid
+54 = The provided RSL 'environment' parameter is invalid
+55 = The provided RSL 'executable' parameter is invalid
+56 = The provided RSL 'host_count' parameter is invalid
+57 = The provided RSL 'jobtype' parameter is invalid
+58 = The provided RSL 'maxtime' parameter is invalid
+59 = The provided RSL 'myjob' parameter is invalid
+
+60 = The provided RSL 'paradyn' parameter is invalid
+61 = The provided RSL 'project' parameter is invalid
+62 = The provided RSL 'queue' parameter is invalid
+63 = The provided RSL 'stderr' parameter is invalid
+64 = The provided RSL 'stdin' parameter is invalid
+65 = The provided RSL 'stdout' parameter is invalid
+66 = The job manager failed to locate an internal script
+67 = The job manager failed on the system call pipe()
+68 = The job manager failed on the system call fcntl()
+69 = The job manager failed to create the temporary stdout filename
+
+70 = The job manager failed to create the temporary stderr filename
+71 = The job manager failed on the system call fork()
+72 = The executable file permissions do not allow execution
+73 = The job manager failed to open stdout
+74 = The job manager failed to open stderr
+75 = The cache file could not be opened in order to relocate the user proxy
+76 = Cannot access cache files in ~/.globus/.gass_cache, check permissions, quota, and disk space
+77 = The job manager failed to insert the contact in the client contact list
+78 = The contact was not found in the job manager's client contact list
+79 = Connecting to the job manager failed.  Possible reasons: job terminated, invalid job contact, network problems, ...
+
+80 = The syntax of the job contact is invalid
+81 = The executable parameter in the RSL is undefined
+82 = The job manager service is misconfigured.  condor arch undefined
+83 = The job manager service is misconfigured.  condor os undefined
+84 = The provided RSL 'min_memory' parameter is invalid
+85 = The provided RSL 'max_memory' parameter is invalid
+86 = The RSL 'min_memory' value is not zero or greater
+87 = The RSL 'max_memory' value is not zero or greater
+88 = The creation of a HTTP message failed
+89 = Parsing incoming HTTP message failed
+
+90 = The packing of information into a HTTP message failed
+91 = An incoming HTTP message did not contain the expected information
+92 = The job manager does not support the service that the client requested
+93 = The gatekeeper failed to find the requested service
+94 = The jobmanager does not accept any new requests (shutting down)
+95 = The client failed to close the listener associated with the callback URL
+96 = The gatekeeper contact cannot be parsed
+97 = The job manager could not find the 'poe' command
+98 = The job manager could not find the 'mpirun' command
+99 = The provided RSL 'start_time' parameter is invalid"
+100 = The provided RSL 'reservation_handle' parameter is invalid
+
+101 = The provided RSL 'max_wall_time' parameter is invalid
+102 = The RSL 'max_wall_time' value is not zero or greater
+103 = The provided RSL 'max_cpu_time' parameter is invalid
+104 = The RSL 'max_cpu_time' value is not zero or greater
+105 = The job manager is misconfigured, a scheduler script is missing
+106 = The job manager is misconfigured, a scheduler script has invalid permissions
+107 = The job manager failed to signal the job
+108 = The job manager did not recognize/support the signal type
+109 = The job manager failed to get the job id from the local scheduler
+
+110 = The job manager is waiting for a commit signal
+111 = The job manager timed out while waiting for a commit signal
+112 = The provided RSL 'save_state' parameter is invalid
+113 = The provided RSL 'restart' parameter is invalid
+114 = The provided RSL 'two_phase' parameter is invalid
+115 = The RSL 'two_phase' value is not zero or greater
+116 = The provided RSL 'stdout_position' parameter is invalid
+117 = The RSL 'stdout_position' value is not zero or greater
+118 = The provided RSL 'stderr_position' parameter is invalid
+119 = The RSL 'stderr_position' value is not zero or greater
+
+120 = The job manager restart attempt failed
+121 = The job state file doesn't exist
+122 = Could not read the job state file
+123 = Could not write the job state file
+124 = The old job manager is still alive
+125 = The job manager state file TTL expired
+126 = It is unknown if the job was submitted
+127 = The provided RSL 'remote_io_url' parameter is invalid
+128 = Could not write the remote io url file
+129 = The standard output/error size is different
+
+130 = The job manager was sent a stop signal (job is still running)
+131 = The user proxy expired (job is still running)
+132 = The job was not submitted by original jobmanager
+133 = The job manager is not waiting for that commit signal
+134 = The provided RSL scheduler specific parameter is invalid
+135 = The job manager could not stage in a file
+136 = The scratch directory could not be created
+137 = The provided 'gass_cache' parameter is invalid
+138 = The RSL contains attributes which are not valid for job submission
+139 = The RSL contains attributes which are not valid for stdio update
+
+140 = The RSL contains attributes which are not valid for job restart
+141 = The provided RSL 'file_stage_in' parameter is invalid
+142 = The provided RSL 'file_stage_in_shared' parameter is invalid
+143 = The provided RSL 'file_stage_out' parameter is invalid
+144 = The provided RSL 'gass_cache' parameter is invalid
+145 = The provided RSL 'file_cleanup' parameter is invalid
+146 = The provided RSL 'scratch_dir' parameter is invalid
+147 = The provided scheduler-specific RSL parameter is invalid
+148 = A required RSL attribute was not defined in the RSL spec
+149 = The gass_cache attribute points to an invalid cache directory
+
+150 = The provided RSL 'save_state' parameter has an invalid value
+151 = The job manager could not open the RSL attribute validation file
+152 = The  job manager could not read the RSL attribute validation file
+153 = The provided RSL 'proxy_timeout' is invalid
+154 = The RSL 'proxy_timeout' value is not greater than zero
+155 = The job manager could not stage out a file
+156 = The job contact string does not match any which the job manager is handling
+157 = Proxy delegation failed
+158 = The job manager could not lock the state lock file
+
+1000 = Failed to start up callback handler
+1003 = Job contact not set

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/AccessPolicy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/AccessPolicy.json b/modules/gfac/gfac-impl/src/main/resources/schema/AccessPolicy.json
new file mode 100644
index 0000000..8f6cfe1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/AccessPolicy.json
@@ -0,0 +1,13 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AccessPolicy.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
+  "properties": {
+    "EndpointID": {
+      "type": "string",
+      "description": "The ID of the Endpoint this AccessPolicy is for"
+    }
+  },
+  "required": ["EndpointID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Activity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Activity.json b/modules/gfac/gfac-impl/src/main/resources/schema/Activity.json
new file mode 100644
index 0000000..8bd2495
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Activity.json
@@ -0,0 +1,31 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "UserDomainID": {
+      "type": "string",
+      "description": "An ID"
+    },
+    "EndpointID": {
+      "type": "string",
+      "description": "The ID of the Endpoint managing Activity"
+    },
+    "ShareID": {
+      "type": "string",
+      "description": "The ID of the Share servicing this Activity"
+    },
+    "ResourceID": {
+      "type": "string",
+      "description": "The ID of the Resource executing this Activity"
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "The IDs of other Activities related to this one",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/AdminDomain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/AdminDomain.json b/modules/gfac/gfac-impl/src/main/resources/schema/AdminDomain.json
new file mode 100644
index 0000000..8ed4606
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/AdminDomain.json
@@ -0,0 +1,51 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AdminDomain.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
+  "properties": {
+    "Distributed": {
+      "type": "boolean",
+      "description": "true if the services managed by the AdminDomain are geographically distributed"
+    },
+    "Owner": {
+      "type": "array",
+      "description": "Identification of persons or legal entities that own the resources in this AdminDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "IDs of Services in this AdminDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ChildDomainID": {
+      "type": "array",
+      "description": "IDs of AdminDomains aggregated by this AdminDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ParentDomainID": {
+      "type": "string",
+      "description": "The ID of the AdminDomain that this AdminDomain participates in"
+    },
+    "ComputingServiceID": {
+      "type": "array",
+      "description": "IDs of ComputingServices in this AdminDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "StorageServiceID": {
+      "type": "array",
+      "description": "IDs of StorageServices in this AdminDomain",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationEnvironment.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationEnvironment.json b/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationEnvironment.json
new file mode 100644
index 0000000..89c78e0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationEnvironment.json
@@ -0,0 +1,86 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationEnvironment.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "AppName": {
+      "type": "string",
+      "description": "The name of the application"
+    },
+    "AppVersion": {
+      "type": "string",
+      "description": "The version of the application"
+    },
+    "State": {
+      "type": "string",
+      "description": "The current installation state of the application - AppEnvState_t"
+    },
+    "RemovalDate": {
+      "type": "string",
+      "description": "The date/time after which the application may be removed - DateTime_t"
+    },
+    "License": {
+      "type": "string",
+      "description": "The license under which the application is usable - License_t"
+    },
+    "Description": {
+      "type": "string",
+      "description": "A human-readable description of the application"
+    },
+    "BestBenchmark": {
+      "type": "array",
+      "description": "The type(s) of the benchmarks which best describe the sensitivity of this application to the performance of the ExecutionEnvironment - Benchmark_t",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ParallelSupport": {
+      "type": "string",
+      "description": "The type of supported parallel execution - ParallelSupport_t"
+    },
+    "MaxSlots": {
+      "type": "integer",
+      "description": "The maximum number of concurrent slots that may be used to run the application"
+    },
+    "MaxJobs": {
+      "type": "integer",
+      "description": "The maximum number of concurrent jobs that can run the application"
+    },
+    "MaxUserSeats": {
+      "type": "integer",
+      "description": "The maximum number of concurrent users that can run the application"
+    },
+    "FreeSlots": {
+      "type": "integer",
+      "description": "The maximum number slots currently available to run the application"
+    },
+    "FreeJobs": {
+      "type": "integer",
+      "description": "The maximum number of additional jobs that can run the application"
+    },
+    "FreeUserSeats": {
+      "type": "integer",
+      "description": "The maximum number of additional users that can run the application"
+    },
+    "ExecutionEnvironmentID": {
+      "type": "array",
+      "description": "ID(s) of ExecutionEnvironments where this ApplicationEnvironment can be used",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ComputingManagerID": {
+      "type": "string",
+      "description": "ID of the ComputingManager this ApplicationEnvironment is associated with"
+    },
+    "ApplicationHandleID": {
+      "type": "array",
+      "description": "ID(s) of the ApplicationHandles that can be used to refer to this environment",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["AppName","ComputingManagerID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationHandle.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationHandle.json b/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationHandle.json
new file mode 100644
index 0000000..e7972e9
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ApplicationHandle.json
@@ -0,0 +1,21 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationHandle.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of method used to set up an ApplicationEnvironment - ApplicationHandle_t (open enumeration)"
+    },
+    "Value": {
+      "type": "string",
+      "description": "How to set up the ApplicationEnvironment in the context of the Type"
+    },
+    "ApplicationEnvironmentID": {
+      "type": "string",
+      "description": "The ID of the ApplicationEnvironment this ApplicationHandle refers to"
+    }
+  },
+  "required": ["Type","Value","ApplicationEnvironmentID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Benchmark.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Benchmark.json b/modules/gfac/gfac-impl/src/main/resources/schema/Benchmark.json
new file mode 100644
index 0000000..2b64261
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Benchmark.json
@@ -0,0 +1,21 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Benchmark.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of the benchmark - Benchmark_t (open enumeration)"
+    },
+    "Value": {
+      "type": "number",
+      "description": "The value of the benchmark"
+    },
+    "ComputingManagerID": {
+      "type": "string",
+      "description": "The ID of the ComputingManager this benchmark is for"
+    }
+  },
+  "required": ["Type","Value"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ComputingActivity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ComputingActivity.json b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingActivity.json
new file mode 100644
index 0000000..5fcae72
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingActivity.json
@@ -0,0 +1,165 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingActivity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "closed enumeration ComputingActivityType_t",
+      "enum": ["collectionelement","parallelelement","single","workflownode"]
+    },
+    "IDFromEndpoint": {
+      "type": "string",
+      "description": "The ID assigned by the ComputingEndpoint"
+    },
+    "LocalIDFromManager": {
+      "type": "string",
+      "description": "The local ID assigned by the ComputingManager"
+    },
+    "State": {
+      "type": "array",
+      "description": "open enumeration ComputingActivityState_t",
+      "items": {
+        "type": "string"
+      },
+      "minItems": 1
+    },
+    "RestartState": {
+      "type": "array",
+      "description": "open enumeration ComputingActivityState_t",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ExitCode": {
+      "type": "integer",
+      "description": "The exit code as returned by the main executable code or script of the job"
+    },
+    "ComputingManagerExitCode": {
+      "type": "string",
+      "description": "The exit code provided by the ComputingManager"
+    },
+    "Error": {
+      "type": "array",
+      "description": "The error messages as provided by the software components involved in the management of the job",
+      "items": {
+        "type": "string"
+      }
+    },
+    "WaitingPosition": {
+      "type": "integer",
+      "description": "The position of the job in the queue, if the job is waiting"
+    },
+    "Owner": {
+      "type": "string",
+      "description": "The Grid identity of the job's owner"
+    },
+    "LocalOwner": {
+      "type": "string",
+      "description": "The local user name of the job's owner"
+    },
+    "RequestedTotalWallTime": {
+      "type": "integer",
+      "description": "The total wall clock time requested by the job"
+    },
+    "RequestedTotalCPUTime": {
+      "type": "integer",
+      "description": "The total CPU time requested by the job"
+    },
+    "RequestedSlots": {
+      "type": "integer",
+      "description": "The number of slots requested for the job"
+    },
+    "RequestedApplicationEnvironment": {
+      "type": "array",
+      "description": "The AppName and Version of the requested ApplicationEnvironments",
+      "items": {
+        "type": "string"
+      }
+    },
+    "StdIn": {
+      "type": "string",
+      "description": "The name of the file used for standard input"
+    },
+    "StdOut": {
+      "type": "string",
+      "description": "The name of the file used for standard output"
+    },
+    "StdErr": {
+      "type": "string",
+      "description": "The name of the file used for standard error"
+    },
+    "LogDir": {
+      "type": "string",
+      "description": "The name of the directory which contains job logs"
+    },
+    "ExecutionNode": {
+      "type": "array",
+      "description": "Hostnames associated with the ExecutionEnvironments running the job",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Queue": {
+      "type": "string",
+      "description": "The name of the ComputingManager queue that held the job before execution"
+    },
+    "UsedTotalWallTime": {
+      "type": "integer",
+      "description": "The total wall clock time consumed by the job so far (slots*seconds)"
+    },
+    "UsedTotalCpuTime": {
+      "type": "integer",
+      "description": "The total CPU time consumed by the job so far (seconds)"
+    },
+    "UsedMainMemory": {
+      "type": "integer",
+      "description": "The physical RAM currently used by the job (MB)"
+    },
+    "SubmissionTime": {
+      "type": "string",
+      "description": "The time when the job was submitted to the ComputingEndpoint (DateTime_t)"
+    },
+    "ComputingManagerSubmissionTime": {
+      "type": "string",
+      "description": "The time when the job was submitted to the ComputingManager (DateTime_t)"
+    },
+    "StartTime": {
+      "type": "string",
+      "description": "The time when the ComputingManager started the job (DateTime_t)"
+    },
+    "EndTime": {
+      "type": "string",
+      "description": "The time when the job ended in the Grid layer (DateTime_t)"
+    },
+    "ComputingManagerEndTime": {
+      "type": "string",
+      "description": "The time when the job ended according to the ComputingManager (DateTime_t)"
+    },
+    "WorkingAreaEraseTime": {
+      "type": "string",
+      "description": "The time when working area will be removed from storage (DateTime_t)"
+    },
+    "ProxyExpirationTime": {
+      "type": "string",
+      "description": "The expiration time of the Grid proxy associated with the job (DateTime_t)"
+    },
+    "SubmissionHost": {
+      "type": "string",
+      "description": "The name of the host from which the job was submitted"
+    },
+    "SubmissionClientName": {
+      "type": "string",
+      "description": "The name of the software client used to submit the job"
+    },
+    "OtherMessages": {
+      "type": "array",
+      "description": "Optional messages provided by either the Grid layer or the ComputingManager",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["State","Owner"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ComputingEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ComputingEndpoint.json b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingEndpoint.json
new file mode 100644
index 0000000..f94f889
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingEndpoint.json
@@ -0,0 +1,44 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingEndpoint.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
+  "properties": {
+    "Staging": {
+      "type": "string",
+      "description": "Supported file staging functionality - Staging_t",
+      "enum": ["none","stagingin","staginginout","stagingout"]
+    },
+    "JobDescription": {
+      "type": "array",
+      "description": "Supported job description languages - JobDescription_t (open Enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "TotalJobs": {
+      "type": "integer",
+      "description": "The total number of Grid jobs known to the system"
+    },
+    "RunningJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs which are running in an ExecutionEnvironment"
+    },
+    "WaitingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs which are waiting to start executing"
+    },
+    "StagingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs staging files before or after execution"
+    },
+    "SuspendedJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs that started to execute, but are now suspended"
+    },
+    "PreLRMSWaitingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs managed by the Grid software, but not yet passed to the LRMS"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ComputingManager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ComputingManager.json b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingManager.json
new file mode 100644
index 0000000..aecb114
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingManager.json
@@ -0,0 +1,117 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingManager.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+    "Reservation": {
+      "type": "boolean",
+      "description": "Whether advance reservation is supported (no value implies undefined in ExtendedBoolean_t)"
+    },
+    "BulkSubmission": {
+      "type": "boolean",
+      "description": "Whether multiple jobs can be submitted at once (no value implies undefined in ExtendedBoolean_t)"
+    },
+    "TotalPhysicalCPUs": {
+      "type": "integer",
+      "description": "The total number of physical CPUs managed by this ComputingManager"
+    },
+    "TotalLogicalCPUs": {
+      "type": "integer",
+      "description": "The total number of logical CPUs managed by this ComputingManager"
+    },
+    "TotalSlots": {
+      "type": "integer",
+      "description": "The total number of slots managed by this ComputingManager"
+    },
+    "SlotsUsedByLocalJobs": {
+      "type": "integer",
+      "description": "The number of slots currently used by jobs submitted via a non-Grid interface"
+    },
+    "SlotsUsedByGridJobs": {
+      "type": "integer",
+      "description": "The number of slots currently used by jobs submitted via a non-Grid interface"
+    },
+    "Homogeneous": {
+      "type": "boolean",
+      "description": "Whether this ComputingManager manages only one type of ExecutionEnvironment"
+    },
+    "NetworkInfo": {
+      "type": "array",
+      "description": "The types of internal network connections between ExecutionEnvironments (NetworkInfo_t)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "LocalCPUDistribution": {
+      "type": "boolean",
+      "description": "Classification of the managed ExecutionEnvironments aggregated by the number of logical CPUs"
+    },
+    "WorkingAreaShared": {
+      "type": "boolean",
+      "description": "True if the working area is shared across different ExecutionEnvironments"
+    },
+    "WorkingAreaGuaranteed": {
+      "type": "boolean",
+      "description": "True if the job is guaranteed all of WorkingAreaTotal"
+    },
+    "WorkingAreaTotal": {
+      "type": "integer",
+      "description": "Total size of the working area available to single slot jobs (GB)"
+    },
+    "WorkingAreaFree": {
+      "type": "integer",
+      "description": "The amount of free space in the working area (GB)"
+    },
+    "WorkingAreaLifeTime": {
+      "type": "integer",
+      "description": "The minimum guaranteed lifetime of files created in the working area (seconds)"
+    },
+    "WorkingAreaMultiSlotTotal": {
+      "type": "integer",
+      "description": "The total size of the working area across all ExecutionEnvironments (GB)"
+    },
+    "WorkingAreaMultiSlotFree": {
+      "type": "integer",
+      "description": "The available space in the working area across all ExecutionEnvironments (GB)"
+    },
+    "WorkingAreaMultiSlotLifeTime": {
+      "type": "integer",
+      "description": "The minimum guaranteed lifetime of files created in the working area (seconds)"
+    },
+    "CacheTotal": {
+      "type": "integer",
+      "description": "If local caching of input files is supported, the total size of the area they may be stored in"
+    },
+    "CacheFree": {
+      "type": "integer",
+      "description": "If local caching of input files is supported, the available size of the area they may be stored in"
+    },
+    "TmpDir": {
+      "type": "string",
+      "description": "The absolute path of a temporary directory local to an ExecutionEnvironment"
+    },
+    "ScratchDir": {
+      "type": "string",
+      "description": "The absolute path of a shared directory available for application data"
+    },
+    "ApplicationDir": {
+      "type": "string",
+      "description": "The absolute path of a directory available for installation of persistent application software"
+    },
+    "ApplicationEnvironmentID": {
+      "type": "array",
+      "description": "ID(s) of ApplicationEnvironments provided by this ComputingManager",
+      "items": {
+        "type": "string"
+      }
+    },
+    "BenchmarkID": {
+      "type": "array",
+      "description": "ID(s) of Benchmarks associated with this ComputingManager",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ComputingService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ComputingService.json b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingService.json
new file mode 100644
index 0000000..9cfde1b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingService.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
+  "properties": {
+    "TotalJobs": {
+      "type": "integer",
+      "description": "The total number of Grid jobs known to the system"
+    },
+    "RunningJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs which are running in an ExecutionEnvironment"
+    },
+    "WaitingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs which are waiting to start executing"
+    },
+    "StagingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs staging files before or after execution"
+    },
+    "SuspendedJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs that started to execute, but are now suspended"
+    },
+    "PreLRMSWaitingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs managed by the Grid software, but not yet passed to the LRMS"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ComputingShare.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ComputingShare.json b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingShare.json
new file mode 100644
index 0000000..340c83e
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ComputingShare.json
@@ -0,0 +1,182 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingShare.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+    "MappingQueue": {
+      "type": "string",
+      "description": "The name of the queue in the LRMS where jobs in this share are submitted"
+    },
+    "MaxWallTime": {
+      "type": "integer",
+      "description": "The maximum wall clock time that a single-slot job can run (seconds)"
+    },
+    "MaxMultiSlotWallTime": {
+      "type": "integer",
+      "description": "The maximum wall clock time that a multi-slot job can run (seconds)"
+    },
+    "DefaultWallTime": {
+      "type": "integer",
+      "description": "The default wall clock per slot assumed by the LRMS if a maximum time is not specified (seconds)"
+    },
+    "MaxCPUTime": {
+      "type": "integer",
+      "description": "The maximum pre-slot CPU time that a job can request (seconds)"
+    },
+    "MaxTotalCPUTime": {
+      "type": "integer",
+      "description": "The maximum amount of CPU time that a job can request across all slots assigned to it (seconds)"
+    },
+    "MinCPUTime": {
+      "type": "integer",
+      "description": "The minimum pre-slot CPU time that a job can request (seconds)"
+    },
+    "DefaultCPUTime": {
+      "type": "integer",
+      "description": "The default CPU time limit assumed by the LRMS if a maximum time is not specified (seconds)"
+    },
+    "MaxTotalJobs": {
+      "type": "integer",
+      "description": "The maximum number of jobs that can be in this Share"
+    },
+    "MaxRunningJobs": {
+      "type": "integer",
+      "description": "The maximum number of jobs that can be running in this Share"
+    },
+    "MaxWaitingJobs": {
+      "type": "integer",
+      "description": "The maximum number of jobs that can be waiting in this Share"
+    },
+    "MaxPreLRMSWaitingJobs": {
+      "type": "integer",
+      "description": "The maximum number of jobs that can be waiting in the Grid layer for this Share"
+    },
+    "MaxUserRunningJobs": {
+      "type": "integer",
+      "description": "The maximum number of jobs that can be running in this Share per user"
+    },
+    "MaxSlotsPerJob": {
+      "type": "integer",
+      "description": "The maximum number of slots that can be allocated to a single job in this Share"
+    },
+    "MaxStageInStreams": {
+      "type": "integer",
+      "description": "The maximum number of streams available to stage files in"
+    },
+    "MaxStageOutStreams": {
+      "type": "integer",
+      "description": "The maximum number of streams available to stage files out"
+    },
+    "ScheduingPolicy": {
+      "type": "string",
+      "description": "The scheduling policy used by the share - SchedulingPolicy_t (open enumeration)"
+    },
+    "MaxMainMemory": {
+      "type": "integer",
+      "description": "The maximum amount of physical RAM that a job can use (MB)"
+    },
+    "GuaranteedMainMemory": {
+      "type": "integer",
+      "description": "The amount of physical RAM that a job will have available (MB)"
+    },
+    "MaxVirtualMemory": {
+      "type": "integer",
+      "description": "The maximum amount memory (RAM+swap) that a job can use (MB)"
+    },
+    "GuaranteedVirtualMemory": {
+      "type": "integer",
+      "description": "The amount of memory (RAM+swap) that a job will have available (MB)"
+    },
+    "MaxDiskSpace": {
+      "type": "integer",
+      "description": "The maximum disk space that a job can use in the working area (GB)"
+    },
+    "DefaultStorageServiceID": {
+      "type": "string",
+      "description": "The ID of the default StorageService used to store files"
+    },
+    "Preemption": {
+      "type": "boolean",
+      "description": "Whether jobs can be preempted and resumed (no value implies undefined in ExtendedBoolean_t)"
+    },
+    "ServingState": {
+      "type": "string",
+      "description": "How the Share is currently serving jobs",
+      "enum": ["closed","draining","production","queueing"]
+    },
+    "TotalJobs": {
+      "type": "integer",
+      "description": "The total number of jobs in any state"
+    },
+    "RunningJobs": {
+      "type": "integer",
+      "description": "The number of running jobs submitted through Grid or non-Grid interfaces"
+    },
+    "LocalRunningJobs": {
+      "type": "integer",
+      "description": "The number of running jobs submitted using non-Grid interfaces"
+    },
+    "WaitingJobs": {
+      "type": "integer",
+      "description": "The number of waiting jobs submitted through Grid or non-Grid interfaces"
+    },
+    "LocalWaitingJobs": {
+      "type": "integer",
+      "description": "The number of waiting jobs submitted using non-Grid interfaces"
+    },
+    "SuspendedJobs": {
+      "type": "integer",
+      "description": "The number of suspended jobs submitted through Grid or non-Grid interfaces"
+    },
+    "LocalSuspendedJobs": {
+      "type": "integer",
+      "description": "The number of suspended jobs submitted using non-Grid interfaces"
+    },
+    "StagingJobs": {
+      "type": "integer",
+      "description": "The number of jobs staging files before or after execution"
+    },
+    "PreLRMSWaitingJobs": {
+      "type": "integer",
+      "description": "The number of Grid jobs which have not yet been passed to the LRMS"
+    },
+    "EstimatedAverageWaitingTime": {
+      "type": "integer",
+      "description": "An estimate of the average time a job will wait before it starts to execute (seconds)"
+    },
+    "EstimatedWorstWaitingTime": {
+      "type": "integer",
+      "description": "An estimate of the worst-case time a job will wait before it starts to execute (seconds)"
+    },
+    "FreeSlots": {
+      "type": "integer",
+      "description": "The number of slots which are currently available for use"
+    },
+    "FreeSlotsWithDuration": {
+      "type": "string",
+      "description": "The number of slots which are currently available for use and how long they are available"
+    },
+    "UsedSlots": {
+      "type": "integer",
+      "description": "The number of slots currently in use"
+    },
+    "RequestedSlots": {
+      "type": "integer",
+      "description": "The number of slots needd to execute all waiting and staging jobs"
+    },
+    "ReservationPolicy": {
+      "type": "string",
+      "description": "The policy used for advance reservation - ReservationPolicy_t",
+      "enum": ["mandatory","none","optional"]
+    },
+    "Tag": {
+      "type": "array",
+      "description": "UserDomain-defined tags for this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ServingState"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Contact.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Contact.json b/modules/gfac/gfac-impl/src/main/resources/schema/Contact.json
new file mode 100644
index 0000000..436b262
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Contact.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Contact.json",
+  "description": "A GLUE 2 Contact",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Detail": {
+      "type": "string",
+      "description": "A URI embedding the contact information"
+    },
+    "Type": {
+      "type": "string",
+      "description": "closed enumeration ContactType_t",
+      "enum": ["general","security","sysadmin","usersupport"]
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "The IDs of Services associated with this Contact",
+      "items": {
+        "type": "string"
+      }
+    },
+    "DomainID": {
+      "type": "array",
+      "description": "The IDs of Domains associated with this Contact",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/DataStore.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/DataStore.json b/modules/gfac/gfac-impl/src/main/resources/schema/DataStore.json
new file mode 100644
index 0000000..8f15447
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/DataStore.json
@@ -0,0 +1,30 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/DataStore.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of storage medium - DataStoreType_t (disk,optical,tape,...)"
+    },
+    "Latency": {
+      "type": "string",
+      "description": "The latency category under normal operating conditions - AccessLatency_t",
+      "enum": ["nearline","offline","online"]
+    },
+    "TotalSize": {
+      "type": "integer",
+      "description": "The total amount of storage (GB)"
+    },
+    "FreeSize": {
+      "type": "integer",
+      "description": "The amount of available storage (GB)"
+    },
+    "UsedSize": {
+      "type": "integer",
+      "description": "The amount of used storage (GB)"
+    }
+  },
+  "required": ["Type","Latency"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Domain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Domain.json b/modules/gfac/gfac-impl/src/main/resources/schema/Domain.json
new file mode 100644
index 0000000..5bd996b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Domain.json
@@ -0,0 +1,30 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Description": {
+      "type": "string",
+      "description": "A description of the Domain"
+    },
+    "WWW": {
+      "type": "array",
+      "description": "URLs of web pages with more information about the Domain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ContactID": {
+      "type": "array",
+      "description": "IDs of Contacts for this Domain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "LocationID": {
+      "type": "string",
+      "description": "The ID of the primary Location for this Domain"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Endpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Endpoint.json b/modules/gfac/gfac-impl/src/main/resources/schema/Endpoint.json
new file mode 100644
index 0000000..b75b02a
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Endpoint.json
@@ -0,0 +1,147 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "URL": {
+      "type": "string",
+      "description": "Network location of the endpoint"
+    },
+    "Capability": {
+      "type": "array",
+      "description": "Capability_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Technology": {
+      "type": "string",
+      "description": "EndpointTechnology_t"
+    },
+    "InterfaceName": {
+      "type": "string",
+      "description": "InterfaceName_t"
+    },
+    "InterfaceVersion": {
+      "type": "string",
+      "description": "The version of the primary interface protocol (free format)"
+    },
+    "InterfaceExtension": {
+      "type": "array",
+      "description": "URIs identifying supported extensions to the interface protocol",
+      "items": {
+        "type": "string"
+      }
+    },
+    "WSDL": {
+      "type": "array",
+      "description": "URLs of WSDL document(s) describing the interface",
+      "items": {
+        "type": "string"
+      }
+    },
+    "SupportedProfile": {
+      "type": "array",
+      "description": "URI(s) identifying supported profiles for the Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Semantics": {
+      "type": "array",
+      "description": "URL(s) of documents providing human-readable descriptions of the semantics of the Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Implementor": {
+      "type": "string",
+      "description": "The name of the main organization implementing the Endpoint"
+    },
+    "ImplementationName": {
+      "type": "string",
+      "description": "The name of the implementation of the Endpoint"
+    },
+    "ImplementationVersion": {
+      "type": "string",
+      "description": "The version of the implementation of the Endpoint"
+    },
+    "QualityLevel": {
+      "type": "string",
+      "description": "QualityLevel_t",
+      "enum": ["development","pre-production","production","testing"]
+    },
+    "HealthState": {
+      "type": "string",
+      "description": "The operational status of the Endpoint",
+      "enum": ["critical","ok","other","unknown","warning"]
+    },
+    "HealthStateInfo": {
+      "type": "string",
+      "description": "A human-readable explanation of the HealthState of this Endpoint"
+    },
+    "ServingState": {
+      "type": "string",
+      "description": "If the endpoint is accepting and serving requests",
+      "enum": ["closed","draining","production","queueing"]
+    },
+    "StartTime": {
+      "type": "string",
+      "description": "The start time of the Service associated with this Endpoint (DateTime_t)"
+    },
+    "IssuerCA": {
+      "type": "string",
+      "description": "The DN of the CA issuing the certificate presented by this Endpoint"
+    },
+    "TrustedCA": {
+      "type": "array",
+      "description": "DN(s) of CAs trusted by this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "DowntimeAnnounce": {
+      "type": "string",
+      "description": "When the next scheduled downtime was announced (DateTime_t)"
+    },
+    "DowntimeStart": {
+      "type": "string",
+      "description": "When the next scheduled downtime will start (DateTime_t)"
+    },
+    "DowntimeEnd": {
+      "type": "string",
+      "description": "When the next scheduled downtime will end (DateTime_t)"
+    },
+    "DowntimeInfo": {
+      "type": "string",
+      "description": "Human-readable of the next scheduled downtime"
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service associated with this Endpoint"
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The IDs of the Shares accessible from this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "AccessPolicyID": {
+      "type": "array",
+      "description": "IDs of AccessPolicies associated with this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "IDs of Activities being managed through this Endpoint",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["InterfaceName","QualityLevel","HealthState","ServingState","ServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Entity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Entity.json b/modules/gfac/gfac-impl/src/main/resources/schema/Entity.json
new file mode 100644
index 0000000..5d1ae46
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Entity.json
@@ -0,0 +1,35 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json",
+  "type": "object",
+  "properties": {
+    "CreationTime": {
+      "type": "string",
+      "description": "The creation time of this entity in the format: CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]"
+    },
+    "Validity": {
+      "type": "integer",
+      "description": "The number of seconds after CreationTime that this entity should be considered relevant"
+    },
+    "ID": {
+      "type": "string",
+      "description": "A globally unique identifier for this entity"
+    },
+    "Name": {
+      "type": "string",
+      "description": "A human-readable name"
+    },
+    "OtherInfo": {
+      "type": "array",
+      "description": "Placeholder for information that does not fit in any other attribute",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Extension": {
+      "type": "object",
+      "description": "Key/value pairs enabling the association of extra information not captured by the model"
+    }
+  },
+  "required": ["ID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ExecutionEnvironment.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ExecutionEnvironment.json b/modules/gfac/gfac-impl/src/main/resources/schema/ExecutionEnvironment.json
new file mode 100644
index 0000000..77bf876
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ExecutionEnvironment.json
@@ -0,0 +1,115 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}],
+  "properties": {
+    "Platform": {
+      "type": "string",
+      "description": "The platform architecture - Platform_t (open enumeration)"
+    },
+    "VirtualMachine": {
+      "type": "boolean",
+      "description": "True if the ExecutionEnvironment is a virtual machine"
+    },
+    "TotalInstances": {
+      "type": "integer",
+      "description": "The total number of ExecutionEnvironment instances"
+    },
+    "UsedInstances": {
+      "type": "integer",
+      "description": "The number of ExecutionEnvironment instances in use"
+    },
+    "UnavailableInstances": {
+      "type": "integer",
+      "description": "The number of ExecutionEnvironment instances that are unavailable"
+    },
+    "PhysicalCPUs": {
+      "type": "integer",
+      "description": "The number of physical CPUs in one ExecutionEnvironment instance"
+    },
+    "LogicalCPUs": {
+      "type": "integer",
+      "description": "The number of logical CPUs in one ExecutionEnvironment instance"
+    },
+    "CPUMultiplicity": {
+      "type": "string",
+      "description": "Information about the CPUs and cores in an execution environment",
+      "enum": ["multicpu-multicore","multicpu-singlecore","singlecpu-multicore","singlecpu-singlecore"]
+    },
+    "CPUVendor": {
+      "type": "string",
+      "description": "The name of the manufacturer of the CPU"
+    },
+    "CPUModel": {
+      "type": "string",
+      "description": "The model of the CPU, as defined by the vendor"
+    },
+    "CPUVersion": {
+      "type": "string",
+      "description": "The specific version name of the CPU, as defined by the vendor"
+    },
+    "CPUClockSpeed": {
+      "type": "integer",
+      "description": "The clock speed of the CPU (MHz)"
+    },
+    "CPUTimeScalingFactor": {
+      "type": "float",
+      "description": "The factor used by the ComputingManager to scale the CPU time limit"
+    },
+    "WallTimeScalingFactor": {
+      "type": "float",
+      "description": "The factor used by the ComputingManager to scale the wallclock time limit"
+    },
+    "MainMemorySize": {
+      "type": "integer",
+      "description": "The total amount of physical RAM in one ExecutionEnvironment instance (MB)"
+    },
+    "VirtualMemorySize": {
+      "type": "integer",
+      "description": "The total amount of virtual memory (RAM+swap) in one ExecutionEnvironment instance (MB)"
+    },
+    "OSFamily": {
+      "type": "string",
+      "description": "The general family of the operating system - OSFamily_t (open enumeration)"
+    },
+    "OSName": {
+      "type": "string",
+      "description": "The specific name of the operating system - OSName_t (open enumeration)"
+    },
+    "OSVersion": {
+      "type": "string",
+      "description": "The version of the operating system, as defined by the vendor"
+    },
+    "ConnectivityIn": {
+      "type": "boolean",
+      "description": "True if direct inbound network connectiity is available to a running job"
+    },
+    "ConnectivityOut": {
+      "type": "boolean",
+      "description": "True if direct outbound network connectiity is available to a running job"
+    },
+    "NetworkInfo": {
+      "type": "array",
+      "description": "The types of internal network connections between ExecutionEnvironments - NetworkInfo_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ApplicationEnvironmentID": {
+      "type": "array",
+      "description": "ID(s) of ApplicationEnvironments available in this ExecutionEnvironment",
+      "items": {
+        "type": "string"
+      }
+    },
+    "BenchmarkID": {
+      "type": "array",
+      "description": "ID(s) of Benchmarks associated with this ExecutionEnvironment",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Platform","MainMemorySize","OSFamily","ConnectivityIn","ConnectivityOut"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Glue2.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Glue2.json b/modules/gfac/gfac-impl/src/main/resources/schema/Glue2.json
new file mode 100644
index 0000000..bb80505
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Glue2.json
@@ -0,0 +1,246 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Glue2.json",
+  "description": "A GLUE 2 document",
+  "type": "object",
+  "properties": {
+    "Entity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}]
+      }
+    },
+    "Location": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json"}]
+      }
+    },
+    "Contact": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Contact.json"}]
+      }
+    },
+    "Domain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}]
+      }
+    },
+    "AdminDomain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AdminDomain.json"}]
+      }
+    },
+    "UserDomain": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json"}]
+      }
+    },
+    "Service": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}]
+      }
+    },
+    "Endpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}]
+      }
+    },
+    "Share": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}]
+      }
+    },
+    "Manager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json"}]
+      }
+    },
+    "Resource": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json"}]
+      }
+    },
+    "Activity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Activity.json"}]
+      }
+    },
+    "Policy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}]
+      }
+    },
+    "AccessPolicy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/AccessPolicy.json"}]
+      }
+    },
+    "MappingPolicy": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json"}]
+      }
+    },
+    "ComputingService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingService.json"}]
+      }
+    },
+    "ComputingEndpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingEndpoint.json"}]
+      }
+    },
+    "ComputingShare": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingShare.json"}]
+      }
+    },
+    "ComputingManager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingManager.json"}]
+      }
+    },
+    "Benchmark": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Benchmark.json"}]
+      }
+    },
+    "ExecutionEnvironment": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ExecutionEnvironment.json"}]
+      }
+    },
+    "ApplicationEnvironment": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationEnvironment.json"}]
+      }
+    },
+    "ApplicationHandle": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ApplicationHandle.json"}]
+      }
+    },
+    "ComputingActivity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ComputingActivity.json"}]
+      }
+    },
+    "ToStorageService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json"}]
+      }
+    },
+    "StorageService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json"}]
+      }
+    },
+    "StorageServiceCapacity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json"}]
+      }
+    },
+    "StorageAccessProtocol": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json"}]
+      }
+    },
+    "StorageEndpoint": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json"}]
+      }
+    },
+    "StorageShare": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json"}]
+      }
+    },
+    "StorageShareCapacity": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json"}]
+      }
+    },
+    "StorageManager": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json"}]
+      }
+    },
+    "DataStore": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/DataStore.json"}]
+      }
+    },
+    "ToComputingService": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json"}]
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Location.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Location.json b/modules/gfac/gfac-impl/src/main/resources/schema/Location.json
new file mode 100644
index 0000000..8491cc0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Location.json
@@ -0,0 +1,47 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Location.json",
+  "description": "A GLUE 2 Location",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Address": {
+      "type": "string",
+      "description": "A free format street address"
+    },
+    "Place": {
+      "type": "string",
+      "description": "Name of town/city"
+    },
+    "Country": {
+      "type": "string",
+      "description": "Name of country"
+    },
+    "PostalCode": {
+      "type": "string",
+      "description": "Postal code"
+    },
+    "Latitude": {
+      "type": "number",
+      "description": "Position north (positive) or south (negative) of the equator in degrees"
+    },
+    "Longitude": {
+      "type": "number",
+      "description": "Position east (positive) or west (negative) of the primary meridian in degrees"
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "The IDs of Services at this location",
+      "items": {
+        "type": "string"
+      }
+    },
+    "DomainID": {
+      "type": "array",
+      "description": "The IDs of Domains at this location",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Manager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Manager.json b/modules/gfac/gfac-impl/src/main/resources/schema/Manager.json
new file mode 100644
index 0000000..d1df50a
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Manager.json
@@ -0,0 +1,28 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "ProductName": {
+      "type": "string",
+      "description": "The name of the software product which implements the Manager"
+    },
+    "ProductVersion": {
+      "type": "string",
+      "description": "The version of the software product which implements the Manager"
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service this Share participates in"
+    },
+    "ResourceID": {
+      "type": "array",
+      "description": "ID(s) of Resources associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ProductName","ServiceID","ResourceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/MappingPolicy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/MappingPolicy.json b/modules/gfac/gfac-impl/src/main/resources/schema/MappingPolicy.json
new file mode 100644
index 0000000..268844d
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/MappingPolicy.json
@@ -0,0 +1,13 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
+  "properties": {
+    "ShareID": {
+      "type": "string",
+      "description": "The ID of the Share this MappingPolicy is for"
+    }
+  },
+  "required": ["ShareID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Policy.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Policy.json b/modules/gfac/gfac-impl/src/main/resources/schema/Policy.json
new file mode 100644
index 0000000..f936699
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Policy.json
@@ -0,0 +1,27 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Scheme": {
+      "type": "string",
+      "description": "PolicyScheme_t (open enumeration)"
+    },
+    "Rule": {
+      "type": "array",
+      "description": "Policy rules",
+      "items": {
+        "type": "string"
+      }
+    },
+    "UserDomainID": {
+      "type": "array",
+      "description": "The ID(s) of the UserDomains this Policy applies to",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Scheme","Rule","UserDomainID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Resource.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Resource.json b/modules/gfac/gfac-impl/src/main/resources/schema/Resource.json
new file mode 100644
index 0000000..88d08ad
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Resource.json
@@ -0,0 +1,27 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "ManagerID": {
+      "type": "string",
+      "description": "The ID of the Manager for this Resource"
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The ID(s) of the Shares this Resource is part of",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "The ID(s) of Activities consuming from this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ManagerID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Service.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Service.json b/modules/gfac/gfac-impl/src/main/resources/schema/Service.json
new file mode 100644
index 0000000..4662407
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Service.json
@@ -0,0 +1,75 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Capability": {
+      "type": "array",
+      "description": "Capability_t (open enumeration)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Type": {
+      "type": "string",
+      "description": "ServiceType_t (open enumeration)"
+    },
+    "QualityLevel": {
+      "type": "string",
+      "description": "QualityLevel_t",
+      "enum": ["development","pre-production","production","testing"]
+    },
+    "StatusInfo": {
+      "type": "array",
+      "description": "URLs of web pages providing additional information",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Complexity": {
+      "type": "string",
+      "description": "A human-readable description of the number of endpoint types, shares, and resources"
+    },
+    "EndpointID": {
+      "type": "array",
+      "description": "The IDs of Endpoints for this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ShareID": {
+      "type": "array",
+      "description": "The IDs of the Shares offered by this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ManagerID": {
+      "type": "array",
+      "description": "The IDs of the Managers of this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ContactID": {
+      "type": "array",
+      "description": "The IDs of Contacts for this Service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "LocationID": {
+      "type": "string",
+      "description": "The ID of the primary Location of this Service"
+    },
+    "ServiceID": {
+      "type": "array",
+      "description": "The IDs of Services related to this Service",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Type","QualityLevel"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/Share.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/Share.json b/modules/gfac/gfac-impl/src/main/resources/schema/Share.json
new file mode 100644
index 0000000..258fc1b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/Share.json
@@ -0,0 +1,45 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Description": {
+      "type": "string",
+      "description": "A human-readable description of the Share"
+    },
+    "EndpointID": {
+      "type": "array",
+      "description": "The ID(s) of the Endpoints that can be used to access this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ResourceID": {
+      "type": "array",
+      "description": "The ID(s) of the Resources associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ServiceID": {
+      "type": "string",
+      "description": "The ID of the Service this Share participates in"
+    },
+    "ActivityID": {
+      "type": "array",
+      "description": "The ID(s) of Activities consuming from this Share",
+      "items": {
+        "type": "string"
+      }
+    },
+    "MappingPolicyID": {
+      "type": "array",
+      "description": "ID(s) of MappingPolicies associated with this Share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageAccessProtocol.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageAccessProtocol.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageAccessProtocol.json
new file mode 100644
index 0000000..05a830b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageAccessProtocol.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of the protocol - StorageAccessProtocol_t"
+    },
+    "Version": {
+      "type": "string",
+      "description": "The version of the protocol supported"
+    },
+    "MaxStreams": {
+      "type": "integer",
+      "description": "The maximum number of parallel network streams which can be usef for a single transfer"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService this protocol is available for"
+    },
+    "ToComputingServiceID": {
+      "type": "array",
+      "description": "The ID(s) ToComputingService objects that describe connectivity to ComputingServices",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["Type","Version","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageEndpoint.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageEndpoint.json
new file mode 100644
index 0000000..38b27c4
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageEndpoint.json
@@ -0,0 +1,8 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
+  "properties": {
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageManager.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageManager.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageManager.json
new file mode 100644
index 0000000..f3984f6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageManager.json
@@ -0,0 +1,8 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageService.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageService.json
new file mode 100644
index 0000000..a03d111
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageService.json
@@ -0,0 +1,22 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
+  "properties": {
+    "StorageAccessProtocolID": {
+      "type": "array",
+      "description": "The ID(s) of the StorageAccessProtocols supported by this service",
+      "items": {
+        "type": "string"
+      }
+    },
+    "StorageServiceCapacityID": {
+      "type": "array",
+      "description": "The ID(s) of the StorageServiceCapacities for this Service",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageServiceCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageServiceCapacity.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageServiceCapacity.json
new file mode 100644
index 0000000..a25c204
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageServiceCapacity.json
@@ -0,0 +1,33 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of storage capacity - StorageCapacity_t"
+    },
+    "TotalSize": {
+      "type": "integer",
+      "description": "The total amount of storage of this type (GB)"
+    },
+    "FreeSize": {
+      "type": "integer",
+      "description": "The amount of currently available storage of this type (GB)"
+    },
+    "UsedSize": {
+      "type": "integer",
+      "description": "The amount storage of this type in use (GB)"
+    },
+    "ReservedSize": {
+      "type": "integer",
+      "description": "The amount storage of this type which is not in use, but has been reserved for use in use (GB)"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService this capacity describes"
+    }
+  },
+  "required": ["Type","StorageServiceID"]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageShare.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageShare.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageShare.json
new file mode 100644
index 0000000..9703118
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageShare.json
@@ -0,0 +1,65 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
+  "properties": {
+    "ServingState": {
+      "type": "string",
+      "description": "How the Share is currently serving jobs",
+      "enum": ["closed","draining","production","queueing"]
+    },
+    "Path": {
+      "type": "string",
+      "description": "A default namespace where files are logically placed when they are stored in this Share"
+    },
+    "AccessMode": {
+      "type": "array",
+      "description": "The type of access allowed for this share - AccessMode_t (undefined)",
+      "items": {
+        "type": "string"
+      }
+    },
+    "SharingID": {
+      "type": "string",
+      "description": "A local identifier common to the set of StorageShares which use the same underling extents"
+    },
+    "AccessLatency": {
+      "type": "string",
+      "description": "The maximum latency category under normal operating conditions",
+      "enum": ["nearline","offline","online"]
+    },
+    "RetentionPolicy": {
+      "type": "string",
+      "description": "The quality of data retention - RetentionPolicy_t"
+    },
+    "ExpirationMode": {
+      "type": "array",
+      "description": "Supported file lifetime modes",
+      "items": {
+        "type": "string",
+        "enum": ["neverexpire","releasewhenexpired","warnwhenexpired"]
+      }
+    },
+    "DefaultLifeTime": {
+      "type": "integer",
+      "description": "The default lifetime assigned to a new file"
+    },
+    "MaximumLifeTime": {
+      "type": "integer",
+      "description": "The maximum lifetime that can be requested for a file"
+    },
+    "Tag": {
+      "type": "string",
+      "description": "An identifier defined by a UserDomain"
+    },
+    "StorageShareCapacityID": {
+      "type": "array",
+      "description": "ID of the StorageShareCapacities associated with this share",
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": ["ServingState","SharingID","AccessLatency"]
+}


[25/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
new file mode 100644
index 0000000..23fb06b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/impl/authentication/MyProxyAuthenticationInfo.java
@@ -0,0 +1,108 @@
+/*
+ *
+ * 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.ssh.impl.authentication;
+
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+import org.ietf.jgss.GSSCredential;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:22 PM
+ */
+
+public class MyProxyAuthenticationInfo extends GSIAuthenticationInfo {
+
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+    private String userName;
+    private String password;
+    private String myProxyUrl;
+    private int myProxyPort;
+    private int lifeTime;
+
+    public MyProxyAuthenticationInfo(String userName, String password, String myProxyUrl, int myProxyPort,
+                                     int life, String certificatePath) {
+        this.userName = userName;
+        this.password = password;
+        this.myProxyUrl = myProxyUrl;
+        this.myProxyPort = myProxyPort;
+        this.lifeTime = life;
+        properties.setProperty(X509_CERT_DIR, certificatePath);
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getMyProxyUrl() {
+        return myProxyUrl;
+    }
+
+    public void setMyProxyUrl(String myProxyUrl) {
+        this.myProxyUrl = myProxyUrl;
+    }
+
+    public int getMyProxyPort() {
+        return myProxyPort;
+    }
+
+    public void setMyProxyPort(int myProxyPort) {
+        this.myProxyPort = myProxyPort;
+    }
+
+    public int getLifeTime() {
+        return lifeTime;
+    }
+
+    public void setLifeTime(int lifeTime) {
+        this.lifeTime = lifeTime;
+    }
+
+    public GSSCredential getCredentials() throws SecurityException {
+        return getMyProxyCredentials();
+    }
+
+    private GSSCredential getMyProxyCredentials() throws SecurityException {
+        MyProxy myproxy = new MyProxy(this.myProxyUrl, this.myProxyPort);
+        try {
+            return myproxy.get(this.getUserName(), this.password, this.lifeTime);
+        } catch (MyProxyException e) {
+            throw new SecurityException("Error getting proxy credentials", e);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
new file mode 100644
index 0000000..de99b24
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/jsch/ExtendedJSch.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.ssh.jsch;
+
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/15/13
+ * Time: 10:03 AM
+ */
+
+/**
+ * Extended JSch to incorporate authentication info.
+ */
+public class ExtendedJSch extends JSch {
+
+    private GSIAuthenticationInfo authenticationInfo;
+
+    public ExtendedJSch() {
+        super();
+    }
+
+    public GSIAuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(GSIAuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+
+    public Session getSession(String username, String host, int port) throws JSchException {
+
+        if(host==null){
+            throw new JSchException("host must not be null.");
+        }
+        Session s = new ExtendedSession(this, username, host, port);
+        return s;
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
new file mode 100644
index 0000000..21aa1e3
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/listener/JobSubmissionListener.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.ssh.listener;
+
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+/**
+ * This interface can be implemented by the end user of the API
+ * to do desired operations based on the job status change. API has a
+ * default joblistener which can be used by the end users, but its
+ * configurable and can be parseSingleJob to jobsubmission methods.
+ */
+public abstract class JobSubmissionListener {
+
+    private JobStatus jobStatus = JobStatus.U;
+
+    /**
+     * This can be usd to perform some operation during status change
+     *
+     * @param jobDescriptor
+     * @throws SSHApiException
+     */
+    public abstract void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException;
+
+    /**
+     * This can be usd to perform some operation during status change
+     * @param jobStatus
+     * @throws SSHApiException
+     */
+    public abstract void statusChanged(JobStatus jobStatus) throws SSHApiException;
+
+
+    public JobStatus getJobStatus() {
+        return jobStatus;
+    }
+
+    public void setJobStatus(JobStatus jobStatus) {
+        this.jobStatus = jobStatus;
+    }
+
+    /**
+     * This method is used to block the process until the currentStatus of the job is DONE or FAILED
+     */
+    public void waitFor()  throws SSHApiException{
+        while (!isJobDone()) {
+            synchronized (this) {
+                try {
+                    wait();
+                } catch (InterruptedException e) {}
+            }
+        }
+    }
+
+    /**
+     * BAsed on the implementation user can define how to decide the job done
+     * scenario
+     * @return
+     * @throws SSHApiException
+     */
+    public abstract boolean isJobDone() throws SSHApiException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
new file mode 100644
index 0000000..6ff4fa6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/CommonUtils.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.ssh.util;
+
+import org.apache.airavata.gfac.ssh.api.job.*;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+public class CommonUtils {
+    /**
+     * This returns true if the give job is finished
+     * otherwise false
+     *
+     * @param job
+     * @return
+     */
+    public static boolean isJobFinished(JobDescriptor job) {
+        if (JobStatus.C.toString().equals(job.getStatus())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * This will read
+     *
+     * @param maxWalltime
+     * @return
+     */
+    public static String maxWallTimeCalculator(int maxWalltime) {
+        if (maxWalltime < 60) {
+            return "00:" + maxWalltime + ":00";
+        } else {
+            int minutes = maxWalltime % 60;
+            int hours = maxWalltime / 60;
+            return hours + ":" + minutes + ":00";
+        }
+    }
+    public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
+        if (maxWalltime < 60) {
+            return "00:" + maxWalltime;
+        } else {
+            int minutes = maxWalltime % 60;
+            int hours = maxWalltime / 60;
+            return hours + ":" + minutes;
+        }
+    }
+    public static JobManagerConfiguration getPBSJobManager(String installedPath) {
+        return new PBSJobConfiguration("PBSTemplate.xslt",".pbs", installedPath, new PBSOutputParser());
+    }
+
+    public static JobManagerConfiguration getSLURMJobManager(String installedPath) {
+        return new SlurmJobConfiguration("SLURMTemplate.xslt", ".slurm", installedPath, new SlurmOutputParser());
+    }
+
+     public static JobManagerConfiguration getUGEJobManager(String installedPath) {
+        return new UGEJobConfiguration("UGETemplate.xslt", ".pbs", installedPath, new UGEOutputParser());
+    }
+
+    public static JobManagerConfiguration getLSFJobManager(String installedPath) {
+        return new LSFJobConfiguration("LSFTemplate.xslt", ".lsf", installedPath, new LSFOutputParser());
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
new file mode 100644
index 0000000..bd700e9
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHAPIUIKeyboardInteractive.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.UIKeyboardInteractive;
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 8:34 AM
+ */
+
+/**
+ * This is dummy class, the keyboard interactivity is not really used when acting as an API.
+ * But to get things working we have this.
+ */
+public class SSHAPIUIKeyboardInteractive implements UIKeyboardInteractive, UserInfo {
+
+    private String password;
+
+    public SSHAPIUIKeyboardInteractive(String pwd) {
+        this.password = pwd;
+    }
+
+    public String[] promptKeyboardInteractive(String destination, String name,
+                                              String instruction, String[] prompt, boolean[] echo) {
+        return null;
+    }
+
+    public String getPassphrase() {
+        return password;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public boolean promptPassword(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptPassphrase(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void showMessage(String message) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
new file mode 100644
index 0000000..1def97c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHKeyPasswordHandler.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.UserInfo;
+import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 2:22 PM
+ */
+
+/**
+ * This class is used to get the pass phrase to decrypt public/private keys.
+ */
+public class SSHKeyPasswordHandler implements UserInfo {
+
+    private SSHKeyAuthentication keyAuthenticationHandler;
+
+    public SSHKeyPasswordHandler(SSHKeyAuthentication handler) {
+        this.keyAuthenticationHandler = handler;
+    }
+
+    public String getPassphrase() {
+        return keyAuthenticationHandler.getPassPhrase();
+    }
+
+    public String getPassword() {
+        throw new NotImplementedException();
+    }
+
+    public boolean promptPassword(String message) {
+        return false;
+    }
+
+    public boolean promptPassphrase(String message) {
+        return true;
+    }
+
+    public boolean promptYesNo(String message) {
+        return false;
+    }
+
+    public void showMessage(String message) {
+        keyAuthenticationHandler.bannerMessage(message);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
new file mode 100644
index 0000000..b278767
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/util/SSHUtils.java
@@ -0,0 +1,757 @@
+/*
+ *
+ * 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.ssh.util;
+
+import com.jcraft.jsch.*;
+
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.impl.StandardOutReader;
+import org.slf4j.*;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This class is going to be useful to SCP a file to a remote grid machine using my proxy credentials
+ */
+public class SSHUtils {
+    private static final org.slf4j.Logger log = LoggerFactory.getLogger(SSHUtils.class);
+
+    static {
+        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+
+    }
+
+    private ServerInfo serverInfo;
+
+    private GSIAuthenticationInfo authenticationInfo;
+
+    private ConfigReader configReader;
+
+    /**
+     * We need to pass certificateLocation when we use SCPTo method standalone
+     *
+     * @param serverInfo
+     * @param authenticationInfo
+     * @param certificateLocation
+     * @param configReader
+     */
+    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo, String certificateLocation, ConfigReader configReader) {
+        System.setProperty("X509_CERT_DIR", certificateLocation);
+        this.serverInfo = serverInfo;
+        this.authenticationInfo = authenticationInfo;
+        this.configReader = configReader;
+    }
+
+    /**
+     * This can be used when use SCPTo method within SSHAPi because SSHApiFactory already set the system property certificateLocation
+     *
+     * @param serverInfo
+     * @param authenticationInfo
+     * @param configReader
+     */
+    public SSHUtils(ServerInfo serverInfo, GSIAuthenticationInfo authenticationInfo
+            , ConfigReader configReader) {
+        this.serverInfo = serverInfo;
+        this.authenticationInfo = authenticationInfo;
+        this.configReader = configReader;
+    }
+
+    /**
+     * This  method will scp the lFile to the rFile location
+     *
+     * @param rFile remote file Path to use in scp
+     * @param lFile local file path to use in scp
+     * @throws IOException
+     * @throws JSchException
+     * @throws org.apache.airavata.gfac.ssh.api.SSHApiException
+     *
+     */
+    public void scpTo(String rFile, String lFile) throws IOException, JSchException, SSHApiException {
+        FileInputStream fis = null;
+        String prefix = null;
+        if (new File(lFile).isDirectory()) {
+            prefix = lFile + File.separator;
+        }
+        JSch jsch = new JSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session = null;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = this.configReader.getProperties();
+        session.setConfig(config);
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        boolean ptimestamp = true;
+
+        // exec 'scp -t rfile' remotely
+        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + rFile;
+        Channel channel = session.openChannel("exec");
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        ((ChannelExec) channel).setCommand(command);
+
+        // get I/O streams for remote scp
+        OutputStream out = channel.getOutputStream();
+        InputStream in = channel.getInputStream();
+
+        channel.connect();
+
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        File _lfile = new File(lFile);
+
+        if (ptimestamp) {
+            command = "T" + (_lfile.lastModified() / 1000) + " 0";
+            // The access time should be sent here,
+            // but it is not accessible with JavaAPI ;-<
+            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
+            out.write(command.getBytes());
+            out.flush();
+            if (checkAck(in) != 0) {
+                 String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+            }
+        }
+
+        // send "C0644 filesize filename", where filename should not include '/'
+        long filesize = _lfile.length();
+        command = "C0644 " + filesize + " ";
+        if (lFile.lastIndexOf('/') > 0) {
+            command += lFile.substring(lFile.lastIndexOf('/') + 1);
+        } else {
+            command += lFile;
+        }
+        command += "\n";
+        out.write(command.getBytes());
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        // send a content of lFile
+        fis = new FileInputStream(lFile);
+        byte[] buf = new byte[1024];
+        while (true) {
+            int len = fis.read(buf, 0, buf.length);
+            if (len <= 0) break;
+            out.write(buf, 0, len); //out.flush();
+        }
+        fis.close();
+        fis = null;
+        // send '\0'
+        buf[0] = 0;
+        out.write(buf, 0, 1);
+        out.flush();
+        if (checkAck(in) != 0) {
+             String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+        out.close();
+
+        stdOutReader.onOutput(channel);
+
+
+        if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        channel.disconnect();
+    }
+
+    /**
+     * This will copy a local file to a remote location
+     *
+     * @param remoteFile remote location you want to transfer the file, this cannot be a directory, if user pass
+     *                   a dirctory we do copy it to that directory but we simply return the directory name
+     *                   todo handle the directory name as input and return the proper final output file name
+     * @param localFile  Local file to transfer, this can be a directory
+     * @param session
+     * @return returns the final remote file path, so that users can use the new file location
+     * @throws IOException
+     * @throws JSchException
+     * @throws SSHApiException
+     */
+    public static String scpTo(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
+        FileInputStream fis = null;
+        String prefix = null;
+        if (new File(localFile).isDirectory()) {
+            prefix = localFile + File.separator;
+        }
+        boolean ptimestamp = true;
+
+        // exec 'scp -t rfile' remotely
+        String command = "scp " + (ptimestamp ? "-p" : "") + " -t " + remoteFile;
+        Channel channel = session.openChannel("exec");
+
+        StandardOutReader stdOutReader = new StandardOutReader();
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        ((ChannelExec) channel).setCommand(command);
+
+        // get I/O streams for remote scp
+        OutputStream out = channel.getOutputStream();
+        InputStream in = channel.getInputStream();
+
+        channel.connect();
+
+        if (checkAck(in) != 0) {
+             String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        File _lfile = new File(localFile);
+
+        if (ptimestamp) {
+            command = "T" + (_lfile.lastModified() / 1000) + " 0";
+            // The access time should be sent here,
+            // but it is not accessible with JavaAPI ;-<
+            command += (" " + (_lfile.lastModified() / 1000) + " 0\n");
+            out.write(command.getBytes());
+            out.flush();
+            if (checkAck(in) != 0) {
+                 String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+            }
+        }
+
+        // send "C0644 filesize filename", where filename should not include '/'
+        long filesize = _lfile.length();
+        command = "C0644 " + filesize + " ";
+        if (localFile.lastIndexOf('/') > 0) {
+            command += localFile.substring(localFile.lastIndexOf('/') + 1);
+        } else {
+            command += localFile;
+        }
+        command += "\n";
+        out.write(command.getBytes());
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+
+        // send a content of lFile
+        fis = new FileInputStream(localFile);
+        byte[] buf = new byte[1024];
+        while (true) {
+            int len = fis.read(buf, 0, buf.length);
+            if (len <= 0) break;
+            out.write(buf, 0, len); //out.flush();
+        }
+        fis.close();
+        fis = null;
+        // send '\0'
+        buf[0] = 0;
+        out.write(buf, 0, 1);
+        out.flush();
+        if (checkAck(in) != 0) {
+            String error = "Error Reading input Stream";
+            log.error(error);
+            throw new SSHApiException(error);
+        }
+        out.close();
+        stdOutReader.onOutput(channel);
+
+
+        channel.disconnect();
+        if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        //since remote file is always a file  we just return the file
+        return remoteFile;
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     * @param session
+     * @return returns the final local file path of the new file came from the remote resource
+     */
+    public static void scpFrom(String remoteFile, String localFile, Session session) throws IOException, JSchException, SSHApiException {
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+            if (new File(localFile).isDirectory()) {
+                prefix = localFile + File.separator;
+            }
+
+            // exec 'scp -f remotefile' remotely
+            String command = "scp -f " + remoteFile;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+
+            StandardOutReader stdOutReader = new StandardOutReader();
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+
+                String file = null;
+                for (int i = 0; ; i++) {
+                    in.read(buf, i, 1);
+                    if (buf[i] == (byte) 0x0a) {
+                        file = new String(buf, 0, i);
+                        break;
+                    }
+                }
+
+                //System.out.println("filesize="+filesize+", file="+file);
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+
+                // read a content of lfile
+                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
+                int foo;
+                while (true) {
+                    if (buf.length < filesize) foo = buf.length;
+                    else foo = (int) filesize;
+                    foo = in.read(buf, 0, foo);
+                    if (foo < 0) {
+                        // error
+                        break;
+                    }
+                    fos.write(buf, 0, foo);
+                    filesize -= foo;
+                    if (filesize == 0L) break;
+                }
+                fos.close();
+                fos = null;
+
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+            }
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     */
+    public void scpFrom(String remoteFile, String localFile) throws SSHApiException {
+        JSch jsch = new JSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session = null;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = this.configReader.getProperties();
+        session.setConfig(config);
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            ((ExtendedSession) session).setAuthenticationInfo(authenticationInfo);
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+            if (new File(localFile).isDirectory()) {
+                prefix = localFile + File.separator;
+            }
+
+            // exec 'scp -f remotefile' remotely
+            StandardOutReader stdOutReader = new StandardOutReader();
+            String command = "scp -f " + remoteFile;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+
+                String file = null;
+                for (int i = 0; ; i++) {
+                    in.read(buf, i, 1);
+                    if (buf[i] == (byte) 0x0a) {
+                        file = new String(buf, 0, i);
+                        break;
+                    }
+                }
+
+                //System.out.println("filesize="+filesize+", file="+file);
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+
+                // read a content of lfile
+                fos = new FileOutputStream(prefix == null ? localFile : prefix + file);
+                int foo;
+                while (true) {
+                    if (buf.length < filesize) foo = buf.length;
+                    else foo = (int) filesize;
+                    foo = in.read(buf, 0, foo);
+                    if (foo < 0) {
+                        // error
+                        break;
+                    }
+                    fos.write(buf, 0, foo);
+                    filesize -= foo;
+                    if (filesize == 0L) break;
+                }
+                fos.close();
+                fos = null;
+
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+                // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+            }
+
+//            session.disconnect();
+
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+                throw new SSHApiException(stdOutReader.getStdErrorString());
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    /**
+     * This method will copy a remote file to a local directory
+     *
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile  This is the local file to copy, this can be a directory too
+     * @param session
+     * @return returns the final local file path of the new file came from the remote resource
+     */
+    public static void scpThirdParty(String remoteFileSource, String remoteFileTarget, Session session) throws IOException, JSchException, SSHApiException {
+        FileOutputStream fos = null;
+        try {
+            String prefix = null;
+         
+            // exec 'scp -f remotefile' remotely
+            String command = "scp -3 " + remoteFileSource + " " + remoteFileTarget;
+            Channel channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+
+            StandardOutReader stdOutReader = new StandardOutReader();
+            ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+            // get I/O streams for remote scp
+            OutputStream out = channel.getOutputStream();
+            InputStream in = channel.getInputStream();
+
+            channel.connect();
+
+            byte[] buf = new byte[1024];
+
+            // send '\0'
+            buf[0] = 0;
+            out.write(buf, 0, 1);
+            out.flush();
+
+            while (true) {
+                int c = checkAck(in);
+                if (c != 'C') {
+                    break;
+                }
+
+                // read '0644 '
+                in.read(buf, 0, 5);
+
+                long filesize = 0L;
+                while (true) {
+                    if (in.read(buf, 0, 1) < 0) {
+                        // error
+                        break;
+                    }
+                    if (buf[0] == ' ') break;
+                    filesize = filesize * 10L + (long) (buf[0] - '0');
+                }
+                int foo;
+                while (true) {
+                	   if (buf.length < filesize) foo = buf.length;
+                       else foo = (int) filesize;
+                    
+                    int len = in.read(buf, 0, foo);
+                    if (len <= 0) break;
+                    out.write(buf, 0, len); 
+                }
+             // send '\0'
+                buf[0] = 0;
+                out.write(buf, 0, 1);
+                out.flush();
+                if (checkAck(in) != 0) {
+                    String error = "Error transfering the file content";
+                    log.error(error);
+                    throw new SSHApiException(error);
+                }
+
+            }
+            out.close();
+
+            stdOutReader.onOutput(channel);
+            if (stdOutReader.getStdErrorString().contains("scp:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            try {
+                if (fos != null) fos.close();
+            } catch (Exception ee) {
+            }
+        }
+    }
+
+    public static void makeDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
+
+        // exec 'scp -t rfile' remotely
+        String command = "mkdir -p " + path;
+        Channel channel = session.openChannel("exec");
+        StandardOutReader stdOutReader = new StandardOutReader();
+
+        ((ChannelExec) channel).setCommand(command);
+
+
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + session.getHost() + ":" + session.getPort() +
+                    " connecting user name - "
+                    + session.getUserName(), e);
+        }
+        stdOutReader.onOutput(channel);
+        if (stdOutReader.getStdErrorString().contains("mkdir:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+
+        channel.disconnect();
+    }
+
+    public static List<String> listDirectory(String path, Session session) throws IOException, JSchException, SSHApiException {
+
+        // exec 'scp -t rfile' remotely
+        String command = "ls " + path;
+        Channel channel = session.openChannel("exec");
+        StandardOutReader stdOutReader = new StandardOutReader();
+
+        ((ChannelExec) channel).setCommand(command);
+
+
+        ((ChannelExec) channel).setErrStream(stdOutReader.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + session.getHost() + ":" + session.getPort() +
+                    " connecting user name - "
+                    + session.getUserName(), e);
+        }
+        stdOutReader.onOutput(channel);
+        stdOutReader.getStdOutputString();
+        if (stdOutReader.getStdErrorString().contains("ls:")) {
+            throw new SSHApiException(stdOutReader.getStdErrorString());
+        }
+        channel.disconnect();
+        return Arrays.asList(stdOutReader.getStdOutputString().split("\n"));
+    }
+
+    static int checkAck(InputStream in) throws IOException {
+        int b = in.read();
+        if (b == 0) return b;
+        if (b == -1) return b;
+
+        if (b == 1 || b == 2) {
+            StringBuffer sb = new StringBuffer();
+            int c;
+            do {
+                c = in.read();
+                sb.append((char) c);
+            }
+            while (c != '\n');
+            if (b == 1) { // error
+                System.out.print(sb.toString());
+            }
+            if (b == 2) { // fatal error
+                System.out.print(sb.toString());
+            }
+        }
+        return b;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
new file mode 100644
index 0000000..2d82278
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
@@ -0,0 +1,118 @@
+/*
+ *
+ * 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.gsissh.handler;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Properties;
+
+public class GSISSHDirectorySetupHandler extends AbstractHandler {
+      private static final Logger log = LoggerFactory.getLogger(GSISSHDirectorySetupHandler.class);
+
+	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+            }
+        } catch (Exception e) {
+        	 try {
+                 StringWriter errors = new StringWriter();
+                 e.printStackTrace(new PrintWriter(errors));
+  				GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+  			} catch (GFacException e1) {
+  				 log.error(e1.getLocalizedMessage());
+  			}
+        	throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        }
+
+        log.info("Setup SSH job directorties");
+        super.invoke(jobExecutionContext);
+        makeDirectory(jobExecutionContext);
+	}
+	private void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        Cluster cluster = null;
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                try {
+                    GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                } catch (GFacException e1) {
+                    log.error(e1.getLocalizedMessage());
+                }
+                throw new GFacHandlerException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+
+            String workingDirectory = jobExecutionContext.getWorkingDir();
+            cluster.makeDirectory(workingDirectory);
+            if(!jobExecutionContext.getInputDir().equals(workingDirectory))
+                cluster.makeDirectory(jobExecutionContext.getInputDir());
+            if(!jobExecutionContext.getOutputDir().equals(workingDirectory))
+            	cluster.makeDirectory(jobExecutionContext.getOutputDir());
+            
+            DataTransferDetails detail = new DataTransferDetails();
+            TransferStatus status = new TransferStatus();
+            status.setTransferState(TransferState.DIRECTORY_SETUP);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("Working directory = " + workingDirectory);
+
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+		} catch (Exception e) {
+			DataTransferDetails detail = new DataTransferDetails();
+			TransferStatus status = new TransferStatus();
+			detail.setTransferDescription("Working directory = " + jobExecutionContext.getWorkingDir());
+			status.setTransferState(TransferState.FAILED);
+			detail.setTransferStatus(status);
+			try {
+				registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+			} catch (Exception e1) {
+				throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+			}
+			throw new GFacHandlerException("Error executing the Handler: " + GSISSHDirectorySetupHandler.class, e);
+		}
+	}
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+         this.invoke(jobExecutionContext);
+    }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
new file mode 100644
index 0000000..3031bac
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
@@ -0,0 +1,213 @@
+/*
+ *
+ * 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.gsissh.handler;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TransferState;
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * Recoverability for this handler assumes the same input values will come in the second
+ * run, and assume nobody is changing registry during the original submission and re-submission
+ */
+public class GSISSHInputHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(GSISSHInputHandler.class);
+
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        super.invoke(jobExecutionContext);
+        int index = 0;
+        int oldIndex = 0;
+        List<String> oldFiles = new ArrayList<String>();
+        MessageContext inputNew = new MessageContext();
+        DataTransferDetails detail = new DataTransferDetails();
+        TransferStatus status = new TransferStatus();
+        StringBuffer data = new StringBuffer("|");
+        Cluster cluster = null;
+
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+            }
+
+            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                throw new GFacException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+
+            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
+            if (pluginData != null) {
+                try {
+                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
+                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
+                    if (oldIndex == oldFiles.size()) {
+                        log.info("Old data looks good !!!!");
+                    } else {
+                        oldIndex = 0;
+                        oldFiles.clear();
+                    }
+                } catch (NumberFormatException e) {
+                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
+                }
+            }
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                try {
+                    GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+                } catch (ApplicationSettingsException e) {
+                    log.error(e.getMessage());
+                    try {
+                        GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+                    } catch (GFacException e1) {
+                        log.error(e1.getLocalizedMessage());
+                    }
+                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                }
+            }
+            log.info("Invoking SCPInputHandler");
+
+            MessageContext input = jobExecutionContext.getInMessageContext();
+            Set<String> parameters = input.getParameters().keySet();
+            for (String paramName : parameters) {
+                InputDataObjectType inputParamType = (InputDataObjectType) input.getParameters().get(paramName);
+                String paramValue = inputParamType.getValue();
+                //TODO: Review this with type
+                if (inputParamType.getType() == DataType.URI) {
+                    if (index < oldIndex) {
+                        log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+                        inputParamType.setValue(oldFiles.get(index));
+                        data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
+                    } else {
+                        String stageInputFile = stageInputFiles(cluster, jobExecutionContext, paramValue);
+                        inputParamType.setValue(stageInputFile);
+                        StringBuffer temp = new StringBuffer(data.append(stageInputFile).append(",").toString());
+                        status.setTransferState(TransferState.UPLOAD);
+                        detail.setTransferStatus(status);
+                        detail.setTransferDescription("Input Data Staged: " + stageInputFile);
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+                        GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                    }
+                } // FIXME: what is the thrift model DataType equivalent for URIArray type?
+//                else if ("URIArray".equals(inputParamType.getType().getType().toString())) {
+//                    List<String> split = Arrays.asList(StringUtil.getElementsFromString(paramValue));
+//                    List<String> newFiles = new ArrayList<String>();
+//                    for (String paramValueEach : split) {
+//                        if (index < oldIndex) {
+//                            log.info("Input File: " + paramValue + " is already transfered, so we skip this operation !!!");
+//                            newFiles.add(oldFiles.get(index));
+//                            data.append(oldFiles.get(index++)).append(",");
+//                        } else {
+//                            String stageInputFiles = stageInputFiles(cluster, jobExecutionContext, paramValueEach);
+//                            status.setTransferState(TransferState.UPLOAD);
+//                            detail.setTransferStatus(status);
+//                            detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
+//                            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+//                            StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
+//                            GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+//                            newFiles.add(stageInputFiles);
+//                        }
+//
+//                    }
+//                    ((URIArrayType) inputParamType.getType()).setValueArray(newFiles.toArray(new String[newFiles.size()]));
+//                }
+                inputNew.getParameters().put(paramName, inputParamType);
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            status.setTransferState(TransferState.FAILED);
+            detail.setTransferDescription(e.getLocalizedMessage());
+            detail.setTransferStatus(status);
+            try {
+                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            } catch (Exception e1) {
+                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+        }
+        jobExecutionContext.setInMessageContext(inputNew);
+    }
+
+    private static String stageInputFiles(Cluster cluster, JobExecutionContext jobExecutionContext, String paramValue) throws IOException, GFacException {
+        int i = paramValue.lastIndexOf(File.separator);
+        String substring = paramValue.substring(i + 1);
+        try {
+            String targetFile = jobExecutionContext.getInputDir() + File.separator + substring;
+            if (paramValue.startsWith("file")) {
+                paramValue = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
+            }
+            boolean success = false;
+            int j = 1;
+            while(!success){
+            try {
+				cluster.scpTo(targetFile, paramValue);
+				success = true;
+			} catch (Exception e) {
+				log.info(e.getLocalizedMessage());
+				Thread.sleep(2000);
+				 if(j==3) {
+					throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+				 }
+            }
+            j++;
+            }
+            return targetFile;
+        } catch (Exception e) {
+            throw new GFacHandlerException("Error while input File Staging", e, e.getLocalizedMessage());
+        }
+    }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        this.invoke(jobExecutionContext);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
new file mode 100644
index 0000000..b052a28
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
@@ -0,0 +1,323 @@
+/*
+ *
+ * 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.gsissh.handler;
+
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.MappingFactory;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.impl.OutputUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TransferState;
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+public class GSISSHOutputHandler extends AbstractHandler {
+    private static final Logger log = LoggerFactory.getLogger(GSISSHOutputHandler.class);
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        super.invoke(jobExecutionContext);
+        int index = 0;
+        int oldIndex = 0;
+        List<String> oldFiles = new ArrayList<String>();
+        StringBuffer data = new StringBuffer("|");
+        String hostAddress = jobExecutionContext.getHostName();
+        try {
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+            }
+        }  catch (Exception e) {
+        	 try {
+  				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+  			} catch (GFacException e1) {
+  				 log.error(e1.getLocalizedMessage());
+  			}  
+            log.error(e.getMessage());
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        }
+        DataTransferDetails detail = new DataTransferDetails();
+        TransferStatus status = new TransferStatus();
+
+        Cluster cluster = null;
+        
+        try {
+            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+            if (cluster == null) {
+                GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+                
+                throw new GFacProviderException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+
+            // Get the Stdouts and StdErrs
+            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
+            if (pluginData != null) {
+                try {
+                    oldIndex = Integer.parseInt(pluginData.split("\\|")[0].trim());
+                    oldFiles = Arrays.asList(pluginData.split("\\|")[1].split(","));
+                    if (oldIndex == oldFiles.size()) {
+                        log.info("Old data looks good !!!!");
+                    } else {
+                        oldIndex = 0;
+                        oldFiles.clear();
+                    }
+                } catch (NumberFormatException e) {
+                    log.error("Previously stored data " + pluginData + " is wrong so we continue the operations");
+                }
+            }
+
+            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
+
+            TaskDetails taskData = jobExecutionContext.getTaskData();
+            String outputDataDir = null;
+            File localStdOutFile;
+            File localStdErrFile;
+            //FIXME: AdvancedOutput is remote location and third party transfer should work to make this work 
+//            if (taskData.getAdvancedOutputDataHandling() != null) {
+//                outputDataDir = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
+//            }
+            if (outputDataDir == null) {
+                outputDataDir = File.separator + "tmp";
+            }
+            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
+            (new File(outputDataDir)).mkdirs();
+         	
+            String stdOutStr = "";
+            if (index < oldIndex) {
+                localStdOutFile = new File(oldFiles.get(index));
+                data.append(oldFiles.get(index++)).append(",");
+            } else {
+            	int i = 0;
+                localStdOutFile = new File(outputDataDir + File.separator + jobExecutionContext.getApplicationName() + ".stdout");
+                while(stdOutStr.isEmpty()){
+                try {
+                	cluster.scpFrom(jobExecutionContext.getStandardOutput(), localStdOutFile.getAbsolutePath());
+                	stdOutStr = GFacUtils.readFileToString(localStdOutFile.getAbsolutePath());
+				} catch (Exception e) {
+					log.error(e.getLocalizedMessage());
+					  Thread.sleep(2000);
+		        }
+                i++;
+                if(i==3)break;
+                }
+                
+                StringBuffer temp = new StringBuffer(data.append(localStdOutFile.getAbsolutePath()).append(",").toString());
+                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+            }
+            if (index < oldIndex) {
+                localStdErrFile = new File(oldFiles.get(index));
+                data.append(oldFiles.get(index++)).append(",");
+            } else {
+                localStdErrFile = new File(outputDataDir + File.separator + jobExecutionContext.getApplicationName() + ".stderr");
+                cluster.scpFrom(jobExecutionContext.getStandardError(), localStdErrFile.getAbsolutePath());
+                StringBuffer temp = new StringBuffer(data.append(localStdErrFile.getAbsolutePath()).append(",").toString());
+                GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+            }
+
+            String stdErrStr = GFacUtils.readFileToString(localStdErrFile.getAbsolutePath());
+            status.setTransferState(TransferState.STDOUT_DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+            status.setTransferState(TransferState.STDERROR_DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+
+            //todo this is a mess we have to fix this
+            List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
+            Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
+            Set<String> keys = output.keySet();
+            for (String paramName : keys) {
+                OutputDataObjectType outputDataObjectType = (OutputDataObjectType) output.get(paramName);
+                if (DataType.URI == outputDataObjectType.getType()) {
+
+                    List<String> outputList = null;
+                    int retry=3;
+                    while(retry>0){
+                    	 outputList = cluster.listDirectory(jobExecutionContext.getOutputDir());
+                        if (outputList.size() == 1 && outputList.get(0).isEmpty()) {
+                            Thread.sleep(10000);
+                        } else if (outputList.size() > 0) {
+                            break;
+                        }else{
+                            Thread.sleep(10000);
+                        }
+                        retry--;
+                        if(retry==0){
+                        }
+                    	 Thread.sleep(10000);
+                    }
+                    if (outputList.size() == 0 || outputList.get(0).isEmpty() || outputList.size() > 1) {
+                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
+                        Set<String> strings = output.keySet();
+                        outputArray.clear();
+                        for (String key : strings) {
+                            OutputDataObjectType outputDataObjectType1 = (OutputDataObjectType) output.get(key);
+                            if (DataType.URI == outputDataObjectType1.getType()) {
+                                String downloadFile = outputDataObjectType1.getValue();
+                                String localFile;
+                                if (index < oldIndex) {
+                                    localFile = oldFiles.get(index);
+                                    data.append(oldFiles.get(index++)).append(",");
+                                } else {
+                                    cluster.scpFrom(downloadFile, outputDataDir);
+                                    String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar) + 1, downloadFile.length());
+                                    localFile = outputDataDir + File.separator + fileName;
+                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
+                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                                }
+                                jobExecutionContext.addOutputFile(localFile);
+                                outputDataObjectType1.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.URI);
+                                outputArray.add(dataObjectType);
+                            }else if (DataType.STDOUT == outputDataObjectType1.getType()) {
+                                String localFile;
+                                if (index < oldIndex) {
+                                    localFile = oldFiles.get(index);
+                                    data.append(oldFiles.get(index++)).append(",");
+                                } else {
+                                    String fileName = localStdOutFile.getName();
+                                    localFile = outputDataDir + File.separator + fileName;
+                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
+                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                                }
+                                jobExecutionContext.addOutputFile(localFile);
+                                outputDataObjectType1.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.STDOUT);
+                                outputArray.add(dataObjectType);
+                            }else if (DataType.STDERR == outputDataObjectType1.getType()) {
+                                String localFile;
+                                if (index < oldIndex) {
+                                    localFile = oldFiles.get(index);
+                                    data.append(oldFiles.get(index++)).append(",");
+                                } else {
+                                    String fileName = localStdErrFile.getName();
+                                    localFile = outputDataDir + File.separator + fileName;
+                                    StringBuffer temp = new StringBuffer(data.append(localFile).append(",").toString());
+                                    GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                                }
+                                jobExecutionContext.addOutputFile(localFile);
+                                outputDataObjectType1.setValue(localFile);
+                                OutputDataObjectType dataObjectType = new OutputDataObjectType();
+                                dataObjectType.setValue(localFile);
+                                dataObjectType.setName(key);
+                                dataObjectType.setType(DataType.STDERR);
+                                outputArray.add(dataObjectType);
+                            }
+                        }
+                        break;
+                    } else if(outputList.size() == 1) { //FIXME: this is ultrascan specific
+                        String valueList = outputList.get(0);
+                        String outputFile;
+                        if (index < oldIndex) {
+                            outputFile = oldFiles.get(index);
+                            data.append(oldFiles.get(index++)).append(",");
+                        } else {
+                            cluster.scpFrom(jobExecutionContext.getOutputDir() + File.separator + valueList, outputDataDir);
+                            outputFile = outputDataDir + File.separator + valueList;
+                            jobExecutionContext.addOutputFile(outputFile);
+                            StringBuffer temp = new StringBuffer(data.append(outputFile).append(",").toString());
+                            GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
+                        }
+                        jobExecutionContext.addOutputFile(outputFile);
+                        outputDataObjectType.setValue(outputFile);
+                        OutputDataObjectType dataObjectType  = new OutputDataObjectType();
+                        dataObjectType.setValue(valueList);
+                        dataObjectType.setName(paramName);
+                        dataObjectType.setType(DataType.URI);
+                        outputArray.add(dataObjectType);
+                    }
+                } else {
+                    OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
+//                    break;
+                }
+            }
+            if (outputArray == null || outputArray.isEmpty()) {
+                if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null){
+                throw new GFacHandlerException(
+                        "Empty Output returned from the Application, Double check the application"
+                                + "and ApplicationDescriptor output Parameter Names"
+                );
+                }
+            }
+            // Why we set following?
+            jobExecutionContext.setStandardError(localStdErrFile.getAbsolutePath());
+            jobExecutionContext.setStandardOutput(localStdOutFile.getAbsolutePath());
+            jobExecutionContext.setOutputDir(outputDataDir);
+            status.setTransferState(TransferState.DOWNLOAD);
+            detail.setTransferStatus(status);
+            detail.setTransferDescription(outputDataDir);
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+            fireTaskOutputChangeEvent(jobExecutionContext, outputArray);
+        } catch (Exception e) {
+            try {
+                status.setTransferState(TransferState.FAILED);
+                detail.setTransferStatus(status);
+                detail.setTransferDescription(e.getLocalizedMessage());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+            } catch (Exception e1) {
+                throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
+            }
+            throw new GFacHandlerException("Error in retrieving results", e);
+        }
+     }
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        this.invoke(jobExecutionContext);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
new file mode 100644
index 0000000..864e487
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
@@ -0,0 +1,83 @@
+package org.apache.airavata.gfac.gsissh.handler;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
+import org.apache.airavata.gfac.ssh.util.HandleOutputs;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NewGSISSHOutputHandler extends AbstractHandler{
+	 private static final Logger log = LoggerFactory.getLogger(NewGSISSHOutputHandler.class);
+	  public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+	        super.invoke(jobExecutionContext);
+	        String hostAddress = jobExecutionContext.getHostName();
+	        try {
+	            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+	                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+	            }
+	        }  catch (Exception e) {
+	        	 try {
+	  				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+	  			} catch (GFacException e1) {
+	  				 log.error(e1.getLocalizedMessage());
+	  			}  
+	            log.error(e.getMessage());
+	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+	        }
+	        Cluster cluster = null;
+	        
+	        try {
+	            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
+	            if (cluster == null) {
+	                GFacUtils.saveErrorDetails(jobExecutionContext, "Security context is not set properly", CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
+	                
+	                throw new GFacProviderException("Security context is not set properly");
+	            } else {
+	                log.info("Successfully retrieved the Security Context");
+	            }
+	        } catch (Exception e) {
+	            log.error(e.getMessage());
+	            try {
+	                GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+	            } catch (GFacException e1) {
+	                log.error(e1.getLocalizedMessage());
+	            }
+	            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+	        }
+
+	        super.invoke(jobExecutionContext);
+	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
+            try {
+				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+			} catch (RegistryException e) {
+				throw new GFacHandlerException(e);
+			}
+	    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    @Override
+	public void initProperties(Properties properties) throws GFacHandlerException {
+		// TODO Auto-generated method stub
+		
+	}
+
+}


[78/81] [abbrv] airavata git commit: Merge moduleRefactor branch

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --cc modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 0000000,389913b..8f94633
mode 000000,100644..100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@@ -1,0 -1,643 +1,643 @@@
+ /*
+  *
+  * 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.orchestrator.server;
+ 
+ import org.airavata.appcatalog.cpi.AppCatalog;
+ import org.airavata.appcatalog.cpi.AppCatalogException;
+ import org.airavata.appcatalog.cpi.ComputeResource;
+ import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+ import org.apache.aiaravata.application.catalog.data.resources.AbstractResource;
+ import org.apache.airavata.common.exception.AiravataException;
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.logger.AiravataLogger;
+ import org.apache.airavata.common.logger.AiravataLoggerFactory;
+ import org.apache.airavata.common.utils.AiravataUtils;
+ import org.apache.airavata.common.utils.AiravataZKUtils;
+ import org.apache.airavata.common.utils.Constants;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.credential.store.store.CredentialReader;
+ import org.apache.airavata.gfac.core.scheduler.HostScheduler;
+ import org.apache.airavata.gfac.core.GFacUtils;
+ import org.apache.airavata.messaging.core.MessageContext;
+ import org.apache.airavata.messaging.core.MessageHandler;
+ import org.apache.airavata.messaging.core.MessagingConstants;
+ import org.apache.airavata.messaging.core.Publisher;
+ import org.apache.airavata.messaging.core.PublisherFactory;
+ import org.apache.airavata.messaging.core.impl.RabbitMQProcessConsumer;
+ import org.apache.airavata.messaging.core.impl.RabbitMQProcessPublisher;
+ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+ import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+ import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+ import org.apache.airavata.model.error.LaunchValidationException;
+ import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
+ import org.apache.airavata.model.messaging.event.MessageType;
+ import org.apache.airavata.model.messaging.event.ProcessSubmitEvent;
+ import org.apache.airavata.model.util.ExecutionType;
+ import org.apache.airavata.model.workspace.experiment.Experiment;
+ import org.apache.airavata.model.workspace.experiment.ExperimentState;
+ import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+ import org.apache.airavata.model.workspace.experiment.TaskDetails;
+ import org.apache.airavata.model.workspace.experiment.TaskState;
+ import org.apache.airavata.model.workspace.experiment.TaskStatus;
+ import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+ import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
+ import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+ import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+ import org.apache.airavata.orchestrator.cpi.OrchestratorService;
+ import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
+ import org.apache.airavata.orchestrator.cpi.orchestrator_cpi_serviceConstants;
+ import org.apache.airavata.orchestrator.util.DataModelUtils;
+ import org.apache.airavata.orchestrator.util.OrchestratorServerThreadPoolExecutor;
 -import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
++import org.apache.airavata.experiment.catalog.impl.RegistryFactory;
+ import org.apache.airavata.registry.cpi.Registry;
+ import org.apache.airavata.registry.cpi.RegistryException;
+ import org.apache.airavata.registry.cpi.RegistryModelType;
+ import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants;
+ import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants;
+ import org.apache.airavata.workflow.core.WorkflowEnactmentService;
+ import org.apache.thrift.TBase;
+ import org.apache.thrift.TException;
+ 
+ import java.util.Arrays;
+ import java.util.Calendar;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ public class OrchestratorServerHandler implements OrchestratorService.Iface {
+ 	private static AiravataLogger log = AiravataLoggerFactory .getLogger(OrchestratorServerHandler.class);
+ 	private SimpleOrchestratorImpl orchestrator = null;
+ 	private Registry registry;
+ 	private static Integer mutex = new Integer(-1);
+ 	private String airavataUserName;
+ 	private String gatewayName;
+ 	private Publisher publisher;
+     private RabbitMQProcessConsumer rabbitMQProcessConsumer;
+     private RabbitMQProcessPublisher rabbitMQProcessPublisher;
+ 
+     /**
+ 	 * Query orchestrator server to fetch the CPI version
+ 	 */
+ 	public String getOrchestratorCPIVersion() throws TException {
+ 		return orchestrator_cpi_serviceConstants.ORCHESTRATOR_CPI_VERSION;
+ 	}
+ 
+ 	public OrchestratorServerHandler() throws OrchestratorException{
+ 		// registering with zk
+ 		try {
+ 	        publisher = PublisherFactory.createActivityPublisher();
+ 			String zkhostPort = AiravataZKUtils.getZKhostPort();
+ 			String airavataServerHostPort = ServerSettings
+ 					.getSetting(Constants.ORCHESTRATOR_SERVER_HOST)
+ 					+ ":"
+ 					+ ServerSettings
+ 							.getSetting(Constants.ORCHESTRATOR_SERVER_PORT);
+ 			
+ //            setGatewayName(ServerSettings.getDefaultUserGateway());
+             setAiravataUserName(ServerSettings.getDefaultUser());
+ 		} catch (AiravataException e) {
+             log.error(e.getMessage(), e);
+             throw new OrchestratorException("Error while initializing orchestrator service", e);
+ 		}
+ 		// orchestrator init
+ 		try {
+ 			// first constructing the monitorManager and orchestrator, then fill
+ 			// the required properties
+ 			orchestrator = new SimpleOrchestratorImpl();
+ 			registry = RegistryFactory.getDefaultRegistry();
+ 			orchestrator.initialize();
+ 			orchestrator.getOrchestratorContext().setPublisher(this.publisher);
+             startProcessConsumer();
+         } catch (OrchestratorException e) {
+             log.error(e.getMessage(), e);
+             throw new OrchestratorException("Error while initializing orchestrator service", e);
+ 		} catch (RegistryException e) {
+             log.error(e.getMessage(), e);
+             throw new OrchestratorException("Error while initializing orchestrator service", e);
+ 		}
+ 	}
+ 
+     private void startProcessConsumer() throws OrchestratorException {
+         try {
+             rabbitMQProcessConsumer = new RabbitMQProcessConsumer();
+             ProcessConsumer processConsumer = new ProcessConsumer();
+             Thread thread = new Thread(processConsumer);
+             thread.start();
+ 
+         } catch (AiravataException e) {
+             throw new OrchestratorException("Error while starting process consumer", e);
+         }
+ 
+     }
+ 
+     /**
+ 	 * * After creating the experiment Data user have the * experimentID as the
+ 	 * handler to the experiment, during the launchExperiment * We just have to
+ 	 * give the experimentID * * @param experimentID * @return sucess/failure *
+ 	 * *
+ 	 * 
+ 	 * @param experimentId
+ 	 */
+ 	public boolean launchExperiment(String experimentId, String token) throws TException {
+         Experiment experiment = null; // this will inside the bottom catch statement
+         try {
+             experiment = (Experiment) registry.get(
+                     RegistryModelType.EXPERIMENT, experimentId);
+             if (experiment == null) {
+                 log.errorId(experimentId, "Error retrieving the Experiment by the given experimentID: {} ", experimentId);
+                 return false;
+             }
+             CredentialReader credentialReader = GFacUtils.getCredentialReader();
+             String gatewayId = null;
+             if (credentialReader != null) {
+                 try {
+                     gatewayId = credentialReader.getGatewayID(token);
+                 } catch (Exception e) {
+                     log.error(e.getLocalizedMessage());
+                 }
+             }
+             if (gatewayId == null) {
+                 gatewayId = ServerSettings.getDefaultUserGateway();
+                 log.info("Couldn't identify the gateway Id using the credential token, Use default gateway Id");
+ //                throw new AiravataException("Couldn't identify the gateway Id using the credential token");
+             }
+             ExecutionType executionType = DataModelUtils.getExecutionType(gatewayId, experiment);
+             if (executionType == ExecutionType.SINGLE_APP) {
+                 //its an single application execution experiment
+                 log.debugId(experimentId, "Launching single application experiment {}.", experimentId);
+                 OrchestratorServerThreadPoolExecutor.getCachedThreadPool().execute(new SingleAppExperimentRunner(experimentId, token));
+             } else if (executionType == ExecutionType.WORKFLOW) {
+                 //its a workflow execution experiment
+                 log.debugId(experimentId, "Launching workflow experiment {}.", experimentId);
+                 launchWorkflowExperiment(experimentId, token);
+             } else {
+                 log.errorId(experimentId, "Couldn't identify experiment type, experiment {} is neither single application nor workflow.", experimentId);
+                 throw new TException("Experiment '" + experimentId + "' launch failed. Unable to figureout execution type for application " + experiment.getApplicationId());
+             }
+         } catch (Exception e) {
+             throw new TException("Experiment '" + experimentId + "' launch failed. Unable to figureout execution type for application " + experiment.getApplicationId(), e);
+         }
+         return true;
+ 	}
+ 
+ 	/**
+ 	 * This method will validate the experiment before launching, if is failed
+ 	 * we do not run the launch in airavata thrift service (only if validation
+ 	 * is enabled
+ 	 * 
+ 	 * @param experimentId
+ 	 * @return
+ 	 * @throws TException
+ 	 */
+ 	public boolean validateExperiment(String experimentId) throws TException,
+ 			LaunchValidationException {
+ 		// TODO: Write the Orchestrator implementaion
+ 		try {
+ 			List<TaskDetails> tasks = orchestrator.createTasks(experimentId);
+ 			if (tasks.size() > 1) {
+ 				log.info("There are multiple tasks for this experiment, So Orchestrator will launch multiple Jobs");
+ 			}
+ 			List<String> ids = registry.getIds(
+ 					RegistryModelType.WORKFLOW_NODE_DETAIL,
+ 					WorkflowNodeConstants.EXPERIMENT_ID, experimentId);
+ 			for (String workflowNodeId : ids) {
+ 				WorkflowNodeDetails workflowNodeDetail = (WorkflowNodeDetails) registry
+ 						.get(RegistryModelType.WORKFLOW_NODE_DETAIL,
+ 								workflowNodeId);
+ 				List<Object> taskDetailList = registry.get(
+ 						RegistryModelType.TASK_DETAIL,
+ 						TaskDetailConstants.NODE_ID, workflowNodeId);
+ 				for (Object o : taskDetailList) {
+ 					TaskDetails taskID = (TaskDetails) o;
+ 					// iterate through all the generated tasks and performs the
+ 					// job submisssion+monitoring
+ 					Experiment experiment = (Experiment) registry.get(
+ 							RegistryModelType.EXPERIMENT, experimentId);
+ 					if (experiment == null) {
+ 						log.errorId(experimentId, "Error retrieving the Experiment by the given experimentID: {}.",
+                                 experimentId);
+ 						return false;
+ 					}
+ 					return orchestrator.validateExperiment(experiment,
+ 							workflowNodeDetail, taskID).isSetValidationState();
+ 				}
+ 			}
+ 
+ 		} catch (OrchestratorException e) {
+             log.errorId(experimentId, "Error while validating experiment", e);
+ 			throw new TException(e);
+ 		} catch (RegistryException e) {
+             log.errorId(experimentId, "Error while validating experiment", e);
+ 			throw new TException(e);
+ 		}
+ 		return false;
+ 	}
+ 
+ 	/**
+ 	 * This can be used to cancel a running experiment and store the status to
+ 	 * terminated in registry
+ 	 * 
+ 	 * @param experimentId
+ 	 * @return
+ 	 * @throws TException
+ 	 */
+ 	public boolean terminateExperiment(String experimentId, String tokenId) throws TException {
+         log.infoId(experimentId, "Experiment: {} is cancelling  !!!!!", experimentId);
+         return validateStatesAndCancel(experimentId, tokenId);
+ 	}
+ 
+ 	private String getAiravataUserName() {
+ 		return airavataUserName;
+ 	}
+ 
+ 	private String getGatewayName() {
+ 		return gatewayName;
+ 	}
+ 
+ 	public void setAiravataUserName(String airavataUserName) {
+ 		this.airavataUserName = airavataUserName;
+ 	}
+ 
+ 	public void setGatewayName(String gatewayName) {
+ 		this.gatewayName = gatewayName;
+ 	}
+ 
+ 	@Override
+ 	public boolean launchTask(String taskId, String airavataCredStoreToken) throws TException {
+ 		try {
+ 			TaskDetails taskData = (TaskDetails) registry.get(
+ 					RegistryModelType.TASK_DETAIL, taskId);
+ 			String applicationId = taskData.getApplicationId();
+ 			if (applicationId == null) {
+                 log.errorId(taskId, "Application id shouldn't be null.");
+ 				throw new OrchestratorException("Error executing the job, application id shouldn't be null.");
+ 			}
+ 			ApplicationDeploymentDescription applicationDeploymentDescription = getAppDeployment(taskData, applicationId);
+             taskData.setApplicationDeploymentId(applicationDeploymentDescription.getAppDeploymentId());
+ 			registry.update(RegistryModelType.TASK_DETAIL, taskData,taskData.getTaskID());
+ 			List<Object> workflowNodeDetailList = registry.get(RegistryModelType.WORKFLOW_NODE_DETAIL,
+ 							org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST, taskData);
+ 			if (workflowNodeDetailList != null
+ 					&& workflowNodeDetailList.size() > 0) {
+ 				List<Object> experimentList = registry.get(RegistryModelType.EXPERIMENT,
+ 								org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST,
+ 								(WorkflowNodeDetails) workflowNodeDetailList.get(0));
+ 				if (experimentList != null && experimentList.size() > 0) {
+ 					return orchestrator
+ 							.launchExperiment(
+ 									(Experiment) experimentList.get(0),
+ 									(WorkflowNodeDetails) workflowNodeDetailList
+ 											.get(0), taskData,airavataCredStoreToken);
+ 				}
+ 			}
+ 		} catch (Exception e) {
+             log.errorId(taskId, "Error while launching task ", e);
+             throw new TException(e);
+         }
+         log.infoId(taskId, "No experiment found associated in task {}", taskId);
+         return false;
+ 	}
+ 
+ 	private ApplicationDeploymentDescription getAppDeployment(
+ 			TaskDetails taskData, String applicationId)
+ 			throws AppCatalogException, OrchestratorException,
+ 			ClassNotFoundException, ApplicationSettingsException,
+ 			InstantiationException, IllegalAccessException {
+ 		AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
+ 		String selectedModuleId = getModuleId(appCatalog, applicationId);
+ 		ApplicationDeploymentDescription applicationDeploymentDescription = getAppDeployment(
+ 				appCatalog, taskData, selectedModuleId);
+ 		return applicationDeploymentDescription;
+ 	}
+ 
+ 	private ApplicationDeploymentDescription getAppDeployment(
+ 			AppCatalog appCatalog, TaskDetails taskData, String selectedModuleId)
+ 			throws AppCatalogException, ClassNotFoundException,
+ 			ApplicationSettingsException, InstantiationException,
+ 			IllegalAccessException {
+ 		Map<String, String> moduleIdFilter = new HashMap<String, String>();
+ 		moduleIdFilter.put(AbstractResource.ApplicationDeploymentConstants.APP_MODULE_ID, selectedModuleId);
+ 		if (taskData.getTaskScheduling()!=null && taskData.getTaskScheduling().getResourceHostId() != null) {
+ 		    moduleIdFilter.put(AbstractResource.ApplicationDeploymentConstants.COMPUTE_HOST_ID, taskData.getTaskScheduling().getResourceHostId());
+ 		}
+ 		List<ApplicationDeploymentDescription> applicationDeployements = appCatalog.getApplicationDeployment().getApplicationDeployements(moduleIdFilter);
+ 		Map<ComputeResourceDescription, ApplicationDeploymentDescription> deploymentMap = new HashMap<ComputeResourceDescription, ApplicationDeploymentDescription>();
+ 		ComputeResource computeResource = appCatalog.getComputeResource();
+ 		for (ApplicationDeploymentDescription deploymentDescription : applicationDeployements) {
+ 			deploymentMap.put(computeResource.getComputeResource(deploymentDescription.getComputeHostId()),deploymentDescription);
+ 		}
+ 		List<ComputeResourceDescription> computeHostList = Arrays.asList(deploymentMap.keySet().toArray(new ComputeResourceDescription[]{}));	
+ 		Class<? extends HostScheduler> aClass = Class.forName(
+ 				ServerSettings.getHostScheduler()).asSubclass(
+ 				HostScheduler.class);
+ 		HostScheduler hostScheduler = aClass.newInstance();
+ 		ComputeResourceDescription ComputeResourceDescription = hostScheduler.schedule(computeHostList);
+ 		ApplicationDeploymentDescription applicationDeploymentDescription = deploymentMap.get(ComputeResourceDescription);
+ 		return applicationDeploymentDescription;
+ 	}
+ 
+ 	private String getModuleId(AppCatalog appCatalog, String applicationId)
+ 			throws AppCatalogException, OrchestratorException {
+ 		ApplicationInterfaceDescription applicationInterface = appCatalog.getApplicationInterface().getApplicationInterface(applicationId);
+ 		List<String> applicationModules = applicationInterface.getApplicationModules();
+ 		if (applicationModules.size()==0){
+ 			throw new OrchestratorException(
+ 					"No modules defined for application "
+ 							+ applicationId);
+ 		}
+ //			AiravataAPI airavataAPI = getAiravataAPI();
+ 		String selectedModuleId=applicationModules.get(0);
+ 		return selectedModuleId;
+ 	}
+ 
+     private boolean validateStatesAndCancel(String experimentId, String tokenId)throws TException{
+         try {
+             Experiment experiment = (Experiment) registry.get(
+                     RegistryModelType.EXPERIMENT, experimentId);
+ 			log.info("Waiting for zookeeper to connect to the server");
+ 			synchronized (mutex){
+ 				mutex.wait(5000);
+ 			}
+             if (experiment == null) {
+                 log.errorId(experimentId, "Error retrieving the Experiment by the given experimentID: {}.", experimentId);
+                 throw new OrchestratorException("Error retrieving the Experiment by the given experimentID: " + experimentId);
+             }
+             ExperimentState experimentState = experiment.getExperimentStatus().getExperimentState();
+             if (isCancelValid(experimentState)){
+                 ExperimentStatus status = new ExperimentStatus();
+                 status.setExperimentState(ExperimentState.CANCELING);
+                 status.setTimeOfStateChange(Calendar.getInstance()
+                         .getTimeInMillis());
+                 experiment.setExperimentStatus(status);
+                 registry.update(RegistryModelType.EXPERIMENT, experiment,
+                         experimentId);
+ 
+                 List<String> ids = registry.getIds(
+                         RegistryModelType.WORKFLOW_NODE_DETAIL,
+                         WorkflowNodeConstants.EXPERIMENT_ID, experimentId);
+                 for (String workflowNodeId : ids) {
+                     WorkflowNodeDetails workflowNodeDetail = (WorkflowNodeDetails) registry
+                             .get(RegistryModelType.WORKFLOW_NODE_DETAIL,
+                                     workflowNodeId);
+                     int value = workflowNodeDetail.getWorkflowNodeStatus().getWorkflowNodeState().getValue();
+                     if ( value> 1 && value < 7) { // we skip the unknown state
+                         log.error(workflowNodeDetail.getNodeName() + " Workflow Node status cannot mark as cancelled, because " +
+                                 "current status is " + workflowNodeDetail.getWorkflowNodeStatus().getWorkflowNodeState().toString());
+                         continue; // this continue is very useful not to process deeper loops if the upper layers have non-cancel states
+                     } else {
+                         WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
+                         workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.CANCELING);
+                         workflowNodeStatus.setTimeOfStateChange(Calendar.getInstance()
+                                 .getTimeInMillis());
+                         workflowNodeDetail.setWorkflowNodeStatus(workflowNodeStatus);
+                         registry.update(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeDetail,
+                                 workflowNodeId);
+                     }
+                     List<Object> taskDetailList = registry.get(
+                             RegistryModelType.TASK_DETAIL,
+                             TaskDetailConstants.NODE_ID, workflowNodeId);
+                     for (Object o : taskDetailList) {
+                         TaskDetails taskDetails = (TaskDetails) o;
+                         TaskStatus taskStatus = ((TaskDetails) o).getTaskStatus();
+                         if (taskStatus.getExecutionState().getValue() > 7 && taskStatus.getExecutionState().getValue()<12) {
+                             log.error(((TaskDetails) o).getTaskID() + " Task status cannot mark as cancelled, because " +
+                                     "current task state is " + ((TaskDetails) o).getTaskStatus().getExecutionState().toString());
+                             continue;// this continue is very useful not to process deeper loops if the upper layers have non-cancel states
+                         } else {
+                             taskStatus.setExecutionState(TaskState.CANCELING);
+                             taskStatus.setTimeOfStateChange(Calendar.getInstance()
+                                     .getTimeInMillis());
+                             taskDetails.setTaskStatus(taskStatus);
+                             registry.update(RegistryModelType.TASK_DETAIL, o,
+                                     taskDetails.getTaskID());
+                         }
+                         orchestrator.cancelExperiment(experiment,
+                                 workflowNodeDetail, taskDetails, tokenId);
+                         // Status update should be done at the monitor
+                     }
+                 }
+             }else {
+                 if (isCancelAllowed(experimentState)){
+                     // when experiment status is < 3 no jobDetails object is created,
+                     // so we don't have to worry, we simply have to change the status and stop the execution
+                     ExperimentStatus status = new ExperimentStatus();
+                     status.setExperimentState(ExperimentState.CANCELED);
+                     status.setTimeOfStateChange(Calendar.getInstance()
+                             .getTimeInMillis());
+                     experiment.setExperimentStatus(status);
+                     registry.update(RegistryModelType.EXPERIMENT, experiment,
+                             experimentId);
+                     List<String> ids = registry.getIds(
+                             RegistryModelType.WORKFLOW_NODE_DETAIL,
+                             WorkflowNodeConstants.EXPERIMENT_ID, experimentId);
+                     for (String workflowNodeId : ids) {
+                         WorkflowNodeDetails workflowNodeDetail = (WorkflowNodeDetails) registry
+                                 .get(RegistryModelType.WORKFLOW_NODE_DETAIL,
+                                         workflowNodeId);
+                         WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
+                         workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.CANCELED);
+                         workflowNodeStatus.setTimeOfStateChange(Calendar.getInstance()
+                                 .getTimeInMillis());
+                         workflowNodeDetail.setWorkflowNodeStatus(workflowNodeStatus);
+                         registry.update(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeDetail,
+                                 workflowNodeId);
+                         List<Object> taskDetailList = registry.get(
+                                 RegistryModelType.TASK_DETAIL,
+                                 TaskDetailConstants.NODE_ID, workflowNodeId);
+                         for (Object o : taskDetailList) {
+                             TaskDetails taskDetails = (TaskDetails) o;
+                             TaskStatus taskStatus = ((TaskDetails) o).getTaskStatus();
+                             taskStatus.setExecutionState(TaskState.CANCELED);
+                             taskStatus.setTimeOfStateChange(Calendar.getInstance()
+                                     .getTimeInMillis());
+                             taskDetails.setTaskStatus(taskStatus);
+                             registry.update(RegistryModelType.TASK_DETAIL, o,
+                                     taskDetails);
+                         }
+                     }
+                 }else {
+                     log.errorId(experimentId, "Unable to mark experiment as Cancelled, current state {} doesn't allow to cancel the experiment {}.",
+                             experiment.getExperimentStatus().getExperimentState().toString(), experimentId);
+                     throw new OrchestratorException("Unable to mark experiment as Cancelled, because current state is: "
+                             + experiment.getExperimentStatus().getExperimentState().toString());
+                 }
+             }
+             log.info("Experiment: " + experimentId + " is cancelled !!!!!");
+         } catch (Exception e) {
+             throw new TException(e);
+         }
+         return true;
+     }
+ 
+     private boolean isCancelValid(ExperimentState state){
+         switch (state) {
+             case LAUNCHED:
+             case EXECUTING:
+             case CANCELING:
+                 return true;
+             default:
+                 return false;
+         }
+     }
+ 
+     private boolean isCancelAllowed(ExperimentState state){
+         switch (state) {
+             case CREATED:
+             case VALIDATED:
+             case SCHEDULED:
+                 return true;
+             default:
+                 return false;
+         }
+     }
+ 
+     private void launchWorkflowExperiment(String experimentId, String airavataCredStoreToken) throws TException {
+         try {
+             WorkflowEnactmentService.getInstance().
+                     submitWorkflow(experimentId, airavataCredStoreToken, getGatewayName(), getRabbitMQProcessPublisher());
+         } catch (Exception e) {
+             log.error("Error while launching workflow", e);
+         }
+     }
+ 
+     public synchronized RabbitMQProcessPublisher getRabbitMQProcessPublisher() throws Exception {
+         if (rabbitMQProcessPublisher == null) {
+             rabbitMQProcessPublisher = new RabbitMQProcessPublisher();
+         }
+         return rabbitMQProcessPublisher;
+     }
+ 
+ 
+     private class SingleAppExperimentRunner implements Runnable {
+ 
+         String experimentId;
+         String airavataCredStoreToken;
+         public SingleAppExperimentRunner(String experimentId,String airavataCredStoreToken){
+             this.experimentId = experimentId;
+             this.airavataCredStoreToken = airavataCredStoreToken;
+         }
+         @Override
+         public void run() {
+             try {
+                 launchSingleAppExperiment();
+             } catch (TException e) {
+                 e.printStackTrace();
+             }
+         }
+ 
+         private boolean launchSingleAppExperiment() throws TException {
+             Experiment experiment = null;
+             try {
+                 List<String> ids = registry.getIds(RegistryModelType.WORKFLOW_NODE_DETAIL, WorkflowNodeConstants.EXPERIMENT_ID, experimentId);
+                 for (String workflowNodeId : ids) {
+ //                WorkflowNodeDetails workflowNodeDetail = (WorkflowNodeDetails) registry.get(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeId);
+                     List<Object> taskDetailList = registry.get(RegistryModelType.TASK_DETAIL, TaskDetailConstants.NODE_ID, workflowNodeId);
+                     for (Object o : taskDetailList) {
+                         TaskDetails taskData = (TaskDetails) o;
+                         //iterate through all the generated tasks and performs the job submisssion+monitoring
+                         experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentId);
+                         if (experiment == null) {
+                             log.errorId(experimentId, "Error retrieving the Experiment by the given experimentID: {}", experimentId);
+                             return false;
+                         }
+                         String gatewayId = null;
+                         CredentialReader credentialReader = GFacUtils.getCredentialReader();
+                         if (credentialReader != null) {
+                             try {
+                                 gatewayId = credentialReader.getGatewayID(airavataCredStoreToken);
+                             } catch (Exception e) {
+                                 log.error(e.getLocalizedMessage());
+                             }
+                         }
+                         if (gatewayId == null || gatewayId.isEmpty()) {
+                             gatewayId = ServerSettings.getDefaultUserGateway();
+                         }
+                         ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.LAUNCHED,
+                                 experimentId,
+                                 gatewayId);
+                         String messageId = AiravataUtils.getId("EXPERIMENT");
+                         MessageContext messageContext = new MessageContext(event, MessageType.EXPERIMENT, messageId, gatewayId);
+                         messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+                         publisher.publish(messageContext);
+                         registry.update(RegistryModelType.TASK_DETAIL, taskData, taskData.getTaskID());
+                         //launching the experiment
+                         launchTask(taskData.getTaskID(), airavataCredStoreToken);
+                     }
+                 }
+ 
+             } catch (Exception e) {
+                 // Here we really do not have to do much because only potential failure can happen
+                 // is in gfac, if there are errors in gfac, it will handle the experiment/task/job statuses
+                 // We might get failures in registry access before submitting the jobs to gfac, in that case we
+                 // leave the status of these as created.
+                 ExperimentStatus status = new ExperimentStatus();
+                 status.setExperimentState(ExperimentState.FAILED);
+                 status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+                 experiment.setExperimentStatus(status);
+                 try {
+                     registry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
+                 } catch (RegistryException e1) {
+                     log.errorId(experimentId, "Error while updating experiment status to " + status.toString(), e);
+                     throw new TException(e);
+                 }
+                 log.errorId(experimentId, "Error while updating task status, hence updated experiment status to " + status.toString(), e);
+                 throw new TException(e);
+             }
+             return true;
+         }
+     }
+ 
+     private class ProcessConsumer implements Runnable, MessageHandler{
+ 
+ 
+         @Override
+         public void run() {
+             try {
+                 rabbitMQProcessConsumer.listen(this);
+             } catch (AiravataException e) {
+                 log.error("Error while listen to the RabbitMQProcessConsumer");
+             }
+         }
+ 
+         @Override
+         public Map<String, Object> getProperties() {
+             Map<String, Object> props = new HashMap<String, Object>();
+             props.put(MessagingConstants.RABBIT_QUEUE, RabbitMQProcessPublisher.PROCESS);
+             props.put(MessagingConstants.RABBIT_ROUTING_KEY, RabbitMQProcessPublisher.PROCESS);
+             return props;
+         }
+ 
+         @Override
+         public void onMessage(MessageContext msgCtx) {
+             TBase event = msgCtx.getEvent();
+             if (event instanceof ProcessSubmitEvent) {
+                 ProcessSubmitEvent processSubmitEvent = (ProcessSubmitEvent) event;
+                 try {
+                     launchTask(processSubmitEvent.getTaskId(), processSubmitEvent.getCredentialToken());
+                 } catch (TException e) {
+                     log.error("Error while launching task : " + processSubmitEvent.getTaskId());
+                 }
+             }
+         }
+     }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --cc modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
index 0000000,18168c7..3902c9d
mode 000000,100644..100644
--- a/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
+++ b/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@@ -1,0 -1,90 +1,77 @@@
+ /*
+  *
+  * 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.orchestrator.client;
+ 
+ //import org.apache.airavata.client.AiravataAPIFactory;
+ //import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+ //import org.apache.airavata.client.tools.DocumentCreator;
+ //import org.apache.airavata.client.tools.DocumentCreatorNew;
 -import org.apache.airavata.common.exception.ApplicationSettingsException;
 -import org.apache.airavata.common.utils.AiravataUtils;
 -import org.apache.airavata.common.utils.AiravataZKUtils;
 -import org.apache.airavata.common.utils.Constants;
 -import org.apache.airavata.common.utils.ServerSettings;
 -import org.apache.airavata.model.error.AiravataClientConnectException;
 -import org.apache.airavata.orchestrator.client.util.Initialize;
 -import org.apache.airavata.orchestrator.cpi.OrchestratorService;
 -import org.apache.airavata.orchestrator.server.OrchestratorServer;
 -import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 -import org.apache.airavata.registry.cpi.Registry;
 -import org.apache.zookeeper.server.ServerCnxnFactory;
 -import org.junit.Test;
+ 
+ public class OrchestratorClientFactoryTest {
+ /*    private DocumentCreatorNew documentCreator;
+     private OrchestratorService.Client orchestratorClient;
+     private Registry registry;
+     private int NUM_CONCURRENT_REQUESTS = 1;
+     Initialize initialize;
+     OrchestratorServer service;
+     private static ServerCnxnFactory cnxnFactory;
+ 
+     @Test
+     public void setUp() {
+     	AiravataUtils.setExecutionAsServer();
+         initialize = new Initialize("registry-derby.sql");
+         initialize.initializeDB();
+         System.setProperty(Constants.ZOOKEEPER_SERVER_PORT,"2185");
+         AiravataZKUtils.startEmbeddedZK(cnxnFactory);
+ 
+         try {
+             service = (new OrchestratorServer());
+             service.start();
+             registry = RegistryFactory.getDefaultRegistry();
+             documentCreator = new DocumentCreatorNew(getAiravataClient());
+             documentCreator.createLocalHostDocs();
+         } catch (Exception e) {
+             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+         }
+         AiravataUtils.setExecutionAsServer();
+         try {
+             service.stop();
+         } catch (Exception e) {
+             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+         }
+ 
+     }
+ 
+     private Airavata.Client getAiravataClient() {
+         Airavata.Client client = null;
+             try {
+                 client = AiravataClientFactory.createAiravataClient("localhost", 8930);
+             } catch (AiravataClientConnectException e) {
+                 e.printStackTrace();
+             }
+         return client;
+     }
+ 
+     private void storeDescriptors() {
+ 
+     }*/
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
----------------------------------------------------------------------
diff --cc modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
index 0000000,c827fc4..7fe8ff3
mode 000000,100644..100644
--- a/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
+++ b/modules/orchestrator/orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
@@@ -1,0 -1,330 +1,329 @@@
+ /*
+  *
+  * 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.orchestrator.client.util;
+ 
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
 -import org.apache.airavata.common.utils.AiravataUtils;
+ import org.apache.airavata.common.utils.ServerSettings;
 -import org.apache.airavata.persistance.registry.jpa.ResourceType;
 -import org.apache.airavata.persistance.registry.jpa.resources.*;
++import org.apache.airavata.experiment.catalog.ResourceType;
++import org.apache.airavata.experiment.catalog.resources.*;
+ import org.apache.airavata.registry.cpi.RegistryException;
+ import org.apache.derby.drda.NetworkServerControl;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ 
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.net.InetAddress;
+ import java.sql.*;
+ import java.util.StringTokenizer;
+ 
+ public class Initialize {
+     private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
+     public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+     public  String scriptName = "registry-derby.sql";
+     private NetworkServerControl server;
+     private static final String delimiter = ";";
+     public static final String PERSISTANT_DATA = "Configuration";
+ 
+     public Initialize(String scriptName) {
+         this.scriptName = scriptName;
+     }
+ 
+     public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+         if (suffix.length() > buffer.length()) {
+             return false;
+         }
+         // this loop is done on purpose to avoid memory allocation performance
+         // problems on various JDKs
+         // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+         // implementation is ok though does allocation/copying
+         // StringBuffer.toString().endsWith() does massive memory
+         // allocation/copying on JDK 1.5
+         // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+         int endIndex = suffix.length() - 1;
+         int bufferIndex = buffer.length() - 1;
+         while (endIndex >= 0) {
+             if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                 return false;
+             }
+             bufferIndex--;
+             endIndex--;
+         }
+         return true;
+     }
+ 
+     private static boolean isServerStarted(NetworkServerControl server, int ntries)
+     {
+         for (int i = 1; i <= ntries; i ++)
+         {
+             try {
+                 Thread.sleep(500);
+                 server.ping();
+                 return true;
+             }
+             catch (Exception e) {
+                 if (i == ntries)
+                     return false;
+             }
+         }
+         return false;
+     }
+ 
+     public void initializeDB() throws SQLException{
+         String jdbcUrl = null;
+         String jdbcUser = null;
+         String jdbcPassword = null;
+         try{
+             jdbcUrl = ServerSettings.getSetting("registry.jdbc.url");
+             jdbcUser = ServerSettings.getSetting("registry.jdbc.user");
+             jdbcPassword = ServerSettings.getSetting("registry.jdbc.password");
+             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+         } catch (ApplicationSettingsException e) {
+             logger.error("Unable to read properties", e);
+         }
+         startDerbyInServerMode();
+         if(!isServerStarted(server, 20)){
+            throw new RuntimeException("Derby server cound not started within five seconds...");
+         }
+ 
+         Connection conn = null;
+         try {
+             Class.forName(Utils.getJDBCDriver()).newInstance();
+             conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+             if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
+                 executeSQLScript(conn);
+                 logger.info("New Database created for Registry");
+             } else {
+                 logger.debug("Database already created for Registry!");
+             }
+         } catch (Exception e) {
+             logger.error(e.getMessage(), e);
+             throw new RuntimeException("Database failure", e);
+         } finally {
+             try {
+                 if (conn != null){
+                     if (!conn.getAutoCommit()) {
+                         conn.commit();
+                     }
+                     conn.close();
+                 }
+             } catch (SQLException e) {
+                 logger.error(e.getMessage(), e);
+             }
+         }
+ 
+         try{
+             GatewayResource gatewayResource = new GatewayResource();
+             gatewayResource.setGatewayId(ServerSettings.getSetting("default.registry.gateway"));
+             gatewayResource.setGatewayName(ServerSettings.getSetting("default.registry.gateway"));
+             gatewayResource.setDomain("test-domain");
+             gatewayResource.setEmailAddress("test-email");
+             gatewayResource.save();
+             
+             UserResource userResource = new UserResource();
+             userResource.setUserName(ServerSettings.getSetting("default.registry.user"));
+             userResource.setPassword(ServerSettings.getSetting("default.registry.password"));
+             userResource.save();
+ 
+             WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+             workerResource.setUser(userResource.getUserName());
+             workerResource.save();
+             
+             ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
+             projectResource.setGatewayId(gatewayResource.getGatewayId());
+             projectResource.setId("default");
+             projectResource.setName("default");
+             projectResource.setWorker(workerResource);
+             projectResource.save();
+         
+           
+         } catch (ApplicationSettingsException e) {
+             logger.error("Unable to read properties", e);
+             throw new SQLException(e.getMessage(), e);
+         } catch (RegistryException e) {
+             logger.error("Unable to save data to registry", e);
+             throw new SQLException(e.getMessage(), e);
+         }
+     }
+ 
+     public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+         try {
+             System.out.println("Running a query to test the database tables existence.");
+             // check whether the tables are already created with a query
+             Statement statement = null;
+             try {
+                 statement = conn.createStatement();
+                 ResultSet rs = statement.executeQuery("select * from " + tableName);
+                 if (rs != null) {
+                     rs.close();
+                 }
+             } finally {
+                 try {
+                     if (statement != null) {
+                         statement.close();
+                     }
+                 } catch (SQLException e) {
+                     return false;
+                 }
+             }
+         } catch (SQLException e) {
+             return false;
+         }
+ 
+         return true;
+     }
+ 
+     private void executeSQLScript(Connection conn) throws Exception {
+         StringBuffer sql = new StringBuffer();
+         BufferedReader reader = null;
+         try{
+ 
+         InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+         reader = new BufferedReader(new InputStreamReader(inputStream));
+         String line;
+         while ((line = reader.readLine()) != null) {
+             line = line.trim();
+             if (line.startsWith("//")) {
+                 continue;
+             }
+             if (line.startsWith("--")) {
+                 continue;
+             }
+             StringTokenizer st = new StringTokenizer(line);
+             if (st.hasMoreTokens()) {
+                 String token = st.nextToken();
+                 if ("REM".equalsIgnoreCase(token)) {
+                     continue;
+                 }
+             }
+             sql.append(" ").append(line);
+ 
+             // SQL defines "--" as a comment to EOL
+             // and in Oracle it may contain a hint
+             // so we cannot just remove it, instead we must end it
+             if (line.indexOf("--") >= 0) {
+                 sql.append("\n");
+             }
+             if ((checkStringBufferEndsWith(sql, delimiter))) {
+                 executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                 sql.replace(0, sql.length(), "");
+             }
+         }
+         // Catch any statements not followed by ;
+         if (sql.length() > 0) {
+             executeSQL(sql.toString(), conn);
+         }
+         }catch (IOException e){
+             logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+             throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+         }finally {
+             if (reader != null) {
+                 reader.close();
+             }
+ 
+         }
+ 
+     }
+ 
+     private static void executeSQL(String sql, Connection conn) throws Exception {
+         // Check and ignore empty statements
+         if ("".equals(sql.trim())) {
+             return;
+         }
+ 
+         Statement statement = null;
+         try {
+             logger.debug("SQL : " + sql);
+ 
+             boolean ret;
+             int updateCount = 0, updateCountTotal = 0;
+             statement = conn.createStatement();
+             ret = statement.execute(sql);
+             updateCount = statement.getUpdateCount();
+             do {
+                 if (!ret) {
+                     if (updateCount != -1) {
+                         updateCountTotal += updateCount;
+                     }
+                 }
+                 ret = statement.getMoreResults();
+                 if (ret) {
+                     updateCount = statement.getUpdateCount();
+                 }
+             } while (ret);
+ 
+             logger.debug(sql + " : " + updateCountTotal + " rows affected");
+ 
+             SQLWarning warning = conn.getWarnings();
+             while (warning != null) {
+                 logger.warn(warning + " sql warning");
+                 warning = warning.getNextWarning();
+             }
+             conn.clearWarnings();
+         } catch (SQLException e) {
+             if (e.getSQLState().equals("X0Y32")) {
+                 // eliminating the table already exception for the derby
+                 // database
+                 logger.info("Table Already Exists", e);
+             } else {
+                 throw new Exception("Error occurred while executing : " + sql, e);
+             }
+         } finally {
+             if (statement != null) {
+                 try {
+                     statement.close();
+                 } catch (SQLException e) {
+                     logger.error("Error occurred while closing result set.", e);
+                 }
+             }
+         }
+     }
+ 
+     private void startDerbyInServerMode() {
+         try {
+             System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+             server = new NetworkServerControl(InetAddress.getByName(Utils.getHost()),
+                     20000,
+                     Utils.getJDBCUser(), Utils.getJDBCPassword());
+             java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+             server.start(consoleWriter);
+         } catch (IOException e) {
+             logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                     "specified port is available");
+         } catch (Exception e) {
+             logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                     "specified port is available");
+         }
+ 
+     }
+ 
+     public void stopDerbyServer() throws SQLException{
+         try {
+             server.shutdown();
+         } catch (Exception e) {
+             logger.error(e.getMessage(), e);
+             throw new SQLException("Error while stopping derby server", e);
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/b4ede9cb/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------


[52/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/NOTICE b/modules/distribution/server/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/server/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/README b/modules/distribution/server/src/main/resources/README
deleted file mode 100644
index c2223ff..0000000
--- a/modules/distribution/server/src/main/resources/README
+++ /dev/null
@@ -1,145 +0,0 @@
-Apache Airavata Source - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration. Airavata bundles a server package 
-with an API, client software development Kits and a general purpose GUI XBaya as a application registration, workflow
-construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
-produced data.  
-
-Contact
-========
-For additional information about Apache Airavata, please contact the user or dev mailing lists:
-http://airavata.apache.org/community/mailing-lists.html
-
-Description of Airavata Directory Structure
-==================================
-    - airavata-api
-      This directory contains Airavata API related data models, api methods, generated server skeletons, client stubs, server implementations and client samples. 
-
-    - modules
-      This contains the source code of all the airavata maven projects organized as libraries, services and distributions
-
-    - samples
-      This contains all the system wide samples provided in Airavata distribution. All the sample are having its README file
-      So users have to refer each readme file before running each sample.
-
-    - tools
-      This contains source code libraries that can enhance Airavata features.
-
-    - README
-      This document.
-    
-    - RELEASE_NOTES
-      The describe the key features and know issues with the current release. 
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-Airavata Source Distribution Directory Structure
-================================================
-
-    AIRAVATA_MASTER
-		├── airavata-api
-		├── modules
-		│   ├── airavata-client
-		│   ├── app-catalog
-		│   ├── commons
-		│   │   ├── gfac-schema
-		│   │   ├── utils
-		│   │   ├── workflow-execution-context
-		│   │   └── workflow-tracking
-		│   ├── credential-store-service
-		│   ├── distribution
-		│   │   ├── api-server
-		│   │   ├── client
-		│   │   ├── gfac-server
-		│   │   ├── orchestrator-server
-		│   │   ├── server
-		│   │   └── release
-		│   │   └── xbaya-gui
-		│   ├── gfac
-		│   │   ├── airavata-gfac-service
-		│   │   ├── gfac-bes
-		│   │   ├── gfac-core
-		│   │   ├── gfac-ec2
-		│   │   ├── gfac-gram
-		│   │   ├── gfac-gsissh
-		│   │   ├── gfac-hadoop
-		│   │   ├── gfac-local
-		│   │   ├── gfac-monitor
-		│   │   ├── gfac-ssh
-		│   │   ├── gfac-thrift-descriptions
-		│   ├── integration-tests
-		│   ├── messaging
-		│   ├── orchestrator
-		│   ├── registry
-		│   │   ├── airavata-jpa-registry
-		│   │   ├── registry-cpi
-		│   ├── security
-		│   ├── credential-store
-		│   ├── server
-		│   ├── test-suite
-		│   ├── workflow-model
-		│   │   ├── workflow-engine
-		│   │   ├── workflow-model-component-node
-		│   │   └── workflow-model-core
-		│   ├── ws-messenger
-		│   │   ├── commons
-		│   │   ├── distribution
-		│   │   ├── messagebox
-		│   │   ├── messagebroker
-		│   │   ├── message-monitor
-		│   │   └── samples
-		│   └── xbaya-gui
-		├── samples
-		├── tools
-		│   ├── gsissh
-		│   ├── gsissh-cli-tools
-		│   ├── phoebus-integration
-		│   └── registry-migrate
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		├── README
-		└── RELEASE_NOTES
-
-Available Binary Distributions
-==============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata API Server
-  This is the server that contains Airavata API Server.
-
-* Airavata Orchestrator Server
-  This is the stand-alone orchestrator server
-
-* Airavata GFac Server
-  This is the standalone GFac Server
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata Client
-  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
-  access Airavata functionality through Airavata API. 
-  
- How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial.
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/airavata-server.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/airavata-server.bat b/modules/distribution/server/src/main/resources/bin/airavata-server.bat
deleted file mode 100644
index 09752c4..0000000
--- a/modules/distribution/server/src/main/resources/bin/airavata-server.bat
+++ /dev/null
@@ -1,55 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-setlocal EnableDelayedExpansion
-
-call "%~dp0"setenv.bat
-
-:loop
-if ""%1""==""-xdebug"" goto xdebug
-if ""%1""==""-security"" goto security
-if ""%1""=="""" goto run
-goto help
-
-:xdebug
-set JAVA_OPTS= %JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000
-shift
-goto loop
-
-:security
-set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%AIRAVATA_HOME%\conf\axis2.policy -Daxis2.home=%AIRAVATA_HOME%
-shift
-goto loop
-
-:help
-echo  Usage: %0 [-options]
-echo.
-echo  where options include:
-echo   -xdebug    Start Airavata Server under JPDA debugger
-echo   -security  Enable Java 2 security
-echo   -h         Help
-goto end
-
-:run
-cd "%AIRAVATA_HOME%\bin"
-set LOGO_FILE="logo.txt"
-if exist "%LOGO_FILE%" type "%LOGO_FILE%"
-
-java %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" -Djava.endorsed.dirs="%AIRAVATA_HOME%/lib/endorsed":"%JAVA_HOME%/jre/lib/endorsed":"%JAVA_HOME%/lib/endorsed" org.apache.airavata.server.ServerMain -repo "%AIRAVATA_HOME%"/repository/services -conf "%AIRAVATA_HOME%"/conf/axis2.xml %*
-
-:end

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/airavata-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/airavata-server.sh b/modules/distribution/server/src/main/resources/bin/airavata-server.sh
deleted file mode 100755
index 885dcd4..0000000
--- a/modules/distribution/server/src/main/resources/bin/airavata-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-#SERVERS="--servers=apiserver,orchestrator,gfac,credentialstore"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-        	AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-		AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-	    IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > airavata-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/api-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/api-server.sh b/modules/distribution/server/src/main/resources/bin/api-server.sh
deleted file mode 100755
index 872c854..0000000
--- a/modules/distribution/server/src/main/resources/bin/api-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=apiserver"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > api-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/derby.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/derby.sh b/modules/distribution/server/src/main/resources/bin/derby.sh
deleted file mode 100644
index 134f7b9..0000000
--- a/modules/distribution/server/src/main/resources/bin/derby.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/setenv.sh
-export DERBY_HOME=$AIRAVATA_HOME/standalone-server
-cd $AIRAVATA_HOME/bin
-./startNetworkServer $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/gfac-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/gfac-server.sh b/modules/distribution/server/src/main/resources/bin/gfac-server.sh
deleted file mode 100755
index 839ef4e..0000000
--- a/modules/distribution/server/src/main/resources/bin/gfac-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=gfac"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > gfac-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/logo.txt b/modules/distribution/server/src/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/modules/distribution/server/src/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/orchestrator-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/orchestrator-server.sh b/modules/distribution/server/src/main/resources/bin/orchestrator-server.sh
deleted file mode 100755
index 5fa73e7..0000000
--- a/modules/distribution/server/src/main/resources/bin/orchestrator-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=orchestrator"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > orchestrator-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/setenv.bat b/modules/distribution/server/src/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/modules/distribution/server/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/setenv.sh b/modules/distribution/server/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/server/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/startNetworkServer
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/startNetworkServer b/modules/distribution/server/src/main/resources/bin/startNetworkServer
deleted file mode 100644
index 808566c..0000000
--- a/modules/distribution/server/src/main/resources/bin/startNetworkServer
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-if [ -n "$derby_common_debug" ] ; then
-  set -x
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$DERBY_HOME" -o ! -d "$DERBY_HOME" ] ; then
-  ## resolve links - $0 may be a link to derby's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  DERBY_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  DERBY_HOME=`cd "$DERBY_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$DERBY_HOME" ] &&
-    DERBY_HOME=`cygpath --unix "$DERBY_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set DERBY_LIB location
-DERBY_LIB="${DERBY_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# set local classpath, don't overwrite the user's
-LOCALCLASSPATH=$DERBY_LIB/derby.jar:$DERBY_LIB/derbynet.jar:$DERBY_LIB/derbytools.jar:$DERBY_LIB/derbyclient.jar
-
-# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-# user CLASSPATH first and derby-found jars after.
-# In that case, the user CLASSPATH will override derby-found jars
-#
-# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-# with derby-found jars first and user CLASSPATH after
-if [ -n "$CLASSPATH" ] ; then
-  # merge local and specified classpath 
-  if [ -z "$LOCALCLASSPATH" ] ; then 
-    LOCALCLASSPATH="$CLASSPATH"
-  elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-    LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-  else
-    LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-  fi
-
-  # remove class path from launcher -cp option
-  CLASSPATH=""
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  DERBY_HOME=`cygpath --$format "$DERBY_HOME"`
-  DERBY_LIB=`cygpath --$format "$DERBY_LIB"`
-  if [ -n "$JAVA_HOME" ]; then
-    JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  fi
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$DERBY_HOME" in
-    *\\ )
-    DERBY_HOME="$DERBY_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-
-# Readjust classpath for MKS
-# expr match 
-if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; then
-  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g
-'`
-fi
-#!/bin/sh
-
-# 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.
-
-derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start $@"
-eval $derby_exec_command

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/bin/workflow-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/bin/workflow-server.sh b/modules/distribution/server/src/main/resources/bin/workflow-server.sh
deleted file mode 100755
index b66e192..0000000
--- a/modules/distribution/server/src/main/resources/bin/workflow-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=workflowserver"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > workflow-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/samples/registerSample.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/samples/registerSample.sh b/modules/distribution/server/src/main/resources/samples/registerSample.sh
deleted file mode 100644
index 6450f6f..0000000
--- a/modules/distribution/server/src/main/resources/samples/registerSample.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/../bin/setenv.sh
-JAVA_OPTS=""
-
-java -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		     org.apache.airavata.client.samples.RegisterSampleData $*

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/samples/scripts/add.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/samples/scripts/add.sh b/modules/distribution/server/src/main/resources/samples/scripts/add.sh
deleted file mode 100755
index daa140b..0000000
--- a/modules/distribution/server/src/main/resources/samples/scripts/add.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# 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.
-
-# add two numbers
-sleep 10
-/bin/echo  "Result=`expr $1 + $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/samples/scripts/echo.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/samples/scripts/echo.sh b/modules/distribution/server/src/main/resources/samples/scripts/echo.sh
deleted file mode 100755
index 9dbaab9..0000000
--- a/modules/distribution/server/src/main/resources/samples/scripts/echo.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#echo wrapper
-sleep 10
-/bin/echo "Echoed_Output=$1"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/samples/scripts/multiply.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/samples/scripts/multiply.sh b/modules/distribution/server/src/main/resources/samples/scripts/multiply.sh
deleted file mode 100755
index a5b5f7f..0000000
--- a/modules/distribution/server/src/main/resources/samples/scripts/multiply.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# mutiply two numbers
-sleep 10
-/bin/echo "Result=`expr $1 \* $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/server/src/main/resources/samples/scripts/subtract.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/resources/samples/scripts/subtract.sh b/modules/distribution/server/src/main/resources/samples/scripts/subtract.sh
deleted file mode 100755
index a21bec7..0000000
--- a/modules/distribution/server/src/main/resources/samples/scripts/subtract.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# substract two numbers
-sleep 10
-/bin/echo "Result=`expr $1 - $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/pom.xml b/modules/distribution/xbaya-gui/pom.xml
deleted file mode 100644
index 7a307af..0000000
--- a/modules/distribution/xbaya-gui/pom.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>distribution</artifactId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apache-airavata-xbaya-gui</artifactId>
-    <name>Airavata xbaya-gui distribution</name>
-    <packaging>pom</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <profiles>
-        <profile>
-            <id>default</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-dependency-plugin</artifactId>
-						<version>2.8</version>
-						<executions>
-							<execution>
-								<id>unpack</id>
-								<phase>compile</phase>
-								<goals>
-									<goal>unpack</goal>
-								</goals>
-								<configuration>
-									<artifactItems>
-										<artifactItem>
-											<groupId>org.apache.airavata</groupId>
-											<artifactId>airavata-server-configuration</artifactId>
-											<version>${project.version}</version>
-											<type>jar</type>
-										</artifactItem>
-									</artifactItems>
-									<outputDirectory>${project.build.directory}/conf</outputDirectory>
-								</configuration>
-							</execution>
-						</executions>
-					</plugin>
-				    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>distribution-package</id>
-                                <phase>compile</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <finalName>${archieve.name}-${project.version}</finalName>
-                                    <descriptors>
-                                        <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-                                    </descriptors>
-                                    <attach>false</attach>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>build-helper-maven-plugin</artifactId>
-                        <version>1.7</version>
-                        <executions>
-                            <execution>
-                                <id>bin-artifacts</id>
-                                <phase>package</phase>
-                                <goals>
-                                    <goal>attach-artifact</goal>
-                                </goals>
-                                <configuration>
-                                    <artifacts>
-                                        <artifact>
-                                            <file>${airavata.xbaya-bin.zip}</file>
-                                            <type>zip</type>
-                                            <classifier>bin</classifier>
-                                        </artifact>
-                                        <artifact>
-                                            <file>${airavata.xbaya-bin.tar.gz}</file>
-                                            <type>tar.gz</type>
-                                            <classifier>bin</classifier>
-                                        </artifact>
-                                    </artifacts>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile> <!-- JNLP -->
-            <id>jnlp</id>
-            <!--<activation>-->
-                <!--<activeByDefault>true</activeByDefault>-->
-            <!--</activation>-->
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>0-copy-xbaya</id>
-                                <phase>compile</phase>
-                                <configuration>
-                                    <target>
-                                        <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.dependency.classpath" />
-                                        <unzip src="target/apache-airavata-xbaya-gui-${project.version}-bin.zip" dest="${project.build.directory}/temp" />
-                                        <mkdir dir="${jnlp.direcotry}" />
-                                        <mkdir dir="${jnlp.direcotry}/lib" />
-                                        <copy todir="${jnlp.direcotry}/lib">
-                                            <fileset dir="${xbaya.directory}/lib" />
-                                        </copy>
-                                        <copy todir="${jnlp.direcotry}">
-                                            <fileset dir="${project.basedir}/src/main/resources/jnlp" />
-                                        </copy>
-                                        <copy file="${project.basedir}/src/main/resources/airavata-logo.gif" todir="${jnlp.direcotry}" />
-                                    </target>
-                                </configuration>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-jarsigner-plugin</artifactId>
-                        <version>1.2</version>
-                        <executions>
-                            <execution>
-                                <id>1-sign</id>
-                                <phase>compile</phase>
-                                <goals>
-                                    <goal>sign</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <configuration>
-                            <archiveDirectory>${jnlp.direcotry}/lib</archiveDirectory>
-                            <keystore>${project.basedir}/src/main/resources/xbaya.jks</keystore>
-                            <alias>xbaya</alias>
-                            <storepass>xbaya-secret</storepass>
-                            <keypass>xbaya-secret</keypass>
-                        </configuration>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>exec-maven-plugin</artifactId>
-                        <version>1.1.1</version>
-                        <executions>
-                            <execution>
-                                <id>2-execute-jnlp-modifier</id>
-                                <phase>compile</phase>
-                                <goals>
-                                    <goal>java</goal>
-                                </goals>
-                                <configuration>
-                                    <mainClass>org.apache.airavata.distribution.xbaya.jnlp.Main</mainClass>
-                                    <arguments>
-                                        <argument>${jnlp.direcotry}/lib</argument>
-                                        <argument>${jnlp.direcotry}/xbaya.jnlp</argument>
-                                    </arguments>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <id>zip-jnlp</id>
-            <!--<activation>-->
-                <!--<activeByDefault>true</activeByDefault>-->
-            <!--</activation>-->
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>3-zip-xbaya-jnlp</id>
-                                <phase>package</phase>
-                                <configuration>
-                                    <target>
-                                        <zip destfile="${airavata.xbaya-jnlp.zip}" basedir="${jnlp.direcotry}" />
-                                        <tar destfile="${project.build.directory}/xbaya-jnlp-${project.version}.tar" basedir="${jnlp.direcotry}" />
-                                        <gzip destfile="${airavata.xbaya-jnlp.tar.gz}" src="${project.build.directory}/xbaya-jnlp-${project.version}.tar" />
-                                        <delete file="${project.build.directory}/xbaya-jnlp-${project.version}.tar" />
-                                    </target>
-                                </configuration>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile> <!-- END JNLP -->
-    </profiles>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-xbaya-gui</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <archieve.name>apache-airavata-xbaya-gui</archieve.name>
-        <airavata.xbaya-dist.name>${archieve.name}-${project.version}</airavata.xbaya-dist.name>
-        <airavata.xbaya-bin.zip>${project.build.directory}/${airavata.xbaya-dist.name}-bin.zip</airavata.xbaya-bin.zip>
-        <airavata.xbaya-bin.tar.gz>${project.build.directory}/${airavata.xbaya-dist.name}-bin.tar.gz</airavata.xbaya-bin.tar.gz>
-        <airavata.xbaya-jnlp.name>xbaya-jnlp-${project.version}</airavata.xbaya-jnlp.name>
-        <airavata.xbaya-jnlp.zip>${project.build.directory}/${airavata.xbaya-jnlp.name}.zip</airavata.xbaya-jnlp.zip>
-        <airavata.xbaya-jnlp.tar.gz>${project.build.directory}/${airavata.xbaya-jnlp.name}.tar.gz</airavata.xbaya-jnlp.tar.gz>
-        <xbaya.directory>${project.build.directory}/temp/apache-airavata-xbaya-gui-${project.version}</xbaya.directory>
-        <jnlp.direcotry>${project.build.directory}/jnlp</jnlp.direcotry>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml b/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index 0eaa46d..0000000
--- a/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--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. -->
-	
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|includes)*>
-        ]>
-<assembly>
-    <id>bin</id>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>
-        <format>zip</format>
-    </formats>
-    <fileSets>
-        <!-- ********************** copy release notes files ********************** -->
-        <fileSet>
-            <directory>../../../</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>RELEASE_NOTES</include>
-            </includes>
-        </fileSet>
-        <!-- ********************** copy licenses, readme etc. ********************** -->
-        <fileSet>
-            <directory>src/main/resources/</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>LICENSE</include>
-                <include>NOTICE</include>
-                <include>README</include>
-                <include>INSTALL</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../../xbaya-gui/src/test/resources/</directory>
-            <outputDirectory>samples/workflows</outputDirectory>
-            <includes>
-                <include>*.xwf</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../../samples</directory>
-            <outputDirectory>samples</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/resources/conf</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>**/*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/resources/bin</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>**/*</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>lib</outputDirectory>
-            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-            <includes>
-                <include>org.apache.derby:derby:jar</include>
-                <include>org.apache.derby:derbytools:jar</include>
-                <include>org.apache.derby:derbynet:jar</include>
-                <include>org.apache.derby:derbyclient:jar</include>
-            </includes>
-        </dependencySet>
-        <dependencySet>
-            <outputDirectory>lib</outputDirectory>
-            <includes>
-				<include>*:*:jar</include>
-            </includes>
-        </dependencySet>
-    </dependencySets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java b/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java
deleted file mode 100644
index b9998b7..0000000
--- a/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- *
- * 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.distribution.xbaya.jnlp;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class will go through lib directory and creates the jnlp configuration file.
- */
-public class Main {
-
-    private static final String CONFIGURATION_ELEMENT = "DEPENDENT_JARS";
-
-    public static void main(String[] args) {
-
-        if (args.length != 2) {
-            System.err
-                    .println("[ERROR] JNLP creator must be given with lib directory of Xbaya and JNLP template location.");
-            System.exit(-1);
-        }
-
-        String libDirectory = args[0];
-        String jnlpTemplateFile = args[1];
-
-        System.out.println("[INFO] The lib directory is " + libDirectory);
-        System.out.println("[INFO] The jnlp file is " + jnlpTemplateFile);
-
-        File libDirectoryFile = new File(libDirectory);
-
-        if (!libDirectoryFile.exists()) {
-            System.err.println("[ERROR] Invalid lib directory given - " + libDirectory + ". Cannot add dependent jars");
-            System.exit(-1);
-        }
-
-        File jnlpFile = new File(jnlpTemplateFile);
-        if (!jnlpFile.canRead()) {
-            System.err.println("[ERROR] Unable to read given jnlp file - " + jnlpTemplateFile + ".");
-            System.exit(-1);
-
-        }
-
-        StringBuilder stringBuilder = new StringBuilder();
-
-        // Read all dependencies
-        for (File file : libDirectoryFile.listFiles(new JarFileFilter())) {
-            String line = "<jar href=\"lib/" + file.getName() + "\"/>";
-            stringBuilder.append(line);
-            stringBuilder.append("\n");
-        }
-
-        // System.out.println(stringBuilder.toString());
-        modifyConfigurations(jnlpFile, stringBuilder);
-
-    }
-
-    private static void modifyConfigurations(File jnlpFile, StringBuilder dependencies) {
-
-        List<String> lines = new ArrayList<String>();
-
-        // first, read the file and store the changes
-        BufferedReader in = null;
-        try {
-            in = new BufferedReader(new FileReader(jnlpFile));
-        } catch (FileNotFoundException e) {
-            System.err.println("[ERROR] Error occurred while reading the file. " + e.getMessage());
-        }
-
-        String line = null;
-        if (in != null) {
-            try {
-                line = in.readLine();
-            } catch (IOException e) {
-                System.err.println("[ERROR] Error occurred while reading the file. " + e.getMessage());
-                try {
-                    in.close();
-                } catch (IOException e1) {
-                    System.err.println("[ERROR] Error occurred while closing the file. " + e.getMessage());
-                }
-            }
-        }
-
-        try {
-            while (line != null) {
-
-                if (line.trim().startsWith(CONFIGURATION_ELEMENT)) {
-                    line = line.replaceAll(CONFIGURATION_ELEMENT, dependencies.toString());
-                }
-                lines.add(line);
-                line = in.readLine();
-
-            }
-        } catch (IOException e) {
-            System.err.println("[ERROR] Error occurred while reading the file. " + e.getMessage());
-        } finally {
-            try {
-                if (in != null) {
-                    in.close();
-                }
-            } catch (IOException e) {
-                System.err.println("[ERROR] Error occurred while closing the file. " + e.getMessage());
-            }
-        }
-
-        // now, write the file again with the changes
-        PrintWriter out = null;
-        try {
-            out = new PrintWriter(jnlpFile);
-            for (String l : lines) {
-                out.println(l);
-                out.flush();
-            }
-        } catch (FileNotFoundException e) {
-            System.err.println("[ERROR] Error occurred while writing back to the file. " + e.getMessage());
-        } finally {
-            if (out != null) {
-                out.flush();
-                out.close();
-            }
-        }
-
-    }
-
-    public static class JarFileFilter implements FilenameFilter {
-        String ext;
-
-        public JarFileFilter() {
-            this.ext = ".jar";
-        }
-
-        public boolean accept(File dir, String name) {
-            return name.endsWith(ext);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/xbaya-gui/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/src/main/resources/INSTALL b/modules/distribution/xbaya-gui/src/main/resources/INSTALL
deleted file mode 100644
index 1d6d275..0000000
--- a/modules/distribution/xbaya-gui/src/main/resources/INSTALL
+++ /dev/null
@@ -1,44 +0,0 @@
-Installing  Apache Airavata XBaya 0.11
--------------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata XBaya from Source
----------------------------------
-* Unzip/untar the source file or check out from svn.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* The compressed binary distribution is created at <PROJECT DIR>/modules/distribution/xbaya-gui/target/apache-airavata-xbaya-gui-<airavata-version>-bin.zip
-
-Installing the Airavata XBaya
------------------------------
-No installation is necessary. Just extract the compressed distribution.
-Note: For customizing the default configurations of the Airavata Server please 
-      refer to Airavata web-site (http://airavata.apache.org/) and/or Airavata 
-      mailing lists (http://airavata.apache.org/community/mailing-lists.html)
-
-Starting Apache Airavata XBaya
-------------------------------
-* Navigate to <XBAYA_HOME>/bin
-* type for following command to start the Airavata XBaya
-	MAC/Unix systems
-		$ sh xbaya-gui.sh
-	Windows
-		> xbaya-gui.bat
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Running Tests
--------------
-Once the binary is unzipped, instructions to run the tests should be followed from README
-
-Tutorials 
-----------
-The airavata website has instructions for basic tutorials:
-* For basic understanding of how Airavata works - http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* Describing and executing applications using Airavata - http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-* Advanced tutorial to provide understanding of how to run sample workflows distributed with Airavata - http://airavata.apache.org/documentation/tutorials/advanced-workflow-samples.html


[22/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
new file mode 100644
index 0000000..884ccd5
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/handler/LocalInputHandler.java
@@ -0,0 +1,92 @@
+/*
+ *
+ * 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.local.handler;
+
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.AbstractHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+
+
+public class LocalInputHandler extends AbstractHandler {
+    private static final Logger logger = LoggerFactory.getLogger(LocalInputHandler.class);
+    @Override
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        super.invoke(jobExecutionContext);
+        Map<String, Object> inputParameters = jobExecutionContext.getInMessageContext().getParameters();
+        for (Map.Entry<String, Object> inputParamEntry : inputParameters.entrySet()) {
+            if (inputParamEntry.getValue() instanceof InputDataObjectType) {
+                InputDataObjectType inputDataObject = (InputDataObjectType) inputParamEntry.getValue();
+                if (inputDataObject.getType() == DataType.URI
+                        && inputDataObject != null
+                        && !inputDataObject.getValue().equals("")) {
+                    try {
+                        inputDataObject.setValue(stageFile(jobExecutionContext.getInputDir(), inputDataObject.getValue()));
+                    } catch (IOException e) {
+                        throw new GFacHandlerException("Error while data staging sourceFile= " + inputDataObject.getValue());
+                    }
+                }
+            }
+        }
+    }
+
+    private String stageFile(String inputDir, String sourceFilePath) throws IOException {
+        int i = sourceFilePath.lastIndexOf(File.separator);
+        String substring = sourceFilePath.substring(i + 1);
+        if (inputDir.endsWith("/")) {
+            inputDir = inputDir.substring(0, inputDir.length() - 1);
+        }
+        String targetFilePath = inputDir + File.separator + substring;
+
+        if (sourceFilePath.startsWith("file")) {
+            sourceFilePath = sourceFilePath.substring(sourceFilePath.indexOf(":") + 1, sourceFilePath.length());
+        }
+
+        File sourceFile = new File(sourceFilePath);
+        File targetFile = new File(targetFilePath);
+        if (targetFile.exists()) {
+            targetFile.delete();
+        }
+        logger.info("staging source file : " + sourceFilePath + " to target file : " + targetFilePath);
+        FileUtils.copyFile(sourceFile, targetFile);
+
+        return targetFilePath;
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+
+    }
+
+    @Override
+    public void initProperties(Properties properties) throws GFacHandlerException {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
new file mode 100644
index 0000000..5519ee0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
@@ -0,0 +1,311 @@
+/*
+ *
+ * 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.local.provider.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
+import org.apache.airavata.gfac.core.provider.AbstractProvider;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.impl.OutputUtils;
+import org.apache.airavata.gfac.local.utils.InputStreamToFileWriter;
+import org.apache.airavata.gfac.local.utils.InputUtils;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.xmlbeans.XmlException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+public class LocalProvider extends AbstractProvider {
+    private static final Logger log = LoggerFactory.getLogger(LocalProvider.class);
+    private ProcessBuilder builder;
+    private List<String> cmdList;
+    private String jobId;
+    
+    public static class LocalProviderJobData{
+    	private String applicationName;
+    	private List<String> inputParameters;
+    	private String workingDir;
+    	private String inputDir;
+    	private String outputDir;
+		public String getApplicationName() {
+			return applicationName;
+		}
+		public void setApplicationName(String applicationName) {
+			this.applicationName = applicationName;
+		}
+		public List<String> getInputParameters() {
+			return inputParameters;
+		}
+		public void setInputParameters(List<String> inputParameters) {
+			this.inputParameters = inputParameters;
+		}
+		public String getWorkingDir() {
+			return workingDir;
+		}
+		public void setWorkingDir(String workingDir) {
+			this.workingDir = workingDir;
+		}
+		public String getInputDir() {
+			return inputDir;
+		}
+		public void setInputDir(String inputDir) {
+			this.inputDir = inputDir;
+		}
+		public String getOutputDir() {
+			return outputDir;
+		}
+		public void setOutputDir(String outputDir) {
+			this.outputDir = outputDir;
+		}
+    }
+    public LocalProvider(){
+        cmdList = new ArrayList<String>();
+    }
+
+    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
+    	super.initialize(jobExecutionContext);
+
+        // build command with all inputs
+        buildCommand();
+        initProcessBuilder(jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription());
+
+        // extra environment variables
+        builder.environment().put(Constants.INPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getInputDir());
+        builder.environment().put(Constants.OUTPUT_DATA_DIR_VAR_NAME, jobExecutionContext.getOutputDir());
+
+        // set working directory
+        builder.directory(new File(jobExecutionContext.getWorkingDir()));
+
+        // log info
+        log.info("Command = " + InputUtils.buildCommand(cmdList));
+        log.info("Working dir = " + builder.directory());
+        /*for (String key : builder.environment().keySet()) {
+            log.info("Env[" + key + "] = " + builder.environment().get(key));
+        }*/
+    }
+
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
+        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
+        JobDetails jobDetails = new JobDetails();
+        try {
+        	jobId = jobExecutionContext.getTaskData().getTaskID();
+            jobDetails.setJobID(jobId);
+            jobDetails.setJobDescription(jobExecutionContext.getApplicationContext()
+                    .getApplicationDeploymentDescription().getAppDeploymentDescription());
+            jobExecutionContext.setJobDetails(jobDetails);
+            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SETUP);
+            // running cmd
+            Process process = builder.start();
+
+            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), jobExecutionContext.getStandardOutput());
+            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), jobExecutionContext.getStandardError());
+
+            // start output threads
+            standardOutWriter.setDaemon(true);
+            standardErrorWriter.setDaemon(true);
+            standardOutWriter.start();
+            standardErrorWriter.start();
+
+            int returnValue = process.waitFor();
+
+            // make sure other two threads are done
+            standardOutWriter.join();
+            standardErrorWriter.join();
+
+            /*
+             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
+             * just provide warning in the log messages
+             */
+            if (returnValue != 0) {
+                log.error("Process finished with non zero return value. Process may have failed");
+            } else {
+                log.info("Process finished with return value of zero.");
+            }
+
+            StringBuffer buf = new StringBuffer();
+            buf.append("Executed ").append(InputUtils.buildCommand(cmdList))
+                    .append(" on the localHost, working directory = ").append(jobExecutionContext.getWorkingDir())
+                    .append(" tempDirectory = ").append(jobExecutionContext.getScratchLocation()).append(" With the status ")
+                    .append(String.valueOf(returnValue));
+
+            log.info(buf.toString());
+
+            // updating the job status to complete because there's nothing to monitor in local jobs
+//            MonitorID monitorID = createMonitorID(jobExecutionContext);
+            JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
+                    jobExecutionContext.getTaskData().getTaskID(),
+                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                    jobExecutionContext.getExperimentID(),
+                    jobExecutionContext.getGatewayID());
+            jobExecutionContext.getMonitorPublisher().publish(new JobStatusChangeEvent(JobState.COMPLETE, jobIdentity));
+        } catch (IOException io) {
+            throw new GFacProviderException(io.getMessage(), io);
+        } catch (InterruptedException e) {
+            throw new GFacProviderException(e.getMessage(), e);
+        }catch (GFacException e) {
+            throw new GFacProviderException(e.getMessage(), e);
+        }
+    }
+
+//	private MonitorID createMonitorID(JobExecutionContext jobExecutionContext) {
+//		MonitorID monitorID = new MonitorID(jobExecutionContext.getApplicationContext().getHostDescription(), jobId,
+//		        jobExecutionContext.getTaskData().getTaskID(),
+//		        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
+//		        jobExecutionContext.getExperiment().getUserName(),jobId);
+//		return monitorID;
+//	}
+
+//	private void saveApplicationJob(JobExecutionContext jobExecutionContext)
+//			throws GFacProviderException {
+//		ApplicationDeploymentDescriptionType app = jobExecutionContext.
+//                getApplicationContext().getApplicationDeploymentDescription().getType();
+//		ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
+//		appJob.setJobId(jobId);
+//		LocalProviderJobData data = new LocalProviderJobData();
+//		data.setApplicationName(app.getExecutableLocation());
+//		data.setInputDir(app.getInputDataDirectory());
+//		data.setOutputDir(app.getOutputDataDirectory());
+//		data.setWorkingDir(builder.directory().toString());
+//		data.setInputParameters(ProviderUtils.getInputParameters(jobExecutionContext));
+//		ByteArrayOutputStream stream = new ByteArrayOutputStream();
+//		JAXB.marshal(data, stream);
+//		appJob.setJobData(stream.toString());
+//		appJob.setSubmittedTime(Calendar.getInstance().getTime());
+//		appJob.setStatus(ApplicationJobStatus.SUBMITTED);
+//		appJob.setStatusUpdateTime(appJob.getSubmittedTime());
+//		GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
+//	}
+
+    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {
+        try {
+        	List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
+            String stdOutStr = GFacUtils.readFileToString(jobExecutionContext.getStandardOutput());
+            String stdErrStr = GFacUtils.readFileToString(jobExecutionContext.getStandardError());
+			Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
+            OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
+            TaskDetails taskDetails = (TaskDetails)registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
+            if (taskDetails != null){
+                taskDetails.setApplicationOutputs(outputArray);
+                registry.update(RegistryModelType.TASK_DETAIL, taskDetails, taskDetails.getTaskID());
+            }
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+            TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                    jobExecutionContext.getExperimentID(),
+                    jobExecutionContext.getGatewayID());
+            jobExecutionContext.getMonitorPublisher().publish(new TaskOutputChangeEvent(outputArray, taskIdentity));
+        } catch (XmlException e) {
+            throw new GFacProviderException("Cannot read output:" + e.getMessage(), e);
+        } catch (IOException io) {
+            throw new GFacProviderException(io.getMessage(), io);
+        } catch (Exception e){
+        	throw new GFacProviderException("Error in retrieving results",e);
+        }
+    }
+
+    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        // TODO: Auto generated method body.
+    }
+
+    @Override
+    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        // TODO: Auto generated method body.
+    }
+
+
+    private void buildCommand() {
+        cmdList.add(jobExecutionContext.getExecutablePath());
+        Map<String, Object> inputParameters = jobExecutionContext.getInMessageContext().getParameters();
+
+        // sort the inputs first and then build the command List
+        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
+            @Override
+            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
+                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
+            }
+        };
+        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
+        for (Object object : inputParameters.values()) {
+            if (object instanceof InputDataObjectType) {
+                InputDataObjectType inputDOT = (InputDataObjectType) object;
+                sortedInputSet.add(inputDOT);
+            }
+        }
+        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
+            if (inputDataObjectType.getApplicationArgument() != null
+                    && !inputDataObjectType.getApplicationArgument().equals("")) {
+                cmdList.add(inputDataObjectType.getApplicationArgument());
+            }
+
+            if (inputDataObjectType.getValue() != null
+                    && !inputDataObjectType.getValue().equals("")) {
+                cmdList.add(inputDataObjectType.getValue());
+            }
+        }
+
+    }
+
+    private void initProcessBuilder(ApplicationDeploymentDescription app){
+        builder = new ProcessBuilder(cmdList);
+
+        List<SetEnvPaths> setEnvironment = app.getSetEnvironment();
+        if (setEnvironment != null) {
+            for (SetEnvPaths envPath : setEnvironment) {
+                Map<String,String> builderEnv = builder.environment();
+                builderEnv.put(envPath.getName(), envPath.getValue());
+            }
+        }
+    }
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
new file mode 100644
index 0000000..2467ce8
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputStreamToFileWriter.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.local.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+
+public class InputStreamToFileWriter extends Thread{
+    protected final Logger log = LoggerFactory.getLogger(this.getClass());
+
+    private BufferedReader in;
+    private BufferedWriter out;
+
+    public InputStreamToFileWriter(InputStream in, String out) throws IOException {
+        this.in = new BufferedReader(new InputStreamReader(in));
+        this.out = new BufferedWriter(new FileWriter(out));
+    }
+
+    public void run() {
+        try {
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                if (log.isDebugEnabled()) {
+                    log.debug(line);
+                }
+                out.write(line);
+                out.newLine();
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (Exception e) {
+                    log.error(e.getMessage(), e);
+                }
+            }
+            if (out != null) {
+                try {
+                    out.close();
+                } catch (Exception e) {
+                    log.error(e.getMessage(), e);
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
new file mode 100644
index 0000000..98671fd
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/InputUtils.java
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.local.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class InputUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(InputUtils.class);
+
+    private static final String SPACE = " ";
+
+    private InputUtils() {
+    }
+
+    public static String buildCommand(List<String> cmdList) {
+        StringBuffer buff = new StringBuffer();
+        for (String string : cmdList) {
+            logger.debug("Build Command --> " + string);
+            buff.append(string);
+            buff.append(SPACE);
+        }
+        return buff.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
new file mode 100644
index 0000000..2b45df7
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/local/utils/LocalProviderUtil.java
@@ -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.local.utils;
+
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+
+public class LocalProviderUtil {
+    private static final Logger log = LoggerFactory.getLogger(LocalProviderUtil.class);
+
+    private void makeFileSystemDir(String dir) throws GFacProviderException {
+        File f = new File(dir);
+        if (f.isDirectory() && f.exists()) {
+            return;
+        } else if (!new File(dir).mkdir()) {
+            throw new GFacProviderException("Cannot make directory " + dir);
+        }
+    }
+
+    public void makeDirectory(JobExecutionContext jobExecutionContext) throws GFacProviderException {
+        log.info("working diectroy = " + jobExecutionContext.getWorkingDir());
+        log.info("temp directory = " + jobExecutionContext.getScratchLocation());
+        makeFileSystemDir(jobExecutionContext.getWorkingDir());
+        makeFileSystemDir(jobExecutionContext.getScratchLocation());
+        makeFileSystemDir(jobExecutionContext.getInputDir());
+        makeFileSystemDir(jobExecutionContext.getOutputDir());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
new file mode 100644
index 0000000..8eba250
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
@@ -0,0 +1,107 @@
+package org.apache.airavata.gfac.monitor;/*
+ *
+ * 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.
+ *
+*/
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.SecurityContext;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+import java.util.Date;
+
+public class HPCMonitorID extends MonitorID {
+    private final static Logger logger = LoggerFactory.getLogger(HPCMonitorID.class);
+
+
+    private AuthenticationInfo authenticationInfo = null;
+
+    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID,
+                        String experimentID, String userName,String jobName) {
+        super(computeResourceDescription, jobID, taskID, workflowNodeID, experimentID, userName,jobName);
+        setComputeResourceDescription(computeResourceDescription);
+        setJobStartedTime(new Timestamp((new Date()).getTime()));
+        setUserName(userName);
+        setJobID(jobID);
+        setTaskID(taskID);
+        setExperimentID(experimentID);
+        setWorkflowNodeID(workflowNodeID);
+    }
+
+    public HPCMonitorID(AuthenticationInfo authenticationInfo, JobExecutionContext jobExecutionContext) {
+        super(jobExecutionContext);
+        this.authenticationInfo = authenticationInfo;
+        if (this.authenticationInfo != null) {
+            try {
+                String hostAddress = jobExecutionContext.getHostName();
+                SecurityContext securityContext = jobExecutionContext.getSecurityContext(hostAddress);
+                ServerInfo serverInfo = null;
+                if (securityContext != null) {
+                    if (securityContext instanceof  GSISecurityContext){
+                        serverInfo = (((GSISecurityContext) securityContext).getPbsCluster()).getServerInfo();
+                        if (serverInfo.getUserName() != null) {
+                            setUserName(serverInfo.getUserName());
+                        }
+                    }
+                    if (securityContext instanceof SSHSecurityContext){
+                        serverInfo = (((SSHSecurityContext) securityContext).getPbsCluster()).getServerInfo();
+                        if (serverInfo.getUserName() != null) {
+                            setUserName(serverInfo.getUserName());
+                        }
+                    }
+                }
+            } catch (GFacException e) {
+                logger.error("Error while getting security context", e);
+            }
+        }
+    }
+
+    public HPCMonitorID(ComputeResourceDescription computeResourceDescription, String jobID, String taskID, String workflowNodeID, String experimentID, String userName, AuthenticationInfo authenticationInfo) {
+        setComputeResourceDescription(computeResourceDescription);
+        setJobStartedTime(new Timestamp((new Date()).getTime()));
+        this.authenticationInfo = authenticationInfo;
+        // if we give myproxyauthenticationInfo, so we try to use myproxy user as the user
+        if (this.authenticationInfo != null) {
+            if (this.authenticationInfo instanceof MyProxyAuthenticationInfo) {
+                setUserName(((MyProxyAuthenticationInfo) this.authenticationInfo).getUserName());
+            }
+        }
+        setJobID(jobID);
+        setTaskID(taskID);
+        setExperimentID(experimentID);
+        setWorkflowNodeID(workflowNodeID);
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
new file mode 100644
index 0000000..f29e3e6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/HostMonitorData.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * 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.monitor;
+
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HostMonitorData {
+//    private HostDescription host;
+    private ComputeResourceDescription computeResourceDescription;
+    private JobSubmissionProtocol jobSubmissionProtocol;
+    private DataMovementProtocol dataMovementProtocol;
+
+    private List<MonitorID> monitorIDs;
+
+    public HostMonitorData(JobExecutionContext jobExecutionContext) {
+        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
+        this.jobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        this.dataMovementProtocol = jobExecutionContext.getPreferredDataMovementProtocol();
+        this.monitorIDs = new ArrayList<MonitorID>();
+    }
+
+    public HostMonitorData(JobExecutionContext jobExecutionContext, List<MonitorID> monitorIDs) {
+        this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
+        this.jobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
+        this.dataMovementProtocol = jobExecutionContext.getPreferredDataMovementProtocol();
+        this.monitorIDs = monitorIDs;
+    }
+
+    public ComputeResourceDescription getComputeResourceDescription() {
+        return computeResourceDescription;
+    }
+
+    public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
+        this.computeResourceDescription = computeResourceDescription;
+    }
+
+    public List<MonitorID> getMonitorIDs() {
+        return monitorIDs;
+    }
+
+    public void setMonitorIDs(List<MonitorID> monitorIDs) {
+        this.monitorIDs = monitorIDs;
+    }
+
+    /**
+     * this method get called by CommonUtils and it will check the right place before adding
+     * so there will not be a mismatch between this.host and monitorID.host
+     * @param monitorID
+     * @throws org.apache.airavata.gfac.monitor.exception.AiravataMonitorException
+     */
+    public void addMonitorIDForHost(MonitorID monitorID)throws AiravataMonitorException {
+        monitorIDs.add(monitorID);
+    }
+
+    public JobSubmissionProtocol getJobSubmissionProtocol() {
+        return jobSubmissionProtocol;
+    }
+
+    public DataMovementProtocol getDataMovementProtocol() {
+        return dataMovementProtocol;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
new file mode 100644
index 0000000..022d17c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/UserMonitorData.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.monitor;
+
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This is the datastructure to keep the user centric job data, rather keeping
+ * the individual jobs we keep the jobs based on the each user
+ */
+public class UserMonitorData {
+    private final static Logger logger = LoggerFactory.getLogger(UserMonitorData.class);
+
+    private String  userName;
+
+    private List<HostMonitorData> hostMonitorData;
+
+
+    public UserMonitorData(String userName) {
+        this.userName = userName;
+        hostMonitorData = new ArrayList<HostMonitorData>();
+    }
+
+    public UserMonitorData(String userName, List<HostMonitorData> hostMonitorDataList) {
+        this.hostMonitorData = hostMonitorDataList;
+        this.userName = userName;
+    }
+
+    public List<HostMonitorData> getHostMonitorData() {
+        return hostMonitorData;
+    }
+
+    public void setHostMonitorData(List<HostMonitorData> hostMonitorData) {
+        this.hostMonitorData = hostMonitorData;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    /*
+    This method will add element to the MonitorID list, user should not
+    duplicate it, we do not check it because its going to be used by airavata
+    so we have to use carefully and this method will add a host if its a new host
+     */
+    public void addHostMonitorData(HostMonitorData hostMonitorData) throws AiravataMonitorException {
+        this.hostMonitorData.add(hostMonitorData);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
new file mode 100644
index 0000000..f19decf
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/ExperimentCancelRequest.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.monitor.command;
+
+public class ExperimentCancelRequest {
+	private String experimentId;
+
+	public ExperimentCancelRequest(String experimentId) {
+		this.experimentId = experimentId;
+	}
+
+	public String getExperimentId() {
+		return experimentId;
+	}
+
+	public void setExperimentId(String experimentId) {
+		this.experimentId = experimentId;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
new file mode 100644
index 0000000..b45e01c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/command/TaskCancelRequest.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.monitor.command;
+
+public class TaskCancelRequest {
+	private String experimentId;
+	private String nodeId;
+	private String taskId;
+	
+	public TaskCancelRequest(String experimentId, String nodeId, String taskId) {
+		this.experimentId = experimentId;
+		this.setNodeId(nodeId);
+		this.taskId = taskId;
+	}
+	public String getExperimentId() {
+		return experimentId;
+	}
+	public void setExperimentId(String experimentId) {
+		this.experimentId = experimentId;
+	}
+	public String getTaskId() {
+		return taskId;
+	}
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+	public String getNodeId() {
+		return nodeId;
+	}
+	public void setNodeId(String nodeId) {
+		this.nodeId = nodeId;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
new file mode 100644
index 0000000..b4ac3a9
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/AiravataAbstractMonitor.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.monitor.core;
+
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This is the abstract Monitor which needs to be used by
+ * any Monitoring implementation which expect nto consume
+ * to store the status to registry. Because they have to
+ * use the MonitorPublisher to publish the monitoring statuses
+ * to the Event Bus. All the Monitor statuses publish to the eventbus
+ * will be saved to the Registry.
+ */
+public abstract class AiravataAbstractMonitor implements Monitor {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataAbstractMonitor.class);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
new file mode 100644
index 0000000..a003f55
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/MessageParser.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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.monitor.core;
+
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.workspace.experiment.JobState;
+
+/**
+ * This is an interface to implement messageparser, it could be
+ * pull based or push based still monitor has to parse the content of
+ * the message it gets from remote monitoring system and finalize
+ * them to internal job state, Ex: JSON parser for AMQP and Qstat reader
+ * for pull based monitor.
+ */
+public interface MessageParser {
+    /**
+     * This method is to implement how to parse the incoming message
+     * and implement a logic to finalize the status of the job,
+     * we have to makesure the correct message is given to the messageparser
+     * parse method, it will not do any filtering
+     * @param message content of the message
+     * @return
+     */
+    JobState parseMessage(String message)throws AiravataMonitorException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
new file mode 100644
index 0000000..614d606
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/Monitor.java
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.monitor.core;
+
+
+/**
+ * This is the primary interface for Monitors,
+ * This can be used to implement different methods of monitoring
+ */
+public interface Monitor {
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
new file mode 100644
index 0000000..efdf89c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PullMonitor.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.monitor.core;
+
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+
+/**
+ * PullMonitors can implement this interface
+ * Since the pull and push based monitoring required different
+ * operations, PullMonitor will be useful.
+ * This will allow users to program Pull monitors separately
+ */
+public abstract class PullMonitor extends AiravataAbstractMonitor {
+
+    private int pollingFrequence;
+    /**
+     * This method will can invoke when PullMonitor needs to start
+     * and it has to invoke in the frequency specified below,
+     * @return if the start process is successful return true else false
+     */
+    public abstract boolean startPulling() throws AiravataMonitorException;
+
+    /**
+     * This is the method to stop the polling process
+     * @return if the stopping process is successful return true else false
+     */
+    public abstract boolean stopPulling()throws AiravataMonitorException;
+
+    /**
+     * this method can be used to set the polling frequencey or otherwise
+     * can implement a polling mechanism, and implement how to do
+     * @param frequence
+     */
+    public void setPollingFrequence(int frequence){
+        this.pollingFrequence = frequence;
+    }
+
+    /**
+     * this method can be used to get the polling frequencey or otherwise
+     * can implement a polling mechanism, and implement how to do
+     * @return
+     */
+    public int getPollingFrequence(){
+        return this.pollingFrequence;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
new file mode 100644
index 0000000..1b6a228
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/core/PushMonitor.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * 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.monitor.core;
+
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+
+/**
+ * PushMonitors can implement this interface
+ * Since the pull and push based monitoring required different
+ * operations, PullMonitor will be useful.
+ * This interface will allow users to program Push monitors separately
+ */
+public abstract class PushMonitor extends AiravataAbstractMonitor {
+    /**
+     * This method can be invoked to register a listener with the
+     * remote monitoring system, ideally inside this method users will be
+     * writing some client listener code for the remote monitoring system,
+     * this will be a simple wrapper around any client for the remote Monitor.
+     * @param monitorID
+     * @return
+     */
+    public abstract boolean registerListener(MonitorID monitorID)throws AiravataMonitorException;
+
+    /**
+     * This method can be invoked to unregister a listener with the
+     * remote monitoring system, ideally inside this method users will be
+     * writing some client listener code for the remote monitoring system,
+     * this will be a simple wrapper around any client for the remote Monitor.
+     * @param monitorID
+     * @return
+     */
+    public abstract boolean unRegisterListener(MonitorID monitorID)throws AiravataMonitorException;
+
+    /**
+     * This can be used to stop the registration thread
+     * @return
+     * @throws org.apache.airavata.gfac.monitor.exception.AiravataMonitorException
+     */
+    public abstract boolean stopRegister()throws AiravataMonitorException;
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
new file mode 100644
index 0000000..eea6ef6
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -0,0 +1,344 @@
+/*
+ *
+ * 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.monitor.email;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
+import org.apache.airavata.gfac.core.monitor.JobStatusResult;
+import org.apache.airavata.gfac.core.monitor.EmailParser;
+import org.apache.airavata.gfac.impl.OutHandlerWorker;
+import org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser;
+import org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser;
+import org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser;
+import org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+
+import javax.mail.Address;
+import javax.mail.Flags;
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.search.FlagTerm;
+import javax.mail.search.SearchTerm;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class EmailBasedMonitor implements Runnable{
+    private static final AiravataLogger log = AiravataLoggerFactory.getLogger(EmailBasedMonitor.class);
+
+    public static final int COMPARISON = 6; // after and equal
+    public static final String IMAPS = "imaps";
+    public static final String POP3 = "pop3";
+    private boolean stopMonitoring = false;
+
+    private Session session ;
+    private Store store;
+    private Folder emailFolder;
+    private Properties properties;
+    private Map<String, JobExecutionContext> jobMonitorMap = new ConcurrentHashMap<String, JobExecutionContext>();
+    private String host, emailAddress, password, storeProtocol, folderName ;
+    private Date monitorStartDate;
+    private Map<ResourceJobManagerType, EmailParser> emailParserMap = new HashMap<ResourceJobManagerType, EmailParser>();
+
+    public EmailBasedMonitor(ResourceJobManagerType type) throws AiravataException {
+        init();
+    }
+
+    private void init() throws AiravataException {
+        host = ServerSettings.getEmailBasedMonitorHost();
+        emailAddress = ServerSettings.getEmailBasedMonitorAddress();
+        password = ServerSettings.getEmailBasedMonitorPassword();
+        storeProtocol = ServerSettings.getEmailBasedMonitorStoreProtocol();
+        folderName = ServerSettings.getEmailBasedMonitorFolderName();
+        if (!(storeProtocol.equals(IMAPS) || storeProtocol.equals(POP3))) {
+            throw new AiravataException("Unsupported store protocol , expected " +
+                    IMAPS + " or " + POP3 + " but found " + storeProtocol);
+        }
+        properties = new Properties();
+        properties.put("mail.store.protocol", storeProtocol);
+    }
+
+    public void addToJobMonitorMap(JobExecutionContext jobExecutionContext) {
+        String monitorId = jobExecutionContext.getJobDetails().getJobID();
+        if (monitorId == null || monitorId.isEmpty()) {
+            monitorId = jobExecutionContext.getJobDetails().getJobName();
+        }
+        addToJobMonitorMap(monitorId, jobExecutionContext);
+    }
+
+    public void addToJobMonitorMap(String monitorId, JobExecutionContext jobExecutionContext) {
+        log.info("[EJM]: Added monitor Id : " + monitorId + " to email based monitor map");
+        jobMonitorMap.put(monitorId, jobExecutionContext);
+    }
+
+    private JobStatusResult parse(Message message) throws MessagingException, AiravataException {
+        Address fromAddress = message.getFrom()[0];
+        String addressStr = fromAddress.toString();
+        ResourceJobManagerType jobMonitorType = getJobMonitorType(addressStr);
+        EmailParser emailParser = emailParserMap.get(jobMonitorType);
+        if (emailParser == null) {
+            switch (jobMonitorType) {
+                case PBS:
+                    emailParser = new PBSEmailParser();
+                    break;
+                case SLURM:
+                    emailParser = new SLURMEmailParser();
+                    break;
+                case LSF:
+                    emailParser = new LSFEmailParser();
+                    break;
+                case UGE:
+                    emailParser = new UGEEmailParser();
+                    break;
+                default:
+                    throw new AiravataException("[EJM]: Un-handle resource job manager type: " + jobMonitorType.toString() + " for email monitoring -->  " + addressStr);
+            }
+
+            emailParserMap.put(jobMonitorType, emailParser);
+        }
+        return emailParser.parseEmail(message);
+    }
+
+    private ResourceJobManagerType getJobMonitorType(String addressStr) throws AiravataException {
+        System.out.println("*********** address ******** : " + addressStr);
+        switch (addressStr) {
+            case "pbsconsult@sdsc.edu":   // trestles , gordan
+            case "adm@trident.bigred2.uits.iu.edu":  // bigred2
+            case "root <ad...@trident.bigred2.uits.iu.edu>": // bigred2
+            case "root <ad...@scyld.localdomain>": // alamo
+                return ResourceJobManagerType.PBS;
+            case "SDSC Admin <sl...@comet-fe3.sdsc.edu>": // comet
+            case "slurm@batch1.stampede.tacc.utexas.edu": // stampede
+            case "slurm user <sl...@tempest.dsc.soic.indiana.edu>":
+                return ResourceJobManagerType.SLURM;
+//            case "lsf":
+//                return ResourceJobManagerType.LSF;
+            default:
+                if (addressStr.contains("ls4.tacc.utexas.edu>")) { // lonestar
+                    return ResourceJobManagerType.UGE;
+                } else {
+                    throw new AiravataException("[EJM]: Couldn't identify Resource job manager type from address " + addressStr);
+                }
+        }
+
+    }
+
+    @Override
+    public void run() {
+        try {
+            session = Session.getDefaultInstance(properties);
+            store = session.getStore(storeProtocol);
+            store.connect(host, emailAddress, password);
+            emailFolder = store.getFolder(folderName);
+            // first time we search for all unread messages.
+            SearchTerm unseenBefore = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
+            while (!(stopMonitoring || ServerSettings.isStopAllThreads())) {
+                Thread.sleep(ServerSettings.getEmailMonitorPeriod());// sleep a bit - get a rest till job finishes
+                if (jobMonitorMap.isEmpty()) {
+                    log.info("[EJM]: Job Monitor Map is empty, no need to retrieve emails");
+                    continue;
+                } else {
+                    log.info("[EJM]: " + jobMonitorMap.size() + " job/s in job monitor map");
+                }
+                if (!store.isConnected()) {
+                    store.connect();
+                    emailFolder = store.getFolder(folderName);
+                }
+                log.info("[EJM]: Retrieving unseen emails");
+                emailFolder.open(Folder.READ_WRITE);
+                Message[] searchMessages = emailFolder.search(unseenBefore);
+                if (searchMessages == null || searchMessages.length == 0) {
+                    log.info("[EJM]: No new email messages");
+                } else {
+                    log.info("[EJM]: "+searchMessages.length + " new email/s received");
+                }
+                processMessages(searchMessages);
+                emailFolder.close(false);
+            }
+        } catch (MessagingException e) {
+            log.error("[EJM]: Couldn't connect to the store ", e);
+        } catch (InterruptedException e) {
+            log.error("[EJM]: Interrupt exception while sleep ", e);
+        } catch (AiravataException e) {
+            log.error("[EJM]: UnHandled arguments ", e);
+        } finally {
+            try {
+                emailFolder.close(false);
+                store.close();
+            } catch (MessagingException e) {
+                log.error("[EJM]: Store close operation failed, couldn't close store", e);
+            }
+        }
+    }
+
+    private void processMessages(Message[] searchMessages) throws MessagingException {
+        List<Message> processedMessages = new ArrayList<>();
+        List<Message> unreadMessages = new ArrayList<>();
+        for (Message message : searchMessages) {
+            try {
+                JobStatusResult jobStatusResult = parse(message);
+                JobExecutionContext jEC = jobMonitorMap.get(jobStatusResult.getJobId());
+                if (jEC == null) {
+                    jEC = jobMonitorMap.get(jobStatusResult.getJobName());
+                }
+                if (jEC != null) {
+                    process(jobStatusResult, jEC);
+                    processedMessages.add(message);
+                } else {
+                    // we can get JobExecutionContext null in multiple Gfac instances environment,
+                    // where this job is not submitted by this Gfac instance hence we ignore this message.
+                    unreadMessages.add(message);
+//                  log.info("JobExecutionContext is not found for job Id " + jobStatusResult.getJobId());
+                }
+            } catch (AiravataException e) {
+                log.error("[EJM]: Error parsing email message =====================================>", e);
+                try {
+                    writeEnvelopeOnError(message);
+                } catch (MessagingException e1) {
+                    log.error("[EJM]: Error printing envelop of the email");
+                }
+                unreadMessages.add(message);
+            } catch (MessagingException e) {
+                log.error("[EJM]: Error while retrieving sender address from message : " + message.toString());
+                unreadMessages.add(message);
+            }
+        }
+        if (!processedMessages.isEmpty()) {
+            Message[] seenMessages = new Message[processedMessages.size()];
+            processedMessages.toArray(seenMessages);
+            try {
+                emailFolder.setFlags(seenMessages, new Flags(Flags.Flag.SEEN), true);
+            } catch (MessagingException e) {
+                if (!store.isConnected()) {
+                    store.connect();
+                    emailFolder.setFlags(seenMessages, new Flags(Flags.Flag.SEEN), true);
+                }
+            }
+
+        }
+        if (!unreadMessages.isEmpty()) {
+            Message[] unseenMessages = new Message[unreadMessages.size()];
+            unreadMessages.toArray(unseenMessages);
+            try {
+                emailFolder.setFlags(unseenMessages, new Flags(Flags.Flag.SEEN), false);
+            } catch (MessagingException e) {
+                if (!store.isConnected()) {
+                    store.connect();
+                    emailFolder.setFlags(unseenMessages, new Flags(Flags.Flag.SEEN), false);
+
+                }
+            }
+        }
+    }
+
+    private void process(JobStatusResult jobStatusResult, JobExecutionContext jEC){
+        JobState resultState = jobStatusResult.getState();
+        jEC.getJobDetails().setJobStatus(new JobStatus(resultState));
+        boolean runOutHandlers = false;
+        String jobDetails = "JobName : " + jobStatusResult.getJobName() + ", JobId : " + jobStatusResult.getJobId();
+        // TODO - Handle all other valid JobStates
+        if (resultState == JobState.COMPLETE) {
+            jobMonitorMap.remove(jobStatusResult.getJobId());
+            runOutHandlers = true;
+            log.info("[EJM]: Job Complete email received , removed job from job monitoring. " + jobDetails);
+        }else if (resultState == JobState.QUEUED) {
+            // nothing special thing to do, update the status change to rabbit mq at the end of this method.
+            log.info("[EJM]: Job Queued email received, " + jobDetails);
+        }else if (resultState == JobState.ACTIVE) {
+            // nothing special thing to do, update the status change to rabbit mq at the end of this method.
+            log.info("[EJM]: Job Active email received, " + jobDetails);
+        }else if (resultState == JobState.FAILED) {
+            jobMonitorMap.remove(jobStatusResult.getJobId());
+            runOutHandlers = true;
+            log.info("[EJM]: Job failed email received , removed job from job monitoring. " + jobDetails);
+        }else if (resultState == JobState.CANCELED) {
+            jobMonitorMap.remove(jobStatusResult.getJobId());
+            runOutHandlers = false; // Do we need to run out handlers in canceled case?
+            log.info("[EJM]: Job canceled mail received, removed job from job monitoring. " + jobDetails);
+
+        }
+        log.info("[EJM]: Publishing status changes to amqp. " + jobDetails);
+        publishJobStatusChange(jEC);
+
+        if (runOutHandlers) {
+            log.info("[EJM]: Calling Out Handler chain of " + jobDetails);
+            GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(jEC));
+        }
+    }
+
+    private void publishJobStatusChange(JobExecutionContext jobExecutionContext) {
+        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
+        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
+                jobExecutionContext.getTaskData().getTaskID(),
+                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getGatewayID());
+        jobStatus.setJobIdentity(jobIdentity);
+        jobStatus.setState(jobExecutionContext.getJobDetails().getJobStatus().getJobState());
+        // we have this JobStatus class to handle amqp monitoring
+        log.debugId(jobStatus.getJobIdentity().getJobId(), "[EJM]: Published job status(" +
+                        jobExecutionContext.getJobDetails().getJobStatus().getJobState().toString() + ") change request, " +
+                        "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
+                jobStatus.getJobIdentity().getTaskId());
+
+        jobExecutionContext.getMonitorPublisher().publish(jobStatus);
+    }
+
+    private void writeEnvelopeOnError(Message m) throws MessagingException {
+        Address[] a;
+        // FROM
+        if ((a = m.getFrom()) != null) {
+            for (int j = 0; j < a.length; j++)
+                log.error("FROM: " + a[j].toString());
+        }
+        // TO
+        if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
+            for (int j = 0; j < a.length; j++)
+                log.error("TO: " + a[j].toString());
+        }
+        // SUBJECT
+        if (m.getSubject() != null)
+            log.error("SUBJECT: " + m.getSubject());
+    }
+
+    public void stopMonitoring() {
+        stopMonitoring = true;
+    }
+
+    public void setDate(Date date) {
+        this.monitorStartDate = date;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
new file mode 100644
index 0000000..3a75331
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailMonitorFactory.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.monitor.email;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+public class EmailMonitorFactory {
+
+    private static EmailBasedMonitor emailBasedMonitor;
+    private static Date startMonitorDate = Calendar.getInstance().getTime();
+
+    public static EmailBasedMonitor getEmailBasedMonitor(ResourceJobManagerType resourceJobManagerType) throws AiravataException {
+        if (emailBasedMonitor == null) {
+            synchronized (EmailMonitorFactory.class){
+                if (emailBasedMonitor == null) {
+                    emailBasedMonitor = new EmailBasedMonitor(resourceJobManagerType);
+                    emailBasedMonitor.setDate(startMonitorDate);
+                    new Thread(emailBasedMonitor).start();
+                }
+            }
+        }
+        return emailBasedMonitor;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
new file mode 100644
index 0000000..1b5a027
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/LSFEmailParser.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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.monitor.email.parser;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.gfac.core.monitor.EmailParser;
+import org.apache.airavata.gfac.core.monitor.JobStatusResult;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class LSFEmailParser implements EmailParser {
+    private static final Logger log = LoggerFactory.getLogger(LSFEmailParser.class);
+    //root@c312-206.ls4.tacc.utexas.edu
+    private static final String SIGNAL = "signal";
+    private static final String LONESTAR_REGEX = "Job (?<" + JOBID + ">\\d+) \\(.*\\) (?<" + STATUS
+            + ">.*)\\s[a-zA-Z =]+(?<" + EXIT_STATUS + ">\\d+)\\sSignal[ ]*=[ ]*(?<" + SIGNAL + ">[a-zA-z]*)";
+
+    @Override
+    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
+        JobStatusResult jobStatusResult = new JobStatusResult();
+        try {
+            String content = ((String) message.getContent());
+            Pattern pattern = Pattern.compile(LONESTAR_REGEX);
+            Matcher matcher = pattern.matcher(content);
+            if (matcher.find()) {
+                jobStatusResult.setJobId(matcher.group(JOBID));
+                String status = matcher.group(STATUS);
+                jobStatusResult.setState(getJobState(status, content));
+                return jobStatusResult;
+            } else {
+                log.error("[EJM]: No matched found for content => \n" + content);
+            }
+        } catch (IOException e) {
+            throw new AiravataException("i[EJM]: Error while reading content of the email message");
+        }
+        return jobStatusResult;
+    }
+
+    private JobState getJobState(String status, String content) {
+        switch (status) {
+            case "Aborted":
+                return JobState.FAILED;
+            case "Success":
+                return JobState.COMPLETE;
+            default:
+                return JobState.UNKNOWN;
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
new file mode 100644
index 0000000..4a3c88b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/PBSEmailParser.java
@@ -0,0 +1,105 @@
+/*
+ *
+ * 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.monitor.email.parser;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.gfac.core.monitor.EmailParser;
+import org.apache.airavata.gfac.core.monitor.JobStatusResult;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class PBSEmailParser implements EmailParser {
+
+    private static final Logger log = LoggerFactory.getLogger(PBSEmailParser.class);
+
+
+    private static final String REGEX = "[a-zA-Z ]*:[ ]*(?<" +  JOBID + ">[a-zA-Z0-9-\\.]*)\\s+[a-zA-Z ]*:[ ]*(?<"+
+            JOBNAME + ">[a-zA-Z0-9-\\.]*)\\s+.*\\s+(?<" + STATUS + ">[a-zA-Z\\ ]*)";
+    private static final String REGEX_EXIT_STATUS = "Exit_status=(?<" + EXIT_STATUS + ">[\\d]+)";
+    public static final String BEGUN_EXECUTION = "Begun execution";
+    public static final String EXECUTION_TERMINATED = "Execution terminated";
+    public static final String ABORTED_BY_PBS_SERVER = "Aborted by PBS Server";
+
+    @Override
+    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
+        JobStatusResult jobStatusResult = new JobStatusResult();
+//        log.info("Parsing -> " + message.getSubject());
+        try {
+            String content = ((String) message.getContent());
+            Pattern pattern = Pattern.compile(REGEX);
+            Matcher matcher = pattern.matcher(content);
+            if (matcher.find()) {
+                jobStatusResult.setJobId(matcher.group(JOBID));
+                jobStatusResult.setJobName(matcher.group(JOBNAME));
+                String statusLine = matcher.group(STATUS);
+                jobStatusResult.setState(getJobState(statusLine, content));
+                return jobStatusResult;
+            } else {
+                log.error("[EJM]: No matched found for content => \n" + content);
+            }
+
+        } catch (IOException e) {
+            throw new AiravataException("[EJM]: Error while reading content of the email message");
+        }
+        return jobStatusResult;
+    }
+
+    private JobState getJobState(String statusLine, String content) {
+        switch (statusLine) {
+            case BEGUN_EXECUTION:
+                return JobState.ACTIVE;
+            case EXECUTION_TERMINATED:
+                int exitStatus = getExitStatus(content);
+                if (exitStatus == 0) {
+                    // TODO - Remove rabbitmq client script line from the script.
+                    return JobState.COMPLETE;
+                } else if (exitStatus == 271) {
+                    return JobState.CANCELED;
+                } else {
+                    return JobState.FAILED;
+                }
+            case ABORTED_BY_PBS_SERVER:
+                return JobState.FAILED;
+            default:
+                return JobState.UNKNOWN;
+        }
+    }
+
+    private int getExitStatus(String content) {
+        Pattern pattern = Pattern.compile(REGEX_EXIT_STATUS);
+        Matcher matcher = pattern.matcher(content);
+        if (matcher.find()) {
+            String group = matcher.group(EXIT_STATUS);
+            if (group != null && !group.trim().isEmpty()) {
+                return Integer.valueOf(group.trim());
+            }
+        }
+        return -1;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
new file mode 100644
index 0000000..9dd32c0
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/SLURMEmailParser.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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.monitor.email.parser;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.gfac.core.monitor.EmailParser;
+import org.apache.airavata.gfac.core.monitor.JobStatusResult;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class SLURMEmailParser implements EmailParser {
+
+    private static final Logger log = LoggerFactory.getLogger(SLURMEmailParser.class);
+
+    private static final String REGEX = "[A-Z]*\\s[a-zA-Z]*_[a-z]*=(?<" + JOBID + ">\\d*)[ ]*[a-zA-Z]*=(?<"+
+            JOBNAME + ">[a-zA-Z0-9-]*)[ ]*(?<" + STATUS + ">[]a-zA-Z]*),.*";
+
+    public static final String BEGAN = "Began";
+    public static final String ENDED = "Ended";
+    public static final String FAILED = "Failed";
+    private static final Pattern cancelledStatePattern = Pattern.compile("CANCELLED");
+    private static final Pattern pattern = Pattern.compile(REGEX);
+
+    @Override
+    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException{
+        JobStatusResult jobStatusResult = new JobStatusResult();
+        String subject = message.getSubject();
+        Matcher matcher = pattern.matcher(subject);
+        if (matcher.find()) {
+            jobStatusResult.setJobId(matcher.group(JOBID));
+            jobStatusResult.setJobName(matcher.group(JOBNAME));
+            jobStatusResult.setState(getJobState(matcher.group(STATUS), subject));
+            return jobStatusResult;
+        } else {
+            log.error("[EJM]: No matched found for subject -> " + subject);
+        }
+        return jobStatusResult;
+    }
+
+    private JobState getJobState(String state, String subject) {
+        switch (state.trim()) {
+            case BEGAN:
+                return JobState.ACTIVE;
+            case ENDED:
+                Matcher matcher = cancelledStatePattern.matcher(subject);
+                if (matcher.find()) {
+                   return JobState.CANCELED;
+                }
+                return JobState.COMPLETE;
+            case FAILED:
+                return JobState.FAILED;
+            default:
+                log.error("[EJM]: Job State " + state + " isn't handle by SLURM parser");
+                return JobState.UNKNOWN;
+
+        }
+    }
+
+}


[56/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/NOTICE b/modules/distribution/new-dist/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/new-dist/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/README b/modules/distribution/new-dist/src/main/resources/README
deleted file mode 100644
index c2223ff..0000000
--- a/modules/distribution/new-dist/src/main/resources/README
+++ /dev/null
@@ -1,145 +0,0 @@
-Apache Airavata Source - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration. Airavata bundles a server package 
-with an API, client software development Kits and a general purpose GUI XBaya as a application registration, workflow
-construction execution and monitoring. XBaya GUI also provides capabilities to access the workflow 
-produced data.  
-
-Contact
-========
-For additional information about Apache Airavata, please contact the user or dev mailing lists:
-http://airavata.apache.org/community/mailing-lists.html
-
-Description of Airavata Directory Structure
-==================================
-    - airavata-api
-      This directory contains Airavata API related data models, api methods, generated server skeletons, client stubs, server implementations and client samples. 
-
-    - modules
-      This contains the source code of all the airavata maven projects organized as libraries, services and distributions
-
-    - samples
-      This contains all the system wide samples provided in Airavata distribution. All the sample are having its README file
-      So users have to refer each readme file before running each sample.
-
-    - tools
-      This contains source code libraries that can enhance Airavata features.
-
-    - README
-      This document.
-    
-    - RELEASE_NOTES
-      The describe the key features and know issues with the current release. 
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-Airavata Source Distribution Directory Structure
-================================================
-
-    AIRAVATA_MASTER
-		├── airavata-api
-		├── modules
-		│   ├── airavata-client
-		│   ├── app-catalog
-		│   ├── commons
-		│   │   ├── gfac-schema
-		│   │   ├── utils
-		│   │   ├── workflow-execution-context
-		│   │   └── workflow-tracking
-		│   ├── credential-store-service
-		│   ├── distribution
-		│   │   ├── api-server
-		│   │   ├── client
-		│   │   ├── gfac-server
-		│   │   ├── orchestrator-server
-		│   │   ├── server
-		│   │   └── release
-		│   │   └── xbaya-gui
-		│   ├── gfac
-		│   │   ├── airavata-gfac-service
-		│   │   ├── gfac-bes
-		│   │   ├── gfac-core
-		│   │   ├── gfac-ec2
-		│   │   ├── gfac-gram
-		│   │   ├── gfac-gsissh
-		│   │   ├── gfac-hadoop
-		│   │   ├── gfac-local
-		│   │   ├── gfac-monitor
-		│   │   ├── gfac-ssh
-		│   │   ├── gfac-thrift-descriptions
-		│   ├── integration-tests
-		│   ├── messaging
-		│   ├── orchestrator
-		│   ├── registry
-		│   │   ├── airavata-jpa-registry
-		│   │   ├── registry-cpi
-		│   ├── security
-		│   ├── credential-store
-		│   ├── server
-		│   ├── test-suite
-		│   ├── workflow-model
-		│   │   ├── workflow-engine
-		│   │   ├── workflow-model-component-node
-		│   │   └── workflow-model-core
-		│   ├── ws-messenger
-		│   │   ├── commons
-		│   │   ├── distribution
-		│   │   ├── messagebox
-		│   │   ├── messagebroker
-		│   │   ├── message-monitor
-		│   │   └── samples
-		│   └── xbaya-gui
-		├── samples
-		├── tools
-		│   ├── gsissh
-		│   ├── gsissh-cli-tools
-		│   ├── phoebus-integration
-		│   └── registry-migrate
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		├── README
-		└── RELEASE_NOTES
-
-Available Binary Distributions
-==============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata API Server
-  This is the server that contains Airavata API Server.
-
-* Airavata Orchestrator Server
-  This is the stand-alone orchestrator server
-
-* Airavata GFac Server
-  This is the standalone GFac Server
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata Client
-  The Airavata Client distribution is a set of libraries and configurations files that allow a 3rd party application to programatically 
-  access Airavata functionality through Airavata API. 
-  
- How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial.
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/airavata-server.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/airavata-server.bat b/modules/distribution/new-dist/src/main/resources/bin/airavata-server.bat
deleted file mode 100644
index 09752c4..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/airavata-server.bat
+++ /dev/null
@@ -1,55 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-setlocal EnableDelayedExpansion
-
-call "%~dp0"setenv.bat
-
-:loop
-if ""%1""==""-xdebug"" goto xdebug
-if ""%1""==""-security"" goto security
-if ""%1""=="""" goto run
-goto help
-
-:xdebug
-set JAVA_OPTS= %JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000
-shift
-goto loop
-
-:security
-set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%AIRAVATA_HOME%\conf\axis2.policy -Daxis2.home=%AIRAVATA_HOME%
-shift
-goto loop
-
-:help
-echo  Usage: %0 [-options]
-echo.
-echo  where options include:
-echo   -xdebug    Start Airavata Server under JPDA debugger
-echo   -security  Enable Java 2 security
-echo   -h         Help
-goto end
-
-:run
-cd "%AIRAVATA_HOME%\bin"
-set LOGO_FILE="logo.txt"
-if exist "%LOGO_FILE%" type "%LOGO_FILE%"
-
-java %JAVA_OPTS% -classpath "%XBAYA_CLASSPATH%" -Djava.endorsed.dirs="%AIRAVATA_HOME%/lib/endorsed":"%JAVA_HOME%/jre/lib/endorsed":"%JAVA_HOME%/lib/endorsed" org.apache.airavata.server.ServerMain -repo "%AIRAVATA_HOME%"/repository/services -conf "%AIRAVATA_HOME%"/conf/axis2.xml %*
-
-:end

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/airavata-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/airavata-server.sh b/modules/distribution/new-dist/src/main/resources/bin/airavata-server.sh
deleted file mode 100755
index 885dcd4..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/airavata-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-#SERVERS="--servers=apiserver,orchestrator,gfac,credentialstore"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-        	AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-		AIRAVATA_COMMAND="$AIRAVATA_COMMAND"
-	    IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > airavata-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/derby.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/derby.sh b/modules/distribution/new-dist/src/main/resources/bin/derby.sh
deleted file mode 100644
index 134f7b9..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/derby.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/setenv.sh
-export DERBY_HOME=$AIRAVATA_HOME/standalone-server
-cd $AIRAVATA_HOME/bin
-./startNetworkServer $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/logo.txt b/modules/distribution/new-dist/src/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/setenv.bat b/modules/distribution/new-dist/src/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/setenv.sh b/modules/distribution/new-dist/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/bin/startNetworkServer
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/bin/startNetworkServer b/modules/distribution/new-dist/src/main/resources/bin/startNetworkServer
deleted file mode 100644
index 808566c..0000000
--- a/modules/distribution/new-dist/src/main/resources/bin/startNetworkServer
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-if [ -n "$derby_common_debug" ] ; then
-  set -x
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$DERBY_HOME" -o ! -d "$DERBY_HOME" ] ; then
-  ## resolve links - $0 may be a link to derby's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  DERBY_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  DERBY_HOME=`cd "$DERBY_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$DERBY_HOME" ] &&
-    DERBY_HOME=`cygpath --unix "$DERBY_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set DERBY_LIB location
-DERBY_LIB="${DERBY_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# set local classpath, don't overwrite the user's
-LOCALCLASSPATH=$DERBY_LIB/derby.jar:$DERBY_LIB/derbynet.jar:$DERBY_LIB/derbytools.jar:$DERBY_LIB/derbyclient.jar
-
-# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-# user CLASSPATH first and derby-found jars after.
-# In that case, the user CLASSPATH will override derby-found jars
-#
-# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-# with derby-found jars first and user CLASSPATH after
-if [ -n "$CLASSPATH" ] ; then
-  # merge local and specified classpath 
-  if [ -z "$LOCALCLASSPATH" ] ; then 
-    LOCALCLASSPATH="$CLASSPATH"
-  elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-    LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-  else
-    LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-  fi
-
-  # remove class path from launcher -cp option
-  CLASSPATH=""
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  DERBY_HOME=`cygpath --$format "$DERBY_HOME"`
-  DERBY_LIB=`cygpath --$format "$DERBY_LIB"`
-  if [ -n "$JAVA_HOME" ]; then
-    JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  fi
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$DERBY_HOME" in
-    *\\ )
-    DERBY_HOME="$DERBY_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-
-# Readjust classpath for MKS
-# expr match 
-if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; then
-  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g
-'`
-fi
-#!/bin/sh
-
-# 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.
-
-derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl start $@"
-eval $derby_exec_command

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/samples/registerSample.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/samples/registerSample.sh b/modules/distribution/new-dist/src/main/resources/samples/registerSample.sh
deleted file mode 100644
index 6450f6f..0000000
--- a/modules/distribution/new-dist/src/main/resources/samples/registerSample.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-. `dirname $0`/../bin/setenv.sh
-JAVA_OPTS=""
-
-java -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		     org.apache.airavata.client.samples.RegisterSampleData $*

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/samples/scripts/add.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/samples/scripts/add.sh b/modules/distribution/new-dist/src/main/resources/samples/scripts/add.sh
deleted file mode 100755
index daa140b..0000000
--- a/modules/distribution/new-dist/src/main/resources/samples/scripts/add.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# 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.
-
-# add two numbers
-sleep 10
-/bin/echo  "Result=`expr $1 + $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/samples/scripts/echo.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/samples/scripts/echo.sh b/modules/distribution/new-dist/src/main/resources/samples/scripts/echo.sh
deleted file mode 100755
index 9dbaab9..0000000
--- a/modules/distribution/new-dist/src/main/resources/samples/scripts/echo.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#echo wrapper
-sleep 10
-/bin/echo "Echoed_Output=$1"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/samples/scripts/multiply.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/samples/scripts/multiply.sh b/modules/distribution/new-dist/src/main/resources/samples/scripts/multiply.sh
deleted file mode 100755
index a5b5f7f..0000000
--- a/modules/distribution/new-dist/src/main/resources/samples/scripts/multiply.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# mutiply two numbers
-sleep 10
-/bin/echo "Result=`expr $1 \* $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/samples/scripts/subtract.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/samples/scripts/subtract.sh b/modules/distribution/new-dist/src/main/resources/samples/scripts/subtract.sh
deleted file mode 100755
index a21bec7..0000000
--- a/modules/distribution/new-dist/src/main/resources/samples/scripts/subtract.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# substract two numbers
-sleep 10
-/bin/echo "Result=`expr $1 - $2`"

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/pom.xml b/modules/distribution/orchestrator-server/pom.xml
deleted file mode 100644
index 4f39b5f..0000000
--- a/modules/distribution/orchestrator-server/pom.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<parent>
-		<groupId>org.apache.airavata</groupId>
-		<artifactId>distribution</artifactId>
-		<version>0.16-SNAPSHOT</version>
-		<relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>apache-orchestrator-server</artifactId>
-	<name>Orchestrator server distribution</name>
-	<packaging>pom</packaging>
-	<url>http://airavata.apache.org/</url>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.8</version>
-				<executions>
-					<execution>
-						<id>unpack</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>unpack</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>airavata-server-configuration</artifactId>
-									<version>${project.version}</version>
-									<type>jar</type>
-								</artifactItem>
-							</artifactItems>
-							<!--includes>**/*.war</includes -->
-							<outputDirectory>${project.build.directory}/conf</outputDirectory>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.gmaven</groupId>
-				<artifactId>gmaven-plugin</artifactId>
-				<version>1.4</version>
-				<executions>
-					<execution>
-						<id>generate-timestamp</id>
-						<phase>package</phase>
-						<goals>
-							<goal>execute</goal>
-						</goals>
-						<configuration>
-							<source>
-								import java.util.Date
-								import java.text.MessageFormat
-								project.properties['buildTimestamp'] =
-								MessageFormat.format("{0,date,dd-MM-yyyy}", new
-								Date())
-							</source>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>distribution-package</id>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-						<configuration>
-							<finalName>${archieve.name}-${project.version}</finalName>
-							<descriptors>
-								<descriptor>src/main/assembly/bin-assembly.xml</descriptor>
-								<!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> -->
-							</descriptors>
-							<attach>false</attach>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>1.7</version>
-				<executions>
-					<execution>
-						<id>attach-artifacts</id>
-						<phase>package</phase>
-						<goals>
-							<goal>attach-artifact</goal>
-						</goals>
-						<configuration>
-							<artifacts>
-								<artifact>
-									<file>${airavata.bin.zip}</file>
-									<type>zip</type>
-									<classifier>bin</classifier>
-								</artifact>
-								<artifact>
-									<file>${airavata.bin.tar.gz}</file>
-									<type>tar.gz</type>
-									<classifier>bin</classifier>
-								</artifact>
-							</artifacts>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-standalone-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>orchestrator-service</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	</dependencies>
-
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<archieve.name>apache-orchestrator-server</archieve.name>
-		<airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
-		<airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
-		<airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
-		<airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
-	</properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/assembly/bin-assembly.xml b/modules/distribution/orchestrator-server/src/main/assembly/bin-assembly.xml
deleted file mode 100644
index 219f412..0000000
--- a/modules/distribution/orchestrator-server/src/main/assembly/bin-assembly.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<!--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. -->
-
-<!DOCTYPE assembly [
-        <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
-        <!ELEMENT id (#PCDATA)>
-        <!ELEMENT includeBaseDirectory (#PCDATA)>
-        <!ELEMENT baseDirectory (#PCDATA)>
-        <!ELEMENT formats (format)*>
-        <!ELEMENT format (#PCDATA)>
-        <!ELEMENT fileSets (fileSet)*>
-        <!ELEMENT fileSet (directory|outputDirectory|includes)*>
-        <!ELEMENT directory (#PCDATA)>
-        <!ELEMENT outputDirectory (#PCDATA)>
-        <!ELEMENT includes (include)*>
-        <!ELEMENT include (#PCDATA)>
-        <!ELEMENT dependencySets (dependencySet)*>
-        <!ELEMENT dependencySet (outputDirectory|includes)*>
-        ]>
-<assembly>
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archieve.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<fileSets>
-
-		<!-- ********************** copy release notes files ********************** -->
-		<fileSet>
-			<directory>../../../</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>RELEASE_NOTES</include>
-			</includes>
-		</fileSet>
-		<!-- ********************** copy licenses, readme etc. ********************** -->
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory>.</outputDirectory>
-			<includes>
-				<include>LICENSE</include>
-				<include>NOTICE</include>
-				<include>README</include>
-				<include>INSTALL</include>
-			</includes>
-		</fileSet>
-
-		<!-- ********************** copy database scripts ********************** -->
-		<fileSet>
-			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../registry/airavata-jpa-registry/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>../../app-catalog/app-catalog-data/src/main/resources
-			</directory>
-			<outputDirectory>bin/database_scripts
-			</outputDirectory>
-			<includes>
-				<include>*sql*</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>777</fileMode>
-			<includes>
-				<include>*.sh</include>
-				<include>*.bat</include>
-				<include>logo.txt</include>
-				<include>startNetworkServer</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>${project.build.directory}/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>airavata-server.properties</include>
-				<include>log4j.properties</include>
-			</includes>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/resources/conf</directory>
-			<outputDirectory>bin</outputDirectory>
-			<includes>
-				<include>**/*</include>
-			</includes>
-		</fileSet>
-
-	</fileSets>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
-			</outputFileNameMapping>
-			<includes>
-				<include>org.apache.derby:derby:jar</include>
-				<include>org.apache.derby:derbytools:jar</include>
-				<include>org.apache.derby:derbynet:jar</include>
-				<include>org.apache.derby:derbyclient:jar</include>
-			</includes>
-		</dependencySet>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-		 	<includes>
-				<include>*:*:jar</include>
-            </includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/assembly/src-assembly.xml b/modules/distribution/orchestrator-server/src/main/assembly/src-assembly.xml
deleted file mode 100644
index 6a093ed..0000000
--- a/modules/distribution/orchestrator-server/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/orchestrator-server/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/orchestrator-server/src/main/resources/INSTALL b/modules/distribution/orchestrator-server/src/main/resources/INSTALL
deleted file mode 100644
index 0324e61..0000000
--- a/modules/distribution/orchestrator-server/src/main/resources/INSTALL
+++ /dev/null
@@ -1,55 +0,0 @@
-Installing  Apache Airavata 0.11
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or check out from svn.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* The compressed binary distribution is created at <PROJECT DIR>/modules/distribution/airavata-server/target/apache-airavata-server-<airavata-version>-bin.zip
-
-Installing the Airavata Server
-------------------------------
-No installation is necessary. Just extract the compressed distribution.
-Note: For customizing the default configurations of the Airavata Server please 
-      refer to Airavata web-site (http://airavata.apache.org/) and/or Airavata 
-      mailing lists (http://airavata.apache.org/community/mailing-lists.html)
-
-Starting Apache Airavata Server
--------------------------------
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh airavata-server.sh
-	Windows
-		> airavata-server.bat
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Starting Apache Derby Server
--------------------------------
-Users have the option to star the derby server separately
-* Navigate to <AIRAVATA_HOME>/bin
-* type for following command to start the Airavata Server
-	MAC/Unix systems
-		$ sh derby.sh
-	Windows
-		<Not supported in this version>
-	Note: Pass "-h" as parameters to see more options when starting the server
-
-Running Tests
--------------
-Once the binary is unzipped, instructions to run the tests should be followed from README
-
-Tutorials 
-----------
-The airavata website has instructions for basic tutorials:
-* For basic understanding of how Airavata works - http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* Describing and executing applications using Airavata - http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html
-* Advanced tutorial to provide understanding of how to run sample workflows distributed with Airavata - http://airavata.apache.org/documentation/tutorials/advanced-workflow-samples.html


[36/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
deleted file mode 100644
index eb8ddf7..0000000
--- a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ /dev/null
@@ -1,2867 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class GfacService {
-
-  public interface Iface {
-
-    /**
-     * Query gfac server to fetch the CPI version
-     */
-    public String getGFACServiceVersion() throws org.apache.thrift.TException;
-
-    /**
-     *  * After creating the experiment Data and Task Data in the orchestrator
-     *  * Orchestrator has to invoke this operation for each Task per experiment to run
-     *  * the actual Job related actions.
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @param gatewayId:
-     *  *  The GatewayId is inferred from security context and passed onto gfac.
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     */
-    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException;
-
-    /**
-     *  *
-     *  * Terminate the running job.At this point user
-     *  * does not have to know the job ID so in the argument
-     *  * we do not make it to required jobID to provide.
-     *  *
-     *  *
-     *  * @param experimentID
-     *  * @param taskID
-     *  * @return sucess/failure
-     *  *
-     * *
-     * 
-     * @param experimentId
-     * @param taskId
-     */
-    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException;
-
-  }
-
-  public interface AsyncIface {
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-  }
-
-  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
-    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
-      public Factory() {}
-      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
-        return new Client(prot);
-      }
-      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-        return new Client(iprot, oprot);
-      }
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol prot)
-    {
-      super(prot, prot);
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-      super(iprot, oprot);
-    }
-
-    public String getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      send_getGFACServiceVersion();
-      return recv_getGFACServiceVersion();
-    }
-
-    public void send_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-      sendBase("getGFACServiceVersion", args);
-    }
-
-    public String recv_getGFACServiceVersion() throws org.apache.thrift.TException
-    {
-      getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-      receiveBase(result, "getGFACServiceVersion");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result");
-    }
-
-    public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
-    {
-      send_submitJob(experimentId, taskId, gatewayId);
-      return recv_submitJob();
-    }
-
-    public void send_submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
-    {
-      submitJob_args args = new submitJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      args.setGatewayId(gatewayId);
-      sendBase("submitJob", args);
-    }
-
-    public boolean recv_submitJob() throws org.apache.thrift.TException
-    {
-      submitJob_result result = new submitJob_result();
-      receiveBase(result, "submitJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result");
-    }
-
-    public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
-    {
-      send_cancelJob(experimentId, taskId);
-      return recv_cancelJob();
-    }
-
-    public void send_cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
-    {
-      cancelJob_args args = new cancelJob_args();
-      args.setExperimentId(experimentId);
-      args.setTaskId(taskId);
-      sendBase("cancelJob", args);
-    }
-
-    public boolean recv_cancelJob() throws org.apache.thrift.TException
-    {
-      cancelJob_result result = new cancelJob_result();
-      receiveBase(result, "cancelJob");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result");
-    }
-
-  }
-  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
-    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
-      private org.apache.thrift.async.TAsyncClientManager clientManager;
-      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
-      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
-        this.clientManager = clientManager;
-        this.protocolFactory = protocolFactory;
-      }
-      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
-        return new AsyncClient(protocolFactory, clientManager, transport);
-      }
-    }
-
-    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
-      super(protocolFactory, clientManager, transport);
-    }
-
-    public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getGFACServiceVersion_args args = new getGFACServiceVersion_args();
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public String getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getGFACServiceVersion();
-      }
-    }
-
-    public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      private String gatewayId;
-      public submitJob_call(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        submitJob_args args = new submitJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.setGatewayId(gatewayId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_submitJob();
-      }
-    }
-
-    public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      cancelJob_call method_call = new cancelJob_call(experimentId, taskId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String experimentId;
-      private String taskId;
-      public cancelJob_call(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        cancelJob_args args = new cancelJob_args();
-        args.setExperimentId(experimentId);
-        args.setTaskId(taskId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_cancelJob();
-      }
-    }
-
-  }
-
-  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
-    }
-
-    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException {
-        getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-        result.success = iface.getGFACServiceVersion();
-        return result;
-      }
-    }
-
-    public static class submitJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException {
-        submitJob_result result = new submitJob_result();
-        result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-    public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException {
-        cancelJob_result result = new cancelJob_result();
-        result.success = iface.cancelJob(args.experimentId, args.taskId);
-        result.setSuccessIsSet(true);
-        return result;
-      }
-    }
-
-  }
-
-  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
-    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
-    public AsyncProcessor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
-    }
-
-    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
-      processMap.put("submitJob", new submitJob());
-      processMap.put("cancelJob", new cancelJob());
-      return processMap;
-    }
-
-    public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
-      public getGFACServiceVersion() {
-        super("getGFACServiceVersion");
-      }
-
-      public getGFACServiceVersion_args getEmptyArgsInstance() {
-        return new getGFACServiceVersion_args();
-      }
-
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            getGFACServiceVersion_result result = new getGFACServiceVersion_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.getGFACServiceVersion(resultHandler);
-      }
-    }
-
-    public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
-      public submitJob() {
-        super("submitJob");
-      }
-
-      public submitJob_args getEmptyArgsInstance() {
-        return new submitJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            submitJob_result result = new submitJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            submitJob_result result = new submitJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.submitJob(args.experimentId, args.taskId, args.gatewayId,resultHandler);
-      }
-    }
-
-    public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
-      public cancelJob() {
-        super("cancelJob");
-      }
-
-      public cancelJob_args getEmptyArgsInstance() {
-        return new cancelJob_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            cancelJob_result result = new cancelJob_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            cancelJob_result result = new cancelJob_result();
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.cancelJob(args.experimentId, args.taskId,resultHandler);
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
-
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory());
-    }
-
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_args() {
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_args(getGFACServiceVersion_args other) {
-    }
-
-    public getGFACServiceVersion_args deepCopy() {
-      return new getGFACServiceVersion_args(this);
-    }
-
-    @Override
-    public void clear() {
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_args)
-        return this.equals((getGFACServiceVersion_args)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_args that) {
-      if (that == null)
-        return false;
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_args(");
-      boolean first = true;
-
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsStandardScheme getScheme() {
-        return new getGFACServiceVersion_argsStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_argsTupleScheme getScheme() {
-        return new getGFACServiceVersion_argsTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-      }
-    }
-
-  }
-
-  public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory());
-    }
-
-    public String success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
-    }
-
-    public getGFACServiceVersion_result() {
-    }
-
-    public getGFACServiceVersion_result(
-      String success)
-    {
-      this();
-      this.success = success;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public getGFACServiceVersion_result(getGFACServiceVersion_result other) {
-      if (other.isSetSuccess()) {
-        this.success = other.success;
-      }
-    }
-
-    public getGFACServiceVersion_result deepCopy() {
-      return new getGFACServiceVersion_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.success = null;
-    }
-
-    public String getSuccess() {
-      return this.success;
-    }
-
-    public getGFACServiceVersion_result setSuccess(String success) {
-      this.success = success;
-      return this;
-    }
-
-    public void unsetSuccess() {
-      this.success = null;
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return this.success != null;
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      if (!value) {
-        this.success = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return getSuccess();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof getGFACServiceVersion_result)
-        return this.equals((getGFACServiceVersion_result)that);
-      return false;
-    }
-
-    public boolean equals(getGFACServiceVersion_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true && this.isSetSuccess();
-      boolean that_present_success = true && that.isSetSuccess();
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (!this.success.equals(that.success))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(getGFACServiceVersion_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("getGFACServiceVersion_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      if (this.success == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.success);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultStandardScheme getScheme() {
-        return new getGFACServiceVersion_resultStandardScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.success = iprot.readString();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.success != null) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeString(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
-      public getGFACServiceVersion_resultTupleScheme getScheme() {
-        return new getGFACServiceVersion_resultTupleScheme();
-      }
-    }
-
-    private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeString(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readString();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class submitJob_args implements org.apache.thrift.TBase<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-    public String gatewayId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId"),
-      GATEWAY_ID((short)3, "gatewayId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          case 3: // GATEWAY_ID
-            return GATEWAY_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap);
-    }
-
-    public submitJob_args() {
-    }
-
-    public submitJob_args(
-      String experimentId,
-      String taskId,
-      String gatewayId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-      this.gatewayId = gatewayId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_args(submitJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-      if (other.isSetGatewayId()) {
-        this.gatewayId = other.gatewayId;
-      }
-    }
-
-    public submitJob_args deepCopy() {
-      return new submitJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-      this.gatewayId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public submitJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public submitJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public String getGatewayId() {
-      return this.gatewayId;
-    }
-
-    public submitJob_args setGatewayId(String gatewayId) {
-      this.gatewayId = gatewayId;
-      return this;
-    }
-
-    public void unsetGatewayId() {
-      this.gatewayId = null;
-    }
-
-    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
-    public boolean isSetGatewayId() {
-      return this.gatewayId != null;
-    }
-
-    public void setGatewayIdIsSet(boolean value) {
-      if (!value) {
-        this.gatewayId = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        if (value == null) {
-          unsetExperimentId();
-        } else {
-          setExperimentId((String)value);
-        }
-        break;
-
-      case TASK_ID:
-        if (value == null) {
-          unsetTaskId();
-        } else {
-          setTaskId((String)value);
-        }
-        break;
-
-      case GATEWAY_ID:
-        if (value == null) {
-          unsetGatewayId();
-        } else {
-          setGatewayId((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        return getExperimentId();
-
-      case TASK_ID:
-        return getTaskId();
-
-      case GATEWAY_ID:
-        return getGatewayId();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EXPERIMENT_ID:
-        return isSetExperimentId();
-      case TASK_ID:
-        return isSetTaskId();
-      case GATEWAY_ID:
-        return isSetGatewayId();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_args)
-        return this.equals((submitJob_args)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
-      if (this_present_experimentId || that_present_experimentId) {
-        if (!(this_present_experimentId && that_present_experimentId))
-          return false;
-        if (!this.experimentId.equals(that.experimentId))
-          return false;
-      }
-
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
-      if (this_present_taskId || that_present_taskId) {
-        if (!(this_present_taskId && that_present_taskId))
-          return false;
-        if (!this.taskId.equals(that.taskId))
-          return false;
-      }
-
-      boolean this_present_gatewayId = true && this.isSetGatewayId();
-      boolean that_present_gatewayId = true && that.isSetGatewayId();
-      if (this_present_gatewayId || that_present_gatewayId) {
-        if (!(this_present_gatewayId && that_present_gatewayId))
-          return false;
-        if (!this.gatewayId.equals(that.gatewayId))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetExperimentId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTaskId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetGatewayId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_args(");
-      boolean first = true;
-
-      sb.append("experimentId:");
-      if (this.experimentId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.experimentId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("taskId:");
-      if (this.taskId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.taskId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("gatewayId:");
-      if (this.gatewayId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.gatewayId);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      if (experimentId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
-      }
-      if (taskId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
-      }
-      if (gatewayId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
-      }
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_argsStandardSchemeFactory implements SchemeFactory {
-      public submitJob_argsStandardScheme getScheme() {
-        return new submitJob_argsStandardScheme();
-      }
-    }
-
-    private static class submitJob_argsStandardScheme extends StandardScheme<submitJob_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EXPERIMENT_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.experimentId = iprot.readString();
-                struct.setExperimentIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // TASK_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.taskId = iprot.readString();
-                struct.setTaskIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // GATEWAY_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.gatewayId = iprot.readString();
-                struct.setGatewayIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.experimentId != null) {
-          oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
-          oprot.writeString(struct.experimentId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.taskId != null) {
-          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
-          oprot.writeString(struct.taskId);
-          oprot.writeFieldEnd();
-        }
-        if (struct.gatewayId != null) {
-          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
-          oprot.writeString(struct.gatewayId);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_argsTupleSchemeFactory implements SchemeFactory {
-      public submitJob_argsTupleScheme getScheme() {
-        return new submitJob_argsTupleScheme();
-      }
-    }
-
-    private static class submitJob_argsTupleScheme extends TupleScheme<submitJob_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.experimentId);
-        oprot.writeString(struct.taskId);
-        oprot.writeString(struct.gatewayId);
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.experimentId = iprot.readString();
-        struct.setExperimentIdIsSet(true);
-        struct.taskId = iprot.readString();
-        struct.setTaskIdIsSet(true);
-        struct.gatewayId = iprot.readString();
-        struct.setGatewayIdIsSet(true);
-      }
-    }
-
-  }
-
-  public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory());
-    }
-
-    public boolean success; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap);
-    }
-
-    public submitJob_result() {
-    }
-
-    public submitJob_result(
-      boolean success)
-    {
-      this();
-      this.success = success;
-      setSuccessIsSet(true);
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public submitJob_result(submitJob_result other) {
-      __isset_bitfield = other.__isset_bitfield;
-      this.success = other.success;
-    }
-
-    public submitJob_result deepCopy() {
-      return new submitJob_result(this);
-    }
-
-    @Override
-    public void clear() {
-      setSuccessIsSet(false);
-      this.success = false;
-    }
-
-    public boolean isSuccess() {
-      return this.success;
-    }
-
-    public submitJob_result setSuccess(boolean success) {
-      this.success = success;
-      setSuccessIsSet(true);
-      return this;
-    }
-
-    public void unsetSuccess() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((Boolean)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return Boolean.valueOf(isSuccess());
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof submitJob_result)
-        return this.equals((submitJob_result)that);
-      return false;
-    }
-
-    public boolean equals(submitJob_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true;
-      boolean that_present_success = true;
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (this.success != that.success)
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(submitJob_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("submitJob_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      sb.append(this.success);
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-        __isset_bitfield = 0;
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class submitJob_resultStandardSchemeFactory implements SchemeFactory {
-      public submitJob_resultStandardScheme getScheme() {
-        return new submitJob_resultStandardScheme();
-      }
-    }
-
-    private static class submitJob_resultStandardScheme extends StandardScheme<submitJob_result> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-                struct.success = iprot.readBool();
-                struct.setSuccessIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.isSetSuccess()) {
-          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeBool(struct.success);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class submitJob_resultTupleSchemeFactory implements SchemeFactory {
-      public submitJob_resultTupleScheme getScheme() {
-        return new submitJob_resultTupleScheme();
-      }
-    }
-
-    private static class submitJob_resultTupleScheme extends TupleScheme<submitJob_result> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetSuccess()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetSuccess()) {
-          oprot.writeBool(struct.success);
-        }
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.success = iprot.readBool();
-          struct.setSuccessIsSet(true);
-        }
-      }
-    }
-
-  }
-
-  public static class cancelJob_args implements org.apache.thrift.TBase<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_args");
-
-    private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
-    }
-
-    public String experimentId; // required
-    public String taskId; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      EXPERIMENT_ID((short)1, "experimentId"),
-      TASK_ID((short)2, "taskId");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EXPERIMENT_ID
-            return EXPERIMENT_ID;
-          case 2: // TASK_ID
-            return TASK_ID;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap);
-    }
-
-    public cancelJob_args() {
-    }
-
-    public cancelJob_args(
-      String experimentId,
-      String taskId)
-    {
-      this();
-      this.experimentId = experimentId;
-      this.taskId = taskId;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public cancelJob_args(cancelJob_args other) {
-      if (other.isSetExperimentId()) {
-        this.experimentId = other.experimentId;
-      }
-      if (other.isSetTaskId()) {
-        this.taskId = other.taskId;
-      }
-    }
-
-    public cancelJob_args deepCopy() {
-      return new cancelJob_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.experimentId = null;
-      this.taskId = null;
-    }
-
-    public String getExperimentId() {
-      return this.experimentId;
-    }
-
-    public cancelJob_args setExperimentId(String experimentId) {
-      this.experimentId = experimentId;
-      return this;
-    }
-
-    public void unsetExperimentId() {
-      this.experimentId = null;
-    }
-
-    /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
-      return this.experimentId != null;
-    }
-
-    public void setExperimentIdIsSet(boolean value) {
-      if (!value) {
-        this.experimentId = null;
-      }
-    }
-
-    public String getTaskId() {
-      return this.taskId;
-    }
-
-    public cancelJob_args setTaskId(String taskId) {
-      this.taskId = taskId;
-      return this;
-    }
-
-    public void unsetTaskId() {
-      this.taskId = null;
-    }
-
-    /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
-      return this.taskId != null;
-    }
-
-    public void setTaskIdIsSet(boolean value) {
-      if (!value) {
-        this.taskId = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        if (value == null) {
-          unsetExperimentId();
-        } else {
-          setExperimentId((String)value);
-        }
-        break;
-
-      case TASK_ID:
-        if (value == null) {
-          unsetTaskId();
-        } else {
-          setTaskId((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EXPERIMENT_ID:
-        return getExperimentId();
-
-      case TASK_ID:
-        return getTaskId();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EXPERIMENT_ID:
-        return isSetExperimentId();
-      case TASK_ID:
-        return isSetTaskId();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof cancelJob_args)
-        return this.equals((cancelJob_args)that);
-      return false;
-    }
-
-    public boolean equals(cancelJob_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
-      if (this_present_experimentId || that_present_experimentId) {
-        if (!(this_present_experimentId && that_present_experimentId))
-          return false;
-        if (!this.experimentId.equals(that.experimentId))
-          return false;
-      }
-
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
-      if (this_present_taskId || that_present_taskId) {
-        if (!(this_present_taskId && that_present_taskId))
-          return false;
-        if (!this.taskId.equals(that.taskId))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public int compareTo(cancelJob_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetExperimentId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTaskId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("cancelJob_args(");
-      boolean first = true;
-
-      sb.append("experimentId:");
-      if (this.experimentId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.experimentId);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("taskId:");
-      if (this.taskId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.taskId);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      if (experimentId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
-      }
-      if (taskId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
-      }
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class cancelJob_argsStandardSchemeFactory implements SchemeFactory {
-      public cancelJob_argsStandardScheme getScheme() {
-        return new cancelJob_argsStandardScheme();
-      }
-    }
-
-    private static class cancelJob_argsStandardScheme extends StandardScheme<cancelJob_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelJob_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EXPERIMENT_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.experimentId = iprot.readString();
-                struct.setExperimentIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // TASK_ID
-              if (schemeField.type == 

<TRUNCATED>

[59/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/LICENSE b/modules/distribution/gfac-server/src/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/modules/distribution/gfac-server/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and 

<TRUNCATED>

[21/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
new file mode 100644
index 0000000..0710d9e
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/parser/UGEEmailParser.java
@@ -0,0 +1,103 @@
+/*
+ *
+ * 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.monitor.email.parser;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.gfac.core.monitor.EmailParser;
+import org.apache.airavata.gfac.core.monitor.JobStatusResult;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class UGEEmailParser implements EmailParser {
+
+    private static final Logger log = LoggerFactory.getLogger(UGEEmailParser.class);
+    private static final String REGEX = "[\\w]*[ ]*(?<"+ JOBID + ">[\\d]*)[ ]*\\((?<" + JOBNAME
+            + ">[a-zA-Z0-9]*)\\)[ ]*(?<" + STATUS + ">[a-zA-Z]*)";
+    public static final String STARTED = "Started";
+    public static final String COMPLETE = "Complete";
+    public static final String FAILED = "Failed";
+    private static final String REGEX_EXIT_STATUS = "Exit Status[ ]*=[ ]*(?<" + EXIT_STATUS + ">[\\d]+)";
+    public static final String ABORTED = "Aborted";
+
+
+    @Override
+    public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
+        JobStatusResult jobStatusResult = new JobStatusResult();
+
+        String subject = message.getSubject();
+        Pattern pattern = Pattern.compile(REGEX);
+        Matcher matcher = pattern.matcher(subject);
+        try {
+            if (matcher.find()) {
+                jobStatusResult.setJobId(matcher.group(JOBID));
+                jobStatusResult.setJobName(matcher.group(JOBNAME));
+                String content = (String) message.getContent();
+                jobStatusResult.setState(getJobState(matcher.group(STATUS), content));
+            } else {
+                log.error("[EJM]: No matched found for subject => \n" + subject);
+            }
+        } catch (IOException e) {
+            throw new AiravataException("[EJM]: Error while reading content of the email message");
+        }
+        return jobStatusResult;
+    }
+
+    private JobState getJobState(String status, String content) {
+        switch (status) {
+            case STARTED:
+                return JobState.ACTIVE;
+            case COMPLETE:
+                int exitStatus = getExitStatus(content);
+                if (exitStatus == 0) {
+                    return JobState.COMPLETE;
+                } else {
+                    log.info("[EJM]: Job returns with Exit Status = " + exitStatus + "  , Marked as Failed");
+                    return JobState.FAILED;
+                }
+            case FAILED:
+                return JobState.FAILED;
+            case ABORTED:
+                return JobState.FAILED;
+            default:
+                return JobState.UNKNOWN;
+
+        }
+    }
+
+    private int getExitStatus(String content) {
+        Pattern statusPattern = Pattern.compile(REGEX_EXIT_STATUS);
+        Matcher statusMatcher = statusPattern.matcher(content);
+        if (statusMatcher.find()) {
+            String group = statusMatcher.group(EXIT_STATUS);
+            if (group != null && !group.trim().isEmpty()) {
+                return Integer.valueOf(group.trim());
+            }
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
new file mode 100644
index 0000000..3acef66
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/exception/AiravataMonitorException.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.monitor.exception;
+
+public class AiravataMonitorException extends Exception {
+    private static final long serialVersionUID = -2849422320139467602L;
+
+    public AiravataMonitorException(Throwable e) {
+        super(e);
+    }
+
+    public AiravataMonitorException(String message) {
+        super(message, null);
+    }
+
+    public AiravataMonitorException(String message, Throwable e) {
+        super(message, e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
new file mode 100644
index 0000000..e31458d
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -0,0 +1,139 @@
+/*
+ *
+ * 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.monitor.handlers;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.HPCMonitorID;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.gfac.monitor.impl.pull.qstat.HPCPullMonitor;
+import org.apache.airavata.gfac.monitor.util.CommonUtils;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+
+import java.util.Properties;
+
+/**
+ * this handler is responsible for monitoring jobs in a pull mode
+ * and currently this support multiple pull monitoring in grid resource and uses
+ * commands like qstat,squeue and this supports sun grid enging monitoring too
+ * which is a slight variation of qstat monitoring.
+ */
+public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GridPullMonitorHandler.class);
+
+    private HPCPullMonitor hpcPullMonitor;
+
+    private AuthenticationInfo authenticationInfo;
+
+    public void initProperties(Properties properties) throws GFacHandlerException {
+        String myProxyUser = null;
+        try {
+            myProxyUser = ServerSettings.getSetting("myproxy.username");
+            String myProxyPass = ServerSettings.getSetting("myproxy.password");
+            String certPath = ServerSettings.getSetting("trusted.cert.location");
+            String myProxyServer = ServerSettings.getSetting("myproxy.server");
+            setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
+                    7512, 17280000, certPath));
+            hpcPullMonitor = new HPCPullMonitor(null,getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
+        } catch (ApplicationSettingsException e) {
+            logger.error("Error while  reading server properties", e);
+            throw new GFacHandlerException("Error while  reading server properties", e);
+        }
+    }
+
+    public void run() {
+        hpcPullMonitor.run();
+    }
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        super.invoke(jobExecutionContext);
+        hpcPullMonitor.setGfac(jobExecutionContext.getGfac());
+        hpcPullMonitor.setPublisher(jobExecutionContext.getMonitorPublisher());
+        MonitorID monitorID = new HPCMonitorID(getAuthenticationInfo(), jobExecutionContext);
+        try {
+           /* ZooKeeper zk = jobExecutionContext.getZk();
+            try {
+                String experimentEntry = GFacUtils.findExperimentEntry(jobExecutionContext.getExperimentID(), zk);
+                String path = experimentEntry + File.separator + "operation";
+                Stat exists = zk.exists(path, this);
+                if (exists != null) {
+                    zk.getData(path, this, exists); // watching the operations node
+                }
+            } catch (KeeperException e) {
+                logger.error(e.getMessage(), e);
+            } catch (InterruptedException e) {
+                logger.error(e.getMessage(), e);
+            }*/
+            CommonUtils.addMonitortoQueue(hpcPullMonitor.getQueue(), monitorID, jobExecutionContext);
+            CommonUtils.increaseZkJobCount(monitorID); // update change job count to zookeeper
+        } catch (AiravataMonitorException e) {
+            logger.errorId(monitorID.getJobID(), "Error adding job {} monitorID object to the queue with experiment {}",
+                    monitorID.getJobID(),  monitorID.getExperimentID());
+        }
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public HPCPullMonitor getHpcPullMonitor() {
+        return hpcPullMonitor;
+    }
+
+    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+
+    public void setHpcPullMonitor(HPCPullMonitor hpcPullMonitor) {
+        this.hpcPullMonitor = hpcPullMonitor;
+    }
+
+
+    public void process(WatchedEvent watchedEvent) {
+        logger.info(watchedEvent.getPath());
+        if(Event.EventType.NodeDataChanged.equals(watchedEvent.getType())){
+            // node data is changed, this means node is cancelled.
+            logger.info("Experiment is cancelled with this path:"+watchedEvent.getPath());
+
+            String[] split = watchedEvent.getPath().split("/");
+            for(String element:split) {
+                if (element.contains("+")) {
+                    logger.info("Adding experimentID+TaskID to be removed from monitoring:"+element);
+                    hpcPullMonitor.getCancelJobList().add(element);
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
new file mode 100644
index 0000000..6db7da5
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
@@ -0,0 +1,107 @@
+/*
+ *
+ * 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.monitor.handlers;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.HPCMonitorID;
+import org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *   this handler is responsible monitoring jobs in push mode
+ *   and currently this support multiple push monitoring in grid resource
+ */
+public class GridPushMonitorHandler extends ThreadedHandler {
+    private final static Logger logger= LoggerFactory.getLogger(GridPushMonitorHandler.class);
+
+    private AMQPMonitor amqpMonitor;
+
+    private AuthenticationInfo authenticationInfo;
+
+    @Override
+    public void initProperties(Properties properties) throws GFacHandlerException {
+        String myProxyUser=null;
+        try{
+            myProxyUser = ServerSettings.getSetting("myproxy.username");
+            String myProxyPass = ServerSettings.getSetting("myproxy.password");
+            String certPath = ServerSettings.getSetting("trusted.cert.location");
+            String myProxyServer = ServerSettings.getSetting("myproxy.server");
+            setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
+                    7512, 17280000, certPath));
+
+            String hostList=(String)properties.get("hosts");
+            String proxyFilePath = ServerSettings.getSetting("proxy.file.path");
+            String connectionName=ServerSettings.getSetting("connection.name");
+            LinkedBlockingQueue<MonitorID> pushQueue = new LinkedBlockingQueue<MonitorID>();
+            LinkedBlockingQueue<MonitorID> finishQueue = new LinkedBlockingQueue<MonitorID>();
+            List<String> hosts= Arrays.asList(hostList.split(","));
+            amqpMonitor=new AMQPMonitor(null,pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
+        }catch (ApplicationSettingsException e){
+            logger.error(e.getMessage(), e);
+            throw new GFacHandlerException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void run() {
+        amqpMonitor.run();
+    }
+
+    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException{
+        super.invoke(jobExecutionContext);
+        MonitorID monitorID=new HPCMonitorID(getAuthenticationInfo(),jobExecutionContext);
+        amqpMonitor.getRunningQueue().add(monitorID);
+    }
+
+    @Override
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
+        // TODO: Auto generated method body.
+    }
+
+    public AMQPMonitor getAmqpMonitor() {
+        return amqpMonitor;
+    }
+
+    public void setAmqpMonitor(AMQPMonitor amqpMonitor) {
+        this.amqpMonitor = amqpMonitor;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
new file mode 100644
index 0000000..553ded9
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -0,0 +1,471 @@
+/*
+ *
+ * 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.monitor.impl.pull.qstat;
+
+import com.google.common.eventbus.EventBus;
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.monitor.util.CommonUtils;
+import org.apache.airavata.gfac.core.GFac;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
+import org.apache.airavata.gfac.core.utils.OutHandlerWorker;
+import org.apache.airavata.gfac.monitor.HostMonitorData;
+import org.apache.airavata.gfac.monitor.UserMonitorData;
+import org.apache.airavata.gfac.monitor.core.PullMonitor;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.JobState;
+
+import java.sql.Timestamp;
+import java.util.*;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/**
+ * This monitor is based on qstat command which can be run
+ * in grid resources and retrieve the job status.
+ */
+public class HPCPullMonitor extends PullMonitor {
+
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(HPCPullMonitor.class);
+    public static final int FAILED_COUNT = 5;
+
+    // I think this should use DelayedBlocking Queue to do the monitoring*/
+    private BlockingQueue<UserMonitorData> queue;
+
+    private boolean startPulling = false;
+
+    private Map<String, ResourceConnection> connections;
+
+    private MonitorPublisher publisher;
+
+    private LinkedBlockingQueue<String> cancelJobList;
+
+    private List<String> completedJobsFromPush;
+
+    private GFac gfac;
+
+    private AuthenticationInfo authenticationInfo;
+
+    private ArrayList<MonitorID> removeList;
+
+    public HPCPullMonitor() {
+        connections = new HashMap<String, ResourceConnection>();
+        queue = new LinkedBlockingDeque<UserMonitorData>();
+        publisher = new MonitorPublisher(new EventBus());
+        cancelJobList = new LinkedBlockingQueue<String>();
+        completedJobsFromPush = new ArrayList<String>();
+        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+        removeList = new ArrayList<MonitorID>();
+    }
+
+    public HPCPullMonitor(MonitorPublisher monitorPublisher, AuthenticationInfo authInfo) {
+        connections = new HashMap<String, ResourceConnection>();
+        queue = new LinkedBlockingDeque<UserMonitorData>();
+        publisher = monitorPublisher;
+        authenticationInfo = authInfo;
+        cancelJobList = new LinkedBlockingQueue<String>();
+        this.completedJobsFromPush = new ArrayList<String>();
+        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+        removeList = new ArrayList<MonitorID>();
+    }
+
+    public HPCPullMonitor(BlockingQueue<UserMonitorData> queue, MonitorPublisher publisher) {
+        this.queue = queue;
+        this.publisher = publisher;
+        connections = new HashMap<String, ResourceConnection>();
+        cancelJobList = new LinkedBlockingQueue<String>();
+        this.completedJobsFromPush = new ArrayList<String>();
+        (new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+        removeList = new ArrayList<MonitorID>();
+    }
+
+
+    public void run() {
+        /* implement a logic to pick each monitorID object from the queue and do the
+        monitoring
+         */
+        this.startPulling = true;
+        while (this.startPulling && !ServerSettings.isStopAllThreads()) {
+            try {
+                // After finishing one iteration of the full queue this thread sleeps 1 second
+                synchronized (this.queue) {
+                    if (this.queue.size() > 0) {
+                        startPulling();
+                }
+            }
+                Thread.sleep(10000);
+            } catch (Exception e) {
+                // we catch all the exceptions here because no matter what happens we do not stop running this
+                // thread, but ideally we should report proper error messages, but this is handled in startPulling
+                // method, incase something happen in Thread.sleep we handle it with this catch block.
+                logger.error(e.getMessage(),e);
+            }
+        }
+        // thread is going to return so we close all the connections
+        Iterator<String> iterator = connections.keySet().iterator();
+        while (iterator.hasNext()) {
+            String next = iterator.next();
+            ResourceConnection resourceConnection = connections.get(next);
+            try {
+                resourceConnection.getCluster().disconnect();
+            } catch (SSHApiException e) {
+                logger.error("Erro while connecting to the cluster", e);
+            }
+        }
+    }
+
+    /**
+     * This method will can invoke when PullMonitor needs to start
+     * and it has to invoke in the frequency specified below,
+     *
+     * @return if the start process is successful return true else false
+     */
+     public boolean startPulling() throws AiravataMonitorException {
+        // take the top element in the queue and pull the data and put that element
+        // at the tail of the queue
+        //todo this polling will not work with multiple usernames but with single user
+        // and multiple hosts, currently monitoring will work
+        UserMonitorData take = null;
+        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
+        MonitorID currentMonitorID = null;
+        try {
+            take = this.queue.take();
+            List<HostMonitorData> hostMonitorData = take.getHostMonitorData();
+            for (ListIterator<HostMonitorData> hostIterator = hostMonitorData.listIterator(); hostIterator.hasNext();) {
+                HostMonitorData iHostMonitorData = hostIterator.next();
+                if (iHostMonitorData.getJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+                    String hostName = iHostMonitorData.getComputeResourceDescription().getHostName();
+                    ResourceConnection connection = null;
+                    if (connections.containsKey(hostName)) {
+                        if (!connections.get(hostName).isConnected()) {
+                            connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
+                            connections.put(hostName, connection);
+                        } else {
+                            logger.debug("We already have this connection so not going to create one");
+                            connection = connections.get(hostName);
+                        }
+                    } else {
+                        connection = new ResourceConnection(iHostMonitorData, getAuthenticationInfo());
+                        connections.put(hostName, connection);
+                    }
+
+                    // before we get the statuses, we check the cancel job list and remove them permanently
+                    List<MonitorID> monitorID = iHostMonitorData.getMonitorIDs();
+                    Iterator<String> iterator1 = cancelJobList.iterator();
+                    ListIterator<MonitorID> monitorIDListIterator = monitorID.listIterator();
+                    while (monitorIDListIterator.hasNext()) {
+                        MonitorID iMonitorID = monitorIDListIterator.next();
+                        while (iterator1.hasNext()) {
+                            String cancelMId = iterator1.next();
+                            if (cancelMId.equals(iMonitorID.getExperimentID() + "+" + iMonitorID.getTaskID())) {
+                                iMonitorID.setStatus(JobState.CANCELED);
+//                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+                                removeList.add(iMonitorID);
+                                logger.debugId(cancelMId, "Found a match in cancel monitor queue, hence moved to the " +
+                                                "completed job queue, experiment {}, task {} , job {}",
+                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobID());
+                                logger.info("Job cancelled: marking the Job as ************CANCELLED************ experiment {}, task {}, job name {} .",
+                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                sendNotification(iMonitorID);
+                                logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
+                                Thread.sleep(10000);
+                                GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
+                                break;
+                            }
+                        }
+                        iterator1 = cancelJobList.iterator();
+                    }
+
+                    cleanup(take);
+
+                    synchronized (completedJobsFromPush) {
+                        for (ListIterator<String> iterator = completedJobsFromPush.listIterator(); iterator.hasNext(); ) {
+                            String completeId = iterator.next();
+                            for (monitorIDListIterator = monitorID.listIterator(); monitorIDListIterator.hasNext(); ) {
+                                MonitorID iMonitorID = monitorIDListIterator.next();
+                                if (completeId.equals(iMonitorID.getUserName() + "," + iMonitorID.getJobName())) {
+                                    logger.info("This job is finished because push notification came with <username,jobName> " + completeId);
+                                    iMonitorID.setStatus(JobState.COMPLETE);
+//                                    CommonUtils.removeMonitorFromQueue(take, iMonitorID);//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
+                                    removeList.add(iMonitorID);
+                                    logger.debugId(completeId, "Push notification updated job {} status to {}. " +
+                                                    "experiment {} , task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
+                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                    logger.info("AMQP message recieved: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+
+                                    sendNotification(iMonitorID);
+                                    logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
+                                    Thread.sleep(10000);
+                                    GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
+                                    break;
+                                }
+                            }
+                        }
+                    }
+
+                    cleanup(take);
+
+                    // we have to get this again because we removed the already completed jobs with amqp messages
+                    monitorID = iHostMonitorData.getMonitorIDs();
+                    Map<String, JobState> jobStatuses = connection.getJobStatuses(monitorID);
+                    for (Iterator<MonitorID> iterator = monitorID.listIterator(); iterator.hasNext(); ) {
+                        MonitorID iMonitorID = iterator.next();
+                        currentMonitorID = iMonitorID;
+                        if (!JobState.CANCELED.equals(iMonitorID.getStatus()) &&
+                                !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
+                            iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
+                        } else if (JobState.COMPLETE.equals(iMonitorID.getStatus())) {
+                            logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
+                                    "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+//                            CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+                            removeList.add(iMonitorID);
+                            logger.info("PULL Notification is complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                    iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                            GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
+                        }
+                        iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is not a simple setter we have a logic
+                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                        sendNotification(iMonitorID);
+                        // if the job is completed we do not have to put the job to the queue again
+                        iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                    }
+
+                    cleanup(take);
+
+
+                    for (Iterator<MonitorID> iterator = monitorID.listIterator(); iterator.hasNext(); ) {
+                        MonitorID iMonitorID = iterator.next();
+                        if (iMonitorID.getFailedCount() > FAILED_COUNT) {
+                            iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                            String outputDir = iMonitorID.getJobExecutionContext().getOutputDir();
+                            List<String> stdOut = null;
+                            try {
+                                stdOut = connection.getCluster().listDirectory(outputDir); // check the outputs directory
+                            } catch (SSHApiException e) {
+                                if (e.getMessage().contains("No such file or directory")) {
+                                    // this is because while we run output handler something failed and during exception
+                                    // we store all the jobs in the monitor queue again
+                                    logger.error("We know this  job is already attempted to run out-handlers");
+//                                    CommonUtils.removeMonitorFromQueue(queue, iMonitorID);
+                                }
+                            }
+                            if (stdOut != null && stdOut.size() > 0 && !stdOut.get(0).isEmpty()) { // have to be careful with this
+                                iMonitorID.setStatus(JobState.COMPLETE);
+                                logger.errorId(iMonitorID.getJobID(), "Job monitoring failed {} times, " +
+                                                " Experiment {} , task {}", iMonitorID.getFailedCount(),
+                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                logger.info("Listing directory came as complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
+                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                sendNotification(iMonitorID);
+//                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+                                removeList.add(iMonitorID);
+                                GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
+                            } else {
+                                iMonitorID.setFailedCount(0);
+                            }
+                        } else {
+                            // Evey
+                            iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
+                            // if the job is complete we remove it from the Map, if any of these maps
+                            // get empty this userMonitorData will get delete from the queue
+                        }
+                    }
+
+                    cleanup(take);
+
+
+                } else {
+                    logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.
+                            getComputeResourceDescription().getHostName());
+                }
+            }
+            // We have finished all the HostMonitorData object in userMonitorData, now we need to put it back
+            // now the userMonitorData goes back to the tail of the queue
+            // during individual monitorID removal we remove the HostMonitorData object if it become empty
+            // so if all the jobs are finished for all the hostMOnitorId objects in userMonitorData object
+            // we should remove it from the queue so here we do not put it back.
+            for (ListIterator<HostMonitorData> iterator1 = take.getHostMonitorData().listIterator(); iterator1.hasNext(); ) {
+                HostMonitorData iHostMonitorID = iterator1.next();
+                if (iHostMonitorID.getMonitorIDs().size() == 0) {
+                    iterator1.remove();
+                    logger.debug("Removed host {} from monitoring queue", iHostMonitorID.getComputeResourceDescription().getHostName());
+                }
+            }
+            if(take.getHostMonitorData().size()!=0) {
+                queue.put(take);
+            }
+        } catch (InterruptedException e) {
+            if (!this.queue.contains(take)) {
+                try {
+                    this.queue.put(take);
+                } catch (InterruptedException e1) {
+                    e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+                }
+            }
+            logger.error("Error handling the job with Job ID:" + currentMonitorID.getJobID());
+            throw new AiravataMonitorException(e);
+        } catch (SSHApiException e) {
+            logger.error(e.getMessage());
+            if (e.getMessage().contains("Unknown Job Id Error")) {
+                // in this case job is finished or may be the given job ID is wrong
+                jobStatus.setState(JobState.UNKNOWN);
+                JobIdentifier jobIdentifier = new JobIdentifier("UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN");
+                if (currentMonitorID != null){
+                    jobIdentifier.setExperimentId(currentMonitorID.getExperimentID());
+                    jobIdentifier.setTaskId(currentMonitorID.getTaskID());
+                    jobIdentifier.setWorkflowNodeId(currentMonitorID.getWorkflowNodeID());
+                    jobIdentifier.setJobId(currentMonitorID.getJobID());
+                    jobIdentifier.setGatewayId(currentMonitorID.getJobExecutionContext().getGatewayID());
+                }
+                jobStatus.setJobIdentity(jobIdentifier);
+                publisher.publish(jobStatus);
+            } else if (e.getMessage().contains("illegally formed job identifier")) {
+                logger.error("Wrong job ID is given so dropping the job from monitoring system");
+            } else if (!this.queue.contains(take)) {
+                try {
+                    queue.put(take);
+                } catch (InterruptedException e1) {
+                    e1.printStackTrace();
+                }
+            }
+            throw new AiravataMonitorException("Error retrieving the job status", e);
+        } catch (Exception e) {
+            try {
+                queue.put(take);
+            } catch (InterruptedException e1) {
+                e1.printStackTrace();
+            }
+            throw new AiravataMonitorException("Error retrieving the job status", e);
+        }
+        return true;
+    }
+
+    private void sendNotification(MonitorID iMonitorID) {
+        JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
+        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobID(),
+                iMonitorID.getTaskID(),
+                iMonitorID.getWorkflowNodeID(),
+                iMonitorID.getExperimentID(),
+                iMonitorID.getJobExecutionContext().getGatewayID());
+        jobStatus.setJobIdentity(jobIdentity);
+        jobStatus.setState(iMonitorID.getStatus());
+        // we have this JobStatus class to handle amqp monitoring
+        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status change request, " +
+                "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
+        jobStatus.getJobIdentity().getTaskId());
+
+        publisher.publish(jobStatus);
+    }
+
+    /**
+     * This is the method to stop the polling process
+     *
+     * @return if the stopping process is successful return true else false
+     */
+    public boolean stopPulling() {
+        this.startPulling = false;
+        return true;
+    }
+
+    public MonitorPublisher getPublisher() {
+        return publisher;
+    }
+
+    public void setPublisher(MonitorPublisher publisher) {
+        this.publisher = publisher;
+    }
+
+    public BlockingQueue<UserMonitorData> getQueue() {
+        return queue;
+    }
+
+    public void setQueue(BlockingQueue<UserMonitorData> queue) {
+        this.queue = queue;
+    }
+
+    public boolean authenticate() {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Map<String, ResourceConnection> getConnections() {
+        return connections;
+    }
+
+    public boolean isStartPulling() {
+        return startPulling;
+    }
+
+    public void setConnections(Map<String, ResourceConnection> connections) {
+        this.connections = connections;
+    }
+
+    public void setStartPulling(boolean startPulling) {
+        this.startPulling = startPulling;
+    }
+
+    public GFac getGfac() {
+        return gfac;
+    }
+
+    public void setGfac(GFac gfac) {
+        this.gfac = gfac;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+
+    public LinkedBlockingQueue<String> getCancelJobList() {
+        return cancelJobList;
+    }
+
+    public void setCancelJobList(LinkedBlockingQueue<String> cancelJobList) {
+        this.cancelJobList = cancelJobList;
+    }
+
+
+    private void cleanup(UserMonitorData userMonitorData){
+        for(MonitorID iMonitorId:removeList){
+            try {
+                CommonUtils.removeMonitorFromQueue(userMonitorData, iMonitorId);
+            } catch (AiravataMonitorException e) {
+                logger.error(e.getMessage(), e);
+                logger.error("Error deleting the monitor data: " + iMonitorId.getJobID());
+            }
+        }
+        removeList.clear();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
new file mode 100644
index 0000000..41e9bd2
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
@@ -0,0 +1,154 @@
+/*
+ *
+ * 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.monitor.impl.pull.qstat;
+
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.SecurityContext;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.monitor.HostMonitorData;
+import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+
+public class ResourceConnection {
+    private static final Logger log = LoggerFactory.getLogger(ResourceConnection.class);
+
+    private PBSCluster cluster;
+
+    private AuthenticationInfo authenticationInfo;
+
+
+    public ResourceConnection(HostMonitorData hostMonitorData,AuthenticationInfo authInfo) throws SSHApiException {
+        MonitorID monitorID = hostMonitorData.getMonitorIDs().get(0);
+        try {
+            SecurityContext securityContext = monitorID.getJobExecutionContext().getSecurityContext(monitorID.getComputeResourceDescription().getHostName());
+            if(securityContext != null) {
+                if (securityContext instanceof GSISecurityContext) {
+                    GSISecurityContext gsiSecurityContext = (GSISecurityContext) securityContext;
+                    cluster = (PBSCluster) gsiSecurityContext.getPbsCluster();
+                } else if (securityContext instanceof  SSHSecurityContext) {
+                    SSHSecurityContext sshSecurityContext = (SSHSecurityContext)
+                            securityContext;
+                    cluster = (PBSCluster) sshSecurityContext.getPbsCluster();
+                }
+            }
+            // we just use cluster configuration from the incoming request and construct a new cluster because for monitoring
+            // we are using our own credentials and not using one users account to do everything.
+            authenticationInfo = authInfo;
+        } catch (GFacException e) {
+            log.error("Error reading data from job ExecutionContext");
+        }
+    }
+
+    public ResourceConnection(HostMonitorData hostMonitorData) throws SSHApiException {
+        MonitorID monitorID = hostMonitorData.getMonitorIDs().get(0);
+        try {
+            GSISecurityContext securityContext = (GSISecurityContext)
+                    monitorID.getJobExecutionContext().getSecurityContext(monitorID.getComputeResourceDescription().getHostName());
+            cluster = (PBSCluster) securityContext.getPbsCluster();
+
+            // we just use cluster configuration from the incoming request and construct a new cluster because for monitoring
+            // we are using our own credentials and not using one users account to do everything.
+            cluster = new PBSCluster(cluster.getServerInfo(), authenticationInfo, cluster.getJobManagerConfiguration());
+        } catch (GFacException e) {
+            log.error("Error reading data from job ExecutionContext");
+        }
+    }
+
+    public JobState getJobStatus(MonitorID monitorID) throws SSHApiException {
+        String jobID = monitorID.getJobID();
+        //todo so currently we execute the qstat for each job but we can use user based monitoring
+        //todo or we should concatenate all the commands and execute them in one go and parseSingleJob the response
+        return getStatusFromString(cluster.getJobStatus(jobID).toString());
+    }
+
+    public Map<String, JobState> getJobStatuses(List<MonitorID> monitorIDs) throws SSHApiException {
+        Map<String, JobStatus> treeMap = new TreeMap<String, JobStatus>();
+        Map<String, JobState> treeMap1 = new TreeMap<String, JobState>();
+        // creating a sorted map with all the jobIds and with the predefined
+        // status as UNKNOWN
+        for (MonitorID monitorID : monitorIDs) {
+            treeMap.put(monitorID.getJobID()+","+monitorID.getJobName(), JobStatus.U);
+        }
+        String userName = cluster.getServerInfo().getUserName();
+        //todo so currently we execute the qstat for each job but we can use user based monitoring
+        //todo or we should concatenate all the commands and execute them in one go and parseSingleJob the response
+        //
+        cluster.getJobStatuses(userName, treeMap);
+        for (String key : treeMap.keySet()) {
+            treeMap1.put(key, getStatusFromString(treeMap.get(key).toString()));
+        }
+        return treeMap1;
+    }
+
+    private JobState getStatusFromString(String status) {
+        log.info("parsing the job status returned : " + status);
+        if (status != null) {
+            if ("C".equals(status) || "CD".equals(status) || "E".equals(status) || "CG".equals(status) || "DONE".equals(status)) {
+                return JobState.COMPLETE;
+            } else if ("H".equals(status) || "h".equals(status)) {
+                return JobState.HELD;
+            } else if ("Q".equals(status) || "qw".equals(status) || "PEND".equals(status)) {
+                return JobState.QUEUED;
+            } else if ("R".equals(status) || "CF".equals(status) || "r".equals(status) || "RUN".equals(status)) {
+                return JobState.ACTIVE;
+            } else if ("T".equals(status)) {
+                return JobState.HELD;
+            } else if ("W".equals(status) || "PD".equals(status)) {
+                return JobState.QUEUED;
+            } else if ("S".equals(status) || "PSUSP".equals(status) || "USUSP".equals(status) || "SSUSP".equals(status)) {
+                return JobState.SUSPENDED;
+            } else if ("CA".equals(status)) {
+                return JobState.CANCELED;
+            } else if ("F".equals(status) || "NF".equals(status) || "TO".equals(status) || "EXIT".equals(status)) {
+                return JobState.FAILED;
+            } else if ("PR".equals(status) || "Er".equals(status)) {
+                return JobState.FAILED;
+            } else if ("U".equals(status) || ("UNKWN".equals(status))) {
+                return JobState.UNKNOWN;
+            }
+        }
+        return JobState.UNKNOWN;
+    }
+
+    public PBSCluster getCluster() {
+        return cluster;
+    }
+
+    public void setCluster(PBSCluster cluster) {
+        this.cluster = cluster;
+    }
+
+    public boolean isConnected(){
+        return this.cluster.getSession().isConnected();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
new file mode 100644
index 0000000..de8cd8c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
@@ -0,0 +1,280 @@
+/*
+ *
+ * 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.monitor.impl.push.amqp;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.core.PushMonitor;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.gfac.monitor.util.AMQPConnectionUtil;
+import org.apache.airavata.gfac.monitor.util.CommonUtils;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.messaging.event.JobIdentifier;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+
+/**
+ * This is the implementation for AMQP based finishQueue, this uses
+ * rabbitmq client to recieve AMQP based monitoring data from
+ * mostly excede resources.
+ */
+public class AMQPMonitor extends PushMonitor {
+    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitor.class);
+
+
+    /* this will keep all the channels available in the system, we do not create
+      channels for all the jobs submitted, but we create channels for each user for each
+      host.
+    */
+    private Map<String, Channel> availableChannels;
+
+    private MonitorPublisher publisher;
+
+    private MonitorPublisher localPublisher;
+
+    private BlockingQueue<MonitorID> runningQueue;
+
+    private BlockingQueue<MonitorID> finishQueue;
+
+    private String connectionName;
+
+    private String proxyPath;
+
+    private List<String> amqpHosts;
+
+    private boolean startRegister;
+
+    public AMQPMonitor(){
+
+    }
+    public AMQPMonitor(MonitorPublisher publisher, BlockingQueue<MonitorID> runningQueue,
+                       BlockingQueue<MonitorID> finishQueue,
+                       String proxyPath,String connectionName,List<String> hosts) {
+        this.publisher = publisher;
+        this.runningQueue = runningQueue;        // these will be initialized by the MonitorManager
+        this.finishQueue = finishQueue;          // these will be initialized by the MonitorManager
+        this.availableChannels = new HashMap<String, Channel>();
+        this.connectionName = connectionName;
+        this.proxyPath = proxyPath;
+        this.amqpHosts = hosts;
+        this.localPublisher = new MonitorPublisher(new EventBus());
+        this.localPublisher.registerListener(this);
+    }
+
+    public void initialize(String proxyPath, String connectionName, List<String> hosts) {
+        this.availableChannels = new HashMap<String, Channel>();
+        this.connectionName = connectionName;
+        this.proxyPath = proxyPath;
+        this.amqpHosts = hosts;
+        this.localPublisher = new MonitorPublisher(new EventBus());
+        this.localPublisher.registerListener(this);
+    }
+
+    @Override
+    public boolean registerListener(MonitorID monitorID) throws AiravataMonitorException {
+        // we subscribe to read user-host based subscription
+        ComputeResourceDescription computeResourceDescription = monitorID.getComputeResourceDescription();
+        if (computeResourceDescription.isSetIpAddresses() && computeResourceDescription.getIpAddresses().size() > 0) {
+            // we get first ip address for the moment
+            String hostAddress = computeResourceDescription.getIpAddresses().get(0);
+            // in amqp case there are no multiple jobs per each host, because once a job is put in to the queue it
+            // will be picked by the Monitor, so jobs will not stay in this queueu but jobs will stay in finishQueue
+            String channelID = CommonUtils.getChannelID(monitorID);
+            if (availableChannels.get(channelID) == null) {
+                try {
+                    //todo need to fix this rather getting it from a file
+                    Connection connection = AMQPConnectionUtil.connect(amqpHosts, connectionName, proxyPath);
+                    Channel channel = null;
+                    channel = connection.createChannel();
+                    availableChannels.put(channelID, channel);
+                    String queueName = channel.queueDeclare().getQueue();
+
+                    BasicConsumer consumer = new
+                            BasicConsumer(new JSONMessageParser(), localPublisher);          // here we use local publisher
+                    channel.basicConsume(queueName, true, consumer);
+                    String filterString = CommonUtils.getRoutingKey(monitorID.getUserName(), hostAddress);
+                    // here we queuebind to a particular user in a particular machine
+                    channel.queueBind(queueName, "glue2.computing_activity", filterString);
+                    logger.info("Using filtering string to monitor: " + filterString);
+                } catch (IOException e) {
+                    logger.error("Error creating the connection to finishQueue the job:" + monitorID.getUserName());
+                }
+            }
+        } else {
+            throw new AiravataMonitorException("Couldn't register monitor for jobId :" + monitorID.getJobID() +
+                    " , ComputeResourceDescription " + computeResourceDescription.getHostName() + " doesn't has an " +
+                    "IpAddress with it");
+        }
+        return true;
+    }
+
+    public void run() {
+        // before going to the while true mode we start unregister thread
+        startRegister = true; // this will be unset by someone else
+        while (startRegister || !ServerSettings.isStopAllThreads()) {
+            try {
+                MonitorID take = runningQueue.take();
+                this.registerListener(take);
+            } catch (AiravataMonitorException e) { // catch any exceptino inside the loop
+                logger.error(e.getMessage(), e);
+            } catch (InterruptedException e) {
+                logger.error(e.getMessage(), e);
+            } catch (Exception e){
+                logger.error(e.getMessage(), e);
+            }
+        }
+        Set<String> strings = availableChannels.keySet();
+        for(String key:strings) {
+            Channel channel = availableChannels.get(key);
+            try {
+                channel.close();
+            } catch (IOException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    @Subscribe
+    public boolean unRegisterListener(MonitorID monitorID) throws AiravataMonitorException {
+        Iterator<MonitorID> iterator = finishQueue.iterator();
+        MonitorID next = null;
+        while(iterator.hasNext()){
+            next = iterator.next();
+            if(next.getJobID().endsWith(monitorID.getJobID())){
+                break;
+            }
+        }
+        if(next == null) {
+            logger.error("Job has removed from the queue, old obsolete message recieved");
+            return false;
+        }
+        String channelID = CommonUtils.getChannelID(next);
+        if (JobState.FAILED.equals(monitorID.getStatus()) || JobState.COMPLETE.equals(monitorID.getStatus())) {
+            finishQueue.remove(next);
+
+            // if this is the last job in the queue at this point with the same username and same host we
+            // close the channel and close the connection and remove it from availableChannels
+            if (CommonUtils.isTheLastJobInQueue(finishQueue, next)) {
+                logger.info("There are no jobs to monitor for common ChannelID:" + channelID + " , so we unsubscribe it" +
+                        ", incase new job created we do subscribe again");
+                Channel channel = availableChannels.get(channelID);
+                if (channel == null) {
+                    logger.error("Already Unregistered the listener");
+                    throw new AiravataMonitorException("Already Unregistered the listener");
+                } else {
+                    try {
+                        channel.queueUnbind(channel.queueDeclare().getQueue(), "glue2.computing_activity", CommonUtils.getRoutingKey(next));
+                        channel.close();
+                        channel.getConnection().close();
+                        availableChannels.remove(channelID);
+                    } catch (IOException e) {
+                        logger.error("Error unregistering the listener");
+                        throw new AiravataMonitorException("Error unregistering the listener");
+                    }
+                }
+            }
+        }
+        next.setStatus(monitorID.getStatus());
+        JobIdentifier jobIdentity = new JobIdentifier(next.getJobID(),
+                                                     next.getTaskID(),
+                                                     next.getWorkflowNodeID(),
+                                                     next.getExperimentID(),
+                                                     next.getJobExecutionContext().getGatewayID());
+        publisher.publish(new JobStatusChangeEvent(next.getStatus(),jobIdentity));
+        return true;
+    }
+    @Override
+    public boolean stopRegister() throws AiravataMonitorException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Map<String, Channel> getAvailableChannels() {
+        return availableChannels;
+    }
+
+    public void setAvailableChannels(Map<String, Channel> availableChannels) {
+        this.availableChannels = availableChannels;
+    }
+
+    public MonitorPublisher getPublisher() {
+        return publisher;
+    }
+
+    public void setPublisher(MonitorPublisher publisher) {
+        this.publisher = publisher;
+    }
+
+    public BlockingQueue<MonitorID> getRunningQueue() {
+        return runningQueue;
+    }
+
+    public void setRunningQueue(BlockingQueue<MonitorID> runningQueue) {
+        this.runningQueue = runningQueue;
+    }
+
+    public BlockingQueue<MonitorID> getFinishQueue() {
+        return finishQueue;
+    }
+
+    public void setFinishQueue(BlockingQueue<MonitorID> finishQueue) {
+        this.finishQueue = finishQueue;
+    }
+
+    public String getProxyPath() {
+        return proxyPath;
+    }
+
+    public void setProxyPath(String proxyPath) {
+        this.proxyPath = proxyPath;
+    }
+
+    public List<String> getAmqpHosts() {
+        return amqpHosts;
+    }
+
+    public void setAmqpHosts(List<String> amqpHosts) {
+        this.amqpHosts = amqpHosts;
+    }
+
+    public boolean isStartRegister() {
+        return startRegister;
+    }
+
+    public void setStartRegister(boolean startRegister) {
+        this.startRegister = startRegister;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
new file mode 100644
index 0000000..bd5c625
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/BasicConsumer.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * 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.monitor.impl.push.amqp;
+
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.core.MessageParser;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.rabbitmq.client.AMQP;
+import com.rabbitmq.client.Consumer;
+import com.rabbitmq.client.Envelope;
+import com.rabbitmq.client.ShutdownSignalException;
+
+public class BasicConsumer implements Consumer {
+    private final static Logger logger = LoggerFactory.getLogger(AMQPMonitor.class);
+
+    private MessageParser parser;
+
+    private MonitorPublisher publisher;
+
+    public BasicConsumer(MessageParser parser, MonitorPublisher publisher) {
+        this.parser = parser;
+        this.publisher = publisher;
+    }
+
+    public void handleCancel(String consumerTag) {
+    }
+
+    public void handleCancelOk(String consumerTag) {
+    }
+
+    public void handleConsumeOk(String consumerTag) {
+    }
+
+    public void handleDelivery(String consumerTag,
+                               Envelope envelope,
+                               AMQP.BasicProperties properties,
+                               byte[] body) {
+
+        logger.debug("job update for: " + envelope.getRoutingKey());
+        String message = new String(body);
+        message = message.replaceAll("(?m)^", "    ");
+        // Here we parse the message and get the job status and push it
+        // to the Event bus, this will be picked by
+//        AiravataJobStatusUpdator and store in to registry
+
+        logger.debug("************************************************************");
+        logger.debug("AMQP Message recieved \n" + message);
+        logger.debug("************************************************************");
+        try {
+            String jobID = envelope.getRoutingKey().split("\\.")[0];
+            MonitorID monitorID = new MonitorID(null, jobID, null, null, null, null,null);
+            monitorID.setStatus(parser.parseMessage(message));
+            publisher.publish(monitorID);
+        } catch (AiravataMonitorException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    public void handleRecoverOk(String consumerTag) {
+    }
+
+    public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig) {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
new file mode 100644
index 0000000..72c77d5
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/JSONMessageParser.java
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.monitor.impl.push.amqp;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.airavata.ComputingActivity;
+import org.apache.airavata.gfac.monitor.core.MessageParser;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.List;
+
+public class JSONMessageParser implements MessageParser {
+    private final static Logger logger = LoggerFactory.getLogger(JSONMessageParser.class);
+
+    public JobState parseMessage(String message)throws AiravataMonitorException {
+        /*todo write a json message parser here*/
+        logger.debug(message);
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            ComputingActivity computingActivity = objectMapper.readValue(message.getBytes(), ComputingActivity.class);
+            logger.info(computingActivity.getIDFromEndpoint());
+            List<String> stateList = computingActivity.getState();
+            JobState jobState = null;
+            for (String aState : stateList) {
+                jobState = getStatusFromString(aState);
+            }
+            // we get the last value of the state array
+            return jobState;
+        } catch (IOException e) {
+            throw new AiravataMonitorException(e);
+        }
+    }
+
+private JobState getStatusFromString(String status) {
+        logger.info("parsing the job status returned : " + status);
+        if(status != null){
+            if("ipf:finished".equals(status)){
+                return JobState.COMPLETE;
+            }else if("ipf:pending".equals(status)|| "ipf:starting".equals(status)){
+                return JobState.QUEUED;
+            }else if("ipf:running".equals(status) || "ipf:finishing".equals(status)){
+                return JobState.ACTIVE;
+            }else if ("ipf:held".equals(status) || "ipf:teminating".equals(status) || "ipf:teminated".equals(status)) {
+                return JobState.HELD;
+            } else if ("ipf:suspending".equals(status)) {
+                return JobState.SUSPENDED;
+            }else if ("ipf:failed".equals(status)) {
+                return JobState.FAILED;
+            }else if ("ipf:unknown".equals(status)){
+                return JobState.UNKNOWN;
+            }
+        }
+        return JobState.UNKNOWN;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
new file mode 100644
index 0000000..c4275f1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/SimpleJobFinishConsumer.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * 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.monitor.impl.push.amqp;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.QueueingConsumer;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class SimpleJobFinishConsumer {
+    private final static Logger logger = LoggerFactory.getLogger(SimpleJobFinishConsumer.class);
+
+    private List<String> completedJobsFromPush;
+
+    public SimpleJobFinishConsumer(List<String> completedJobsFromPush) {
+        this.completedJobsFromPush = completedJobsFromPush;
+    }
+
+    public void listen() {
+        try {
+            String queueName = ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950");
+            String uri = "amqp://localhost";
+
+            ConnectionFactory connFactory = new ConnectionFactory();
+            connFactory.setUri(uri);
+            Connection conn = connFactory.newConnection();
+            logger.info("--------Created the connection to Rabbitmq server successfully-------");
+
+            final Channel ch = conn.createChannel();
+
+            logger.info("--------Created the channel with Rabbitmq server successfully-------");
+
+            ch.queueDeclare(queueName, false, false, false, null);
+
+            logger.info("--------Declare the queue " + queueName + " in Rabbitmq server successfully-------");
+
+            final QueueingConsumer consumer = new QueueingConsumer(ch);
+            ch.basicConsume(queueName, consumer);
+            (new Thread() {
+                public void run() {
+                    try {
+                        while (true) {
+                            QueueingConsumer.Delivery delivery = consumer.nextDelivery();
+                            String message = new String(delivery.getBody());
+                            logger.info("---------------- Job Finish message received:" + message + " --------------");
+                            synchronized (completedJobsFromPush) {
+                                completedJobsFromPush.add(message);
+                            }
+                            ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
+                        }
+                    } catch (Exception ex) {
+                        logger.error("--------Cannot connect to a RabbitMQ Server--------" , ex);
+                    }
+                }
+
+            }).start();
+        } catch (Exception ex) {
+            logger.error("Cannot connect to a RabbitMQ Server: " , ex);
+            logger.info("------------- Push monitoring for HPC jobs is disabled -------------");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
new file mode 100644
index 0000000..a701326
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/UnRegisterWorker.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.monitor.impl.push.amqp;
+
+import com.google.common.eventbus.Subscribe;
+import com.rabbitmq.client.Channel;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.gfac.monitor.util.CommonUtils;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Map;
+
+public class UnRegisterWorker{
+    private final static Logger logger = LoggerFactory.getLogger(UnRegisterWorker.class);
+    private Map<String, Channel> availableChannels;
+
+    public UnRegisterWorker(Map<String, Channel> channels) {
+        this.availableChannels = channels;
+    }
+
+    @Subscribe
+    private boolean unRegisterListener(JobStatusChangeEvent jobStatus, MonitorID monitorID) throws AiravataMonitorException {
+        String channelID = CommonUtils.getChannelID(monitorID);
+        if (JobState.FAILED.equals(jobStatus.getState()) || JobState.COMPLETE.equals(jobStatus.getState())){
+            Channel channel = availableChannels.get(channelID);
+            if (channel == null) {
+                logger.error("Already Unregistered the listener");
+                throw new AiravataMonitorException("Already Unregistered the listener");
+            } else {
+                try {
+                    channel.queueUnbind(channel.queueDeclare().getQueue(), "glue2.computing_activity", CommonUtils.getRoutingKey(monitorID));
+                    channel.close();
+                    channel.getConnection().close();
+                    availableChannels.remove(channelID);
+                } catch (IOException e) {
+                    logger.error("Error unregistering the listener");
+                    throw new AiravataMonitorException("Error unregistering the listener");
+                }
+            }
+        }
+        return true;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
new file mode 100644
index 0000000..6a4ed3b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/util/AMQPConnectionUtil.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.monitor.util;
+
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.DefaultSaslConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+import java.security.KeyStore;
+import java.util.Collections;
+import java.util.List;
+
+public class AMQPConnectionUtil {
+    private final static Logger logger = LoggerFactory.getLogger(AMQPConnectionUtil.class);
+    public static Connection connect(List<String>hosts,String vhost, String proxyFile) {
+        Collections.shuffle(hosts);
+        for (String host : hosts) {
+            Connection connection = connect(host, vhost, proxyFile);
+            if (host != null) {
+                System.out.println("connected to " + host);
+                return connection;
+            }
+        }
+        return null;
+    }
+
+    public static Connection connect(String host, String vhost, String proxyFile) {
+        Connection connection;
+        try {
+            String keyPassPhrase = "test123";
+            KeyStore ks = X509Helper.keyStoreFromPEM(proxyFile, keyPassPhrase);
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+            kmf.init(ks, keyPassPhrase.toCharArray());
+
+            KeyStore tks = X509Helper.trustKeyStoreFromCertDir();
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+            tmf.init(tks);
+
+            SSLContext c = SSLContext.getInstance("SSLv3");
+            c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+
+            ConnectionFactory factory = new ConnectionFactory();
+            factory.setHost(host);
+            factory.setPort(5671);
+            factory.useSslProtocol(c);
+            factory.setVirtualHost(vhost);
+            factory.setSaslConfig(DefaultSaslConfig.EXTERNAL);
+
+            connection = factory.newConnection();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+        return connection;
+    }
+
+}


[58/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/NOTICE
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/NOTICE b/modules/distribution/gfac-server/src/main/resources/NOTICE
deleted file mode 100644
index fa7cba5..0000000
--- a/modules/distribution/gfac-server/src/main/resources/NOTICE
+++ /dev/null
@@ -1,163 +0,0 @@
-Apache Airavata
-Copyright 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-===============================================================================
-Apache Xerces Java Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-================================================================================
-Apache XmlBeans Notice: 
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-   Aside from contributions to the Apache XMLBeans project, this
-   software also includes:
-
-    - one or more source files from the Apache Xerces-J and Apache Axis
-      products, Copyright (c) 1999-2003 Apache Software Foundation
-
-    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
-      Consortium (Massachusetts Institute of Technology, European Research
-      Consortium for Informatics and Mathematics, Keio University)
-
-    - resolver.jar from Apache Xml Commons project,
-      Copyright (c) 2001-2003 Apache Software Foundation
-
-    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
-      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
-
-    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
-      Copyright 2005 BEA under the terms of the Apache Software License 2.0
-      
-=========================================================================================
-Apache Axis2 Notice: (axis2-*, mex-1.5.1-impl)
-
-Portions Copyright 2006 International Business Machines Corp.
-Portions Copyright 2005-2007 WSO2, Inc.
-
-This product also includes schemas and specification developed by:
-- the W3C consortium (http://www.w3c.org)
-
-This product also includes WS-* schemas developed by International
-Business Machines Corporation, Microsoft Corporation, BEA Systems, 
-TIBCO Software, SAP AG, Sonic Software, and VeriSign
-
-This product also includes a WSDL developed by salesforce.com
-- Copyright 1999-2006 salesforce.com, inc.
-Portions of the included xmlbeans library were originally based on the following:
-- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
-
-====================================================================================
-Apache Derby Notice:
-
-Portions of Derby were originally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-The following copyright notice(s) were affixed to portions of the code
-with which this file is now or was at one time distributed
-and are placed here unaltered.
-
-(C) Copyright 1997,2004 International Business Machines Corporation.  All rights reserved.
-
-(C) Copyright IBM Corp. 2003. 
-
-=======================
-
-The portion of the functionTests under 'nist' was originally 
-developed by the National Institute of Standards and Technology (NIST), 
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-========================
-
-The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and
-java/stubs/jdbc3) were produced by trimming sources supplied by the
-Apache Harmony project. In addition, the Harmony SerialBlob and
-SerialClob implementations are used. The following notice covers the Harmony sources:
-
-Portions of Harmony were originally developed by
-Intel Corporation and are licensed to the Apache Software
-Foundation under the "Software Grant and Corporate Contribution
-License Agreement", informally known as the "Intel Harmony CLA".
-
-=============================================================================
-Apache Woden Notice:
-
-   This product also includes software developed by :
-   
-     - IBM Corporation (http://www.ibm.com),
-         WSDL4J was the initial code contribution for the Apache Woden
-         project and some of the WSDL4J design and code has been reused.
-     - The W3C Consortium (http://www.w3c.org),
-         Common W3C XML Schema and DTD files are packaged with Apache Woden.
-
-   Please read the different LICENSE files present in the root directory of
-   this distribution.
-
-=========================================================================
-Woodstox Notice: 
-
-This product includes software developed by the Woodstox Project 
-(http://woodstox.codehaus.org/)
-
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
-
-===========================================================================
-Apache xml-commons xml-apis Notice:
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
-
-================================================================================================
-Apache  Xalan Notice: 
-
-Portions of this software was originally based on the following:
-     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
-     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
-     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
-     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the 
-       Apache Software Foundation and was originally developed at Hewlett Packard Company. 
-================================================================================================
-Apache  OpenJPA Notice: 
-
-OpenJPA includes software developed by the SERP project
-Copyright (c) 2002-2006, A. Abram White. All rights reserved.
-
-OpenJPA includes the persistence and orm schemas from the JPA specifications.
-Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
-OpenJPA elects to include this software in this distribution under the
-CDDL license.  You can obtain a copy of the License at:
-    https://glassfish.dev.java.net/public/CDDL+GPL.html
-The source code is available at:
-    https://glassfish.dev.java.net/source/browse/glassfish/
-
-OpenJPA includes software written by Miroslav Nachev
-OpenJPA uses test code written by Charles Tillman.
-================================================================================================
-Apache XmlSchema Notice:
-
-Portions Copyright 2006 International Business Machines Corp.
-================================================================================================

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/README
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/README b/modules/distribution/gfac-server/src/main/resources/README
deleted file mode 100644
index 1539b8c..0000000
--- a/modules/distribution/gfac-server/src/main/resources/README
+++ /dev/null
@@ -1,121 +0,0 @@
-Apache Airavata Server - README.txt
-Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
---------------------------------------------------------------------------------
-
-About
-=====
-Apache Airavata, a software framework to executing and managing computational jobs on 
-distributed computing resources including local clusters, supercomputers, national grids, 
-academic and commercial clouds. Airavata can be used as individual components or 
-as an integrated solution to build science gateways or general-purpose distributed 
-application and workflow management systems. Users can use Airavata back end services 
-and build gadgets to deploy in open social containers such as Apache Rave and modify them 
-to suit their needs. Airavata builds on general concepts of service oriented computing, 
-distributed messaging, and workflow composition and orchestration.
-
-This distribution allows you to run a standalone Airavata Server which includes all the 
-airavata services shipped with a default derby database as the backend registry.
-
-Release Notes
-=============
-0.11 is the tenth release of Airavata (skipped 0.1-INCUBATNG). This release focuses bug fixes and GSISSH library for beta testing. For detailed tasks list, please see RELEASE_NOTES.
-
-Building from source
-====================
-For brief installation instructions, see INSTALL
-For detailed installation and further instructions refer http://airavata.apache.org/ - Documentation section in left hand panel. Step by step with proper documentation are provided.
-
-Known Issues in This Release
-============================
-This is the base release and is focused on a good foundation and less on features. This 
-version is not recommended for production usage.
-
-Airavata Binary Distribution Directory Structure
-================================================
-
-    AIRAVATA_HOME
-		├── bin
-		│   ├── database_scripts <dir>
-		│   ├── airavata-server.bat
-		│   ├── airavata-server.properties
-		│   ├── airavata-server.sh
-		│   ├── authenticators.xml
-		│   ├── axis2.xml
-		│   ├── derby.sh
-		│   ├── host.xml
-		│   ├── log4j.properties
-		│   ├── logo.txt
-		│   ├── setenv.bat
-		│   ├── setenv.sh
-		│   └── startNetworkServer
-		├── lib <dir>
-		├── repository
-		│   ├── modules 
-		│   └── services
-		├── samples
-		│   ├── workflows <dir>
-		│   ├── echo_out.sh
-		│   └── echo.sh
-		├── INSTALL
-		├── LICENSE
-		├── NOTICE
-		└── README
-
-
-How to test and run samples
-===========================
-* If you built Airavata from source, and if you see "BUILD SUCCESS", then the test cases should have passes.
-* The test cases are beyond unit level, they startup embedded services and run through basic workflow use cases.
-* To walk through Airavata features, follow "Airavata in Five Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-5-minutes.html
-* For intermediate level Airavata features, follow "Airavata in Ten Minutes" tutorial at http://airavata.apache.org/documentation/tutorials/airavata-in-10-minutes.html 
-* For advanced use cases, please contact mailing lists - http://airavata.apache.org/community/mailing-lists.html
-
-Description of Directory Structure
-==================================
-    - bin
-      This contains all the configuration files & the executable scripts to run the Airavata Server (Axis2 server 
-      with Airavata services which include messageBroker and messageBox with GFac Axis2 services), & a standalone Apache Derby server.
-
-    - bin - database_scripts
-      Contains the database scripts which are used to create tables for messagebox and messagebroker services
-
-    - samples
-      This contains sample workflow to try out & sample application scripts.
-
-    - lib
-      This contains all the libraries required to run the airavata server and/or derby server.
-
-    - repository - services
-      Contains deployed services in Axis2 runtime.
-
-    - README
-      This document.
-
-    - INSTALL
-      This document will contain information on installing Apache-Airavata.
-
-
-Other Available Distributions
-=============================
-
-Server Distributions
---------------------
-* Airavata Server
-  The Airavata Server binary distribution allows you to run a standalone Airavata Server which includes all the airavata services 
-  shipped with a default derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-* Airavata Server Web Application
-  This is similar package as the Airavata Server but is distributed as the server Web Application archive.
-  This war is compatible with Apache Tomcat application server. The war bundles all airavata services 
-  enabled by defualt to startup a derby database as the backend registry. For stable purposes, a mysql configuration is recommended. 
-
-Client Distributions
---------------------
-* Airavata XBaya
-  The Airavata XBaya distribution is a client GUI application with features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry.
-
-* Airavata XBaya JNLP
-  The Airavata XBaya JNLP distribution is the simular GUI distribution but prepackeged to be ready to be deployed to 
-   a web server as a web start application. The GUI provides features to register applications as web services, construct workflows,
-  execute and monitor workflows and browse the generated results from the airavata registry. 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/bin/gfac-server.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/bin/gfac-server.sh b/modules/distribution/gfac-server/src/main/resources/bin/gfac-server.sh
deleted file mode 100755
index 839ef4e..0000000
--- a/modules/distribution/gfac-server/src/main/resources/bin/gfac-server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-. `dirname $0`/setenv.sh
-cd $AIRAVATA_HOME/bin
-LOGO_FILE="logo.txt"
-
-JAVA_OPTS=""
-AIRAVATA_COMMAND=""
-IS_DAEMON_MODE=false
-LOGO=true
-STOP=false
-FORCE=false
-SERVERS="--servers=gfac"
-for var in "$@"
-do
-    case $var in
-        -xdebug)
-            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-            shift
-        ;;
-        -security)
-            JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$AIRAVATA_HOME/conf/axis2.policy -Daxis2.home=$AIRAVATA_HOME"
-            shift
-        ;;
-	start)
-	   AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS"
-	   IS_DAEMON_MODE=true
-            shift
-        ;;
-	stop)
-	    LOGO=false
-	    STOP=true
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $var"
-            shift
-        ;;
-	--force)
-	    FORCE=true
-            shift
-        ;;
-	-nologo)
-	    LOGO=false
-            shift
-        ;;
-        -h)
-            echo "Usage: airavata-server.sh [command-options]"
-            echo "command options:"
-	    echo "  start              Start server in daemon mode"
-	    echo "  stop [--force]     Stop all airavata servers."
-	    echo "  --<key>[=<value>]  Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
-            echo "  -nologo            Do not show airavata logo"
-            echo "  -xdebug            Start Airavata Server under JPDA debugger"
-            echo "  -security          Enable Java 2 security"
-            echo "  -h                 Display this help and exit"
-            shift
-            exit 0
-        ;;
-	*)
-	    AIRAVATA_COMMAND="$AIRAVATA_COMMAND $SERVERS $var"	    
-            shift
-    esac
-done
-if $LOGO ; then
-	if [ -e $LOGO_FILE ]
-	then
-		cat $LOGO_FILE
-	fi
-fi
-if $STOP && $FORCE ; 
-then
-	for f in `find . -name "server-start_*"`; do 
-		f_split=(${f//_/ });
-		echo "Found process file : $f" 
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
-		out=`kill -9 ${f_split[1]} 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-		echo -n "    Removing process file..."
-		out=`rm $f 2>&1`
-		if [ -z "$out" ]; then
-		    echo "done"
-		else
-		    echo "failed (REASON: $out)"
-		fi
-	done
-else
-	if $IS_DAEMON_MODE ; then
-		echo "Starting airavata server in daemon mode..."
-		nohup java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $* > gfac-server.out & 
- 	else
-		java $JAVA_OPTS -classpath "$XBAYA_CLASSPATH" \
-		    -Djava.endorsed.dirs="$AIRAVATA_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-		    org.apache.airavata.server.ServerMain $AIRAVATA_COMMAND $*
-	fi
-fi
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/bin/logo.txt
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/bin/logo.txt b/modules/distribution/gfac-server/src/main/resources/bin/logo.txt
deleted file mode 100644
index e886438..0000000
--- a/modules/distribution/gfac-server/src/main/resources/bin/logo.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-...._....................._..............._...._......................_.........
-.../ \..._.__...__._..___| |__...___...../ \..(_)_.__.__.___...____._|.|_.__._..
-../ _ \.| '_ \./ _` |/ __| '_ \./ _ \.../ _ \.| | '__/ _` \ \./ / _` | __/ _` |.
-./ ___ \| |_) | (_| | (__| |.| |  __/../ ___ \| | |.| (_| |\ V / (_| | || (_| |.
-/_/...\_\ .__/.\__,_|\___|_|.|_|\___|./_/...\_\_|_|..\__,_|.\_/.\__,_|\__\__,_|.
-........|_|.....................................................................
-................................................................................
-................,+????++~..~~++..+????????+??++.++~...~+=???+++.................
-..............:???????....:::...~??????????????.~..::...=????????...............
-............????????..~~..?????..??????????????.?????..~~~.~???????.............
-...........?????????I,~I~~??????.+????????????.~??????~=~..?????????~...........
-.........?????++??????..????????:.??????????I..????????..????????+????..........
-........??.....???????....???????...???????+..+??????+.I.????????.....?,........
-........????==????????..??..?????..=???????=..?????,.=+?.?????????===??=........
-......=??????????+????..+??=.???=.~??????????,.???=,???,.????=+??????????.......
-....??????????+...+I++..???,=...:??????????????.....+??..++I?+..,??????????.....
-....???????=??..........??..+??.:=:.???????......??..??=..........?=???????=....
-....??????..?...........+?..???.....???????......???.??...........~=.??????=....
-....~???~.~..............?..???.~=..,??????...7..???.?.:..............~????:....
-...7....7 ...............?..????. ...??????... .????.?.?.............I ..:.:....
-.....+7=,.+?................????:,I...?????..=.?????.?.............??~.=7+......
-..........????..............??????~...~??..~~??????..?...........+???,..........
-...........???............=.+???????,.?+:.?????????..+...........???+...........
-............??............?,.??????.,??..??????????.,............???............
-...........??,.............=.,????.?+....????????I.I..............=?............
-..........I?..................+??.:?~.....=??????..................??...........
-..........??...?...............??.:?=......??????..............?...??...........
-............++?..............?.????...?....??????.+..............++I............
-.............................?.??????~....???????.?.............................
-............................~~.??????......??????...............................
-.............................=???????......???????+.............................
-..........................=I??++?+++?......?+++++++?+...........................
-..........................,..77..77.........  ..  ...7..........................
-................................................................................

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/bin/setenv.bat
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/bin/setenv.bat b/modules/distribution/gfac-server/src/main/resources/bin/setenv.bat
deleted file mode 100644
index 223f8cd..0000000
--- a/modules/distribution/gfac-server/src/main/resources/bin/setenv.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied. See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-@echo off
-
-:checkJava
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto initialize
-
-:noJavaHome
-echo You must set the JAVA_HOME environment variable before running Airavata.
-goto end
-
-:initialize
-if "%AIRAVATA_HOME%"=="" set AIRAVATA_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET airavataDrive=%AIRAVATA_HOME:~0,1%
-if not "%curDrive%" == "%airavataDrive%" %airavataDrive%:
-goto updateClasspath
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-cd %AIRAVATA_HOME%
-set XBAYA_CLASSPATH=
-FOR %%C in ("%AIRAVATA_HOME%\lib\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\lib\%%~nC%%~xC
-FOR %%C in ("%AIRAVATA_HOME%\repository\services\*.jar") DO set XBAYA_CLASSPATH=!XBAYA_CLASSPATH!;..\repository\services\%%~nC%%~xC
-
-:end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/gfac-server/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/src/main/resources/bin/setenv.sh b/modules/distribution/gfac-server/src/main/resources/bin/setenv.sh
deleted file mode 100755
index 84673db..0000000
--- a/modules/distribution/gfac-server/src/main/resources/bin/setenv.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Get standard environment variables
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Airavata Scripts."
-  exit 1
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-
-PRGDIR=`dirname "$PRG"`
-
-# Only set AIRAVATA_HOME if not already set
-[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd`
-
-XBAYA_CLASSPATH=""
-
-
-
-for f in "$AIRAVATA_HOME"/lib/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-for f in "$AIRAVATA_HOME"/repository/services/*.jar
-do
-  XBAYA_CLASSPATH="$XBAYA_CLASSPATH":$f
-done
-
-XBAYA_CLASSPATH="$XBAYA_HOME":"$XBAYA_HOME/conf":"$XBAYA_CLASSPATH":"$CLASSPATH"
-
-
-
-
-export AIRAVATA_HOME
-export XBAYA_CLASSPATH
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/pom.xml b/modules/distribution/new-dist/pom.xml
deleted file mode 100644
index 23e30ae..0000000
--- a/modules/distribution/new-dist/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<parent>
-		<groupId>org.apache.airavata</groupId>
-		<artifactId>distribution</artifactId>
-		<version>0.16-SNAPSHOT</version>
-		<relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>apache-airavata-new-distribution</artifactId>
-	<name>Apache Airavata Distribution</name>
-	<packaging>pom</packaging>
-	<url>http://airavata.apache.org/</url>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>unpack</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<artifactItem>
-									<groupId>org.apache.airavata</groupId>
-									<artifactId>airavata-server-configuration</artifactId>
-									<version>${project.version}</version>
-									<type>jar</type>
-								</artifactItem>
-							</artifactItems>
-							<outputDirectory>${project.build.directory}/conf</outputDirectory>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>distribution-package</id>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-						<configuration>
-							<finalName>${archive.name}-${project.version}</finalName>
-							<descriptors>
-								<descriptor>src/main/assembly/api-server-assembly.xml</descriptor>
-								 <!--<descriptor>src/main/assembly/src-assembly.xml</descriptor>-->
-							</descriptors>
-							<attach>false</attach>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-		</plugins>
-	</build>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-standalone-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.airavata</groupId>
-			<artifactId>airavata-api-server</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-
-	</dependencies>
-
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<archive.name>apache-airavata-api-server</archive.name>
-	</properties>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/assembly/airavata-common-component.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/assembly/airavata-common-component.xml b/modules/distribution/new-dist/src/main/assembly/airavata-common-component.xml
deleted file mode 100644
index 6b7f3c7..0000000
--- a/modules/distribution/new-dist/src/main/assembly/airavata-common-component.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
-
-    <fileSets>
-
-        <!-- ********************** copy release notes files ********************** -->
-        <fileSet>
-            <directory>../../../</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>RELEASE_NOTES</include>
-            </includes>
-        </fileSet>
-        <!-- ********************** copy licenses, readme etc. ********************** -->
-        <fileSet>
-            <directory>src/main/resources/</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>LICENSE</include>
-                <include>NOTICE</include>
-                <include>README</include>
-                <include>INSTALL</include>
-            </includes>
-        </fileSet>
-
-        <!-- ********************** copy database scripts ********************** -->
-        <fileSet>
-            <directory>../../registry/airavata-jpa-registry/src/main/resources
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../app-catalog/app-catalog-data/src/main/resources
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <!-- ********************** copy startup scripts ********************** -->
-        <fileSet>
-            <directory>src/main/resources/bin</directory>
-            <outputDirectory>bin</outputDirectory>
-            <fileMode>777</fileMode>
-            <includes>
-                <include>*.sh</include>
-                <include>*.bat</include>
-                <include>logo.txt</include>
-                <include>startNetworkServer</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.build.directory}/conf</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>airavata-server.properties</include>
-                <include>log4j.properties</include>
-                <include>zoo.cfg</include>
-            </includes>
-        </fileSet>
-
-    </fileSets>
-
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/lib</outputDirectory>
-            <includes>
-                <include>org.apache.airavata:*:jar</include>
-                <include>org.apache.derby:derby:jar</include>
-                <include>org.apache.derby:derbytools:jar</include>
-                <include>org.apache.derby:derbynet:jar</include>
-                <include>org.apache.derby:derbyclient:jar</include>
-            </includes>
-        </dependencySet>
-    </dependencySets>
-
-</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/assembly/api-server-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/assembly/api-server-assembly.xml b/modules/distribution/new-dist/src/main/assembly/api-server-assembly.xml
deleted file mode 100644
index 9776919..0000000
--- a/modules/distribution/new-dist/src/main/assembly/api-server-assembly.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--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. -->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-
-	<id>bin</id>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<baseDirectory>${archive.name}-${version}</baseDirectory>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-
-	<componentDescriptors>
-		<componentDescriptor>airavata-common-component.xml</componentDescriptor>
-	</componentDescriptors>
-
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-			<includes>
-				<include>org.apache.airavata:*:jar</include>
-			</includes>
-		</dependencySet>
-
-	</dependencySets>
-
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/assembly/api-server-component.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/assembly/api-server-component.xml b/modules/distribution/new-dist/src/main/assembly/api-server-component.xml
deleted file mode 100644
index 148022f..0000000
--- a/modules/distribution/new-dist/src/main/assembly/api-server-component.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
-
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/lib</outputDirectory>
-            <includes>
-                <include>org.apache.airavata:*:jar</include>
-                <include>org.apache.derby:derby:jar</include>
-                <include>org.apache.derby:derbytools:jar</include>
-                <include>org.apache.derby:derbynet:jar</include>
-                <include>org.apache.derby:derbyclient:jar</include>
-            </includes>
-        </dependencySet>
-    </dependencySets>
-
-</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/assembly/src-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/assembly/src-assembly.xml b/modules/distribution/new-dist/src/main/assembly/src-assembly.xml
deleted file mode 100644
index eae89bf..0000000
--- a/modules/distribution/new-dist/src/main/assembly/src-assembly.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--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.
-  -->
-
-<assembly>
-    <id>src</id>
-    <includeBaseDirectory>true</includeBaseDirectory> 
-    <baseDirectory>${archive.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>  
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>NOTICE</include>
-                <include>LICENSE</include>
-                <include>README</include>
-                <include>RELEASE_NOTES</include>
-		<include>DISCLAIMER</include>
-		<include>INSTALL</include>
-            </includes>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>../..</directory>
-            <outputDirectory></outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <includes>
-                <include>pom.xml</include>
-                <include>modules/**</include>
-                <include>samples/**</include>
-            </includes>
-
-            <excludes>
-                                <!-- Exclusions from org.apache.resources:apache-source-release-assembly-descriptor.
-                     Note that they assume that all sources are located under an "src" directory. This
-                     is not the case for Axis2, which doesn't use the standard Maven 2 conventions.
-                     Thus we may still encounter some issues here. -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-            </excludes>
-
-        </fileSet>
-          </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/new-dist/src/main/resources/INSTALL
----------------------------------------------------------------------
diff --git a/modules/distribution/new-dist/src/main/resources/INSTALL b/modules/distribution/new-dist/src/main/resources/INSTALL
deleted file mode 100644
index 53d0550..0000000
--- a/modules/distribution/new-dist/src/main/resources/INSTALL
+++ /dev/null
@@ -1,30 +0,0 @@
-Installing  Apache Airavata 0.14
--------------------------------
-
-Prerequisites
--------------
-Java 1.5 or later
-Maven (tested on v 3.0.2)
-
-Build Apache Airavata from Source
----------------------------------
-* Unzip/untar the source file or clone from git.
-* cd to project folder and type
-	$ mvn clean install
-	Note: in order to skip tests use the command
-			$ mvn clean install -Dmaven.test.skip=true
-* Alternatively, all  compressed binary distributions can be found at <PROJECT DIR>/modules/distribution/release/target/release-artifacts
-
-Running Tests
--------------
-* Unit tests & integrations tests will run while Apache Airavata is built from source (without "-Dmaven.test.skip=true").
-* To run the test samples
-    - You can find the binary distributions at <PROJECT DIR>/modules/distribution/release/target/release-artifacts or from
-      the Apache Airavata download site.
-    - Extract the binary distributions and once the binary is unzipped, instructions to run the tests should be followed
-      from README files found within.
-
-Tutorials
-----------
-The airavata website has instructions for basic tutorials:
-* Describing and executing applications using Airavata - follow "XBAYA Quick-Start Tutorial" tutorial at https://cwiki.apache.org/confluence/display/AIRAVATA/XBAYA+Quick-Start+Tutorial
\ No newline at end of file


[46/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
new file mode 100644
index 0000000..5ec1ef8
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  afterOKList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.AfterOKList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML afterOKList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface AfterOKList extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterOKList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("afteroklistc764type");
+    
+    /**
+     * Gets array of all "afterOKList" elements
+     */
+    java.lang.String[] getAfterOKListArray();
+    
+    /**
+     * Gets ith "afterOKList" element
+     */
+    java.lang.String getAfterOKListArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "afterOKList" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetAfterOKListArray();
+    
+    /**
+     * Gets (as xml) ith "afterOKList" element
+     */
+    org.apache.xmlbeans.XmlString xgetAfterOKListArray(int i);
+    
+    /**
+     * Returns number of "afterOKList" element
+     */
+    int sizeOfAfterOKListArray();
+    
+    /**
+     * Sets array of all "afterOKList" element
+     */
+    void setAfterOKListArray(java.lang.String[] afterOKListArray);
+    
+    /**
+     * Sets ith "afterOKList" element
+     */
+    void setAfterOKListArray(int i, java.lang.String afterOKList);
+    
+    /**
+     * Sets (as xml) array of all "afterOKList" element
+     */
+    void xsetAfterOKListArray(org.apache.xmlbeans.XmlString[] afterOKListArray);
+    
+    /**
+     * Sets (as xml) ith "afterOKList" element
+     */
+    void xsetAfterOKListArray(int i, org.apache.xmlbeans.XmlString afterOKList);
+    
+    /**
+     * Inserts the value as the ith "afterOKList" element
+     */
+    void insertAfterOKList(int i, java.lang.String afterOKList);
+    
+    /**
+     * Appends the value as the last "afterOKList" element
+     */
+    void addAfterOKList(java.lang.String afterOKList);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "afterOKList" element
+     */
+    org.apache.xmlbeans.XmlString insertNewAfterOKList(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "afterOKList" element
+     */
+    org.apache.xmlbeans.XmlString addNewAfterOKList();
+    
+    /**
+     * Removes the ith "afterOKList" element
+     */
+    void removeAfterOKList(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.AfterOKList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.AfterOKList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
new file mode 100644
index 0000000..5ddb3b2
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
@@ -0,0 +1,183 @@
+/*
+ * XML Type:  exportProperties
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.ExportProperties
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML exportProperties(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface ExportProperties extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ExportProperties.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("exportproperties2741type");
+    
+    /**
+     * Gets array of all "name" elements
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[] getNameArray();
+    
+    /**
+     * Gets ith "name" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name getNameArray(int i);
+    
+    /**
+     * Returns number of "name" element
+     */
+    int sizeOfNameArray();
+    
+    /**
+     * Sets array of all "name" element
+     */
+    void setNameArray(org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name[] nameArray);
+    
+    /**
+     * Sets ith "name" element
+     */
+    void setNameArray(int i, org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name name);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "name" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name insertNewName(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "name" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name addNewName();
+    
+    /**
+     * Removes the ith "name" element
+     */
+    void removeName(int i);
+    
+    /**
+     * An XML name(@http://airavata.apache.org/gfac/core/2012/12).
+     *
+     * This is an atomic type that is a restriction of org.apache.airavata.gfac.core.x2012.x12.ExportProperties$Name.
+     */
+    public interface Name extends org.apache.xmlbeans.XmlString
+    {
+        public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+            org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Name.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("namee668elemtype");
+        
+        /**
+         * Gets the "value" attribute
+         */
+        java.lang.String getValue();
+        
+        /**
+         * Gets (as xml) the "value" attribute
+         */
+        org.apache.xmlbeans.XmlString xgetValue();
+        
+        /**
+         * Sets the "value" attribute
+         */
+        void setValue(java.lang.String value);
+        
+        /**
+         * Sets (as xml) the "value" attribute
+         */
+        void xsetValue(org.apache.xmlbeans.XmlString value);
+        
+        /**
+         * A factory class with static methods for creating instances
+         * of this type.
+         */
+        
+        public static final class Factory
+        {
+            public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name newInstance() {
+              return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+            
+            public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name newInstance(org.apache.xmlbeans.XmlOptions options) {
+              return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties.Name) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+            
+            private Factory() { } // No instance of this class allowed
+        }
+    }
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.ExportProperties parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ExportProperties) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
new file mode 100644
index 0000000..67bd345
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  inputList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.InputList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML inputList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface InputList extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(InputList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("inputlistccd2type");
+    
+    /**
+     * Gets array of all "input" elements
+     */
+    java.lang.String[] getInputArray();
+    
+    /**
+     * Gets ith "input" element
+     */
+    java.lang.String getInputArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "input" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetInputArray();
+    
+    /**
+     * Gets (as xml) ith "input" element
+     */
+    org.apache.xmlbeans.XmlString xgetInputArray(int i);
+    
+    /**
+     * Returns number of "input" element
+     */
+    int sizeOfInputArray();
+    
+    /**
+     * Sets array of all "input" element
+     */
+    void setInputArray(java.lang.String[] inputArray);
+    
+    /**
+     * Sets ith "input" element
+     */
+    void setInputArray(int i, java.lang.String input);
+    
+    /**
+     * Sets (as xml) array of all "input" element
+     */
+    void xsetInputArray(org.apache.xmlbeans.XmlString[] inputArray);
+    
+    /**
+     * Sets (as xml) ith "input" element
+     */
+    void xsetInputArray(int i, org.apache.xmlbeans.XmlString input);
+    
+    /**
+     * Inserts the value as the ith "input" element
+     */
+    void insertInput(int i, java.lang.String input);
+    
+    /**
+     * Appends the value as the last "input" element
+     */
+    void addInput(java.lang.String input);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "input" element
+     */
+    org.apache.xmlbeans.XmlString insertNewInput(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "input" element
+     */
+    org.apache.xmlbeans.XmlString addNewInput();
+    
+    /**
+     * Removes the ith "input" element
+     */
+    void removeInput(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.InputList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.InputList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
new file mode 100644
index 0000000..af3f612
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
@@ -0,0 +1,112 @@
+/*
+ * An XML document type.
+ * Localname: JobDescriptor
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * A document containing one JobDescriptor(@http://airavata.apache.org/gfac/core/2012/12) element.
+ *
+ * This is a complex type.
+ */
+public interface JobDescriptorDocument extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(JobDescriptorDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("jobdescriptor217edoctype");
+    
+    /**
+     * Gets the "JobDescriptor" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PbsParams getJobDescriptor();
+    
+    /**
+     * Sets the "JobDescriptor" element
+     */
+    void setJobDescriptor(org.apache.airavata.gfac.core.x2012.x12.PbsParams jobDescriptor);
+    
+    /**
+     * Appends and returns a new empty "JobDescriptor" element
+     */
+    org.apache.airavata.gfac.core.x2012.x12.PbsParams addNewJobDescriptor();
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
new file mode 100644
index 0000000..b04281a
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type:  moduleLoadCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML moduleLoadCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface ModuleLoadCommands extends org.apache.xmlbeans.XmlObject
+{
+    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+        org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ModuleLoadCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("moduleloadcommandsfe4etype");
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    java.lang.String[] getCommandArray();
+    
+    /**
+     * Gets ith "command" element
+     */
+    java.lang.String getCommandArray(int i);
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    org.apache.xmlbeans.XmlString[] xgetCommandArray();
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    org.apache.xmlbeans.XmlString xgetCommandArray(int i);
+    
+    /**
+     * Returns number of "command" element
+     */
+    int sizeOfCommandArray();
+    
+    /**
+     * Sets array of all "command" element
+     */
+    void setCommandArray(java.lang.String[] commandArray);
+    
+    /**
+     * Sets ith "command" element
+     */
+    void setCommandArray(int i, java.lang.String command);
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    void xsetCommandArray(org.apache.xmlbeans.XmlString[] commandArray);
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command);
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    void insertCommand(int i, java.lang.String command);
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    void addCommand(java.lang.String command);
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    org.apache.xmlbeans.XmlString insertNewCommand(int i);
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    org.apache.xmlbeans.XmlString addNewCommand();
+    
+    /**
+     * Removes the ith "command" element
+     */
+    void removeCommand(int i);
+    
+    /**
+     * A factory class with static methods for creating instances
+     * of this type.
+     */
+    
+    public static final class Factory
+    {
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands newInstance() {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands newInstance(org.apache.xmlbeans.XmlOptions options) {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+        
+        /** @param xmlAsString the string value to parse */
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+        
+        /** @param file the file from which to load an xml document */
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+        
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return (org.apache.airavata.gfac.core.x2012.x12.ModuleLoadCommands) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+        
+        /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+        public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+          return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+        
+        private Factory() { } // No instance of this class allowed
+    }
+}


[17/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/StorageShareCapacity.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/StorageShareCapacity.json b/modules/gfac/gfac-impl/src/main/resources/schema/StorageShareCapacity.json
new file mode 100644
index 0000000..f392c94
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/StorageShareCapacity.json
@@ -0,0 +1,33 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "Type": {
+      "type": "string",
+      "description": "The type of storage capacity - StorageCapacity_t"
+    },
+    "TotalSize": {
+      "type": "integer",
+      "description": "The total amount of storage (GB)"
+    },
+    "FreeSize": {
+      "type": "integer",
+      "description": "The amount of available storage (GB)"
+    },
+    "UsedSize": {
+      "type": "integer",
+      "description": "The amount of used storage (GB)"
+    },
+    "ReservedSize": {
+      "type": "integer",
+      "description": "The amount storage which is not occupied, but has been reserved for use (GB)"
+    },
+    "StorageShareID": {
+      "type": "string",
+      "description": "The ID of the StorageShare related to this capacity"
+    }
+  },
+  "required": ["Type","StorageShareID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ToComputingService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ToComputingService.json b/modules/gfac/gfac-impl/src/main/resources/schema/ToComputingService.json
new file mode 100644
index 0000000..6d81b80
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ToComputingService.json
@@ -0,0 +1,32 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "NetworkInfo": {
+      "type": "string",
+      "description": "Type of network connections between the Storage and Computing services (NetworkInfo_t)"
+    },
+    "Bandwidth": {
+      "type": "integer",
+      "description": "The normal bandwidth available between the Storage and Computing services (Mb/s)"
+    },
+    "StorageAccessProtocolID": {
+      "type": "array",
+      "description": "IDs of the protocols that can be used to access the StorageService",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ComputingServiceID": {
+      "type": "string",
+      "description": "The ID of the ComputingService"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService"
+    }
+  },
+  "required": ["ComputingServiceID","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/ToStorageService.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/ToStorageService.json b/modules/gfac/gfac-impl/src/main/resources/schema/ToStorageService.json
new file mode 100644
index 0000000..644f3d1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/ToStorageService.json
@@ -0,0 +1,25 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
+  "properties": {
+    "LocalPath": {
+      "type": "string",
+      "description": "The path within the ComputingService that is used to access the StorageService"
+    },
+    "RemotePath": {
+      "type": "string",
+      "description": "The path in the StorageService which is associated with the LocalPath"
+    },
+    "ComputingServiceID": {
+      "type": "string",
+      "description": "The ID of the ComputingService"
+    },
+    "StorageServiceID": {
+      "type": "string",
+      "description": "The ID of the StorageService"
+    }
+  },
+  "required": ["LocalPath","RemotePath","ComputingServiceID","StorageServiceID"]
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schema/UserDomain.json
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schema/UserDomain.json b/modules/gfac/gfac-impl/src/main/resources/schema/UserDomain.json
new file mode 100644
index 0000000..7acda31
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schema/UserDomain.json
@@ -0,0 +1,58 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json",
+  "type": "object",
+  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
+  "properties": {
+    "Level": {
+      "type": "integer",
+      "description": "the number of hops to reach the root of the hierarchy of UserDomains"
+    },
+    "UserManagerID": {
+      "type": "array",
+      "description": "ID for the Endpoint of a Service managing users in this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "Member": {
+      "type": "array",
+      "description": "Identifiers for users in this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "PolicyID": {
+      "type": "array",
+      "description": "IDs for Policies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ChildDomainID": {
+      "type": "array",
+      "description": "IDs of UserDomains aggregated by this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "ParentDomainID": {
+      "type": "string",
+      "description": "The ID of the UserDomain that this UserDomain participates in"
+    },
+    "AccessPolicyID": {
+      "type": "array",
+      "description": "IDs of AccessPolicies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    },
+    "MappingPolicyID": {
+      "type": "array",
+      "description": "IDs of MappingPolicies associated with this UserDomain",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schemas/PBSJobDescriptor.xsd
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schemas/PBSJobDescriptor.xsd b/modules/gfac/gfac-impl/src/main/resources/schemas/PBSJobDescriptor.xsd
new file mode 100644
index 0000000..d5c5992
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schemas/PBSJobDescriptor.xsd
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--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. -->
+
+<schema targetNamespace="http://airavata.apache.org/gsi/ssh/2012/12" xmlns:gsissh="http://airavata.apache.org/gsi/ssh/2012/12"
+	xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+	<element name="JobDescriptor" type="gsissh:pbsParams" />
+
+	<complexType name="pbsParams">
+		<sequence>
+            <element name="jobID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="userName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+			<element name="shellName" type="xsd:string" minOccurs="0" maxOccurs="1" default="/bin/bash"/>
+            <element name="queueName" type="xsd:string" minOccurs="0" maxOccurs="1" default="normal"/>
+            <element name="jobName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="allEnvExport" type="xsd:boolean" minOccurs="0 " maxOccurs="1" default="true"/>
+			<element name="mailOptions" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="mailAddress" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="partition" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="mailType" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="acountString" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="maxWallTime" type="xsd:string" minOccurs="0" maxOccurs="1" default="1:00:00"/>
+            <element name="standardOutFile" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="standardErrorFile" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="outputDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="inputDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="nodes" type="xsd:int" minOccurs="0" maxOccurs="1" default="1"/>
+            <element name="processesPerNode" type="xsd:int" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="cpuCount" type="xsd:int" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="nodeList" type="xsd:string" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="workingDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="executablePath" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="inputs" type="gsissh:inputList" minOccurs="1" maxOccurs="1"/>
+            <element name="exports" type="gsissh:exportProperties" minOccurs="1" maxOccurs="1"/>
+            <element name="status" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="afterAny" type="gsissh:afterAnyList" minOccurs="0" maxOccurs="1"/>
+            <element name="afterOKList" type="gsissh:afterOKList" minOccurs="0" maxOccurs="1"/>
+            <element name="cTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="qTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="mTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="sTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="compTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="owner" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="executeNode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="ellapsedTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="usedCPUTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="usedMem" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="submitArgs" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="variableList" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="preJobCommands" type="gsissh:preJobCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="moduleLoadCommands" type="gsissh:moduleLoadCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="postJobCommands" type="gsissh:postJobCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="jobSubmitterCommand" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="callBackIp" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="callBackPort" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="chassisName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+        </sequence>
+	</complexType>
+
+    <complexType name="moduleLoadCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="preJobCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="postJobCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="inputList">
+        <sequence>
+			<element name="input" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="afterAnyList">
+        <sequence>
+			<element name="afterAny" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="afterOKList">
+        <sequence>
+			<element name="afterOKList" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="exportProperties">
+		<sequence>
+
+			<element name="name" minOccurs="1" maxOccurs="unbounded">
+				<complexType>
+					<simpleContent>
+						<extension base="xsd:string">
+							<attribute name="value" type="xsd:string" use="required" />
+						</extension>
+					</simpleContent>
+				</complexType>
+			</element>
+
+		</sequence>
+	</complexType>
+</schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/schemas/gsissh-schemas.xsdconfig
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/schemas/gsissh-schemas.xsdconfig b/modules/gfac/gfac-impl/src/main/resources/schemas/gsissh-schemas.xsdconfig
new file mode 100644
index 0000000..a46cadc
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/schemas/gsissh-schemas.xsdconfig
@@ -0,0 +1,14 @@
+<!--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. -->
+
+<xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
+
+    <xb:namespace uri="http://airavata.apache.org/schemas/gsi/ssh/2012/12">
+        <xb:package>org.apache.airavata.gfac.ssh</xb:package>
+    </xb:namespace>
+</xb:config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/service.properties b/modules/gfac/gfac-impl/src/main/resources/service.properties
new file mode 100644
index 0000000..391bfea
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/resources/service.properties
@@ -0,0 +1,58 @@
+#
+#
+# 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.
+#
+#
+
+
+#
+# Class which implemented Scheduler interface. It will be used to determine a Provider
+#
+scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
+
+#
+# Data Service Plugins classes
+#
+datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
+
+#
+# Pre execution Plugins classes. For example, GridFTP Input Staging
+#
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
+
+#
+# Post execution Plugins classes. For example, GridFTP Output Staging
+#
+postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
+postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
+
+#
+# SSH private key location. It will be used by SSHProvider
+#
+# ssh.key=/home/user/.ssh/id_rsa
+# ssh.keypass=
+# ssh.username=usernameAtHost
+
+#
+# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
+#
+# myproxy.server=myproxy.teragrid.org
+# myproxy.user=username
+# myproxy.pass=password
+# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
new file mode 100644
index 0000000..73a6e4a
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -0,0 +1,252 @@
+///*
+// *
+// * 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.core.gfac.services.impl;
+//
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.SecurityContext;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.impl.BetterGfacImpl;
+//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+//import org.apache.airavata.gfac.ssh.api.Cluster;
+//import org.apache.airavata.gfac.ssh.api.SSHApiException;
+//import org.apache.airavata.gfac.ssh.api.ServerInfo;
+//import AuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+//import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+//import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyFileAuthentication;
+//import org.apache.airavata.gfac.ssh.util.CommonUtils;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+//import org.apache.airavata.schemas.gfac.*;
+//import org.testng.annotations.BeforeClass;
+//import org.testng.annotations.Test;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//public class BigRed2TestWithSSHAuth {
+//    private JobExecutionContext jobExecutionContext;
+//
+//    private String userName;
+//    private String password;
+//    private String passPhrase;
+//    private String hostName;
+//    private String workingDirectory;
+//    private String privateKeyPath;
+//    private String publicKeyPath;
+//
+//    @BeforeClass
+//    public void setUp() throws Exception {
+//
+//        System.out.println("Test case name " + this.getClass().getName());
+////        System.setProperty("ssh.host","bigred2.uits.iu.edu");        //default ssh host
+////        System.setProperty("ssh.user", "lginnali");
+////        System.setProperty("ssh.private.key.path", "/Users/lahirugunathilake/.ssh/id_dsa");
+////        System.setProperty("ssh.public.key.path", "/Users/lahirugunathilake/.ssh/id_dsa.pub");
+////        System.setProperty("ssh.working.directory", "/tmp");
+//
+//        this.hostName = "bigred2.uits.iu.edu";
+//        this.hostName = System.getProperty("ssh.host");
+//        this.userName = System.getProperty("ssh.username");
+//        this.password = System.getProperty("ssh.password");
+//        this.privateKeyPath = System.getProperty("private.ssh.key");
+//        this.publicKeyPath = System.getProperty("public.ssh.key");
+//        this.passPhrase = System.getProperty("ssh.keypass");
+//        this.workingDirectory = System.getProperty("ssh.working.directory");
+//
+//
+//         if (this.userName == null
+//                || (this.password==null && (this.publicKeyPath == null || this.privateKeyPath == null)) || this.workingDirectory == null) {
+//            System.out.println("########### In order to test you have to either username password or private,public keys");
+//            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
+//                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
+//        }
+//        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        assert resource != null;
+//        System.out.println(resource.getFile());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+//
+////        gFacConfiguration.setMyProxyLifeCycle(3600);
+////        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
+////        gFacConfiguration.setMyProxyUser("*****");
+////        gFacConfiguration.setMyProxyPassphrase("*****");
+////        gFacConfiguration.setTrustedCertLocation("./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"}));
+//
+//        /*
+//        * Host
+//        */
+//        HostDescription host = new HostDescription(SSHHostType.type);
+//        host.getType().setHostAddress(hostName);
+//        host.getType().setHostName(hostName);
+//        ((SSHHostType)host.getType()).setHpcResource(true);
+//        /*
+//        * App
+//        */
+//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//
+//        app.setCpuCount(1);
+//        app.setJobType(JobTypeType.SERIAL);
+//        app.setNodeCount(1);
+//        app.setProcessorsPerNode(1);
+//
+//        /*
+//        * Use bat file if it is compiled on Windows
+//        */
+//        app.setExecutableLocation("/bin/echo");
+//
+//        /*
+//        * Default tmp location
+//        */
+//        String tempDir = "/tmp";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = tempDir + File.separator
+//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+//
+//        System.out.println(tempDir);
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+//        app.setMaxWallTime(5);
+//        app.setJobSubmitterCommand("aprun -n 1");
+//        app.setInstalledParentPath("/opt/torque/torque-4.2.3.1/bin/");
+//
+//        /*
+//        * Service
+//        */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//
+//                .size()]);
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        // Adding security context
+//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        applicationContext.setServiceDescription(serv);
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//        applicationContext.setHostDescription(host);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//
+//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+//         try {
+//
+//        AuthenticationInfo authenticationInfo = null;
+//        if (password != null) {
+//            authenticationInfo = new DefaultPasswordAuthenticationInfo(this.password);
+//        } else {
+//            authenticationInfo = new DefaultPublicKeyFileAuthentication(this.publicKeyPath, this.privateKeyPath,
+//                    this.passPhrase);
+//        }
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
+//
+//        Cluster pbsCluster = null;
+//        SSHSecurityContext sshSecurityContext = null;
+//
+//            JobManagerConfiguration pbsJobManager = CommonUtils.getPBSJobManager(app.getInstalledParentPath());
+//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, pbsJobManager);
+//
+//
+//            sshSecurityContext = new SSHSecurityContext();
+//            sshSecurityContext.setPbsCluster(pbsCluster);
+//            sshSecurityContext.setUsername(userName);
+//            sshSecurityContext.setKeyPass(passPhrase);
+//            sshSecurityContext.setPrivateKeyLoc(privateKeyPath);
+//             return sshSecurityContext;
+//        } catch (SSHApiException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        return null;
+//    }
+//
+//    @Test
+//    public void testSSHProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
+//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
new file mode 100644
index 0000000..28b1047
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/CredentialStoreTest.java
@@ -0,0 +1,135 @@
+///*
+// *
+// * 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.core.gfac.services.impl;
+//
+//import junit.framework.Assert;
+//import org.apache.airavata.client.AiravataAPIFactory;
+//import org.apache.airavata.client.api.AiravataAPI;
+//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+//import org.apache.airavata.common.exception.AiravataConfigurationException;
+//import org.apache.airavata.common.exception.ApplicationSettingsException;
+//import org.apache.airavata.common.utils.ClientSettings;
+//import org.apache.airavata.common.utils.DBUtil;
+//import org.apache.airavata.common.utils.ServerSettings;
+//import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+//import org.apache.airavata.credential.store.store.CredentialReader;
+//import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.RequestData;
+//import org.apache.airavata.gfac.ssh.security.TokenizedSSHAuthInfo;
+//import org.apache.airavata.gfac.ssh.api.SSHApiException;
+//import org.apache.airavata.gfac.ssh.api.ServerInfo;
+//import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+//import org.apache.airavata.gfac.ssh.util.CommonUtils;
+//import org.apache.airavata.registry.api.AiravataRegistry2;
+//import org.apache.airavata.registry.api.AiravataRegistryFactory;
+//import org.apache.airavata.registry.api.AiravataUser;
+//import org.apache.airavata.registry.api.Gateway;
+//import org.apache.airavata.registry.api.exception.RegAccessorInstantiateException;
+//import org.apache.airavata.registry.api.exception.RegAccessorInvalidException;
+//import org.apache.airavata.registry.api.exception.RegAccessorUndefinedException;
+//import org.apache.airavata.registry.api.exception.RegException;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.testng.annotations.BeforeTest;
+//import org.testng.annotations.Test;
+//
+//import java.util.UUID;
+//
+//public class CredentialStoreTest {
+//    private final static Logger logger = LoggerFactory.getLogger(CredentialStoreTest.class);
+//
+//    @BeforeTest
+//    public void testGSISSHProvider() throws GFacException, IllegalAccessException, ClassNotFoundException, InstantiationException, ApplicationSettingsException, SSHApiException {
+//        System.setProperty("credential.store.keystore.url", "/Users/lahirugunathilake/Downloads/airavata_sym.jks");
+//        System.setProperty("credential.store.keystore.alias", "airavata");
+//        System.setProperty("credential.store.keystore.password", "airavata");
+//        System.setProperty("myproxy.username", "ogce");
+//        System.setProperty("myproxy.password", "");
+//        System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+//        System.setProperty("credential.store.jdbc.url","jdbc:mysql://gw85.iu.xsede.org:3306/airavata_gta_prod");
+//        System.setProperty("credential.store.jdbc.user","gtaAiravataUser");
+//        System.setProperty("credential.store.jdbc.password","gtaAiravataPWD");
+//        System.setProperty("credential.store.jdbc.driver","com.mysql.jdbc.Driver");
+//
+//
+//
+//            UUID uuid = UUID.randomUUID();
+//            System.out.println("TokenId: " + uuid.toString());
+////            String publicKey = registry.createCredential("default",uuid.toString(),"lginnali" );
+////            System.out.println("Public-Key: " +publicKey);
+////            String tokenId = uuid.toString();
+//            String tokenId = "2c308fa9-99f8-4baa-92e4-d062e311483c";
+//            CredentialReader credentialReader = new CredentialReaderImpl(new DBUtil("jdbc:mysql://gw85.iu.xsede.org:3306/airavata_gta_prod",
+//                    "ptaAiravataUser", "ptaAiravataPWD", "com.mysql.jdbc.Driver"));
+//
+//
+//            RequestData requestData = new RequestData();
+//            requestData.setMyProxyUserName("cgateway");
+//            requestData.setTokenId(tokenId);
+//            requestData.setGatewayId("default");
+//            TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(credentialReader, requestData);
+//
+//            SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();
+//            ServerInfo serverInfo = new ServerInfo("cgateway", "bigred2.uits.iu.edu");
+//
+//            PBSCluster pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
+//            Assert.assertNotNull(pbsCluster);
+//            return;
+//
+//    }
+//
+//    @Test
+//    public static void main(String[] args) {
+//        try {
+//            new CredentialStoreTest().testGSISSHProvider();
+//        } catch (GFacException e) {
+//            e.printStackTrace();
+//        } catch (IllegalAccessException e) {
+//            e.printStackTrace();
+//        } catch (ClassNotFoundException e) {
+//            e.printStackTrace();
+//        } catch (InstantiationException e) {
+//            e.printStackTrace();
+//        } catch (ApplicationSettingsException e) {
+//            e.printStackTrace();
+//        } catch (SSHApiException e) {
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
+//        AiravataAPI airavataAPI;
+//        try {
+//            String sysUser = ClientSettings.getSetting("admin");
+//            String gateway = ClientSettings.getSetting("default");
+//            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
+//        } catch (AiravataAPIInvocationException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new AiravataAPIInvocationException(e);
+//        } catch (ApplicationSettingsException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new ApplicationSettingsException(e.getMessage());
+//        }
+//        return airavataAPI;
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
new file mode 100644
index 0000000..9e03173
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -0,0 +1,229 @@
+///*
+// *
+// * 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.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//import org.apache.aiaravata.application.catalog.data.model.ApplicationInterface;
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.SecurityContext;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.impl.BetterGfacImpl;
+//import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+//import org.apache.airavata.gfac.ssh.api.Cluster;
+//import org.apache.airavata.gfac.ssh.api.SSHApiException;
+//import org.apache.airavata.gfac.ssh.api.ServerInfo;
+//import GSIAuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+//import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+//import org.apache.airavata.gfac.ssh.util.CommonUtils;
+//import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
+//import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
+//import org.apache.airavata.schemas.gfac.InputParameterType;
+//import org.apache.airavata.schemas.gfac.JobTypeType;
+//import org.apache.airavata.schemas.gfac.OutputParameterType;
+//import org.apache.airavata.schemas.gfac.ProjectAccountType;
+//import org.apache.airavata.schemas.gfac.QueueType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.testng.annotations.BeforeClass;
+//import org.testng.annotations.Test;
+//
+//public class GSISSHProviderTestWithMyProxyAuth {
+//    private JobExecutionContext jobExecutionContext;
+//
+//    //FIXME: move job properties to configuration file
+//    private static final String hostAddress = "trestles.sdsc.edu";
+//    private static final String hostName = "trestles";
+//    private String myProxyUserName;
+//    private String myProxyPassword;
+//    private String workingDirectory;
+//    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
+//
+//    @BeforeClass
+//    public void setUp() throws Exception {
+////        System.setProperty("myproxy.user", "ogce");
+////        System.setProperty("myproxy.password", "");
+////        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
+////        System.setProperty("gsi.working.directory", "/home/ogce");
+////        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
+//        certificateLocation = System.getProperty("trusted.cert.location");
+//        myProxyUserName = System.getProperty("myproxy.username");
+//        myProxyPassword = System.getProperty("myproxy.password");
+//        workingDirectory = System.getProperty("gsi.working.directory");
+//
+//        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
+//            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+//                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+//            throw new Exception("Need my proxy user name password to run tests.");
+//        }
+//        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        assert resource != null;
+//        System.out.println(resource.getFile());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
+//
+//        /*
+//        * Host
+//        */
+//        HostDescription host = new HostDescription(GsisshHostType.type);
+//        host.getType().setHostAddress(hostAddress);
+//        host.getType().setHostName(hostName);
+//
+//        /*
+//        * App
+//        */
+//        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+//        projectAccountType.setProjectAccountNumber("sds128");
+//
+//        QueueType queueType = app.addNewQueue();
+//        queueType.setQueueName("normal");
+//
+//        app.setCpuCount(1);
+//        app.setJobType(JobTypeType.SERIAL);
+//        app.setNodeCount(1);
+//        app.setProcessorsPerNode(1);
+//
+//        /*
+//        * Use bat file if it is compiled on Windows
+//        */
+//        app.setExecutableLocation("/bin/echo");
+//
+//        /*
+//        * Default tmp location
+//        */
+//        String tempDir = "/home/ogce/scratch/";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = workingDirectory + File.separator
+//                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+//
+//        System.out.println(tempDir);
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+//        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+//        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+//        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+//        app.setMaxWallTime(5);
+//        app.setInstalledParentPath("/opt/torque/bin/");
+//
+//        /*
+//        * Service
+//        */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//
+//                .size()]);
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        // Adding security context
+//        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        applicationContext.setServiceDescription(serv);
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//        applicationContext.setHostDescription(host);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+//        jobExecutionContext.setTaskData(new TaskDetails("11323"));
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//    private SecurityContext getSecurityContext(HpcApplicationDeploymentType app) {
+//        GSIAuthenticationInfo authenticationInfo
+//                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
+//                7512, 17280000, certificateLocation);
+//
+//        // Server info
+//        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
+//        Cluster pbsCluster = null;
+//        try {
+//            pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager(app.getInstalledParentPath()));
+//        } catch (SSHApiException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        GSISecurityContext sshSecurityContext = new GSISecurityContext(pbsCluster);
+//        return sshSecurityContext;
+//    }
+//    @Test
+//    public void testGSISSHProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
+//        System.out.println(jobExecutionContext.getJobDetails().getJobID());
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
new file mode 100644
index 0000000..aeb8158
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@ -0,0 +1,184 @@
+///*
+// *
+// * 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.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//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.gfac.local.handler.LocalDirectorySetupHandler;
+//import org.apache.airavata.gfac.local.provider.impl.LocalProvider;
+//import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
+//import org.apache.airavata.model.workspace.experiment.Experiment;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+//import org.apache.airavata.persistance.registry.jpa.impl.LoggingRegistryImpl;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//import org.apache.airavata.schemas.gfac.InputParameterType;
+//import org.apache.airavata.schemas.gfac.OutputParameterType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.apache.commons.lang.SystemUtils;
+//import org.testng.annotations.BeforeTest;
+//import org.testng.annotations.Test;
+//
+//import com.google.common.eventbus.EventBus;
+//
+//public class LocalProviderTest {
+//    private JobExecutionContext jobExecutionContext;
+//    @BeforeTest
+//    public void setUp() throws Exception {
+//
+//        URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        File configFile = new File(resource.getPath());
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
+//        //have to set InFlwo Handlers and outFlowHandlers
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        HostDescription host = new HostDescription();
+//        host.getType().setHostName("localhost");
+//        host.getType().setHostAddress("localhost");
+//        applicationContext.setHostDescription(host);
+//        /*
+//           * App
+//           */
+//        ApplicationDescription appDesc = new ApplicationDescription();
+//        ApplicationDeploymentDescriptionType app = appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoLocal");
+//        app.setApplicationName(name);
+//
+//        /*
+//           * Use bat file if it is compiled on Windows
+//           */
+//        if (SystemUtils.IS_OS_WINDOWS) {
+//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
+//            app.setExecutableLocation(url.getFile());
+//        } else {
+//            //for unix and Mac
+//            app.setExecutableLocation("/bin/echo");
+//        }
+//
+//        /*
+//           * Default tmp location
+//           */
+//        String tempDir = System.getProperty("java.io.tmpdir");
+//        if (tempDir == null) {
+//            tempDir = "/tmp";
+//        }
+//
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "input");
+//        app.setOutputDataDirectory(tempDir + File.separator + "output");
+//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
+//        app.setStandardError(tempDir + File.separator + "echo.stderr");
+//
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//
+//        /*
+//           * Service
+//           */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("SimpleEcho");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//                .size()]);
+//
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//        /*
+//        * Host
+//        */
+//        applicationContext.setServiceDescription(serv);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+//        outMessage.addParameter("echo_output", echo_out);
+//
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//        jobExecutionContext.setExperimentID("test123");
+//        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
+//        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
+//        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
+//        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
+//
+//
+//    }
+//
+//    @Test
+//    public void testLocalDirectorySetupHandler() throws GFacException {
+//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+//        localDirectorySetupHandler.invoke(jobExecutionContext);
+//
+//        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+//        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
+//        junit.framework.Assert.assertTrue(new File(app.getStaticWorkingDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getScratchWorkingDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getInputDataDirectory()).exists());
+//        junit.framework.Assert.assertTrue(new File(app.getOutputDataDirectory()).exists());
+//    }
+//
+//    @Test
+//    public void testLocalProvider() throws GFacException,GFacProviderException {
+//        LocalDirectorySetupHandler localDirectorySetupHandler = new LocalDirectorySetupHandler();
+//        localDirectorySetupHandler.invoke(jobExecutionContext);
+//        LocalProvider localProvider = new LocalProvider();
+//        localProvider.setMonitorPublisher(new MonitorPublisher(new EventBus()));
+//        localProvider.initialize(jobExecutionContext);
+//        localProvider.execute(jobExecutionContext);
+//        localProvider.dispose(jobExecutionContext);
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
new file mode 100644
index 0000000..e16221c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -0,0 +1,172 @@
+///*
+// *
+// * 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.core.gfac.services.impl;
+//
+//import java.io.File;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.UUID;
+//
+//import org.apache.airavata.commons.gfac.type.ActualParameter;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.MappingFactory;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.impl.BetterGfacImpl;
+//import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
+//import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+//import org.apache.airavata.schemas.gfac.InputParameterType;
+//import org.apache.airavata.schemas.gfac.OutputParameterType;
+//import org.apache.airavata.schemas.gfac.SSHHostType;
+//import org.apache.airavata.schemas.gfac.StringParameterType;
+//import org.apache.commons.lang.SystemUtils;
+//import org.junit.Assert;
+//import org.junit.Before;
+//import org.junit.Test;
+//
+//public class SSHProviderTestWithSSHAuth {
+//	private JobExecutionContext jobExecutionContext;
+//    @Before
+//    public void setUp() throws Exception {
+//
+//    	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
+////        gFacConfiguration.s
+//        //have to set InFlwo Handlers and outFlowHandlers
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        HostDescription host = new HostDescription(SSHHostType.type);
+//        host.getType().setHostName("bigred");
+//        host.getType().setHostAddress("bigred2.uits.iu.edu");
+//        applicationContext.setHostDescription(host);
+//        /*
+//           * App
+//           */
+//        ApplicationDescription appDesc = new ApplicationDescription();
+//        ApplicationDeploymentDescriptionType app = appDesc.getType();
+//        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//        name.setStringValue("EchoSSH");
+//        app.setApplicationName(name);
+//
+//        /*
+//           * Use bat file if it is compiled on Windows
+//           */
+//        if (SystemUtils.IS_OS_WINDOWS) {
+//            URL url = this.getClass().getClassLoader().getResource("echo.bat");
+//            app.setExecutableLocation(url.getFile());
+//        } else {
+//            //for unix and Mac
+//            app.setExecutableLocation("/bin/echo");
+//        }
+//
+//        /*
+//         * Job location
+//        */
+//        String tempDir = "/tmp";
+//        String date = (new Date()).toString();
+//        date = date.replaceAll(" ", "_");
+//        date = date.replaceAll(":", "_");
+//
+//        tempDir = tempDir + File.separator
+//                + "EchoSSH" + "_" + date + "_" + UUID.randomUUID();
+//
+//        app.setScratchWorkingDirectory(tempDir);
+//        app.setStaticWorkingDirectory(tempDir);
+//        app.setInputDataDirectory(tempDir + File.separator + "input");
+//        app.setOutputDataDirectory(tempDir + File.separator + "output");
+//        app.setStandardOutput(tempDir + File.separator + "echo.stdout");
+//        app.setStandardError(tempDir + File.separator + "echo.stderr");
+//
+//        applicationContext.setApplicationDeploymentDescription(appDesc);
+//
+//        /*
+//           * Service
+//           */
+//        ServiceDescription serv = new ServiceDescription();
+//        serv.getType().setName("EchoSSH");
+//
+//        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+//        InputParameterType input = InputParameterType.Factory.newInstance();
+//        input.setParameterName("echo_input");
+//        input.setParameterType(StringParameterType.Factory.newInstance());
+//        inputList.add(input);
+//        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+//                .size()]);
+//
+//        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+//        OutputParameterType output = OutputParameterType.Factory.newInstance();
+//        output.setParameterName("echo_output");
+//        output.setParameterType(StringParameterType.Factory.newInstance());
+//        outputList.add(output);
+//        OutputParameterType[] outputParamList = outputList
+//                .toArray(new OutputParameterType[outputList.size()]);
+//
+//        serv.getType().setInputParametersArray(inputParamList);
+//        serv.getType().setOutputParametersArray(outputParamList);
+//
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//
+//        // Add security context
+//        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext());
+//        /*
+//        * Host
+//        */
+//        applicationContext.setServiceDescription(serv);
+//
+//        MessageContext inMessage = new MessageContext();
+//        ActualParameter echo_input = new ActualParameter();
+//		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        inMessage.addParameter("echo_input", echo_input);
+//
+//        jobExecutionContext.setInMessageContext(inMessage);
+//
+//        MessageContext outMessage = new MessageContext();
+//        ActualParameter echo_out = new ActualParameter();
+////		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
+//        outMessage.addParameter("echo_output", echo_out);
+//
+//        jobExecutionContext.setOutMessageContext(outMessage);
+//
+//    }
+//
+//	private SSHSecurityContext getSecurityContext() {
+//		SSHSecurityContext context = new SSHSecurityContext();
+//        context.setUsername("lginnali");
+//        context.setPrivateKeyLoc("~/.ssh/id_dsa");
+//        context.setKeyPass("i want to be free");
+//		return context;
+//	}
+//
+//    @Test
+//    public void testLocalProvider() throws GFacException {
+//        BetterGfacImpl gFacAPI = new BetterGfacImpl();
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
+//        Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
new file mode 100644
index 0000000..9268d84
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/security/GSISecurityContextTestWithMyProxyAuth.java
@@ -0,0 +1,163 @@
+/*
+ *
+ * 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.core.gfac.services.impl.security;
+
+import junit.framework.Assert;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.DatabaseTestCases;
+import org.apache.airavata.common.utils.DerbyUtil;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.credential.store.store.CredentialReaderFactory;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.security.TokenizedMyProxyAuthInfo;
+import org.apache.log4j.Logger;
+import org.ietf.jgss.GSSCredential;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+public class GSISecurityContextTestWithMyProxyAuth extends DatabaseTestCases {
+
+    private static String userName;
+    private static String password;
+
+    private static final Logger log = Logger.getLogger(GSISecurityContextTestWithMyProxyAuth.class);
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+
+//        System.setProperty("myproxy.username", "ogce");
+//        System.setProperty("myproxy.password", "");
+        userName = System.getProperty("myproxy.username");
+        password = System.getProperty("myproxy.password");
+        System.setProperty("myproxy.server", "myproxy.teragrid.org");
+        System.setProperty("myproxy.life", "3600");
+        System.setProperty("credential.store.keystore.url", "../configuration/server/src/main/resources/airavata.jks");
+        System.setProperty("credential.store.keystore.alias", "airavata");
+        System.setProperty("credential.store.keystore.password", "airavata");
+
+        if (userName == null || password == null || userName.trim().equals("") || password.trim().equals("")) {
+            log.error("===== Please set myproxy.username and myproxy.password system properties. =======");
+            Assert.fail("Please set myproxy.user and myproxy.password system properties.");
+        }
+
+        log.info("Using my proxy user name - " + userName);
+
+        setUpDatabase();
+
+    }
+
+    public static void setUpDatabase() throws Exception {
+        DerbyUtil.startDerbyInServerMode(getHostAddress(), getPort(), getUserName(), getPassword());
+
+        waitTillServerStarts();
+
+
+        String createTable = "CREATE TABLE CREDENTIALS\n" + "(\n"
+                + "        GATEWAY_ID VARCHAR(256) NOT NULL,\n"
+                + "        TOKEN_ID VARCHAR(256) NOT NULL,\n"
+                + // Actual token used to identify the credential
+                "        CREDENTIAL BLOB NOT NULL,\n" + "        PORTAL_USER_ID VARCHAR(256) NOT NULL,\n"
+                + "        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n"
+                + "        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)\n" + ")";
+
+        String dropTable = "drop table CREDENTIALS";
+
+        try {
+            executeSQL(dropTable);
+        } catch (Exception e) {
+        }
+
+        executeSQL(createTable);
+
+    }
+
+    @AfterClass
+    public static void shutDownDatabase() throws Exception {
+        DerbyUtil.stopDerbyServer();
+    }
+
+    private GSSCredential getGSSCredentials() throws Exception {
+
+        TokenizedMyProxyAuthInfo gsiTokenizedMyProxyAuthInfo = getGSISecurityContext();
+        return gsiTokenizedMyProxyAuthInfo.getCredentials();
+    }
+
+    private TokenizedMyProxyAuthInfo getGSISecurityContext() throws Exception {
+
+        RequestData requestData = new RequestData();
+
+        requestData.setMyProxyUserName(userName);
+        requestData.setMyProxyPassword(password);
+        requestData.setMyProxyServerUrl(ServerSettings.getMyProxyServer());
+        requestData.setMyProxyLifeTime(ServerSettings.getMyProxyLifetime());
+        CredentialReader credentialReader = CredentialReaderFactory.createCredentialStoreReader(getDbUtil());
+
+        return new TokenizedMyProxyAuthInfo(requestData);
+    }
+
+    @Test
+    public void testGetGssCredentials() throws Exception {
+
+        Assert.assertNotNull(getGSSCredentials());
+    }
+    /*
+    @Test
+    public void testRenewCredentials() throws Exception {
+        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
+        gsiSecurityContext.getGssCredentials();
+        Assert.assertNotNull(gsiSecurityContext.renewCredentials());
+
+    }
+
+    @Test
+    public void testGetCredentialsFromStore() throws Exception {
+        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
+        Assert.assertNotNull(gsiSecurityContext.getCredentialsFromStore());
+
+    } */
+
+    @Test
+    public void testGetDefaultCredentials() throws Exception {
+        TokenizedMyProxyAuthInfo gsiSecurityContext = getGSISecurityContext();
+        Assert.assertNotNull(gsiSecurityContext.getDefaultCredentials());
+
+    }
+
+    @Test
+    public void testGetProxyCredentials() throws Exception {
+        TokenizedMyProxyAuthInfo gsiSecurityContext = getGSISecurityContext();
+        Assert.assertNotNull(gsiSecurityContext.getProxyCredentials());
+
+    }
+    /*
+    @Test
+    public void testRenewCredentialsAsATrustedHost() throws Exception {
+        GSISecurityContext gsiSecurityContext = getGSISecurityContext();
+        gsiSecurityContext.getGssCredentials();
+        Assert.assertNotNull(gsiSecurityContext.renewCredentialsAsATrustedHost());
+    } */
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
new file mode 100644
index 0000000..a90dcba
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/config/ConfigReaderTest.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.ssh.config;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ConfigReaderTest {
+
+    @Test
+    public void testGetConfiguration() throws Exception {
+
+        System.out.println("Test case name " + this.getClass().getName());
+        ConfigReader configReader = new ConfigReader();
+        Assert.assertEquals(configReader.getConfiguration("StrictHostKeyChecking"), "no");
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
new file mode 100644
index 0000000..61a7437
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/gfac/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.ssh.impl;
+
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.impl.authentication.DefaultPublicKeyAuthentication;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+
+public class DefaultSSHApiTestWithMyProxyAuth {
+    private static final Logger log = LoggerFactory.getLogger(PBSCluster.class);
+
+
+
+    public void tearDown() throws Exception {
+    }
+
+
+    public static void main(String[]ars) throws IOException {
+         String myProxyUserName = "lg11w";
+
+//        DefaultPasswordAuthenticationInfo authenticationInfo
+//                = new DefaultPasswordAuthenticationInfo("");
+        byte[] privateKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa")));
+        byte[] publicKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa.pub")));
+        DefaultPublicKeyAuthentication authenticationInfo = new DefaultPublicKeyAuthentication(privateKey,publicKey,"");
+
+        // Create command
+        CommandInfo commandInfo = new RawCommandInfo("source /etc/bashrc; bsub </home/lg11w/mywork/sshEchoExperiment_9d267072-ca65-4ca8-847a-cd3d130f6050/366787899.lsf");
+
+        // Server info
+        //Stampede
+//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "stampede.tacc.utexas.edu", 2222);
+        //Trestles
+//        ServerInfo serverInfo = new ServerInfo(myProxyUserName, "trestles.sdsc.xsede.org", 22);
+        
+        //Lonestar
+         ServerInfo serverInfo = new ServerInfo(myProxyUserName, "ghpcc06.umassrc.org", 22);
+        // Output
+        CommandOutput commandOutput = new SystemCommandOutput();
+
+        // Execute command
+        try {
+            CommandExecutor.executeCommand(commandInfo, serverInfo, authenticationInfo, commandOutput, new ConfigReader());
+        } catch (SSHApiException e) {
+            log.error(e.getMessage(), e);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+
+
+}


[37/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
deleted file mode 100644
index 14fd7fe..0000000
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class gfac_cpi_serviceConstants {
-
-  public static final String GFAC_CPI_VERSION = "0.13.0";
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
deleted file mode 100644
index 6689c6b..0000000
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServer.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *
- * 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.server;
-
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.common.utils.IServer;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
-import org.apache.airavata.gfac.cpi.GfacService;
-import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TThreadPoolServer;
-import org.apache.thrift.transport.TServerSocket;
-import org.apache.thrift.transport.TServerTransport;
-import org.apache.thrift.transport.TTransportException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.InetSocketAddress;
-
-public class GfacServer implements IServer{
-
-    private final static Logger logger = LoggerFactory.getLogger(GfacServer.class);
-	private static final String SERVER_NAME = "Gfac Server";
-	private static final String SERVER_VERSION = "1.0";
-
-    private IServer.ServerStatus status;
-
-	private TServer server;
-
-	public GfacServer() {
-		setStatus(IServer.ServerStatus.STOPPED);
-	}
-
-    public void StartGfacServer(GfacService.Processor<GfacServerHandler> gfacServerHandlerProcessor)
-            throws Exception {
-        try {
-            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950"));
-            final String serverHost = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST, null);
-
-            InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
-
-			TServerTransport serverTransport = new TServerSocket(inetSocketAddress);
-
-            server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(gfacServerHandlerProcessor));
-
-            new Thread() {
-				public void run() {
-					server.serve();
-					setStatus(IServer.ServerStatus.STOPPED);
-					logger.info("Gfac Server Stopped.");
-				}
-			}.start();
-			new Thread() {
-				public void run() {
-					while(!server.isServing()){
-						try {
-							Thread.sleep(500);
-						} catch (InterruptedException e) {
-							break;
-						}
-					}
-					if (server.isServing()){
-						setStatus(IServer.ServerStatus.STARTED);
-			            logger.info("Starting Gfac Server on Port " + serverPort);
-			            logger.info("Listening to Gfac Clients ....");
-					}
-				}
-			}.start();
-        } catch (TTransportException e) {
-            logger.error(e.getMessage());
-            setStatus(IServer.ServerStatus.FAILED);
-        }
-    }
-
-    public static void main(String[] args) {
-    	try {
-			new GfacServer().start();
-		} catch (Exception e) {
-            logger.error(e.getMessage(), e);
-		}
-    }
-
-	public void start() throws Exception {
-		setStatus(IServer.ServerStatus.STARTING);
-        GfacService.Processor<GfacServerHandler> gfacService =
-                new GfacService.Processor<GfacServerHandler>(new GfacServerHandler());
-		StartGfacServer(gfacService);
-	}
-
-	public void stop() throws Exception {
-        if (server!=null && server.isServing()){
-			setStatus(IServer.ServerStatus.STOPING);
-			server.stop();
-		}
-		GFacThreadPoolExecutor.getCachedThreadPool().shutdownNow();
-
-	}
-
-	public void restart() throws Exception {
-		stop();
-		start();
-	}
-
-	public void configure() throws Exception {
-		// TODO Auto-generated method stub
-
-	}
-
-	public IServer.ServerStatus getStatus() throws Exception {
-		return status;
-	}
-
-	private void setStatus(IServer.ServerStatus stat){
-		status=stat;
-		status.updateTime();
-	}
-
-	public String getName() {
-		return SERVER_NAME;
-	}
-
-	public String getVersion() {
-		return SERVER_VERSION;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
deleted file mode 100644
index 961e46d..0000000
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- *
- * 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.server;
-
-import com.google.common.eventbus.EventBus;
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.ThriftUtils;
-import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.gfac.core.utils.InputHandlerWorker;
-import org.apache.airavata.gfac.cpi.GfacService;
-import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
-import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.MessageHandler;
-import org.apache.airavata.messaging.core.MessagingConstants;
-import org.apache.airavata.messaging.core.Publisher;
-import org.apache.airavata.messaging.core.PublisherFactory;
-import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
-import org.apache.airavata.model.messaging.event.MessageType;
-import org.apache.airavata.model.messaging.event.TaskSubmitEvent;
-import org.apache.airavata.model.messaging.event.TaskTerminateEvent;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.curator.RetryPolicy;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.retry.ExponentialBackoffRetry;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TException;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.Stat;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-
-public class GfacServerHandler implements GfacService.Iface {
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GfacServerHandler.class);
-    private static RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer;
-    private static int requestCount=0;
-    private Registry registry;
-    private AppCatalog appCatalog;
-    private String gatewayName;
-    private String airavataUserName;
-    private CuratorFramework curatorClient;
-    private MonitorPublisher publisher;
-    private String gfacServer;
-    private String gfacExperiments;
-    private String airavataServerHostPort;
-    private BlockingQueue<TaskSubmitEvent> taskSubmitEvents;
-    private static File gfacConfigFile;
-    private static List<ThreadedHandler> daemonHandlers = new ArrayList<ThreadedHandler>();
-    private static List<AbstractActivityListener> activityListeners = new ArrayList<AbstractActivityListener>();
-
-    public GfacServerHandler() throws Exception {
-        try {
-            // start curator client
-            String zkhostPort = AiravataZKUtils.getZKhostPort();
-            RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 5);
-            curatorClient = CuratorFrameworkFactory.newClient(zkhostPort, retryPolicy);
-            curatorClient.start();
-            gfacServer = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NODE, "/gfac-server");
-            gfacExperiments = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
-            airavataServerHostPort = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST)
-                    + ":" + ServerSettings.getSetting(Constants.GFAC_SERVER_PORT);
-            storeServerConfig();
-            publisher = new MonitorPublisher(new EventBus());
-            registry = RegistryFactory.getDefaultRegistry();
-            appCatalog = AppCatalogFactory.getAppCatalog();
-            setGatewayProperties();
-            startDaemonHandlers();
-            // initializing Better Gfac Instance
-            BetterGfacImpl.getInstance().init(registry, appCatalog, curatorClient, publisher);
-            if (ServerSettings.isGFacPassiveMode()) {
-                rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
-                rabbitMQTaskLaunchConsumer.listen(new TaskLaunchMessageHandler());
-            }
-            startStatusUpdators(registry, curatorClient, publisher, rabbitMQTaskLaunchConsumer);
-
-        } catch (Exception e) {
-            throw new Exception("Error initialising GFAC", e);
-        }
-    }
-
-    public static void main(String[] args) {
-        RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer = null;
-        try {
-            rabbitMQTaskLaunchConsumer = new RabbitMQTaskLaunchConsumer();
-            rabbitMQTaskLaunchConsumer.listen(new TestHandler());
-        } catch (AiravataException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-    private void storeServerConfig() throws Exception {
-        Stat stat = curatorClient.checkExists().forPath(gfacServer);
-        if (stat == null) {
-            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
-                    .forPath(gfacServer, new byte[0]);
-        }
-        String instanceId = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME);
-        String instanceNode = gfacServer + File.separator + instanceId;
-        stat = curatorClient.checkExists().forPath(instanceNode);
-        if (stat == null) {
-            curatorClient.create().withMode(CreateMode.EPHEMERAL).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(instanceNode, airavataServerHostPort.getBytes());
-            curatorClient.getChildren().watched().forPath(instanceNode);
-        }
-        stat = curatorClient.checkExists().forPath(gfacExperiments);
-        if (stat == null) {
-            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(gfacExperiments, airavataServerHostPort.getBytes());
-        }
-        stat = curatorClient.checkExists().forPath(gfacExperiments + File.separator + instanceId);
-        if (stat == null) {
-            curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE)
-                    .forPath(gfacExperiments + File.separator + instanceId, airavataServerHostPort.getBytes());
-        }
-    }
-
-    private long ByateArrayToLong(byte[] data) {
-        long value = 0;
-        for (int i = 0; i < data.length; i++)
-        {
-            value += ((long) data[i] & 0xffL) << (8 * i);
-        }
-        return value;
-    }
-
-    public String getGFACServiceVersion() throws TException {
-        return gfac_cpi_serviceConstants.GFAC_CPI_VERSION;
-    }
-
-    /**
-     * * After creating the experiment Data and Task Data in the orchestrator
-     * * Orchestrator has to invoke this operation for each Task per experiment to run
-     * * the actual Job related actions.
-     * *
-     * * @param experimentID
-     * * @param taskID
-     * * @param gatewayId:
-     * *  The GatewayId is inferred from security context and passed onto gfac.
-     * * @return sucess/failure
-     * *
-     * *
-     *
-     * @param experimentId
-     * @param taskId
-     * @param gatewayId
-     */
-    public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
-        requestCount++;
-        logger.info("-----------------------------------------------------" + requestCount + "-----------------------------------------------------");
-        logger.infoId(experimentId, "GFac Received submit job request for the Experiment: {} TaskId: {}", experimentId, taskId);
-        InputHandlerWorker inputHandlerWorker = new InputHandlerWorker(BetterGfacImpl.getInstance(), experimentId,
-                taskId, gatewayId, tokenId);
-//        try {
-//            if( gfac.submitJob(experimentId, taskId, gatewayId)){
-        logger.debugId(experimentId, "Submitted job to the Gfac Implementation, experiment {}, task {}, gateway " +
-                "{}", experimentId, taskId, gatewayId);
-
-        GFacThreadPoolExecutor.getCachedThreadPool().execute(inputHandlerWorker);
-
-        // we immediately return when we have a threadpool
-        return true;
-    }
-
-    public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws TException {
-        logger.infoId(experimentId, "GFac Received cancel job request for Experiment: {} TaskId: {} ", experimentId, taskId);
-        try {
-            if (BetterGfacImpl.getInstance().cancel(experimentId, taskId, gatewayId, tokenId)) {
-                logger.debugId(experimentId, "Successfully cancelled job, experiment {} , task {}", experimentId, taskId);
-                return true;
-            } else {
-                logger.errorId(experimentId, "Job cancellation failed, experiment {} , task {}", experimentId, taskId);
-                return false;
-            }
-        } catch (Exception e) {
-            logger.errorId(experimentId, "Error cancelling the experiment {}.", experimentId);
-            throw new TException("Error cancelling the experiment : " + e.getMessage(), e);
-        }
-    }
-
-    public Registry getRegistry() {
-        return registry;
-    }
-
-    public void setRegistry(Registry registry) {
-        this.registry = registry;
-    }
-
-    public String getGatewayName() {
-        return gatewayName;
-    }
-
-    public void setGatewayName(String gatewayName) {
-        this.gatewayName = gatewayName;
-    }
-
-    public String getAiravataUserName() {
-        return airavataUserName;
-    }
-
-    public void setAiravataUserName(String airavataUserName) {
-        this.airavataUserName = airavataUserName;
-    }
-
-    protected void setGatewayProperties() throws ApplicationSettingsException {
-        setAiravataUserName(ServerSettings.getDefaultUser());
-        setGatewayName(ServerSettings.getDefaultUserGateway());
-    }
-
-    private GFac getGfac() throws TException {
-        GFac gFac = BetterGfacImpl.getInstance();
-        gFac.init(registry, appCatalog, curatorClient, publisher);
-        return gFac;
-    }
-
-    public void startDaemonHandlers() {
-        List<GFacHandlerConfig> daemonHandlerConfig = null;
-        String className = null;
-        try {
-            URL resource = GfacServerHandler.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-            if (resource != null) {
-                gfacConfigFile = new File(resource.getPath());
-            }
-            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
-            for (GFacHandlerConfig handlerConfig : daemonHandlerConfig) {
-                className = handlerConfig.getClassName();
-                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
-                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
-                threadedHandler.initProperties(handlerConfig.getProperties());
-                daemonHandlers.add(threadedHandler);
-            }
-        } catch (ParserConfigurationException | IOException | XPathExpressionException | ClassNotFoundException |
-                InstantiationException | IllegalAccessException | GFacHandlerException | SAXException e) {
-            logger.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-        }
-        for (ThreadedHandler tHandler : daemonHandlers) {
-            (new Thread(tHandler)).start();
-        }
-    }
-
-
-    public static void startStatusUpdators(Registry registry, CuratorFramework curatorClient, MonitorPublisher publisher,
-
-                                           RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer) {
-        try {
-            String[] listenerClassList = ServerSettings.getActivityListeners();
-            Publisher rabbitMQPublisher = PublisherFactory.createActivityPublisher();
-            for (String listenerClass : listenerClassList) {
-                Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
-                AbstractActivityListener abstractActivityListener = aClass.newInstance();
-                activityListeners.add(abstractActivityListener);
-                abstractActivityListener.setup(publisher, registry, curatorClient, rabbitMQPublisher, rabbitMQTaskLaunchConsumer);
-                logger.info("Registering listener: " + listenerClass);
-                publisher.registerListener(abstractActivityListener);
-            }
-        } catch (Exception e) {
-            logger.error("Error loading the listener classes configured in airavata-server.properties", e);
-        }
-    }
-    private static  class TestHandler implements MessageHandler{
-        @Override
-        public Map<String, Object> getProperties() {
-            Map<String, Object> props = new HashMap<String, Object>();
-            ArrayList<String> keys = new ArrayList<String>();
-            keys.add(ServerSettings.getLaunchQueueName());
-            keys.add(ServerSettings.getCancelQueueName());
-            props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
-            props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
-            return props;
-        }
-
-        @Override
-        public void onMessage(MessageContext message) {
-            TaskSubmitEvent event = new TaskSubmitEvent();
-            TBase messageEvent = message.getEvent();
-            byte[] bytes = new byte[0];
-            try {
-                bytes = ThriftUtils.serializeThriftObject(messageEvent);
-                ThriftUtils.createThriftFromBytes(bytes, event);
-                System.out.println(event.getExperimentId());
-            } catch (TException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    private class TaskLaunchMessageHandler implements MessageHandler {
-        private String experimentNode;
-        private String nodeName;
-
-        public TaskLaunchMessageHandler() {
-            experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
-            nodeName = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME,"gfac-node0");
-        }
-
-        public Map<String, Object> getProperties() {
-            Map<String, Object> props = new HashMap<String, Object>();
-            ArrayList<String> keys = new ArrayList<String>();
-            keys.add(ServerSettings.getLaunchQueueName());
-            keys.add(ServerSettings.getCancelQueueName());
-            props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
-            props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
-            return props;
-        }
-
-        public void onMessage(MessageContext message) {
-            System.out.println(" Message Received with message id '" + message.getMessageId()
-                    + "' and with message type '" + message.getType());
-            if (message.getType().equals(MessageType.LAUNCHTASK)) {
-                try {
-                    TaskSubmitEvent event = new TaskSubmitEvent();
-                    TBase messageEvent = message.getEvent();
-                    byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
-                    ThriftUtils.createThriftFromBytes(bytes, event);
-                    // update experiment status to executing
-                    ExperimentStatus status = new ExperimentStatus();
-                    status.setExperimentState(ExperimentState.EXECUTING);
-                    status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-                    registry.update(RegistryModelType.EXPERIMENT_STATUS, status, event.getExperimentId());
-                    experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
-                    try {
-                        GFacUtils.createExperimentEntryForPassive(event.getExperimentId(), event.getTaskId(), curatorClient,
-                                experimentNode, nodeName, event.getTokenId(), message.getDeliveryTag());
-                        AiravataZKUtils.getExpStatePath(event.getExperimentId());
-                        submitJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
-                    } catch (Exception e) {
-                        logger.error(e.getMessage(), e);
-                        rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
-                    }
-                } catch (TException e) {
-                    logger.error(e.getMessage(), e); //nobody is listening so nothing to throw
-                } catch (RegistryException e) {
-                    logger.error("Error while updating experiment status", e);
-                }
-            } else if (message.getType().equals(MessageType.TERMINATETASK)) {
-                boolean cancelSuccess = false;
-                TaskTerminateEvent event = new TaskTerminateEvent();
-                TBase messageEvent = message.getEvent();
-                try {
-                    byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
-                    ThriftUtils.createThriftFromBytes(bytes, event);
-                    boolean saveDeliveryTagSuccess = GFacUtils.setExperimentCancel(event.getExperimentId(), curatorClient, message.getDeliveryTag());
-                    if (saveDeliveryTagSuccess) {
-                        cancelSuccess = cancelJob(event.getExperimentId(), event.getTaskId(), event.getGatewayId(), event.getTokenId());
-                        System.out.println(" Message Received with message id '" + message.getMessageId()
-                                + "' and with message type '" + message.getType());
-                    } else {
-                        throw new GFacException("Terminate Task fail to save delivery tag : " + String.valueOf(message.getDeliveryTag()) + " \n" +
-                                "This happens when another cancel operation is being processed or experiment is in one of final states, complete|failed|cancelled.");
-                    }
-                } catch (Exception e) {
-                    logger.error(e.getMessage(), e);
-                }finally {
-                    if (cancelSuccess) {
-                        // if cancel success , AiravataExperimentStatusUpdator will send an ack to this message.
-                    } else {
-                        try {
-                            if (GFacUtils.ackCancelRequest(event.getExperimentId(), curatorClient)) {
-                                if (!rabbitMQTaskLaunchConsumer.isOpen()) {
-                                    rabbitMQTaskLaunchConsumer.reconnect();
-                                }
-                                rabbitMQTaskLaunchConsumer.sendAck(message.getDeliveryTag());
-                            }
-                        } catch (Exception e) {
-                            logger.error("Error while ack to cancel request, experimentId: " + event.getExperimentId());
-                        }
-                    }
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/main/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/resources/gsissh.properties b/modules/gfac/airavata-gfac-service/src/main/resources/gsissh.properties
deleted file mode 100644
index 3fdf76d..0000000
--- a/modules/gfac/airavata-gfac-service/src/main/resources/gsissh.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# 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.
-#
-
-###########################################################################
-# Specifies system level configurations as a key/value pairs.
-###########################################################################
-
-StrictHostKeyChecking=no
-ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
deleted file mode 100644
index 21c137f..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * 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.client;
-
-//import org.apache.airavata.client.AiravataAPIFactory;
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.client.util.Initialize;
-import org.apache.airavata.gfac.cpi.GfacService;
-import org.apache.airavata.gfac.server.GfacServer;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.zookeeper.server.ServerCnxnFactory;
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.net.URL;
-
-public class GfacClientFactoryTest {
-    private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
-//    private DocumentCreator documentCreator;
-    private GfacService.Client gfacClient;
-    private Registry registry;
-    private int NUM_CONCURRENT_REQUESTS = 1;
-    Initialize initialize;
-    GfacServer service;
-    private static ServerCnxnFactory cnxnFactory;
-/*
-    @Test
-    public void setUp() {
-    	AiravataUtils.setExecutionAsServer();
-        initialize = new Initialize("registry-derby.sql");
-        initialize.initializeDB();
-        AiravataZKUtils.startEmbeddedZK(cnxnFactory);
-        try {
-            service = (new GfacServer());
-            service.start();
-            registry = RegistryFactory.getDefaultRegistry();
-        } catch (Exception e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        AiravataUtils.setExecutionAsServer();
-        documentCreator = new DocumentCreator(getAiravataAPI());
-        documentCreator.createLocalHostDocs();
-
-        try {
-            service.stop();
-            cnxnFactory.shutdown();
-        } catch (Exception e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-
-    }
-
-    private AiravataAPI getAiravataAPI() {
-        AiravataAPI airavataAPI = null;
-            try {
-                String systemUserName = ServerSettings.getDefaultUser();
-                String gateway = ServerSettings.getDefaultUserGateway();
-                airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
-            } catch (ApplicationSettingsException e) {
-                e.printStackTrace();
-            } catch (AiravataAPIInvocationException e) {
-                e.printStackTrace();
-            }
-        return airavataAPI;
-    }
-*/
-
-    private void storeDescriptors() {
-
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
deleted file mode 100644
index 651f414..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- *
- * 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.client.util;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-public class Initialize {
-    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName = "registry-derby.sql";
-    private NetworkServerControl server;
-    private static final String delimiter = ";";
-    public static final String PERSISTANT_DATA = "Configuration";
-
-    public Initialize(String scriptName) {
-        this.scriptName = scriptName;
-    }
-
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-
-    private static boolean isServerStarted(NetworkServerControl server, int ntries)
-    {
-        for (int i = 1; i <= ntries; i ++)
-        {
-            try {
-                Thread.sleep(500);
-                server.ping();
-                return true;
-            }
-            catch (Exception e) {
-                if (i == ntries)
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    public void initializeDB() throws SQLException{
-        String jdbcUrl = null;
-        String jdbcUser = null;
-        String jdbcPassword = null;
-        try{
-            jdbcUrl = ServerSettings.getSetting("registry.jdbc.url");
-            jdbcUser = ServerSettings.getSetting("registry.jdbc.user");
-            jdbcPassword = ServerSettings.getSetting("registry.jdbc.password");
-            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-        }
-        startDerbyInServerMode();
-        if(!isServerStarted(server, 20)){
-           throw new RuntimeException("Derby server cound not started within five seconds...");
-        }
-
-        Connection conn = null;
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
-            if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
-                executeSQLScript(conn);
-                logger.info("New Database created for Registry");
-            } else {
-                logger.debug("Database already created for Registry!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            try {
-                if (conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-
-        try{
-            GatewayResource gatewayResource = new GatewayResource();
-            gatewayResource.setGatewayId(ServerSettings.getSetting("default.registry.gateway"));
-            gatewayResource.setGatewayName(ServerSettings.getSetting("default.registry.gateway"));
-            gatewayResource.setDomain("test-domain");
-            gatewayResource.setEmailAddress("test-email");
-            gatewayResource.save();
-            
-            UserResource userResource = new UserResource();
-            userResource.setUserName(ServerSettings.getSetting("default.registry.user"));
-            userResource.setPassword(ServerSettings.getSetting("default.registry.password"));
-            userResource.save();
-
-            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
-            workerResource.setUser(userResource.getUserName());
-            workerResource.save();
-            
-            ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
-            projectResource.setGatewayId(gatewayResource.getGatewayId());
-            projectResource.setId("default");
-            projectResource.setName("default");
-            projectResource.setWorker(workerResource);
-            projectResource.save();
-        
-          
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-            throw new SQLException(e.getMessage(), e);
-        } catch (RegistryException e) {
-            logger.error("Unable to save data to registry", e);
-            throw new SQLException(e.getMessage(), e);
-        }
-    }
-
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-            System.out.println("Running a query to test the database tables existence.");
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private void executeSQLScript(Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-        try{
-
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
-        reader = new BufferedReader(new InputStreamReader(inputStream));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            line = line.trim();
-            if (line.startsWith("//")) {
-                continue;
-            }
-            if (line.startsWith("--")) {
-                continue;
-            }
-            StringTokenizer st = new StringTokenizer(line);
-            if (st.hasMoreTokens()) {
-                String token = st.nextToken();
-                if ("REM".equalsIgnoreCase(token)) {
-                    continue;
-                }
-            }
-            sql.append(" ").append(line);
-
-            // SQL defines "--" as a comment to EOL
-            // and in Oracle it may contain a hint
-            // so we cannot just remove it, instead we must end it
-            if (line.indexOf("--") >= 0) {
-                sql.append("\n");
-            }
-            if ((checkStringBufferEndsWith(sql, delimiter))) {
-                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                sql.replace(0, sql.length(), "");
-            }
-        }
-        // Catch any statements not followed by ;
-        if (sql.length() > 0) {
-            executeSQL(sql.toString(), conn);
-        }
-        }catch (IOException e){
-            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
-        }finally {
-            if (reader != null) {
-                reader.close();
-            }
-
-        }
-
-    }
-
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            logger.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            logger.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                logger.warn(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                logger.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    logger.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    private void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName(Utils.getHost()),
-                    20000,
-                    Utils.getJDBCUser(), Utils.getJDBCPassword());
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-
-    }
-
-    public void stopDerbyServer() throws SQLException{
-        try {
-            server.shutdown();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new SQLException("Error while stopping derby server", e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/resources/gsissh.properties b/modules/gfac/airavata-gfac-service/src/test/resources/gsissh.properties
deleted file mode 100644
index 3fdf76d..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/resources/gsissh.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# 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.
-#
-
-###########################################################################
-# Specifies system level configurations as a key/value pairs.
-###########################################################################
-
-StrictHostKeyChecking=no
-ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/resources/monitor.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/resources/monitor.properties b/modules/gfac/airavata-gfac-service/src/test/resources/monitor.properties
deleted file mode 100644
index 7f0299a..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/resources/monitor.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-#
-# 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.
-#
-
-primaryMonitor=org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
-secondaryMonitor=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor
-amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
-connection.name=xsede_private
-trusted.certificate.location=/Users/chathuri/dev/airavata/cert/certificates
-certificate.path=/Users/chathuri/dev/airavata/cert/certificates
-myproxy.server=myproxy.teragrid.org
-myproxy.user=ogce
-myproxy.password=
-myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/resources/orchestrator.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/resources/orchestrator.properties b/modules/gfac/airavata-gfac-service/src/test/resources/orchestrator.properties
deleted file mode 100644
index 35c0427..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/resources/orchestrator.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# 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.
-#
-job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
-job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator
-submitter.interval=10000
-threadpool.size=0
-start.submitter=true
-embedded.mode=true
-enable.validation=false

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/resources/registry-derby.sql b/modules/gfac/airavata-gfac-service/src/test/resources/registry-derby.sql
deleted file mode 100644
index 9ed5ca9..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/resources/registry-derby.sql
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- *
- * 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.
- *
- */
-CREATE TABLE GATEWAY
-(
-        GATEWAY_NAME VARCHAR(255),
-	      OWNER VARCHAR(255),
-        PRIMARY KEY (GATEWAY_NAME)
-);
-
-CREATE TABLE CONFIGURATION
-(
-        CONFIG_KEY VARCHAR(255),
-        CONFIG_VAL VARCHAR(255),
-        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        CATEGORY_ID VARCHAR (255),
-        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
-);
-
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
-
-CREATE TABLE USERS
-(
-        USER_NAME VARCHAR(255),
-        PASSWORD VARCHAR(255),
-        PRIMARY KEY(USER_NAME)
-);
-
-CREATE TABLE GATEWAY_WORKER
-(
-        GATEWAY_NAME VARCHAR(255),
-        USER_NAME VARCHAR(255),
-        PRIMARY KEY (GATEWAY_NAME, USER_NAME),
-        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE PROJECT
-(
-         GATEWAY_NAME VARCHAR(255),
-         USER_NAME VARCHAR(255) NOT NULL,
-         PROJECT_ID VARCHAR(255),
-         PROJECT_NAME VARCHAR(255) NOT NULL,
-         DESCRIPTION VARCHAR(255),
-         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-         PRIMARY KEY (PROJECT_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE PROJECT_USER
-(
-    PROJECT_ID VARCHAR(255),
-    USER_NAME VARCHAR(255),
-    PRIMARY KEY (PROJECT_ID,USER_NAME),
-    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
-    FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE PUBLISHED_WORKFLOW
-(
-         GATEWAY_NAME VARCHAR(255),
-         CREATED_USER VARCHAR(255),
-         PUBLISH_WORKFLOW_NAME VARCHAR(255),
-         VERSION VARCHAR(255),
-         PUBLISHED_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-         PATH VARCHAR (255),
-         WORKFLOW_CONTENT BLOB,
-         PRIMARY KEY(GATEWAY_NAME, PUBLISH_WORKFLOW_NAME),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE USER_WORKFLOW
-(
-         GATEWAY_NAME VARCHAR(255),
-         OWNER VARCHAR(255),
-         TEMPLATE_NAME VARCHAR(255),
-         LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
-         PATH VARCHAR (255),
-         WORKFLOW_GRAPH BLOB,
-         PRIMARY KEY(GATEWAY_NAME, OWNER, TEMPLATE_NAME),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE EXPERIMENT
-(
-        EXPERIMENT_ID VARCHAR(255),
-        GATEWAY_NAME VARCHAR(255),
-        EXECUTION_USER VARCHAR(255) NOT NULL,
-        PROJECT_ID VARCHAR(255) NOT NULL,
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        EXPERIMENT_NAME VARCHAR(255) NOT NULL,
-        EXPERIMENT_DESCRIPTION VARCHAR(255),
-        APPLICATION_ID VARCHAR(255),
-        APPLICATION_VERSION VARCHAR(255),
-        WORKFLOW_TEMPLATE_ID VARCHAR(255),
-        WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
-        WORKFLOW_EXECUTION_ID VARCHAR(255),
-        PRIMARY KEY(EXPERIMENT_ID),
-        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-        FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
-        FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE EXPERIMENT_INPUT
-(
-        EXPERIMENT_ID VARCHAR(255),
-        INPUT_KEY VARCHAR(255) NOT NULL,
-        INPUT_TYPE VARCHAR(255),
-        METADATA VARCHAR(255),
-        VALUE CLOB,
-        PRIMARY KEY(EXPERIMENT_ID,INPUT_KEY),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE EXPERIMENT_OUTPUT
-(
-        EXPERIMENT_ID VARCHAR(255),
-        OUTPUT_KEY VARCHAR(255) NOT NULL,
-        OUTPUT_KEY_TYPE VARCHAR(255),
-        METADATA VARCHAR(255),
-        VALUE CLOB,
-        PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
-);
-
-
-CREATE TABLE WORKFLOW_NODE_DETAIL
-(
-        EXPERIMENT_ID VARCHAR(255) NOT NULL,
-        NODE_INSTANCE_ID VARCHAR(255),
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        NODE_NAME VARCHAR(255) NOT NULL,
-        EXECUTION_UNIT VARCHAR(255) NOT NULL,
-        EXECUTION_UNIT_DATA VARCHAR(255),
-        PRIMARY KEY(NODE_INSTANCE_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE TASK_DETAIL
-(
-        TASK_ID VARCHAR(255),
-        NODE_INSTANCE_ID VARCHAR(255),
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        APPLICATION_ID VARCHAR(255),
-        APPLICATION_VERSION VARCHAR(255),
-        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
-        PRIMARY KEY(TASK_ID),
-        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE ERROR_DETAIL
-(
-         ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-         EXPERIMENT_ID VARCHAR(255),
-         TASK_ID VARCHAR(255),
-         NODE_INSTANCE_ID VARCHAR(255),
-         JOB_ID VARCHAR(255),
-         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-         ACTUAL_ERROR_MESSAGE CLOB,
-         USER_FRIEDNLY_ERROR_MSG VARCHAR(255),
-         TRANSIENT_OR_PERSISTENT SMALLINT,
-         ERROR_CATEGORY VARCHAR(255),
-         CORRECTIVE_ACTION VARCHAR(255),
-         ACTIONABLE_GROUP VARCHAR(255),
-         PRIMARY KEY(ERROR_ID),
-         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
-         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_INPUT
-(
-        TASK_ID VARCHAR(255),
-        INPUT_KEY VARCHAR(255) NOT NULL,
-        INPUT_KEY_TYPE VARCHAR(255),
-        METADATA VARCHAR(255),
-        VALUE CLOB,
-        PRIMARY KEY(TASK_ID,INPUT_KEY),
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_OUTPUT
-(
-        TASK_ID VARCHAR(255),
-        OUTPUT_KEY VARCHAR(255) NOT NULL,
-        OUTPUT_KEY_TYPE VARCHAR(255),
-        METADATA VARCHAR(255),
-        VALUE CLOB,
-        PRIMARY KEY(TASK_ID,OUTPUT_KEY),
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE NODE_INPUT
-(
-       NODE_INSTANCE_ID VARCHAR(255),
-       INPUT_KEY VARCHAR(255) NOT NULL,
-       INPUT_KEY_TYPE VARCHAR(255),
-       METADATA VARCHAR(255),
-       VALUE VARCHAR(255),
-       PRIMARY KEY(NODE_INSTANCE_ID,INPUT_KEY),
-       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE NODE_OUTPUT
-(
-       NODE_INSTANCE_ID VARCHAR(255),
-       OUTPUT_KEY VARCHAR(255) NOT NULL,
-       OUTPUT_KEY_TYPE VARCHAR(255),
-       METADATA VARCHAR(255),
-       VALUE VARCHAR(255),
-       PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
-       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE JOB_DETAIL
-(
-        JOB_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        JOB_DESCRIPTION CLOB NOT NULL,
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
-        PRIMARY KEY (TASK_ID, JOB_ID),
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_TRANSFER_DETAIL
-(
-        TRANSFER_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        TRANSFER_DESC CLOB NOT NULL,
-        PRIMARY KEY(TRANSFER_ID),
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE STATUS
-(
-        STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-        EXPERIMENT_ID VARCHAR(255),
-        NODE_INSTANCE_ID VARCHAR(255),
-        TRANSFER_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        JOB_ID VARCHAR(255),
-        STATE VARCHAR(255),
-        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        STATUS_TYPE VARCHAR(255),
-        PRIMARY KEY(STATUS_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
-        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE,
-        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE CONFIG_DATA
-(
-        EXPERIMENT_ID VARCHAR(255),
-        AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
-        OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
-        SHARE_EXPERIMENT SMALLINT,
-        PRIMARY KEY(EXPERIMENT_ID)
-);
-
-CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
-(
-        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-        EXPERIMENT_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        RESOURCE_HOST_ID VARCHAR(255),
-        CPU_COUNT INTEGER,
-        NODE_COUNT INTEGER,
-        NO_OF_THREADS INTEGER,
-        QUEUE_NAME VARCHAR(255),
-        WALLTIME_LIMIT INTEGER,
-        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        TOTAL_PHYSICAL_MEMORY INTEGER,
-        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
-        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
-(
-       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-       EXPERIMENT_ID VARCHAR(255),
-       TASK_ID VARCHAR(255),
-       WORKING_DIR_PARENT VARCHAR(255),
-       UNIQUE_WORKING_DIR VARCHAR(255),
-       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
-       CLEAN_AFTER_JOB SMALLINT,
-       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
-(
-       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-       EXPERIMENT_ID VARCHAR(255),
-       TASK_ID VARCHAR(255),
-       OUTPUT_DATA_DIR VARCHAR(255),
-       DATA_REG_URL VARCHAR (255),
-       PERSIST_OUTPUT_DATA SMALLINT,
-       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE QOS_PARAM
-(
-        QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-        EXPERIMENT_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        START_EXECUTION_AT VARCHAR(255),
-        EXECUTE_BEFORE VARCHAR(255),
-        NO_OF_RETRIES INTEGER,
-        PRIMARY KEY(QOS_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE COMMUNITY_USER
-(
-        GATEWAY_NAME VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
-        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)
-);
-
-CREATE TABLE CREDENTIALS
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        CREDENTIAL BLOB NOT NULL,
-        PORTAL_USER_ID VARCHAR(256) NOT NULL,
-        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
-);
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-service/src/test/resources/zoo.cfg
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/resources/zoo.cfg b/modules/gfac/airavata-gfac-service/src/test/resources/zoo.cfg
deleted file mode 100644
index add0758..0000000
--- a/modules/gfac/airavata-gfac-service/src/test/resources/zoo.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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.
-
-tickTime=2000
-initLimit=10
-syncLimit=5
-dataDir=data
-clientPort=2181
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/pom.xml b/modules/gfac/airavata-gfac-stubs/pom.xml
deleted file mode 100644
index f94d85b..0000000
--- a/modules/gfac/airavata-gfac-stubs/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>gfac</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <name>Airavata Gfac Client SDK</name>
-    <artifactId>airavata-gfac-stubs</artifactId>
-    <packaging>jar</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${org.slf4j.version}</version>
-        </dependency>
-      	<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-model-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    </properties>
-    
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
deleted file mode 100644
index 0e1aa56..0000000
--- a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * 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.client;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class represent the data related to gfac instances
- * if orchestrator is running on non-embedded mode,
- * This information can be used to do better load balancing between
- * different gfac instances
- */
-public class GFACInstance {
-    private final static Logger logger = LoggerFactory.getLogger(GFACInstance.class);
-
-    private String gfacURL;
-
-    private int currentLoad;
-
-    private int gfacPort;
-
-
-    public GFACInstance(String gfacURL, int gfacPort) {
-        this.gfacURL = gfacURL;
-        this.gfacPort = gfacPort;
-    }
-
-    public String getGfacURL() {
-        return gfacURL;
-    }
-
-    public void setGfacURL(String gfacURL) {
-        this.gfacURL = gfacURL;
-    }
-
-    public int getCurrentLoad() {
-        return currentLoad;
-    }
-
-    public void setCurrentLoad(int currentLoad) {
-        this.currentLoad = currentLoad;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
deleted file mode 100644
index 89f751d..0000000
--- a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * 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.client;
-
-import org.apache.airavata.gfac.cpi.GfacService;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-
-public class GFacClientFactory {
-    public static GfacService.Client createGFacClient(String serverHost, int serverPort){
-          try {
-              TTransport transport = new TSocket(serverHost, serverPort);
-              transport.open();
-              TProtocol protocol = new TBinaryProtocol(transport);
-              return new GfacService.Client(protocol);
-          } catch (TTransportException e) {
-              e.printStackTrace();
-          }
-          return null;
-      }
-}


[42/81] [abbrv] airavata git commit: Resolve compilation issues in gfac module after module refactoring

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PostJobCommandsImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PostJobCommandsImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PostJobCommandsImpl.java
new file mode 100644
index 0000000..0696232
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PostJobCommandsImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  postJobCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PostJobCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML postJobCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class PostJobCommandsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.PostJobCommands
+{
+    private static final long serialVersionUID = 1L;
+    
+    public PostJobCommandsImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName COMMAND$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "command");
+    
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    public java.lang.String[] getCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "command" element
+     */
+    public java.lang.String getCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString xgetCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "command" element
+     */
+    public int sizeOfCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "command" element
+     */
+    public void setCommandArray(java.lang.String[] commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets ith "command" element
+     */
+    public void setCommandArray(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    public void xsetCommandArray(org.apache.xmlbeans.XmlString[]commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    public void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(command);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    public void insertCommand(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(COMMAND$0, i);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    public void addCommand(java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(COMMAND$0);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(COMMAND$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    public org.apache.xmlbeans.XmlString addNewCommand()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(COMMAND$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "command" element
+     */
+    public void removeCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(COMMAND$0, i);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PreJobCommandsImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PreJobCommandsImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PreJobCommandsImpl.java
new file mode 100644
index 0000000..e061462
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PreJobCommandsImpl.java
@@ -0,0 +1,235 @@
+/*
+ * XML Type:  preJobCommands
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.PreJobCommands
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12.impl;
+/**
+ * An XML preJobCommands(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public class PreJobCommandsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.airavata.gfac.core.x2012.x12.PreJobCommands
+{
+    private static final long serialVersionUID = 1L;
+    
+    public PreJobCommandsImpl(org.apache.xmlbeans.SchemaType sType)
+    {
+        super(sType);
+    }
+    
+    private static final javax.xml.namespace.QName COMMAND$0 = 
+        new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "command");
+    
+    
+    /**
+     * Gets array of all "command" elements
+     */
+    public java.lang.String[] getCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            java.lang.String[] result = new java.lang.String[targetList.size()];
+            for (int i = 0, len = targetList.size() ; i < len ; i++)
+                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
+            return result;
+        }
+    }
+    
+    /**
+     * Gets ith "command" element
+     */
+    public java.lang.String getCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return target.getStringValue();
+        }
+    }
+    
+    /**
+     * Gets (as xml) array of all "command" elements
+     */
+    public org.apache.xmlbeans.XmlString[] xgetCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            java.util.List targetList = new java.util.ArrayList();
+            get_store().find_all_element_users(COMMAND$0, targetList);
+            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
+            targetList.toArray(result);
+            return result;
+        }
+    }
+    
+    /**
+     * Gets (as xml) ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString xgetCommandArray(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            return (org.apache.xmlbeans.XmlString)target;
+        }
+    }
+    
+    /**
+     * Returns number of "command" element
+     */
+    public int sizeOfCommandArray()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            return get_store().count_elements(COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets array of all "command" element
+     */
+    public void setCommandArray(java.lang.String[] commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets ith "command" element
+     */
+    public void setCommandArray(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Sets (as xml) array of all "command" element
+     */
+    public void xsetCommandArray(org.apache.xmlbeans.XmlString[]commandArray)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            arraySetterHelper(commandArray, COMMAND$0);
+        }
+    }
+    
+    /**
+     * Sets (as xml) ith "command" element
+     */
+    public void xsetCommandArray(int i, org.apache.xmlbeans.XmlString command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMAND$0, i);
+            if (target == null)
+            {
+                throw new IndexOutOfBoundsException();
+            }
+            target.set(command);
+        }
+    }
+    
+    /**
+     * Inserts the value as the ith "command" element
+     */
+    public void insertCommand(int i, java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = 
+                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(COMMAND$0, i);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Appends the value as the last "command" element
+     */
+    public void addCommand(java.lang.String command)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.SimpleValue target = null;
+            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(COMMAND$0);
+            target.setStringValue(command);
+        }
+    }
+    
+    /**
+     * Inserts and returns a new empty value (as xml) as the ith "command" element
+     */
+    public org.apache.xmlbeans.XmlString insertNewCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(COMMAND$0, i);
+            return target;
+        }
+    }
+    
+    /**
+     * Appends and returns a new empty value (as xml) as the last "command" element
+     */
+    public org.apache.xmlbeans.XmlString addNewCommand()
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            org.apache.xmlbeans.XmlString target = null;
+            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(COMMAND$0);
+            return target;
+        }
+    }
+    
+    /**
+     * Removes the ith "command" element
+     */
+    public void removeCommand(int i)
+    {
+        synchronized (monitor())
+        {
+            check_orphaned();
+            get_store().remove_element(COMMAND$0, i);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd b/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
new file mode 100644
index 0000000..966dafb
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--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. -->
+
+<schema targetNamespace="http://airavata.apache.org/gfac/core/2012/12" xmlns:gsissh="http://airavata.apache.org/gfac/core/2012/12"
+	xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+	<element name="JobDescriptor" type="gsissh:pbsParams" />
+
+	<complexType name="pbsParams">
+		<sequence>
+            <element name="jobID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="userName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+			<element name="shellName" type="xsd:string" minOccurs="0" maxOccurs="1" default="/bin/bash"/>
+            <element name="queueName" type="xsd:string" minOccurs="0" maxOccurs="1" default="normal"/>
+            <element name="jobName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="allEnvExport" type="xsd:boolean" minOccurs="0 " maxOccurs="1" default="true"/>
+			<element name="mailOptions" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="mailAddress" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="partition" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="mailType" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="acountString" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="maxWallTime" type="xsd:string" minOccurs="0" maxOccurs="1" default="1:00:00"/>
+            <element name="standardOutFile" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="standardErrorFile" type="xsd:string" minOccurs="0" maxOccurs="1" />
+			<element name="outputDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="inputDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="nodes" type="xsd:int" minOccurs="0" maxOccurs="1" default="1"/>
+            <element name="processesPerNode" type="xsd:int" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="cpuCount" type="xsd:int" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="nodeList" type="xsd:string" minOccurs="0" maxOccurs="1" default="1" />
+            <element name="workingDirectory" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="executablePath" type="xsd:string" minOccurs="0" maxOccurs="1" />
+            <element name="inputs" type="gsissh:inputList" minOccurs="1" maxOccurs="1"/>
+            <element name="exports" type="gsissh:exportProperties" minOccurs="1" maxOccurs="1"/>
+            <element name="status" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="afterAny" type="gsissh:afterAnyList" minOccurs="0" maxOccurs="1"/>
+            <element name="afterOKList" type="gsissh:afterOKList" minOccurs="0" maxOccurs="1"/>
+            <element name="cTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="qTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="mTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="sTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="compTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="owner" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="executeNode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="ellapsedTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="usedCPUTime" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="usedMem" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="submitArgs" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="variableList" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="preJobCommands" type="gsissh:preJobCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="moduleLoadCommands" type="gsissh:moduleLoadCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="postJobCommands" type="gsissh:postJobCommands" minOccurs="0" maxOccurs="1"/>
+            <element name="jobSubmitterCommand" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="callBackIp" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="callBackPort" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <element name="chassisName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+        </sequence>
+	</complexType>
+
+    <complexType name="moduleLoadCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="preJobCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="postJobCommands">
+        <sequence>
+			<element name="command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="inputList">
+        <sequence>
+			<element name="input" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+    <complexType name="afterAnyList">
+        <sequence>
+			<element name="afterAny" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="afterOKList">
+        <sequence>
+			<element name="afterOKList" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+    </complexType>
+
+    <complexType name="exportProperties">
+		<sequence>
+
+			<element name="name" minOccurs="1" maxOccurs="unbounded">
+				<complexType>
+					<simpleContent>
+						<extension base="xsd:string">
+							<attribute name="value" type="xsd:string" use="required" />
+						</extension>
+					</simpleContent>
+				</complexType>
+			</element>
+
+		</sequence>
+	</complexType>
+</schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/resources/gsissh-schemas.xsdconfig
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/resources/gsissh-schemas.xsdconfig b/modules/gfac/gfac-core/src/main/resources/gsissh-schemas.xsdconfig
new file mode 100644
index 0000000..201d3b1
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/resources/gsissh-schemas.xsdconfig
@@ -0,0 +1,14 @@
+<!--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. -->
+
+<xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
+
+    <xb:namespace uri="http://airavata.apache.org/schemas/gfac/core/2012/12">
+        <xb:package>org.apache.airavata.gfac.core</xb:package>
+    </xb:namespace>
+</xb:config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
index 72a9f34..4733253 100644
--- a/modules/gfac/gfac-impl/pom.xml
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -33,9 +33,39 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
+            <artifactId>gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.jglobus</groupId>
+            <artifactId>gss</artifactId>
+            <version>${jglobus.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jglobus</groupId>
+            <artifactId>myproxy</artifactId>
+            <version>${jglobus.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.50</version>
+        </dependency>
+        <dependency>
+            <groupId>net.schmizz</groupId>
+            <artifactId>sshj</artifactId>
+            <version>0.6.1</version>
+        </dependency>
+        <dependency>
+            <groupId>net.schmizz</groupId>
+            <artifactId>sshj</artifactId>
+            <version>0.6.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.4.4</version>
+        </dependency>
 
         <!-- Test -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/ExtendedSession.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/ExtendedSession.java b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/ExtendedSession.java
new file mode 100644
index 0000000..79ecb61
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/ExtendedSession.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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 com.jcraft.jsch;
+
+
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+
+public class ExtendedSession extends Session {
+
+    private GSIAuthenticationInfo authenticationInfo;
+
+    public ExtendedSession(JSch jsch, String username, String host, int port) throws JSchException {
+        super(jsch, username, host, port);
+    }
+
+    public GSIAuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(GSIAuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java
new file mode 100644
index 0000000..379eb8c
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java
@@ -0,0 +1,126 @@
+/*
+ *
+ * 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 com.jcraft.jsch;
+
+/**
+ * NOTE : This is class is directly created using com.jcraft.jsch.IdentityFile
+ * IdentityFile has private access. Therefore to suit our requirements we modify IdentityFile
+ * with public access.
+ */
+public class GSISSHIdentityFile implements Identity {
+    private JSch jsch;
+    private KeyPair kpair;
+    private String identity;
+
+    public static GSISSHIdentityFile newInstance(String prvfile, String pubfile, JSch jsch) throws JSchException{
+        KeyPair kpair = KeyPair.load(jsch, prvfile, pubfile);
+        return new GSISSHIdentityFile(jsch, prvfile, kpair);
+    }
+
+    public static GSISSHIdentityFile newInstance(String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException{
+        KeyPair kpair = KeyPair.load(jsch, prvkey, pubkey);
+        return new GSISSHIdentityFile(jsch, name, kpair);
+    }
+
+    private GSISSHIdentityFile(JSch jsch, String name, KeyPair kpair) throws JSchException{
+        this.jsch = jsch;
+        this.identity = name;
+        this.kpair = kpair;
+    }
+
+    /**
+     * Decrypts this identity with the specified pass-phrase.
+     * @param passphrase the pass-phrase for this identity.
+     * @return <tt>true</tt> if the decryption is succeeded
+     * or this identity is not cyphered.
+     */
+    public boolean setPassphrase(byte[] passphrase) throws JSchException{
+        return kpair.decrypt(passphrase);
+    }
+
+    /**
+     * Returns the public-key blob.
+     * @return the public-key blob
+     */
+    public byte[] getPublicKeyBlob(){
+        return kpair.getPublicKeyBlob();
+    }
+
+    /**
+     * Signs on data with this identity, and returns the result.
+     * @param data data to be signed
+     * @return the signature
+     */
+    public byte[] getSignature(byte[] data){
+        return kpair.getSignature(data);
+    }
+
+    /**
+     * @deprecated This method should not be invoked.
+     * @see #setPassphrase(byte[] passphrase)
+     */
+    public boolean decrypt(){
+        throw new RuntimeException("not implemented");
+    }
+
+    /**
+     * Returns the name of the key algorithm.
+     * @return "ssh-rsa" or "ssh-dss"
+     */
+    public String getAlgName(){
+        return new String(kpair.getKeyTypeName());
+    }
+
+    /**
+     * Returns the name of this identity.
+     * It will be useful to identify this object in the {@link IdentityRepository}.
+     */
+    public String getName(){
+        return identity;
+    }
+
+    /**
+     * Returns <tt>true</tt> if this identity is cyphered.
+     * @return <tt>true</tt> if this identity is cyphered.
+     */
+    public boolean isEncrypted(){
+        return kpair.isEncrypted();
+    }
+
+    /**
+     * Disposes internally allocated data, like byte array for the private key.
+     */
+    public void clear(){
+        kpair.dispose();
+        kpair = null;
+    }
+
+    /**
+     * Returns an instance of {@link KeyPair} used in this {@link Identity}.
+     * @return an instance of {@link KeyPair} used in this {@link Identity}.
+     */
+    public KeyPair getKeyPair(){
+        return kpair;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java
new file mode 100644
index 0000000..89646c5
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java
@@ -0,0 +1,29 @@
+/*
+ *
+ * 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 com.jcraft.jsch;
+
+public class GSISSHIdentityRepository extends LocalIdentityRepository {
+
+    public GSISSHIdentityRepository(JSch jsch) {
+        super(jsch);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
new file mode 100644
index 0000000..d0e98db
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
@@ -0,0 +1,308 @@
+/*
+ *
+ * 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 com.jcraft.jsch;
+
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.gsi.ssh.GSSContextX509;
+import org.globus.gsi.gssapi.GSSConstants;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+/*
+ * Copyright(c)2004,2005,2006 ymnk, JCraft,Inc. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer. 2. Redistributions in
+ * binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution. 3. The names of the authors may not
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS
+ * SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE)ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * This class now supports two mappings to the gssapi-with-mic method: x509
+ * (preferred) and krb5.
+ *
+ * @author Al Rossi
+ * @author Jeff Overbey
+ */
+public class UserAuthGSSAPIWithMICGSSCredentials extends UserAuth {
+
+    private static final int SSH_MSG_USERAUTH_GSSAPI_RESPONSE = 60;
+    private static final int SSH_MSG_USERAUTH_GSSAPI_TOKEN = 61;
+    // private static final int SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE = 63;
+    private static final int SSH_MSG_USERAUTH_GSSAPI_ERROR = 64;
+    private static final int SSH_MSG_USERAUTH_GSSAPI_ERRTOK = 65;
+    private static final int SSH_MSG_USERAUTH_GSSAPI_MIC = 66;
+
+    // this is the preferred order
+    private static String[] supportedMethods = { "gssapi-with-mic.x509",
+            "gssapi-with-mic.krb5" };
+    private static byte[][] supportedOids;
+
+    static {
+        try {
+            supportedOids = new byte[][] {
+                    GSSConstants.MECH_OID.getDER(),
+                    new Oid("1.2.840.113554.1.2.2").getDER() };
+        } catch (GSSException gsse) {
+            gsse.printStackTrace();
+        }
+    }
+
+    @Override
+    public boolean start(Session session) throws Exception {
+
+        // this.userinfo = userinfo;
+        Packet packet = session.packet;
+        Buffer buf = session.buf;
+        final String username = session.username;
+        byte[] _username = Util.str2byte(username);
+
+        // checkForSupportedOIDs
+        List methods = new ArrayList();
+        boolean found = false;
+        for (int i = 0; i < supportedOids.length; i++) {
+            found = found
+                    || checkForSupportedOIDs(methods, packet, buf, i,
+                    _username, session);
+        }
+
+        if (!found)
+            return false;
+
+        // logger.debug( "supported methods " + methods );
+
+        boolean success = false;
+        for (Iterator it = methods.iterator(); it.hasNext();) {
+            String method = (String) it.next();
+            success = tryMethod(username, _username, method, session, packet,
+                    buf);
+            if (success)
+                break;
+        }
+        return success;
+
+    }
+
+    private boolean checkForSupportedOIDs(List methods, Packet packet,
+                                          Buffer buf, int index, byte[] _username, Session session)
+            throws Exception {
+        packet.reset();
+
+        // byte SSH_MSG_USERAUTH_REQUEST(50)
+        // string user name(in ISO-10646 UTF-8 encoding)
+        // string service name(in US-ASCII)
+        // string "gssapi"(US-ASCII)
+        // uint32 n, the number of OIDs client supports
+        // string[n] mechanism OIDS
+        buf.putByte((byte) SSH_MSG_USERAUTH_REQUEST);
+        buf.putString(_username);
+        buf.putString("ssh-connection".getBytes());
+        buf.putString("gssapi-with-mic".getBytes());
+        buf.putInt(1);
+        buf.putString(supportedOids[index]);
+        session.write(packet);
+
+        while (true) {
+            buf = session.read(buf);
+
+            if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) {
+                return false;
+            }
+
+            if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_RESPONSE) {
+                buf.getInt();
+                buf.getByte();
+                buf.getByte();
+                byte[] message = buf.getString();
+                // logger.debug( "OID " + supportedOids[index] );
+                if (Util.array_equals(message, supportedOids[index])) {
+                    methods.add(supportedMethods[index]);
+                    // logger.debug( "OID MATCH, method is " + methods );
+                    return true;
+                }
+            }
+
+            if (buf.buffer[5] == SSH_MSG_USERAUTH_BANNER) {
+                buf.getInt();
+                buf.getByte();
+                buf.getByte();
+                byte[] _message = buf.getString();
+                buf.getString();
+                String message = Util.byte2str(_message);
+                if (userinfo != null) {
+                    userinfo.showMessage(message);
+                }
+                continue;
+            }
+            return false;
+        }
+    }
+
+    private boolean tryMethod(String username, byte[] _username, String method,
+                              Session session, Packet packet, Buffer buf) throws Exception {
+        GSSContext context = null;
+        try {
+            Class c = Class.forName(session.getConfig(method));
+            context = (GSSContext) (c.newInstance());
+
+        } catch (Exception e) {
+            // logger.error( "could not instantiate GSSContext", e );
+            return false;
+        }
+
+        // Get the credentials and set them
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            GSIAuthenticationInfo authenticationInfo = ((ExtendedSession) session).getAuthenticationInfo();
+
+            if (context instanceof GSSContextX509) {
+                ((GSSContextX509) context).setCredential(authenticationInfo.getCredentials());
+            }
+        }
+
+        // logger.debug( "GOT CONTEXT: " + context );
+
+
+        // FIXME
+        // if ( userinfo instanceof IX509UserInfo ) {
+        // if ( context instanceof GSSContextX509 ) {
+        // GSSCredential credential = ( ( IX509UserInfo )userinfo
+        // ).getCredential();
+        // logger.debug( "user info credential = " + credential );
+        // ( ( GSSContextX509 )context ).setCredential( credential );
+        // }
+        // }
+
+        try {
+            context.create(username, session.host);
+        } catch (JSchException e) {
+            // logger.error( "context creation failed", e );
+            return false;
+        }
+
+        byte[] token = new byte[0];
+
+        while (!context.isEstablished()) {
+            try {
+                token = context.init(token, 0, token.length);
+            } catch (JSchException e) {
+                // logger.error( "context initialization failed", e );
+                // TODO
+                // ERRTOK should be sent?
+                // byte SSH_MSG_USERAUTH_GSSAPI_ERRTOK
+                // string error token
+                return false;
+            }
+
+            if (token != null) {
+                packet.reset();
+                buf.putByte((byte) SSH_MSG_USERAUTH_GSSAPI_TOKEN);
+                buf.putString(token);
+                session.write(packet);
+            }
+
+            if (!context.isEstablished()) {
+                buf = session.read(buf);
+
+                if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_ERROR) {
+                    // uint32 major_status
+                    // uint32 minor_status
+                    // string message
+                    // string language tag
+                    buf = session.read(buf);
+                } else if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_ERRTOK) {
+                    buf = session.read(buf);
+                }
+
+                if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) {
+                    return false;
+                }
+
+                buf.getInt();
+                buf.getByte();
+                buf.getByte();
+                token = buf.getString();
+            }
+        }
+
+        Buffer mbuf = new Buffer();
+        // string session identifier
+        // byte SSH_MSG_USERAUTH_REQUEST
+        // string user name
+        // string service
+        // string "gssapi-with-mic"
+        mbuf.putString(session.getSessionId());
+        mbuf.putByte((byte) SSH_MSG_USERAUTH_REQUEST);
+        mbuf.putString(_username);
+        mbuf.putString("ssh-connection".getBytes());
+        mbuf.putString("gssapi-with-mic".getBytes());
+
+        byte[] mic = context.getMIC(mbuf.buffer, 0, mbuf.getLength());
+
+        if (mic == null) { // there was an error in the getMIC call
+            return false;
+        }
+
+        packet.reset();
+        buf.putByte((byte) SSH_MSG_USERAUTH_GSSAPI_MIC);
+        buf.putString(mic);
+        session.write(packet);
+
+        context.dispose();
+
+        buf = session.read(buf);
+        if (buf.buffer[5] == SSH_MSG_USERAUTH_SUCCESS) {
+            return true;
+        }
+        if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) {
+            buf.getInt();
+            buf.getByte();
+            buf.getByte();
+            byte[] foo = buf.getString();
+            int partial_success = buf.getByte();
+            if (partial_success != 0) {
+                throw new JSchPartialAuthException(new String(foo));
+            }
+        }
+        return false;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
index 1c07a39..a6eea6f 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
@@ -19,7 +19,7 @@
  *
  */
 
-package org.apache.airavata.gfac.ssh;
+package org.apache.airavata.gfac.gsi.ssh;
 
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
deleted file mode 100644
index beb5b37..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * 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.ssh.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gfac.ssh.impl.JobStatus;
-
-import com.jcraft.jsch.Session;
-
-/**
- * This interface represents a Cluster machine
- * End users of the API can implement this and come up with their own
- * implementations, but mostly this interface is for internal usage.
- */
-public interface Cluster {
-
-    /**
-     * This will submit a job to the cluster with a given pbs file and some parameters
-     *
-     * @param pbsFilePath  path of the pbs file
-     * @param workingDirectory working directory where pbs should has to copy
-     * @return jobId after successful job submission
-     * @throws SSHApiException throws exception during error
-     */
-    public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
-
-    /**
-     * This will submit the given job and not performing any monitoring
-     *
-     * @param jobDescriptor  job descriptor to submit to cluster, this contains all the parameter
-     * @return jobID after successful job submission.
-     * @throws SSHApiException  throws exception during error
-     */
-    public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
-
-    /**
-     * This will copy the localFile to remoteFile location in configured cluster
-     *
-     * @param remoteFile remote file location, this can be a directory too
-     * @param localFile local file path of the file which needs to copy to remote location
-     * @throws SSHApiException throws exception during error
-     */
-    public void scpTo(String remoteFile, String localFile) throws SSHApiException;
-
-    /**
-     * This will copy a remote file in path rFile to local file lFile
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile This is the local file to copy, this can be a directory too
-     * @throws SSHApiException
-     */
-    public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
-
-    /**
-     * This will copy a remote file in path rFile to local file lFile
-     * @param remoteFile remote file path, this has to be a full qualified path
-     * @param localFile This is the local file to copy, this can be a directory too
-     * @throws SSHApiException
-     */
-    public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
-    
-    /**
-     * This will create directories in computing resources
-     * @param directoryPath the full qualified path for the directory user wants to create
-     * @throws SSHApiException throws during error
-     */
-    public void makeDirectory(String directoryPath) throws SSHApiException;
-
-
-    /**
-     * This will get the job description of a job which is there in the cluster
-     * if jbo is not available with the given ID it returns
-     * @param jobID jobId has to pass
-     * @return Returns full job description of the job which submitted successfully
-     * @throws SSHApiException throws exception during error
-     */
-    public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
-
-    /**
-     * This will delete the given job from the queue
-     *
-     * @param jobID  jobId of the job which user wants to delete
-     * @return return the description of the deleted job
-     * @throws SSHApiException throws exception during error
-     */
-    public JobDescriptor cancelJob(String jobID) throws SSHApiException;
-
-    /**
-     * This will get the job status of the the job associated with this jobId
-     *
-     * @param jobID jobId of the job user want to get the status
-     * @return job status of the given jobID
-     * @throws SSHApiException throws exception during error
-     */
-    public JobStatus getJobStatus(String jobID) throws SSHApiException;
-    /**
-     * This will get the job status of the the job associated with this jobId
-     *
-     * @param jobName jobName of the job user want to get the status
-     * @return jobId of the given jobName
-     * @throws SSHApiException throws exception during error
-     */
-    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
-
-    /**
-     * This method can be used to poll the jobstatuses based on the given
-     * user but we should pass the jobID list otherwise we will get unwanted
-     * job statuses which submitted by different middleware outside apache
-     * airavata with the same uername which we are not considering
-     * @param userName userName of the jobs which required to get the status
-     * @param jobIDs precises set of jobIDs
-     * @return
-     */
-    public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
-    /**
-     * This will list directories in computing resources
-     * @param directoryPath the full qualified path for the directory user wants to create
-     * @throws SSHApiException throws during error
-     */
-    public List<String> listDirectory(String directoryPath) throws SSHApiException;
-
-    /**
-     * This method can be used to get created ssh session
-     * to reuse the created session.
-     * @throws SSHApiException
-     */
-    public Session getSession() throws SSHApiException;
-    
-    /**
-     * This method can be used to close the connections initialized
-     * to handle graceful shutdown of the system
-     * @throws SSHApiException
-     */
-    public void disconnect() throws SSHApiException;
-
-    /**
-     * This gives the server Info
-     * @return
-     */
-    public ServerInfo getServerInfo();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
index 024c53d..bf306ef 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
@@ -18,14 +18,31 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api;
-
-import com.jcraft.jsch.*;
-import org.apache.airavata.gfac.ssh.api.authentication.*;
-import org.apache.airavata.gfac.ssh.config.ConfigReader;
-import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
-import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
-import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
+package org.apache.airavata.gfac.gsi.ssh.api;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.ExtendedSession;
+import com.jcraft.jsch.GSISSHIdentityFile;
+import com.jcraft.jsch.GSISSHIdentityRepository;
+import com.jcraft.jsch.Identity;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.core.SSHApiException;
+import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyAuthentication;
+import org.apache.airavata.gfac.core.authentication.SSHPublicKeyFileAuthentication;
+import org.apache.airavata.gfac.core.cluster.CommandInfo;
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
+import org.apache.airavata.gfac.core.authentication.SSHPasswordAuthentication;
+import org.apache.airavata.gfac.core.cluster.ServerInfo;
+import org.apache.airavata.gfac.gsi.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.gsi.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.gsi.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.gsi.ssh.util.SSHKeyPasswordHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
deleted file mode 100644
index e6797ce..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.airavata.gfac.ssh.api;/*
- *
- * 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.
- *
- */
-
-/**
- * Encapsulates information about
- */
-public interface CommandInfo {
-
-    /**
-     * Gets the executable command as a string.
-     * @return String encoded command. Should be able to execute
-     * directly on remote shell. Should includes appropriate parameters.
-     */
-    String getCommand();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
deleted file mode 100644
index f275ff0..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.airavata.gfac.ssh.api;/*
- *
- * 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.
- *
- */
-
-
-import com.jcraft.jsch.Channel;
-
-import java.io.OutputStream;
-
-/**
- * Output of a certain command. TODO rethink
- */
-public interface CommandOutput {
-
-    /**
-     * Gets the output of the command as a stream.
-     * @param  channel Command output as a stream.
-     */
-    void onOutput(Channel channel);
-
-    /**
-     * Gets standard error as a output stream.
-     * @return Command error as a stream.
-     */
-    OutputStream getStandardError();
-
-    /**
-     * The command exit code.
-     * @param code The program exit code
-     */
-    void exitCode(int code);
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
index 67dd043..5225552 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
@@ -18,9 +18,9 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api;
+package org.apache.airavata.gfac.gsi.ssh.api;
 
-import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.core.JobDescriptor;
 
 /**
  * This represents a CPU core of a machine in the cluster

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
index 1515f39..4d2a1ca 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.airavata.gfac.ssh.api;
+package org.apache.airavata.gfac.gsi.ssh.api;
 
 import java.util.HashMap;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
deleted file mode 100644
index f78825b..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * 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.ssh.api;
-
-/**
- * An exception class to wrap SSH command execution related errors.
- */
-public class SSHApiException extends Exception {
-
-    public SSHApiException(String message) {
-        super(message);
-    }
-
-    public SSHApiException(String message, Exception e) {
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
deleted file mode 100644
index d3c2160..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.airavata.gfac.ssh.api;/*
- *
- * 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.
- *
- */
-
-/**
- * Encapsulate server information.
- */
-public class ServerInfo {
-
-    private String host;
-    private String userName;
-    private int port = 22;
-
-    public ServerInfo(String userName, String host) {
-        this.userName = userName;
-        this.host = host;
-    }
-
-    public ServerInfo(String userName,String host,  int port) {
-        this.host = host;
-        this.userName = userName;
-        this.port = port;
-    }
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public void setPort(int port) {
-        this.port = port;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
deleted file mode 100644
index 7e936ec..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- *
- * 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.ssh.api.job;
-
-import org.apache.airavata.gfac.ssh.api.CommandOutput;
-import org.apache.airavata.gfac.ssh.util.CommonUtils;
-import org.apache.airavata.gfac.ssh.x2012.x12.*;
-import org.apache.xmlbeans.XmlException;
-
-import java.util.List;
-
-/**
- * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
- * submit the job to the computing resource
- */
-public class JobDescriptor {
-
-    private JobDescriptorDocument jobDescriptionDocument;
-
-
-    public JobDescriptor() {
-        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
-        jobDescriptionDocument.addNewJobDescriptor();
-    }
-
-    public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
-        this.jobDescriptionDocument = jobDescriptorDocument;
-    }
-
-
-    public JobDescriptor(CommandOutput commandOutput) {
-        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
-        jobDescriptionDocument.addNewJobDescriptor();
-    }
-
-
-    public String toXML() {
-        return jobDescriptionDocument.xmlText();
-    }
-
-    public JobDescriptorDocument getJobDescriptorDocument() {
-        return this.jobDescriptionDocument;
-    }
-
-    /**
-     * With new app catalog thrift object integration, we don't use this
-     * @param xml
-     * @return
-     * @throws XmlException
-     */
-    @Deprecated
-    public static JobDescriptor fromXML(String xml)
-            throws XmlException {
-        JobDescriptorDocument parse = JobDescriptorDocument.Factory
-                .parse(xml);
-        JobDescriptor jobDescriptor = new JobDescriptor(parse);
-        return jobDescriptor;
-    }
-
-
-    //todo write bunch of setter getters to set and get jobdescription parameters
-    public void setWorkingDirectory(String workingDirectory) {
-        this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
-    }
-
-    public String getWorkingDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
-    }
-
-    public void setShellName(String shellName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
-    }
-
-    public void setJobName(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
-    }
-
-    public void setExecutablePath(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
-    }
-
-    public void setAllEnvExport(boolean name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
-    }
-
-    public void setMailOptions(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
-    }
-
-    public void setStandardOutFile(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
-    }
-
-    public void setStandardErrorFile(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
-    }
-
-    public void setNodes(int name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
-    }
-
-    public void setProcessesPerNode(int name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
-    }
-
-    public String getOutputDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
-    }
-
-    public String getInputDirectory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
-    }
-    public void setOutputDirectory(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
-    }
-
-    public void setInputDirectory(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
-    }
-
-    /**
-     * Users can pass the minute count for maxwalltime
-     * @param minutes
-     */
-    public void setMaxWallTime(String minutes) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
-                CommonUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
-
-    }
-
-
-    public void setMaxWallTimeForLSF(String minutes) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
-                CommonUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
-
-    }
-    public void setAcountString(String name) {
-        this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
-    }
-
-    public void setInputValues(List<String> inputValue) {
-        InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
-        inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
-    }
-
-    public void setJobID(String jobID) {
-        this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
-    }
-
-    public void setQueueName(String queueName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
-    }
-
-    public void setStatus(String queueName) {
-        this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
-    }
-
-    public void setAfterAnyList(String[] afterAnyList) {
-        AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
-        afterAny.setAfterAnyArray(afterAnyList);
-    }
-
-    public void setAfterOKList(String[] afterOKList) {
-        AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
-        afterAnyList.setAfterOKListArray(afterOKList);
-    }
-    public void setCTime(String cTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
-    }
-    public void setQTime(String qTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
-    }
-    public void setMTime(String mTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
-    }
-    public void setSTime(String sTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
-    }
-    public void setCompTime(String compTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
-    }
-    public void setOwner(String owner) {
-        this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
-    }
-    public void setExecuteNode(String executeNode) {
-        this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
-    }
-    public void setEllapsedTime(String ellapsedTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
-    }
-
-    public void setUsedCPUTime(String usedCPUTime) {
-        this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
-    }
-    public void setCPUCount(int usedCPUTime) {
-            this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
-        }
-    public void setUsedMemory(String usedMemory) {
-        this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
-    }
-    public void setVariableList(String variableList) {
-        this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
-    }
-    public void setSubmitArgs(String submitArgs) {
-        this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
-    }
-
-    public void setPreJobCommands(String[] commands){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
-    }
-
-     public void setPostJobCommands(String[] commands){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
-    }
-
-    public void setModuleLoadCommands(String[] commands) {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
-            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
-    }
-
-    public void addModuleLoadCommands(String command) {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
-            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
-    }
-
-    public void addPreJobCommand(String command){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
-    }
-
-     public void addPostJobCommand(String command){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
-            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
-        }
-        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
-    }
-
-    public void setPartition(String partition){
-        this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
-    }
-
-     public void setUserName(String userName){
-        this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
-    }
-     public void setNodeList(String nodeList){
-        this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
-    }
-    public void setJobSubmitter(String jobSubmitter){
-           this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
-    }
-    public String getNodeList(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
-    }
-    public String getExecutablePath() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
-    }
-
-    public boolean getAllEnvExport() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
-    }
-
-    public String getMailOptions() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
-    }
-
-    public String getStandardOutFile() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
-    }
-
-    public String getStandardErrorFile() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
-    }
-
-    public int getNodes(int name) {
-        return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
-    }
-
-    public int getCPUCount(int name) {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
-    }
-
-    public int getProcessesPerNode() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
-    }
-
-    public String getMaxWallTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
-    }
-
-    public String getAcountString() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
-    }
-
-    public String[] getInputValues() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
-    }
-
-    public String getJobID() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-    public String getQueueName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
-    }
-
-    public String getStatus() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
-    }
-
-    public String[] getAfterAnyList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
-    }
-
-    public String[] getAfterOKList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
-    }
-    public String getCTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
-    }
-    public String getQTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
-    }
-    public String getMTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
-    }
-    public String getSTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
-    }
-    public String getCompTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
-    }
-    public String getOwner() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
-    }
-    public String getExecuteNode() {
-         return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
-    }
-    public String getEllapsedTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
-    }
-
-    public String getUsedCPUTime() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
-    }
-
-    public String getUsedMemory() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
-    }
-    public void getShellName() {
-        this.getJobDescriptorDocument().getJobDescriptor().getShellName();
-    }
-
-    public String getJobName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
-    }
-
-    public String getJobId() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-
-    public String getVariableList() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-    public String getSubmitArgs() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-    public String[] getPostJobCommands(){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String[] getModuleCommands() {
-        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String[] getPreJobCommands(){
-        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
-            return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
-        }
-        return null;
-    }
-
-    public String getJobSubmitterCommand(){
-          return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
-    }
-
-    public String getPartition(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
-    }
-
-    public String getUserName(){
-        return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
-    }
-
-    public void setCallBackIp(String ip){
-        this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
-    }
-
-    public void setCallBackPort(String ip){
-        this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
-    }
-
-
-    public String getCallBackIp(){
-        return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
-    }
-    public String getCallBackPort(){
-        return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
-    }
-
-    public void setMailType(String emailType) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
-    }
-
-    public String getMailType() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
-    }
-    public void setMailAddress(String emailAddress) {
-        this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
-    }
-
-    public String getMailAddress() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
-    }
-
-    public String getChassisName() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
-    }
-
-    public void setChassisName(String chassisName){
-        this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
-    }
-    
-
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
deleted file mode 100644
index d58a994..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * 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.ssh.api.job;
-
-import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
-
-public interface JobManagerConfiguration {
-
-	public RawCommandInfo getCancelCommand(String jobID);
-
-	public String getJobDescriptionTemplateName();
-
-	public RawCommandInfo getMonitorCommand(String jobID);
-
-	public RawCommandInfo getUserBasedMonitorCommand(String userName);
-
-    public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
-
-	public String getScriptExtension();
-
-	public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
-
-	public OutputParser getParser();
-
-	public String getInstalledPath();
-
-	public String getBaseCancelCommand();
-
-	public String getBaseMonitorCommand();
-
-	public String getBaseSubmitCommand();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
deleted file mode 100644
index 556f4ef..0000000
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.ssh.api.job;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahirugunathilake
- * Date: 8/22/13
- * Time: 7:19 AM
- * To change this template use File | Settings | File Templates.
- */
-public enum JobType {
-            SERIAL, SINGLE, MPI, MULTIPLE, CONDOR
-}


[63/81] [abbrv] airavata git commit: removing nested distribution modules, this will be replaced by a single module which will use all required packages defined within an assembly

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c4ea1f0/modules/distribution/api-server/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/modules/distribution/api-server/src/main/resources/LICENSE b/modules/distribution/api-server/src/main/resources/LICENSE
deleted file mode 100644
index 56f7cc2..0000000
--- a/modules/distribution/api-server/src/main/resources/LICENSE
+++ /dev/null
@@ -1,2387 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-===================================================================================
-The Apache Airavata distribution includes a number of run time 
-dependencies with separate copyright notices and license terms. Your use of the
-Apache Airavata code is subject to the terms and conditions of the following licenses.
-===================================================================================
-
-===============================================================================
-The following components come under Apache Software License 2.0
-===============================================================================
-
-apache axiom, apache axis2, apache commons, apache derby, apache geronimo,
-apache httpcore components, apache log4j, apache xmlbeans, apache xmlschema,
-aws-java-sdk-1.1.8.jar, bcel-5.1.jar, Codehaus Jackson (jackson-core-asl-1.9.2.jar,
-jackson-jaxrs-1.9.2.jar, jackson-mapper-asl-1.9.2.jar, jackson-xc-1.9.2.jar, 
-jets3t-0.8.0.jar, jettison-1.0-RC2.jar, neethi-2.0.4.jar, PDFBox libraries 
-(pdfbox, jempbox, fontbox), wstx-asl-3.2.4.jar
-
-- Bean Validation API (http://beanvalidation.org) javax.validation:validation-api:jar:1.1.0.Final
-- Hibernate Validator Engine (http://validator.hibernate.org/hibernate-validator) org.hibernate:hibernate-validator:jar:4.3.0.Final
-- GSS-API implementation for SSL with proxies (https://github.com/jglobus/JGlobus/gss) org.jglobus:gss:jar:2.0.6
-- SSL support (https://github.com/jglobus/JGlobus/jsse) org.jglobus:jsse:jar:2.0.6
-- myproxy (https://github.com/jglobus/JGlobus/myproxy) org.jglobus:myproxy:jar:2.0.6
-- SSL and proxy certificate support (https://github.com/jglobus/JGlobus/ssl-proxies) org.jglobus:ssl-proxies:jar:2.0.6
-- Bouncy Castle for GSS (https://github.com/jsiwek/BouncyCastleSSLv3) org.ogce:bcgss:jar:146
-- StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-- Commons Codec (http://commons.apache.org/codec/) commons-codec:commons-codec:jar:1.4
-- Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:1.4
-- Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6
-- Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
-- XmlBeans (http://xmlbeans.apache.org) org.apache.xmlbeans:xmlbeans:jar:2.5.0
-
-===============================================================================
-The following components use Apache based Licenses
-===============================================================================
-
-===============================================================================
-For: jdom-1.0.jar
-    Containing Project URL: http://www.jdom.org/
-/*-- 
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows 
-    these conditions in the documentation and/or other materials 
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
- 
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
- 
- In addition, we request (but do not require) that you include in the 
- end-user documentation provided with the redistribution and/or in the 
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos 
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many 
- individuals on behalf of the JDOM Project and was originally 
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>. 
-
- */
-
-===============================================================================
-
-ASM bytecode manipulation library (asm)
-    Containing Project URL: http://asm.ow2.org/
-
-    Copyright (c) 2000-2005 INRIA, France Telecom
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-    2. Redistributions in binary form must reproduce the above copyright
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the copyright holders nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-    THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-
-For: cryptix-asn1-versionless.jar, cryptix32-versionless.jar
-    Containing Project URL: http://www.cryptix.org/
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  1. Redistributions of source code must retain the copyright notice,
-     this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===============================================================================
-The following components come under Extreme! Lab Software License
-===============================================================================
-
-XPP3
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
-xsul, xsul5, xutil
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/xsul/
-wsmg
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/messenger/index.html
-gpel, weps-beans, pegasuswebservice, mapReduce-service-client, atomixmiser
-    Containing Project URL: http://www.extreme.indiana.edu/xgws/
-    
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
-   must include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-======================================================================== 
-The following components are MIT Licensed 
-========================================================================
-
-SLF4J,log4j-over-slf4j, jcl-over-slf4j, slf4j-api,mockito-all-1.8.5,jopt-simple-3.2.jar
-    Containing Project URL: http://www.slf4j.org/
-
-Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-========================================================================
-
-For dom4j-1.6.1.jar:
-    Containing Project URL: http://dom4j.sourceforge.net/
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
-   statements and notices.  Redistributions must also contain a
-   copy of this document.
- 
-2. Redistributions in binary form must reproduce the
-   above copyright notice, this list of conditions and the
-   following disclaimer in the documentation and/or other
-   materials provided with the distribution.
- 
-3. The name "DOM4J" must not be used to endorse or promote
-   products derived from this Software without prior written
-   permission of MetaStuff, Ltd.  For written permission,
-   please contact dom4j-info@metastuff.com.
- 
-4. Products derived from this Software may not be called "DOM4J"
-   nor may "DOM4J" appear in their names without prior written
-   permission of MetaStuff, Ltd. DOM4J is a registered
-   trademark of MetaStuff, Ltd.
- 
-5. Due credit should be given to the DOM4J Project - 
-   http://www.dom4j.org
- 
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================================================
-
-For Bouncy Castle:
-    Containing Project URL: http://www.bouncycastle.org/
-
-Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-
-Permission iss software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=======================================================================================================
-
-For: The International Components for Unicode (icu4j-2.6.1.jar)
-    Containing Project URL: http://site.icu-project.org/
-
-    Copyright (c) 1995-2009 International Business Machines Corporation
-    and others
-
-    All rights reserved.
-
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, and/or sell copies of the Software, and to permit persons
-    to whom the Software is furnished to do so, provided that the above
-    copyright notice(s) and this permission notice appear in all copies
-    of the Software and that both the above copyright notice(s) and this
-    permission notice appear in supporting documentation.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
-    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
-    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-    SOFTWARE.
-
-    Except as contained in this notice, the name of a copyright holder shall
-    not be used in advertising or otherwise to promote the sale, use or other
-    dealings in this Software without prior written authorization of the
-    copyright holder.
-    
-====================================================================== 
-The following components are CDDL based License 
-======================================================================
-
-For activation-1.1.jar, jaxb-api-2.1.jar, mail-1.4.jar, junit, 
-Servlet Specification 2.5 API (servlet-api-2.5-6.1.14.jar),
-Classfish Jasper API (jsp-api-2.1-6.1.14.jar), and
-JSP2.1 Jasper implementation from Glassfish (jsp-2.1-6.1.14.jar), 
-Jersey from Glassfish (jersey-client-1.13.jar, jersey-core-1.13.jar,
-jersey-json-1.13.jar, jersey-multipart-1.13.jar) and JSP2.1 Jasper 
-implementation from Glassfish (jsp-2.1-6.1.14.jar),whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
- 
-NOTE: jersey is dual licensed (http://jersey.java.net/CDDL+GPL.html), 
-Apahce Airavata elects to include jersey in this distribution under the
-[CDDLv_1.0] license.
-
-    COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-    1. Definitions.
-
-    1.1. Contributor means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. Contributor Version means the combination of the Original Software,
-    prior Modifications used by a Contributor (if any), and the Modifications
-    made by that particular Contributor.
-
-    1.3. Covered Software means (a) the Original Software, or
-    (b) Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. Executable means the Covered Software in any form other than Source
-    Code.
-
-    1.5. Initial Developer means the individual or entity that first makes
-    Original Software available under this License.
-
-    1.6. Larger Work means a work which combines Covered Software or portions
-    thereof with code not governed by the terms of this License.
-
-    1.7. License means this document.
-
-    1.8. Licensable means having the right to grant, to the maximum extent
-    possible, whether at the time of the initial grant or subsequently
-    acquired, any and all of the rights conveyed herein.
-
-    1.9. Modifications means the Source Code and Executable form of any of
-    the following: A. Any file that results from an addition to, deletion
-    from or modification of the contents of a file containing Original
-    Software or previous Modifications; B. Any new file that contains any
-    part of the Original Software or previous Modification; or C. Any new
-    file that is contributed or otherwise made available under the terms of
-    this License.
-
-    1.10. Original Software means the Source Code and Executable form of
-    computer software code that is originally released under this License.
-
-    1.11. Patent Claims means any patent claim(s), now owned or hereafter
-    acquired, including without limitation, method, process, and apparatus
-    claims, in any patent Licensable by grantor.
-
-    1.12. Source Code means (a) the common form of computer software code in
-    which modifications are made and (b) associated documentation included in
-    or with such code.
-
-    1.13. You (or Your) means an individual or a legal entity exercising
-    rights under, and complying with all of the terms of, this License. For
-    legal entities, You includes any entity which controls, is controlled by,
-    or is under common control with You. For purposes of this definition,
-    control means (a) the power, direct or indirect, to cause the direction
-    or management of such entity, whether by contract or otherwise, or
-    (b) ownership of more than fifty percent (50%) of the outstanding shares
-    or beneficial ownership of such entity.
-
-    2. License Grants.
-
-    2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-    Section 3.1 below and subject to third party intellectual property
-    claims, the Initial Developer hereby grants You a world-wide,
-    royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Initial Developer, to use, reproduce, modify, display,
-        perform, sublicense and distribute the Original Software (or portions
-        thereof), with or without Modifications, and/or as part of a Larger
-        Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-        Original Software, to make, have made, use, practice, sell, and offer
-        for sale, and/or otherwise dispose of the Original Software (or
-        portions thereof);
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-        date Initial Developer first distributes or otherwise makes the
-        Original Software available to a third party under the terms of
-        this License;
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-        (1) for code that You delete from the Original Software, or (2) for
-        infringements caused by: (i) the modification of the Original
-        Software, or (ii) the combination of the Original Software with other
-        software or devices.
-
-    2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-    below and subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free, non-exclusive
-    license:
-
-    (a) under intellectual property rights (other than patent or trademark)
-        Licensable by Contributor to use, reproduce, modify, display, perform,
-        sublicense and distribute the Modifications created by such
-        Contributor (or portions thereof), either on an unmodified basis,
-        with other Modifications, as Covered Software and/or as part of a
-        Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling of
-        Modifications made by that Contributor either alone and/or in
-        combination with its Contributor Version (or portions of such
-        combination), to make, use, sell, offer for sale, have made, and/or
-        otherwise dispose of: (1) Modifications made by that Contributor (or
-        portions thereof); and (2) the combination of Modifications made by
-        that Contributor with its Contributor Version (or portions of such
-        combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-        the date Contributor first distributes or otherwise makes the
-        Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-        (1) for any code that Contributor has deleted from the Contributor
-        Version; (2) for infringements caused by: (i) third party
-        modifications of Contributor Version, or (ii) the combination of
-        Modifications made by that Contributor with other software (except
-        as part of the Contributor Version) or other devices; or (3) under
-        Patent Claims infringed by Covered Software in the absence of
-        Modifications made by that Contributor.
-
-    3. Distribution Obligations.
-
-    3.1. Availability of Source Code. Any Covered Software that You distribute
-    or otherwise make available in Executable form must also be made available
-    in Source Code form and that Source Code form must be distributed only
-    under the terms of this License. You must include a copy of this License
-    with every copy of the Source Code form of the Covered Software You
-    distribute or otherwise make available. You must inform recipients of any
-    such Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or through
-    a medium customarily used for software exchange.
-
-    3.2. Modifications. The Modifications that You create or to which You
-    contribute are governed by the terms of this License. You represent that
-    You believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices. You must include a notice in each of Your
-    Modifications that identifies You as the Contributor of the Modification.
-    You may not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the Initial
-    Developer.
-
-    3.4. Application of Additional Terms. You may not offer or impose any
-    terms on any Covered Software in Source Code form that alters or restricts
-    the applicable version of this License or the recipients rights hereunder.
-    You may choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of Covered
-    Software. However, you may do so only on Your own behalf, and not on
-    behalf of the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or liability
-    obligation is offered by You alone, and You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred by the
-    Initial Developer or such Contributor as a result of warranty, support,
-    indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions. You may distribute the
-    Executable form of the Covered Software under the terms of this License or
-    under the terms of a license of Your choice, which may contain terms
-    different from this License, provided that You are in compliance with the
-    terms of this License and that the license for the Executable form does
-    not attempt to limit or alter the recipients rights in the Source Code
-    form from the rights set forth in this License. If You distribute the
-    Covered Software in Executable form under a different license, You must
-    make it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or Contributor.
-    You hereby agree to indemnify the Initial Developer and every Contributor
-    for any liability incurred by the Initial Developer or such Contributor as
-    a result of any such terms You offer.
-
-    3.6. Larger Works. You may create a Larger Work by combining Covered
-    Software with other code not governed by the terms of this License and
-    distribute the Larger Work as a single product. In such a case, You must
-    make sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-    4. Versions of the License.
-
-    4.1. New Versions. Sun Microsystems, Inc. is the initial license steward
-    and may publish revised and/or new versions of this License from time to
-    time. Each version will be given a distinguishing version number. Except
-    as provided in Section 4.3, no one other than the license steward has the
-    right to modify this License.
-
-    4.2. Effect of New Versions. You may always continue to use, distribute
-    or otherwise make the Covered Software available under the terms of the
-    version of the License under which You originally received the Covered
-    Software. If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms of
-    the version of the License under which You originally received the
-    Covered Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions. When You are an Initial Developer and You want
-    to create a new license for Your Original Software, You may create and
-    use a modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to note
-    that the license differs from this License); and (b) otherwise make it
-    clear that the license contains terms which differ from this License.
-
-    5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE
-    ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-    IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-    OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
-    CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
-    CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
-    THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER
-    EXCEPT UNDER THIS DISCLAIMER.
-
-    6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to cure
-    such breach within 30 days of becoming aware of the breach. Provisions
-    which, by their nature, must remain in effect beyond the termination of
-    this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding declaratory
-    judgment actions) against Initial Developer or a Contributor (the Initial
-    Developer or Contributor against whom You assert such claim is referred
-    to as Participant) alleging that the Participant Software (meaning the
-    Contributor Version where the Participant is a Contributor or the
-    Original Software where the Participant is the Initial Developer)
-    directly or indirectly infringes any patent, then any and all rights
-    granted directly or indirectly to You by such Participant, the Initial
-    Developer (if the Initial Developer is not the Participant) and all
-    Contributors under Sections 2.1 and/or 2.2 of this License shall, upon
-    60 days notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within such
-    60 day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to a
-    written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-    user licenses that have been validly granted by You or any distributor
-    hereunder prior to termination (excluding licenses granted to You by any
-    distributor) shall survive termination.
-
-    7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
-    THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL
-    YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
-    PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-    ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS,
-    LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY
-    AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
-    BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-    RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-    PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
-    OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-    8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item,
-    as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of
-    commercial computer software (as that term is defined at 48 C.F.R.
-    252.227-7014(a)(1)) and commercial computer software documentation as such
-    terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
-    12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S.
-    Government End Users acquire Covered Software with only those rights set
-    forth herein. This U.S. Government Rights clause is in lieu of, and
-    supersedes, any other FAR, DFAR, or other clause or provision that
-    addresses Government rights in computer software under this License.
-
-    9. MISCELLANEOUS. This License represents the complete agreement
-    concerning subject matter hereof. If any provision of this License is
-    held to be unenforceable, such provision shall be reformed only to the
-    extent necessary to make it enforceable. This License shall be governed
-    by the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdictions conflict-of-law
-    provisions. Any litigation relating to this License shall be subject to
-    the jurisdiction of the courts located in the jurisdiction and venue
-    specified in a notice contained within the Original Software, with the
-    losing party responsible for costs, including, without limitation, court
-    costs and reasonable attorneys fees and expenses. The application of the
-    United Nations Convention on Contracts for the International Sale of
-    Goods is expressly excluded. Any law or regulation which provides that
-    the language of a contract shall be construed against the drafter shall
-    not apply to this License. You agree that You alone are responsible for
-    compliance with the United States export administration regulations (and
-    the export control laws and regulation of any other countries) when You
-    use, distribute or otherwise make available any Covered Software.
-
-    10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the
-    Contributors, each party is responsible for claims and damages arising,
-    directly or indirectly, out of its utilization of rights under this
-    License and You agree to work with Initial Developer and Contributors
-    to distribute such responsibility on an equitable basis. Nothing herein
-    is intended or shall be deemed to constitute any admission of liability.
-
-    NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-    LICENSE (CDDL) The code released under the CDDL shall be governed by the
-    laws of the State of California (excluding conflict-of-law provisions).
-    Any litigation relating to this License shall be subject to the
-    jurisdiction of the Federal Courts of the Northern District of California
-    and the state courts of the State of California, with venue lying in
-    Santa Clara County, California.
-
-
-==============================================================================
-
-For: jaxb-xjc-2.1.7.jar
-    Containing Project URL: 
-
-Copyright (c) 2004 Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall
-be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-=============================================================================== 
-The following components are BSD Licensed 
-=============================================================================== 
-
-For jibx-bind-1.2.1.jar,jibx-run-1.2.1.jar, antlr-2.7.7.jar,hamcrest-all-1.1.jar,whirr-core-0.7.1.jar, whirr-hadoop-0.7.1.jar:
-    Containing Project URL: http://jibx.sourceforge.net, http://www.antlr.org/
-
-Copyright (c) 2003-2007, Dennis M. Sosnoski
-All rights reserved.
-
-Copyright (c) 2010 Terence Parr
-All rights reserved.
-
-[The BSD License]
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- * Neither the name of JiBX nor the names of its contributors may be used
-   to endorse or promote products derived from this software without specific
-   prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==============================================================================
-
-For YFilter:
-    Containing Project URL: http://yfilter.cs.umass.edu/
-
-YFilter 1.0 COPYRIGHT, LICENSE and DISCLAIMER
-
-Copyright (c) 2002, 2004, Regents of the University of California All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this
-    list of conditions and the following disclaimer in the documentation and/or other
-    materials provided with the distribution.
-    * Neither the name of the University of California at Berkeley nor the names of
-    its contributors may be used to endorse or promote products derived from this
-    software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================================
-For jaxen-1.1.1.jar:
-    Containing Project URL: http://jaxen.codehaus.org/
-
- Copyright 2003-2006 The Werken Company. All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-  * Neither the name of the Jaxen Project nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================== 
-The following components are CPL Licensed 
-=============================================================================== 
-
-For wsdl4j-1.6.2.jar:
-    Containing Project URL: http://sourceforge.net/projects/wsdl4j/
-
-Common Public License Version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
-Contributors may not remove or alter any copyright notices contained within the
Program.
-Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not ap
 ply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipie
 nt receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
-
-==========================================================================================
-==========================================================================================
-
-For puretls:
-    Containing Project URL: 
-
-  This package is a SSLv3/TLS implementation written by Eric Rescorla
-   <ek...@rtfm.com> and licensed by Claymore Systems, Inc.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-   3. Neither the name of Claymore Systems, Inc. nor the name of Eric
-      Rescorla may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-   THIS SOFTWARE IS PROVIDED BY CLAYMORE SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-
-==============================================================================
-
-For xml-api,woden-api-1.0M8.jar,woden-impl-dom-1.0M8.jar:
-    Containing Project URL: 
-
-For the W3C schema and DTD files in the org.apache.woden.resolver package:
-
-W3C® DOCUMENT LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-
-Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that
-you have read, understood, and will comply with the following terms and
-conditions:
-
-Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose
-and without fee or royalty is hereby granted, provided that you include the
-following on ALL copies of the document, or portions thereof, that you use:
-
-  1. A link or URL to the original W3C document.
-  2. The pre-existing copyright notice of the original author, or if it
-     doesn't exist, a notice (hypertext is preferred, but a textual
-     representation is permitted) of the form: "Copyright © [$date-of-document]
-     World Wide Web Consortium, (Massachusetts Institute of Technology,
-     European Research Consortium for Informatics and Mathematics, Keio
-     University). All Rights Reserved.
-     http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
-  3. If it exists, the STATUS of the W3C document.
-
-When space permits, inclusion of the full text of this NOTICE should be
-provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.
-
-No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in
-the Copyright FAQ) are satisfied, the right to create modifications or
-derivatives is sometimes granted by the W3C to individuals complying with
-those requirements.
-
-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
-FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
-INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
-PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all
-times remain with copyright holders.
-
-This formulation of W3C's notice and license became active on December 31 2002. 
-This version removes the copyright ownership notice such that this license can 
-be used with materials other than those owned by the W3C, reflects that ERCIM is 
-now a host of the W3C, includes references to this specific dated version of the 
-license, and removes the ambiguous grant of "use". Otherwise, this version is the 
-same as the previous version and is written so as to preserve the Free Software 
-Foundation's assessment of GPL compatibility and OSI's certification under the 
-Open Source Definition. Please see our Copyright FAQ for common questions about 
-using materials from our site, including specific terms and conditions for packages 
-like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed 
-o site-policy@w3.org.
-
-Joseph Reagle <si...@w3.org>
- 
-Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $ 
-
-==========================================================================================
-
-XML API library, org.w3c classes (xml-apis)
-    Containing Project URL: 
-
-    DOM Java Language Binding:
-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html
-
-    W3C IPR SOFTWARE NOTICE
-    Copyright (C) 2000 World Wide Web Consortium, (Massachusetts Institute of
-    Technology, Institut National de Recherche en Informatique et en
-    Automatique, Keio University). All Rights Reserved.
-
-    The DOM bindings are published under the W3C Software Copyright Notice
-    and License. The software license requires "Notice of any changes or
-    modifications to the W3C files, including the date changes were made."
-    Consequently, modified versions of the DOM bindings must document that
-    they do not conform to the W3C standard; in the case of the IDL binding,
-    the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-    binding, the package names can no longer be in the 'org.w3c' package.
-
-    Note: The original version of the W3C Software Copyright Notice and
-    License could be found at
-    http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
-    Copyright (C) 1994-2000 World Wide Web Consortium, (Massachusetts
-    Institute of Technology, Institut National de Recherche en Informatique
-    et en Automatique, Keio University). All Rights Reserved.
-    http://www.w3.org/Consortium/Legal/
-
-    This W3C work (including software, documents, or other related items) is
-    being provided by the copyright holders under the following license. By
-    obtaining, using and/or copying this work, you (the licensee) agree that
-    you have read, understood, and will comply with the following terms and
-    conditions:
-
-    Permission to use, copy, and modify this software and its documentation,
-    with or without modification, for any purpose and without fee or royalty
-    is hereby granted, provided that you include the following on ALL copies
-    of the software and documentation or portions thereof, including
-    modifications, that you make:
-
-      1. The full text of this NOTICE in a location viewable to users of the
-         redistributed or derivative work.
-
-      2. Any pre-existing intellectual property disclaimers, notices, or
-         terms and conditions. If none exist, a short notice of the following
-         form (hypertext is preferred, text is permitted) should be used
-         within the body of any redistributed or derivative code:
-         "Copyright (C) [$date-of-software] World Wide Web Consortium,
-         (Massachusetts Institute of Technology, Institut National de
-         Recherche en Informatique et en Automatique, Keio University).
-         All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-      3. Notice of any changes or modifications to the W3C files, including
-         the date changes were made. (We recommend you provide URIs to the
-         location from which the code is derived.)
-
-    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-    MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
-    NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-    PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-    ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-    OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-    DOCUMENTATION.
-
-    The name and trademarks of copyright holders may NOT be used in
-    advertising or publicity pertaining to the software without specific,
-    written prior permission. Title to copyright in this software and any
-    associated documentation will at all times remain with copyright holders.
-
-=============================================================================== 
-The following components come under the Eclipse Public 1.0 License 
-=============================================================================== 
-Eclipse JDT Core (core-3.1.1.jar)
-
--AspectJ runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.6.12
-    License: Eclipse Public License - v 1.0  (http://www.eclipse.org/legal/epl-v10.html)
-
-  Eclipse Public License - v 1.0
-
-    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-    PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-    THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-    1. DEFINITIONS
-
-    "Contribution" means:
-
-    a) in the case of the initial Contributor, the initial code and
-       documentation distributed under this Agreement, and
-
-    b) in the case of each subsequent Contributor:
-
-       i) changes to the Program, and
-
-       ii) additions to the Program;
-
-       where such changes and/or additions to the Program originate from and
-       are distributed by that particular Contributor. A Contribution
-       'originates' from a Contributor if it was added to the Program by
-       such Contributor itself or anyone acting on such Contributor's behalf.
-       Contributions do not include additions to the Program which: (i) are
-       separate modules of software distributed in conjunction with the
-       Program under their own license agreement, and (ii) are not derivative
-       works of the Program.
-
-    "Contributor" means any person or entity that distributes the Program.
-
-    "Licensed Patents " mean patent claims licensable by a Contributor which
-    are necessarily infringed by the use or sale of its Contribution alone or
-    when combined with the Program.
-
-    "Program" means the Contributions distributed in accordance with this
-    Agreement.
-
-    "Recipient" means anyone who receives the Program under this Agreement,
-    including all Contributors.
-
-    2. GRANT OF RIGHTS
-
-    a) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free copyright license to
-       reproduce, prepare derivative works of, publicly display, publicly
-       perform, distribute and sublicense the Contribution of such
-       Contributor, if any, and such derivative works, in source code and
-       object code form.
-
-    b) Subject to the terms of this Agreement, each Contributor hereby grants
-       Recipient a non-exclusive, worldwide, royalty-free patent license under
-       Licensed Patents to make, use, sell, offer to sell, import and
-       otherwise transfer the Contribution of such Contributor, if any, in
-       source code and object code form. This patent license shall apply to
-       the combination of the Contribution and the Program if, at the time
-       the Contribution is added by the Contributor, such addition of the
-       Contribution causes such combination to be covered by the Licensed
-       Patents. The patent license shall not apply to any other combinations
-       which include the Contribution. No hardware per se is licensed hereunder.
-
-    c) Recipient understands that although each Contributor grants the
-       licenses to its Contributions set forth herein, no assurances are
-       provided by any Contributor that the Program does not infringe the
-       patent or other intellectual property rights of any other entity. Each
-       Contributor disclaims any liability to Recipient for claims brought by
-       any other entity based on infringement of intellectual property rights
-       or otherwise. As a condition to exercising the rights and licenses
-       granted hereunder, each Recipient hereby assumes sole responsibility
-       to secure any other intellectual property rights needed, if any. For
-       example, if a third party patent license is required to allow Recipient
-       to distribute the Program, it is Recipient's responsibility to acquire
-       that license before distributing the Program.
-
-    d) Each Contributor represents that to its knowledge it has sufficient
-       copyright rights in its Contribution, if any, to grant the copyright
-       license set forth in this Agreement.
-
-    3. REQUIREMENTS
-
-    A Contributor may choose to distribute the Program in object code form
-    under its own license agreement, provided that:
-
-    a) it complies with the terms and conditions of this Agreement; and
-
-    b) its license agreement:
-
-       i)   effectively disclaims on behalf of all Contributors all warranties
-            and conditions, express and implied, including warranties or
-            conditions of title and non-infringement, and implied warranties
-            or conditions of merchantability and fitness for a particular
-            purpose;
-
-       ii)  effectively excludes on behalf of all Contributors all liability
-            for damages, including direct, indirect, special, incidental and
-            consequential damages, such as lost profits;
-
-       iii) states that any provisions which differ from this Agreement are
-            offered by that Contributor alone and not by any other party; and
-
-       iv)  states that source code for the Program is available from such
-            Contributor, and informs licensees how to obtain it in a
-            reasonable manner on or through a medium customarily used for
-            software exchange.
-
-    When the Program is made available in source code form:
-
-    a) it must be made available under this Agreement; and
-
-    b) a copy of this Agreement must be included with each copy of the
-       Program.
-
-    Contributors may not remove or alter any copyright notices contained
-    within the Program.
-
-    Each Contributor must identify itself as the originator of its
-    Contribution, if any, in a manner that reasonably allows subsequent
-    Recipients to identify the originator of the Contribution.
-
-    4. COMMERCIAL DISTRIBUTION
-
-    Commercial distributors of software may accept certain responsibilities
-    with respect to end users, business partners and the like. While this
-    license is intended to facilitate the commercial use of the Program,
-    the Contributor who includes the Program in a commercial product offering
-    should do so in a manner which does not create potential liability for
-    other Contributors. Therefore, if a Contributor includes the Program in
-    a commercial product offering, such Contributor ("Commercial Contributor")
-    hereby agrees to defend and indemnify every other Contributor
-    ("Indemnified Contributor") against any losses, damages and costs
-    (collectively "Losses") arising from claims, lawsuits and other legal
-    actions brought by a third party against the Indemnified Contributor to
-    the extent caused by the acts or omissions of such Commercial Contributor
-    in connection with its distribution of the Program in a commercial
-    product offering. The obligations in this section do not apply to any
-    claims or Losses relating to any actual or alleged intellectual property
-    infringement. In order to qualify, an Indemnified Contributor must:
-    a) promptly notify the Commercial Contributor in writing of such claim,
-    and b) allow the Commercial Contributor to control, and cooperate with
-    the Commercial Contributor in, the defense and any related settlement
-    negotiations. The Indemnified Contributor may participate in any such
-    claim at its own expense.
-
-    For example, a Contributor might include the Program in a commercial
-    product offering, Product X. That Contributor is then a Commercial
-    Contributor. If that Commercial Contributor then makes performance claims,
-    or offers warranties related to Product X, those performance claims and
-    warranties are such Commercial Contributor's responsibility alone. Under
-    this section, the Commercial Contributor would have to defend claims
-    against the other Contributors related to those performance claims and
-    warranties, and if a court requires any other Contributor to pay any
-    damages as a result, the Commercial Contributor must pay those damages.
-
-    5. NO WARRANTY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-    ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
-    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
-    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
-    PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
-    the appropriateness of using and distributing the Program and assumes all
-    risks associated with its exercise of rights under this Agreement ,
-    including but not limited to the risks and costs of program errors,
-    compliance with applicable laws, damage to or loss of data, programs or
-    equipment, and unavailability or interruption of operations.
-
-    6. DISCLAIMER OF LIABILITY
-
-    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-    7. GENERAL
-
-    If any provision of this Agreement is invalid or unenforceable under
-    applicable law, it shall not affect the validity or enforceability of
-    the remainder of the terms of this Agreement, and without further action
-    by the parties hereto, such provision shall be reformed to the minimum
-    extent necessary to make such provision valid and enforceable.
-
-    If Recipient institutes patent litigation against any entity (including
-    a cross-claim or counterclaim in a lawsuit) alleging that the Program
-    itself (excluding combinations of the Program with other software or
-    hardware) infringes such Recipient's patent(s), then such Recipient's
-    rights granted under Section 2(b) shall terminate as of the date such
-    litigation is filed.
-
-    All Recipient's rights under this Agreement shall terminate if it fails
-    to comply with any of the material terms or conditions of this Agreement
-    and does not cure such failure in a reasonable period of time after
-    becoming aware of such noncompliance. If all Recipient's rights under
-    this Agreement terminate, Recipient agrees to cease use and distribution
-    of the Program as soon as reasonably practicable. However, Recipient's
-    obligations under this Agreement and any licenses granted by Recipient
-    relating to the Program shall continue and surv

<TRUNCATED>

[07/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACPassiveJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACPassiveJobSubmitter.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACPassiveJobSubmitter.java
index 36282a0..21df198 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACPassiveJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACPassiveJobSubmitter.java
@@ -25,7 +25,7 @@ import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.gfac.client.GFACInstance;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.PublisherFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 4ef9dbc..389913b 100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -36,7 +36,7 @@ import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.gfac.core.scheduler.HostScheduler;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.messaging.core.MessagingConstants;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2234b67..23f5f16 100644
--- a/pom.xml
+++ b/pom.xml
@@ -556,7 +556,6 @@
 				<module>modules/security</module>
 				<module>modules/credential-store</module>
 				<module>modules/orchestrator</module>
-				<module>tools</module>
 				<module>modules/server</module>
 				<module>modules/test-suite</module>
 				<module>modules/distribution</module>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh-cli-tools/README.txt
----------------------------------------------------------------------
diff --git a/tools/gsissh-cli-tools/README.txt b/tools/gsissh-cli-tools/README.txt
index bc352dd..11d2674 100644
--- a/tools/gsissh-cli-tools/README.txt
+++ b/tools/gsissh-cli-tools/README.txt
@@ -6,4 +6,4 @@ To run the SSHApiClientWithMyProxyAuth tool, first add all the jars in target/li
 export CP=`echo ./target/lib/*.jar | tr ' ' ':'`
 
 Then use the following command line:
-java -classpath ./target/gsissh-cli-tools-0.14-SNAPSHOT.jar:$CP -Dmyproxy.server=myproxy.teragrid.org -Dmyproxy.username=<your.username> -Dmyproxy.password=<your.password> -Dmyproxy.cert.location=<path-to>/airavata/tools/gsissh-cli-tools/target/classes/certificates/ -Dremote.host=trestles.sdsc.xsede.org -Dremote.host.port=22 -Dremote.cmd=/bin/ls org.apache.airavata.gsi.ssh.cli.SSHApiClientWithMyProxyAuth 
+java -classpath ./target/gsissh-cli-tools-0.14-SNAPSHOT.jar:$CP -Dmyproxy.server=myproxy.teragrid.org -Dmyproxy.username=<your.username> -Dmyproxy.password=<your.password> -Dmyproxy.cert.location=<path-to>/airavata/tools/gsissh-cli-tools/target/classes/certificates/ -Dremote.host=trestles.sdsc.xsede.org -Dremote.host.port=22 -Dremote.cmd=/bin/ls org.apache.airavata.gfac.ssh.cli.SSHApiClientWithMyProxyAuth

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh-cli-tools/src/main/java/org/apache/airavata/gsi/ssh/cli/SSHApiClientWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh-cli-tools/src/main/java/org/apache/airavata/gsi/ssh/cli/SSHApiClientWithMyProxyAuth.java b/tools/gsissh-cli-tools/src/main/java/org/apache/airavata/gsi/ssh/cli/SSHApiClientWithMyProxyAuth.java
index 9179f08..b22dc61 100644
--- a/tools/gsissh-cli-tools/src/main/java/org/apache/airavata/gsi/ssh/cli/SSHApiClientWithMyProxyAuth.java
+++ b/tools/gsissh-cli-tools/src/main/java/org/apache/airavata/gsi/ssh/cli/SSHApiClientWithMyProxyAuth.java
@@ -19,25 +19,20 @@
  *
  */
 
-package org.apache.airavata.gsi.ssh.cli;
+package org.apache.airavata.gfac.ssh.cli;
 
-import org.apache.airavata.gsi.ssh.api.*;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.config.ConfigReader;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
-import org.apache.airavata.gsi.ssh.impl.SystemCommandOutput;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
+import org.apache.airavata.gfac.ssh.api.*;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+import org.apache.airavata.gfac.ssh.impl.SystemCommandOutput;
+import org.apache.airavata.gfac.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 public class SSHApiClientWithMyProxyAuth {
 
     public static void main(String[]ars){

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/SSHDemo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/SSHDemo.java b/tools/gsissh/src/main/java/SSHDemo.java
index c5e410c..ea73e3c 100644
--- a/tools/gsissh/src/main/java/SSHDemo.java
+++ b/tools/gsissh/src/main/java/SSHDemo.java
@@ -39,7 +39,7 @@
  */
 
 import com.jcraft.jsch.*;
-import org.apache.airavata.gsi.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -54,7 +54,7 @@ public class SSHDemo {
 
     private static final Logger logger = LoggerFactory.getLogger(SSHDemo.class);
     static {
-        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
+        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
         JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
         System.setProperty("X509_CERT_DIR",
                 "/Users/smarru/deploy/certificates");

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java b/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java
index f3ead64..5b7f7d7 100644
--- a/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java
+++ b/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java
@@ -21,7 +21,7 @@
 
 package com.jcraft.jsch;
 
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
 
 public class ExtendedSession extends Session {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java b/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
index 24028b6..d9fb822 100644
--- a/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
+++ b/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java
@@ -25,8 +25,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.airavata.gsi.ssh.GSSContextX509;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gfac.ssh.GSSContextX509;
+import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo;
 import org.globus.gsi.gssapi.GSSConstants;
 import org.ietf.jgss.GSSException;
 import org.ietf.jgss.Oid;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
new file mode 100644
index 0000000..1c07a39
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/GSSContextX509.java
@@ -0,0 +1,210 @@
+/*
+ *
+ * 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.ssh;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.globus.common.CoGProperties;
+import org.globus.gsi.gssapi.auth.HostAuthorization;
+import org.gridforum.jgss.ExtendedGSSCredential;
+import org.gridforum.jgss.ExtendedGSSManager;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.MessageProp;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.jcraft.jsch.JSchException;
+
+/**
+ * This class is based on GSSContextKrb5; it substitutes the globus
+ * ExtendedGSSManager and uses the SecurityUtils method to get the credential if
+ * one is not passed in from memory.
+ *
+ */
+public class GSSContextX509 implements com.jcraft.jsch.GSSContext {
+
+    private GSSContext context = null;
+    private GSSCredential credential;
+    private static final Logger logger = LoggerFactory.getLogger(GSSContextX509.class);
+
+    public void create(String user, String host) throws JSchException {
+        try {
+//			ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
+
+            if (credential == null) {
+                try {
+                    credential = getCredential();
+                } catch (SecurityException t) {
+                    System.out.printf("Could not get proxy: %s: %s\n", t.getClass().getSimpleName(), t.getMessage());
+                    throw new JSchException(t.toString());
+                }
+            }
+
+            String cname = host;
+
+            try {
+                cname = InetAddress.getByName(cname).getCanonicalHostName();
+            } catch (UnknownHostException e) {
+            }
+
+            GSSName name = HostAuthorization.getInstance().getExpectedName(credential, cname);
+
+//			context = manager.createContext(name, null, credential, GSSContext.DEFAULT_LIFETIME);
+//
+//			// RFC4462 3.4. GSS-API Session
+//			//
+//			// When calling GSS_Init_sec_context(), the client MUST set
+//			// integ_req_flag to "true" to request that per-message integrity
+//			// protection be supported for this context. In addition,
+//			// deleg_req_flag MAY be set to "true" to request access delegation,
+//			// if
+//			// requested by the user.
+//			//
+//			// Since the user authentication process by its nature authenticates
+//			// only the client, the setting of mutual_req_flag is not needed for
+//			// this process. This flag SHOULD be set to "false".
+//
+//			// TODO: OpenSSH's sshd does accept 'false' for mutual_req_flag
+//			// context.requestMutualAuth(false);
+//			context.requestMutualAuth(true);
+//			context.requestConf(true);
+//			context.requestInteg(true); // for MIC
+//			context.requestCredDeleg(true);
+//			context.requestAnonymity(false);
+
+//            context = new BCGSSContextImpl(name, (GlobusGSSCredentialImpl) credential);
+//            context.requestLifetime(GSSCredential.DEFAULT_LIFETIME);
+//            context.requestCredDeleg(true);
+//            context.requestMutualAuth(true);
+//            context.requestReplayDet(true);
+//            context.requestSequenceDet(true);
+//            context.requestConf(false);
+//            context.requestInteg(true);
+//            ((ExtendedGSSContext)context).setOption(GSSConstants.DELEGATION_TYPE, GSIConstants.DELEGATION_TYPE_FULL);
+
+            return;
+        } catch (GSSException ex) {
+            throw new JSchException(ex.toString());
+        }
+    }
+
+    private static GSSCredential getProxy() {
+        return getProxy(null, GSSCredential.DEFAULT_LIFETIME);
+    }
+
+    /**
+     * @param x509_USER_PROXY
+     *            path to the proxy.
+     * @param credentialLifetime
+     *            in seconds.
+     * @return valid credential.
+     *             if proxy task throws exception (or if proxy cannot be found).
+     */
+    private static GSSCredential getProxy(String x509_USER_PROXY, int credentialLifetime) throws SecurityException {
+        if (x509_USER_PROXY == null)
+            x509_USER_PROXY = System.getProperty("x509.user.proxy");
+
+//		if (x509_USER_PROXY == null) {
+//			SystemUtils.envToProperties();
+//			x509_USER_PROXY = System.getProperty("x509.user.proxy");
+//		}
+
+        if (x509_USER_PROXY == null || "".equals(x509_USER_PROXY))
+            x509_USER_PROXY = CoGProperties.getDefault().getProxyFile();
+
+        if (x509_USER_PROXY == null)
+            throw new SecurityException("could not get credential; no location defined");
+
+        ExtendedGSSManager manager = (ExtendedGSSManager) ExtendedGSSManager.getInstance();
+
+        // file...load file into a buffer
+        try {
+            File f = new File(x509_USER_PROXY);
+            byte[] data = new byte[(int) f.length()];
+            FileInputStream in = new FileInputStream(f);
+            // read in the credential data
+            in.read(data);
+            in.close();
+            return manager.createCredential(data, ExtendedGSSCredential.IMPEXP_OPAQUE, credentialLifetime, null, // use
+                    // default
+                    // mechanism
+                    // -
+                    // GSI
+                    GSSCredential.INITIATE_AND_ACCEPT);
+        } catch (Throwable t) {
+            throw new SecurityException("could not get credential from " + x509_USER_PROXY, t);
+        }
+    }
+
+    public boolean isEstablished() {
+        // this must check to see if the call returned GSS_S_COMPLETE
+        if (context != null){
+            return context.isEstablished();
+        }
+        return false;
+    }
+
+    public byte[] init(byte[] token, int s, int l) throws JSchException {
+        try {
+            if (context != null){
+                return context.initSecContext(token, s, l);
+            }else {
+                throw new JSchException("Context is null..");
+            }
+        } catch (GSSException ex) {
+            throw new JSchException(ex.toString());
+        }
+    }
+
+    public byte[] getMIC(byte[] message, int s, int l) {
+        try {
+            MessageProp prop = new MessageProp(0, false);
+            return context.getMIC(message, s, l, prop);
+        } catch (GSSException ex) {
+            logger.error(ex.getMessage(), ex);
+            return null;
+        }
+    }
+
+    public void dispose() {
+        try {
+            context.dispose();
+        } catch (GSSException ex) {
+        }
+    }
+
+    public void setCredential(GSSCredential credential) {
+        this.credential = credential;
+    }
+
+    public GSSCredential getCredential() {
+        return credential;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
new file mode 100644
index 0000000..beb5b37
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Cluster.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * 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.ssh.api;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.impl.JobStatus;
+
+import com.jcraft.jsch.Session;
+
+/**
+ * This interface represents a Cluster machine
+ * End users of the API can implement this and come up with their own
+ * implementations, but mostly this interface is for internal usage.
+ */
+public interface Cluster {
+
+    /**
+     * This will submit a job to the cluster with a given pbs file and some parameters
+     *
+     * @param pbsFilePath  path of the pbs file
+     * @param workingDirectory working directory where pbs should has to copy
+     * @return jobId after successful job submission
+     * @throws SSHApiException throws exception during error
+     */
+    public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
+
+    /**
+     * This will submit the given job and not performing any monitoring
+     *
+     * @param jobDescriptor  job descriptor to submit to cluster, this contains all the parameter
+     * @return jobID after successful job submission.
+     * @throws SSHApiException  throws exception during error
+     */
+    public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
+
+    /**
+     * This will copy the localFile to remoteFile location in configured cluster
+     *
+     * @param remoteFile remote file location, this can be a directory too
+     * @param localFile local file path of the file which needs to copy to remote location
+     * @throws SSHApiException throws exception during error
+     */
+    public void scpTo(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
+
+    /**
+     * This will copy a remote file in path rFile to local file lFile
+     * @param remoteFile remote file path, this has to be a full qualified path
+     * @param localFile This is the local file to copy, this can be a directory too
+     * @throws SSHApiException
+     */
+    public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
+    
+    /**
+     * This will create directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public void makeDirectory(String directoryPath) throws SSHApiException;
+
+
+    /**
+     * This will get the job description of a job which is there in the cluster
+     * if jbo is not available with the given ID it returns
+     * @param jobID jobId has to pass
+     * @return Returns full job description of the job which submitted successfully
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
+
+    /**
+     * This will delete the given job from the queue
+     *
+     * @param jobID  jobId of the job which user wants to delete
+     * @return return the description of the deleted job
+     * @throws SSHApiException throws exception during error
+     */
+    public JobDescriptor cancelJob(String jobID) throws SSHApiException;
+
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobID jobId of the job user want to get the status
+     * @return job status of the given jobID
+     * @throws SSHApiException throws exception during error
+     */
+    public JobStatus getJobStatus(String jobID) throws SSHApiException;
+    /**
+     * This will get the job status of the the job associated with this jobId
+     *
+     * @param jobName jobName of the job user want to get the status
+     * @return jobId of the given jobName
+     * @throws SSHApiException throws exception during error
+     */
+    public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
+
+    /**
+     * This method can be used to poll the jobstatuses based on the given
+     * user but we should pass the jobID list otherwise we will get unwanted
+     * job statuses which submitted by different middleware outside apache
+     * airavata with the same uername which we are not considering
+     * @param userName userName of the jobs which required to get the status
+     * @param jobIDs precises set of jobIDs
+     * @return
+     */
+    public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
+    /**
+     * This will list directories in computing resources
+     * @param directoryPath the full qualified path for the directory user wants to create
+     * @throws SSHApiException throws during error
+     */
+    public List<String> listDirectory(String directoryPath) throws SSHApiException;
+
+    /**
+     * This method can be used to get created ssh session
+     * to reuse the created session.
+     * @throws SSHApiException
+     */
+    public Session getSession() throws SSHApiException;
+    
+    /**
+     * This method can be used to close the connections initialized
+     * to handle graceful shutdown of the system
+     * @throws SSHApiException
+     */
+    public void disconnect() throws SSHApiException;
+
+    /**
+     * This gives the server Info
+     * @return
+     */
+    public ServerInfo getServerInfo();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
new file mode 100644
index 0000000..024c53d
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandExecutor.java
@@ -0,0 +1,278 @@
+/*
+ *
+ * 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.ssh.api;
+
+import com.jcraft.jsch.*;
+import org.apache.airavata.gfac.ssh.api.authentication.*;
+import org.apache.airavata.gfac.ssh.config.ConfigReader;
+import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch;
+import org.apache.airavata.gfac.ssh.util.SSHAPIUIKeyboardInteractive;
+import org.apache.airavata.gfac.ssh.util.SSHKeyPasswordHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This is a generic class which take care of command execution
+ * in a shell, this is used through out the other places of the API.
+ */
+public class CommandExecutor {
+    static {
+        JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509");
+        JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
+        JSch jSch = new JSch();
+    }
+
+    private static final Logger log = LoggerFactory.getLogger(CommandExecutor.class);
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+
+    /**
+     * This will execute the given command with given session and session is not closed at the end.
+     *
+     * @param commandInfo
+     * @param session
+     * @param commandOutput
+     * @throws SSHApiException
+     */
+    public static Session executeCommand(CommandInfo commandInfo, Session session,
+                                         CommandOutput commandOutput) throws SSHApiException {
+
+        String command = commandInfo.getCommand();
+
+        Channel channel = null;
+        try {
+            if (!session.isConnected()) {
+                session.connect();
+            }
+            channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+        } catch (JSchException e) {
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to execute command - ", e);
+        }
+
+        channel.setInputStream(null);
+        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command, e);
+        }
+
+
+        commandOutput.onOutput(channel);
+        //Only disconnecting the channel, session can be reused
+        channel.disconnect();
+        return session;
+    }
+
+    /**
+     * This will not reuse any session, it will create the session and close it at the end
+     *
+     * @param commandInfo        Encapsulated information about command. E.g :- executable name
+     *                           parameters etc ...
+     * @param serverInfo         The SSHing server information.
+     * @param authenticationInfo Security data needs to be communicated with remote server.
+     * @param commandOutput      The output of the command.
+     * @param configReader       configuration required for ssh/gshissh connection
+     * @throws SSHApiException   throw exception when error occurs
+     */
+    public static void executeCommand(CommandInfo commandInfo, ServerInfo serverInfo,
+                                      AuthenticationInfo authenticationInfo,
+                                      CommandOutput commandOutput, ConfigReader configReader) throws SSHApiException {
+
+        if (authenticationInfo instanceof GSIAuthenticationInfo) {
+            System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo)authenticationInfo).getProperties().
+                    get("X509_CERT_DIR"));
+        }
+
+
+        JSch jsch = new ExtendedJSch();
+
+        log.debug("Connecting to server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + " with user name - "
+                + serverInfo.getUserName());
+
+        Session session;
+
+        try {
+            session = jsch.getSession(serverInfo.getUserName(), serverInfo.getHost(), serverInfo.getPort());
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while creating SSH session." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        java.util.Properties config = configReader.getProperties();
+        session.setConfig(config);
+
+        //=============================================================
+        // Handling vanilla SSH pieces
+        //=============================================================
+        if (authenticationInfo instanceof SSHPasswordAuthentication) {
+            String password = ((SSHPasswordAuthentication) authenticationInfo).
+                    getPassword(serverInfo.getUserName(), serverInfo.getHost());
+
+            session.setUserInfo(new SSHAPIUIKeyboardInteractive(password));
+
+            // TODO figure out why we need to set password to session
+            session.setPassword(password);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyFileAuthentication) {
+            SSHPublicKeyFileAuthentication sshPublicKeyFileAuthentication
+                    = (SSHPublicKeyFileAuthentication)authenticationInfo;
+
+            String privateKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The private key file for vanilla SSH " + privateKeyFile);
+
+            String publicKeyFile = sshPublicKeyFileAuthentication.
+                    getPrivateKeyFile(serverInfo.getUserName(), serverInfo.getHost());
+
+            logDebug("The public key file for vanilla SSH " + publicKeyFile);
+
+            Identity identityFile;
+
+            try {
+                identityFile = GSISSHIdentityFile.newInstance(privateKeyFile, null, jsch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using files. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName() + " private key file - " + privateKeyFile + ", public key file - " +
+                        publicKeyFile, e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        } else if (authenticationInfo instanceof SSHPublicKeyAuthentication) {
+
+            SSHPublicKeyAuthentication sshPublicKeyAuthentication
+                    = (SSHPublicKeyAuthentication)authenticationInfo;
+
+            Identity identityFile;
+
+            try {
+                String name = serverInfo.getUserName() + "_" + serverInfo.getHost();
+                identityFile = GSISSHIdentityFile.newInstance(name,
+                        sshPublicKeyAuthentication.getPrivateKey(serverInfo.getUserName(), serverInfo.getHost()),
+                        sshPublicKeyAuthentication.getPublicKey(serverInfo.getUserName(), serverInfo.getHost()), jsch);
+            } catch (JSchException e) {
+                throw new SSHApiException("An exception occurred while initializing keys using byte arrays. " +
+                        "(private key and public key)." +
+                        "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                        " connecting user name - "
+                        + serverInfo.getUserName(), e);
+            }
+
+            // Add identity to identity repository
+            GSISSHIdentityRepository identityRepository = new GSISSHIdentityRepository(jsch);
+            identityRepository.add(identityFile);
+
+            // Set repository to session
+            session.setIdentityRepository(identityRepository);
+
+            // Set the user info
+            SSHKeyPasswordHandler sshKeyPasswordHandler
+                    = new SSHKeyPasswordHandler((SSHKeyAuthentication)authenticationInfo);
+
+            session.setUserInfo(sshKeyPasswordHandler);
+
+        }
+
+        // Not a good way, but we dont have any choice
+        if (session instanceof ExtendedSession) {
+            if (authenticationInfo instanceof GSIAuthenticationInfo) {
+                ((ExtendedSession) session).setAuthenticationInfo((GSIAuthenticationInfo)authenticationInfo);
+            }
+        }
+
+        try {
+            session.connect();
+        } catch (JSchException e) {
+            throw new SSHApiException("An exception occurred while connecting to server." +
+                    "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        String command = commandInfo.getCommand();
+
+        Channel channel;
+        try {
+            channel = session.openChannel("exec");
+            ((ChannelExec) channel).setCommand(command);
+        } catch (JSchException e) {
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to execute command - " + command +
+                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+
+        channel.setInputStream(null);
+        ((ChannelExec) channel).setErrStream(commandOutput.getStandardError());
+
+        try {
+            channel.connect();
+        } catch (JSchException e) {
+
+            channel.disconnect();
+//            session.disconnect();
+
+            throw new SSHApiException("Unable to retrieve command output. Command - " + command +
+                    " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
+                    " connecting user name - "
+                    + serverInfo.getUserName(), e);
+        }
+
+        commandOutput.onOutput(channel);
+
+        channel.disconnect();
+//        session.disconnect();
+    }
+
+    private static void logDebug(String message) {
+        if (log.isDebugEnabled()) {
+            log.debug(message);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
new file mode 100644
index 0000000..e6797ce
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandInfo.java
@@ -0,0 +1,34 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulates information about
+ */
+public interface CommandInfo {
+
+    /**
+     * Gets the executable command as a string.
+     * @return String encoded command. Should be able to execute
+     * directly on remote shell. Should includes appropriate parameters.
+     */
+    String getCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
new file mode 100644
index 0000000..f275ff0
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/CommandOutput.java
@@ -0,0 +1,49 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+
+import com.jcraft.jsch.Channel;
+
+import java.io.OutputStream;
+
+/**
+ * Output of a certain command. TODO rethink
+ */
+public interface CommandOutput {
+
+    /**
+     * Gets the output of the command as a stream.
+     * @param  channel Command output as a stream.
+     */
+    void onOutput(Channel channel);
+
+    /**
+     * Gets standard error as a output stream.
+     * @return Command error as a stream.
+     */
+    OutputStream getStandardError();
+
+    /**
+     * The command exit code.
+     * @param code The program exit code
+     */
+    void exitCode(int code);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
new file mode 100644
index 0000000..67dd043
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Core.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * 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.ssh.api;
+
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+
+/**
+ * This represents a CPU core of a machine in the cluster
+ */
+public class Core {
+    private JobDescriptor job;
+    private String id;
+
+    public Core(String id) {
+        this.id = id;
+        this.job = null;
+    }
+
+    /**
+     * @return core's id
+     */
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * @return job running on the core
+     */
+    public JobDescriptor getJob() {
+        return job;
+    }
+
+    public void setJob(JobDescriptor job) {
+        this.job = job;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
new file mode 100644
index 0000000..1515f39
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/Node.java
@@ -0,0 +1,104 @@
+/*
+ *
+ * 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.ssh.api;
+
+import java.util.HashMap;
+
+public class Node {
+    private String Name;
+    private Core[] Cores;
+    private String state;
+    private HashMap<String, String> status;
+    private String np;
+    private String ntype;
+
+    /**
+     * @return the machine's name
+     */
+    public String getName() {
+        return Name;
+    }
+
+    public void setName(String Name) {
+        this.Name = Name;
+    }
+
+    /**
+     * @return machine cores as an array
+     */
+    public Core[] getCores() {
+        return Cores;
+    }
+
+    public void setCores(Core[] Cores) {
+        this.Cores = Cores;
+    }
+
+
+    /**
+     * @return the machine state
+     */
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    /**
+     * @return the status
+     */
+    public HashMap<String, String> getStatus() {
+        return status;
+    }
+
+    public void setStatus(HashMap<String, String> status) {
+        this.setStatus(status);
+    }
+
+
+    /**
+     * @return the number of cores in the machine
+     */
+    public String getNp() {
+        return np;
+    }
+
+
+    public void setNp(String np) {
+        this.np = np;
+    }
+
+    /**
+     * @return the ntype of the machine
+     */
+    public String getNtype() {
+        return ntype;
+    }
+
+
+    public void setNtype(String ntype) {
+        this.ntype = ntype;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
new file mode 100644
index 0000000..f78825b
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/SSHApiException.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.ssh.api;
+
+/**
+ * An exception class to wrap SSH command execution related errors.
+ */
+public class SSHApiException extends Exception {
+
+    public SSHApiException(String message) {
+        super(message);
+    }
+
+    public SSHApiException(String message, Exception e) {
+        super(message, e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
new file mode 100644
index 0000000..d3c2160
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/ServerInfo.java
@@ -0,0 +1,65 @@
+package org.apache.airavata.gfac.ssh.api;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulate server information.
+ */
+public class ServerInfo {
+
+    private String host;
+    private String userName;
+    private int port = 22;
+
+    public ServerInfo(String userName, String host) {
+        this.userName = userName;
+        this.host = host;
+    }
+
+    public ServerInfo(String userName,String host,  int port) {
+        this.host = host;
+        this.userName = userName;
+        this.port = port;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/AuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/AuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/AuthenticationInfo.java
new file mode 100644
index 0000000..6b4e913
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/AuthenticationInfo.java
@@ -0,0 +1,32 @@
+package org.apache.airavata.gfac.ssh.api.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:25 AM
+ */
+
+/**
+ * An empty interface that represents authentication data to the API.
+ */
+public interface AuthenticationInfo {
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/GSIAuthenticationInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
new file mode 100644
index 0000000..1f327f0
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/GSIAuthenticationInfo.java
@@ -0,0 +1,43 @@
+package org.apache.airavata.gfac.ssh.api.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+import org.ietf.jgss.GSSCredential;
+
+import java.util.Properties;
+
+/**
+ * Authentication data. Could be MyProxy user name, password, could be GSSCredentials
+ * or could be SSH keys.
+ */
+public abstract class GSIAuthenticationInfo implements AuthenticationInfo {
+
+    public Properties properties = new Properties();
+
+    public abstract GSSCredential getCredentials() throws SecurityException;
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHKeyAuthentication.java
new file mode 100644
index 0000000..ebd79f2
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHKeyAuthentication.java
@@ -0,0 +1,46 @@
+package org.apache.airavata.gfac.ssh.api.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 2:39 PM
+ */
+
+/**
+ * Abstracts out common methods for SSH key authentication.
+ */
+public interface SSHKeyAuthentication extends AuthenticationInfo {
+
+    /**
+     * This is needed only if private key and public keys are encrypted.
+     * If they are not encrypted we can just return null.
+     * @return User should return pass phrase if keys are encrypted. If not null.
+     */
+    String getPassPhrase();
+
+    /**
+     * Callback with the banner message. API user can get hold of banner message
+     * by implementing this method.
+     * @param message The banner message.
+     */
+    void bannerMessage(String message);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPasswordAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
new file mode 100644
index 0000000..fd884f8
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPasswordAuthentication.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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.ssh.api.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 11:22 AM
+ */
+
+/**
+ * Password authentication for vanilla SSH.
+ */
+public interface SSHPasswordAuthentication extends AuthenticationInfo {
+
+    /**
+     * Gets the password for given host name and given user name.
+     * @param userName The connecting user name name.
+     * @param hostName The connecting host.
+     * @return Password for the given user.
+     */
+    String getPassword(String userName, String hostName);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
new file mode 100644
index 0000000..dcedfec
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyAuthentication.java
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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.ssh.api.authentication;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 9:48 AM
+ */
+
+
+/**
+ * Public key authentication for vanilla SSH.
+ * The public key and private key are returned as byte arrays. Useful when we store private key/public key
+ * in a secure storage such as credential store. API user should implement this.
+ */
+public interface SSHPublicKeyAuthentication extends SSHKeyAuthentication {
+
+    /**
+     * Gets the public key as byte array.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The public key as a byte array.
+     */
+    byte[] getPrivateKey(String userName, String hostName);
+
+    /**
+     * Gets the private key as byte array.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The private key as a byte array.
+     */
+    byte[] getPublicKey(String userName, String hostName);
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
new file mode 100644
index 0000000..e22b9af
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/authentication/SSHPublicKeyFileAuthentication.java
@@ -0,0 +1,52 @@
+package org.apache.airavata.gfac.ssh.api.authentication;/*
+ *
+ * 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.
+ *
+ */
+
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 10/4/13
+ * Time: 9:52 AM
+ */
+
+/**
+ * Public key authentication for vanilla SSH.
+ * The public key and private key stored files are returned. API user should implement this.
+ */
+public interface SSHPublicKeyFileAuthentication extends SSHKeyAuthentication {
+
+    /**
+     * The file which contains the public key.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The name of the file which contains the public key.
+     */
+    String getPublicKeyFile(String userName, String hostName);
+
+    /**
+     * The file which contains the public key.
+     * @param userName The user who is trying to SSH
+     * @param hostName The host which user wants to connect to.
+     * @return The name of the file which contains the private key.
+     */
+    String getPrivateKeyFile(String userName, String hostName);
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
new file mode 100644
index 0000000..7e936ec
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobDescriptor.java
@@ -0,0 +1,473 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.api.CommandOutput;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.apache.airavata.gfac.ssh.x2012.x12.*;
+import org.apache.xmlbeans.XmlException;
+
+import java.util.List;
+
+/**
+ * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
+ * submit the job to the computing resource
+ */
+public class JobDescriptor {
+
+    private JobDescriptorDocument jobDescriptionDocument;
+
+
+    public JobDescriptor() {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+    public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
+        this.jobDescriptionDocument = jobDescriptorDocument;
+    }
+
+
+    public JobDescriptor(CommandOutput commandOutput) {
+        jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+        jobDescriptionDocument.addNewJobDescriptor();
+    }
+
+
+    public String toXML() {
+        return jobDescriptionDocument.xmlText();
+    }
+
+    public JobDescriptorDocument getJobDescriptorDocument() {
+        return this.jobDescriptionDocument;
+    }
+
+    /**
+     * With new app catalog thrift object integration, we don't use this
+     * @param xml
+     * @return
+     * @throws XmlException
+     */
+    @Deprecated
+    public static JobDescriptor fromXML(String xml)
+            throws XmlException {
+        JobDescriptorDocument parse = JobDescriptorDocument.Factory
+                .parse(xml);
+        JobDescriptor jobDescriptor = new JobDescriptor(parse);
+        return jobDescriptor;
+    }
+
+
+    //todo write bunch of setter getters to set and get jobdescription parameters
+    public void setWorkingDirectory(String workingDirectory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
+    }
+
+    public String getWorkingDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
+    }
+
+    public void setShellName(String shellName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
+    }
+
+    public void setJobName(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
+    }
+
+    public void setExecutablePath(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
+    }
+
+    public void setAllEnvExport(boolean name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
+    }
+
+    public void setMailOptions(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
+    }
+
+    public void setStandardOutFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
+    }
+
+    public void setStandardErrorFile(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
+    }
+
+    public void setNodes(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
+    }
+
+    public void setProcessesPerNode(int name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
+    }
+
+    public String getOutputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
+    }
+
+    public String getInputDirectory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
+    }
+    public void setOutputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
+    }
+
+    public void setInputDirectory(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
+    }
+
+    /**
+     * Users can pass the minute count for maxwalltime
+     * @param minutes
+     */
+    public void setMaxWallTime(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                CommonUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
+
+    }
+
+
+    public void setMaxWallTimeForLSF(String minutes) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+                CommonUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
+
+    }
+    public void setAcountString(String name) {
+        this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
+    }
+
+    public void setInputValues(List<String> inputValue) {
+        InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
+        inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
+    }
+
+    public void setJobID(String jobID) {
+        this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
+    }
+
+    public void setQueueName(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
+    }
+
+    public void setStatus(String queueName) {
+        this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
+    }
+
+    public void setAfterAnyList(String[] afterAnyList) {
+        AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
+        afterAny.setAfterAnyArray(afterAnyList);
+    }
+
+    public void setAfterOKList(String[] afterOKList) {
+        AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
+        afterAnyList.setAfterOKListArray(afterOKList);
+    }
+    public void setCTime(String cTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
+    }
+    public void setQTime(String qTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
+    }
+    public void setMTime(String mTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
+    }
+    public void setSTime(String sTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
+    }
+    public void setCompTime(String compTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
+    }
+    public void setOwner(String owner) {
+        this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
+    }
+    public void setExecuteNode(String executeNode) {
+        this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
+    }
+    public void setEllapsedTime(String ellapsedTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
+    }
+
+    public void setUsedCPUTime(String usedCPUTime) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
+    }
+    public void setCPUCount(int usedCPUTime) {
+            this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
+        }
+    public void setUsedMemory(String usedMemory) {
+        this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
+    }
+    public void setVariableList(String variableList) {
+        this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
+    }
+    public void setSubmitArgs(String submitArgs) {
+        this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
+    }
+
+    public void setPreJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
+    }
+
+     public void setPostJobCommands(String[] commands){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
+    }
+
+    public void setModuleLoadCommands(String[] commands) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
+    }
+
+    public void addModuleLoadCommands(String command) {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+            this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
+    }
+
+    public void addPreJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
+    }
+
+     public void addPostJobCommand(String command){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+            this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+        }
+        this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
+    }
+
+    public void setPartition(String partition){
+        this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
+    }
+
+     public void setUserName(String userName){
+        this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
+    }
+     public void setNodeList(String nodeList){
+        this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
+    }
+    public void setJobSubmitter(String jobSubmitter){
+           this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
+    }
+    public String getNodeList(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
+    }
+    public String getExecutablePath() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
+    }
+
+    public boolean getAllEnvExport() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
+    }
+
+    public String getMailOptions() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
+    }
+
+    public String getStandardOutFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
+    }
+
+    public String getStandardErrorFile() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
+    }
+
+    public int getNodes(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
+    }
+
+    public int getCPUCount(int name) {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
+    }
+
+    public int getProcessesPerNode() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
+    }
+
+    public String getMaxWallTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
+    }
+
+    public String getAcountString() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
+    }
+
+    public String[] getInputValues() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
+    }
+
+    public String getJobID() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String getQueueName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
+    }
+
+    public String getStatus() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
+    }
+
+    public String[] getAfterAnyList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
+    }
+
+    public String[] getAfterOKList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
+    }
+    public String getCTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
+    }
+    public String getQTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
+    }
+    public String getMTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
+    }
+    public String getSTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
+    }
+    public String getCompTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
+    }
+    public String getOwner() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
+    }
+    public String getExecuteNode() {
+         return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
+    }
+    public String getEllapsedTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
+    }
+
+    public String getUsedCPUTime() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
+    }
+
+    public String getUsedMemory() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
+    }
+    public void getShellName() {
+        this.getJobDescriptorDocument().getJobDescriptor().getShellName();
+    }
+
+    public String getJobName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
+    }
+
+    public String getJobId() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+
+    public String getVariableList() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+    public String getSubmitArgs() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+    }
+
+    public String[] getPostJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getModuleCommands() {
+        if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String[] getPreJobCommands(){
+        if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
+            return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
+        }
+        return null;
+    }
+
+    public String getJobSubmitterCommand(){
+          return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
+    }
+
+    public String getPartition(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
+    }
+
+    public String getUserName(){
+        return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
+    }
+
+    public void setCallBackIp(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
+    }
+
+    public void setCallBackPort(String ip){
+        this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
+    }
+
+
+    public String getCallBackIp(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
+    }
+    public String getCallBackPort(){
+        return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
+    }
+
+    public void setMailType(String emailType) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
+    }
+
+    public String getMailType() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
+    }
+    public void setMailAddress(String emailAddress) {
+        this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
+    }
+
+    public String getMailAddress() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
+    }
+
+    public String getChassisName() {
+        return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
+    }
+
+    public void setChassisName(String chassisName){
+        this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
+    }
+    
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
new file mode 100644
index 0000000..d58a994
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobManagerConfiguration.java
@@ -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.ssh.api.job;
+
+import org.apache.airavata.gfac.ssh.impl.RawCommandInfo;
+
+public interface JobManagerConfiguration {
+
+	public RawCommandInfo getCancelCommand(String jobID);
+
+	public String getJobDescriptionTemplateName();
+
+	public RawCommandInfo getMonitorCommand(String jobID);
+
+	public RawCommandInfo getUserBasedMonitorCommand(String userName);
+
+    public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
+
+	public String getScriptExtension();
+
+	public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
+
+	public OutputParser getParser();
+
+	public String getInstalledPath();
+
+	public String getBaseCancelCommand();
+
+	public String getBaseMonitorCommand();
+
+	public String getBaseSubmitCommand();
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
new file mode 100644
index 0000000..556f4ef
--- /dev/null
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gfac/gsi/ssh/api/job/JobType.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.ssh.api.job;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: lahirugunathilake
+ * Date: 8/22/13
+ * Time: 7:19 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public enum JobType {
+            SERIAL, SINGLE, MPI, MULTIPLE, CONDOR
+}


[35/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
deleted file mode 100644
index 14fd7fe..0000000
--- a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-    /*
-     * 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.
-     */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.gfac.cpi;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class gfac_cpi_serviceConstants {
-
-  public static final String GFAC_CPI_VERSION = "0.13.0";
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
index 77057ee..7b369f7 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/handlers/AbstractSMSHandler.java
@@ -36,7 +36,7 @@ import org.apache.airavata.gfac.bes.utils.StorageCreator;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandler;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index bd98835..56d0679 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -34,14 +34,10 @@ import org.apache.airavata.gfac.bes.utils.JSDLGenerator;
 import org.apache.airavata.gfac.bes.utils.SecurityUtils;
 import org.apache.airavata.gfac.bes.utils.StorageCreator;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
-import org.apache.airavata.gfac.core.notification.events.StatusChangeEvent;
-import org.apache.airavata.gfac.core.notification.events.UnicoreJobIDEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
@@ -150,7 +146,6 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
 
             log.info(String.format("Activity Submitting to %s ... \n",
                     factoryUrl));
-            jobExecutionContext.getMonitorPublisher().publish(new StartExecutionEvent());
             CreateActivityResponseDocument response = factory.createActivity(cad);
             log.info(String.format("Activity Submitted to %s \n", factoryUrl));
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/SecurityUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/SecurityUtils.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/SecurityUtils.java
index 74eefb4..ede44d4 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/SecurityUtils.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/SecurityUtils.java
@@ -43,7 +43,7 @@ import org.apache.airavata.gfac.RequestData;
 import org.apache.airavata.gfac.bes.security.UNICORESecurityContext;
 import org.apache.airavata.gfac.bes.security.X509SecurityContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.gfac.core.GFacUtils;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
 import org.bouncycastle.asn1.ASN1InputStream;
 import org.bouncycastle.asn1.x500.X500Name;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/pom.xml b/modules/gfac/gfac-client/pom.xml
new file mode 100644
index 0000000..f94d85b
--- /dev/null
+++ b/modules/gfac/gfac-client/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>gfac</artifactId>
+        <groupId>org.apache.airavata</groupId>
+        <version>0.16-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <name>Airavata Gfac Client SDK</name>
+    <artifactId>airavata-gfac-stubs</artifactId>
+    <packaging>jar</packaging>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${org.slf4j.version}</version>
+        </dependency>
+      	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-model-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-configuration</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    </properties>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
new file mode 100644
index 0000000..0e1aa56
--- /dev/null
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFACInstance.java
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.client;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class represent the data related to gfac instances
+ * if orchestrator is running on non-embedded mode,
+ * This information can be used to do better load balancing between
+ * different gfac instances
+ */
+public class GFACInstance {
+    private final static Logger logger = LoggerFactory.getLogger(GFACInstance.class);
+
+    private String gfacURL;
+
+    private int currentLoad;
+
+    private int gfacPort;
+
+
+    public GFACInstance(String gfacURL, int gfacPort) {
+        this.gfacURL = gfacURL;
+        this.gfacPort = gfacPort;
+    }
+
+    public String getGfacURL() {
+        return gfacURL;
+    }
+
+    public void setGfacURL(String gfacURL) {
+        this.gfacURL = gfacURL;
+    }
+
+    public int getCurrentLoad() {
+        return currentLoad;
+    }
+
+    public void setCurrentLoad(int currentLoad) {
+        this.currentLoad = currentLoad;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
new file mode 100644
index 0000000..89f751d
--- /dev/null
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/client/GFacClientFactory.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.client;
+
+import org.apache.airavata.gfac.cpi.GfacService;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+
+public class GFacClientFactory {
+    public static GfacService.Client createGFacClient(String serverHost, int serverPort){
+          try {
+              TTransport transport = new TSocket(serverHost, serverPort);
+              transport.open();
+              TProtocol protocol = new TBinaryProtocol(transport);
+              return new GfacService.Client(protocol);
+          } catch (TTransportException e) {
+              e.printStackTrace();
+          }
+          return null;
+      }
+}


[30/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskOutputDataChangedEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskOutputDataChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskOutputDataChangedEvent.java
deleted file mode 100644
index db7ee59..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskOutputDataChangedEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-///*
-//*
-//* 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.core.monitor.state;
-//
-//import java.util.List;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-//import org.apache.airavata.model.workspace.experiment.DataObjectType;
-//
-///**
-//* This is the primary job state object used in
-//* through out the monitor module. This use airavata-data-model JobState enum
-//* Ideally after processing each event or monitoring message from remote system
-//* Each monitoring implementation has to return this object with a state and
-//* the monitoring ID
-//*/
-//public class TaskOutputDataChangedEvent extends AbstractStateChangeRequest {
-//    private List<DataObjectType> output;
-//    private TaskIdentity identity;
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public TaskOutputDataChangedEvent() {
-//    }
-//
-//    public TaskOutputDataChangedEvent(TaskIdentity taskIdentity, List<DataObjectType> output) {
-//        this.output = output;
-//        setIdentity(taskIdentity);
-//    }
-//
-//	public TaskIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(TaskIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//	public List<DataObjectType> getOutput() {
-//		return output;
-//	}
-//
-//	public void setOutput(List<DataObjectType> output) {
-//		this.output = output;
-//	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java
deleted file mode 100644
index 90b5387..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-///*
-// *
-// * 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.core.monitor.state;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-//import org.apache.airavata.model.workspace.experiment.TaskState;
-//
-///**
-// * This is the primary job state object used in
-// * through out the monitor module. This use airavata-data-model JobState enum
-// * Ideally after processing each event or monitoring message from remote system
-// * Each monitoring implementation has to return this object with a state and
-// * the monitoring ID
-// */
-//public class TaskStatusChangeRequest extends AbstractStateChangeRequest {
-//    private TaskState state;
-//    private TaskIdentity identity;
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public TaskStatusChangeRequest() {
-//    }
-//
-//    public TaskStatusChangeRequest(TaskIdentity taskIdentity, TaskState state) {
-//        this.state = state;
-//        setIdentity(taskIdentity);
-//    }
-//
-//    public TaskState getState() {
-//        return state;
-//    }
-//
-//    public void setState(TaskState state) {
-//       this.state = state;
-//    }
-//
-//	public TaskIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(TaskIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java
deleted file mode 100644
index 6aabe07..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java
+++ /dev/null
@@ -1,62 +0,0 @@
-///*
-// *
-// * 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.core.monitor.state;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-//import org.apache.airavata.model.workspace.experiment.TaskState;
-//
-///**
-// * This is the primary job state object used in
-// * through out the monitor module. This use airavata-data-model JobState enum
-// * Ideally after processing each event or monitoring message from remote system
-// * Each monitoring implementation has to return this object with a state and
-// * the monitoring ID
-// */
-//public class TaskStatusChangedEvent extends AbstractStateChangeRequest {
-//    private TaskState state;
-//    private TaskIdentity identity;
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public TaskStatusChangedEvent() {
-//    }
-//
-//    public TaskStatusChangedEvent(TaskIdentity taskIdentity, TaskState state) {
-//        this.state = state;
-//        setIdentity(taskIdentity);
-//    }
-//
-//    public TaskState getState() {
-//        return state;
-//    }
-//
-//    public void setState(TaskState state) {
-//       this.state = state;
-//    }
-//
-//	public TaskIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(TaskIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java
deleted file mode 100644
index 064338b..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-///*
-// *
-// * 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.core.monitor.state;
-//
-//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest;
-//import org.apache.airavata.gfac.core.monitor.WorkflowNodeIdentity;
-//import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
-//
-///**
-// * This is the primary job state object used in
-// * through out the monitor module. This use airavata-data-model JobState enum
-// * Ideally after processing each event or monitoring message from remote system
-// * Each monitoring implementation has to return this object with a state and
-// * the monitoring ID
-// */
-//public class WorkflowNodeStatusChangedEvent extends AbstractStateChangeRequest {
-//    private WorkflowNodeState state;
-//    private WorkflowNodeIdentity identity;
-//
-//    // this constructor can be used in Qstat monitor to handle errors
-//    public WorkflowNodeStatusChangedEvent() {
-//    }
-//
-//    public WorkflowNodeStatusChangedEvent(WorkflowNodeIdentity identity, WorkflowNodeState state) {
-//        this.state = state;
-//        setIdentity(identity);
-//    }
-//
-//    public WorkflowNodeState getState() {
-//        return state;
-//    }
-//
-//    public void setState(WorkflowNodeState state) {
-//       this.state = state;
-//    }
-//
-//	public WorkflowNodeIdentity getIdentity() {
-//		return identity;
-//	}
-//
-//	public void setIdentity(WorkflowNodeIdentity identity) {
-//		this.identity = identity;
-//	}
-//
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/GFacNotifier.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/GFacNotifier.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/GFacNotifier.java
deleted file mode 100644
index 40ffdcc..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/GFacNotifier.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * 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.core.notification;
-
-import com.google.common.eventbus.EventBus;
-import org.apache.airavata.gfac.core.notification.events.GFacEvent;
-
-public class GFacNotifier {
-    private EventBus eventBus;
-
-    public GFacNotifier(){
-        eventBus = new EventBus();
-    }
-
-    public void registerListener(Object listener){
-        eventBus.register(listener);
-    }
-
-    public void publish(GFacEvent event){
-        eventBus.post(event);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
deleted file mode 100644
index 98fdc19..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
+++ /dev/null
@@ -1,47 +0,0 @@
-///*
-// *
-// * 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.core.notification;
-//
-//import com.google.common.eventbus.EventBus;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//public class MonitorPublisher{
-//    private final static Logger logger = LoggerFactory.getLogger(MonitorPublisher.class);
-//    private EventBus eventBus;
-//    
-//    public MonitorPublisher(EventBus eventBus) {
-//        this.eventBus = eventBus;
-//    }
-//
-//    public void registerListener(Object listener) {
-//        eventBus.register(listener);
-//    }
-//    
-//    public void unregisterListener(Object listener) {
-//        eventBus.unregister(listener);
-//    }
-//
-//    public void publish(Object o) {
-//        eventBus.post(o);
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/ExecutionFailEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/ExecutionFailEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/ExecutionFailEvent.java
deleted file mode 100644
index a7fd986..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/ExecutionFailEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class ExecutionFailEvent extends GFacEvent {
-    private Throwable cause;
-
-    public ExecutionFailEvent(Throwable cause){
-        this.eventType = ExecutionFailEvent.class.getSimpleName();
-        this.cause = cause;
-    }
-
-    public Throwable getCauseForFailure(){
-        return cause;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishExecutionEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishExecutionEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishExecutionEvent.java
deleted file mode 100644
index 426b182..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishExecutionEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class FinishExecutionEvent  extends GFacEvent{
-
-    public FinishExecutionEvent(){
-        this.eventType = FinishExecutionEvent.class.getSimpleName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishScheduleEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishScheduleEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishScheduleEvent.java
deleted file mode 100644
index 5924aba..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/FinishScheduleEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class FinishScheduleEvent extends GFacEvent {
-
-    public FinishScheduleEvent(){
-        this.eventType = FinishScheduleEvent.class.getSimpleName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/GFacEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/GFacEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/GFacEvent.java
deleted file mode 100644
index 5b49730..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/GFacEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-
-public abstract class GFacEvent {
-
-    protected JobExecutionContext executionContext;
-
-    protected String eventType;
-
-    public JobExecutionContext getJobExecutionContext(){
-        return executionContext;
-    }
-
-    public String getEventType(){
-        return eventType;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/JobIDEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/JobIDEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/JobIDEvent.java
deleted file mode 100644
index 4f13391..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/JobIDEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class JobIDEvent extends GFacEvent {
-	String statusMessage;
-
-	public JobIDEvent(String message) {
-		statusMessage = message;
-		this.eventType = JobIDEvent.class.getSimpleName();
-	}
-
-	public String getStatusMessage() {
-		return statusMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartExecutionEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartExecutionEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartExecutionEvent.java
deleted file mode 100644
index 5ab65c1..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartExecutionEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class StartExecutionEvent extends GFacEvent {
-
-    public StartExecutionEvent(){
-        this.eventType = StartExecutionEvent.class.getSimpleName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartScheduleEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartScheduleEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartScheduleEvent.java
deleted file mode 100644
index 7abdb22..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StartScheduleEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class StartScheduleEvent extends GFacEvent {
-
-    public StartScheduleEvent(){
-        this.eventType = StartScheduleEvent.class.getSimpleName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StatusChangeEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StatusChangeEvent.java
deleted file mode 100644
index b5f964f..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/StatusChangeEvent.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class StatusChangeEvent extends GFacEvent {
-    String statusMessage;
-    public StatusChangeEvent(String message){
-        statusMessage = message;
-        this.eventType = StatusChangeEvent.class.getSimpleName();
-    }
-
-    public String getStatusMessage() {
-        return statusMessage;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/UnicoreJobIDEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/UnicoreJobIDEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/UnicoreJobIDEvent.java
deleted file mode 100644
index 98dddaf..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/events/UnicoreJobIDEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * 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.core.notification.events;
-
-public class UnicoreJobIDEvent extends GFacEvent {
-	String statusMessage;
-
-	public UnicoreJobIDEvent(String message) {
-		statusMessage = message;
-		this.eventType = UnicoreJobIDEvent.class.getSimpleName();
-	}
-
-	public String getStatusMessage() {
-		return statusMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/LoggingListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/LoggingListener.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/LoggingListener.java
deleted file mode 100644
index 809b9d5..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/LoggingListener.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * 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.core.notification.listeners;
-
-import com.google.common.eventbus.Subscribe;
-import org.apache.airavata.gfac.core.notification.events.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class LoggingListener {
-    private static Logger log = LoggerFactory.getLogger("gfac-logginglistener");
-
-    @Subscribe
-    public void logGFacEvent(GFacEvent e){
-        log.info("GFac event of type " + e.getEventType() + " received.");
-    }
-
-    @Subscribe
-    public void logExecutionFail(ExecutionFailEvent e){
-        log.error("Execution failed." + e.getEventType());
-    }
-
-    @Subscribe
-    public void logFinishExecutionEvent(FinishExecutionEvent event){
-        log.info("Execution has Finished ...");
-    }
-
-    @Subscribe
-    public void logStartExecutionEvent(StartExecutionEvent event){
-        log.info("Execution has started ...");
-    }
-
-    @Subscribe
-    public void logStatusChangeEvent(StatusChangeEvent event){
-        log.info("Job status has changed ...");
-        log.info(event.getStatusMessage());
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/WorkflowTrackingListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/WorkflowTrackingListener.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/WorkflowTrackingListener.java
deleted file mode 100644
index 1ff9346..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/listeners/WorkflowTrackingListener.java
+++ /dev/null
@@ -1,133 +0,0 @@
-///*
-// *
-// * 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.core.notification.listeners;
-//
-//import com.google.common.eventbus.Subscribe;
-//import org.apache.airavata.gfac.core.notification.events.*;
-//import org.apache.airavata.workflow.tracking.Notifier;
-//import org.apache.airavata.workflow.tracking.NotifierFactory;
-//import org.apache.airavata.workflow.tracking.common.DurationObj;
-//import org.apache.airavata.workflow.tracking.common.InvocationEntity;
-//import org.apache.airavata.workflow.tracking.common.WorkflowTrackingContext;
-//
-//import java.net.URI;
-//import java.util.Properties;
-//
-//public class WorkflowTrackingListener {
-//
-//    private Notifier notifier;
-//
-//    private String topic;
-//
-//    private URI workflowID;
-//
-//    private WorkflowTrackingContext context;
-//
-//    private InvocationEntity initiator;
-//
-//    private InvocationEntity receiver;
-//
-//    private DurationObj duration;
-//
-//    private org.apache.airavata.workflow.tracking.common.InvocationContext invocationContext;
-//
-//    public WorkflowTrackingListener(String workflowID, String workflowNodeID, String brokerURL, String topic){
-//        this.topic = topic;
-//        this.workflowID = URI.create(this.topic);
-//        this.notifier = NotifierFactory.createNotifier();
-//        URI initiatorWorkflowID = URI.create(workflowID);
-//        URI initiatorServiceID = URI.create(topic);
-//        String initiatorWorkflowNodeID = workflowNodeID;
-//        Integer initiatorWorkflowTimeStep = null;
-//        this.context = this.notifier.createTrackingContext(new Properties(), brokerURL, initiatorWorkflowID, initiatorServiceID,
-//                initiatorWorkflowNodeID, initiatorWorkflowTimeStep);
-//        this.context.setTopic(topic);
-//        this.initiator = this.notifier.createEntity(initiatorWorkflowID, initiatorServiceID, initiatorWorkflowNodeID,
-//                initiatorWorkflowTimeStep);
-//
-//        URI receiverWorkflowID = this.workflowID;
-//        URI receiverServiceID = this.workflowID;
-//        String receiverWorkflowNodeID = null;
-//        Integer receiverWorkflowTimeStep = null;
-//
-//        setReceiver(this.notifier.createEntity(receiverWorkflowID, receiverServiceID, receiverWorkflowNodeID,
-//                receiverWorkflowTimeStep));
-//        // send start workflow
-//        this.invocationContext = this.notifier.workflowInvoked(this.context, this.initiator);
-//    }
-//
-//
-//
-//    @Subscribe
-//    public void startExecution(StartExecutionEvent e) {
-//        this.duration = this.notifier.computationStarted();
-//    }
-//
-//    @Subscribe
-//    public void finishExecution(FinishExecutionEvent e) {
-//        this.duration = this.notifier.computationFinished(this.context, this.duration);
-//    }
-//
-//    @Subscribe
-//    public void statusChanged(StatusChangeEvent event) {
-//        this.notifier.info(this.context, event.getStatusMessage());
-//    }
-//
-//    @Subscribe
-//    public void startSchedule(StartScheduleEvent e){
-//        this.notifier.info(this.context,e.getEventType());
-//    }
-//
-//    @Subscribe
-//    public void executionFail(ExecutionFailEvent e) {
-//        this.notifier.sendingFault(this.context, this.invocationContext, e.getCauseForFailure().getMessage());
-//    }
-//
-//
-//    @Subscribe
-//    public void info(String... data) {
-//        this.notifier.info(this.context, data);
-//    }
-//
-//    @Subscribe
-//    public void warning(String... data) {
-//    }
-//
-//    @Subscribe
-//    public void exception(String... data) {
-//    }
-//
-//    @Subscribe
-//    public void finishSchedule(FinishScheduleEvent e){
-//        this.notifier.info(this.context,e.getEventType());
-//    }
-//
-//
-//    public InvocationEntity getReceiver() {
-//        return receiver;
-//    }
-//
-//    public void setReceiver(InvocationEntity receiver) {
-//        this.receiver = receiver;
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobData.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobData.java
deleted file mode 100644
index 10be472..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobData.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * 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.core.persistence;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 6/18/13
- * Time: 2:34 PM
- */
-
-public class JobData {
-
-    private String jobId;
-    private int state;
-
-    public JobData(String id, int state) {
-        this.jobId = id;
-        this.state = state;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public int getState() {
-        return state;
-    }
-
-    public void setState(int state) {
-        this.state = state;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobPersistenceManager.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobPersistenceManager.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobPersistenceManager.java
deleted file mode 100644
index 0f7c848..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/persistence/JobPersistenceManager.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * 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.core.persistence;
-
-
-import org.apache.airavata.gfac.GFacException;
-
-import java.util.List;
-
-/**
- * User: AmilaJ (amilaj@apache.org)
- * Date: 6/18/13
- * Time: 2:23 PM
- */
-
-/**
- * Responsible persisting job data. This data is useful during a restart.
- * When restarting Airavata can resume monitoring currently executing jobs.
- */
-public interface JobPersistenceManager {
-
-    /**
-     * Updates the job state in the persisting storage.
-     * @param jobData Job data to update.
-     * @throws GFacException If an error occurred while updating job data.
-     */
-    void updateJobStatus (JobData jobData) throws GFacException;
-
-    /**
-     * Get all running jobs.
-     * @return Job ids which are not failed nor completed.
-     * @throws GFacException If an error occurred while querying job data.
-     */
-    List<JobData> getRunningJobs() throws GFacException;
-
-    /**
-     * Get all failed job ids.
-     * @return Failed job ids.
-     * @throws GFacException If an error occurred while querying job data.
-     */
-    List<JobData> getFailedJobs() throws GFacException;
-
-    /**
-     * Get all un-submitted job ids.
-     * @return Un-submitted job ids.
-     * @throws GFacException If an error occurred while querying job data.
-     */
-    List<JobData> getUnSubmittedJobs() throws GFacException;
-
-    /**
-     * Get all successfully completed job ids.
-     * @return Successfully completed job ids.
-     * @throws GFacException If an error occurred while querying job data.
-     */
-    List<JobData> getSuccessfullyCompletedJobs() throws GFacException;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
index dc4582a..5780929 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
@@ -21,10 +21,8 @@
 
 package org.apache.airavata.gfac.core.provider;
 
-import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
deleted file mode 100644
index c6020b9..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * 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.core.utils;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.ServerSettings;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-public class GFacThreadPoolExecutor {
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(GFacThreadPoolExecutor.class);
-    public static final String GFAC_THREAD_POOL_SIZE = "gfac.thread.pool.size";
-
-    private static ExecutorService threadPool;
-
-    public static ExecutorService getCachedThreadPool() {
-        if(threadPool ==null){
-            threadPool = Executors.newCachedThreadPool();
-        }
-        return threadPool;
-    }
-
-    public static ExecutorService client() throws ApplicationSettingsException {
-        if(threadPool ==null){
-            try {
-                threadPool = Executors.newFixedThreadPool(Integer.parseInt(ServerSettings.getSetting(GFAC_THREAD_POOL_SIZE)));
-            } catch (ApplicationSettingsException e) {
-                logger.error("Error reading " + GFAC_THREAD_POOL_SIZE+ " property");
-                throw e;
-            }
-        }
-        return threadPool;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
deleted file mode 100644
index 09724d5..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- *
- * 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.core.utils;
-
-import org.airavata.appcatalog.cpi.AppCatalog;
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.DBUtil;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.ExecutionMode;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.states.GfacExperimentState;
-import org.apache.airavata.gfac.core.states.GfacHandlerState;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
-import org.apache.airavata.model.messaging.event.JobIdentifier;
-import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
-import org.apache.airavata.model.messaging.event.TaskIdentifier;
-import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
-import org.apache.airavata.model.workspace.experiment.ActionableGroup;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.ErrorDetails;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.CompositeIdentifier;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.utils.ZKPaths;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.data.Stat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-//import org.apache.airavata.commons.gfac.type.ActualParameter;
-
-public class GFacUtils {
-	private final static Logger log = LoggerFactory.getLogger(GFacUtils.class);
-	public static final ArrayList<ACL> OPEN_ACL_UNSAFE = ZooDefs.Ids.OPEN_ACL_UNSAFE;
-
-	private GFacUtils() {
-	}
-
-	/**
-	 * Read data from inputStream and convert it to String.
-	 * 
-	 * @param in
-	 * @return String read from inputStream
-	 * @throws java.io.IOException
-	 */
-	public static String readFromStream(InputStream in) throws IOException {
-		try {
-			StringBuffer wsdlStr = new StringBuffer();
-
-			int read;
-
-			byte[] buf = new byte[1024];
-			while ((read = in.read(buf)) > 0) {
-				wsdlStr.append(new String(buf, 0, read));
-			}
-			return wsdlStr.toString();
-		} finally {
-			if (in != null) {
-				try {
-					in.close();
-				} catch (IOException e) {
-					log.warn("Cannot close InputStream: "
-							+ in.getClass().getName(), e);
-				}
-			}
-		}
-	}
-
-	/**
-	 * this can be used to do framework opertaions specific to different modes
-	 * 
-	 * @param jobExecutionContext
-	 * @return
-	 */
-	public static boolean isSynchronousMode(
-			JobExecutionContext jobExecutionContext) {
-		GFacConfiguration gFacConfiguration = jobExecutionContext
-				.getGFacConfiguration();
-		if (ExecutionMode.ASYNCHRONOUS.equals(gFacConfiguration
-				.getExecutionMode())) {
-			return false;
-		}
-		return true;
-	}
-
-	public static String readFileToString(String file)
-			throws FileNotFoundException, IOException {
-		BufferedReader instream = null;
-		try {
-
-			instream = new BufferedReader(new FileReader(file));
-			StringBuffer buff = new StringBuffer();
-			String temp = null;
-			while ((temp = instream.readLine()) != null) {
-				buff.append(temp);
-				buff.append(Constants.NEWLINE);
-			}
-			return buff.toString();
-		} finally {
-			if (instream != null) {
-				try {
-					instream.close();
-				} catch (IOException e) {
-					log.warn("Cannot close FileinputStream", e);
-				}
-			}
-		}
-	}
-
-	public static boolean isLocalHost(String appHost)
-			throws UnknownHostException {
-		String localHost = InetAddress.getLocalHost().getCanonicalHostName();
-		return (localHost.equals(appHost)
-				|| Constants.LOCALHOST.equals(appHost) || Constants._127_0_0_1
-					.equals(appHost));
-	}
-
-	public static String createUniqueNameWithDate(String name) {
-		String date = new Date().toString();
-		date = date.replaceAll(" ", "_");
-		date = date.replaceAll(":", "_");
-		return name + "_" + date;
-	}
-
-    public static List<Element> getElementList(Document doc, String expression) throws XPathExpressionException {
-        XPathFactory xPathFactory = XPathFactory.newInstance();
-        XPath xPath = xPathFactory.newXPath();
-        XPathExpression expr = xPath.compile(expression);
-        NodeList nodeList = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
-        List<Element> elementList = new ArrayList<Element>();
-        for (int i = 0; i < nodeList.getLength(); i++) {
-            Node item = nodeList.item(i);
-            if (item instanceof Element) {
-                elementList.add((Element) item);
-            }
-        }
-        return elementList;
-    }
-
-	public static String createGsiftpURIAsString(String host, String localPath)
-			throws URISyntaxException {
-		StringBuffer buf = new StringBuffer();
-		if (!host.startsWith("gsiftp://"))
-			buf.append("gsiftp://");
-		buf.append(host);
-		if (!host.endsWith("/"))
-			buf.append("/");
-		buf.append(localPath);
-		return buf.toString();
-	}
-
-	public static void saveJobStatus(JobExecutionContext jobExecutionContext,
-                                     JobDetails details, JobState state) throws GFacException {
-		try {
-            // first we save job details to the registry for sa and then save the job status.
-            Registry registry = jobExecutionContext.getRegistry();
-            JobStatus status = new JobStatus();
-            status.setJobState(state);
-            details.setJobStatus(status);
-            registry.add(ChildDataType.JOB_DETAIL, details,
-                    new CompositeIdentifier(jobExecutionContext.getTaskData()
-                            .getTaskID(), details.getJobID()));
-            JobIdentifier identifier = new JobIdentifier(details.getJobID(), jobExecutionContext.getTaskData().getTaskID(),
-                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
-                    jobExecutionContext.getGatewayID());
-            JobStatusChangeRequestEvent jobStatusChangeRequestEvent = new JobStatusChangeRequestEvent(state, identifier);
-            jobExecutionContext.getMonitorPublisher().publish(jobStatusChangeRequestEvent);
-        } catch (Exception e) {
-			throw new GFacException("Error persisting job status"
-					+ e.getLocalizedMessage(), e);
-		}
-	}
-
-	public static void updateJobStatus(JobExecutionContext jobExecutionContext,
-			JobDetails details, JobState state) throws GFacException {
-		try {
-			Registry registry = jobExecutionContext.getRegistry();
-			JobStatus status = new JobStatus();
-			status.setJobState(state);
-			status.setTimeOfStateChange(Calendar.getInstance()
-					.getTimeInMillis());
-			details.setJobStatus(status);
-			registry.update(
-					org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL,
-					details, details.getJobID());
-		} catch (Exception e) {
-			throw new GFacException("Error persisting job status"
-					+ e.getLocalizedMessage(), e);
-		}
-	}
-
-	public static void saveErrorDetails(
-			JobExecutionContext jobExecutionContext, String errorMessage,
-			CorrectiveAction action, ErrorCategory errorCatogory)
-			throws GFacException {
-		try {
-			Registry registry = jobExecutionContext.getRegistry();
-			ErrorDetails details = new ErrorDetails();
-			details.setActualErrorMessage(errorMessage);
-			details.setCorrectiveAction(action);
-			details.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS);
-			details.setCreationTime(Calendar.getInstance().getTimeInMillis());
-			details.setErrorCategory(errorCatogory);
-			registry.add(ChildDataType.ERROR_DETAIL, details,
-					jobExecutionContext.getTaskData().getTaskID());
-		} catch (Exception e) {
-			throw new GFacException("Error persisting job status"
-					+ e.getLocalizedMessage(), e);
-		}
-	}
-
-    public static Map<String, Object> getInputParamMap(List<InputDataObjectType> experimentData) throws GFacException {
-        Map<String, Object> map = new HashMap<String, Object>();
-        for (InputDataObjectType objectType : experimentData) {
-            map.put(objectType.getName(), objectType);
-        }
-        return map;
-    }
-
-    public static Map<String, Object> getOuputParamMap(List<OutputDataObjectType> experimentData) throws GFacException {
-        Map<String, Object> map = new HashMap<String, Object>();
-        for (OutputDataObjectType objectType : experimentData) {
-            map.put(objectType.getName(), objectType);
-        }
-        return map;
-    }
-
-	public static GfacExperimentState getZKExperimentState(CuratorFramework curatorClient,
-			JobExecutionContext jobExecutionContext)
-			throws Exception {
-		String expState = AiravataZKUtils.getExpState(curatorClient, jobExecutionContext
-				.getExperimentID());
-        if (expState == null || expState.isEmpty()) {
-            return GfacExperimentState.UNKNOWN;
-        }
-        return GfacExperimentState.findByValue(Integer.valueOf(expState));
-    }
-
-	public static boolean createHandlerZnode(CuratorFramework curatorClient,
-                                             JobExecutionContext jobExecutionContext, String className)
-			throws Exception {
-		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-				jobExecutionContext.getExperimentID(), className);
-		Stat exists = curatorClient.checkExists().forPath(expState);
-		if (exists == null) {
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(expState, new byte[0]);
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
-		} else {
-			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-			if (exists == null) {
-				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
-			}
-		}
-
-		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-		if (exists != null) {
-			curatorClient.setData().withVersion(exists.getVersion())
-					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
-							String.valueOf(GfacHandlerState.INVOKING.getValue()).getBytes());
-		}
-		return true;
-	}
-
-	public static boolean createHandlerZnode(CuratorFramework curatorClient,
-                                             JobExecutionContext jobExecutionContext, String className,
-                                             GfacHandlerState state) throws Exception {
-		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-				jobExecutionContext.getExperimentID(), className);
-		Stat exists = curatorClient.checkExists().forPath(expState);
-		if (exists == null) {
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(expState, new byte[0]);
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
-		} else {
-			exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-			if (exists == null) {
-				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-						.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, new byte[0]);
-			}
-		}
-
-		exists = curatorClient.checkExists().forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-		if (exists != null) {
-			curatorClient.setData().withVersion(exists.getVersion())
-					.forPath(expState + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
-							String.valueOf(state.getValue()).getBytes());
-		}
-		return true;
-	}
-
-	public static boolean updateHandlerState(CuratorFramework curatorClient,
-                                             JobExecutionContext jobExecutionContext, String className,
-                                             GfacHandlerState state) throws Exception {
-		String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath(
-				jobExecutionContext.getExperimentID(), className);
-		Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-		if (exists != null) {
-			curatorClient.setData().withVersion(exists.getVersion())
-					.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, String.valueOf(state.getValue()).getBytes());
-		} else {
-			createHandlerZnode(curatorClient, jobExecutionContext, className, state);
-		}
-		return false;
-	}
-
-	public static GfacHandlerState getHandlerState(CuratorFramework curatorClient,
-                                                  JobExecutionContext jobExecutionContext, String className) {
-		try {
-			String handlerPath = AiravataZKUtils.getExpZnodeHandlerPath( jobExecutionContext.getExperimentID(), className);
-			Stat exists = curatorClient.checkExists().forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE);
-			if (exists != null) {
-				String stateVal = new String(curatorClient.getData().storingStatIn(exists)
-						.forPath(handlerPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE));
-				return GfacHandlerState.findByValue(Integer.valueOf(stateVal));
-			}
-			return GfacHandlerState.UNKNOWN; // if the node doesn't exist or any other error we
-							// return false
-		} catch (Exception e) {
-			log.error("Error occured while getting zk node status", e);
-			return null;
-		}
-	}
-
-	// This method is dangerous because of moving the experiment data
-	public static boolean createExperimentEntryForPassive(String experimentID,
-														  String taskID, CuratorFramework curatorClient, String experimentNode,
-														  String pickedChild, String tokenId, long deliveryTag) throws Exception {
-		String experimentPath = experimentNode + File.separator + pickedChild;
-		String newExperimentPath = experimentPath + File.separator + experimentID;
-		Stat exists1 = curatorClient.checkExists().forPath(newExperimentPath);
-		String oldExperimentPath = GFacUtils.findExperimentEntry(experimentID, curatorClient);
-		if (oldExperimentPath == null) {  // this means this is a very new experiment
-			// are going to create a new node
-			log.info("This is a new Job, so creating all the experiment docs from the scratch");
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath, new byte[0]);
-            String stateNodePath = curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(newExperimentPath + File.separator + "state",
-							String .valueOf(GfacExperimentState.LAUNCHED.getValue()) .getBytes());
-
-			if(curatorClient.checkExists().forPath(stateNodePath)!=null) {
-				log.info("Created the node: " + stateNodePath + " successfully !");
-			}else {
-				log.error("Error creating node: " + stateNodePath + " successfully !");
-			}
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag));
-		} else {
-			log.error("ExperimentID: " + experimentID + " taskID: " + taskID + " was running by some Gfac instance,but it failed");
-            removeCancelDeliveryTagNode(oldExperimentPath, curatorClient); // remove previous cancel deliveryTagNode
-            if(newExperimentPath.equals(oldExperimentPath)){
-                log.info("Re-launch experiment came to the same GFac instance");
-            }else {
-				log.info("Re-launch experiment came to a new GFac instance so we are moving data to new gfac node");
-				curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE).forPath(newExperimentPath,
-						curatorClient.getData().storingStatIn(exists1).forPath(oldExperimentPath)); // recursively copy children
-                copyChildren(curatorClient, oldExperimentPath, newExperimentPath, 2); // we need to copy children up to depth 2
-				String oldDeliveryTag = oldExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX;
-				Stat exists = curatorClient.checkExists().forPath(oldDeliveryTag);
-				if(exists!=null) {
-					curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-							.forPath(newExperimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX,
-									curatorClient.getData().storingStatIn(exists).forPath(oldDeliveryTag));
-					ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldDeliveryTag, true);
-				}
-				// After all the files are successfully transfered we delete the // old experiment,otherwise we do
-				// not delete a single file
-				log.info("After a successful copying of experiment data for an old experiment we delete the old data");
-				log.info("Deleting experiment data: " + oldExperimentPath);
-				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), oldExperimentPath, true);
-			}
-		}
-		return true;
-	}
-
-    private static void removeCancelDeliveryTagNode(String experimentPath, CuratorFramework curatorClient) throws Exception {
-        Stat exists = curatorClient.checkExists().forPath(experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
-        if (exists != null) {
-			ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), experimentPath + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, true);
-		}
-	}
-
-    private static void copyChildren(CuratorFramework curatorClient, String oldPath, String newPath, int depth) throws Exception {
-        for (String childNode : curatorClient.getChildren().forPath(oldPath)) {
-            String oldChildPath = oldPath + File.separator + childNode;
-            Stat stat = curatorClient.checkExists().forPath(oldChildPath); // no need to check exists
-            String newChildPath = newPath + File.separator + childNode;
-            log.info("Creating new znode: " + newChildPath);
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(newChildPath, curatorClient.getData().storingStatIn(stat).forPath(oldChildPath));
-			if (--depth > 0) {
-                copyChildren(curatorClient , oldChildPath, newChildPath, depth );
-            }
-        }
-    }
-
-	/**
-	 * This will return a value if the server is down because we iterate through exisiting experiment nodes, not
-	 * through gfac-server nodes
-	 *
-	 * @param experimentID
-	 * @param curatorClient
-	 * @return
-	 * @throws KeeperException
-	 * @throws InterruptedException
-	 */
-	public static String findExperimentEntry(String experimentID, CuratorFramework curatorClient) throws Exception {
-		String experimentNode = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
-		List<String> children = curatorClient.getChildren().forPath(experimentNode);
-		for (String pickedChild : children) {
-			String experimentPath = experimentNode + File.separator + pickedChild;
-			String newExpNode = experimentPath + File.separator + experimentID;
-			Stat exists = curatorClient.checkExists().forPath(newExpNode);
-			if (exists == null) {
-				continue;
-			} else {
-				return newExpNode;
-			}
-		}
-		return null;
-	}
-
-    public static boolean setExperimentCancel(String experimentId, CuratorFramework curatorClient, long deliveryTag) throws Exception {
-        String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
-        if (experimentEntry == null) {
-            // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
-            log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
-                    "This happen when experiment completed and already removed from the zookeeper");
-            return false;
-        } else {
-            // check cancel operation is being processed for the same experiment.
-            Stat cancelState = curatorClient.checkExists().forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX);
-            if (cancelState != null) {
-                // another cancel operation is being processed. only one cancel operation can exist for a given experiment.
-                return false;
-            }
-
-			curatorClient.create().withMode(CreateMode.PERSISTENT).withACL(OPEN_ACL_UNSAFE)
-					.forPath(experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag)); // save cancel delivery tag to be acknowledge at the end.
-			return true;
-        }
-
-    }
-    public static boolean isCancelled(String experimentID, CuratorFramework curatorClient ) throws Exception {
-		String experimentEntry = GFacUtils.findExperimentEntry(experimentID, curatorClient);
-        if(experimentEntry == null){
-            return false;
-        }else {
-            Stat exists = curatorClient.checkExists().forPath(experimentEntry);
-            if (exists != null) {
-				String operation = new String(curatorClient.getData().storingStatIn(exists).forPath(experimentEntry + File.separator + "operation"));
-				if ("cancel".equals(operation)) {
-					return true;
-				}
-			}
-		}
-        return false;
-    }
-
-    public static void saveHandlerData(JobExecutionContext jobExecutionContext,
-                                       StringBuffer data, String className) throws GFacHandlerException {
-		try {
-			CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
-			if (curatorClient != null) {
-				String expZnodeHandlerPath = AiravataZKUtils
-						.getExpZnodeHandlerPath(
-								jobExecutionContext.getExperimentID(),
-								className);
-				Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
-                if (exists != null) {
-					curatorClient.setData().withVersion(exists.getVersion()).forPath(expZnodeHandlerPath, data.toString().getBytes());
-				} else {
-                    log.error("Saving Handler data failed, Stat is null");
-                }
-            }
-		} catch (Exception e) {
-			throw new GFacHandlerException(e);
-		}
-	}
-
-	public static String getHandlerData(JobExecutionContext jobExecutionContext, String className) throws Exception {
-		CuratorFramework curatorClient = jobExecutionContext.getCuratorClient();
-		if (curatorClient != null) {
-			String expZnodeHandlerPath = AiravataZKUtils
-					.getExpZnodeHandlerPath(
-							jobExecutionContext.getExperimentID(),
-							className);
-			Stat exists = curatorClient.checkExists().forPath(expZnodeHandlerPath);
-			return new String(jobExecutionContext.getCuratorClient().getData().storingStatIn(exists).forPath(expZnodeHandlerPath));
-		}
-		return null;
-	}
-
-	public static CredentialReader getCredentialReader()
-			throws ApplicationSettingsException, IllegalAccessException,
-			InstantiationException {
-		try{
-		String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
-		String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
-		String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
-		String driver = ServerSettings.getCredentialStoreDBDriver();
-		return new CredentialReaderImpl(new DBUtil(jdbcUrl, jdbcUsr, jdbcPass,
-				driver));
-		}catch(ClassNotFoundException e){
-			log.error("Not able to find driver: " + e.getLocalizedMessage());
-			return null;	
-		}
-	}
-
-    public static LOCALSubmission getLocalJobSubmission (String submissionId) throws AppCatalogException{
-        try {
-            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-            return appCatalog.getComputeResource().getLocalJobSubmission(submissionId);
-        }catch (Exception e){
-            String errorMsg = "Error while retrieving local job submission with submission id : " + submissionId;
-            log.error(errorMsg, e);
-            throw new AppCatalogException(errorMsg, e);
-        }
-    }
-
-    public static UnicoreJobSubmission getUnicoreJobSubmission (String submissionId) throws AppCatalogException{
-        try {
-            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-            return appCatalog.getComputeResource().getUNICOREJobSubmission(submissionId);
-        }catch (Exception e){
-            String errorMsg = "Error while retrieving UNICORE job submission with submission id : " + submissionId;
-            log.error(errorMsg, e);
-            throw new AppCatalogException(errorMsg, e);
-        }
-    }
-
-    public static SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException{
-        try {
-            AppCatalog appCatalog = AppCatalogFactory.getAppCatalog();
-            return appCatalog.getComputeResource().getSSHJobSubmission(submissionId);
-        }catch (Exception e){
-            String errorMsg = "Error while retrieving SSH job submission with submission id : " + submissionId;
-            log.error(errorMsg, e);
-            throw new AppCatalogException(errorMsg, e);
-        }
-    }
-
-    /**
-     * To convert list to separated value
-     * @param listOfStrings
-     * @param separator
-     * @return
-     */
-    public static  String listToCsv(List<String> listOfStrings, char separator) {
-        StringBuilder sb = new StringBuilder();
-
-        // all but last
-        for(int i = 0; i < listOfStrings.size() - 1 ; i++) {
-            sb.append(listOfStrings.get(i));
-            sb.append(separator);
-        }
-
-        // last string, no separator
-        if(listOfStrings.size() > 0){
-            sb.append(listOfStrings.get(listOfStrings.size()-1));
-        }
-
-        return sb.toString();
-    }
-
-	public static byte[] longToBytes(long x) {
-		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
-		buffer.putLong(x);
-		return buffer.array();
-	}
-
-	public static long bytesToLong(byte[] bytes) {
-		ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
-		buffer.put(bytes);
-		buffer.flip();//need flip
-		return buffer.getLong();
-	}
-
-    public static ExperimentState updateExperimentStatus(String experimentId, ExperimentState state) throws RegistryException {
-        Registry airavataRegistry = RegistryFactory.getDefaultRegistry();
-        Experiment details = (Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
-        if (details == null) {
-            details = new Experiment();
-            details.setExperimentID(experimentId);
-        }
-        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
-        status.setExperimentState(state);
-        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-        if (!ExperimentState.CANCELED.equals(details.getExperimentStatus().getExperimentState()) &&
-                !ExperimentState.CANCELING.equals(details.getExperimentStatus().getExperimentState())) {
-            status.setExperimentState(state);
-        } else {
-            status.setExperimentState(details.getExperimentStatus().getExperimentState());
-        }
-        details.setExperimentStatus(status);
-        log.info("Updating the experiment status of experiment: " + experimentId + " to " + status.getExperimentState().toString());
-        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
-        return details.getExperimentStatus().getExperimentState();
-    }
-
-    public static boolean isFailedJob (JobExecutionContext jec) {
-        JobStatus jobStatus = jec.getJobDetails().getJobStatus();
-        if (jobStatus.getJobState() == JobState.FAILED) {
-            return true;
-        }
-        return false;
-    }
-
-    public static boolean ackCancelRequest(String experimentId, CuratorFramework curatorClient) throws Exception {
-        String experimentEntry = GFacUtils.findExperimentEntry(experimentId, curatorClient);
-        String cancelNodePath = experimentEntry + AiravataZKUtils.CANCEL_DELIVERY_TAG_POSTFIX;
-        if (experimentEntry == null) {
-            // This should be handle in validation request. Gfac shouldn't get any invalidate experiment.
-            log.error("Cannot find the experiment Entry, so cancel operation cannot be performed. " +
-                    "This happen when experiment completed and already removed from the CuratorFramework");
-        } else {
-            // check cancel operation is being processed for the same experiment.
-            Stat cancelState = curatorClient.checkExists().forPath(cancelNodePath);
-            if (cancelState != null) {
-				ZKPaths.deleteChildren(curatorClient.getZookeeperClient().getZooKeeper(), cancelNodePath, true);
-				return true;
-			}
-		}
-        return false;
-    }
-
-    public static void publishTaskStatus (JobExecutionContext jobExecutionContext, MonitorPublisher publisher, TaskState state){
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
-                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
-                jobExecutionContext.getGatewayID());
-        publisher.publish(new TaskStatusChangeRequestEvent(state, taskIdentity));
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
deleted file mode 100644
index 36caf76..0000000
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * 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.core.utils;
-
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InputHandlerWorker implements Runnable {
-    private static Logger log = LoggerFactory.getLogger(InputHandlerWorker.class);
-
-    String experimentId;
-    String taskId;
-    String gatewayId;
-    String tokenId;
-
-    GFac gfac;
-    public InputHandlerWorker(GFac gfac, String experimentId,String taskId,String gatewayId, String tokenId) {
-        this.gfac = gfac;
-        this.experimentId = experimentId;
-        this.taskId = taskId;
-        this.gatewayId = gatewayId;
-        this.tokenId = tokenId;
-    }
-
-    @Override
-    public void run() {
-        try {
-            gfac.submitJob(experimentId, taskId, gatewayId, tokenId);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-    }
-}


[24/81] [abbrv] airavata git commit: Refactored gfac sub modules, merged gfac-ssh, gfac-gsissh, gfac-local, gfac-monitor and gsissh modules and create gface-impl, removed implementation from gfac-core to gfac-impl

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
new file mode 100644
index 0000000..9f369b1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -0,0 +1,346 @@
+/*
+ *
+ * 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.gsissh.provider.impl;
+
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
+import org.apache.airavata.gfac.core.provider.AbstractProvider;
+import org.apache.airavata.gfac.core.provider.GFacProviderException;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.util.GFACGSISSHUtils;
+import org.apache.airavata.gfac.monitor.email.EmailBasedMonitor;
+import org.apache.airavata.gfac.monitor.email.EmailMonitorFactory;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.SSHApiException;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.MonitorMode;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Map;
+
+//import org.apache.airavata.schemas.gfac.GsisshHostType;
+
+public class GSISSHProvider extends AbstractProvider {
+    private static final Logger log = LoggerFactory.getLogger(GSISSHProvider.class);
+
+    public void initProperties(Map<String, String> properties) throws GFacProviderException, GFacException {
+
+    }
+
+    public void initialize(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        super.initialize(jobExecutionContext);
+        try {
+            String hostAddress = jobExecutionContext.getHostName();
+            if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
+                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+            }
+        } catch (ApplicationSettingsException e) {
+            log.error(e.getMessage());
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        } catch (GFacException e) {
+            throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+        }
+    }
+
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        log.info("Invoking GSISSH Provider Invoke ...");
+        StringBuffer data = new StringBuffer();
+        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
+        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
+                .getComputeResourceDescription();
+        ApplicationDeploymentDescription appDeployDesc = jobExecutionContext.getApplicationContext()
+                .getApplicationDeploymentDescription();
+        JobDetails jobDetails = new JobDetails();
+        Cluster cluster = null;
+
+        try {
+            if (jobExecutionContext.getSecurityContext(jobExecutionContext.getHostName()) != null) {
+                cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(jobExecutionContext.getHostName())).getPbsCluster();
+            }
+            if (cluster == null) {
+                throw new GFacProviderException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+            // This installed path is a mandetory field, because this could change based on the computing resource
+            JobDescriptor jobDescriptor = GFACGSISSHUtils.createJobDescriptor(jobExecutionContext, cluster);
+            jobDetails.setJobName(jobDescriptor.getJobName());
+
+            log.info(jobDescriptor.toXML());
+            data.append("jobDesc=").append(jobDescriptor.toXML());
+            jobDetails.setJobDescription(jobDescriptor.toXML());
+            String jobID = cluster.submitBatchJob(jobDescriptor);
+            jobExecutionContext.setJobDetails(jobDetails);
+            if (jobID == null) {
+                jobDetails.setJobID("none");
+                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+            } else {
+                jobDetails.setJobID(jobID.split("\\.")[0]);
+                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
+            }
+            data.append(",jobId=").append(jobDetails.getJobID());
+
+            // Now job has submitted to the resource, its up to the Provider to parse the information to daemon handler
+            // to perform monitoring, daemon handlers can be accessed from anywhere
+            monitor(jobExecutionContext);
+            // we know this host is type GsiSSHHostType
+        } catch (Exception e) {
+		    String error = "Error submitting the job to host " + computeResourceDescription.getHostName() + " message: " + e.getMessage();
+            log.error(error);
+            jobDetails.setJobID("none");
+            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+            StringWriter errors = new StringWriter();
+            e.printStackTrace(new PrintWriter(errors));
+            GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            throw new GFacProviderException(error, e);
+        } finally {
+            log.info("Saving data for future recovery: ");
+            log.info(data.toString());
+            GFacUtils.saveHandlerData(jobExecutionContext, data, this.getClass().getName());
+        } 
+          
+    }
+
+    public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, SSHJobSubmission sshJobSubmission, String jobID) throws GFacHandlerException {
+/*        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
+        if (daemonHandlers == null) {
+            daemonHandlers = BetterGfacImpl.getDaemonHandlers();
+        }
+        ThreadedHandler pullMonitorHandler = null;
+        ThreadedHandler pushMonitorHandler = null;
+        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+        for (ThreadedHandler threadedHandler : daemonHandlers) {
+            if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
+                pullMonitorHandler = threadedHandler;
+                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
+                    jobExecutionContext.setProperty("cancel","true");
+                    pullMonitorHandler.invoke(jobExecutionContext);
+                } else {
+                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PULL" +
+                            " to handle by the GridPullMonitorHandler");
+                }
+            } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
+                pushMonitorHandler = threadedHandler;
+                if ( monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
+                    pushMonitorHandler.invoke(jobExecutionContext);
+                } else {
+                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PUSH" +
+                            " to handle by the GridPushMonitorHandler");
+                }
+            }
+            // have to handle the GridPushMonitorHandler logic
+        }
+        if (pullMonitorHandler == null && pushMonitorHandler == null && ExecutionMode.ASYNCHRONOUS.equals(jobExecutionContext.getGFacConfiguration().getExecutionMode())) {
+            log.error("No Daemon handler is configured in gfac-config.xml, either pull or push, so monitoring will not invoked" +
+                    ", execution is configured as asynchronous, so Outhandler will not be invoked");
+        }*/
+    }
+
+    public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean cancelJob(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
+        //To change body of implemented methods use File | Settings | File Templates.
+        log.info("canceling the job status in GSISSHProvider!!!!!");
+        JobDetails jobDetails = jobExecutionContext.getJobDetails();
+        String hostName = jobExecutionContext.getHostName();
+        try {
+            Cluster cluster = null;
+            if (jobExecutionContext.getSecurityContext(hostName) == null) {
+                GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+            }
+            cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(hostName)).getPbsCluster();
+            if (cluster == null) {
+                throw new GFacProviderException("Security context is not set properly");
+            } else {
+                log.info("Successfully retrieved the Security Context");
+            }
+            // This installed path is a mandetory field, because this could change based on the computing resource
+            if(jobDetails == null) {
+                log.error("There is not JobDetails so cancelations cannot perform !!!");
+                return false;
+            }
+            if (jobDetails.getJobID() != null) {
+                // if this operation success without any exceptions, we can assume cancel operation succeeded.
+                cluster.cancelJob(jobDetails.getJobID());
+            } else {
+                log.error("No Job Id is set, so cannot perform the cancel operation !!!");
+                return false;
+            }
+            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED);
+            return true;
+            // we know this host is type GsiSSHHostType
+        } catch (SSHApiException e) {
+            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+            log.error(error);
+            jobDetails.setJobID("none");
+            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            throw new GFacProviderException(error, e);
+        } catch (Exception e) {
+            String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
+            log.error(error);
+            jobDetails.setJobID("none");
+            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
+            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            throw new GFacProviderException(error, e);
+        }
+    }
+
+    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
+        // have to implement the logic to recover a gfac failure
+        log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
+        ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
+                .getComputeResourceDescription();
+        String hostName = jobExecutionContext.getHostName();
+        String jobId = "";
+        String jobDesc = "";
+        try {
+            String pluginData = GFacUtils.getHandlerData(jobExecutionContext, this.getClass().getName());
+            String[] split = pluginData.split(",");
+            if (split.length < 2) {
+                try {
+                    this.execute(jobExecutionContext);
+                } catch (GFacException e) {
+                    log.error("Error while  recovering provider", e);
+                    throw new GFacProviderException("Error recovering provider", e);
+                }
+                return;
+            }
+            jobDesc = split[0].substring(7);
+            jobId = split[1].substring(6);
+
+            log.info("Following data have recovered: ");
+            log.info("Job Description: " + jobDesc);
+            log.info("Job Id: " + jobId);
+            if (jobId == null || "none".equals(jobId) ||
+                    "".equals(jobId)) {
+                try {
+                    this.execute(jobExecutionContext);
+                } catch (GFacException e) {
+                    log.error("Error while  recovering provider", e);
+                    throw new GFacProviderException("Error recovering provider", e);
+                }
+                return;
+            }
+        } catch (Exception e) {
+            log.error("Error while  recovering provider", e);
+        }
+        try {
+            // Now we are we have enough data to recover
+            JobDetails jobDetails = new JobDetails();
+            jobDetails.setJobDescription(jobDesc);
+            jobDetails.setJobID(jobId);
+            jobExecutionContext.setJobDetails(jobDetails);
+            if (jobExecutionContext.getSecurityContext(hostName) == null) {
+                try {
+                    GFACGSISSHUtils.addSecurityContext(jobExecutionContext);
+                } catch (ApplicationSettingsException e) {
+                    log.error(e.getMessage());
+                    throw new GFacHandlerException("Error while creating SSHSecurityContext", e, e.getLocalizedMessage());
+                }
+            }
+            monitor(jobExecutionContext);
+        } catch (Exception e) {
+            log.error("Error while recover the job", e);
+            throw new GFacProviderException("Error delegating already ran job to Monitoring", e);
+        }
+    }
+
+    @Override
+    public void monitor(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
+        String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
+        SSHJobSubmission sshJobSubmission = null;
+        try {
+            sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
+        } catch (AppCatalogException e) {
+            throw new GFacException("Error while reading compute resource", e);
+        }
+        if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR) {
+                try {
+                    EmailBasedMonitor emailBasedMonitor = EmailMonitorFactory.getEmailBasedMonitor(
+                            sshJobSubmission.getResourceJobManager().getResourceJobManagerType());
+                    emailBasedMonitor.addToJobMonitorMap(jobExecutionContext);
+                } catch (AiravataException e) {
+                    throw new GFacHandlerException("Error while activating email job monitoring ", e);
+                }
+                return;
+            }
+        }
+/*
+        // if email monitor is not activeated or not configure we use pull or push monitor
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
+        if (daemonHandlers == null) {
+            daemonHandlers = BetterGfacImpl.getDaemonHandlers();
+        }
+        ThreadedHandler pullMonitorHandler = null;
+        ThreadedHandler pushMonitorHandler = null;
+        MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+        String jobID = jobExecutionContext.getJobDetails().getJobID();
+        for (ThreadedHandler threadedHandler : daemonHandlers) {
+            if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
+                pullMonitorHandler = threadedHandler;
+                if (monitorMode == null || monitorMode == MonitorMode.POLL_JOB_MANAGER) {
+                    log.info("Job is launched successfully now parsing it to monitoring in pull mode, JobID Returned:  " + jobID);
+                    pullMonitorHandler.invoke(jobExecutionContext);
+                } else {
+                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PULL" +
+                            " to handle by the GridPullMonitorHandler");
+                }
+            } else if ("org.apache.airavata.gfac.monitor.handlers.GridPushMonitorHandler".equals(threadedHandler.getClass().getName())) {
+                pushMonitorHandler = threadedHandler;
+                if (monitorMode == null || monitorMode == MonitorMode.XSEDE_AMQP_SUBSCRIBE) {
+                    log.info("Job is launched successfully now parsing it to monitoring in push mode, JobID Returned:  " + jobID);
+                    pushMonitorHandler.invoke(jobExecutionContext);
+                } else {
+                    log.error("Currently we only support Pull and Push monitoring and monitorMode should be PUSH" +
+                            " to handle by the GridPushMonitorHandler");
+                }
+            }
+            // have to handle the GridPushMonitorHandler logic
+        }
+        if (pullMonitorHandler == null && pushMonitorHandler == null && ExecutionMode.ASYNCHRONOUS.equals(jobExecutionContext.getGFacConfiguration().getExecutionMode())) {
+            log.error("No Daemon handler is configured in gfac-config.xml, either pull or push, so monitoring will not invoked" +
+                    ", execution is configured as asynchronous, so Outhandler will not be invoked");
+
+        }*/
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
new file mode 100644
index 0000000..85e9e29
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/GSISecurityContext.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.gsissh.security;
+
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.AbstractSecurityContext;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.globus.gsi.X509Credential;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.globus.gsi.provider.GlobusProvider;
+import org.globus.myproxy.GetParams;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+import org.gridforum.jgss.ExtendedGSSCredential;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Handles GRID related security.
+ */
+public class GSISecurityContext extends AbstractSecurityContext {
+
+    protected static final Logger log = LoggerFactory.getLogger(GSISecurityContext.class);
+    /*
+     * context name
+     */
+
+    private Cluster pbsCluster = null;
+
+
+    public GSISecurityContext(CredentialReader credentialReader, RequestData requestData, Cluster pbsCluster) {
+        super(credentialReader, requestData);
+        this.pbsCluster = pbsCluster;
+    }
+
+
+    public GSISecurityContext(CredentialReader credentialReader, RequestData requestData) {
+        super(credentialReader, requestData);
+    }
+
+
+    public GSISecurityContext(Cluster pbsCluster) {
+        this.setPbsCluster(pbsCluster);
+    }
+
+
+
+    public Cluster getPbsCluster() {
+        return pbsCluster;
+    }
+
+    public void setPbsCluster(Cluster pbsCluster) {
+        this.pbsCluster = pbsCluster;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
new file mode 100644
index 0000000..a3e0241
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/security/TokenizedMyProxyAuthInfo.java
@@ -0,0 +1,304 @@
+/*
+ *
+ * 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.gsissh.security;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.credential.Credential;
+import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.core.authentication.GSIAuthenticationInfo;
+import org.globus.gsi.X509Credential;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.globus.gsi.provider.GlobusProvider;
+import org.globus.myproxy.GetParams;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+import org.gridforum.jgss.ExtendedGSSCredential;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.security.Security;
+import java.security.cert.X509Certificate;
+
+public class TokenizedMyProxyAuthInfo extends GSIAuthenticationInfo {
+    protected static final Logger log = LoggerFactory.getLogger(TokenizedMyProxyAuthInfo.class);
+
+    public static int CREDENTIAL_RENEWING_THRESH_HOLD = 10 * 90;
+
+    private GSSCredential gssCredentials = null;
+
+
+    private CredentialReader credentialReader;
+
+    private RequestData requestData;
+
+    public static final String X509_CERT_DIR = "X509_CERT_DIR";
+
+
+    static {
+        Security.addProvider(new GlobusProvider());
+        try {
+            setUpTrustedCertificatePath();
+        } catch (ApplicationSettingsException e) {
+            log.error(e.getLocalizedMessage(), e);
+        }
+    }
+
+    public static void setUpTrustedCertificatePath(String trustedCertificatePath) {
+
+        File file = new File(trustedCertificatePath);
+
+        if (!file.exists() || !file.canRead()) {
+            File f = new File(".");
+            log.info("Current directory " + f.getAbsolutePath());
+            throw new RuntimeException("Cannot read trusted certificate path " + trustedCertificatePath);
+        } else {
+            System.setProperty(Constants.TRUSTED_CERTIFICATE_SYSTEM_PROPERTY, file.getAbsolutePath());
+        }
+    }
+
+    private static void setUpTrustedCertificatePath() throws ApplicationSettingsException {
+
+        String trustedCertificatePath = ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION);
+
+        setUpTrustedCertificatePath(trustedCertificatePath);
+    }
+
+    public TokenizedMyProxyAuthInfo(CredentialReader credentialReader, RequestData requestData) {
+        this.credentialReader = credentialReader;
+        this.requestData = requestData;
+        try {
+            properties.setProperty(X509_CERT_DIR, ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION));
+        } catch (ApplicationSettingsException e) {
+            log.error("Error while  reading server properties", e);
+        };
+    }
+
+    public TokenizedMyProxyAuthInfo(RequestData requestData) {
+           this.requestData = requestData;
+           try {
+               properties.setProperty(X509_CERT_DIR, ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION));
+           } catch (ApplicationSettingsException e) {
+               log.error("Error while  reading server properties", e);
+           };
+       }
+
+    public GSSCredential getCredentials() throws SecurityException {
+
+        if (gssCredentials == null) {
+
+            try {
+                gssCredentials = getCredentialsFromStore();
+            } catch (Exception e) {
+                log.error("An exception occurred while retrieving credentials from the credential store. " +
+                        "Will continue with my proxy user name and password. Provided TokenId:" + requestData.getTokenId(), e);
+            }
+
+            if (gssCredentials == null) {
+                System.out.println("Authenticating with provided token failed, so falling back to authenticate with defaultCredentials");
+                try {
+                    gssCredentials = getDefaultCredentials();
+                } catch (Exception e) {
+                    throw new SecurityException("Error retrieving my proxy using username password");
+                }
+            }
+            // if still null, throw an exception
+            if (gssCredentials == null) {
+                throw new SecurityException("Unable to retrieve my proxy credentials to continue operation.");
+            }
+        } else {
+            try {
+                if (gssCredentials.getRemainingLifetime() < CREDENTIAL_RENEWING_THRESH_HOLD) {
+                    try {
+                        return renewCredentials();
+                    } catch (Exception e) {
+                        throw new SecurityException("Error renewing credentials", e);
+                    }
+                }
+            } catch (GSSException e) {
+                throw new SecurityException("Unable to retrieve remaining life time from credentials.", e);
+            }
+        }
+
+        return gssCredentials;
+    }
+
+
+    /**
+     * Reads the credentials from credential store.
+     *
+     * @return If token is found in the credential store, will return a valid credential. Else returns null.
+     * @throws Exception If an error occurred while retrieving credentials.
+     */
+    public GSSCredential getCredentialsFromStore() throws Exception {
+
+        if (getCredentialReader() == null) {
+        	credentialReader = GFacUtils.getCredentialReader();
+        	if(credentialReader == null){
+        		return null;
+        	}
+        }
+
+        Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
+                getRequestData().getTokenId());
+
+        if (credential != null) {
+            if (credential instanceof CertificateCredential) {
+
+                log.info("Successfully found credentials for token id - " + getRequestData().getTokenId() +
+                        " gateway id - " + getRequestData().getGatewayId());
+
+                CertificateCredential certificateCredential = (CertificateCredential) credential;
+
+                X509Certificate[] certificates = certificateCredential.getCertificates();
+                X509Credential newCredential = new X509Credential(certificateCredential.getPrivateKey(), certificates);
+
+                GlobusGSSCredentialImpl cred = new GlobusGSSCredentialImpl(newCredential, GSSCredential.INITIATE_AND_ACCEPT);
+                System.out.print(cred.export(ExtendedGSSCredential.IMPEXP_OPAQUE));
+                return cred;
+                //return new GlobusGSSCredentialImpl(newCredential,
+                //        GSSCredential.INITIATE_AND_ACCEPT);
+            } else {
+                log.info("Credential type is not CertificateCredential. Cannot create mapping globus credentials. " +
+                        "Credential type - " + credential.getClass().getName());
+            }
+        } else {
+            log.info("Could not find credentials for token - " + getRequestData().getTokenId() + " and "
+                    + "gateway id - " + getRequestData().getGatewayId());
+        }
+
+        return null;
+    }
+
+    /**
+     * Renew GSSCredentials.
+     * Before executing we need to add current host as a trusted renewer. Note to renew credentials
+     * we dont need user name and password.
+     * To do that execute following command
+     * > myproxy-logon -t <LIFETIME></LIFETIME> -s <MY PROXY SERVER> -l <USER NAME>
+     * E.g :- > myproxy-logon -t 264 -s myproxy.teragrid.org -l us3
+     * Enter MyProxy pass phrase:
+     * A credential has been received for user us3 in /tmp/x509up_u501.
+     * > myproxy-init -A --cert /tmp/x509up_u501 --key /tmp/x509up_u501 -l ogce -s myproxy.teragrid.org
+     *
+     * @return Renewed credentials.
+     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while renewing credentials.
+     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
+     */
+    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException, ApplicationSettingsException {
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+        GetParams getParams = new GetParams();
+        getParams.setAuthzCreds(gssCredentials);
+        getParams.setUserName(getRequestData().getMyProxyUserName());
+        getParams.setLifetime(getRequestData().getMyProxyLifeTime());
+        try {
+            return myproxy.get(gssCredentials, getParams);
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while renewing security credentials.", e);
+        }
+    }
+
+
+    /**
+     * Gets the default proxy certificate.
+     *
+     * @return Default my proxy credentials.
+     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while retrieving credentials.
+     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
+     */
+    public GSSCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException {
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+        try {
+            return myproxy.get(getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
+                    getRequestData().getMyProxyLifeTime());
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while retrieving default security credentials.", e);
+        }
+    }
+
+
+    /**
+     * Renews credentials. First try to renew credentials as a trusted renewer. If that failed
+     * use user name and password to renew credentials.
+     *
+     * @return Renewed credentials.
+     * @throws org.apache.airavata.gfac.GFacException                            If an error occurred while renewing credentials.
+     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
+     */
+    public GSSCredential renewCredentials() throws GFacException, ApplicationSettingsException {
+
+        // First try to renew credentials as a trusted renewer
+        try {
+            gssCredentials = renewCredentialsAsATrustedHost();
+        } catch (Exception e) {
+            log.warn("Renewing credentials as a trusted renewer failed", e);
+            gssCredentials = getDefaultCredentials();
+        }
+
+        return gssCredentials;
+    }
+
+    /**
+     * Gets a new proxy certificate given current credentials.
+     *
+     * @return The short lived GSSCredentials
+     * @throws org.apache.airavata.gfac.GFacException                            If an error is occurred while retrieving credentials.
+     * @throws org.apache.airavata.common.exception.ApplicationSettingsException
+     */
+    public GSSCredential getProxyCredentials() throws GFacException, ApplicationSettingsException {
+
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+        try {
+            return myproxy.get(gssCredentials, getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
+                    getRequestData().getMyProxyLifeTime());
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while renewing security credentials using user/password.", e);
+        }
+    }
+
+    public void setGssCredentials(GSSCredential gssCredentials) {
+        this.gssCredentials = gssCredentials;
+    }
+
+    public CredentialReader getCredentialReader() {
+        return credentialReader;
+    }
+
+    public void setCredentialReader(CredentialReader credentialReader) {
+        this.credentialReader = credentialReader;
+    }
+
+    public RequestData getRequestData() {
+        return requestData;
+    }
+
+    public void setRequestData(RequestData requestData) {
+        this.requestData = requestData;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
new file mode 100644
index 0000000..c3978b1
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -0,0 +1,367 @@
+/*
+ *
+ * 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.gsissh.util;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.RequestData;
+import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.core.context.MessageContext;
+import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
+import org.apache.airavata.gfac.gsissh.security.TokenizedMyProxyAuthInfo;
+import org.apache.airavata.gfac.ssh.api.Cluster;
+import org.apache.airavata.gfac.ssh.api.ServerInfo;
+import org.apache.airavata.gfac.ssh.api.job.JobDescriptor;
+import org.apache.airavata.gfac.ssh.api.job.JobManagerConfiguration;
+import org.apache.airavata.gfac.ssh.impl.GSISSHAbstractCluster;
+import org.apache.airavata.gfac.ssh.impl.PBSCluster;
+import org.apache.airavata.gfac.ssh.util.CommonUtils;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.*;
+
+
+public class GFACGSISSHUtils {
+    private final static Logger logger = LoggerFactory.getLogger(GFACGSISSHUtils.class);
+
+    public static final String PBS_JOB_MANAGER = "pbs";
+    public static final String SLURM_JOB_MANAGER = "slurm";
+    public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
+    public static final String LSF_JOB_MANAGER = "lsf";
+
+    public static int maxClusterCount = 5;
+    public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
+
+    public static void addSecurityContext(JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
+        JobSubmissionInterface jobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface();
+        JobSubmissionProtocol jobProtocol = jobSubmissionInterface.getJobSubmissionProtocol();
+        try {
+            AppCatalog appCatalog = jobExecutionContext.getAppCatalog();
+            SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+            if (jobProtocol == JobSubmissionProtocol.GLOBUS || jobProtocol == JobSubmissionProtocol.UNICORE
+                    || jobProtocol == JobSubmissionProtocol.CLOUD || jobProtocol == JobSubmissionProtocol.LOCAL) {
+                logger.error("This is a wrong method to invoke to non ssh host types,please check your gfac-config.xml");
+            } else if (jobProtocol == JobSubmissionProtocol.SSH && sshJobSubmission.getSecurityProtocol() == SecurityProtocol.GSI) {
+                String credentialStoreToken = jobExecutionContext.getCredentialStoreToken(); // this is set by the framework
+                RequestData requestData = new RequestData(jobExecutionContext.getGatewayID());
+                requestData.setTokenId(credentialStoreToken);
+                PBSCluster pbsCluster = null;
+                GSISecurityContext context = null;
+
+                TokenizedMyProxyAuthInfo tokenizedMyProxyAuthInfo = new TokenizedMyProxyAuthInfo(requestData);
+                CredentialReader credentialReader = GFacUtils.getCredentialReader();
+                if (credentialReader != null) {
+                    CertificateCredential credential = null;
+                    try {
+                        credential = (CertificateCredential) credentialReader.getCredential(jobExecutionContext.getGatewayID(), credentialStoreToken);
+                        requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
+                    } catch (Exception e) {
+                        logger.error(e.getLocalizedMessage());
+                    }
+                }
+
+                String key = requestData.getMyProxyUserName() + jobExecutionContext.getHostName()+
+                        sshJobSubmission.getSshPort();
+                boolean recreate = false;
+                synchronized (clusters) {
+                    if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
+                        recreate = true;
+                    } else if (clusters.containsKey(key)) {
+                        int i = new Random().nextInt(Integer.MAX_VALUE) % maxClusterCount;
+                        if (clusters.get(key).get(i).getSession().isConnected()) {
+                            pbsCluster = (PBSCluster) clusters.get(key).get(i);
+                        } else {
+                            clusters.get(key).remove(i);
+                            recreate = true;
+                        }
+                        if (!recreate) {
+                            try {
+                                pbsCluster.listDirectory("~/"); // its hard to trust isConnected method, so we try to connect if it works we are good,else we recreate
+                            } catch (Exception e) {
+                                clusters.get(key).remove(i);
+                                logger.info("Connection found the connection map is expired, so we create from the scratch");
+                                maxClusterCount++;
+                                recreate = true; // we make the pbsCluster to create again if there is any exception druing connection
+                            }
+                            logger.info("Re-using the same connection used with the connection string:" + key);
+                            context = new GSISecurityContext(tokenizedMyProxyAuthInfo.getCredentialReader(), requestData, pbsCluster);
+                        }
+                    } else {
+                        recreate = true;
+                    }
+
+                    if (recreate) {
+                        ServerInfo serverInfo = new ServerInfo(requestData.getMyProxyUserName(), jobExecutionContext.getHostName(),
+                                sshJobSubmission.getSshPort());
+
+                        JobManagerConfiguration jConfig = null;
+                        String installedParentPath = sshJobSubmission.getResourceJobManager().getJobManagerBinPath();
+                        String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString();
+                        if (jobManager == null) {
+                            logger.error("No Job Manager is configured, so we are picking pbs as the default job manager");
+                            jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                        } else {
+                            if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                jConfig = CommonUtils.getPBSJobManager(installedParentPath);
+                            } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
+                            } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                jConfig = CommonUtils.getUGEJobManager(installedParentPath);
+                            }else if(LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+                                jConfig = CommonUtils.getLSFJobManager(installedParentPath);
+                            }
+                        }
+                        pbsCluster = new PBSCluster(serverInfo, tokenizedMyProxyAuthInfo, jConfig);
+                        context = new GSISecurityContext(tokenizedMyProxyAuthInfo.getCredentialReader(), requestData, pbsCluster);
+                        List<Cluster> pbsClusters = null;
+                        if (!(clusters.containsKey(key))) {
+                            pbsClusters = new ArrayList<Cluster>();
+                        } else {
+                            pbsClusters = clusters.get(key);
+                        }
+                        pbsClusters.add(pbsCluster);
+                        clusters.put(key, pbsClusters);
+                    }
+                }
+
+                jobExecutionContext.addSecurityContext(jobExecutionContext.getHostName(), context);
+            }
+        } catch (Exception e) {
+            throw new GFacException("An error occurred while creating GSI security context", e);
+        }
+    }
+
+    public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext, Cluster cluster) {
+        JobDescriptor jobDescriptor = new JobDescriptor();
+        TaskDetails taskData = jobExecutionContext.getTaskData();
+        ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
+        try {
+			if(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")){
+				jobDescriptor.setMailOptions(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS));
+				String emailids = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
+
+				if(jobExecutionContext.getTaskData().isSetEmailAddresses()){
+					List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
+					String elist = GFacUtils.listToCsv(emailList, ',');
+					if(emailids != null && !emailids.isEmpty()){
+						emailids = emailids +"," + elist;
+					}else{
+						emailids = elist;
+					}
+				}
+				if(emailids != null && !emailids.isEmpty()){
+					logger.info("Email list: "+ emailids);
+					jobDescriptor.setMailAddress(emailids);
+				}
+			}
+		} catch (ApplicationSettingsException e) {
+			 logger.error("ApplicationSettingsException : " +e.getLocalizedMessage());
+		}
+        // this is common for any application descriptor
+        jobDescriptor.setCallBackIp(ServerSettings.getIp());
+        jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT, "8950"));
+        jobDescriptor.setInputDirectory(jobExecutionContext.getInputDir());
+        jobDescriptor.setOutputDirectory(jobExecutionContext.getOutputDir());
+        jobDescriptor.setExecutablePath(jobExecutionContext.getExecutablePath());
+        jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
+        jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
+        String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
+        taskData.getEmailAddresses();
+        if (computationalProjectAccount == null){
+            ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
+            if (computeResourcePreference != null) {
+                computationalProjectAccount = computeResourcePreference.getAllocationProjectNumber();
+            }
+        }
+        if (computationalProjectAccount != null) {
+            jobDescriptor.setAcountString(computationalProjectAccount);
+        }
+
+        Random random = new Random();
+        int i = random.nextInt(Integer.MAX_VALUE); // We always set the job name
+        jobDescriptor.setJobName("A" + String.valueOf(i+99999999));
+        jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
+
+        List<String> inputValues = new ArrayList<String>();
+        MessageContext input = jobExecutionContext.getInMessageContext();
+        // sort the inputs first and then build the command List
+        Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
+            @Override
+            public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
+                return inputDataObjectType.getInputOrder() - t1.getInputOrder();
+            }
+        };
+        Set<InputDataObjectType> sortedInputSet = new TreeSet<InputDataObjectType>(inputOrderComparator);
+        for (Object object : input.getParameters().values()) {
+            if (object instanceof InputDataObjectType) {
+                InputDataObjectType inputDOT = (InputDataObjectType) object;
+                sortedInputSet.add(inputDOT);
+            }
+        }
+        for (InputDataObjectType inputDataObjectType : sortedInputSet) {
+            if (!inputDataObjectType.isRequiredToAddedToCommandLine()) {
+                continue;
+            }
+            if (inputDataObjectType.getApplicationArgument() != null
+                    && !inputDataObjectType.getApplicationArgument().equals("")) {
+                inputValues.add(inputDataObjectType.getApplicationArgument());
+            }
+
+            if (inputDataObjectType.getValue() != null
+                    && !inputDataObjectType.getValue().equals("")) {
+                if (inputDataObjectType.getType() == DataType.URI) {
+                    // set only the relative path
+                    String filePath = inputDataObjectType.getValue();
+                    filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                    inputValues.add(filePath);
+                }else {
+                    inputValues.add(inputDataObjectType.getValue());
+                }
+
+            }
+        }
+
+        Map<String, Object> outputParams = jobExecutionContext.getOutMessageContext().getParameters();
+        for (Object outputParam : outputParams.values()) {
+            if (outputParam instanceof OutputDataObjectType) {
+                OutputDataObjectType output = (OutputDataObjectType) outputParam;
+                if (output.getApplicationArgument() != null
+                        && !output.getApplicationArgument().equals("")) {
+                    inputValues.add(output.getApplicationArgument());
+                }
+                if (output.getValue() != null && !output.getValue().equals("") && output.isRequiredToAddedToCommandLine()) {
+                    if (output.getType() == DataType.URI){
+                        String filePath = output.getValue();
+                        filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+                        inputValues.add(filePath);
+                    }
+                }
+            }
+        }
+        jobDescriptor.setInputValues(inputValues);
+
+        jobDescriptor.setUserName(((GSISSHAbstractCluster) cluster).getServerInfo().getUserName());
+        jobDescriptor.setShellName("/bin/bash");
+        jobDescriptor.setAllEnvExport(true);
+        jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
+
+        ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
+        if (taskScheduling != null) {
+            int totalNodeCount = taskScheduling.getNodeCount();
+            int totalCPUCount = taskScheduling.getTotalCPUCount();
+
+//        jobDescriptor.setJobSubmitter(applicationDeploymentType.getJobSubmitterCommand());
+            if (taskScheduling.getComputationalProjectAccount() != null) {
+                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+            }
+            if (taskScheduling.getQueueName() != null) {
+                jobDescriptor.setQueueName(taskScheduling.getQueueName());
+            }
+
+            if (totalNodeCount > 0) {
+                jobDescriptor.setNodes(totalNodeCount);
+            }
+            if (taskScheduling.getComputationalProjectAccount() != null) {
+                jobDescriptor.setAcountString(taskScheduling.getComputationalProjectAccount());
+            }
+            if (taskScheduling.getQueueName() != null) {
+                jobDescriptor.setQueueName(taskScheduling.getQueueName());
+            }
+            if (totalCPUCount > 0) {
+                int ppn = totalCPUCount / totalNodeCount;
+                jobDescriptor.setProcessesPerNode(ppn);
+                jobDescriptor.setCPUCount(totalCPUCount);
+            }
+            if (taskScheduling.getWallTimeLimit() > 0) {
+                jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
+                if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
+                    jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
+                }
+            }
+
+            if (taskScheduling.getTotalPhysicalMemory() > 0) {
+                jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
+            }
+        } else {
+            logger.error("Task scheduling cannot be null at this point..");
+        }
+
+        ApplicationDeploymentDescription appDepDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+        List<String> moduleCmds = appDepDescription.getModuleLoadCmds();
+        if (moduleCmds != null) {
+            for (String moduleCmd : moduleCmds) {
+                jobDescriptor.addModuleLoadCommands(moduleCmd);
+            }
+        }
+        List<String> preJobCommands = appDepDescription.getPreJobCommands();
+        if (preJobCommands != null) {
+            for (String preJobCommand : preJobCommands) {
+                jobDescriptor.addPreJobCommand(parseCommand(preJobCommand, jobExecutionContext));
+            }
+        }
+
+        List<String> postJobCommands = appDepDescription.getPostJobCommands();
+        if (postJobCommands != null) {
+            for (String postJobCommand : postJobCommands) {
+                jobDescriptor.addPostJobCommand(parseCommand(postJobCommand, jobExecutionContext));
+            }
+        }
+
+        ApplicationParallelismType parallelism = appDepDescription.getParallelism();
+        if (parallelism != null){
+            if (parallelism == ApplicationParallelismType.MPI || parallelism == ApplicationParallelismType.OPENMP || parallelism == ApplicationParallelismType.OPENMP_MPI){
+                Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
+                if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
+                    for (JobManagerCommand command : jobManagerCommands.keySet()) {
+                        if (command == JobManagerCommand.SUBMISSION) {
+                            String commandVal = jobManagerCommands.get(command);
+                            jobDescriptor.setJobSubmitter(commandVal);
+                        }
+                    }
+                }
+            }
+        }
+        return jobDescriptor;
+    }
+
+    private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
+        String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
+        parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
+        parsedValue = parsedValue.replaceAll("\\$outputDir", jobExecutionContext.getOutputDir());
+        return parsedValue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataJobStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataJobStatusUpdator.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataJobStatusUpdator.java
new file mode 100644
index 0000000..e7c6572
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataJobStatusUpdator.java
@@ -0,0 +1,120 @@
+/*
+ *
+ * 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.impl;
+
+import com.google.common.eventbus.Subscribe;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.Publisher;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.JobStatusChangeRequestEvent;
+import org.apache.airavata.model.messaging.event.MessageType;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.registry.cpi.CompositeIdentifier;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Calendar;
+
+public class AiravataJobStatusUpdator implements AbstractActivityListener {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataJobStatusUpdator.class);
+    private Registry airavataRegistry;
+
+    private MonitorPublisher monitorPublisher;
+    private Publisher publisher;
+
+
+    public Registry getAiravataRegistry() {
+        return airavataRegistry;
+    }
+
+    public void setAiravataRegistry(Registry airavataRegistry) {
+        this.airavataRegistry = airavataRegistry;
+    }
+
+
+    @Subscribe
+    public void updateRegistry(JobStatusChangeRequestEvent jobStatus) throws Exception{
+        /* Here we need to parse the jobStatus message and update
+                the registry accordingly, for now we are just printing to standard Out
+                 */
+        JobState state = jobStatus.getState();
+        if (state != null) {
+            try {
+                String taskID = jobStatus.getJobIdentity().getTaskId();
+                String jobID = jobStatus.getJobIdentity().getJobId();
+                String expId = jobStatus.getJobIdentity().getExperimentId();
+                updateJobStatus(expId,taskID, jobID, state);
+    			logger.debug("expId - {}: Publishing job status for " + jobStatus.getJobIdentity().getJobId() + ":"
+                        + state.toString(),jobStatus.getJobIdentity().getExperimentId());
+                JobStatusChangeEvent event = new JobStatusChangeEvent(jobStatus.getState(), jobStatus.getJobIdentity());
+                monitorPublisher.publish(event);
+                String messageId = AiravataUtils.getId("JOB");
+                MessageContext msgCntxt = new MessageContext(event, MessageType.JOB, messageId, jobStatus.getJobIdentity().getGatewayId());
+                msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+                publisher.publish(msgCntxt);
+            } catch (Exception e) {
+                logger.error("expId - " + jobStatus.getJobIdentity().getExperimentId() + ": Error persisting data"
+                        + e.getLocalizedMessage(), e);
+                throw new Exception("Error persisting job status..", e);
+            }
+        }
+    }
+
+    public  void updateJobStatus(String expId, String taskId, String jobID, JobState state) throws Exception {
+        logger.info("expId - {}: Updating job status for " + jobID + ":" + state.toString(), expId);
+        CompositeIdentifier ids = new CompositeIdentifier(taskId, jobID);
+        JobDetails details = (JobDetails) airavataRegistry.get(RegistryModelType.JOB_DETAIL, ids);
+        if (details == null) {
+            details = new JobDetails();
+        }
+        org.apache.airavata.model.workspace.experiment.JobStatus status = new org.apache.airavata.model.workspace.experiment.JobStatus();
+        if (JobState.CANCELED.equals(details.getJobStatus().getJobState()) ||
+                JobState.CANCELING.equals(details.getJobStatus().getJobState())) {
+            status.setJobState(details.getJobStatus().getJobState());
+        } else {
+            status.setJobState(state);
+        }
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        details.setJobStatus(status);
+        details.setJobID(jobID);
+        logger.debug("expId - {}: Updated job status for " + jobID + ":" + details.getJobStatus().toString(), expId);
+        airavataRegistry.update(RegistryModelType.JOB_STATUS, status, ids);
+    }
+
+	@SuppressWarnings("unchecked")
+	public void setup(Object... configurations) {
+		for (Object configuration : configurations) {
+			if (configuration instanceof Registry){
+				this.airavataRegistry=(Registry)configuration;
+			} else if (configuration instanceof MonitorPublisher){
+				this.monitorPublisher=(MonitorPublisher) configuration;
+			} else if (configuration instanceof Publisher){
+                this.publisher=(Publisher) configuration;
+            }
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataTaskStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataTaskStatusUpdator.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataTaskStatusUpdator.java
new file mode 100644
index 0000000..94029be
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataTaskStatusUpdator.java
@@ -0,0 +1,166 @@
+/*
+ *
+ * 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.impl;
+
+import com.google.common.eventbus.Subscribe;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.Publisher;
+import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.MessageType;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Calendar;
+
+public class AiravataTaskStatusUpdator implements AbstractActivityListener {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataTaskStatusUpdator.class);
+    private Registry airavataRegistry;
+    private MonitorPublisher monitorPublisher;
+    private Publisher publisher;
+    
+    public Registry getAiravataRegistry() {
+        return airavataRegistry;
+    }
+
+    public void setAiravataRegistry(Registry airavataRegistry) {
+        this.airavataRegistry = airavataRegistry;
+    }
+
+    @Subscribe
+    public void setupTaskStatus(TaskStatusChangeRequestEvent taskStatus) throws Exception{
+    	try {
+			updateTaskStatus(taskStatus.getTaskIdentity().getTaskId(), taskStatus.getState());
+            logger.debug("expId - {}: Publishing task status for " + taskStatus.getTaskIdentity().getTaskId() + ":"
+                    + taskStatus.getState().toString(), taskStatus.getTaskIdentity().getExperimentId());
+            TaskStatusChangeEvent event = new TaskStatusChangeEvent(taskStatus.getState(), taskStatus.getTaskIdentity());
+            monitorPublisher.publish(event);
+            String messageId = AiravataUtils.getId("TASK");
+            MessageContext msgCntxt = new MessageContext(event, MessageType.TASK, messageId, taskStatus.getTaskIdentity().getGatewayId());
+            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+            publisher.publish(msgCntxt);
+		} catch (Exception e) {
+            String msg = "Error persisting data task status to database...";
+            logger.error(msg + e.getLocalizedMessage(), e);
+            throw new Exception(msg, e);
+		}
+    }
+
+    @Subscribe
+    public void setupTaskStatus(JobStatusChangeEvent jobStatus) throws Exception{
+    	TaskState state=TaskState.UNKNOWN;
+    	switch(jobStatus.getState()){
+    	case ACTIVE:
+    		state=TaskState.EXECUTING; break;
+    	case CANCELED:
+    		state=TaskState.CANCELED; break;
+    	case COMPLETE: case FAILED:
+    		state=TaskState.POST_PROCESSING; break;
+    	case HELD: case SUSPENDED: case QUEUED:
+    		state=TaskState.WAITING; break;
+    	case SETUP:
+    		state=TaskState.PRE_PROCESSING; break;
+    	case SUBMITTED:
+    		state=TaskState.STARTED; break;
+    	case UN_SUBMITTED:
+    		state=TaskState.CANCELED; break;
+    	case CANCELING:
+    		state=TaskState.CANCELING; break;
+		default:
+			return;
+    	}
+    	try {
+			updateTaskStatus(jobStatus.getJobIdentity().getTaskId(), state);
+            logger.debug("expId - {}: Publishing task status for " + jobStatus.getJobIdentity().getTaskId() + ":"
+                    + state.toString(), jobStatus.getJobIdentity().getExperimentId());
+            TaskIdentifier taskIdentity = new TaskIdentifier(jobStatus.getJobIdentity().getTaskId(),
+                                                         jobStatus.getJobIdentity().getWorkflowNodeId(),
+                                                         jobStatus.getJobIdentity().getExperimentId(),
+                                                         jobStatus.getJobIdentity().getGatewayId());
+            TaskStatusChangeEvent event = new TaskStatusChangeEvent(state, taskIdentity);
+            monitorPublisher.publish(event);
+            String messageId = AiravataUtils.getId("TASK");
+            MessageContext msgCntxt = new MessageContext(event, MessageType.TASK, messageId,jobStatus.getJobIdentity().getGatewayId());
+            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+            publisher.publish(msgCntxt);
+
+        }  catch (Exception e) {
+            logger.error("expId - " + jobStatus.getJobIdentity().getExperimentId() + ": Error persisting data" + e.getLocalizedMessage(), e);
+            throw new Exception("Error persisting task status..", e);
+		}
+    }
+    
+    public  TaskState updateTaskStatus(String taskId, TaskState state) throws Exception {
+    	TaskDetails details = (TaskDetails)airavataRegistry.get(RegistryModelType.TASK_DETAIL, taskId);
+        if(details == null) {
+            logger.error("Task details cannot be null at this point");
+            throw new Exception("Task details cannot be null at this point");
+        }
+        org.apache.airavata.model.workspace.experiment.TaskStatus status = new org.apache.airavata.model.workspace.experiment.TaskStatus();
+        if(!TaskState.CANCELED.equals(details.getTaskStatus().getExecutionState())
+                && !TaskState.CANCELING.equals(details.getTaskStatus().getExecutionState())){
+            status.setExecutionState(state);
+        }else{
+            status.setExecutionState(details.getTaskStatus().getExecutionState());
+        }
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        details.setTaskStatus(status);
+        logger.debug("Updating task status for "+taskId+":"+details.getTaskStatus().toString());
+
+        airavataRegistry.update(RegistryModelType.TASK_STATUS, status, taskId);
+        return status.getExecutionState();
+    }
+
+	public void setup(Object... configurations) {
+		for (Object configuration : configurations) {
+			if (configuration instanceof Registry){
+				this.airavataRegistry=(Registry)configuration;
+			} else if (configuration instanceof MonitorPublisher){
+				this.monitorPublisher=(MonitorPublisher) configuration;
+			} else if (configuration instanceof Publisher){
+                this.publisher=(Publisher) configuration;
+            }
+        }
+	}
+
+
+    @Subscribe
+    public void taskOutputChanged(TaskOutputChangeEvent taskOutputEvent) throws AiravataException {
+        String taskId = taskOutputEvent.getTaskIdentity().getTaskId();
+        logger.debug("Task Output changed event received for workflow node : " +
+                taskOutputEvent.getTaskIdentity().getWorkflowNodeId() + ", task : " + taskId);
+        // TODO - do we need to update the output to the registry? , we do it in the workflowInterpreter too.
+        MessageContext messageContext = new MessageContext(taskOutputEvent, MessageType.TASKOUTPUT, taskOutputEvent.getTaskIdentity().getTaskId(), taskOutputEvent.getTaskIdentity().getGatewayId());
+        messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+        publisher.publish(messageContext);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7b809747/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataWorkflowNodeStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataWorkflowNodeStatusUpdator.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataWorkflowNodeStatusUpdator.java
new file mode 100644
index 0000000..092774b
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/AiravataWorkflowNodeStatusUpdator.java
@@ -0,0 +1,129 @@
+/*
+ *
+ * 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.impl;
+
+import com.google.common.eventbus.Subscribe;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.Publisher;
+import org.apache.airavata.model.messaging.event.MessageType;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
+import org.apache.airavata.model.messaging.event.WorkflowIdentifier;
+import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Calendar;
+
+public class AiravataWorkflowNodeStatusUpdator implements AbstractActivityListener {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataWorkflowNodeStatusUpdator.class);
+
+    private Registry airavataRegistry;
+    private MonitorPublisher monitorPublisher;
+    private Publisher publisher;
+
+
+
+
+    public Registry getAiravataRegistry() {
+        return airavataRegistry;
+    }
+
+    public void setAiravataRegistry(Registry airavataRegistry) {
+        this.airavataRegistry = airavataRegistry;
+    }
+
+    @Subscribe
+    public void setupWorkflowNodeStatus(TaskStatusChangeEvent taskStatus) throws Exception{
+    	WorkflowNodeState state=WorkflowNodeState.UNKNOWN;
+    	switch(taskStatus.getState()){
+    	case CANCELED:
+    		state=WorkflowNodeState.CANCELED; break;
+    	case COMPLETED:
+    		state=WorkflowNodeState.COMPLETED; break;
+    	case CONFIGURING_WORKSPACE:
+    		state=WorkflowNodeState.INVOKED; break;
+    	case FAILED:
+    		state=WorkflowNodeState.FAILED; break;
+    	case EXECUTING: case WAITING: case PRE_PROCESSING: case POST_PROCESSING: case OUTPUT_DATA_STAGING: case INPUT_DATA_STAGING:
+    		state=WorkflowNodeState.EXECUTING; break;
+    	case STARTED:
+    		state=WorkflowNodeState.INVOKED; break;
+    	case CANCELING:
+    		state=WorkflowNodeState.CANCELING; break;
+		default:
+			return;
+    	}
+    	try {
+            String expId = taskStatus.getTaskIdentity().getExperimentId();
+			updateWorkflowNodeStatus(expId, taskStatus.getTaskIdentity().getWorkflowNodeId(), state);
+            logger.debug("expId - {}: Publishing workflow node status for " + taskStatus.getTaskIdentity().getWorkflowNodeId()
+                    + ":" + state.toString(), taskStatus.getTaskIdentity().getExperimentId());
+            WorkflowIdentifier workflowIdentity = new WorkflowIdentifier(taskStatus.getTaskIdentity().getWorkflowNodeId(),
+                                                                         taskStatus.getTaskIdentity().getExperimentId(),
+                                                                         taskStatus.getTaskIdentity().getGatewayId());
+            WorkflowNodeStatusChangeEvent event = new WorkflowNodeStatusChangeEvent(state, workflowIdentity);
+            monitorPublisher.publish(event);
+            String messageId = AiravataUtils.getId("WFNODE");
+            MessageContext msgCntxt = new MessageContext(event, MessageType.WORKFLOWNODE, messageId, taskStatus.getTaskIdentity().getGatewayId());
+            msgCntxt.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
+
+            publisher.publish(msgCntxt);
+		} catch (Exception e) {
+            logger.error("expId - " + taskStatus.getTaskIdentity().getExperimentId() + ": Error persisting data"
+                    + e.getLocalizedMessage(), e);
+            throw new Exception("Error persisting workflow node status..", e);
+        }
+    }
+
+    public  void updateWorkflowNodeStatus(String experimentId, String workflowNodeId, WorkflowNodeState state) throws Exception {
+		logger.info("expId - {}: Updating workflow node status for "+workflowNodeId+":"+state.toString(), experimentId);
+    	WorkflowNodeDetails details = (WorkflowNodeDetails)airavataRegistry.get(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeId);
+        if(details == null) {
+            details = new WorkflowNodeDetails();
+            details.setNodeInstanceId(workflowNodeId);
+        }
+        WorkflowNodeStatus status = new WorkflowNodeStatus();
+        status.setWorkflowNodeState(state);
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        details.setWorkflowNodeStatus(status);
+        airavataRegistry.update(RegistryModelType.WORKFLOW_NODE_STATUS, status, workflowNodeId);
+    }
+
+	public void setup(Object... configurations) {
+		for (Object configuration : configurations) {
+			if (configuration instanceof Registry){
+				this.airavataRegistry=(Registry)configuration;
+			} else if (configuration instanceof MonitorPublisher){
+				this.monitorPublisher=(MonitorPublisher) configuration;
+			}  else if (configuration instanceof Publisher){
+                this.publisher=(Publisher) configuration;
+            }
+        }
+	}
+}