airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [7/9] retiring previous registry API - AIRAVATA-1234
Date Fri, 22 Aug 2014 19:01:36 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 9043d06..6c364df 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -20,22 +20,18 @@
  */
 package org.apache.airavata.gfac.core.utils;
 
-import java.io.*;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.*;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.*;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
-import org.apache.airavata.gfac.*;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.ExecutionMode;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
@@ -43,19 +39,22 @@ import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.api.workflow.ApplicationJob;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.apache.airavata.registry.cpi.CompositeIdentifier;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.schemas.gfac.*;
-import org.apache.airavata.schemas.gfac.DataType.Enum;
 import org.apache.axiom.om.OMElement;
 import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.*;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.util.*;
+
 public class GFacUtils {
 	private final static Logger log = LoggerFactory.getLogger(GFacUtils.class);
 
@@ -565,133 +564,133 @@ public class GFacUtils {
 		return actualParameter;
 	}
 
-	public static ApplicationJob createApplicationJob(
-			JobExecutionContext jobExecutionContext) {
-		ApplicationJob appJob = new ApplicationJob();
-		appJob.setExperimentId((String) jobExecutionContext
-				.getProperty(Constants.PROP_TOPIC));
-		appJob.setWorkflowExecutionId(appJob.getExperimentId());
-		appJob.setNodeId((String) jobExecutionContext
-				.getProperty(Constants.PROP_WORKFLOW_NODE_ID));
-		appJob.setServiceDescriptionId(jobExecutionContext
-				.getApplicationContext().getServiceDescription().getType()
-				.getName());
-		appJob.setHostDescriptionId(jobExecutionContext.getApplicationContext()
-				.getHostDescription().getType().getHostName());
-		appJob.setApplicationDescriptionId(jobExecutionContext
-				.getApplicationContext().getApplicationDeploymentDescription()
-				.getType().getApplicationName().getStringValue());
-		return appJob;
-	}
-
-	public static void updateApplicationJobStatusUpdateTime(
-			JobExecutionContext context, String jobId, Date statusUpdateTime) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager()
-					.updateApplicationJobStatusUpdateTime(jobId,
-							statusUpdateTime);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error in updating application job status time "
-					+ statusUpdateTime.toString() + " for job Id " + jobId
-					+ "!!!", e);
-		}
-	}
-
-	public static void updateApplicationJobStatus(JobExecutionContext context,
-			String jobId, ApplicationJobStatus status, Date statusUpdateTime) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager().updateApplicationJobStatus(
-					jobId, status, statusUpdateTime);
-		} catch (AiravataAPIInvocationException e) {
-			log.error(
-					"Error in updating application job status "
-							+ status.toString() + " for job Id " + jobId
-							+ "!!!", e);
-		}
-	}
-
-	/**
-	 * Gets the job ids given experiment id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @return List of job ids relevant to given experiment id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, null, null);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
-
-	/**
-	 * Gets the job ids given experiment id and workflow id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @param workflowId
-	 *            The workflow id
-	 * @return List of job ids relevant to given experiment id and workflow id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId, String workflowId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, workflowId, null);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, " workflow id " + workflowId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
-
-	/**
-	 * Gets the job ids given experiment id and workflow id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @param workflowId
-	 *            The workflow id
-	 * @return List of job ids relevant to given experiment id and workflow id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId, String workflowId, String nodeId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, workflowId, nodeId);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, " workflow id " + workflowId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
+//	public static ApplicationJob createApplicationJob(
+//			JobExecutionContext jobExecutionContext) {
+//		ApplicationJob appJob = new ApplicationJob();
+//		appJob.setExperimentId((String) jobExecutionContext
+//				.getProperty(Constants.PROP_TOPIC));
+//		appJob.setWorkflowExecutionId(appJob.getExperimentId());
+//		appJob.setNodeId((String) jobExecutionContext
+//				.getProperty(Constants.PROP_WORKFLOW_NODE_ID));
+//		appJob.setServiceDescriptionId(jobExecutionContext
+//				.getApplicationContext().getServiceDescription().getType()
+//				.getName());
+//		appJob.setHostDescriptionId(jobExecutionContext.getApplicationContext()
+//				.getHostDescription().getType().getHostName());
+//		appJob.setApplicationDescriptionId(jobExecutionContext
+//				.getApplicationContext().getApplicationDeploymentDescription()
+//				.getType().getApplicationName().getStringValue());
+//		return appJob;
+//	}
+
+//	public static void updateApplicationJobStatusUpdateTime(
+//			JobExecutionContext context, String jobId, Date statusUpdateTime) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager()
+//					.updateApplicationJobStatusUpdateTime(jobId,
+//							statusUpdateTime);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error in updating application job status time "
+//					+ statusUpdateTime.toString() + " for job Id " + jobId
+//					+ "!!!", e);
+//		}
+//	}
+//
+//	public static void updateApplicationJobStatus(JobExecutionContext context,
+//			String jobId, ApplicationJobStatus status, Date statusUpdateTime) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager().updateApplicationJobStatus(
+//					jobId, status, statusUpdateTime);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error(
+//					"Error in updating application job status "
+//							+ status.toString() + " for job Id " + jobId
+//							+ "!!!", e);
+//		}
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @return List of job ids relevant to given experiment id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, null, null);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id and workflow id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @param workflowId
+//	 *            The workflow id
+//	 * @return List of job ids relevant to given experiment id and workflow id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId, String workflowId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, workflowId, null);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, " workflow id " + workflowId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id and workflow id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @param workflowId
+//	 *            The workflow id
+//	 * @return List of job ids relevant to given experiment id and workflow id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId, String workflowId, String nodeId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, workflowId, nodeId);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, " workflow id " + workflowId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
 
 	/*
 	 * public static RequestData getRequestData(Properties
@@ -717,18 +716,18 @@ public class GFacUtils {
 	 * }
 	 */
 
-	public static void recordApplicationJob(JobExecutionContext context,
-			ApplicationJob job) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager().addApplicationJob(job);
-		} catch (AiravataAPIInvocationException e) {
-			log.error(
-					"Error in persisting application job data for application job "
-							+ job.getJobId() + "!!!", e);
-		}
-	}
+//	public static void recordApplicationJob(JobExecutionContext context,
+//			ApplicationJob job) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager().addApplicationJob(job);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error(
+//					"Error in persisting application job data for application job "
+//							+ job.getJobId() + "!!!", e);
+//		}
+//	}
 
 	public static void saveJobStatus(JobExecutionContext jobExecutionContext,
 			JobDetails details, JobState state) throws GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
index 08db750..e32bd9b 100644
--- a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
+++ b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
@@ -28,7 +28,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.Scheduler;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -40,10 +40,10 @@ import java.io.IOException;
 
 public class GFacConfigXmlTest {
 
-    private GFacImpl gfac;
+    private BetterGfacImpl gfac;
     @BeforeClass
     public void setUp() throws Exception {
-        gfac = new GFacImpl();
+        gfac = new BetterGfacImpl();
     }
 
     @Test
@@ -51,7 +51,7 @@ public class GFacConfigXmlTest {
         Assert.assertNotNull(gfac.getGfacConfigFile());
         Assert.assertEquals(1,gfac.getDaemonHandlers().size());
         try {
-            JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null, null), "testService");
+            JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "testService");
             ApplicationContext applicationContext = new ApplicationContext();
             HostDescription host = new HostDescription(GsisshHostType.type);
             host.getType().setHostAddress("trestles.sdsc.edu");
@@ -80,7 +80,7 @@ public class GFacConfigXmlTest {
             Assert.assertNotNull(gfac.getGfacConfigFile());
             Assert.assertEquals(1,gfac.getDaemonHandlers().size());
             try {
-                JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null, null), "UltraScan");
+                JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "UltraScan");
                 ApplicationContext applicationContext = new ApplicationContext();
                 HostDescription host = new HostDescription(GsisshHostType.type);
                 host.getType().setHostAddress("trestles.sdsc.edu");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/pom.xml b/modules/gfac/gfac-ec2/pom.xml
index 26c3b75..f083e0a 100644
--- a/modules/gfac/gfac-ec2/pom.xml
+++ b/modules/gfac/gfac-ec2/pom.xml
@@ -44,11 +44,6 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-workflow-execution-context</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
index a8a9eb1..940fff3 100644
--- a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
+++ b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
@@ -28,8 +28,6 @@ import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.GFacException;
@@ -140,14 +138,14 @@ public class EC2Provider extends AbstractProvider {
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
     
         String shellCmd = createShellCmd(jobExecutionContext);
-        AiravataAPI airavataAPI = jobExecutionContext.getGFacConfiguration().getAiravataAPI();
-        if (airavataAPI!=null){
-        	try {
-				airavataAPI.getProvenanceManager().updateApplicationJobData(jobId, shellCmd);
-			} catch (AiravataAPIInvocationException e) {
-				log.error("Error in saving EC2 shell command!!!", e);
-			}
-        }
+//        AiravataAPI airavataAPI = jobExecutionContext.getGFacConfiguration().getAiravataAPI();
+//        if (airavataAPI!=null){
+//        	try {
+//				airavataAPI.getProvenanceManager().updateApplicationJobData(jobId, shellCmd);
+//			} catch (AiravataAPIInvocationException e) {
+//				log.error("Error in saving EC2 shell command!!!", e);
+//			}
+//        }
         SshClient sshClient = new SshClient();
         sshClient.setSocketTimeout(SOCKET_TIMEOUT);
         SshConnectionProperties properties = new SshConnectionProperties();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
index 32d7972..d558ab9 100644
--- a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
+++ b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
@@ -27,7 +27,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.schemas.gfac.*;
 import org.junit.Assert;
 import org.junit.Before;
@@ -83,7 +83,7 @@ public class EC2ProviderTest {
         URL resource = EC2ProviderTest.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
         /* EC2 Host */
         HostDescription host = new HostDescription(Ec2HostType.type);
@@ -160,7 +160,7 @@ public class EC2ProviderTest {
 
     @Test
     public void testGramProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
index 3ee3a1d..6d5427a 100644
--- a/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.gram.security.GSISecurityContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
@@ -73,7 +73,7 @@ public class GramProviderTestWithMyProxyAuth extends GFacBaseTestWithMyProxyAuth
         URL resource = GramProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null,null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
 //        gFacConfiguration.setMyProxyUser("*****");
@@ -212,7 +212,7 @@ public class GramProviderTestWithMyProxyAuth extends GFacBaseTestWithMyProxyAuth
 
     @Test
     public void testGramProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 59949ac..f28307e 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -25,7 +25,6 @@ import org.apache.airavata.gfac.ExecutionMode;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
@@ -137,7 +136,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     }
 
     public void delegateToMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }
@@ -173,7 +172,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     }
 
     public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 019a772..0774022 100644
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
@@ -91,7 +91,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
         URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
@@ -227,7 +227,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
     }
     @Test
     public void testGSISSHProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
         System.out.println(jobExecutionContext.getJobDetails().getJobID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
index 9ba7e5d..343b4bf 100644
--- a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@ -60,7 +60,7 @@ public class LocalProviderTest {
 
         URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         File configFile = new File(resource.getPath());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
         //have to set InFlwo Handlers and outFlowHandlers
         ApplicationContext applicationContext = new ApplicationContext();
         HostDescription host = new HostDescription();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/pom.xml b/modules/gfac/gfac-monitor/pom.xml
index e4601ea..8893342 100644
--- a/modules/gfac/gfac-monitor/pom.xml
+++ b/modules/gfac/gfac-monitor/pom.xml
@@ -32,11 +32,6 @@
         <!-- GFAC schemas -->
         <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-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -57,11 +52,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-registry-cpi</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
index fea2d20..9ca5235 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -24,7 +24,6 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
@@ -68,8 +67,8 @@ public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
             String myProxyServer = ServerSettings.getSetting("myproxy.server");
             setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
                     7512, 17280000, certPath));
-            if(GFacImpl.getMonitorPublisher() != null){
-                hpcPullMonitor = new HPCPullMonitor(GFacImpl.getMonitorPublisher(),getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
+            if(BetterGfacImpl.getMonitorPublisher() != null){
+                hpcPullMonitor = new HPCPullMonitor(BetterGfacImpl.getMonitorPublisher(),getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
             }else {
                 hpcPullMonitor = new HPCPullMonitor(BetterGfacImpl.getMonitorPublisher(),getAuthenticationInfo());  // we use our own credentials for monitoring, not from the store
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
index c69b516..1155965 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
@@ -28,7 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
@@ -67,7 +67,7 @@ public class GridPushMonitorHandler extends ThreadedHandler {
             LinkedBlockingQueue<MonitorID> pushQueue = new LinkedBlockingQueue<MonitorID>();
             LinkedBlockingQueue<MonitorID> finishQueue = new LinkedBlockingQueue<MonitorID>();
             List<String> hosts= Arrays.asList(hostList.split(","));
-            amqpMonitor=new AMQPMonitor(GFacImpl.getMonitorPublisher(),pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
+            amqpMonitor=new AMQPMonitor(BetterGfacImpl.getMonitorPublisher(),pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
         }catch (ApplicationSettingsException e){
             e.printStackTrace();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 0e5f69e..c059676 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -37,7 +37,6 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
@@ -253,7 +252,7 @@ public class SSHProvider extends AbstractProvider {
     }
 
     public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index 69716d3..e84848c 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -30,7 +30,7 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
@@ -94,7 +94,7 @@ public class BigRed2TestWithSSHAuth {
         URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
@@ -243,7 +243,7 @@ public class BigRed2TestWithSSHAuth {
 
     @Test
     public void testSSHProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
         org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
index 9bec659..5cb1200 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.InputParameterType;
@@ -55,7 +55,7 @@ public class SSHProviderTestWithSSHAuth {
     public void setUp() throws Exception {
 
     	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null,null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
 //        gFacConfiguration.s
         //have to set InFlwo Handlers and outFlowHandlers
         ApplicationContext applicationContext = new ApplicationContext();
@@ -164,7 +164,7 @@ public class SSHProviderTestWithSSHAuth {
 
     @Test
     public void testLocalProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
index 51bd31c..7a90789 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
@@ -25,8 +25,6 @@ import java.io.IOException;
 
 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.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.utils.ClientSettings;
 import org.slf4j.Logger;
@@ -36,7 +34,6 @@ public class AbstractIntegrationTest {
 
 	private static String THRIFT_SERVER_HOST;
 	private static int THRIFT_SERVER_PORT;
-	protected AiravataAPI airavataAPI;
 	protected Airavata.Client client;
 	private final int TRIES = 20;
 	private final int TIME_OUT = 10000;
@@ -56,7 +53,6 @@ public class AbstractIntegrationTest {
 	        initClient();
 	
 	        //getting the Airavata API ( to add the descriptors
-	        this.airavataAPI = getAiravataAPI();
 	    } catch (IOException e) {
 	        log.error("Error loading client-properties ..." + e.getMessage());
 	    } catch (AiravataAPIInvocationException e) {
@@ -66,13 +62,6 @@ public class AbstractIntegrationTest {
 	    }
 	}
 
-	protected AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException {
-	    if (airavataAPI == null) {
-	        airavataAPI = AiravataAPIFactory.getAPI("default", "admin");
-	    }
-	    return airavataAPI;
-	}
-
 	protected void initClient() throws Exception {
 	    int tries = 0;
 	    while (client==null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/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 d5436d2..2d651c6 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
@@ -29,7 +29,7 @@ import java.util.Set;
 import junit.framework.Assert;
 
 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.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -40,7 +40,6 @@ 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.registry.api.workflow.ApplicationJob;
 import org.apache.airavata.workflow.model.wf.Workflow;
 import org.apache.airavata.ws.monitor.EventData;
 import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
@@ -62,7 +61,6 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 
     @BeforeTest
     public void setUp() throws Exception {
-        this.airavataAPI = getAiravataAPI();
         this.client = getClient();
     }
 
@@ -86,8 +84,8 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
     @Test(groups = {"echoGroup"}, dependsOnGroups = {"setupTests"})
     public void testEchoService() throws Exception {
         log.info("Running job in trestles...");
-        DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
-        documentCreator.createPBSDocsForOGCE();
+        DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
+        documentCreator.createPBSDocsForOGCE_Echo();
         List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
         DataObjectType input = new DataObjectType();
         input.setKey("echo_input");
@@ -160,7 +158,7 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
     @Test(groups = {"echoGroup"}, dependsOnGroups = {"setupTests"})
     public void testEchoServiceStampede() throws Exception {
         log.info("Running job in Stampede...");
-        DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
+        DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
         documentCreator.createSlurmDocs();
         List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
         DataObjectType input = new DataObjectType();
@@ -231,10 +229,10 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 
     }
 
-    @Test(groups = {"performanceTesting"})
-    public void testExistsHostDescriptor() throws AiravataAPIInvocationException {
-        airavataAPI.getApplicationManager().isHostDescriptorExists("trestles.sdsc.edu");
-    }
+//    @Test(groups = {"performanceTesting"})
+//    public void testExistsHostDescriptor() throws AiravataAPIInvocationException {
+//        airavataAPI.getApplicationManager().isHostDescriptorExists("trestles.sdsc.edu");
+//    }
 
 //    @Test(groups = {"echoGroup"}/* , dependsOnMethods = { "testEchoService" } */)
 //    public void testUpdateEchoService() throws Exception {
@@ -326,23 +324,23 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 //        }
 //    }
 
-    protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {
-
-        String experimentId = executeWorkflow(workflow, inputValues);
-        monitor(experimentId);
-    }
-
-    protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {
-
-        String experimentId = executeWorkflow(workflow, inputValues);
-
-        verifyOutput(experimentId, "echo_output=Airavata_Test");
-
-        log.info("Verifying application jobs ....");
+//    protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {
+//
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//        monitor(experimentId);
+//    }
 
-        List<ApplicationJob> applicationJobs = airavataAPI.getProvenanceManager().getApplicationJobs(experimentId, null, null);
-        Assert.assertEquals(applicationJobs.size(), 1);
-    }
+//    protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {
+//
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//
+//        verifyOutput(experimentId, "echo_output=Airavata_Test");
+//
+//        log.info("Verifying application jobs ....");
+//
+//        List<ApplicationJob> applicationJobs = airavataAPI.getProvenanceManager().getApplicationJobs(experimentId, null, null);
+//        Assert.assertEquals(applicationJobs.size(), 1);
+//    }
 
 //    protected String getWorkflowComposeContent(String fileName) throws IOException {
 //        File f = new File(".");
@@ -364,27 +362,27 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 //        return buffer.toString();
 //    }
 
-    public void monitor(final String experimentId) throws Exception {
-        final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
-                new EventDataListenerAdapter() {
-
-                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-                        Assert.assertNotNull(eventDataRepo);
-                        Assert.assertNotNull(eventData);
-                        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
-                            try {
-                                BaseCaseIT.this.verifyOutput(experimentId, "echo_output=Airavata_Test");
-                            } catch (Exception e) {
-                                log.error("Error verifying output", e);
-                                Assert.fail("Error occurred while verifying output.");
-                            } finally {
-                                getMonitor().stopMonitoring();
-                            }
-                        }
-                        log.info("No of events: " + eventDataRepo.getEvents().size());
-                    }
-                });
-        experimentMonitor.startMonitoring();
-        experimentMonitor.waitForCompletion();
-    }
+//    public void monitor(final String experimentId) throws Exception {
+//        final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
+//                new EventDataListenerAdapter() {
+//
+//                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
+//                        Assert.assertNotNull(eventDataRepo);
+//                        Assert.assertNotNull(eventData);
+//                        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
+//                            try {
+//                                BaseCaseIT.this.verifyOutput(experimentId, "echo_output=Airavata_Test");
+//                            } catch (Exception e) {
+//                                log.error("Error verifying output", e);
+//                                Assert.fail("Error occurred while verifying output.");
+//                            } finally {
+//                                getMonitor().stopMonitoring();
+//                            }
+//                        }
+//                        log.info("No of events: " + eventDataRepo.getEvents().size());
+//                    }
+//                });
+//        experimentMonitor.startMonitoring();
+//        experimentMonitor.waitForCompletion();
+//    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/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 b66862e..777aee1 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
@@ -21,20 +21,12 @@
 
 package org.apache.airavata.integration;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
+import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.api.Airavata.Client;
-import org.apache.airavata.model.error.AiravataClientConnectException;
-import org.apache.airavata.model.error.AiravataClientException;
-import org.apache.airavata.model.error.AiravataSystemException;
-import org.apache.airavata.model.error.ExperimentNotFoundException;
-import org.apache.airavata.model.error.InvalidRequestException;
-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.tools.DocumentCreatorNew;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -49,6 +41,10 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
 public class DataRetrievalIT extends AbstractIntegrationTest {
     private final static Logger log = LoggerFactory.getLogger(DataRetrievalIT.class);
     
@@ -154,7 +150,6 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
             public boolean matches(Object o) {
                 return theExpected.contains((String)o);
             }
-			@Override
 			public void describeTo(Description d) {
 			}
         };
@@ -219,9 +214,8 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 		return expId;
 	}
 
-	private void addApplications() throws AiravataAPIInvocationException {
-		AiravataAPI airavataAPI = getAiravataAPI();
-		DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
+	private void addApplications() throws AppCatalogException, TException {
+		DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
 		documentCreator.createLocalHostDocs();
 	}
 	

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
index 60f94cc..f909b35 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
@@ -50,9 +50,7 @@ public class ForEachCaseIT extends WorkflowIntegrationTestBase {
 
     @BeforeTest
     public void setUp() throws Exception {
-        this.airavataAPI = getAiravataAPI();
-
-        setupDescriptors();
+//        setupDescriptors();
     }
 
 //    @Test(groups = {"forEachGroup"})
@@ -68,60 +66,60 @@ public class ForEachCaseIT extends WorkflowIntegrationTestBase {
 
     private void setupDescriptors() throws AiravataAPIInvocationException,
             DescriptorAlreadyExistsException, IOException {
-        DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
-        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost2",
-                "127.0.0.1");
-
-        log("Adding host description ....");
-        addHostDescriptor(hostDescription);
-        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType().getHostName()));
-
-        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-        inputParameters.add(descriptorBuilder.buildInputParameterType("data1", "data1", DataType.STRING));
-        inputParameters.add(descriptorBuilder.buildInputParameterType("data2", "data2", DataType.STRING));
-
-        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-        outputParameters.add(descriptorBuilder.buildOutputParameterType("out", "out", DataType.STD_OUT));
-
-        ServiceDescription serviceDescription = descriptorBuilder.buildServiceDescription("comma_app", "comma_app",
-                inputParameters, outputParameters);
-
-        ServiceDescription serviceDescription2 = descriptorBuilder.buildServiceDescription("echo_app", "echo_app",
-                inputParameters, outputParameters);
-
-        log("Adding service description ...");
-        addServiceDescriptor(serviceDescription, "comma_app");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
-                serviceDescription.getType().getName()));
-
-        addServiceDescriptor(serviceDescription2, "echo_app");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
-                serviceDescription2.getType().getName()));
-
-        // Deployment descriptor
-        File executable;
-        if (OsUtils.isWindows()) {
-            executable = getFile("src/test/resources/comma_data.bat");
-        } else {
-            executable = getFile("src/test/resources/comma_data.sh");
-            Runtime.getRuntime().exec("chmod +x " + executable.getAbsolutePath());
-        }
-
-        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
-                .buildApplicationDeploymentDescription("comma_app_localhost", executable.getAbsolutePath(), OsUtils.getTempFolderPath());
-        ApplicationDescription applicationDeploymentDescription2 = descriptorBuilder
-                .buildApplicationDeploymentDescription("echo_app_localhost", OsUtils.getEchoExecutable(), OsUtils.getTempFolderPath());
-
-        log("Adding deployment description ...");
-        addApplicationDescriptor(applicationDeploymentDescription, serviceDescription, hostDescription, "comma_app_localhost");
-
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
-                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
-                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
-
-        addApplicationDescriptor(applicationDeploymentDescription2, serviceDescription2, hostDescription, "echo_app_localhost");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
-                serviceDescription2.getType().getName(), hostDescription.getType().getHostName(),
-                applicationDeploymentDescription2.getType().getApplicationName().getStringValue()));
+//        DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
+//        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost2",
+//                "127.0.0.1");
+//
+//        log("Adding host description ....");
+//        addHostDescriptor(hostDescription);
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType().getHostName()));
+//
+//        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
+//        inputParameters.add(descriptorBuilder.buildInputParameterType("data1", "data1", DataType.STRING));
+//        inputParameters.add(descriptorBuilder.buildInputParameterType("data2", "data2", DataType.STRING));
+//
+//        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
+//        outputParameters.add(descriptorBuilder.buildOutputParameterType("out", "out", DataType.STD_OUT));
+//
+//        ServiceDescription serviceDescription = descriptorBuilder.buildServiceDescription("comma_app", "comma_app",
+//                inputParameters, outputParameters);
+//
+//        ServiceDescription serviceDescription2 = descriptorBuilder.buildServiceDescription("echo_app", "echo_app",
+//                inputParameters, outputParameters);
+//
+//        log("Adding service description ...");
+//        addServiceDescriptor(serviceDescription, "comma_app");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+//                serviceDescription.getType().getName()));
+//
+//        addServiceDescriptor(serviceDescription2, "echo_app");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+//                serviceDescription2.getType().getName()));
+//
+//        // Deployment descriptor
+//        File executable;
+//        if (OsUtils.isWindows()) {
+//            executable = getFile("src/test/resources/comma_data.bat");
+//        } else {
+//            executable = getFile("src/test/resources/comma_data.sh");
+//            Runtime.getRuntime().exec("chmod +x " + executable.getAbsolutePath());
+//        }
+//
+//        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
+//                .buildApplicationDeploymentDescription("comma_app_localhost", executable.getAbsolutePath(), OsUtils.getTempFolderPath());
+//        ApplicationDescription applicationDeploymentDescription2 = descriptorBuilder
+//                .buildApplicationDeploymentDescription("echo_app_localhost", OsUtils.getEchoExecutable(), OsUtils.getTempFolderPath());
+//
+//        log("Adding deployment description ...");
+//        addApplicationDescriptor(applicationDeploymentDescription, serviceDescription, hostDescription, "comma_app_localhost");
+//
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+//                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
+//                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
+//
+//        addApplicationDescriptor(applicationDeploymentDescription2, serviceDescription2, hostDescription, "echo_app_localhost");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+//                serviceDescription2.getType().getName(), hostDescription.getType().getHostName(),
+//                applicationDeploymentDescription2.getType().getApplicationName().getStringValue()));
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
index d7763d2..b28bbca 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
@@ -1,39 +1,39 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
-
-import org.apache.airavata.registry.api.PasswordCallback;
-
-/**
- * Callback for tests
- */
-public class PasswordCallbackImpl implements PasswordCallback {
-    @Override
-    public String getPassword(String username) {
-
-        if (username.equals("admin")) {
-            return "admin";
-        }
-
-        return null;
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
+//
+//import org.apache.airavata.registry.api.PasswordCallback;
+//
+///**
+// * Callback for tests
+// */
+//public class PasswordCallbackImpl implements PasswordCallback {
+//    @Override
+//    public String getPassword(String username) {
+//
+//        if (username.equals("admin")) {
+//            return "admin";
+//        }
+//
+//        return null;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
index 81d01b6..dd4d2b6 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
@@ -36,19 +36,12 @@ import org.apache.airavata.model.error.AiravataClientException;
 import org.apache.airavata.model.error.AiravataSystemException;
 import org.apache.airavata.model.error.ExperimentNotFoundException;
 import org.apache.airavata.model.error.InvalidRequestException;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.ApplicationManager;
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 import org.apache.airavata.registry.api.workflow.ExperimentData;
 import org.apache.airavata.registry.api.workflow.InputData;
 import org.apache.airavata.registry.api.workflow.NodeExecutionData;
@@ -86,9 +79,7 @@ public abstract class WorkflowIntegrationTestBase {
 
     protected static final int TIME_OUT = 20000;
     protected static final int TRIES = 3;
-    protected AiravataAPI airavataAPI;
     protected Airavata.Client client;
-    protected ApplicationManager applicationManager;
 
     protected void log(String message) {
         log.info(message);
@@ -125,12 +116,6 @@ public abstract class WorkflowIntegrationTestBase {
         return userName;
     }
 
-    public AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException {
-        if (airavataAPI == null){
-            airavataAPI = AiravataAPIFactory.getAPI(getGatewayName(), getUserName());
-        }
-        return airavataAPI;
-    }
 
     public String getPassword() {
         return password;
@@ -231,164 +216,147 @@ public abstract class WorkflowIntegrationTestBase {
         getClient().launchExperiment(expId, "testToken");
     }
 
-    protected void executeExperiment(String workflowFilePath,
-                                     List<String> inputs, List<String> outputs) throws GraphException,
-            ComponentException, IOException, WorkflowAlreadyExistsException,
-            AiravataAPIInvocationException, Exception {
-        log("Saving workflow ...");
-
-        Workflow workflow = new Workflow(getWorkflowComposeContent(workflowFilePath));
-        if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName())) {
-            airavataAPI.getWorkflowManager().addWorkflow(workflow);
-        }
-        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));
-
-        log("Workflow setting up completed ...");
-
-//        executeWorkflow(workflow, inputs, outputs);
-    }
-
-
-    protected void executeWorkflow(Workflow workflow, List<String> inputValues, List<String> outputValue) throws Exception {
-        String experimentId = executeWorkflow(workflow, inputValues);
-        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
-        verifyOutput(experimentId, outputValue);
-    }
-
-    protected String executeWorkflow(Workflow workflow, List<String> inputValues) throws Exception {
-        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
-        String workflowName = workflow.getName();
-        ExperimentAdvanceOptions options = getAiravataAPI().getExecutionManager().createExperimentAdvanceOptions(
-                workflowName, getUserName(), null);
-
-        options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
-
-        String experimentId = getAiravataAPI().getExecutionManager().runExperiment(workflowName, workflowInputs, options);
-
-        Assert.assertNotNull(experimentId);
-
-        log.info("Run workflow completed ....");
-        log.info("Starting monitoring ....");
-        return experimentId;
-    }
-
-
-    protected void verifyOutput(String experimentId, List<String> outputVerifyingString) throws Exception {
-        log.info("Experiment ID Returned : " + experimentId);
-
-        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
-
-        log.info("Verifying output ...");
-
-        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
-
-        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
-
-        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
-            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
-            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
-            for (NodeExecutionData nodeData : nodeDataList) {
-                for (InputData inputData : nodeData.getInputData()) {
-                    String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
-                    Assert.assertEquals(outputVerifyingString.size(), outputValues.length);
-                    for (int i = 0; i < outputValues.length; i++) {
-                        Assert.assertEquals(outputVerifyingString.get(i), outputValues[i]);
-                    }
-                }
-            }
-        }
-    }
-
-    protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
-        log.info("Experiment ID Returned : " + experimentId);
-
-        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
-
-        log.info("Verifying output ...");
-
-        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
-
-        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
-
-        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
-            List<NodeExecutionData> nodeDataList = data.getNodeDataList();
-            for (NodeExecutionData nodeData : nodeDataList) {
-
-                Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
-
-                for (OutputData outputData : nodeData.getOutputData()) {
-                    Assert.assertEquals("Airavata_Test", outputData.getValue());
-                }
-                for (InputData inputData : nodeData.getInputData()) {
-                    Assert.assertEquals(outputVerifyingString, inputData.getValue());
-                }
-            }
-        }
-    }
-
-    protected List<WorkflowInput> setupInputs(Workflow workflow, List<String> inputValues) throws Exception {
-        List<WorkflowInput> workflowInputs = getAiravataAPI().getWorkflowManager().getWorkflowInputs(workflow.getName());
-
-        Assert.assertEquals(workflowInputs.size(), inputValues.size());
-
-        int i = 0;
-        for (String valueString : inputValues) {
-            workflowInputs.get(i).setValue(valueString);
-            ++i;
-        }
-        return workflowInputs;
-    }
-
-    protected String getWorkflowComposeContent(String fileName) throws IOException {
-        File file = getFile(fileName);
-
-        BufferedReader reader = new BufferedReader(new FileReader(file));
-        String line;
-        StringBuilder buffer = new StringBuilder();
-        while ((line = reader.readLine()) != null) {
-            buffer.append(line);
-        }
-        reader.close();
-        log.debug("Workflow compose - " + buffer.toString());
-        return buffer.toString();
-    }
-
-    protected File getFile(String fileName) {
-        File f = new File(".");
-        log.debug(f.getAbsolutePath());
-
-        File file = new File(fileName);
-        if (!file.exists()) {
-            file = new File("modules/integration-tests/" + fileName);
-        }
-        return file;
-    }
-
-    /*
-    * When running the tests multiple times in the same server, when the application, Host, service descriptions are
-    * there already the tests fail. But using these functions for the tests prevents that from happening.
-    * */
-    protected void addHostDescriptor(HostDescription hostDescription) throws AiravataAPIInvocationException {
-        applicationManager = getAiravataAPI().getApplicationManager();
-        String hostName = hostDescription.getType().getHostName();
-        if (!applicationManager.isHostDescriptorExists(hostName)){
-            applicationManager.addHostDescription(hostDescription);
-        }
-    }
-
-    protected void addServiceDescriptor(ServiceDescription serviceDescription, String serviceName) throws AiravataAPIInvocationException {
-        applicationManager = getAiravataAPI().getApplicationManager();
-        if (!applicationManager.isServiceDescriptorExists(serviceName)){
-            applicationManager.addServiceDescription(serviceDescription);
-        }
-    }
 
-    protected void addApplicationDescriptor(ApplicationDescription applicationDescription, ServiceDescription serviceDescription, HostDescription hostDescription, String appeName) throws AiravataAPIInvocationException {
-        boolean descriptorExists = applicationManager.isApplicationDescriptorExists(serviceDescription.getType().getName(), hostDescription.getType().getHostName(), appeName);
-        if (!descriptorExists) {
-            applicationManager.addApplicationDescription(serviceDescription, hostDescription,
-                    applicationDescription);
-        }
-    }
+//    protected void executeWorkflow(Workflow workflow, List<String> inputValues, List<String> outputValue) throws Exception {
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
+//        verifyOutput(experimentId, outputValue);
+//    }
+//
+//    protected String executeWorkflow(Workflow workflow, List<String> inputValues) throws Exception {
+//        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
+//        String workflowName = workflow.getName();
+//        ExperimentAdvanceOptions options = getAiravataAPI().getExecutionManager().createExperimentAdvanceOptions(
+//                workflowName, getUserName(), null);
+//
+//        options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
+//
+//        String experimentId = getAiravataAPI().getExecutionManager().runExperiment(workflowName, workflowInputs, options);
+//
+//        Assert.assertNotNull(experimentId);
+//
+//        log.info("Run workflow completed ....");
+//        log.info("Starting monitoring ....");
+//        return experimentId;
+//    }
+//
+//
+//    protected void verifyOutput(String experimentId, List<String> outputVerifyingString) throws Exception {
+//        log.info("Experiment ID Returned : " + experimentId);
+//
+//        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
+//
+//        log.info("Verifying output ...");
+//
+//        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
+//
+//        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
+//
+//        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
+//            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
+//            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
+//            for (NodeExecutionData nodeData : nodeDataList) {
+//                for (InputData inputData : nodeData.getInputData()) {
+//                    String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
+//                    Assert.assertEquals(outputVerifyingString.size(), outputValues.length);
+//                    for (int i = 0; i < outputValues.length; i++) {
+//                        Assert.assertEquals(outputVerifyingString.get(i), outputValues[i]);
+//                    }
+//                }
+//            }
+//        }
+//    }
+//
+//    protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
+//        log.info("Experiment ID Returned : " + experimentId);
+//
+//        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
+//
+//        log.info("Verifying output ...");
+//
+//        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
+//
+//        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
+//
+//        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
+//            List<NodeExecutionData> nodeDataList = data.getNodeDataList();
+//            for (NodeExecutionData nodeData : nodeDataList) {
+//
+//                Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
+//
+//                for (OutputData outputData : nodeData.getOutputData()) {
+//                    Assert.assertEquals("Airavata_Test", outputData.getValue());
+//                }
+//                for (InputData inputData : nodeData.getInputData()) {
+//                    Assert.assertEquals(outputVerifyingString, inputData.getValue());
+//                }
+//            }
+//        }
+//    }
+//
+//    protected List<WorkflowInput> setupInputs(Workflow workflow, List<String> inputValues) throws Exception {
+//        List<WorkflowInput> workflowInputs = getAiravataAPI().getWorkflowManager().getWorkflowInputs(workflow.getName());
+//
+//        Assert.assertEquals(workflowInputs.size(), inputValues.size());
+//
+//        int i = 0;
+//        for (String valueString : inputValues) {
+//            workflowInputs.get(i).setValue(valueString);
+//            ++i;
+//        }
+//        return workflowInputs;
+//    }
+//
+//    protected String getWorkflowComposeContent(String fileName) throws IOException {
+//        File file = getFile(fileName);
+//
+//        BufferedReader reader = new BufferedReader(new FileReader(file));
+//        String line;
+//        StringBuilder buffer = new StringBuilder();
+//        while ((line = reader.readLine()) != null) {
+//            buffer.append(line);
+//        }
+//        reader.close();
+//        log.debug("Workflow compose - " + buffer.toString());
+//        return buffer.toString();
+//    }
+//
+//    protected File getFile(String fileName) {
+//        File f = new File(".");
+//        log.debug(f.getAbsolutePath());
+//
+//        File file = new File(fileName);
+//        if (!file.exists()) {
+//            file = new File("modules/integration-tests/" + fileName);
+//        }
+//        return file;
+//    }
+//
+//    /*
+//    * When running the tests multiple times in the same server, when the application, Host, service descriptions are
+//    * there already the tests fail. But using these functions for the tests prevents that from happening.
+//    * */
+//    protected void addHostDescriptor(HostDescription hostDescription) throws AiravataAPIInvocationException {
+//        applicationManager = getAiravataAPI().getApplicationManager();
+//        String hostName = hostDescription.getType().getHostName();
+//        if (!applicationManager.isHostDescriptorExists(hostName)){
+//            applicationManager.addHostDescription(hostDescription);
+//        }
+//    }
+//
+//    protected void addServiceDescriptor(ServiceDescription serviceDescription, String serviceName) throws AiravataAPIInvocationException {
+//        applicationManager = getAiravataAPI().getApplicationManager();
+//        if (!applicationManager.isServiceDescriptorExists(serviceName)){
+//            applicationManager.addServiceDescription(serviceDescription);
+//        }
+//    }
+//
+//    protected void addApplicationDescriptor(ApplicationDescription applicationDescription, ServiceDescription serviceDescription, HostDescription hostDescription, String appeName) throws AiravataAPIInvocationException {
+//        boolean descriptorExists = applicationManager.isApplicationDescriptorExists(serviceDescription.getType().getName(), hostDescription.getType().getHostName(), appeName);
+//        if (!descriptorExists) {
+//            applicationManager.addApplicationDescription(serviceDescription, hostDescription,
+//                    applicationDescription);
+//        }
+//    }
 
 }


Mime
View raw message