airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject svn commit: r1139241 [1/3] - in /incubator/airavata/core/trunk/gfac: ./ .settings/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/airavata/ src/main/java/org/apache/airavata/core/ src/main/java/org/a...
Date Fri, 24 Jun 2011 11:01:18 GMT
Author: smarru
Date: Fri Jun 24 11:01:15 2011
New Revision: 1139241

URL: http://svn.apache.org/viewvc?rev=1139241&view=rev
Log:
Airvata core application wrapper pojo component

Added:
    incubator/airavata/core/trunk/gfac/
    incubator/airavata/core/trunk/gfac/.classpath
    incubator/airavata/core/trunk/gfac/.project
    incubator/airavata/core/trunk/gfac/.settings/
    incubator/airavata/core/trunk/gfac/.settings/org.eclipse.jdt.core.prefs
    incubator/airavata/core/trunk/gfac/.settings/org.maven.ide.eclipse.prefs
    incubator/airavata/core/trunk/gfac/pom.xml
    incubator/airavata/core/trunk/gfac/src/
    incubator/airavata/core/trunk/gfac/src/main/
    incubator/airavata/core/trunk/gfac/src/main/java/
    incubator/airavata/core/trunk/gfac/src/main/java/org/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/InvocationContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/MessageContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/SecurityContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ServiceContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/AmazonSecurityContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/GSISecurityContext.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ParameterContextImpl.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/MyProxyManager.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/FileTransferFault.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/GfacException.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/JobSubmissionFault.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/Chain.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/DataServiceChain.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/ExitableChain.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PostExecuteChain.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PreExecuteChain.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/GridFtp.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/AbstractServiceFactory.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/PropertyServiceFactory.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/ExecutionModel.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/DummyNotification.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/AbstractProvider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/EC2Provider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/GramProvider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/LocalProvider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/Provider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/utils/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/utils/JobSubmissionListener.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/registry/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/registry/RegistryService.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/registry/impl/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/registry/impl/XregistryServiceWrapper.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/scheduler/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/scheduler/Scheduler.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/services/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/services/GenericService.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/services/impl/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/services/impl/AbstractSimpleService.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/BooleanParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/DoubleParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/FloatParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/IntegerParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/Parameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/StringParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/type/URIParameter.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/ContactInfo.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/ErrorCodes.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/GFacOptions.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/GlobalConfiguration.java
    incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java
    incubator/airavata/core/trunk/gfac/src/main/resources/
    incubator/airavata/core/trunk/gfac/src/main/resources/service.properties
    incubator/airavata/core/trunk/gfac/src/test/
    incubator/airavata/core/trunk/gfac/src/test/java/
    incubator/airavata/core/trunk/gfac/src/test/java/org/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/factory/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/factory/OGCEGenericFactoryTest.java
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/services/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/services/impl/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/type/
    incubator/airavata/core/trunk/gfac/src/test/java/org/apache/airavata/core/gfac/type/StringParameterTest.java
    incubator/airavata/core/trunk/gfac/src/test/resources/
    incubator/airavata/core/trunk/gfac/src/test/resources/service.properties

Added: incubator/airavata/core/trunk/gfac/.classpath
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/.classpath?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/.classpath (added)
+++ incubator/airavata/core/trunk/gfac/.classpath Fri Jun 24 11:01:15 2011
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: incubator/airavata/core/trunk/gfac/.project
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/.project?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/.project (added)
+++ incubator/airavata/core/trunk/gfac/.project Fri Jun 24 11:01:15 2011
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gfac-pojo</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: incubator/airavata/core/trunk/gfac/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/.settings/org.eclipse.jdt.core.prefs?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/airavata/core/trunk/gfac/.settings/org.eclipse.jdt.core.prefs Fri Jun 24 11:01:15 2011
@@ -0,0 +1,6 @@
+#Fri Jun 24 05:47:57 EDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

Added: incubator/airavata/core/trunk/gfac/.settings/org.maven.ide.eclipse.prefs
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/.settings/org.maven.ide.eclipse.prefs?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/.settings/org.maven.ide.eclipse.prefs (added)
+++ incubator/airavata/core/trunk/gfac/.settings/org.maven.ide.eclipse.prefs Fri Jun 24 11:01:15 2011
@@ -0,0 +1,8 @@
+#Fri Jun 24 05:47:47 EDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: incubator/airavata/core/trunk/gfac/pom.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/pom.xml?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/pom.xml (added)
+++ incubator/airavata/core/trunk/gfac/pom.xml Fri Jun 24 11:01:15 2011
@@ -0,0 +1,150 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>GFac</groupId>
+	<version>0.0.1-SNAPSHOT</version>
+	<artifactId>GFac-Core</artifactId>
+	<name>gfac-core</name>
+	<description>The core GFAC functionality independent from any webservice implementation. </description>
+	<properties>
+		<org.slf4j.version>1.6.1</org.slf4j.version>
+		<log4j.version>1.2.16</log4j.version>
+	</properties>
+	<repositories>
+		<repository>
+			<name>ogce.m2.all</name>
+			<id>ogce.m2.all</id>
+			<url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all
+				</url>
+		</repository>
+	</repositories>
+	<dependencies>
+		<dependency>
+			<groupId>cog-jglobus</groupId>
+			<artifactId>cog-jglobus</artifactId>
+			<version>1.8.0_1</version>
+		</dependency>
+		<dependency>
+			<groupId>cog-4_1_6_rc2</groupId>
+			<artifactId>puretls</artifactId>
+			<type>jar</type>
+			<version>cog-4_1_6</version>
+		</dependency>
+		<dependency>
+			<groupId>cog-4_1_6_rc2</groupId>
+			<artifactId>cryptix32</artifactId>
+			<version>cog-4_1_6</version>
+		</dependency>
+		<dependency>
+			<groupId>cog-4_1_6_rc2</groupId>
+			<artifactId>cryptix-asn1</artifactId>
+			<version>cog-4_1_6</version>
+		</dependency>
+		<dependency>
+			<groupId>bouncycastle</groupId>
+			<artifactId>bcprov-jdk15</artifactId>
+			<version>143</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<!-- Logging -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${org.slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<version>${org.slf4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${org.slf4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>${log4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>
+		</dependency>
+		<!-- GFAC schemas -->
+		<dependency>
+			<groupId>gfac</groupId>
+			<artifactId>gfac-schema-utils</artifactId>
+			<version>0.4.3</version>
+		</dependency>
+		<dependency>
+			<groupId>xpp3</groupId>
+			<artifactId>xpp3</artifactId>
+			<version>1.1.4c</version>
+		</dependency>
+		<dependency>
+			<groupId>workflow-tracking</groupId>
+			<artifactId>workflow_tracking</artifactId>
+			<version>2.7.1</version>
+			<type>jar</type>
+		</dependency>
+
+		<dependency>
+			<groupId>workflow-tracking</groupId>
+			<artifactId>workflow_tracking_types</artifactId>
+			<version>2.6</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>xmlbeans</groupId>
+			<artifactId>xbean</artifactId>
+			<version>2.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>workflow-context-header</groupId>
+			<artifactId>workflow-context-header</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<!-- Xregistry jars -->
+		<dependency>
+			<groupId>xregistry</groupId>
+			<artifactId>xregistry-client</artifactId>
+			<version>1.2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>xregistry</groupId>
+			<artifactId>xregistry_generated</artifactId>
+			<version>0.8.3</version>
+			<type>jar</type>
+		</dependency>
+
+		<!-- SSH -->
+		<dependency>
+			<groupId>net.schmizz</groupId>
+			<artifactId>sshj</artifactId>
+			<version>0.3.1</version>
+		</dependency>
+
+		<!-- Amazon -->
+		<dependency>
+			<groupId>com.amazonaws</groupId>
+			<artifactId>aws-java-sdk</artifactId>
+			<version>1.1.8</version>
+		</dependency>
+
+		<!-- Test -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.7</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,33 @@
+package org.apache.airavata.core.gfac.context;
+
+import org.apache.airavata.core.gfac.model.ExecutionModel;
+import org.apache.airavata.core.gfac.notification.NotificationService;
+import org.apache.airavata.core.gfac.registry.RegistryService;
+import org.ogce.namespaces.x2010.x08.x30.workflowContextHeader.WorkflowContextHeaderDocument.WorkflowContextHeader;
+
+public interface ExecutionContext {
+
+	ExecutionModel getExecutionModel();
+
+	void setExectionModel(ExecutionModel model);
+
+	WorkflowContextHeader getWorkflowHeader();
+
+	void setWorkflowHeader(WorkflowContextHeader header);
+
+	NotificationService getNotificationService();
+
+	void setNotificationService(NotificationService service);
+
+	SecurityContext getSecurityContext();
+
+	void setSecurityContext(SecurityContext context);
+
+	ServiceContext getServiceContext();
+
+	void setServiceContext(ServiceContext context);
+	
+	RegistryService getRegistryService();
+	
+	void setRegistryService(RegistryService registryService);
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/InvocationContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/InvocationContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/InvocationContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/InvocationContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,43 @@
+package org.apache.airavata.core.gfac.context;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Main context that is used throughout the service
+ * 
+ * @author Patanachai Tangchaisin
+ *
+ */
+public class InvocationContext {
+
+	private String serviceName;
+	private ExecutionContext executionContext;
+	private Map<String, MessageContext> messageContextMap = new HashMap<String, MessageContext>();
+	private Map<String, SecurityContext> securityContextMap = new HashMap<String, SecurityContext>();;	
+	
+	public String getServiceName() {
+		return serviceName;
+	}
+	public void setServiceName(String serviceName) {
+		this.serviceName = serviceName;
+	}
+	public ExecutionContext getExecutionContext() {
+		return executionContext;
+	}
+	public void setExecutionContext(ExecutionContext executionContext) {
+		this.executionContext = executionContext;
+	}
+	public MessageContext getMessageContext(String name) {
+		return this.messageContextMap.get(name);
+	}
+	public void addMessageContext(String name, MessageContext messageContext) {
+		this.messageContextMap.put(name, messageContext);
+	}
+	public SecurityContext getSecurityContext(String name) {
+		return this.securityContextMap.get(name);
+	}
+	public void addSecurityContext(String name, SecurityContext securityContext) {
+		this.securityContextMap.put(name, securityContext);
+	}
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/MessageContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/MessageContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/MessageContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/MessageContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,18 @@
+package org.apache.airavata.core.gfac.context;
+
+import java.util.Iterator;
+
+public interface MessageContext<T> {
+	
+	public Iterator<String> getParameterNames();
+
+	public T getParameterValue(String name);
+
+	public String getParameterType(String name);
+
+	public String getStringParameterValue(String name);
+	
+	public void addParameter(String name, String type, T value);
+	
+	public void setValue(String name, T value);
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/SecurityContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/SecurityContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/SecurityContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/SecurityContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,5 @@
+package org.apache.airavata.core.gfac.context;
+
+
+public interface SecurityContext {
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ServiceContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ServiceContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/ServiceContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,12 @@
+package org.apache.airavata.core.gfac.context;
+
+import org.apache.airavata.core.gfac.utils.GlobalConfiguration;
+import org.ogce.schemas.gfac.documents.ServiceMapType;
+
+public interface ServiceContext {
+
+	ServiceMapType getService();
+
+	GlobalConfiguration getGlobalConfiguration();
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/AmazonSecurityContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/AmazonSecurityContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/AmazonSecurityContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/AmazonSecurityContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,26 @@
+package org.apache.airavata.core.gfac.context.impl;
+
+import org.apache.airavata.core.gfac.context.SecurityContext;
+
+public class AmazonSecurityContext implements SecurityContext {
+
+	private String accessKey;
+	private String secretKey;
+	
+	public String getAccessKey() {
+		return accessKey;
+	}
+
+	public void setAccessKey(String accessKey) {
+		this.accessKey = accessKey;
+	}
+
+	public String getSecretKey() {
+		return secretKey;
+	}
+
+	public void setSecretKey(String secretKey) {
+		this.secretKey = secretKey;
+	}	
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,71 @@
+package org.apache.airavata.core.gfac.context.impl;
+
+import org.apache.airavata.core.gfac.context.ExecutionContext;
+import org.apache.airavata.core.gfac.context.SecurityContext;
+import org.apache.airavata.core.gfac.context.ServiceContext;
+import org.apache.airavata.core.gfac.model.ExecutionModel;
+import org.apache.airavata.core.gfac.notification.NotificationService;
+import org.apache.airavata.core.gfac.registry.RegistryService;
+import org.ogce.namespaces.x2010.x08.x30.workflowContextHeader.WorkflowContextHeaderDocument.WorkflowContextHeader;
+
+public class ExecutionContextImpl implements ExecutionContext {
+
+	private ExecutionModel executionModel;
+	private WorkflowContextHeader workflowContextHeader;
+	private NotificationService notificationService;
+	private RegistryService registryService;
+	private SecurityContext securityContext;
+
+	public ExecutionModel getExecutionModel() {
+		return executionModel;
+	}
+
+	public void setExectionModel(ExecutionModel model) {
+		this.executionModel = model;
+	}
+
+	public WorkflowContextHeader getWorkflowHeader() {
+		return workflowContextHeader;
+	}
+
+	public void setWorkflowHeader(WorkflowContextHeader header) {
+		this.workflowContextHeader = header;
+	}
+
+	public NotificationService getNotificationService() {
+		return this.notificationService;
+	}
+
+	public void setNotificationService(NotificationService service) {
+		this.notificationService = service;
+
+	}
+
+	public SecurityContext getSecurityContext() {
+		return this.securityContext;
+	}
+
+	public void setSecurityContext(SecurityContext context) {
+		this.securityContext = context;
+
+	}
+
+	public ServiceContext getServiceContext() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setServiceContext(ServiceContext context) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public RegistryService getRegistryService() {
+		return this.registryService;
+	}
+
+	public void setRegistryService(RegistryService registryService) {
+		this.registryService = registryService;
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/GSISecurityContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/GSISecurityContext.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/GSISecurityContext.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/GSISecurityContext.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,110 @@
+package org.apache.airavata.core.gfac.context.impl;
+
+import org.apache.airavata.core.gfac.context.SecurityContext;
+import org.apache.airavata.core.gfac.context.impl.utils.MyProxyManager;
+import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.exception.GfacException.FaultCode;
+import org.apache.airavata.core.gfac.utils.GlobalConfiguration;
+import org.globus.tools.MyProxy;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GSISecurityContext implements SecurityContext {
+
+	protected final Logger log = LoggerFactory.getLogger(this.getClass());
+
+	private MyProxyManager proxyRenewer;
+
+	private String myproxyUserName;
+
+	private String myproxyPasswd;
+
+	private String myproxyServer;
+
+	private int myproxyLifetime;
+
+	private String trustedCertLoc;
+
+	private GSSCredential gssCredentails;
+	private GlobalConfiguration globalConfiguration;
+
+	public GSISecurityContext() {
+
+	}
+
+	public GSISecurityContext(GlobalConfiguration globalConfiguration) throws GfacException {
+		try {
+			this.globalConfiguration = globalConfiguration;
+			myproxyUserName = globalConfiguration.getProperty("myproxyUserName");
+			myproxyPasswd = globalConfiguration.getProperty("myproxyPasswd");
+			myproxyServer = globalConfiguration.getProperty("myproxyServer");
+			String lifetime = globalConfiguration.getProperty("myproxyLifetime");
+			trustedCertLoc = globalConfiguration.getTrustedCertsFile();
+			// Load the Credential configurations
+			if (myproxyUserName != null && myproxyPasswd != null && myproxyServer != null && lifetime != null) {
+				this.myproxyLifetime = Integer.parseInt(lifetime);
+				this.proxyRenewer = new MyProxyManager(myproxyUserName, myproxyPasswd, MyProxy.MYPROXY_SERVER_PORT, myproxyLifetime, myproxyServer, trustedCertLoc);
+				log.info("loaded credentails from Proxy server");
+			} else {
+				log.info(myproxyUserName + " " + (myproxyPasswd != null) + " " + myproxyServer + " " + myproxyLifetime);
+				this.proxyRenewer = null;
+			}
+		} catch (NumberFormatException e) {
+			throw new GfacException(e, FaultCode.InvaliedLocalArgumnet);
+		} catch (Exception e) {
+			throw new GfacException(e, FaultCode.InternalServiceError);
+		}
+	}
+
+	public GSSCredential getGssCredentails() throws GfacException, GSSException {
+		try {
+			System.out.println(gssCredentails);
+			if (gssCredentails == null || gssCredentails.getRemainingLifetime() < 10 * 90) {
+				if (proxyRenewer != null) {
+					gssCredentails = proxyRenewer.renewProxy();
+				} else if (myproxyUserName != null && myproxyPasswd != null && myproxyServer != null) {
+					this.proxyRenewer = new MyProxyManager(myproxyUserName, myproxyPasswd, MyProxy.MYPROXY_SERVER_PORT, myproxyLifetime, myproxyServer, trustedCertLoc);
+					log.info("loaded credentails from Proxy server");
+					gssCredentails = this.proxyRenewer.renewProxy();
+				}
+			}
+			return gssCredentails;
+		} catch (Exception e) {
+			throw new GfacException(e, FaultCode.ErrorAtDependentService);
+		}
+	}
+
+	public String getMyproxyUserName() {
+		return myproxyUserName;
+	}
+
+	public void setMyproxyUserName(String myproxyUserName) {
+		this.myproxyUserName = myproxyUserName;
+	}
+
+	public String getMyproxyPasswd() {
+		return myproxyPasswd;
+	}
+
+	public void setMyproxyPasswd(String myproxyPasswd) {
+		this.myproxyPasswd = myproxyPasswd;
+	}
+
+	public String getMyproxyServer() {
+		return myproxyServer;
+	}
+
+	public void setMyproxyServer(String myproxyServer) {
+		this.myproxyServer = myproxyServer;
+	}
+
+	public int getMyproxyLifetime() {
+		return myproxyLifetime;
+	}
+
+	public void setMyproxyLifetime(int myproxyLifetime) {
+		this.myproxyLifetime = myproxyLifetime;
+	}
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ParameterContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ParameterContextImpl.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ParameterContextImpl.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/ParameterContextImpl.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,46 @@
+package org.apache.airavata.core.gfac.context.impl;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.airavata.core.gfac.context.MessageContext;
+import org.apache.airavata.core.gfac.type.Parameter;
+
+@SuppressWarnings("rawtypes")
+public class ParameterContextImpl implements MessageContext<Parameter> {
+	
+	private Map<String, Parameter> value;
+	
+	public ParameterContextImpl(){
+		this.value = new HashMap<String, Parameter>();
+	}	
+	
+	public Iterator<String> getParameterNames() {
+		return this.value.keySet().iterator();
+	}
+
+	public Parameter getParameterValue(String name) {
+		return this.value.get(name);
+	}
+
+	public String getParameterType(String name) {
+		return this.value.get(name).getTypeName();
+	}
+
+	public String getStringParameterValue(String name) {
+		if(this.value.containsKey(name))
+			return this.value.get(name).toString();
+		else
+			return null;
+	}
+	
+	public void addParameter(String name, String type, Parameter value){
+		this.value.put(name, value);
+	}
+
+	public void setValue(String name, Parameter value) {
+		this.value.put(name, value);		
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/MyProxyManager.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/MyProxyManager.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/MyProxyManager.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/context/impl/utils/MyProxyManager.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,113 @@
+package org.apache.airavata.core.gfac.context.impl.utils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.UUID;
+
+import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.exception.GfacException.FaultCode;
+import org.globus.gsi.GlobusCredential;
+import org.globus.gsi.TrustedCertificates;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+import org.ietf.jgss.GSSCredential;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MyProxyManager {
+
+	private final Logger log = LoggerFactory.getLogger(this.getClass());
+	
+	private final String username;
+    private final String password;
+    private final int port;
+    private final int lifetime;
+    private final String hostname;
+    private String trustedCertsLoc;
+
+    public MyProxyManager(final String username, final String password, final int port,
+            final int lifetime, final String hostname) {
+        super();
+        this.username = username;
+        this.password = password;
+        this.port = port;
+        this.lifetime = lifetime;
+        this.hostname = hostname;
+    }
+    public MyProxyManager(final String username, final String password, final int port,
+            final int lifetime, final String hostname, String trustedCertsLoc) {
+        super();
+        this.username = username;
+        this.password = password;
+        this.port = port;
+        this.lifetime = lifetime;
+        this.hostname = hostname;
+        this.trustedCertsLoc = trustedCertsLoc;
+    }
+    public MyProxyManager(String username, String password, int lifetime) {
+        super();
+        this.username = username;
+        this.password = password;
+        this.lifetime = lifetime;
+        hostname = "rainier.extreme.indiana.edu";
+        this.port = MyProxy.DEFAULT_PORT;
+    }
+  
+	private void init() {
+		if(trustedCertsLoc != null){
+    	TrustedCertificates certificates = TrustedCertificates.load(trustedCertsLoc);
+		TrustedCertificates.setDefaultTrustedCertificates(certificates);
+		}
+	}
+
+	public GSSCredential renewProxy() throws GfacException {
+
+	        try {
+	        	init() ;
+	            String proxyloc = null;
+	            MyProxy myproxy = new MyProxy(hostname, port);
+	            GSSCredential proxy = myproxy.get(username, password, lifetime);
+	            GlobusCredential globusCred = null;
+	            if (proxy instanceof GlobusGSSCredentialImpl) {
+	                globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
+	                log.info("got proxy from myproxy for " + username + " with " + lifetime + " lifetime.");
+	             	 String uid=username;
+	                if (proxyloc == null) {
+							  //						  uid = XpolaUtil.getSysUserid();
+							  log.info("uid: " + uid);
+							  proxyloc = "/tmp/x509up_u" + uid + UUID.randomUUID().toString();
+	                }
+	                log.info("proxy location: " + proxyloc);
+	                File proxyfile = new File(proxyloc);
+	                if (proxyfile.exists() == false) {
+	                    String dirpath = proxyloc.substring(0, proxyloc.lastIndexOf('/'));
+	                    File dir = new File(dirpath);
+	                    if (dir.exists() == false) {
+	                        dir.mkdirs();
+	                        log.info("new directory " + dirpath + " is created.");
+	                    }
+	                    proxyfile.createNewFile();
+	                    log.info("new proxy file " + proxyloc + " is created.");
+	                }
+	                FileOutputStream fout = new FileOutputStream(proxyfile);
+	                globusCred.save(fout);
+	                fout.close();
+	                Runtime.getRuntime().exec("/bin/chmod 600 " + proxyloc);
+	                log.info("Proxy file renewed to " + proxyloc + " for the user "
+	                        + username + " with " + lifetime + " lifetime.");
+
+	            }
+	            return proxy;
+	        } catch (MyProxyException e) {
+	            throw new GfacException(e,FaultCode.ErrorAtDependentService);
+	        } catch (FileNotFoundException e) {
+	            throw new GfacException(e,FaultCode.LocalError);
+	        } catch (IOException e) {
+	            throw new GfacException(e,FaultCode.LocalError);
+	        }
+	    }
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/FileTransferFault.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/FileTransferFault.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/FileTransferFault.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/FileTransferFault.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,18 @@
+package org.apache.airavata.core.gfac.exception;
+
+import java.net.URI;
+
+import org.apache.airavata.core.gfac.utils.GFacOptions.FileTransferServiceType;
+import org.ogce.schemas.gfac.inca.faults.DataTransfer;
+
+public class FileTransferFault extends GfacException{
+    public FileTransferFault(Throwable cause,FileTransferServiceType api,String origHost, URI source,URI dest, String options) {
+        super(cause, FaultCode.ErrorAtDependentService);
+        DataTransfer dataTransfer = DataTransfer.Factory.newInstance();
+        dataTransfer.setOrigHost(origHost);
+        dataTransfer.setSource(source.toString());
+        dataTransfer.setDest(dest.toString());
+        dataTransfer.setOptions(options);
+        errorActionDocument = createFaultData(dataTransfer, api.toString(), cause);
+    }
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/GfacException.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/GfacException.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/GfacException.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/GfacException.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,76 @@
+package org.apache.airavata.core.gfac.exception;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+import org.apache.xmlbeans.XmlObject;
+import org.ogce.schemas.gfac.inca.faults.ActionDocument;
+import org.ogce.schemas.gfac.inca.faults.Application;
+import org.ogce.schemas.gfac.inca.faults.DataTransfer;
+import org.ogce.schemas.gfac.inca.faults.FileSystem;
+import org.ogce.schemas.gfac.inca.faults.Job;
+import org.ogce.schemas.gfac.inca.faults.ActionDocument.Action;
+
+public class GfacException extends Exception {
+
+    public static enum FaultCode{ServiceNotReachable, InvalidRequest, InternalServiceError, ErrorAtDependentService, ErrorAtClientBeforeWsCall, 
+        ErrorAtClientWhileWsCall, ErrorAtClientAfterWsCall, InitalizationError, UnsupportedMessage, InvaliedLocalArgumnet, 
+        LocalError, CmdAppError, ErrorAtCreatedService, InvalidConfig, Unknown, InvaliedResponse, JobSubmissionFailed};
+        
+    private static final long serialVersionUID = 1L;
+    private static DateFormat formatter = DateFormat.getTimeInstance();
+    protected ActionDocument errorActionDocument;
+
+    protected String faultCode;
+    public GfacException(String message, Throwable cause) {
+        super(message, cause);
+    }
+    
+    public GfacException(String message, Throwable cause,FaultCode faultCode) {
+        super(message, cause);
+        this.faultCode = faultCode.toString();
+    }
+
+    public GfacException(String message,FaultCode faultCode) {
+        super(message);
+        this.faultCode = faultCode.toString();
+    }
+
+    public GfacException(Throwable cause,FaultCode faultCode) {
+        super(cause);
+        if(cause instanceof GfacException){
+            GfacException gfacExeption = (GfacException)cause;
+            setFaultCode(gfacExeption.getFaultCode());
+        }
+        this.faultCode = faultCode.toString();
+    }
+    public String getFaultCode() {
+        return faultCode != null?faultCode:getMessage();
+    }
+    public void setFaultCode(String faultCode) {
+        this.faultCode = faultCode;
+    }
+    public ActionDocument createFaultData(XmlObject fault,String api,Throwable e){
+        ActionDocument document = ActionDocument.Factory.newInstance();
+        Action type = document.addNewAction();
+        type.setId("");
+        type.setApplication("lead");
+        type.setApi(api);
+        
+        if(fault instanceof DataTransfer){
+            type.setDataTransferArray(new DataTransfer[]{(DataTransfer)fault});
+        }else if(fault instanceof Job){
+            type.setJobArray(new Job[]{(Job)fault});
+        }else if(fault instanceof Job){
+            type.setFileSystemArray(new FileSystem[]{(FileSystem)fault});
+        }else if(fault instanceof Application){
+            type.setCmdapplicationArray(new Application[]{(Application)fault});            
+        }
+        type.setEndTime(formatter.format(new Date()));
+        Throwable cause = e;
+        while(cause.getCause() != null){
+            cause = cause.getCause();
+        }
+        return document;
+    }
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/JobSubmissionFault.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/JobSubmissionFault.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/JobSubmissionFault.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/exception/JobSubmissionFault.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,16 @@
+package org.apache.airavata.core.gfac.exception;
+
+import org.apache.airavata.core.gfac.provider.Provider;
+import org.apache.airavata.core.gfac.utils.GFacOptions.CurrentProviders;
+import org.ogce.schemas.gfac.inca.faults.Job;
+
+public class JobSubmissionFault extends GfacException{
+    public JobSubmissionFault(Throwable cause,String submitHost, String contact,String rsl,CurrentProviders api) {
+        super(cause,FaultCode.ErrorAtDependentService);
+        Job job = Job.Factory.newInstance();
+        job.setContact(contact);
+        job.setRsl(rsl);
+        job.setSubmitHost(submitHost);
+        errorActionDocument = createFaultData(job, api.toString(), cause);
+    }
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/Chain.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/Chain.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/Chain.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/Chain.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,20 @@
+package org.apache.airavata.core.gfac.extension;
+
+import org.apache.airavata.core.gfac.context.InvocationContext;
+import org.apache.airavata.core.gfac.exception.GfacException;
+
+public abstract class Chain<T> {
+	protected T next;
+
+	public T setNext(T nextChain) {
+		this.next = nextChain;
+		return this.next;
+	}
+
+	/**
+	 * Start the chain
+	 * 
+	 * @param context
+	 */
+	public abstract void start(InvocationContext context) throws GfacException;
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/DataServiceChain.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/DataServiceChain.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/DataServiceChain.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/DataServiceChain.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,5 @@
+package org.apache.airavata.core.gfac.extension;
+
+public abstract class DataServiceChain extends ExitableChain{
+	
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/ExitableChain.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/ExitableChain.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/ExitableChain.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/ExitableChain.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,20 @@
+package org.apache.airavata.core.gfac.extension;
+
+import org.apache.airavata.core.gfac.context.InvocationContext;
+import org.apache.airavata.core.gfac.exception.GfacException;
+
+public abstract class ExitableChain extends Chain<ExitableChain> {
+	public final void start(InvocationContext context) throws GfacException{
+		boolean breakTheChain = this.execute(context);
+		if (next != null && !breakTheChain) {
+			this.next.start(context);
+		}
+	}
+	
+	/**
+	 * 
+	 * @param context
+	 * @return true if no need for further processing
+	 */
+	protected abstract boolean execute(InvocationContext context) throws GfacException;	
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PostExecuteChain.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PostExecuteChain.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PostExecuteChain.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PostExecuteChain.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,5 @@
+package org.apache.airavata.core.gfac.extension;
+
+public abstract class PostExecuteChain extends ExitableChain{
+	
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PreExecuteChain.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PreExecuteChain.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PreExecuteChain.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/PreExecuteChain.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,5 @@
+package org.apache.airavata.core.gfac.extension;
+
+
+public abstract class PreExecuteChain extends ExitableChain{	
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,168 @@
+package org.apache.airavata.core.gfac.extension.data;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.namespace.QName;
+
+import org.apache.airavata.core.gfac.context.InvocationContext;
+import org.apache.airavata.core.gfac.context.impl.ParameterContextImpl;
+import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.exception.GfacException.FaultCode;
+import org.apache.airavata.core.gfac.extension.DataServiceChain;
+import org.apache.airavata.core.gfac.model.ExecutionModel;
+import org.apache.airavata.core.gfac.registry.RegistryService;
+import org.apache.airavata.core.gfac.type.StringParameter;
+import org.apache.airavata.core.gfac.utils.GfacUtils;
+import org.apache.xmlbeans.XmlException;
+import org.ogce.schemas.gfac.documents.ApplicationDescriptionDocument;
+import org.ogce.schemas.gfac.documents.ApplicationDescriptionType;
+import org.ogce.schemas.gfac.documents.DeploymentDescriptionType;
+import org.ogce.schemas.gfac.documents.GlobusGatekeeperType;
+import org.ogce.schemas.gfac.documents.HostDescriptionDocument;
+import org.ogce.schemas.gfac.documents.HostDescriptionType;
+import org.ogce.schemas.gfac.documents.NameValuePairType;
+import org.ogce.schemas.gfac.documents.OutputParameterType;
+import org.ogce.schemas.gfac.documents.ServiceMapDocument;
+import org.ogce.schemas.gfac.documents.ServiceMapType;
+
+public class RegistryDataService extends DataServiceChain {
+
+	private static final String INPUT_MESSAGE_CONTEXT = "input";
+	private static final String OUTPUT_MESSAGE_CONTEXT = "output";
+
+	public boolean execute(InvocationContext context) throws GfacException {
+
+		/*
+		 * Load host and app description from registry
+		 */
+		RegistryService registryService = context.getExecutionContext().getRegistryService();
+		String serviceMapStr = registryService.getServiceMap(context.getServiceName());
+		System.out.println(serviceMapStr);
+		if (serviceMapStr != null) {
+			try {
+
+				ServiceMapType serviceMap = ServiceMapDocument.Factory.parse(serviceMapStr).getServiceMap();
+				QName appName = GfacUtils.findApplcationName(serviceMap);
+
+				// host name
+				String hostName = findHostFromServiceMap(registryService, appName);
+
+				// app
+				String appDesc = registryService.getAppDesc(appName.toString(), hostName);
+				ApplicationDescriptionType appDescType = ApplicationDescriptionDocument.Factory.parse(appDesc).getApplicationDescription();
+
+				// host desc
+				String hostDesc = registryService.getHostDesc(hostName);
+				HostDescriptionType hostDescType = HostDescriptionDocument.Factory.parse(hostDesc).getHostDescription();
+
+				// application deployment
+				DeploymentDescriptionType deploymentDesc = appDescType.getDeploymentDescription();
+				String tmpDir = deploymentDesc.getTmpDir();
+				if (tmpDir == null && hostDescType != null) {
+					tmpDir = hostDescType.getHostConfiguration().getTmpDir();
+				}
+
+				if (tmpDir == null) {
+					tmpDir = "/tmp";
+				}
+
+				String date = new Date().toString();
+				date = date.replaceAll(" ", "_");
+				date = date.replaceAll(":", "_");
+
+				tmpDir = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + "_" + date + "_" + UUID.randomUUID();
+
+				String workingDir = deploymentDesc.getWorkDir();
+				if (workingDir == null || workingDir.trim().length() == 0) {
+					workingDir = tmpDir;
+				}
+
+				String stdOut = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + ".stdout";
+				String stderr = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + ".stderr";
+				String executable = deploymentDesc.getExecutable();
+				String host = deploymentDesc.getHostName();
+
+				NameValuePairType[] env = deploymentDesc.getApplicationEnvArray();
+				Map<String, String> envMap = new HashMap<String, String>();
+				if (env != null) {
+					for (int i = 0; i < env.length; i++) {
+						envMap.put(env[i].getName(), env[i].getValue());
+					}
+				}
+
+				String inputDataDir = tmpDir + File.separator + "inputData";
+				String outputDataDir = tmpDir + File.separator + "outputData";
+
+				GlobusGatekeeperType[] gatekeepers = hostDescType.getHostConfiguration().getGlobusGatekeeperArray();
+
+				ExecutionModel model = new ExecutionModel();
+				model.setHost(host);
+				model.setExecutable(executable);
+				model.setTmpDir(tmpDir);
+				model.setWorkingDir(workingDir);
+				model.setStdOut(stdOut);
+				model.setStderr(stderr);
+				model.setInputDataDir(inputDataDir);
+				model.setOutputDataDir(outputDataDir);
+				model.setEnv(envMap);
+				model.setAplicationDesc(appDescType);
+				model.setHostDesc(hostDescType);
+				model.setGatekeeper(gatekeepers[0]);
+
+				// input parameter
+				ArrayList<String> tmp = new ArrayList<String>();
+				for (Iterator<String> iterator = context.getMessageContext(INPUT_MESSAGE_CONTEXT).getParameterNames(); iterator.hasNext();) {
+					String key = iterator.next();
+					tmp.add(context.getMessageContext(INPUT_MESSAGE_CONTEXT).getStringParameterValue(key));
+				}
+				model.setInputParameters(tmp);
+
+				context.getExecutionContext().setExectionModel(model);
+
+				// output parameter
+				//TODO type mapping
+				if (serviceMap.getPortTypeArray(0).getMethodArray(0).getOutputParameterArray() != null) {
+					ParameterContextImpl outtmp = new ParameterContextImpl();
+					for (OutputParameterType output : serviceMap.getPortTypeArray(0).getMethodArray(0).getOutputParameterArray()) {
+						outtmp.addParameter(output.getParameterName(), output.getParameterType().toString(), new StringParameter());
+					}
+					context.addMessageContext(OUTPUT_MESSAGE_CONTEXT, outtmp);
+				}
+
+			} catch (XmlException e) {
+				throw new GfacException(e, FaultCode.InitalizationError);
+			}
+		} else {
+			throw new GfacException("Service Map for " + context.getServiceName() + " does not found on resource Catalog " + registryService, FaultCode.InvalidRequest);
+		}
+
+		return false;
+	}
+
+	private String findHostFromServiceMap(RegistryService regService, QName appName) throws GfacException {
+
+		System.out.println("Searching registry for some deployed application hosts\n");
+		String[] hosts = regService.app2Hosts(appName.toString());
+		if (hosts.length > 1) {
+			String hostNames = "";
+			for (int i = 0; i < hosts.length; i++) {
+				hostNames = hostNames + hosts[i];
+			}
+			System.out.println("Application deployed on more than one machine. The full Host list is " + hostNames + "\n");
+		}
+		if (hosts.length >= 1) {
+			System.out.println("Found Host = " + hosts[0]);
+			return hosts[0];
+		} else {
+			System.out.println("Applcation  " + appName.getLocalPart() + " not found in registry");
+			return null;
+		}
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/GridFtp.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/GridFtp.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/GridFtp.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/external/GridFtp.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,113 @@
+package org.apache.airavata.core.gfac.external;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URI;
+
+import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.utils.ContactInfo;
+import org.globus.ftp.DataChannelAuthentication;
+import org.globus.ftp.GridFTPClient;
+import org.globus.ftp.exception.ClientException;
+import org.globus.ftp.exception.ServerException;
+import org.globus.gsi.gssapi.auth.HostAuthorization;
+import org.ietf.jgss.GSSCredential;
+
+public class GridFtp {
+	public void makeDir(URI destURI, GSSCredential gssCred) throws GfacException {
+		GridFTPClient destClient = null;
+		try {
+			ContactInfo destHost = new ContactInfo(destURI.getHost(), destURI.getPort());
+			String destPath = destURI.getPath();
+			System.out.println(("Creating Directory = " + destHost + "=" + destPath));
+
+			destClient = new GridFTPClient(destHost.hostName, destHost.port);
+
+			int tryCount = 0;
+			while (true) {
+				try {
+					destClient.setAuthorization(new HostAuthorization("host"));
+					destClient.authenticate(gssCred);
+					destClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
+
+					if (!destClient.exists(destPath)) {
+						destClient.makeDir(destPath);
+					}
+					break;
+				} catch (Exception e) {
+					String message = "Mkdir " + destURI + " with " + e.getMessage() + " (try " + tryCount + ") retrying at Gfac";
+					tryCount++;
+					if (tryCount >= 3) {
+						throw new GfacException(e.getMessage(), e);
+					}
+					Thread.sleep(10000);
+				}
+			}
+		} catch (ServerException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		} finally {
+			if (destClient != null)
+				try {
+					destClient.close();
+				} catch (Exception e) {
+					// no op
+				}
+		}
+	}
+
+	public String readRemoteFile(URI destURI, GSSCredential gsCredential, File localFile) throws GfacException {
+		GridFTPClient ftpClient = null;
+
+		try {
+			ContactInfo contactInfo = new ContactInfo(destURI.getHost(), destURI.getPort());
+			String remoteFile = destURI.getPath();
+
+			ftpClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
+			ftpClient.setAuthorization(new HostAuthorization("host"));
+			ftpClient.authenticate(gsCredential);
+			ftpClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
+
+			File localTempfile;
+			if (localFile == null) {
+				localTempfile = File.createTempFile("stderr", "err");
+			} else {
+				localTempfile = localFile;
+			}
+
+			System.out.println("the local temp file is " + localTempfile);
+			System.out.println("the remote file is " + remoteFile);
+
+			ftpClient.get(remoteFile, localTempfile);
+			FileInputStream instream = new FileInputStream(localTempfile);
+			int size = instream.available();
+			byte[] buf = new byte[size];
+
+			instream.read(buf);
+
+			return new String(buf);
+		} catch (ServerException e) {
+			e.printStackTrace();
+		} catch (ClientException e) {
+			e.printStackTrace();
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		} finally {
+			if (ftpClient != null)
+				try {
+					ftpClient.close();
+				} catch (Exception e) {
+					// no op
+				}
+		}
+		return null;
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/AbstractServiceFactory.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/AbstractServiceFactory.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/AbstractServiceFactory.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/AbstractServiceFactory.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,14 @@
+package org.apache.airavata.core.gfac.factory;
+
+import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.services.GenericService;
+
+public abstract class AbstractServiceFactory {
+	
+	public final GenericService createService() throws GfacException{
+		getGenericService().init();		
+		return getGenericService();
+	}
+	
+	protected abstract GenericService getGenericService() throws GfacException;
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/PropertyServiceFactory.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/PropertyServiceFactory.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/PropertyServiceFactory.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/factory/PropertyServiceFactory.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,16 @@
+package org.apache.airavata.core.gfac.factory;
+
+import org.apache.airavata.core.gfac.services.GenericService;
+import org.apache.airavata.core.gfac.services.impl.PropertiesBasedServiceImpl;
+
+public class PropertyServiceFactory extends AbstractServiceFactory {
+
+	private GenericService service;
+
+	public GenericService getGenericService(){
+		if(service == null){
+			service = new PropertiesBasedServiceImpl();
+		}
+		return service;
+	}
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/ExecutionModel.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/ExecutionModel.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/ExecutionModel.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/model/ExecutionModel.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,294 @@
+package org.apache.airavata.core.gfac.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.ogce.schemas.gfac.documents.ApplicationDescriptionType;
+import org.ogce.schemas.gfac.documents.GlobusGatekeeperType;
+import org.ogce.schemas.gfac.documents.HostDescriptionType;
+
+public class ExecutionModel {
+
+	private String jobID;
+	
+	private String userDN;
+
+	private String workingDir;
+
+	private String tmpDir;
+
+	private String stdOut;
+
+	private String stderr;
+
+	private String host;
+
+	private String executable;
+
+	private Map<String, String> env;
+
+	private String inputDataDir;
+
+	private String outputDataDir;
+
+	private String stdIn;
+
+	private String stdoutStr;
+
+	private String stderrStr;
+
+	private ArrayList<String> inputParameters;
+
+	private ArrayList<String> outputParameters;
+
+	private HostDescriptionType hostDesc;
+
+	private ApplicationDescriptionType aplicationDesc;
+
+	private GlobusGatekeeperType gatekeeper;
+
+	/**
+	 * @return the userDN
+	 */
+	public String getUserDN() {
+		return userDN;
+	}
+
+	/**
+	 * @param userDN
+	 *            the userDN to set
+	 */
+	public void setUserDN(String userDN) {
+		this.userDN = userDN;
+	}
+
+	/**
+	 * @return the workingDir
+	 */
+	public String getWorkingDir() {
+		return workingDir;
+	}
+
+	/**
+	 * @param workingDir
+	 *            the workingDir to set
+	 */
+	public void setWorkingDir(String workingDir) {
+		this.workingDir = workingDir;
+	}
+
+	/**
+	 * @return the tmpDir
+	 */
+	public String getTmpDir() {
+		return tmpDir;
+	}
+
+	/**
+	 * @param tmpDir
+	 *            the tmpDir to set
+	 */
+	public void setTmpDir(String tmpDir) {
+		this.tmpDir = tmpDir;
+	}
+
+	/**
+	 * @return the stdOut
+	 */
+	public String getStdOut() {
+		return stdOut;
+	}
+
+	/**
+	 * @param stdOut
+	 *            the stdOut to set
+	 */
+	public void setStdOut(String stdOut) {
+		this.stdOut = stdOut;
+	}
+
+	/**
+	 * @return the stderr
+	 */
+	public String getStderr() {
+		return stderr;
+	}
+
+	/**
+	 * @param stderr
+	 *            the stderr to set
+	 */
+	public void setStderr(String stderr) {
+		this.stderr = stderr;
+	}
+
+	/**
+	 * @return the host
+	 */
+	public String getHost() {
+		return host;
+	}
+
+	/**
+	 * @param host
+	 *            the host to set
+	 */
+	public void setHost(String host) {
+		this.host = host;
+	}
+
+	/**
+	 * @return the executable
+	 */
+	public String getExecutable() {
+		return executable;
+	}
+
+	/**
+	 * @param executable
+	 *            the executable to set
+	 */
+	public void setExecutable(String executable) {
+		this.executable = executable;
+	}
+
+	/**
+	 * @return the env
+	 */
+	public Map<String, String> getEnv() {
+		return env;
+	}
+
+	/**
+	 * @param env
+	 *            the env to set
+	 */
+	public void setEnv(Map<String, String> env) {
+		this.env = env;
+	}
+
+	/**
+	 * @return the inputDataDir
+	 */
+	public String getInputDataDir() {
+		return inputDataDir;
+	}
+
+	/**
+	 * @param inputDataDir
+	 *            the inputDataDir to set
+	 */
+	public void setInputDataDir(String inputDataDir) {
+		this.inputDataDir = inputDataDir;
+	}
+
+	/**
+	 * @return the outputDataDir
+	 */
+	public String getOutputDataDir() {
+		return outputDataDir;
+	}
+
+	/**
+	 * @param outputDataDir
+	 *            the outputDataDir to set
+	 */
+	public void setOutputDataDir(String outputDataDir) {
+		this.outputDataDir = outputDataDir;
+	}
+
+	/**
+	 * @return the stdIn
+	 */
+	public String getStdIn() {
+		return stdIn;
+	}
+
+	/**
+	 * @param stdIn
+	 *            the stdIn to set
+	 */
+	public void setStdIn(String stdIn) {
+		this.stdIn = stdIn;
+	}
+
+	/**
+	 * @return the stdoutStr
+	 */
+	public String getStdoutStr() {
+		return stdoutStr;
+	}
+
+	/**
+	 * @param stdoutStr
+	 *            the stdoutStr to set
+	 */
+	public void setStdoutStr(String stdoutStr) {
+		this.stdoutStr = stdoutStr;
+	}
+
+	/**
+	 * @return the stderrStr
+	 */
+	public String getStderrStr() {
+		return stderrStr;
+	}
+
+	/**
+	 * @param stderrStr
+	 *            the stderrStr to set
+	 */
+	public void setStderrStr(String stderrStr) {
+		this.stderrStr = stderrStr;
+	}
+
+	public void setInputParameters(ArrayList<String> inputParameters) {
+		this.inputParameters = inputParameters;
+	}
+
+	public ArrayList<String> getInputParameters() {
+		return inputParameters;
+	}
+
+	public void setOutputParameters(ArrayList<String> outputParameters) {
+		this.outputParameters = outputParameters;
+	}
+
+	public ArrayList<String> getOutputParameters() {
+		return outputParameters;
+	}
+
+	public void setHostDesc(HostDescriptionType hostDesc) {
+		this.hostDesc = hostDesc;
+	}
+
+	public HostDescriptionType getHostDesc() {
+		return hostDesc;
+	}
+
+	public void setGatekeeper(GlobusGatekeeperType gatekeeper) {
+		this.gatekeeper = gatekeeper;
+	}
+
+	public GlobusGatekeeperType getGatekeeper() {
+		return gatekeeper;
+	}
+
+	public void setAplicationDesc(ApplicationDescriptionType aplicationDesc) {
+		this.aplicationDesc = aplicationDesc;
+	}
+
+	public ApplicationDescriptionType getAplicationDesc() {
+		return aplicationDesc;
+	}
+
+	public void setJobID(String jobID) {
+		this.jobID = jobID;
+	}
+
+	public String getJobID() {
+		return jobID;
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/DummyNotification.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/DummyNotification.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/DummyNotification.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/DummyNotification.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,114 @@
+package org.apache.airavata.core.gfac.notification;
+
+import java.net.URI;
+
+import org.apache.airavata.core.gfac.context.MessageContext;
+import org.apache.airavata.core.gfac.exception.GfacException;
+
+import edu.indiana.extreme.lead.workflow_tracking.common.DataDurationObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DataObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DurationObj;
+
+public class DummyNotification implements NotificationService {
+
+	public DataDurationObj dataReceiveFinished(DataDurationObj dataObj, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public DataDurationObj dataReceiveStarted(URI dataID, URI remoteLocation, URI localLocation) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public DataDurationObj dataSendFinished(DataDurationObj dataObj, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public DataDurationObj dataSendStarted(DataObj dataObj, URI remoteLocation) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void dataConsumed(URI dataID, URI replica, String type, String soapElementName) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void dataProduced(URI dataID, URI replica, String type, String soapElementName) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public DurationObj computationDuration(long durationMillis) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public DurationObj computationFinished(DurationObj compObj) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public DurationObj computationStarted() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void exception(String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void flush() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void info(String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void sendingResponseFailed(Throwable trace, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void sendingResponseSucceeded(String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void sendingResult(MessageContext messageContext) throws GfacException {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void warning(String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void sendingFault(String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void publishURL(String title, String url, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void appAudit(String name, URI jobHandle, String host, String queueName, String jobId, String dName, String projectId, String rsl, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void sendResourceMappingNotifications(String hostName, String... descriptionAndAnnotation) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,56 @@
+package org.apache.airavata.core.gfac.notification;
+
+import java.net.URI;
+
+import org.apache.airavata.core.gfac.context.MessageContext;
+import org.apache.airavata.core.gfac.exception.GfacException;
+
+import edu.indiana.extreme.lead.workflow_tracking.common.DataDurationObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DataObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DurationObj;
+
+public interface NotificationService {
+
+    DataDurationObj dataReceiveFinished(DataDurationObj dataObj,
+            String... descriptionAndAnnotation);
+
+    DataDurationObj dataReceiveStarted(URI dataID, URI remoteLocation,
+            URI localLocation);
+
+    DataDurationObj dataSendFinished(DataDurationObj dataObj,
+            String... descriptionAndAnnotation);
+
+    DataDurationObj dataSendStarted(DataObj dataObj, URI remoteLocation);
+
+    void dataConsumed(URI dataID,URI replica,String type,String soapElementName);
+
+    void dataProduced(URI dataID,URI replica,String type,String soapElementName);
+
+    DurationObj computationDuration(long durationMillis);
+
+    DurationObj computationFinished(DurationObj compObj);
+
+    DurationObj computationStarted();
+
+    void exception(String... descriptionAndAnnotation);
+
+    void flush();
+
+    void info(String... descriptionAndAnnotation);
+
+    void sendingResponseFailed(Throwable trace, String... descriptionAndAnnotation);
+
+    void sendingResponseSucceeded(String... descriptionAndAnnotation);
+
+    void sendingResult(MessageContext messageContext) throws GfacException;
+
+    void warning(String... descriptionAndAnnotation);
+    
+    void sendingFault(String... descriptionAndAnnotation);
+    void publishURL(String title, String url, String... descriptionAndAnnotation);
+    
+    void appAudit(String name, URI jobHandle, String host, String queueName, String jobId, String dName, String projectId, String rsl, String... descriptionAndAnnotation);
+
+    void sendResourceMappingNotifications(String hostName, String ...descriptionAndAnnotation );
+
+}

Added: incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/AbstractProvider.java?rev=1139241&view=auto
==============================================================================
--- incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/AbstractProvider.java (added)
+++ incubator/airavata/core/trunk/gfac/src/main/java/org/apache/airavata/core/gfac/provider/AbstractProvider.java Fri Jun 24 11:01:15 2011
@@ -0,0 +1,10 @@
+package org.apache.airavata.core.gfac.provider;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public abstract class AbstractProvider implements Provider{
+	protected final Logger log = LoggerFactory.getLogger(this.getClass());
+	
+}



Mime
View raw message