airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [1/7] git commit: Removed airavata-client-api dependency from other modules
Date Thu, 09 Oct 2014 17:43:45 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 8b978c62e -> 8cfe4f9ea


Removed airavata-client-api dependency from other modules


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

Branch: refs/heads/master
Commit: d70b9d39d8aa9f1e7aa823b025dfe0c963fb0d55
Parents: 2b73d47
Author: shamrath <shameerainfo@gmail.com>
Authored: Wed Oct 8 11:40:32 2014 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Wed Oct 8 11:40:32 2014 -0400

----------------------------------------------------------------------
 .../client/tools/DocumentCreatorNew.java        |   4 +
 .../client/tools/DocumentCreatorUtils.java      |   4 +
 modules/gfac/airavata-gfac-service/pom.xml      |  10 +-
 .../gfac/client/GfacClientFactoryTest.java      |  13 +-
 modules/integration-tests/pom.xml               |  22 +-
 .../apache/airavata/integration/BaseCaseIT.java |  17 +-
 .../airavata/integration/DataRetrievalIT.java   |   6 +-
 .../airavata/integration/SimpleEchoIT.java      |   2 +-
 .../integration/tools/DocumentCreatorNew.java   | 832 +++++++++++++++++++
 .../integration/tools/DocumentCreatorUtils.java | 160 ++++
 .../client/OrchestratorClientFactoryTest.java   |  12 +-
 modules/orchestrator/orchestrator-core/pom.xml  |  10 +-
 .../orchestrator/core/BaseOrchestratorTest.java |   6 +-
 .../engine/interpretor/ExperimentTemplate.java  |  37 -
 .../interpretor/WorkflowExecutionTemplate.java  |  51 --
 .../workflow/engine/util/XBayaUtil.java         |  36 +-
 16 files changed, 1063 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
index 1cf6a3c..d4604f1 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
@@ -40,6 +40,10 @@ import org.apache.thrift.TException;
 import java.io.File;
 import java.util.*;
 
+/**
+ * This class has been moved to integration-tests module, use that instead of this
+ */
+@Deprecated
 public class DocumentCreatorNew {
 
     private AppCatalog appcatalog = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
index d510979..19e7e23 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java
@@ -40,6 +40,10 @@ import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
 import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 
+/**
+ * This class has been moved to integration-tests module, use that instead of this
+ */
+@Deprecated
 public class DocumentCreatorUtils {
 
 	public static ComputeResourcePreference createComputeResourcePreference(String computeResourceId, String scratchLocation,

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/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
index ca12b41..683d523 100644
--- a/modules/gfac/airavata-gfac-service/pom.xml
+++ b/modules/gfac/airavata-gfac-service/pom.xml
@@ -35,11 +35,11 @@
             <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-client-api</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/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
index b7a8104..21c137f 100644
--- 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
@@ -21,10 +21,10 @@
 
 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.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;
@@ -46,14 +46,14 @@ import java.net.URL;
 
 public class GfacClientFactoryTest {
     private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
-    private DocumentCreator documentCreator;
+//    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();
@@ -93,6 +93,7 @@ public class GfacClientFactoryTest {
             }
         return airavataAPI;
     }
+*/
 
     private void storeDescriptors() {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index 0b644ba..010f848 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -196,17 +196,17 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.airavata</groupId>-->
+            <!--<artifactId>airavata-client-api</artifactId>-->
+            <!--<version>${project.version}</version>-->
+            <!--<exclusions>-->
+                <!--<exclusion>-->
+                    <!--<groupId>org.slf4j</groupId>-->
+                    <!--<artifactId>slf4j-simple</artifactId>-->
+                <!--</exclusion>-->
+            <!--</exclusions>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
index 2d651c6..0b44013 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
@@ -28,8 +28,9 @@ import java.util.Set;
 
 import junit.framework.Assert;
 
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreatorNew;
+//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+//import org.apache.airavata.client.tools.DocumentCreatorNew;
+import org.apache.airavata.integration.tools.DocumentCreatorNew;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -40,12 +41,12 @@ import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.ws.monitor.EventData;
-import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
-import org.apache.airavata.ws.monitor.EventDataRepository;
-import org.apache.airavata.ws.monitor.Monitor;
-import org.apache.airavata.ws.monitor.MonitorUtil;
+//import org.apache.airavata.workflow.model.wf.Workflow;
+//import org.apache.airavata.ws.monitor.EventData;
+//import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
+//import org.apache.airavata.ws.monitor.EventDataRepository;
+//import org.apache.airavata.ws.monitor.Monitor;
+//import org.apache.airavata.ws.monitor.MonitorUtil;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
index ec7707a..af9a729 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
@@ -23,9 +23,8 @@ package org.apache.airavata.integration;
 
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.api.Airavata.Client;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.integration.tools.DocumentCreatorNew;
 import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
@@ -174,8 +173,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 		return getClient().getAllUserProjects(user);
 	}
 
-	public String runExperiment(String user, String project) throws AiravataAPIInvocationException,
-			ApplicationSettingsException, AiravataClientConnectException,
+	public String runExperiment(String user, String project) throws ApplicationSettingsException, AiravataClientConnectException,
 			InvalidRequestException, AiravataClientException,
 			AiravataSystemException, TException, ExperimentNotFoundException {
 		List<DataObjectType> exInputs = new ArrayList<DataObjectType>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
index 68b6a0c..499dcda 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/SimpleEchoIT.java
@@ -24,7 +24,7 @@ package org.apache.airavata.integration;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.airavata.client.tools.DocumentCreatorNew;
+import org.apache.airavata.integration.tools.DocumentCreatorNew;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
new file mode 100644
index 0000000..a94d32c
--- /dev/null
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
@@ -0,0 +1,832 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.integration.tools;
+
+import org.airavata.appcatalog.cpi.AppCatalog;
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.common.utils.ClientSettings;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
+import org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
+import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.error.AiravataSystemException;
+import org.apache.airavata.model.error.InvalidRequestException;
+import org.apache.thrift.TException;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.UUID;
+
+public class DocumentCreatorNew {
+
+    private AppCatalog appcatalog = null;
+    private String trestleshpcHostAddress = "trestles.sdsc.edu";
+    private String lonestarHostAddress = "lonestar.tacc.utexas.edu";
+    private String stampedeHostAddress = "stampede.tacc.xsede.org";
+    private String gridftpAddress = "gsiftp://trestles-dm1.sdsc.edu:2811";
+    private String gramAddress = "trestles-login1.sdsc.edu:2119/jobmanager-pbstest2";
+    private String bigRed2HostAddress = "bigred2.uits.iu.edu";
+
+    //App Module Id's
+    private static String echoModuleId;
+    private static String amberModuleId;
+    private static String autoDockModuleId;
+    private static String espressoModuleId;
+    private static String gromacsModuleId;
+    private static String lammpsModuleId;
+    private static String nwChemModuleId;
+    private static String trinityModuleId;
+    private static String wrfModuleId;
+    private Airavata.Client client;
+    private GatewayResourceProfile gatewayResourceProfile;
+
+    public DocumentCreatorNew(Airavata.Client client) throws AppCatalogException {
+        this.client = client;
+    }
+
+    public String createLocalHostDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        //Define compute resource host
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(
+                "localhost", new HashSet<String>(Arrays.asList(new String[]{"127.0.0.1"})), new HashSet<String>(Arrays.asList(new String[]{"127.0.0.1"})));
+//    	host.setIsEmpty(true);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        LOCALSubmission localSubmission = new LOCALSubmission();
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.FORK, null, null, null);
+        localSubmission.setResourceJobManager(resourceJobManager);
+        client.addLocalSubmissionDetails(host.getComputeResourceId(), 1, localSubmission);
+
+        LOCALDataMovement localDataMovement = new LOCALDataMovement();
+        client.addLocalDataMovementDetails(host.getComputeResourceId(), 1, localDataMovement);
+
+        //Define application module
+        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.0.0", "Local host echo applications");
+        module.setAppModuleId(client.registerApplicationModule(module));
+
+        //Define application interfaces
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+//    	application.setIsEmpty(false);
+        application.setApplicationName("SimpleEcho0");
+        application.addToApplicationModules(module.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", "Echo Input Data", null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        //Define application deployment
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "Local echo app depoyment");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        //Define gateway profile
+        ComputeResourcePreference computeResourcePreference = DocumentCreatorUtils.createComputeResourcePreference(
+                host.getComputeResourceId(), "/tmp", null,
+                false, null,
+                null, null);
+        gatewayResourceProfile = new GatewayResourceProfile();
+//		gatewayResourceProfile.setGatewayID("default");
+        gatewayResourceProfile.setGatewayName(ClientSettings.getSetting("gateway_id", "php_reference_gateway"));
+        gatewayResourceProfile.addToComputeResourcePreferences(computeResourcePreference);
+        String gatewayId = client.registerGatewayResourceProfile(gatewayResourceProfile);
+        gatewayResourceProfile.setGatewayID(gatewayId);
+        client.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), host.getComputeResourceId(), computeResourcePreference);
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    private GatewayResourceProfile getGatewayResourceProfile() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+//    	if (gatewayResourceProfile==null){
+//    		try {
+//				gatewayResourceProfile = client.getGatewayResourceProfile(ga);
+//			} catch (Exception e) {
+//
+//			}
+        if (gatewayResourceProfile == null) {
+            gatewayResourceProfile = new GatewayResourceProfile();
+//				gatewayResourceProfile.setGatewayID("default");
+            gatewayResourceProfile.setGatewayName("default");
+            gatewayResourceProfile.setGatewayID(client.registerGatewayResourceProfile(gatewayResourceProfile));
+        }
+//    	}
+        return gatewayResourceProfile;
+
+    }
+
+    public String createSSHHostDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("gw111.iu.xsede.org", null, null);
+        host.addToIpAddresses("gw111.iu.xsede.org");
+        host.addToHostAliases("gw111.iu.xsede.org");
+        host.setResourceDescription("gw111 ssh access");
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+
+        SSHJobSubmission jobSubmission = new SSHJobSubmission();
+        jobSubmission.setSshPort(22);
+        jobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.FORK, null, null, null);
+        jobSubmission.setResourceJobManager(resourceJobManager);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, jobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.1", null);
+        module.setAppModuleId(client.registerApplicationModule(module));
+        ;
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "SSHEchoApplication");
+        client.registerApplicationDeployment(deployment);
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+//    	application.setIsEmpty(false);
+        application.setApplicationName("SSHEcho1");
+        application.addToApplicationModules(module.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+        client.registerApplicationInterface(application);
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/tmp", null, false, null, null, null));
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    //
+//    public void createGramDocs() {
+////        /*
+////           creating host descriptor for gram
+////        */
+////        HostDescription host = new HostDescription(GlobusHostType.type);
+////        host.getType().setHostAddress(trestleshpcHostAddress);
+////        host.getType().setHostName(trestleshpcHostAddress);
+////        ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{gramAddress});
+////        ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{gridftpAddress});
+////        try {
+////            airavataAPI.getApplicationManager().saveHostDescription(host);
+////        } catch (AiravataAPIInvocationException e) {
+////            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+////        }
+////
+////
+////        /*
+////        * Service Description creation and saving
+////        */
+////        String serviceName = "SimpleEcho1";
+////        ServiceDescription serv = new ServiceDescription();
+////        serv.getType().setName(serviceName);
+////
+////        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+////        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+////
+////        InputParameterType input = InputParameterType.Factory.newInstance();
+////        input.setParameterName("echo_input");
+////        ParameterType parameterType = input.addNewParameterType();
+////        parameterType.setType(DataType.STRING);
+////        parameterType.setName("String");
+////
+////        OutputParameterType output = OutputParameterType.Factory.newInstance();
+////        output.setParameterName("echo_output");
+////        ParameterType parameterType1 = output.addNewParameterType();
+////        parameterType1.setType(DataType.STRING);
+////        parameterType1.setName("String");
+////
+////        inputList.add(input);
+////        outputList.add(output);
+////
+////        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
+////        OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
+////
+////        serv.getType().setInputParametersArray(inputParamList);
+////        serv.getType().setOutputParametersArray(outputParamList);
+////        try {
+////            airavataAPI.getApplicationManager().saveServiceDescription(serv);
+////        } catch (AiravataAPIInvocationException e) {
+////            e.printStackTrace();
+////        }
+////
+////        /*
+////            Application descriptor creation and saving
+////         */
+////        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";
+////        app.setScratchWorkingDirectory(tempDir);
+////        app.setMaxMemory(10);
+////
+////
+////        try {
+////            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
+////        } catch (AiravataAPIInvocationException e) {
+////            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+////        }
+//    }
+//
+    public String createPBSDocsForOGCE_Echo() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
+        host.addToIpAddresses(trestleshpcHostAddress);
+        host.addToHostAliases(trestleshpcHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(22);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule module1 = DocumentCreatorUtils.createApplicationModule("echo", "1.2", null);
+        module1.setAppModuleId(client.registerApplicationModule(module1));
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+//    	application.setIsEmpty(false);
+        application.setApplicationName("SimpleEcho2");
+        application.addToApplicationModules(module1.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", "echo_input", null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module1.getAppModuleId(), "/home/ogce/echo.sh", ApplicationParallelismType.SERIAL, "Echo application");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    public String createPBSDocsForOGCE_WRF() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
+        host.addToIpAddresses(trestleshpcHostAddress);
+        host.addToHostAliases(trestleshpcHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(22);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
+
+        ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null);
+        module2.setAppModuleId(client.registerApplicationModule(module2));
+        ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
+//    	application2.setIsEmpty(false);
+        application2.setApplicationName("WRF");
+        application2.addToApplicationModules(module2.getAppModuleId());
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI));
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Boundary_File", "WRF_Boundary_File", null, null, DataType.URI));
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Input_File", "WRF_Input_File", null, null, DataType.URI));
+
+        application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output", null, DataType.URI));
+        application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log", null, DataType.URI));
+        application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
+
+        ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module2.getAppModuleId(), "/home/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, "WRF");
+        deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
+        return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
+    }
+
+    public String createSlumWRFDocs() throws AppCatalogException, TException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
+        host.addToHostAliases(stampedeHostAddress);
+        host.addToIpAddresses(stampedeHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(2222);
+
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
+
+        ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null);
+        module2.setAppModuleId(client.registerApplicationModule(module2));
+        ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
+        //    	application2.setIsEmpty(false);
+        application2.setApplicationName("WRF");
+        application2.addToApplicationModules(module2.getAppModuleId());
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI));
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Boundary_File", "WRF_Boundary_File", null, null, DataType.URI));
+        application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Input_File", "WRF_Input_File", null, null, DataType.URI));
+
+        application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output", null, DataType.URI));
+        application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log", null, DataType.URI));
+        application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
+
+        ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module2.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, "WRF");
+        deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
+        return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
+
+    }
+
+    public String createSlurmDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
+        host.addToHostAliases(stampedeHostAddress);
+        host.addToIpAddresses(stampedeHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(2222);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.3", null);
+        module.setAppModuleId(client.registerApplicationModule(module));
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+//    	application.setIsEmpty(false);
+        application.setApplicationName("SimpleEcho3");
+        application.addToApplicationModules(module.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    public String createSGEDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(lonestarHostAddress, null, null);
+        host.addToHostAliases(lonestarHostAddress);
+        host.addToIpAddresses(lonestarHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/sge6.2/bin/lx24-amd64/", null, null);
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(22);
+
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.4", null);
+        module.setAppModuleId(client.registerApplicationModule(module));
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+//    	application.setIsEmpty(false);
+        application.setApplicationName("SimpleEcho4");
+        application.addToApplicationModules(module.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+//	public void createEchoHostDocs() {
+//		String serviceName = "Echo";
+//		ServiceDescription serviceDescription = new ServiceDescription();
+//		List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
+//		List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
+//		serviceDescription.getType().setName(serviceName);
+//		serviceDescription.getType().setDescription("Echo service");
+//		// Creating input parameters
+//		InputParameterType parameter = InputParameterType.Factory.newInstance();
+//		parameter.setParameterName("echo_input");
+//		parameter.setParameterDescription("echo input");
+//		ParameterType parameterType = parameter.addNewParameterType();
+//		parameterType.setType(DataType.STRING);
+//		parameterType.setName("String");
+//		inputParameters.add(parameter);
+//
+//		// Creating output parameters
+//		OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
+//		outputParameter.setParameterName("echo_output");
+//		outputParameter.setParameterDescription("Echo output");
+//		ParameterType outputParaType = outputParameter.addNewParameterType();
+//		outputParaType.setType(DataType.STRING);
+//		outputParaType.setName("String");
+//		outputParameters.add(outputParameter);
+//
+//		// Setting input and output parameters to serviceDescriptor
+//		serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[] {}));
+//		serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[] {}));
+//
+//		try {
+//			airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
+//		} catch (AiravataAPIInvocationException e) {
+//			e.printStackTrace(); // To change body of catch statement use File |
+//									// Settings | File Templates.
+//		}
+//		// Localhost
+//		ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
+//		ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription.getType();
+//		applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(serviceName);
+//		applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
+//		applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
+//
+//		try {
+//			airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, "localhost", applicationDeploymentDescription);
+//		} catch (AiravataAPIInvocationException e) {
+//			e.printStackTrace(); // To change body of catch statement use File |
+//									// Settings | File Templates.
+//		}
+//		// Stampede
+//		/*
+//		 * Application descriptor creation and saving
+//		 */
+//		ApplicationDescription appDesc1 = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//		HpcApplicationDeploymentType app1 = (HpcApplicationDeploymentType) appDesc1.getType();
+//		ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//		name.setStringValue(serviceName);
+//		app1.setApplicationName(name);
+//		ProjectAccountType projectAccountType = app1.addNewProjectAccount();
+//		projectAccountType.setProjectAccountNumber("TG-STA110014S");
+//
+//		QueueType queueType = app1.addNewQueue();
+//		queueType.setQueueName("normal");
+//
+//		app1.setCpuCount(1);
+//		app1.setJobType(JobTypeType.SERIAL);
+//		app1.setNodeCount(1);
+//		app1.setProcessorsPerNode(1);
+//		app1.setMaxWallTime(10);
+//		/*
+//		 * Use bat file if it is compiled on Windows
+//		 */
+//		app1.setExecutableLocation("/bin/echo");
+//
+//		/*
+//		 * Default tmp location
+//		 */
+//		String tempDir = "/home1/01437/ogce";
+//
+//		app1.setScratchWorkingDirectory(tempDir);
+//		app1.setInstalledParentPath("/usr/bin/");
+//
+//		try {
+//			airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc1);
+//		} catch (AiravataAPIInvocationException e) {
+//			e.printStackTrace(); // To change body of catch statement use File |
+//									// Settings | File Templates.
+//		}
+//		// Trestles
+//		/*
+//		 * Application descriptor creation and saving
+//		 */
+//		ApplicationDescription appDesc2 = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//		HpcApplicationDeploymentType app2 = (HpcApplicationDeploymentType) appDesc2.getType();
+//		ApplicationDeploymentDescriptionType.ApplicationName name2 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//		name2.setStringValue(serviceName);
+//		app2.setApplicationName(name);
+//		ProjectAccountType projectAccountType2 = app2.addNewProjectAccount();
+//		projectAccountType2.setProjectAccountNumber("sds128");
+//
+//		QueueType queueType2 = app2.addNewQueue();
+//		queueType2.setQueueName("normal");
+//
+//		app2.setCpuCount(1);
+//		app2.setJobType(JobTypeType.SERIAL);
+//		app2.setNodeCount(1);
+//		app2.setProcessorsPerNode(1);
+//		app2.setMaxWallTime(10);
+//		/*
+//		 * Use bat file if it is compiled on Windows
+//		 */
+//		app2.setExecutableLocation("/bin/echo");
+//
+//		/*
+//		 * Default tmp location
+//		 */
+//		String tempDir2 = "/home/ogce/scratch";
+//
+//		app2.setScratchWorkingDirectory(tempDir2);
+//		app2.setInstalledParentPath("/opt/torque/bin/");
+//
+//		try {
+//			airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc2);
+//		} catch (AiravataAPIInvocationException e) {
+//			e.printStackTrace(); // To change body of catch statement use File |
+//									// Settings | File Templates.
+//		}
+//		// Lonestar
+//		/*
+//		 * Application descriptor creation and saving
+//		 */
+//		ApplicationDescription appDesc3 = new ApplicationDescription(HpcApplicationDeploymentType.type);
+//		HpcApplicationDeploymentType app3 = (HpcApplicationDeploymentType) appDesc3.getType();
+//		ApplicationDeploymentDescriptionType.ApplicationName name3 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+//		name3.setStringValue(serviceName);
+//		app3.setApplicationName(name);
+//		ProjectAccountType projectAccountType3 = app3.addNewProjectAccount();
+//		projectAccountType3.setProjectAccountNumber("TG-STA110014S");
+//
+//		QueueType queueType3 = app3.addNewQueue();
+//		queueType3.setQueueName("normal");
+//
+//		app3.setCpuCount(1);
+//		app3.setJobType(JobTypeType.SERIAL);
+//		app3.setNodeCount(1);
+//		app3.setProcessorsPerNode(1);
+//		app3.setMaxWallTime(10);
+//		/*
+//		 * Use bat file if it is compiled on Windows
+//		 */
+//		app3.setExecutableLocation("/bin/echo");
+//
+//		/*
+//		 * Default tmp location
+//		 */
+//		String tempDir3 = "/home1/01437/ogce";
+//
+//		app3.setScratchWorkingDirectory(tempDir3);
+//		app3.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");
+//
+//		try {
+//			airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc3);
+//		} catch (AiravataAPIInvocationException e) {
+//			e.printStackTrace(); // To change body of catch statement use File |
+//									// Settings | File Templates.
+//		}
+//
+//	}
+
+    public String createBigRedDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
+        host.addToHostAliases(bigRed2HostAddress);
+        host.addToIpAddresses(bigRed2HostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+
+        Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
+        commands.put(JobManagerCommand.SUBMISSION, "aprun -n");
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        sshJobSubmission.setSshPort(22);
+
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.5", null);
+        module.setAppModuleId(client.registerApplicationModule(module));
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("SimpleEchoBR");
+        application.addToApplicationModules(module.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/N/u/lginnali/BigRed2/myjob/test.sh", ApplicationParallelismType.SERIAL, "EchoLocal");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        String date = (new Date()).toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+        String tempDir = "/N/u/lginnali/BigRed2/myjob";
+        tempDir = tempDir + File.separator + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, "TG-STA110014S", false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    public String createBigRedAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
+        host.addToHostAliases(bigRed2HostAddress);
+        host.addToIpAddresses(bigRed2HostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+
+        Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
+        commands.put(JobManagerCommand.SUBMISSION, "aprun -n 4");
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        sshJobSubmission.setSshPort(22);
+
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+
+        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
+        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("AmberBR2");
+        application.addToApplicationModules(amodule.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/N/u/cgateway/BigRed2/sandbox/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberBR2");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+
+        String date = (new Date()).toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+        String tempDir = "/N/u/cgateway/BigRed2/sandbox/jobs";
+        tempDir = tempDir + File.separator +
+                "Amber";
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, null, false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+    }
+
+    public String createStampedeAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
+        host.addToHostAliases(stampedeHostAddress);
+        host.addToIpAddresses(stampedeHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(2222);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
+        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("AmberBR2");
+        application.addToApplicationModules(amodule.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+
+    }
+
+    public String createTrestlesAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
+        host.addToIpAddresses(trestleshpcHostAddress);
+        host.addToHostAliases(trestleshpcHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(22);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
+        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("AmberTrestles");
+        application.addToApplicationModules(amodule.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+
+    }
+
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
new file mode 100644
index 0000000..7805d1f
--- /dev/null
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
@@ -0,0 +1,160 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.integration.tools;
+
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
+import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
+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.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.gatewayprofile.ComputeResourcePreference;
+
+import java.util.Map;
+import java.util.Set;
+
+public class DocumentCreatorUtils {
+
+	public static ComputeResourcePreference createComputeResourcePreference(String computeResourceId, String scratchLocation,
+			String allocationProjectNumber, boolean overridebyAiravata,
+			String preferredBatchQueue, String preferredJobSubmissionProtocol,
+			String preferredDataMovementProtocol) throws AppCatalogException {
+		ComputeResourcePreference computeResourcePreference = new ComputeResourcePreference();
+		computeResourcePreference.setComputeResourceId(computeResourceId);
+		computeResourcePreference.setOverridebyAiravata(overridebyAiravata);
+		computeResourcePreference.setAllocationProjectNumber(allocationProjectNumber);
+		computeResourcePreference.setPreferredBatchQueue(preferredBatchQueue);
+		computeResourcePreference.setPreferredDataMovementProtocol(preferredDataMovementProtocol);
+		computeResourcePreference.setPreferredJobSubmissionProtocol(preferredJobSubmissionProtocol);
+		computeResourcePreference.setScratchLocation(scratchLocation);
+		return computeResourcePreference;
+	}
+
+	public static ApplicationDeploymentDescription createApplicationDeployment(
+			String computeResourceId, String appModuleId,
+			String executablePath, ApplicationParallelismType parallelism, String appDeploymentDescription) {
+		ApplicationDeploymentDescription deployment = new ApplicationDeploymentDescription();
+//		deployment.setIsEmpty(false);
+		deployment.setAppDeploymentDescription(appDeploymentDescription);
+		deployment.setAppModuleId(appModuleId);
+		deployment.setComputeHostId(computeResourceId);
+		deployment.setExecutablePath(executablePath);
+		deployment.setParallelism(parallelism);
+		return deployment;
+	}
+
+	public static ApplicationModule createApplicationModule(String appModuleName,
+			String appModuleVersion, String appModuleDescription) {
+		ApplicationModule module = new ApplicationModule();
+		module.setAppModuleDescription(appModuleDescription);
+		module.setAppModuleName(appModuleName);
+		module.setAppModuleVersion(appModuleVersion);
+		return module;
+	}
+
+	public static DataMovementInterface createDataMovementInterface(
+			String dataMovementInterfaceId,
+			DataMovementProtocol dataMovementProtocolType, int priorityOrder) {
+		DataMovementInterface dataMovementInterface = new DataMovementInterface();
+		dataMovementInterface.setDataMovementInterfaceId(dataMovementInterfaceId);
+		dataMovementInterface.setDataMovementProtocol(dataMovementProtocolType);
+		dataMovementInterface.setPriorityOrder(priorityOrder);
+		return dataMovementInterface;
+	}
+
+	public static JobSubmissionInterface createJobSubmissionInterface(
+			String jobSubmissionInterfaceId,
+			JobSubmissionProtocol jobSubmissionProtocolType, int priorityOrder) {
+		JobSubmissionInterface jobSubmissionInterface = new JobSubmissionInterface();
+		jobSubmissionInterface.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
+		jobSubmissionInterface.setJobSubmissionProtocol(jobSubmissionProtocolType);
+		jobSubmissionInterface.setPriorityOrder(priorityOrder);
+		return jobSubmissionInterface;
+	}
+
+	public static ComputeResourceDescription createComputeResourceDescription(
+			String hostName, Set<String> hostAliases, Set<String> ipAddresses) {
+		ComputeResourceDescription host = new ComputeResourceDescription();
+		host.setHostName(hostName);
+		host.setIpAddresses(ipAddresses);
+		host.setHostAliases(hostAliases);
+		return host;
+	}
+
+	public static ResourceJobManager createResourceJobManager(
+			ResourceJobManagerType resourceJobManagerType,
+			String jobManagerBinPath,
+			Map<JobManagerCommand, String> jobManagerCommands,
+			String pushMonitoringEndpoint) {
+		ResourceJobManager resourceJobManager=new ResourceJobManager();;
+		resourceJobManager.setResourceJobManagerType(resourceJobManagerType);
+		resourceJobManager.setJobManagerBinPath(jobManagerBinPath);
+		resourceJobManager.setJobManagerCommands(jobManagerCommands);
+		resourceJobManager.setPushMonitoringEndpoint(pushMonitoringEndpoint);
+		return resourceJobManager;
+	}
+
+	public static InputDataObjectType createAppInput (String inputName, String argumentName, String description, String value, org.apache.airavata.model.appcatalog.appinterface.DataType type ){
+        InputDataObjectType input = new InputDataObjectType();
+//        input.setIsEmpty(false);
+        if (inputName!=null) {
+			input.setName(inputName);
+		}
+		if (value!=null) {
+			input.setValue(value);
+		}
+		if (type!=null) {
+			input.setType(type);
+		}
+		if (argumentName!=null) {
+			input.setApplicationArgument(argumentName);
+		}
+		if (description!=null) {
+			input.setUserFriendlyDescription(description);
+		}
+		return input;
+    }
+
+    public static OutputDataObjectType createAppOutput (String inputName, String value, org.apache.airavata.model.appcatalog.appinterface.DataType type ){
+        OutputDataObjectType outputDataObjectType = new OutputDataObjectType();
+//        outputDataObjectType.setIsEmpty(false);
+        if (inputName!=null) {
+			outputDataObjectType.setName(inputName);
+		}
+		if (value!=null) {
+			outputDataObjectType.setValue(value);
+		}
+		if (type!=null) {
+			outputDataObjectType.setType(type);
+		}
+		return outputDataObjectType;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
index 72d912b..28687c9 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@ -23,10 +23,10 @@ package org.apache.airavata.orchestrator.client;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-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.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;
@@ -42,7 +42,7 @@ import org.apache.zookeeper.server.ServerCnxnFactory;
 import org.junit.Test;
 
 public class OrchestratorClientFactoryTest {
-    private DocumentCreatorNew documentCreator;
+/*    private DocumentCreatorNew documentCreator;
     private OrchestratorService.Client orchestratorClient;
     private Registry registry;
     private int NUM_CONCURRENT_REQUESTS = 1;
@@ -88,5 +88,5 @@ public class OrchestratorClientFactoryTest {
 
     private void storeDescriptors() {
 
-    }
+    }*/
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 61a7efc..7f6d991 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -54,11 +54,11 @@ the License. -->
             <artifactId>airavata-gfac-core</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-client-api</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-service</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
index cbfb573..a27281e 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -23,7 +23,7 @@ package org.apache.airavata.orchestrator.core;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.client.tools.DocumentCreatorNew;
+//import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.orchestrator.core.util.Initialize;
@@ -34,7 +34,7 @@ import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 
 public class BaseOrchestratorTest {
 
-    private GatewayResource gatewayResource;
+/*    private GatewayResource gatewayResource;
     private WorkerResource workerResource;
     private UserResource userResource;
     private Initialize initialize;
@@ -90,5 +90,5 @@ public class BaseOrchestratorTest {
 
     private void settingServerProperties(){
 
-    }
+    }*/
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/ExperimentTemplate.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/ExperimentTemplate.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/ExperimentTemplate.java
deleted file mode 100644
index 3a7cb3d..0000000
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/ExperimentTemplate.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.workflow.engine.interpretor;
-
-import java.util.List;
-
-public class ExperimentTemplate {
-	private List<WorkflowExecutionTemplate> workflowExecutionTemplates;
-
-	public List<WorkflowExecutionTemplate> getWorkflowExecutionTemplates() {
-		return workflowExecutionTemplates;
-	}
-
-	public void setWorkflowExecutionTemplates(
-			List<WorkflowExecutionTemplate> workflowExecutionTemplates) {
-		this.workflowExecutionTemplates = workflowExecutionTemplates;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowExecutionTemplate.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowExecutionTemplate.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowExecutionTemplate.java
deleted file mode 100644
index 49af89b..0000000
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowExecutionTemplate.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.workflow.engine.interpretor;
-
-import java.util.List;
-
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
-
-public class WorkflowExecutionTemplate {
-	private String workflowTemplateName;
-	private List<WorkflowInput> input;
-	private ExperimentAdvanceOptions advanceOptions;
-	public String getWorkflowTemplateName() {
-		return workflowTemplateName;
-	}
-	public void setWorkflowTemplateName(String workflowTemplateName) {
-		this.workflowTemplateName = workflowTemplateName;
-	}
-	public List<WorkflowInput> getInput() {
-		return input;
-	}
-	public void setInput(List<WorkflowInput> input) {
-		this.input = input;
-	}
-	public ExperimentAdvanceOptions getAdvanceOptions() {
-		return advanceOptions;
-	}
-	public void setAdvanceOptions(ExperimentAdvanceOptions advanceOptions) {
-		this.advanceOptions = advanceOptions;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d70b9d39/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java
index 9735c52..ddee1ec 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java
@@ -21,22 +21,6 @@
 
 package org.apache.airavata.workflow.engine.util;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.SocketTimeoutException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.airavata.client.stub.interpretor.NameValue;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.workflow.engine.interpretor.WorkFlowInterpreterException;
 import org.apache.airavata.workflow.engine.invoker.Invoker;
@@ -50,15 +34,23 @@ import org.apache.airavata.workflow.model.graph.system.EndForEachNode;
 import org.apache.airavata.workflow.model.graph.system.EndifNode;
 import org.apache.airavata.workflow.model.graph.system.ForEachNode;
 import org.apache.airavata.workflow.model.graph.system.InputNode;
-import org.apache.axis2.util.XMLUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
 import org.xmlpull.infoset.XmlElement;
-
 import xsul5.XmlConstants;
 
+import java.net.HttpURLConnection;
+import java.net.SocketTimeoutException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+//import org.apache.airavata.client.stub.interpretor.NameValue;
+
 public class XBayaUtil {
 
     private static final Logger logger = LoggerFactory.getLogger(XBayaUtil.class);
@@ -193,7 +185,7 @@ public class XBayaUtil {
 	}
 	
 	
-	public static List<NameValue> getIOParameterData(String xml) throws ParserConfigurationException, SAXException, IOException{
+/*	public static List<NameValue> getIOParameterData(String xml) throws ParserConfigurationException, SAXException, IOException{
 		List<NameValue> parameters=new ArrayList<NameValue>();
 		Document parameterDocument = XMLUtils.newDocument(new ByteArrayInputStream(xml.getBytes()));
 		org.w3c.dom.NodeList childNodes = parameterDocument.getDocumentElement().getChildNodes();
@@ -205,7 +197,7 @@ public class XBayaUtil {
 			parameters.add(pair);
 		}
 		return parameters;
-	}
+	}*/
 
 //    public static AiravataRegistry2 getRegistry(URL url) throws IOException, RepositoryException, URISyntaxException {
 //        Properties properties = new Properties();


Mime
View raw message