airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [19/90] [abbrv] [partial] AIRAVATA-1124
Date Mon, 14 Apr 2014 18:30:21 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
deleted file mode 100644
index b62feff..0000000
--- a/modules/xbaya-gui/pom.xml
+++ /dev/null
@@ -1,322 +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.12-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-xbaya-gui</artifactId>
-    <packaging>jar</packaging>
-    <name>Airavata XBaya</name>
-    <url>http://airavata.apache.org/</url>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>restore-persistence</id>
-                        <phase>prepare-package</phase>
-                        <configuration>
-                            <tasks>
-                                <copy file="${project.build.outputDirectory}/services.xml" tofile="${project.build.outputDirectory}/META-INF/services.xml" />
-                                <copy file="src/main/resources/WorkflowInterpretor.wsdl" tofile="${project.build.outputDirectory}/META-INF/service.wsdl" />
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-dependencies</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${basedir}/target/jnlp/lib</outputDirectory>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>true</overWriteSnapshots>
-                            <excludeTransitive>false</excludeTransitive>
-                        </configuration>
-                    </execution>
-                    <!--execution>
-                        <id>unpack-dependencies</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.airavata</groupId>
-                                    <artifactId>apache-airavata-samples</artifactId>
-                                    <type>zip</type>
-                                    <outputDirectory>${project.build.directory}/samples</outputDirectory>
-                                </artifactItem>
-	                        </artifactItems>
-                        </configuration>
-                    </execution-->
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <!--dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>apache-airavata-samples</artifactId>
-            <version>${project.version}</version>
-	    <type>zip</type>
-	    <optional>true</optional>
-        </dependency-->
-
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xpp3</artifactId>
-            <version>${xpp3.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xpp5</artifactId>
-            <version>${xpp5.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xsul</artifactId>
-            <version>${xsul.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>gpel-client</artifactId>
-            <version>${gpel.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>atomixmiser</artifactId>
-            <version>${atomixmiser.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-            <version>3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>1.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.python</groupId>
-            <artifactId>jython</artifactId>
-            <version>${jython.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-api</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-impl</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-dom</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.schema</groupId>
-            <artifactId>XmlSchema</artifactId>
-            <version>1.4.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.neethi</groupId>
-            <artifactId>neethi</artifactId>
-            <version>2.0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-local</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-http</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-
-        <!-- AMAZON STUFFS -->
-        <dependency>
-            <groupId>com.amazonaws</groupId>
-            <artifactId>aws-java-sdk</artifactId>
-            <version>1.3.20</version>
-        </dependency>
-        <dependency>
-            <groupId>net.java.dev.jets3t</groupId>
-            <artifactId>jets3t</artifactId>
-            <version>0.8.0</version>
-        </dependency>
-
-        <!-- AIRAVATA modules -->
-        <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-workflow-model-component</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-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-message-broker</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-workflow-tracking</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-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- JCR Support -->
-        <!-- TODO need clean up -->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-schema-utils</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-ec2</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>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>${jcr.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-execution-context</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.derby</groupId>
-            <artifactId>derbyclient</artifactId>
-            <version>${derby.version}</version>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.globusonline</groupId>-->
-            <!--<artifactId>transfer-api-client-java</artifactId>-->
-            <!--<version>0.10.8</version>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore</artifactId>
-            <version>4.3</version>
-        </dependency>
-	<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
deleted file mode 100644
index 6f4d2db..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
+++ /dev/null
@@ -1,315 +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.xbaya;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.airavata.workflow.model.exceptions.WorkflowException;
-import org.apache.airavata.xbaya.XBayaConfiguration.XBayaExecutionMode;
-import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class XBaya {
-
-    private static final Logger logger = LoggerFactory.getLogger(XBaya.class);
-
-    private XBayaConfiguration config;
-
-    private XBayaEngine engine;
-
-    public static int preservice = 0;
-
-    /**
-     * Constructs an XBayaEngine.
-     * 
-     * @param args
-     */
-    public XBaya(String[] args) {
-        parseArguments(args);
-        try {
-            this.engine = new XBayaEngine(this.config);
-
-        } catch (RuntimeException e) {
-            logger.error(e.getMessage(), e);
-            try {
-                this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-            } catch (Throwable t) {
-                // Cannot do anything
-                e.printStackTrace();
-            }
-        } catch (Error e) {
-            logger.error(e.getMessage(), e);
-            try {
-                this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-            } catch (Throwable t) {
-                // Cannot do anything
-                System.out.println(e);
-
-            }
-        }
-    }
-
-    /**
-     * Returns the XBayaEngine.
-     * 
-     * @return The XBayaEngine
-     */
-    public XBayaEngine getEngine() {
-        return this.engine;
-    }
-
-    private void printUsage() {
-        System.err.println("Usage: java " + XBaya.class.getName() + " [-help]" + "[-config file]" + " [-title title]"
-                + " [-workflow workflow]" + " [-enableLocalRegistry]" + " [-localRegistry dir]"
-                + " [-gpelEngineURL url]" + " [-templateID templateID]" + " [-instanceID instanceID]"
-                + " [-gfacURL url]" + " [-dscURL url" + " [-startMonitor {true,false}]" + " [-brokerURL url]"
-                + " [-topic topic]" + " [-pullMode {true,false}]" + " [-myProxyServer host]" + " [-karmaURL url]"
-                + " [-karmaWorkflowInstanceID]" + " [-myProxyPort port]" + " [-myProxyUsername username]"
-                + " [-myProxyLifetime sec]" + " [-loadMyProxy {true,false}]" + " [-messageBoxURL url]"
-                + " [-width width]" + " [-height height]" + " [-exitOnClose false/true]" + "[-enableProvenance false/true]"
-                + "[-enableProvenanceSmartRun false/true]" + "[-runWithCrossProduct true/false]"+"[-mode ide/monitor]" + "[--x x-coordinates of left top corner] " +
-                "+ [--y y-coordinate of left top corner]");
-    }
-
-    private void parseArguments(String[] args) {
-        try {
-            this.config = new XBayaConfiguration();
-
-            int index = 0;
-            while (index < args.length) {
-                String arg = args[index];
-                String possibleValue = "";
-                if ((index + 1) < args.length) {
-                    possibleValue = args[index + 1];
-                }
-                logger.debug("arg: " + arg + " " + possibleValue);
-                if ("-help".equalsIgnoreCase(arg)) {
-                    printUsage();
-                    System.exit(0);
-                } else if ("-config".equalsIgnoreCase(arg)) {
-                    index++;
-                    String configPath = args[index];
-                    try {
-                        this.config.loadConfiguration(configPath);
-                    } catch (RuntimeException e) {
-                        String message = "Error while reading config file, " + configPath;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-title".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setTitle(args[index]);
-                } else if ("-workflow".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setWorkflow(args[index]);
-                } else if ("-gfacURL".equalsIgnoreCase(arg)) {
-                    index++;
-                    String url = args[index];
-                    try {
-                        this.config.setGFacURL(parseURL(url));
-                    } catch (URISyntaxException e) {
-                        String message = "The GFac URL is in wrong format: " + url;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-dscURL".equalsIgnoreCase(arg)) {
-                    index++;
-                    String url = args[index];
-                    try {
-                        this.config.setDSCURL(parseURL(url));
-                    } catch (URISyntaxException e) {
-                        String message = "The DSC URL is in wrong format: " + url;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-startMonitor".equalsIgnoreCase(arg)) {
-                    this.config.setStartMonitor(true);
-                } else if ("-brokerURL".equalsIgnoreCase(arg)) {
-                    index++;
-                    String brokerURL = args[index];
-                    try {
-                        this.config.setBrokerURL(parseURL(brokerURL));
-                    } catch (URISyntaxException e) {
-                        String message = "The broker URL is in wrong format: " + brokerURL;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-odeEngine".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setOdeURL(args[index]);
-
-                } else if ("-templateID".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setWorkflow(args[index]);
-
-                } else if ("-topic".equalsIgnoreCase(arg)) {
-
-                    index++;
-                    this.config.setTopic(args[index]);
-                } else if ("-pullMode".equalsIgnoreCase(arg)) {
-                    if (index < args.length - 1) {
-                        String nextArg = args[index + 1];
-                        if (nextArg.startsWith("-")) {
-                            this.config.setPullMode(true);
-                        } else if ("true".equalsIgnoreCase(nextArg)) {
-                            index++;
-                            this.config.setPullMode(true);
-                        } else if ("false".equalsIgnoreCase(nextArg)) {
-                            index++;
-                            this.config.setPullMode(false);
-                        } else {
-                            String message = "-pullMode has to be either true or false, not " + nextArg;
-                            logger.warn(message);
-                            this.config.addError(new WorkflowException(message));
-                        }
-                    } else {
-                        // This is the last arg
-                        this.config.setPullMode(true);
-                    }
-                } else if ("-messageBoxURL".equalsIgnoreCase(arg) || "-msgBoxURL".equalsIgnoreCase(arg)) {
-                    index++;
-                    String messageBoxURL = args[index];
-                    try {
-                        this.config.setMessageBoxURL(parseURL(messageBoxURL));
-                    } catch (URISyntaxException e) {
-                        String message = "The message box URL is in wrong format: " + messageBoxURL;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-registryURL".equalsIgnoreCase(arg)) {
-                    index++;
-                    String registryURL = args[index];
-                    try {
-                        this.config.setRegistryURL(parseURL(registryURL));
-                        // we need to give preference when a user set registry url from the
-                        // command line
-                        this.config.setRegURLSetByCMD(true);
-                    } catch (URISyntaxException e) {
-                        String message = "The message box URL is in wrong format: " + registryURL;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                    } else if ("-registryUserName".equalsIgnoreCase(arg)) {
-
-                    index++;
-                    this.config.setRegigstryUserName(args[index]);
-                } else if ("-registryPassphrase".equalsIgnoreCase(arg)) {
-
-                    index++;
-                    this.config.setRegistryPassphrase(args[index]);
-                } else if ("-width".equalsIgnoreCase(arg)) {
-                    index++;
-                    String width = args[index];
-                    try {
-                        this.config.setWidth(Integer.parseInt(width));
-                    } catch (NumberFormatException e) {
-                        String message = "The width must be an integer: " + width;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-height".equalsIgnoreCase(arg)) {
-                    index++;
-                    String height = args[index];
-                    try {
-                        this.config.setHeight(Integer.parseInt(height));
-                    } catch (NumberFormatException e) {
-                        String message = "The height must be an integer: " + height;
-                        logger.warn(message, e);
-                        this.config.addError(new WorkflowException(message, e));
-                    }
-                } else if ("-exitOnClose".equalsIgnoreCase(arg)) {
-                    index++;
-                    String exit = args[index];
-                    if ("false".equalsIgnoreCase(exit)) {
-                        this.config.setCloseOnExit(false);
-                    }
-                }  else if ("-enableProvenance".equalsIgnoreCase(arg)) {
-                    index++;
-                    String exit = args[index];
-                    if ("true".equalsIgnoreCase(exit)) {
-                        this.config.setCollectProvenance(true);
-                    }
-                }  else if ("-enableProvenanceSmartRun".equalsIgnoreCase(arg)) {
-                    index++;
-                    String exit = args[index];
-                    if ("true".equalsIgnoreCase(exit)) {
-                        this.config.setProvenanceSmartRun(true);
-                    }
-                }  else if ("-runWithCrossProduct".equalsIgnoreCase(arg)) {
-                    index++;
-                    String exit = args[index];
-                    if ("false".equalsIgnoreCase(exit)) {
-                        this.config.setRunWithCrossProduct(false);
-                    }
-                }  else if ("-mode".equalsIgnoreCase(arg)) {
-                	index++;
-                	String modeValue = args[index].toUpperCase();
-                	this.config.setXbayaExecutionMode(XBayaExecutionMode.valueOf(modeValue));
-                } else if ("-x".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setX(Integer.parseInt(args[index]));
-                } else if ("-y".equalsIgnoreCase(arg)) {
-                    index++;
-                    this.config.setY(Integer.parseInt(args[index]));
-                } else {
-                    String message = "Unknown option: " + arg;
-                    logger.error(message);
-                    this.config.addError(new WorkflowException(message));
-                }
-                this.config.setAiravataAPI(this.config.getAiravataAPI());
-                index++;
-            }
-        } catch (ArrayIndexOutOfBoundsException e) {
-            String message = "Argument is missing after " + args[args.length - 1];
-            logger.error(message, e);
-            this.config.addError(new WorkflowException(message));
-        } catch (Throwable e) {
-            logger.error(e.getMessage(), e);
-            String message = "Unknown error while parsing the arguments";
-            this.config.addError(new WorkflowException(message, e));
-        }
-        
-    }
-
-    private URI parseURL(String urlString) throws URISyntaxException {
-        if (urlString.trim().length() == 0) {
-            // This makes it possible to not use some of our default services.
-            return null;
-        } else if ("null".equalsIgnoreCase(urlString)) {
-            // This is a workaround that JNLP doesn't take empty string as an
-            // argument.
-            return null;
-        } else {
-            return new URI(urlString).parseServerAuthority();
-        }
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        new XBaya(args);
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
deleted file mode 100644
index 4aae6b4..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConfiguration.java
+++ /dev/null
@@ -1,974 +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.xbaya;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.gfac.ec2.AmazonSecurityContext;
-import org.apache.airavata.schemas.wec.ContextHeaderDocument;
-import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
-import org.apache.airavata.xbaya.core.ide.XBayaExecutionModeListener;
-import org.apache.airavata.xbaya.file.XBayaPathConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadDeploymentConfig;
-
-public class XBayaConfiguration extends Observable implements Observer {
-
-    private static final Logger logger = LoggerFactory.getLogger(XBayaConfiguration.class);
-
-    private String title = XBayaConstants.APPLICATION_NAME;
-
-    private String workflow = null;
-
-    private String ogceWorkflow = null;
-
-    private List<String> localRegistris = new ArrayList<String>();
-
-    // GPEL Engine related
-
-    private URI gpelEngineURL = XBayaConstants.DEFAULT_GPEL_ENGINE_URL;
-
-    private URI gpelTemplateID = null;
-
-    private URI gpelInstanceID = null;
-
-    private AiravataAPI airavataAPI = null;
-    // ODE
-    private String odeURL = XBayaConstants.DEFAULT_ODE_URL;
-
-    // WorkflowInterpreter
-    private URI workflowInterpreterURL = XBayaConstants.DEFAULT_WORKFLOW_INTERPRETER_URL;
-
-    // Proxy Service
-
-    private URI proxyURI = XBayaConstants.DEFAULT_PROXY_URI;
-
-    private URI gfacURL = XBayaConstants.DEFAULT_GFAC_URL;
-
-    private URI registryURL = XBayaConstants.REGISTRY_URL;
-
-    private String regigstryUserName = XBayaConstants.REGISTRY_USERNAME;
-
-    private String registryPassphrase = XBayaConstants.REGISTRY_PASSPHRASE;
-
-    private String defaultGateway = XBayaConstants.DEFAULT_GATEWAY;
-
-    private URI dscURL = XBayaConstants.DEFAULT_DSC_URL;
-
-    // Monitor related
-
-    private boolean startMonitor = false;
-
-    private URI brokerURL = XBayaConstants.DEFAULT_BROKER_URL;
-
-    private String topic = null;
-
-    private boolean pullMode = true;
-
-    private URI messageBoxURL = XBayaConstants.DEFAULT_MESSAGE_BOX_URL;
-
-    // Kerma
-
-    private URI karmaURL = null;
-
-    private URI karmaWorkflowInstanceID = null;
-
-    // MyProxy
-
-    private String myProxyServer = XBayaConstants.DEFAULT_MYPROXY_SERVER;
-
-    private int myProxyPort = XBayaConstants.DEFAULT_MYPROXY_PORT;
-
-    private int myProxyLifetime = XBayaConstants.DEFAULT_MYPROXY_LIFTTIME;
-
-    private String myProxyUsername = null;
-
-    private String myProxyPassphrase = null;
-
-    private boolean loadMyProxy = false;
-
-    private boolean loadRunJythonWorkflow = false;
-
-    // Size
-
-    private int width;
-
-    private int height;
-
-    private int x = 50;
-
-    private int y= 50;
-
-    // Errors
-
-    private List<Throwable> errors;
-
-    private boolean closeOnExit = true;
-
-    private boolean collectProvenance = false;
-
-    private boolean provenanceSmartRun = false;
-
-    private boolean runWithCrossProduct = true;
-
-    private String trustedCertLocation = "";
-
-    private JCRComponentRegistry jcrComponentRegistry=null;
-
-    private XBayaExecutionMode xbayaExecutionMode=XBayaExecutionMode.IDE;
-    
-    private List<XBayaExecutionModeListener> xbayaExecutionModeChangeListners=new ArrayList<XBayaExecutionModeListener>();
-
-    private boolean regURLSetByCMD = false;
-
-    private AmazonSecurityContext amazonSecurityContext = null;
-
-    private ContextHeaderDocument.ContextHeader contextHeader;
-
-    public enum XBayaExecutionMode{
-    	IDE,
-    	MONITOR
-    }
-    /**
-     * Constructs an XwfConfiguration.
-     */
-    public XBayaConfiguration() {
-        this.errors = new ArrayList<Throwable>();
-
-        // Read from system properties first.
-        String systemConfig = System.getProperty("xbaya.config");
-        try {
-            if (systemConfig != null) {
-                loadConfiguration(systemConfig);
-            }
-        } catch (RuntimeException e) {
-            String message = "Error while reading a configuration file, " + systemConfig;
-            logger.warn(message, e);
-        }
-    }
-
-    /**
-     * @param configFilePath
-     */
-    public void loadConfiguration(String configFilePath) {
-        File configFile = new File(configFilePath);
-        URI uri = configFile.toURI();
-        loadConfiguration(uri);
-    }
-
-    private void loadConfiguration(URI uri) {
-        LeadDeploymentConfig config = LeadDeploymentConfig.loadConfig(null, uri);
-        URI gpel = config.getGpelUrl();
-        if (gpel != null) {
-            this.gpelEngineURL = config.getGpelUrl();
-        }
-        URI gfac = config.getGfacUrl();
-        if (gfac != null) {
-            this.gfacURL = gfac;
-        }
-        URI dsc = config.getDscUrl();
-        if (dsc != null) {
-            this.dscURL = dsc;
-        }
-        URI broker = config.getBrokerUrl();
-        if (broker != null) {
-            this.brokerURL = broker;
-        }
-        URI msgBox = config.getMsgBoxUrl();
-        if (msgBox != null) {
-            this.messageBoxURL = msgBox;
-        }
-    }
-
-    /**
-     * Returns the title.
-     * 
-     * @return The title
-     */
-    public String getTitle() {
-        return this.title;
-    }
-
-    /**
-     * Sets title.
-     * 
-     * @param title
-     *            The title to set.
-     */
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    /**
-     * Returns the defaultWorkflow.
-     * 
-     * @return The defaultWorkflow
-     */
-    public String getWorkflow() {
-        return this.workflow;
-    }
-
-    /**
-     * Sets defaultWorkflow.
-     * 
-     * @param defaultWorkflow
-     *            The defaultWorkflow to set.
-     */
-    public void setWorkflow(String defaultWorkflow) {
-        this.workflow = defaultWorkflow;
-    }
-
-    /**
-     * Sets ogceWorkflow.
-     * 
-     * @param ogceWorkflow
-     *            The ogceWorkflow to set.
-     */
-    public void setOGCEWorkflow(String ogceWorkflow) {
-        this.ogceWorkflow = ogceWorkflow;
-    }
-
-    /**
-     * Returns the ogceWorkflow.
-     * 
-     * @return The ogceWorkflow
-     */
-    public String getOGCEWorkflow() {
-        return this.ogceWorkflow;
-    }
-
-    /**
-     * Enable the system default local registry.
-     */
-    public void enableLocalRegistry() {
-        addLocalRegistry(XBayaPathConstants.WSDL_DIRECTORY);
-    }
-
-    /**
-     * @param path
-     *            The path of local registry.
-     */
-    public void addLocalRegistry(String path) {
-        this.localRegistris.add(path);
-    }
-
-    /**
-     * @return The list of pathes of local registries.
-     */
-    public List<String> getLocalRegistry() {
-        return this.localRegistris;
-    }
-
-    /**
-     * Returns the gpelEngineUrl.
-     * 
-     * @return The gpelEngineUrl
-     */
-    public URI getGPELEngineURL() {
-        return this.gpelEngineURL;
-    }
-
-    /**
-     * Sets gpelEngineUrl.
-     * 
-     * @param gpelEngineURL
-     *            The gpelEngineUrl to set.
-     */
-    public void setGPELEngineURL(URI gpelEngineURL) {
-        this.gpelEngineURL = gpelEngineURL;
-    }
-
-    /**
-     * @param templateID
-     */
-    public void setGPELTemplateID(URI templateID) {
-        this.gpelTemplateID = templateID;
-    }
-
-    /**
-     * @return The GPEL template ID.
-     */
-    public URI getGPELTemplateID() {
-        return this.gpelTemplateID;
-    }
-
-    /**
-     * Returns the gpelInstanceID.
-     * 
-     * @return The gpelInstanceID
-     */
-    public URI getGPELInstanceID() {
-        return this.gpelInstanceID;
-    }
-
-    /**
-     * Sets gpelInstanceID.
-     * 
-     * @param gpelInstanceID
-     *            The gpelInstanceID to set.
-     */
-    public void setGPELInstanceID(URI gpelInstanceID) {
-        this.gpelInstanceID = gpelInstanceID;
-    }
-
-    /**
-     * Get the AmazonSecurityContext needed for cloud job submission.
-     * @return AmazonSecurityContext
-     */
-    public AmazonSecurityContext getAmazonSecurityContext() {
-        return amazonSecurityContext;
-    }
-
-    /**
-     * Set the AmazonSecurityContext needed for cloud job submission.
-     * @param amazonSecurityContext amazon security context.
-     */
-    public void setAmazonSecurityContext(AmazonSecurityContext amazonSecurityContext) {
-        this.amazonSecurityContext = amazonSecurityContext;
-    }
-
-    /**
-     * @return The GFac URL
-     */
-    public URI getGFacURL() {
-        return this.gfacURL;
-    }
-
-    /**
-     * @param gfacURL
-     */
-    public void setGFacURL(URI gfacURL) {
-        this.gfacURL = gfacURL;
-    }
-
-    /**
-     * @return The DSC URL
-     */
-    public URI getDSCURL() {
-        return this.dscURL;
-    }
-
-    /**
-     * @param dscURL
-     */
-    public void setDSCURL(URI dscURL) {
-        this.dscURL = dscURL;
-    }
-
-    /**
-     * Returns the topic.
-     * 
-     * @return The topic
-     */
-    public String getTopic() {
-        return this.topic;
-    }
-
-    /**
-     * Sets topic.
-     * 
-     * @param topic
-     *            The topic to set.
-     */
-    public void setTopic(String topic) {
-        this.topic = topic;
-    }
-
-    /**
-     * Returns the messageBoxUrl.
-     * 
-     * @return The messageBoxUrl
-     */
-    public URI getMessageBoxURL() {
-        return this.messageBoxURL;
-    }
-
-    /**
-     * Sets messageBoxUrl.
-     * 
-     * @param messageBoxURL
-     *            The messageBoxUrl to set.
-     */
-    public void setMessageBoxURL(URI messageBoxURL) {
-        this.messageBoxURL = messageBoxURL;
-    }
-
-    /**
-     * Returns the pullMode.
-     * 
-     * @return The pullMode
-     */
-    public boolean isPullMode() {
-        return this.pullMode;
-    }
-
-    /**
-     * Sets pullMode.
-     * 
-     * @param pullMode
-     *            The pullMode to set.
-     */
-    public void setPullMode(boolean pullMode) {
-        this.pullMode = pullMode;
-    }
-
-    /**
-     * Returns the brokerLocation.
-     * 
-     * @return The brokerLocation
-     */
-    public URI getBrokerURL() {
-        return this.brokerURL;
-    }
-
-    /**
-     * Sets brokerLocation.
-     * 
-     * @param brokerURL
-     *            The brokerLocation to set.
-     */
-    public void setBrokerURL(URI brokerURL) {
-        this.brokerURL = brokerURL;
-    }
-
-    /**
-     * Returns the startMonitor.
-     * 
-     * @return The startMonitor
-     */
-    public boolean isStartMonitor() {
-        return this.startMonitor;
-    }
-
-    /**
-     * Sets startMonitor.
-     * 
-     * @param startMonitor
-     *            The startMonitor to set.
-     */
-    public void setStartMonitor(boolean startMonitor) {
-        this.startMonitor = startMonitor;
-    }
-
-    /**
-     * Returns the kermaURI.
-     * 
-     * @return The kermaURI
-     */
-    public URI getKarmaURL() {
-        return this.karmaURL;
-    }
-
-    /**
-     * Sets kermaURI.
-     * 
-     * @param kermaURI
-     *            The kermaURI to set.
-     */
-    public void setKarmaURL(URI kermaURI) {
-        this.karmaURL = kermaURI;
-    }
-
-    /**
-     * Returns the kermaWorkflowInstanceID.
-     * 
-     * @return The kermaWorkflowInstanceID
-     */
-    public URI getKarmaWorkflowInstanceID() {
-        return this.karmaWorkflowInstanceID;
-    }
-
-    /**
-     * Sets kermaWorkflowInstanceID.
-     * 
-     * @param karmaWorkflowInstanceID
-     *            The kermaWorkflowInstanceID to set.
-     */
-    public void setKarmaWorkflowInstanceID(URI karmaWorkflowInstanceID) {
-        this.karmaWorkflowInstanceID = karmaWorkflowInstanceID;
-    }
-
-    /**
-     * Returns the myProxyServer.
-     * 
-     * @return The myProxyServer
-     */
-    public String getMyProxyServer() {
-        return this.myProxyServer;
-    }
-
-    /**
-     * Sets myProxyServer.
-     * 
-     * @param myProxyServer
-     *            The myProxyServer to set.
-     */
-    public void setMyProxyServer(String myProxyServer) {
-        this.myProxyServer = myProxyServer;
-    }
-
-    /**
-     * Returns the myProxyPort.
-     * 
-     * @return The myProxyPort
-     */
-    public int getMyProxyPort() {
-        return this.myProxyPort;
-    }
-
-    /**
-     * Sets myProxyPort.
-     * 
-     * @param myProxyPort
-     *            The myProxyPort to set.
-     */
-    public void setMyProxyPort(int myProxyPort) {
-        this.myProxyPort = myProxyPort;
-    }
-
-    /**
-     * Returns the myProxyLifetime.
-     * 
-     * @return The myProxyLifetime
-     */
-    public int getMyProxyLifetime() {
-        return this.myProxyLifetime;
-    }
-
-    /**
-     * Sets myProxyLifetime.
-     * 
-     * @param myProxyLifetime
-     *            The myProxyLifetime to set.
-     */
-    public void setMyProxyLifetime(int myProxyLifetime) {
-        this.myProxyLifetime = myProxyLifetime;
-    }
-
-    /**
-     * Returns the myProxyUsername.
-     * 
-     * @return The myProxyUsername
-     */
-    public String getMyProxyUsername() {
-        return this.myProxyUsername;
-    }
-
-    /**
-     * Sets myProxyUsername.
-     * 
-     * @param myProxyUsername
-     *            The myProxyUsername to set.
-     */
-    public void setMyProxyUsername(String myProxyUsername) {
-        this.myProxyUsername = myProxyUsername;
-    }
-
-    /**
-     * Returns the odeURL.
-     * 
-     * @return The odeURL
-     */
-    public String getOdeURL() {
-        return this.odeURL;
-    }
-
-    /**
-     * Sets odeURL.
-     * 
-     * @param odeURL
-     *            The odeURL to set.
-     */
-    public void setOdeURL(String odeURL) {
-        this.odeURL = odeURL;
-    }
-
-    /**
-     * Returns the workflowInterpreterURL.
-     * 
-     * @return The workflowInterpreterURL
-     */
-    public URI getWorkflowInterpreterURL() {
-        return this.workflowInterpreterURL;
-    }
-
-    /**
-     * Sets workflowInterpreterURL.
-     * 
-     * @param workflowInterpreterURL
-     *            The workflowInterpreterURL to set.
-     */
-    public void setWorkflowInterpreterURL(URI workflowInterpreterURL) {
-        this.workflowInterpreterURL = workflowInterpreterURL;
-    }
-
-    /**
-     * Sets proxyURI.
-     * 
-     * @param proxyURI
-     *            The proxyURI to set.
-     */
-    public void setProxyURI(URI proxyURI) {
-        this.proxyURI = proxyURI;
-    }
-
-    /**
-     * Returns the myProxyPassphrase.
-     * 
-     * @return The myProxyPassphrase
-     */
-    public String getMyProxyPassphrase() {
-        return this.myProxyPassphrase;
-    }
-
-    /**
-     * Sets myProxyPassphrase.
-     * 
-     * @param myProxyPassphrase
-     *            The myProxyPassphrase to set.
-     */
-    public void setMyProxyPassphrase(String myProxyPassphrase) {
-        this.myProxyPassphrase = myProxyPassphrase;
-    }
-
-    /**
-     * Returns the loadMyProxy.
-     * 
-     * @return The loadMyProxy
-     */
-    public boolean isLoadMyProxy() {
-        return this.loadMyProxy;
-    }
-
-    /**
-     * Sets loadMyProxy.
-     * 
-     * @param loadMyProxy
-     *            The loadMyProxy to set.
-     */
-    public void setLoadMyProxy(boolean loadMyProxy) {
-        this.loadMyProxy = loadMyProxy;
-    }
-
-    /**
-     * Returns the loadRunJythonWorkflow.
-     * 
-     * @return The loadRunJythonWorkflow
-     */
-    public boolean isLoadRunJythonWorkflow() {
-        return this.loadRunJythonWorkflow;
-    }
-
-    /**
-     * Sets loadRunJythonWorkflow.
-     * 
-     * @param loadRunJythonWorkflow
-     *            The loadRunJythonWorkflow to set.
-     */
-    public void setLoadRunJythonWorkflow(boolean loadRunJythonWorkflow) {
-        this.loadRunJythonWorkflow = loadRunJythonWorkflow;
-    }
-
-    /**
-     * Returns the height.
-     * 
-     * @return The height
-     */
-    public int getHeight() {
-        return this.height;
-    }
-
-    /**
-     * Sets height.
-     * 
-     * @param height
-     *            The height to set.
-     */
-    public void setHeight(int height) {
-        this.height = height;
-    }
-
-    /**
-     * Returns the width.
-     * 
-     * @return The width
-     */
-    public int getWidth() {
-        return this.width;
-    }
-
-    /**
-     * Sets width.
-     * 
-     * @param width
-     *            The width to set.
-     */
-    public void setWidth(int width) {
-        this.width = width;
-    }
-
-    /**
-     * Add an error.
-     * 
-     * @param e
-     */
-    public void addError(Throwable e) {
-        this.errors.add(e);
-    }
-
-    /**
-     * Returns errors.
-     * 
-     * @return Errors.
-     */
-    public Iterable<Throwable> getErrors() {
-        return this.errors;
-    }
-
-    /**
-     * @return
-     */
-    public String getODEURL() {
-        // TODO Auto-generated method stub
-        return this.odeURL;
-    }
-
-    //
-
-    /**
-     * Returns current proxy URI
-     * 
-     * @return
-     */
-    public URI getProxyURI() {
-        return this.proxyURI;
-    }
-
-    /**
-     * @param b
-     */
-    public void setCloseOnExit(boolean b) {
-        this.closeOnExit = b;
-    }
-
-    /**
-     * @return
-     */
-    public boolean isCloseOnExit() {
-        return this.closeOnExit;
-    }
-
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
-
-    public void setAiravataAPI(AiravataAPI airavataAPI) {
-        if (this.airavataAPI != null && this.airavataAPI instanceof Observable) {
-            ((Observable) this.airavataAPI).deleteObserver(this);
-        }
-        this.airavataAPI = airavataAPI;
-        if (airavataAPI != null && airavataAPI instanceof Observable) {
-            ((Observable) airavataAPI).addObserver(this);
-        }
-        if (getJcrComponentRegistry()==null){
-        	setJcrComponentRegistry(new JCRComponentRegistry(airavataAPI));
-        }else{
-        	getJcrComponentRegistry().setAiravataAPI(airavataAPI);
-        }
-        triggerObservers(getJcrComponentRegistry());
-    }
-
-    public URI getRegistryURL() {
-        return registryURL;
-    }
-
-    public void setRegistryURL(URI registryURL) {
-        this.registryURL = registryURL;
-    }
-
-    public void setRegigstryUserName(String regigstryUserName) {
-        this.regigstryUserName = regigstryUserName;
-    }
-
-    public void setRegistryPassphrase(String registryPassphrase) {
-        this.registryPassphrase = registryPassphrase;
-    }
-
-    public String getRegistryUserName() {
-        return regigstryUserName;
-    }
-
-    public String getRegistryPassphrase() {
-        return registryPassphrase;
-    }
-
-    protected void triggerObservers(Object o) {
-        setChanged();
-        notifyObservers(o);
-    }
-
-    public void update(Observable observable, Object o) {
-        triggerObservers(observable);
-    }
-
-    public boolean isCollectProvenance() {
-        return collectProvenance;
-    }
-
-    public boolean isProvenanceSmartRun() {
-        return provenanceSmartRun;
-    }
-
-    public void setCollectProvenance(boolean collectProvenance) {
-        this.collectProvenance = collectProvenance;
-    }
-
-    public void setProvenanceSmartRun(boolean provenanceSmartRun) {
-        this.provenanceSmartRun = provenanceSmartRun;
-    }
-
-    public void setRunWithCrossProduct(boolean runWithCrossProduct) {
-        this.runWithCrossProduct = runWithCrossProduct;
-    }
-
-    public boolean isRunWithCrossProduct() {
-        return runWithCrossProduct;
-    }
-
-    public String getTrustedCertLocation() {
-        return trustedCertLocation;
-    }
-
-    public void setTrustedCertLocation(String trustedCertLocation) {
-        this.trustedCertLocation = trustedCertLocation;
-    }
-
-	public XBayaExecutionMode getXbayaExecutionMode() {
-		return xbayaExecutionMode;
-	}
-
-	public void setXbayaExecutionMode(XBayaExecutionMode xbayaExecutionMode) {
-		boolean modeChanged=(this.xbayaExecutionMode != xbayaExecutionMode);
-		this.xbayaExecutionMode = xbayaExecutionMode;
-		if (modeChanged) {
-			for (XBayaExecutionModeListener listner : xbayaExecutionModeChangeListners) {
-				try {
-					listner.executionModeChanged(this);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-		}
-	}
-	
-	public void registerExecutionModeChangeListener(XBayaExecutionModeListener listner){
-		xbayaExecutionModeChangeListners.add(listner);
-	}
-	
-	public void unregisterExecutionModeChangeListener(XBayaExecutionModeListener listner){
-		if (xbayaExecutionModeChangeListners.contains(listner)) {
-			xbayaExecutionModeChangeListners.remove(listner);
-		}
-	}
-
-    public int getX() {
-        return x;
-    }
-
-    public void setX(int x) {
-        this.x = x;
-    }
-
-    public int getY() {
-        return y;
-    }
-
-    public void setY(int y) {
-        this.y = y;
-    }
-
-//    public AiravataAPI getAiravataAPI() {
-//        return airavataAPI;
-//    }
-//
-//    public void setAiravataAPI(AiravataAPI airavataAPI) {
-//        this.airavataAPI = airavataAPI;
-//    }
-
-    public String getDefaultGateway() {
-        return defaultGateway;
-    }
-
-    public void setDefaultGateway(String defaultGateway) {
-        this.defaultGateway = defaultGateway;
-    }
-
-	public JCRComponentRegistry getJcrComponentRegistry() {
-		return jcrComponentRegistry;
-	}
-
-	public void setJcrComponentRegistry(JCRComponentRegistry jcrComponentRegistry) {
-		this.jcrComponentRegistry = jcrComponentRegistry;
-	}
-
-    public boolean isRegURLSetByCMD() {
-        return regURLSetByCMD;
-    }
-
-    public void setRegURLSetByCMD(boolean regURLSetByCMD) {
-        this.regURLSetByCMD = regURLSetByCMD;
-    }
-
-    //    public AiravataAPI setAiravataAPI() {
-//        try{
-//            URI baseUri = new URI(ResourcePathConstants.BASE_URL);
-//            PasswordCallbackImpl passwordCallback = new PasswordCallbackImpl(getRegistryUserName(), getRegistryPassphrase());
-//            airavataAPI = AiravataClientUtils.getAPI(baseUri,
-//                    getRegistryUserName(), passwordCallback);
-//        } catch (RepositoryException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        } catch (MalformedURLException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        } catch (RegistryException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        } catch (URISyntaxException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        }
-//        return airavataAPI;
-//    }
-
-    public ContextHeaderDocument.ContextHeader getContextHeader() {
-        return contextHeader;
-    }
-
-    public void setContextHeader(ContextHeaderDocument.ContextHeader contextHeader) {
-        this.contextHeader = contextHeader;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConstants.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConstants.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConstants.java
deleted file mode 100644
index d754450..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaConstants.java
+++ /dev/null
@@ -1,205 +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.xbaya;
-
-import java.net.URI;
-
-public class XBayaConstants {
-
-    /**
-     * XBaya
-     */
-    public static final String APPLICATION_SHORT_NAME = "XBaya";
-
-    /**
-     * The name of the project
-     */
-    public static final String PROJECT_NAME = "Apache Airavata";
-    
-    /**
-     * The name of the application
-     */
-    public static final String APPLICATION_NAME = "XBaya Dashboard";
-
-    /**
-     * The URL of the web page of the application
-     */
-    public static final URI WEB_URL = URI.create("http://airavata.apache.org/");
-
-    // Default values
-
-    /**
-     * Default URL of the GPEL Engine
-     */
-    public static final URI DEFAULT_GPEL_ENGINE_URL = URI.create("https://tyr13.cs.indiana.edu:7443/gpel/");
-
-    /**
-     * DEFAULT_GFAC_URL
-     */
-    public static final URI DEFAULT_GFAC_URL = URI.create("http://localhost:8080/axis2/services/GFacService");
-
-    /**
-     * DEFAULT_TOPIC
-     */
-    public static final String DEFAULT_TOPIC = "xbaya-topic";
-
-    /**
-     * Default notification broker URL.
-     */
-    public static final URI DEFAULT_BROKER_URL = URI.create("http://localhost:8080/axis2/services/EventingService");
-
-    /**
-     * Default message box URL.
-     */
-    public static final URI DEFAULT_MESSAGE_BOX_URL = URI.create("http://localhost:8080/axis2/services/MsgBoxService");
-
-    /**
-     * DEFAULT_DSC_URL
-     */
-    public static final URI DEFAULT_DSC_URL = URI.create("https://silktree.cs.indiana.edu:52520/");
-
-    /**
-     * DEFAULT_MYPROXY_SERVER
-     */
-    public static final String DEFAULT_MYPROXY_SERVER = "myproxy.teragrid.org";
-
-    /**
-     * DEFAULT_MYPROXY_PORT
-     */
-    public static final int DEFAULT_MYPROXY_PORT = 7512;
-
-    /**
-     * DEFAULT_MYPROXY_LIFTTIME
-     */
-    public static final int DEFAULT_MYPROXY_LIFTTIME = 3600;
-
-    /**
-     * DEFAULT_WEB_REGISTRY
-     */
-    public static final URI DEFAULT_WEB_REGISTRY = URI.create("http://www.extreme.indiana.edu/xgws/wsdl/");
-
-    // File suffixes
-
-    /**
-     * File suffix for XML
-     */
-    public static final String XML_SUFFIX = ".xml";
-
-    /**
-     * File suffix for WSDL
-     */
-    public static final String WSDL_SUFFIX = ".wsdl";
-
-    /**
-     * File suffix for WSDL
-     */
-    public static final String WSDL_SUFFIX2 = "-wsdl.xml";
-
-    /**
-     * Suffix of a graph file
-     */
-    public static final String GRAPH_FILE_SUFFIX = ".xgr";
-
-    /**
-     * Suffix of a workflow file
-     */
-    public static final String WORKFLOW_FILE_SUFFIX = ".xwf";
-
-    /**
-     * File suffix for Jython scripts
-     */
-    public static final String JYTHON_SCRIPT_SUFFIX = ".py";
-
-    /**
-     * File suffix for BPEL
-     */
-    public static final String BPEL_SUFFIX = ".bpel";
-
-    /**
-     * File suffix for SCUFL
-     */
-    public static final String SCUFL_SCRIPT_SUFFIX = ".xml";
-
-    /**
-     * File suffix for PNG
-     */
-    public static final String PNG_SUFFIX = ".png";
-
-    /**
-     * Format name for png image
-     */
-    public static final String PNG_FORMAT_NAME = "PNG";
-
-    /**
-     * ODE URL
-     */
-    public static final String DEFAULT_ODE_URL = "https://pagodatree.cs.indiana.edu:17443";
-
-    /**
-     * WorkflowInterpreter URL
-     */
-    public static final URI DEFAULT_WORKFLOW_INTERPRETER_URL = URI
-            .create("http://localhost:8080/axis2/services/WorkflowInterpretor?wsdl");
-
-    /**
-     * 
-     * PROXY URL
-     */
-
-    public static final URI DEFAULT_PROXY_URI = URI
-            .create("http://silktree.cs.indiana.edu:18080/axis2/services/WEPSService?wsdl");
-
-    /**
-     * WORKFLOW Namespace
-     */
-    public static final String LEAD_NS = "http://extreme.indiana.edu/lead/workflow";
-
-    /**
-     * OGCE WORKFLOW Namespace
-     */
-    public static final String OGCE_WORKFLOW_NS = "http://workflow.ogce.org/";
-
-    public static final String STREAM_SERVER = "http://pagodatree.cs.indiana.edu:8081/axis2/services/StreamService?wsdl";
-
-    public static final String STATIC_LABEL = "STATIC";
-    public static final URI REGISTRY_URL = URI.create("http://localhost:8080/airavata-registry/api");
-    public static final String DEFAULT_GATEWAY = "default";
-    public static final String REGISTRY_USERNAME = "admin";
-    public static final String REGISTRY_PASSPHRASE = "admin";
-    public static final String REGISTRY_TYPE_HOST_DESC = "HostDesc";
-    public static final String REGISTRY_TYPE_APPLICATION_DESC = "ApplicationDesc";
-    public static final String REGISTRY_TYPE_SERVICE_DESC = "ServiceDesc";
-    public static final String REGISTRY_TYPE_WORKFLOW = "workflow";
-    public static final String HTTP_SCHEMAS_AIRAVATA_APACHE_ORG_GFAC_TYPE = "http://airavata.apache.org/schemas/gfac/2012/12";
-
-    public static final String XBAYA_REGISTRY_USER = "xbaya.registry.user";
-    public static final String XBAYA_REGISTRY_URL = "xbaya.registry.url";
-    public static final String XBAYA_DEFAULT_GATEWAY = "xbaya.default.gateway";
-
-    /**
-     * XRegistry Resource Types for OGCE Resource
-     */
-    public static enum XR_Resource_Types {
-        Project, Experiment, WorkflowTemplate, WorkflowInstance, WorkflowInput, WorkflowOutput
-    };
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
deleted file mode 100644
index 1973172..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaEngine.java
+++ /dev/null
@@ -1,302 +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.xbaya;
-
-import java.net.URI;
-import java.util.List;
-
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.AiravataManager;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.workflow.model.component.ComponentRegistryException;
-import org.apache.airavata.workflow.model.component.amazon.AmazonComponentRegistry;
-import org.apache.airavata.workflow.model.component.local.LocalComponentRegistry;
-import org.apache.airavata.workflow.model.component.system.SystemComponentRegistry;
-import org.apache.airavata.workflow.model.exceptions.WorkflowException;
-import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
-import org.apache.airavata.ws.monitor.Monitor;
-import org.apache.airavata.ws.monitor.MonitorConfiguration;
-import org.apache.airavata.xbaya.component.registry.ComponentController;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpreter;
-import org.apache.airavata.xbaya.registry.PasswordCallbackImpl;
-import org.apache.airavata.xbaya.ui.XBayaGUI;
-import org.apache.airavata.xbaya.ui.monitor.MonitorStarter;
-import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
-import org.apache.airavata.xbaya.ui.widgets.component.ComponentSelector;
-import org.apache.airavata.xbaya.ui.widgets.component.ComponentTreeNode;
-import org.apache.airavata.xbaya.workflow.WorkflowClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-
-public class XBayaEngine {
-
-    private static final Logger logger = LoggerFactory.getLogger(XBayaEngine.class);
-
-    private XBayaConfiguration configuration;
-
-    private XBayaGUI gui;
-
-    private WorkflowClient workflowClient;
-
-    private Monitor monitor;
-
-    private boolean exitOnClose = true;
-
-    private ComponentTreeNode systemComponentTree;
-
-    private SystemComponentRegistry componentRegistry;
-
-    private WorkflowInterpreter workflowInterpreter;
-
-    private AiravataAPI airavataAPI;
-    
-    private ComponentSelector componentTreeViewer; 
-
-    /**
-     * Constructs a ApplicationClient.
-     *
-     * @param configuration
-     */
-    public XBayaEngine(XBayaConfiguration configuration) {
-        this.configuration = configuration;
-
-        // Creates some essential objects.
-
-        MonitorConfiguration monitorConfiguration = new MonitorConfiguration(configuration.getBrokerURL(),
-                configuration.getTopic(), configuration.isPullMode(), configuration.getMessageBoxURL());
-        this.monitor = new Monitor(monitorConfiguration);
-
-        if (configuration.getAiravataAPI() == null && airavataAPI == null) {
-            try {
-                airavataAPI =  AiravataAPIFactory.getAPI(configuration.getRegistryURL(),
-                        configuration.getDefaultGateway(), configuration.getRegistryUserName(),
-                        new PasswordCallbackImpl(configuration.getRegistryUserName(), configuration.getRegistryPassphrase()));
-                configuration.setAiravataAPI(airavataAPI);
-            } catch (AiravataAPIInvocationException e) {
-                logger.error("Unable to instantiate airavata api instance", e);
-            }
-
-        }
-
-        // MyProxy
-        // this.myProxyClient = new MyProxyClient(this.configuration.getMyProxyServer(),
-        // this.configuration.getMyProxyPort(), this.configuration.getMyProxyUsername(),
-        // this.configuration.getMyProxyPassphrase(), this.configuration.getMyProxyLifetime());
-        //
-        // // These have to be before the GUI setup.
-        // this.workflowClient = WorkflowEngineManager.getWorkflowClient();
-        // this.workflowClient.setXBayaEngine(this);
-
-
-        // Set up the GUI.
-        updateXBayaConfigurationServiceURLs();
-        XBayaEngine.this.gui = new XBayaGUI(XBayaEngine.this);
-
-        // Arguments errors.
-        for (Throwable e : this.configuration.getErrors()) {
-            getGUI().getErrorWindow().error(e.getMessage(), e);
-        }
-
-        // Initialization after the GUI setup.
-        initAfterGUI();
-    }
-
-    /**
-     * Returns the configuration.
-     *
-     * @return The configuration
-     */
-    public XBayaConfiguration getConfiguration() {
-        return this.configuration;
-    }
-
-    /**
-     * Returns the XwfGui. The XwfGui is either XwfAppletGui in case of the applet, or XwfApplicationGui in case of the
-     * application.
-     *
-     * @return the XwfGui
-     */
-    public XBayaGUI getGUI() {
-        return this.gui;
-    }
-
-    /**
-     * Returns the Workflow Client.
-     *
-     * @return the Workflow Client
-     */
-    public WorkflowClient getWorkflowClient() {
-        return this.workflowClient;
-    }
-
-
-    /**
-     * Returns the monitor.
-     *
-     * @return The monitor
-     */
-    public Monitor getMonitor() {
-        return this.monitor;
-    }
-
-    /**
-     * Disposes on exit.
-     *
-     * @throws WorkflowException
-     */
-    public void dispose() throws WorkflowException {
-        this.monitor.stop();
-    }
-
-    /**
-     * Initialization process. This method is called after the GUI is initialized.
-     */
-    private void initAfterGUI() {
-
-        initRegistry();
-
-        initMonitor();
-
-    }
-
-    /**
-     * Initializes registris.
-     */
-    private void initRegistry() {
-
-        componentTreeViewer = this.gui.getComponentSelector();
-        try {
-            this.componentRegistry = new SystemComponentRegistry();
-            // This does not take time, so we can do it in the same thread.
-            this.systemComponentTree = ComponentController.getComponentTree(this.componentRegistry);
-            componentTreeViewer.addComponentTree(0, this.systemComponentTree);
-
-            componentTreeViewer.addComponentTree(1, ComponentController.getComponentTree(new AmazonComponentRegistry()));
-
-        } catch (RuntimeException e) {
-            // This should not happen
-            e.printStackTrace();
-            getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-        } catch (ComponentRegistryException e) {
-        	e.printStackTrace();
-            getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-		}
-
-        List<String> localRegistryPaths = this.configuration.getLocalRegistry();
-        for (String path : localRegistryPaths) {
-            try {
-                LocalComponentRegistry registry = new LocalComponentRegistry(path);
-                // XXX This might take time, so it's better to move to another
-                // thread.
-                ComponentTreeNode componentTree = ComponentController.getComponentTree(registry);
-                componentTreeViewer.addComponentTree(componentTree);
-            } catch (ComponentRegistryException e) {
-                getGUI().getErrorWindow().error(ErrorMessages.COMPONENT_LIST_LOAD_ERROR, e);
-            } catch (RuntimeException e) {
-                getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-            }
-        }
-    }
-
-    /**
-     * Initializes monitor.
-     */
-    private void initMonitor() {
-        try {
-            if (this.configuration.isStartMonitor()) {
-                MonitorStarter starter = new MonitorStarter(this);
-                starter.start();
-            }
-        } catch (RuntimeException e) {
-            getGUI().getErrorWindow().error(ErrorMessages.MONITOR_SUBSCRIPTION_ERROR, e);
-        } catch (Error e) {
-            getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-        }
-    }
-
-    public void resetWorkflowInterpreter() {
-		this.workflowInterpreter = null;
-	}
-    
-    
-	public WorkflowInterpreter getWorkflowInterpreter() {
-		return workflowInterpreter;
-	}
-
-	public void registerWorkflowInterpreter(WorkflowInterpreter workflowInterpreter) {
-		if (getWorkflowInterpreter()!=null){
-			throw new WorkflowRuntimeException("Critical Error!!! Workflow interpretter already running. Cleanup first");
-		}
-		this.workflowInterpreter = workflowInterpreter;
-	}
-
-	
-	public void updateXBayaConfigurationServiceURLs() {
-		try {
-			if (this.getConfiguration().getAiravataAPI()!=null){
-                airavataAPI = getConfiguration().getAiravataAPI();
-                AiravataManager airavataManager = airavataAPI.getAiravataManager();
-//                AiravataRegistry2 registry=this.getConfiguration().getJcrComponentRegistry().getRegistry();
-	        	URI eventingServiceURL = airavataManager.getEventingServiceURL();
-				if (eventingServiceURL!=null) {
-					this.getConfiguration().setBrokerURL(eventingServiceURL);
-					this.getMonitor()
-							.getConfiguration()
-							.setBrokerURL(eventingServiceURL);
-				}
-				URI messageBoxServiceURL = airavataManager.getMessageBoxServiceURL();
-				if (messageBoxServiceURL!=null) {
-					this.getConfiguration()
-					.setMessageBoxURL(messageBoxServiceURL);
-					this.getMonitor()
-							.getConfiguration()
-							.setMessageBoxURL(messageBoxServiceURL);
-				}
-				List<URI> interpreterServiceURLList = airavataManager.getWorkflowInterpreterServiceURLs();
-				if (interpreterServiceURLList.size()>0) {
-					this.getConfiguration()
-							.setWorkflowInterpreterURL(interpreterServiceURLList.get(0));
-				}
-//				List<URI> gfacURLList = airavataManager.getGFaCURLs();
-//				if (gfacURLList.size()>0) {
-//					this.getConfiguration().setGFacURL(gfacURLList.get(0));
-//				}
-			}
-        } catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
-
-    public void setAiravataAPI(AiravataAPI airavataAPI) {
-        this.airavataAPI = airavataAPI;
-    }
-    
-    public void reloadRegistry(){
-    	componentTreeViewer.refresh();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaVersion.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaVersion.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaVersion.java
deleted file mode 100644
index 5e34672..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBayaVersion.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.xbaya;
-
-import org.apache.airavata.common.utils.Version;
-
-public class XBayaVersion {
-
-    /**
-     * Version number
-     */
-    public final static Version VERSION = new Version("Airavata XBaya", 0, 11,
-			null, null, null);;
-
-    /**
-     * Prints the version
-     * 
-     * @param args
-     */
-    public static void main(String[] args) {
-        System.out.println(VERSION);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentController.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentController.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentController.java
deleted file mode 100644
index adeaa92..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentController.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.xbaya.component.registry;
-
-import java.util.List;
-
-import org.apache.airavata.workflow.model.component.ComponentReference;
-import org.apache.airavata.workflow.model.component.ComponentRegistry;
-import org.apache.airavata.workflow.model.component.ComponentRegistryException;
-import org.apache.airavata.xbaya.ui.widgets.component.ComponentTreeNode;
-
-public class ComponentController {
-
-	public static ComponentTreeNode getComponentTree(ComponentRegistry registry) throws ComponentRegistryException {
-		ComponentTreeNode tree = new ComponentTreeNode(registry);
-		addComponentReferencesToTree(tree, registry.getComponentReferenceList());
-		return tree;
-	}
-
-	private static void addComponentReferencesToTree(ComponentTreeNode tree,
-			List<ComponentReference> componentReferenceList) {
-		for (ComponentReference componentReference : componentReferenceList) {
-			ComponentTreeNode componentTreeNode = new ComponentTreeNode(componentReference);
-			if (componentReference.isParentComponent()){
-				addComponentReferencesToTree(componentTreeNode, componentReference.getChildComponentReferences());
-			}
-			tree.add(componentTreeNode);
-		}
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
deleted file mode 100644
index b0f44e9..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/ComponentRegistryLoader.java
+++ /dev/null
@@ -1,195 +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.xbaya.component.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Observable;
-import java.util.Observer;
-
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.workflow.model.component.ComponentRegistry;
-import org.apache.airavata.workflow.model.component.ComponentRegistryException;
-import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.ui.dialogs.WaitDialog;
-import org.apache.airavata.xbaya.ui.utils.Cancelable;
-import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
-import org.apache.airavata.xbaya.ui.widgets.component.ComponentTreeNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ComponentRegistryLoader implements Cancelable, Observer {
-
-    private static final Logger logger = LoggerFactory.getLogger(ComponentRegistryLoader.class);
-
-    private XBayaEngine engine;
-
-    private Thread loadThread;
-
-    private boolean canceled;
-
-    private WaitDialog loadingDialog;
-    
-    private ComponentTreeNode componentTree;
-
-    private Observable observableRegistry;
-    
-    private Map<String,ComponentTreeNode> componentTreeNodesMap;
-    
-    private static Map<String, ComponentRegistryLoader> loaders;
-    
-    /**
-     * Constructs a WorkflowLoader.
-     * 
-     * @param engine
-     */
-    private ComponentRegistryLoader(XBayaEngine engine) {
-        this.setEngine(engine);
-
-        this.loadingDialog = new WaitDialog(this, "Loading a Component List.", "Loading a Component List. "
-                + "Please wait for a moment.", this.getEngine().getGUI());
-        getEngine().getConfiguration().addObserver(this);
-    }
-
-    /**
-     * @see org.apache.airavata.xbaya.ui.utils.Cancelable#cancel()
-     */
-    public void cancel() {
-        this.canceled = true;
-        this.loadThread.interrupt();
-    }
-
-    /**
-     * Loads the workflow.
-     * 
-     * @param registry
-     * 
-     */
-    public void load(final ComponentRegistry registry) {
-        this.canceled = false;
-        
-        this.loadThread = new Thread() {
-            @Override
-            public void run() {
-                runInThread(registry);
-            }
-        };
-        this.loadThread.start();
-        
-        if (!getComponentTreeNodesMap().containsKey(registry.getName())) {
-			// This has to be the last because it blocks when the dialog is modal.
-			this.loadingDialog.show();
-		}
-    }
-
-    /**
-     * @param registry
-     */
-    /**
-     * TODO : this method triggered twice when connecting to the registy. We need to find
-     *  why it is happening
-     */
-    private synchronized void runInThread(ComponentRegistry registry) {
-        try {
-            this.getEngine().getGUI().getComponentSelector().removeComponentRegistry(registry.getName());
-//            if (getComponentTreeNodesMap().containsKey(registry.getName())){
-//        		this.getEngine().getGUI().getComponentSelector().removeComponentTree(getComponentTreeNodesMap().get(registry.getName()));
-//        		getComponentTreeNodesMap().remove(registry.getName());
-//        	}
-            componentTree = ComponentController.getComponentTree(registry);
-            if (this.canceled) {
-                return;
-            }
-            this.getEngine().getGUI().getComponentSelector().addComponentTree(componentTree);
-//            getComponentTreeNodesMap().put(registry.getName(),componentTree);
-            this.loadingDialog.hide();
-        } catch (ComponentRegistryException e) {
-            if (this.canceled) {
-                logger.error(e.getMessage(), e);
-            } else {
-                this.getEngine().getGUI().getErrorWindow().error(ErrorMessages.COMPONENT_LIST_LOAD_ERROR, e);
-                this.loadingDialog.hide();
-            }
-        } catch (RuntimeException e) {
-            if (this.canceled) {
-                logger.error(e.getMessage(), e);
-            } else {
-                this.getEngine().getGUI().getErrorWindow().error(ErrorMessages.COMPONENT_LIST_LOAD_ERROR, e);
-                this.loadingDialog.hide();
-            }
-        } catch (Error e) {
-            this.getEngine().getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-            this.loadingDialog.hide();
-        }
-    }
-
-	@Override
-	public void update(Observable observable, Object o) {
-		if ((observable instanceof XBayaConfiguration) && (o instanceof ComponentRegistry)){
-			ComponentRegistry componentRegistry=(ComponentRegistry)o;
-			if (observableRegistry!=null){
-				observableRegistry.deleteObserver(this);
-			}
-			if (componentRegistry instanceof JCRComponentRegistry){
-				AiravataAPI registry = ((JCRComponentRegistry)componentRegistry).getAiravataAPI();
-				if (registry!=null && registry instanceof Observable){
-					(observableRegistry=(Observable)registry).addObserver(this);
-				}
-			}
-			load(componentRegistry);
-		}else if (observable instanceof AiravataAPI){
-			load(getEngine().getConfiguration().getJcrComponentRegistry());
-		}
-	}
-	
-	public XBayaEngine getEngine() {
-		return engine;
-	}
-
-	public void setEngine(XBayaEngine engine) {
-		this.engine = engine;
-	}
-
-	public Map<String,ComponentTreeNode> getComponentTreeNodesMap() {
-		if (componentTreeNodesMap==null){
-			componentTreeNodesMap=new HashMap<String, ComponentTreeNode>();
-		}
-		return componentTreeNodesMap;
-	}
-
-	protected static Map<String, ComponentRegistryLoader> getLoaders() {
-		if (loaders==null){
-			loaders=new HashMap<String, ComponentRegistryLoader>();
-		}
-		return loaders;
-	}
-
-	public static ComponentRegistryLoader getLoader(XBayaEngine engine, String id){
-		if (!getLoaders().containsKey(id)){
-			getLoaders().put(id, new ComponentRegistryLoader(engine));
-		}
-		return getLoaders().get(id);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedExecutable.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedExecutable.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedExecutable.java
deleted file mode 100644
index 6a06c19..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedExecutable.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.xbaya.concurrent;
-
-/**
- * Intended for jobs that are runnable; Way of determining
- * whether a given job is ready to be executed
- *
- * @author Chathura Herath
- */
-public interface PredicatedExecutable extends Runnable{
-
-	public boolean isReady();
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedTaskRunner.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedTaskRunner.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedTaskRunner.java
deleted file mode 100644
index 1bed1f4..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/concurrent/PredicatedTaskRunner.java
+++ /dev/null
@@ -1,153 +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.xbaya.concurrent;
-
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * Used to run jobs that need to be started after a predicate is
- *
- * @author Chathura Herath
- */
-public class PredicatedTaskRunner {
-
-	protected volatile ConcurrentLinkedQueue<PredicatedExecutable> jobQueue = new ConcurrentLinkedQueue<PredicatedExecutable>();
-
-	protected ExecutorService threadPool;
-
-	protected volatile boolean stop = false;
-
-	public PredicatedTaskRunner(int numberOfThreads) {
-		this.threadPool = Executors.newFixedThreadPool(numberOfThreads);
-		addIdleTask();
-		startCheckThread();
-
-	}
-
-	private void addIdleTask() {
-		PredicatedExecutable sleepTask = new PredicatedExecutable() {
-
-			@Override
-			public void run() {
-				synchronized (jobQueue) {
-					if (jobQueue.size() == 1) {
-						try {
-							jobQueue.wait();
-						} catch (InterruptedException e) {
-							Thread.currentThread().interrupt();
-						}
-					} else if (allTasksAreWaiting(jobQueue)) {
-						try {
-							Thread.sleep(50);
-						} catch (InterruptedException e) {
-							Thread.currentThread().interrupt();
-						}
-					}
-				}
-
-			}
-
-			private boolean allTasksAreWaiting(
-					ConcurrentLinkedQueue<PredicatedExecutable> jobQueue) {
-				for (PredicatedExecutable predicatedExecutable : jobQueue) {
-					if (predicatedExecutable.isReady()) {
-						return false;
-					}
-				}
-				return true;
-
-			}
-
-			@Override
-			public boolean isReady() {
-				// TODO Auto-generated method stub
-				return true;
-			}
-		};
-
-		this.jobQueue.add(sleepTask);
-	}
-
-	private void startCheckThread() {
-		new Thread(new Runnable() {
-
-			@Override
-			public void run() {
-
-				while (!stop) {
-					try {
-
-
-						synchronized (jobQueue) {
-							while(jobQueue.size() == 0 || allTasksAreWaiting(jobQueue)){
-								jobQueue.wait(50);
-							}
-						}
-
-						PredicatedExecutable job = jobQueue.remove();
-						if (job.isReady()) {
-							// remove from front and execute and you are done
-							threadPool.execute(job);
-						} else {
-							// add to end if not ready to run
-							jobQueue.add(job);
-						}
-
-
-
-					} catch (Throwable e) {
-						// we go on no matter what
-						e.printStackTrace();
-					}
-				}
-
-			}
-		}).start();
-	}
-
-	private  boolean allTasksAreWaiting(
-			ConcurrentLinkedQueue<PredicatedExecutable> jobQueue) {
-		for (PredicatedExecutable predicatedExecutable : jobQueue) {
-			if (predicatedExecutable.isReady()) {
-				return false;
-			}
-		}
-		return true;
-
-	}
-
-	public void scedule(PredicatedExecutable job) {
-
-		synchronized (jobQueue) {
-			this.jobQueue.add(job);
-			this.jobQueue.notifyAll();
-		}
-
-	}
-
-	public void shutDown() {
-		this.threadPool.shutdown();
-		this.stop = true;
-	}
-
-}


Mime
View raw message