You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by am...@apache.org on 2013/09/06 04:03:03 UTC

svn commit: r1520473 [2/2] - in /airavata/trunk: modules/airavata-client/src/main/java/org/apache/airavata/client/ modules/airavata-client/src/main/java/org/apache/airavata/client/api/ modules/airavata-client/src/main/java/org/apache/airavata/client/im...

Modified: airavata/trunk/samples/sample-gateway/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/pom.xml?rev=1520473&r1=1520472&r2=1520473&view=diff
==============================================================================
--- airavata/trunk/samples/sample-gateway/pom.xml (original)
+++ airavata/trunk/samples/sample-gateway/pom.xml Fri Sep  6 02:03:01 2013
@@ -51,7 +51,252 @@
             <artifactId>derbytools</artifactId>
             <version>${derby.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>xpp3</artifactId>
+            <version>${xpp3.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>xpp5</artifactId>
+            <version>${xpp5.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>xsul</artifactId>
+            <version>${xsul.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>gpel-client</artifactId>
+            <version>${gpel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>atomixmiser</artifactId>
+            <version>${atomixmiser.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.python</groupId>
+            <artifactId>jython</artifactId>
+            <version>${jython.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
+            <version>${xmlbeans.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb</artifactId>
+            <version>${axis2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+            <version>${axis2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-api</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-impl</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-dom</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.schema</groupId>
+            <artifactId>XmlSchema</artifactId>
+            <version>1.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.neethi</groupId>
+            <artifactId>neethi</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-local</artifactId>
+            <version>${axis2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-http</artifactId>
+            <version>${axis2.version}</version>
+        </dependency>
+
+        <!-- AMAZON STUFFS -->
+        <dependency>
+            <groupId>com.amazonaws</groupId>
+            <artifactId>aws-java-sdk</artifactId>
+            <version>1.3.20</version>
+        </dependency>
+        <dependency>
+            <groupId>net.java.dev.jets3t</groupId>
+            <artifactId>jets3t</artifactId>
+            <version>0.8.0</version>
+        </dependency>
+
+        <!-- AIRAVATA modules -->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-xbaya-gui</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-model-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-model-component</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-message-monitor</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-message-broker</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-tracking</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-rest-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-rest-mappings</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>json</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- JCR Support -->
+        <!-- TODO need clean up -->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-schema-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>${jcr.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-execution-context</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-jpa-registry</artifactId> <version>${project.version}</version>
+            </dependency -->
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbyclient</artifactId>
+            <version>${derby.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey.contribs</groupId>
+            <artifactId>jersey-multipart</artifactId>
+            <version>${jersey.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-xc</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-jaxrs</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+            <version>1.9.2</version>
+        </dependency>
+
     </dependencies>
+
     <build>
         <finalName>SampleGateway</finalName>
     </build>

Added: airavata/trunk/samples/sample-gateway/src/configurations/airavata-server.properties
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/configurations/airavata-server.properties?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/configurations/airavata-server.properties (added)
+++ airavata/trunk/samples/sample-gateway/src/configurations/airavata-server.properties Fri Sep  6 02:03:01 2013
@@ -0,0 +1,220 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+###########################################################################
+#
+#  This properties file provides configuration for all Airavata Services: 
+#  Registry, Workflow Interpreter, GFac, Message Broker, Message Box
+#
+###########################################################################
+
+TwoPhase=true
+
+###########################################################################
+# Airavata Embedded-Tomcat Server Configuration
+###########################################################################
+# By default, tomcat runs on port 80. If the port is changed, it will be  
+#  have to be specified with port properties. This will be picked up by 
+#  the registry service to register the service end-points.
+
+port=8080
+
+# Axis2 server automatically picks up IP address from axis configuration, 
+#  but some DHCP enables machines do not report correct ip addresses,  
+#  in which case, the IP address can be manually specified. 
+
+#ip=192.2.33.12
+
+#This property will enable https and stops http, during the url registration, https urls will be stored and
+# http urls will not get registered, because currently airavata supports only one url for each service
+#enable.https=false
+
+###########################################################################
+# Airavata Registry Configuration
+###########################################################################
+system.gateway=default
+system.user=admin
+system.password=admin
+#for derby [AiravataJPARegistry]
+registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+# MySql database configuration
+#registry.jdbc.driver=com.mysql.jdbc.Driver
+#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+registry.jdbc.user=airavata
+registry.jdbc.password=airavata
+start.derby.server.mode=true
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+validationQuery=SELECT 1 from Configuration
+jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+#for rest [RegistryClient]
+#registry.jdbc.url=http://localhost:9080/airavata-services
+
+#user defined registry accessor classes
+#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+
+runInThread=true
+provenance=true
+provenanceWriterThreadPoolSize=20
+gfac.embedded=true
+
+#
+# Security Configuration used by Airavata Generic Factory Service
+#  to interact with Computational Resources.
+#
+
+###########################################################################
+# Airavata GFac MyProxy GSI credentials to access Grid Resources.
+###########################################################################
+
+myproxy.server=myproxy.teragrid.org
+myproxy.life=3600
+# XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
+trusted.cert.location=/Users/thejaka/release-test/certificates
+
+# SSH PKI key pair is SSH based authentication is used.
+#ssh.key=/home/user/.ssh/id_rsa
+#ssh.keypass=
+#ssh.username=usernameAtHost
+
+###########################################################################
+# Airavata Message Broker Basic Configurations.
+#  the Advanced section provides detailed custom configuration properties.
+###########################################################################
+
+# Default derby database configuration
+broker.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+broker.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
+
+# Note: This database will only be used  if 'broker.storage.type=persistent' 
+#       is set in advanced properties below.
+# MySql database configuration
+#broker.jdbc.driver=com.mysql.jdbc.Driver
+#broker.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
+
+###########################################################################
+# Airavata Message Box Basic Configurations, 
+#  the Advanced section provides detailed custom configuration properties.
+###########################################################################  
+
+# Default derby database
+msgBox.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+msgBox.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
+
+# MySql database configuration
+#msgBox.jdbc.driver=com.mysql.jdbc.Driver
+#msgBox.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
+
+###########################################################################
+# Advance configuration to change service implementations
+###########################################################################
+
+#Update the server context root path if airavata server is deployed under a different context root other than axis2
+server.context-root=airavata-server
+
+
+#
+# Class which implemented HostScheduler interface. It will determine the which host to submit the request
+#
+host.scheduler=org.apache.airavata.gfac.scheduler.impl.SimpleHostScheduler
+
+
+#
+# Data Service Plugins classes
+#
+datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
+
+#
+# Pre execution Plugins classes. For example, GridFTP Input Staging
+#
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
+
+#
+# Post execution Plugins classes. For example, GridFTP Output Staging
+#
+postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
+postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
+
+#
+# Advanced Message Broker Configurations
+#
+
+#socket time out in milliseconds for sending messages. (defaults is 20000)
+broker.socket.timeout=60000
+
+broker.storage.type=persistent
+#broker.storage.type=memory
+
+#specifies wether delivery component should be started or not.
+broker.start.delivery.thread=true
+
+#fixed thread pool based delivery
+#broker.delivery.method=pcrew
+
+#dynamic thread pool based delivery
+#broker.delivery.method=parallel
+
+#single thread delivery
+broker.delivery.method=serial
+
+#number of message delivery failures before a url become black listed (default is 2)
+#broker.msg.delivery.retries=2
+
+#time period (in seconds) a url will be kept blacklisted (default is 5 seconds) 
+#consumer.expiration.time.gap=5 
+
+#maximum number of messages to be send to a one consumer/url at time. 
+#applicable if 'broker.delivery.method' is 'pcrew' . (default is 10)
+
+#sending.batch.size=10
+
+#size of the thread pool. only applicable if 'broker.delivery.method' is 'pcrew'. (default is 4)
+#sending.thread.pool.size=4
+
+#
+# Advanced Message Box Configurations
+# 
+msgBox.usedatabase=true
+messagePreservationDays=2
+messagePreservationHours=0
+messagePreservationMinutes=0
+messagePerservationIntervalDays=0
+messagePerservationIntervalHours=1
+messagePerservationIntervalMinutes=0
+
+###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
+
+class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
+registry.service.wsdl=http://localhost:${port}/${server.context-root}/services/RegistryService?wsdl
+

Added: airavata/trunk/samples/sample-gateway/src/configurations/client.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/configurations/client.xml?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/configurations/client.xml (added)
+++ airavata/trunk/samples/sample-gateway/src/configurations/client.xml Fri Sep  6 02:03:01 2013
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Licensed to the Apache Software
+	Foundation (ASF) under one or more contributor license agreements. See the
+	NOTICE file distributed with this work for additional information regarding
+	copyright ownership. The ASF licenses this file to you under the Apache License,
+	Version 2.0 (theÏ "License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+	Unless required by applicable law or agreed to in writing, software distributed
+	under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
+	OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for
+	the specific language governing permissions and limitations under the License. -->
+
+<config>
+    <client name="acs">
+        <logging
+                logFileName="../logs/oa4mp.log"
+                logName="oa4mp"
+                logSize="1000000"
+                logFileCount="2"
+                debug="true"/>
+        <id>myproxy:oa4mp,2012:/client/24c45c2eb65d93231d02d423e94d0362</id>
+        <serviceUri>https://portal.xsede.org/oauth</serviceUri>
+        <callbackUri>https://149.160.181.19:8443/airavata/callback</callbackUri>
+        <lifetime>864000</lifetime>
+        <publicKeyFile>../webapps/airavata/WEB-INF/classes/credential-store/oauth-pubkey.pem</publicKeyFile>
+        <privateKeyFile>../webapps/airavata/WEB-INF/classes/credential-store/oauth-privkey.pk8</privateKeyFile>
+    </client>
+
+    <credential-store>
+        <successUri>http://localhost:9090/SampleGateway/gateway/callback.jsp</successUri>
+        <errorUri>/credential-store/error.jsp</errorUri>
+        <redirectUri>/credential-store/show-redirect.jsp</redirectUri>
+    </credential-store>
+
+</config>

Added: airavata/trunk/samples/sample-gateway/src/configurations/oauth-privkey.pk8
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/configurations/oauth-privkey.pk8?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/configurations/oauth-privkey.pk8 (added)
+++ airavata/trunk/samples/sample-gateway/src/configurations/oauth-privkey.pk8 Fri Sep  6 02:03:01 2013
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDJAc14swfpUZOb
+T9VFGIgSGfBBnfJXcf/Pa9s6igXQBevRohJ1FdQ9y3kaLDXngVh6/xIKAgfCu10O
+7o2ZNi7K5NS37LDYehw+fzrRlOVHLOkHQ/XVvJfMENPv8emMmAkiFK1WxeITKBC8
+GkrbQGy3k7kfo8om2op7Tc0wAUZOcOrd0VQE5yUeF7ODmg7YwYgILlNSHTrK9rmz
+5WvJRwAnouAWQZxir/+Zzb9ynMK/2AraOWaHHO7V41B/JU55lqLI8DZOrLk5ZAAN
+OXEMIFAoeSyRbQMDDJ0QzMjRovuz15IaEMpn83p4q7pAwPK7UkK3yO5bWP15qiM2
+daWVJv55AgMBAAECggEAEzcZ5lTvB63lt24tTBqpP1m9bvhjZ1qdgr2jynfRUG6Q
+eYzNyOWaUYH3BLp/OK9TvwZNOimxhjsVDU1euevFE15Gu4Jj8X3S32KYQ9rBBEnV
+yP0FLjaGKFrfd8ufcPJDxT9GxsnJ79zfpKu6xjTlb7MuekjVFVvE6z6nw9QLXYog
+bdjPFgPKWynl5ALNjenZMDFgCSIvdVcjgwdOLpDuPYdfD+JBZVFg+YCXaEQKkpXZ
+AHTuDO4Zq5JuUkHr3I+MwhCvIwgImQ/yfw0Vn+kj+WIrY6lyyO58NmAA7FXefPmC
+B0IKsdWFqXDzJMm15Kn4h4IeudR55UmRSIgk17N60QKBgQDuDlvxHBUUJI/7OkFB
+/bvqF8K+11PUpOIBxhgOw/76tgX4penYGmqVDDpYBO+ae+kKfASQIp91uOJc3JeH
+itm7k6HIzHqSJFSTXkRO3KxHgkyYo8o2IWXWYPhPt93edC3AKqOUMlrNXdyfuAPx
+Nh4xCvhgOZDxrQoNldzzjaHuHQKBgQDYKIcfiQuVsjc4Opu1fn57fagrPUfNOM/p
+u5chh+mOb2GhTzDa0I4OiWz05fSho/uakYgiXE/D0oIe4S9sCTMai+pjtp1jt6sg
+ZO7QLPhj6ct1VF6VYButHOwpKS70MFcdihYOIP49Gonw/P8Xu+HY0Qhc760rjwcI
+ga/4r5zTDQKBgAgERcZd2rvd61dbg90UDWL5v94rZDBSCSZkJGVC5nBM9vCDrddQ
+NGymh8R1DhiWuadXu9OaxuHxAvZ7m0K+Q0zU0OrxL+OCA7MexpAdUFPsKGYvhdzC
+zSomA9aza25VXUEObonMFFC8K3TZfpB98RBXvTuIVMA+worolBNDnsNlAoGBAI4B
+uhvGnfy/czWWk1sd+hxJBiU6AiTZ0QW9/uDBeHfhxqMB8peeceUs9Y7CT/+tSotW
+Vrg0Kxb8Ag4lZFE2jgM/rkHJ5AZx0JPcm2PaV2jUXJz9S5IY7LXDDYdRDg7Qfzrh
+z/GCTWR5Pew7WZ8PCKW3ViYwM3UtZrJ4+NGJFZ81AoGBAIPOt5Ge30dEGLh0UUBg
+y60MUR6jcUDmIl8x88h+O97qMjf5fsVshOR+GhFKSYQdibDo3HO+sRKS6pii9v5e
+IXZD0wUr2HznpGXrAn7CmHEM7ms0TBfy4IOkewrYAhlK/yilfkmjyS8tjLlRB2Kv
+xHv7LOgh04rFHhYdztDWPj3z
+-----END PRIVATE KEY-----

Added: airavata/trunk/samples/sample-gateway/src/configurations/oauth-pubkey.pem
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/configurations/oauth-pubkey.pem?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/configurations/oauth-pubkey.pem (added)
+++ airavata/trunk/samples/sample-gateway/src/configurations/oauth-pubkey.pem Fri Sep  6 02:03:01 2013
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyQHNeLMH6VGTm0/VRRiI
+EhnwQZ3yV3H/z2vbOooF0AXr0aISdRXUPct5Giw154FYev8SCgIHwrtdDu6NmTYu
+yuTUt+yw2HocPn860ZTlRyzpB0P11byXzBDT7/HpjJgJIhStVsXiEygQvBpK20Bs
+t5O5H6PKJtqKe03NMAFGTnDq3dFUBOclHhezg5oO2MGICC5TUh06yva5s+VryUcA
+J6LgFkGcYq//mc2/cpzCv9gK2jlmhxzu1eNQfyVOeZaiyPA2Tqy5OWQADTlxDCBQ
+KHkskW0DAwydEMzI0aL7s9eSGhDKZ/N6eKu6QMDyu1JCt8juW1j9eaojNnWllSb+
+eQIDAQAB
+-----END PUBLIC KEY-----

Added: airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/ExecutionParameters.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/ExecutionParameters.java?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/ExecutionParameters.java (added)
+++ airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/ExecutionParameters.java Fri Sep  6 02:03:01 2013
@@ -0,0 +1,172 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.sample.gateway;
+
+import org.apache.airavata.schemas.gfac.JobTypeType;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/26/13
+ * Time: 10:00 AM
+ */
+
+public class ExecutionParameters {
+
+    private String hostAddress;
+    private String hostName;
+    private String gateKeeperAddress;
+    private String gridftpAddress;
+    private String projectNumber;
+
+    private String applicationName = "EchoApplication";
+    private String executableLocation = "/bin/echo";
+    private String workingDirectory = "/scratch/01437/ogce";
+
+    private String queueName = "shared";
+    private JobTypeType.Enum jobType = JobTypeType.SERIAL;
+    private int maxWallTime = 30;
+    private int maxMemory = 100;
+    private int cpuCount = 1;
+    private int maxNodeCount = 1;
+    private int maxProcessorsPerNode = 1;
+
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+
+    public String getHostAddress() {
+        return hostAddress;
+    }
+
+    public void setHostAddress(String hostAddress) {
+        this.hostAddress = hostAddress;
+    }
+
+    public String getHostName() {
+        return hostName;
+    }
+
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    public String getGateKeeperAddress() {
+        return gateKeeperAddress;
+    }
+
+    public void setGateKeeperAddress(String gateKeeperAddress) {
+        this.gateKeeperAddress = gateKeeperAddress;
+    }
+
+    public String getGridftpAddress() {
+        return gridftpAddress;
+    }
+
+    public void setGridftpAddress(String gridftpAddress) {
+        this.gridftpAddress = gridftpAddress;
+    }
+
+    public String getApplicationName() {
+        return applicationName;
+    }
+
+    public void setApplicationName(String applicationName) {
+        this.applicationName = applicationName;
+    }
+
+    public String getExecutableLocation() {
+        return executableLocation;
+    }
+
+    public void setExecutableLocation(String executableLocation) {
+        this.executableLocation = executableLocation;
+    }
+
+    public String getWorkingDirectory() {
+        return workingDirectory;
+    }
+
+    public void setWorkingDirectory(String workingDirectory) {
+        this.workingDirectory = workingDirectory;
+    }
+
+    public String getQueueName() {
+        return queueName;
+    }
+
+    public void setQueueName(String queueName) {
+        this.queueName = queueName;
+    }
+
+    public JobTypeType.Enum getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(JobTypeType.Enum jobType) {
+        this.jobType = jobType;
+    }
+
+    public int getMaxWallTime() {
+        return maxWallTime;
+    }
+
+    public void setMaxWallTime(int maxWallTime) {
+        this.maxWallTime = maxWallTime;
+    }
+
+    public int getMaxMemory() {
+        return maxMemory;
+    }
+
+    public void setMaxMemory(int maxMemory) {
+        this.maxMemory = maxMemory;
+    }
+
+    public int getCpuCount() {
+        return cpuCount;
+    }
+
+    public void setCpuCount(int cpuCount) {
+        this.cpuCount = cpuCount;
+    }
+
+    public int getMaxNodeCount() {
+        return maxNodeCount;
+    }
+
+    public void setMaxNodeCount(int maxNodeCount) {
+        this.maxNodeCount = maxNodeCount;
+    }
+
+    public int getMaxProcessorsPerNode() {
+        return maxProcessorsPerNode;
+    }
+
+    public void setMaxProcessorsPerNode(int maxProcessorsPerNode) {
+        this.maxProcessorsPerNode = maxProcessorsPerNode;
+    }
+}

Modified: airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/SampleGateway.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/SampleGateway.java?rev=1520473&r1=1520472&r2=1520473&view=diff
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/SampleGateway.java (original)
+++ airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/SampleGateway.java Fri Sep  6 02:03:01 2013
@@ -126,6 +126,10 @@ public class SampleGateway {
         return user.equals("admin");
     }
 
+    public void updateTokenId(String tokenId) {
+        this.gatewayUserStore.updateTokens(tokenId);
+    }
+
 
     public boolean authenticate(String userName, String password) {
 

Added: airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/PasswordCallbackImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/PasswordCallbackImpl.java?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/PasswordCallbackImpl.java (added)
+++ airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/PasswordCallbackImpl.java Fri Sep  6 02:03:01 2013
@@ -0,0 +1,54 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.sample.gateway.executor;
+
+import org.apache.airavata.registry.api.PasswordCallback;
+
+import java.util.Properties;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/26/13
+ * Time: 9:47 AM
+ */
+
+public class PasswordCallbackImpl implements PasswordCallback {
+
+    private Properties properties;
+
+    public PasswordCallbackImpl(Properties prop) {
+        this.properties = prop;
+    }
+
+    @Override
+    public String getPassword(String username) {
+
+        String airavataServerUser = properties.getProperty("airavata.server.user");
+        String airavataServerPassword = properties.getProperty("airavata.server.password");
+
+        if (username.equals(airavataServerUser)) {
+            return airavataServerPassword;
+        }
+
+        return null;
+    }
+}

Added: airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutor.java?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutor.java (added)
+++ airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutor.java Fri Sep  6 02:03:01 2013
@@ -0,0 +1,304 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.sample.gateway.executor;
+
+import junit.framework.Assert;
+import org.apache.airavata.client.AiravataAPIFactory;
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.ExperimentAdvanceOptions;
+import org.apache.airavata.client.api.builder.DescriptorBuilder;
+import org.apache.airavata.client.api.exception.DescriptorAlreadyExistsException;
+import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
+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.registry.api.impl.WorkflowExecutionDataImpl;
+import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.sample.gateway.ExecutionParameters;
+import org.apache.airavata.schemas.gfac.*;
+import org.apache.airavata.workflow.model.wf.Workflow;
+import org.apache.airavata.workflow.model.wf.WorkflowInput;
+import org.apache.airavata.ws.monitor.EventData;
+import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
+import org.apache.airavata.ws.monitor.EventDataRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/26/13
+ * Time: 9:21 AM
+ */
+
+public class WorkflowExecutor {
+
+    private final Logger log = LoggerFactory.getLogger(WorkflowExecutor.class);
+
+    private String airavataServerUrl;
+    private String airavataServerUser;
+
+    private PasswordCallbackImpl passwordCallback;
+
+    private String gatewayName;
+
+    public WorkflowExecutor(String gwName) throws IOException {
+        loadConfigurations();
+        this.gatewayName = gwName;
+    }
+
+    private void loadConfigurations () throws IOException {
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("gateway.properties");
+
+        Properties properties = new Properties();
+        properties.load(inputStream);
+
+        this.airavataServerUrl = properties.getProperty("airavata.server.url");
+        this.airavataServerUser = properties.getProperty("airavata.server.user");
+
+        this.passwordCallback = new PasswordCallbackImpl(properties);
+
+        log.info("Airavata server url - " + this.airavataServerUrl);
+        log.info("Airavata server user - " + this.airavataServerUser);
+        log.info("Workflow executor successfully initialized");
+
+    }
+
+
+    public String getAiravataServerUrl() {
+        return airavataServerUrl;
+    }
+
+    public String getAiravataServerUser() {
+        return airavataServerUser;
+    }
+
+    public PasswordCallbackImpl getPasswordCallback() {
+        return passwordCallback;
+    }
+
+    public String getGatewayName() {
+        return gatewayName;
+    }
+
+    public Workflow setupExperiment(ExecutionParameters executionParameters) throws Exception {
+
+        // Create airavata API
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getAiravataServerUrl()), getGatewayName(),
+                getAiravataServerUser(),
+                getPasswordCallback());
+
+        // Initialize descriptor builder
+        DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
+
+        // Create host description
+        HostDescription hostDescription = descriptorBuilder.buildHostDescription(GlobusHostType.type,
+                executionParameters.getHostName(), executionParameters.getHostAddress());
+
+        ((GlobusHostType)hostDescription.getType()).
+                setGlobusGateKeeperEndPointArray(new String[]{executionParameters.getGateKeeperAddress()});
+        ((GlobusHostType)hostDescription.getType()).
+                setGridFTPEndPointArray(new String[]{executionParameters.getGridftpAddress()}); //TODO do we really need this ?
+
+        log("Adding host description ....");
+
+        try {
+            airavataAPI.getApplicationManager().addHostDescription(hostDescription);
+        } catch (DescriptorAlreadyExistsException e) {
+            airavataAPI.getApplicationManager().updateHostDescription(hostDescription);
+        }
+
+
+        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
+        inputParameters.add(descriptorBuilder.buildInputParameterType("echo_input", "echo input", DataType.STRING));
+
+        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
+        outputParameters.add(descriptorBuilder.buildOutputParameterType("echo_output", "Echo output", DataType.STRING));
+
+        ServiceDescription serviceDescription = descriptorBuilder.buildServiceDescription("Echo", "Echo service",
+                inputParameters, outputParameters);
+
+        log("Adding service description ...");
+
+        try {
+            airavataAPI.getApplicationManager().addServiceDescription(serviceDescription);
+        } catch (DescriptorAlreadyExistsException e) {
+            airavataAPI.getApplicationManager().updateServiceDescription(serviceDescription);
+        }
+
+
+        // =========================================================================================================== //
+        // Deployment descriptor creation
+        ApplicationDescription applicationDeploymentDescription =
+                new ApplicationDescription(HpcApplicationDeploymentType.type);
+        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType
+                = applicationDeploymentDescription.getType();
+        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(executionParameters.getApplicationName());
+
+        applicationDeploymentDescriptionType.setExecutableLocation(executionParameters.getExecutableLocation());
+        applicationDeploymentDescriptionType.setScratchWorkingDirectory(executionParameters.getWorkingDirectory());
+
+        ProjectAccountType projectAccountType = ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).addNewProjectAccount();
+        projectAccountType.setProjectAccountNumber(executionParameters.getProjectNumber());
+
+        log("Adding application deployment description ...");
+
+        QueueType queueType = ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).addNewQueue();
+        queueType.setQueueName(executionParameters.getQueueName());
+
+        ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setJobType(executionParameters.getJobType());
+        ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setMaxWallTime(executionParameters.getMaxWallTime());
+        //((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setMaxMemory(executionParameters.getMaxMemory());
+        ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setCpuCount(executionParameters.getCpuCount());
+        ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setNodeCount(executionParameters.getMaxNodeCount());
+        ((HpcApplicationDeploymentType) applicationDeploymentDescriptionType).setProcessorsPerNode(executionParameters.getMaxProcessorsPerNode());
+
+        try {
+            airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription, hostDescription,
+                    applicationDeploymentDescription);
+        } catch (DescriptorAlreadyExistsException e) {
+            airavataAPI.getApplicationManager().updateApplicationDescription(serviceDescription, hostDescription,
+                    applicationDeploymentDescription);
+        }
+
+
+
+
+
+        // =========================================================================================================== //
+
+
+        log("Saving workflow ...");
+        Workflow workflow = new Workflow(getWorkflowComposeContent());
+
+        try {
+            airavataAPI.getWorkflowManager().addWorkflow(workflow);
+        } catch (WorkflowAlreadyExistsException e) {
+            airavataAPI.getWorkflowManager().updateWorkflow(workflow);
+        }
+
+        log("Workflow setting up completed ...");
+
+        return workflow;
+
+    }
+
+    protected String getWorkflowComposeContent() throws IOException {
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("EchoWorkflow.xwf");
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+        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();
+    }
+
+    public String runWorkflow (Workflow workflow, List<String> inputValues, String tokenId, String portalUser) throws Exception {
+
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getAiravataServerUrl()), getGatewayName(), getAiravataServerUser(),
+                this.getPasswordCallback());
+
+        // Set inputs
+        List<WorkflowInput> workflowInputs = airavataAPI.getWorkflowManager().getWorkflowInputs(workflow.getName());
+
+        int i = 0;
+        for (String valueString : inputValues) {
+            workflowInputs.get(i).setValue(valueString);
+            ++i;
+        }
+
+        String workflowName = workflow.getName();
+        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
+                workflowName, getAiravataServerUser(), null);
+
+
+        //========================= Setting token id =========================//
+
+        if (tokenId != null) {
+            log("Setting token id to " + tokenId);
+            options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId(tokenId);
+            options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setPortalUser(portalUser);
+            options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setGatewayId(getGatewayName());
+        } else {
+            log("Token id is not set ....");
+        }
+
+        //====================================================================//
+
+
+        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options,
+                new EventDataListenerAdapter() {
+                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
+                        // do nothing
+                    }
+                });
+
+        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
+
+        log.info("Run workflow completed ....");
+
+        return getWorkflowOutput(experimentId, airavataAPI);
+
+    }
+
+    public String runWorkflow (Workflow workflow, List<String> inputValues) throws Exception {
+
+        return runWorkflow(workflow, inputValues, null, null);
+
+    }
+
+    protected String getWorkflowOutput(String experimentId, AiravataAPI airavataAPI) throws Exception {
+
+        log.info("Experiment ID Returned : " + experimentId);
+
+        ExperimentData experimentData = airavataAPI.getProvenanceManager().getExperimentData(experimentId);
+
+        log.info("Verifying output ...");
+
+        List<NodeExecutionData> nodeExecutionDataList = experimentData.getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
+
+        for (NodeExecutionData nodeExecutionData : nodeExecutionDataList) {
+            return nodeExecutionData.getOutputData().get(0).getValue();
+        }
+
+        throw new Exception("Experiment did not generate any output");
+    }
+
+    protected void log(String message) {
+        log.info(message);
+    }
+
+
+
+
+}

Modified: airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/userstore/GatewayUserStore.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/userstore/GatewayUserStore.java?rev=1520473&r1=1520472&r2=1520473&view=diff
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/userstore/GatewayUserStore.java (original)
+++ airavata/trunk/samples/sample-gateway/src/main/java/org/apache/airavata/sample/gateway/userstore/GatewayUserStore.java Fri Sep  6 02:03:01 2013
@@ -126,6 +126,39 @@ public class GatewayUserStore {
 
     }
 
+    public void updateTokens (String token) {
+
+        String sql = "update Users set token_id = ?";
+
+        Connection connection = null;
+        PreparedStatement preparedStatement = null;
+
+        try {
+            connection = dbUtil.getConnection();
+            preparedStatement = connection.prepareStatement(sql);
+
+            preparedStatement.setString(1, token);
+
+            preparedStatement.executeUpdate();
+
+            connection.commit();
+
+            log.debug("Users successfully updated to use token - " + token);
+
+        } catch (SQLException e) {
+            StringBuilder stringBuilder = new StringBuilder("Error updating token data.");
+            stringBuilder.append(" token - ").append(token);
+
+            log.error(stringBuilder.toString(), e);
+
+            throw new RuntimeException(stringBuilder.toString(), e);
+        } finally {
+
+            dbUtil.cleanup(preparedStatement, connection);
+        }
+
+    }
+
     public String getPassword(String userName, Connection connection) {
 
         String sql = "select password from Users where user_name = ?";

Added: airavata/trunk/samples/sample-gateway/src/main/resources/EchoWorkflow.xwf
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/resources/EchoWorkflow.xwf?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/resources/EchoWorkflow.xwf (added)
+++ airavata/trunk/samples/sample-gateway/src/main/resources/EchoWorkflow.xwf Fri Sep  6 02:03:01 2013
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+	the Apache License, Version 2.0 (theÏ "License"); you may not use this file except in compliance with the License. You may
+	obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+	in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+	ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+	the License. -->
+
+<xwf:workflow xwf:version="0.5" xmlns:xwf="http://airavata.apache.org/xbaya/xwf">
+  <xgr:graph xgr:version="0.5" xgr:type="ws" xmlns:xgr="http://airavata.apache.org/xbaya/graph">
+    <xgr:id>Echo</xgr:id>
+    <xgr:name>Echo</xgr:name>
+    <xgr:description></xgr:description>
+    <xgr:metadata>
+      <appinfo xmlns="http://www.w3.org/2001/XMLSchema">
+
+</appinfo>
+    </xgr:metadata>
+    <xgr:node xgr:type="ws">
+      <xgr:id>Echo_invoke</xgr:id>
+      <xgr:name>Echo:invoke</xgr:name>
+      <xgr:outputPort>Echo_invoke_out_0</xgr:outputPort>
+      <xgr:inputPort>Echo_invoke_in_0</xgr:inputPort>
+      <xgr:controlInPort>Echo_invoke_ctrl_in_0</xgr:controlInPort>
+      <xgr:controlOutPort>Echo_invoke_ctrl_out_0</xgr:controlOutPort>
+      <xgr:x>278</xgr:x>
+      <xgr:y>123</xgr:y>
+      <xgr:wsdl>Echo</xgr:wsdl>
+      <xgr:portType>{http://airavata.apache.org/schemas/gfac/2012/12}Echo</xgr:portType>
+      <xgr:operation>invoke</xgr:operation>
+    </xgr:node>
+    <xgr:node xgr:type="input">
+      <xgr:id>echo_input</xgr:id>
+      <xgr:name>echo_input</xgr:name>
+      <xgr:outputPort>Input_out_2</xgr:outputPort>
+      <xgr:x>151</xgr:x>
+      <xgr:y>103</xgr:y>
+      <xgr:config>
+        <xgr:description></xgr:description>
+        <xgr:dataType>{http://airavata.apache.org/schemas/gfac/2012/12}StringParameterType</xgr:dataType>
+        <xgr:visibility>true</xgr:visibility>
+      </xgr:config>
+    </xgr:node>
+    <xgr:node xgr:type="output">
+      <xgr:id>echo_output</xgr:id>
+      <xgr:name>echo_output</xgr:name>
+      <xgr:inputPort>Output_in_2</xgr:inputPort>
+      <xgr:x>510</xgr:x>
+      <xgr:y>125</xgr:y>
+      <xgr:config>
+        <xgr:description></xgr:description>
+        <xgr:dataType>{http://airavata.apache.org/schemas/gfac/2012/12}StringParameterType</xgr:dataType>
+      </xgr:config>
+    </xgr:node>
+    <xgr:port xgr:type="ws">
+      <xgr:id>Echo_invoke_in_0</xgr:id>
+      <xgr:name>echo_input</xgr:name>
+      <xgr:node>Echo_invoke</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="ws">
+      <xgr:id>Echo_invoke_out_0</xgr:id>
+      <xgr:name>echo_output</xgr:name>
+      <xgr:node>Echo_invoke</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>Echo_invoke_ctrl_in_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>Echo_invoke</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>Echo_invoke_ctrl_out_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>Echo_invoke</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="systemData">
+      <xgr:id>Input_out_2</xgr:id>
+      <xgr:name>Parameter</xgr:name>
+      <xgr:node>echo_input</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="systemData">
+      <xgr:id>Output_in_2</xgr:id>
+      <xgr:name>Parameter</xgr:name>
+      <xgr:node>echo_output</xgr:node>
+    </xgr:port>
+    <xgr:edge xgr:type="data">
+      <xgr:fromPort>Input_out_2</xgr:fromPort>
+      <xgr:toPort>Echo_invoke_in_0</xgr:toPort>
+    </xgr:edge>
+    <xgr:edge xgr:type="data">
+      <xgr:fromPort>Echo_invoke_out_0</xgr:fromPort>
+      <xgr:toPort>Output_in_2</xgr:toPort>
+    </xgr:edge>
+  </xgr:graph>
+  <xwf:wsdls>
+    <xwf:wsdl xwf:id="Echo">&lt;wsdl:definitions name="Echo" targetNamespace="http://airavata.apache.org/schemas/gfac/2012/12"
+  xmlns:typens="http://airavata.apache.org/schemas/gfac/2012/12/Echo/xsd" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:globalTypens="http://airavata.apache.org/schemas/gfac/2012/12/xsd"
+  xmlns:wsdlns="http://airavata.apache.org/schemas/gfac/2012/12" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:gfac="http://airavata.apache.org/schemas/gfac/2012/12" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  &lt;wsdl:types>
+    &lt;schema elementFormDefault="unqualified" targetNamespace="http://airavata.apache.org/schemas/gfac/2012/12/Echo/xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+      &lt;import namespace="http://airavata.apache.org/schemas/gfac/2012/12" schemaLocation="http://airavata.apache.org/schemas/gfac/2012/12/GFacParameterTypes.xsd" />
+      &lt;element name="invoke_InputParams" type="typens:invoke_InputParamsType" />
+      &lt;complexType name="invoke_InputParamsType">
+        &lt;sequence>
+          &lt;element name="echo_input" type="gfac:StringParameterType">
+            &lt;annotation>
+              &lt;documentation />
+            &lt;/annotation>
+          &lt;/element>
+        &lt;/sequence>
+      &lt;/complexType>
+      &lt;element name="invoke_OutputParams" type="typens:invoke_OutputParamsType" />
+      &lt;complexType name="invoke_OutputParamsType">
+        &lt;sequence>
+          &lt;element name="echo_output" type="gfac:StringParameterType">
+            &lt;annotation>
+              &lt;documentation />
+            &lt;/annotation>
+          &lt;/element>
+        &lt;/sequence>
+      &lt;/complexType>
+    &lt;/schema>
+  &lt;/wsdl:types>
+  &lt;wsdl:message name="invoke_ResponseMessage_504bca7e-4bb2-4432-84bc-f5f21f77ac76">
+    &lt;wsdl:part name="parameters" element="typens:invoke_OutputParams">
+    &lt;/wsdl:part>
+  &lt;/wsdl:message>
+  &lt;wsdl:message name="invoke_RequestMessage_ebe74610-34d1-4a31-8e00-84c2b2219843">
+    &lt;wsdl:part name="parameters" element="typens:invoke_InputParams">
+    &lt;/wsdl:part>
+  &lt;/wsdl:message>
+  &lt;wsdl:portType name="Echo">
+&lt;wsdl:documentation />
+    &lt;wsdl:operation name="invoke">
+&lt;wsdl:documentation />
+      &lt;wsdl:input name="invoke_RequestMessage_ebe74610-34d1-4a31-8e00-84c2b2219843" message="wsdlns:invoke_RequestMessage_ebe74610-34d1-4a31-8e00-84c2b2219843">
+    &lt;/wsdl:input>
+      &lt;wsdl:output name="invoke_ResponseMessage_504bca7e-4bb2-4432-84bc-f5f21f77ac76" message="wsdlns:invoke_ResponseMessage_504bca7e-4bb2-4432-84bc-f5f21f77ac76">
+    &lt;/wsdl:output>
+    &lt;/wsdl:operation>
+  &lt;/wsdl:portType>
+&lt;/wsdl:definitions></xwf:wsdl>
+  </xwf:wsdls>
+  <xwf:image>iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mN49Ojef2Iww6hC+ioE
+AJr2avQ9sXYrAAAAAElFTkSuQmCC
+</xwf:image>
+</xwf:workflow>
\ No newline at end of file

Added: airavata/trunk/samples/sample-gateway/src/main/resources/airavata-client.properties
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/resources/airavata-client.properties?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/resources/airavata-client.properties (added)
+++ airavata/trunk/samples/sample-gateway/src/main/resources/airavata-client.properties Fri Sep  6 02:03:01 2013
@@ -0,0 +1,69 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+###########################################################################
+#
+#  This properties file provides configuration for Airavata Clients: 
+#  XBaya and Airavata API
+#
+###########################################################################
+
+###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
+
+#class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
+
+###---------------------REGISTRY API IMPLEMENTATION - CUSTOM SETTINGS----------------------###
+
+#for mysql [AiravataJPARegistry]
+#registry.jdbc.driver=com.mysql.jdbc.Driver
+#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+
+#for derby [AiravataJPARegistry]
+registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+registry.jdbc.user=airavata
+registry.jdbc.password=airavata
+start.derby.server.mode=true
+validationQuery=SELECT 1 from Configuration
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+
+#for xbaya
+xbaya.registry.user=admin
+xbaya.registry.url=http://localhost:8080/airavata/services/registry
+xbaya.default.gateway=default
+
+trust.store=aiaravata.jks
+trust.store.password=airavata
+
+#user defined registry accessor classes
+#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+# To make JPA accessor work you need to add OpenJPA jars and uncomment jpa.connection.properties
+#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000
+
+#registry.service.wsdl=http://localhost:8080/airavata-server/services/RegistryService?wsdl

Added: airavata/trunk/samples/sample-gateway/src/main/resources/gateway.properties
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/resources/gateway.properties?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/resources/gateway.properties (added)
+++ airavata/trunk/samples/sample-gateway/src/main/resources/gateway.properties Fri Sep  6 02:03:01 2013
@@ -0,0 +1,3 @@
+airavata.server.url=http://localhost:8080/airavata/services/registry
+airavata.server.user=admin
+airavata.server.password=admin

Modified: airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/acs.jsp
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/acs.jsp?rev=1520473&r1=1520472&r2=1520473&view=diff
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/acs.jsp (original)
+++ airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/acs.jsp Fri Sep  6 02:03:01 2013
@@ -31,20 +31,20 @@
 <body>
 <h2>Sample Gateway</h2>
 <p>This demonstrates how portal can use Credential Store to obtain community credentials ...</p>
-<form name="input" action="https://localhost:8443/airavata-registry/credential-store" method="post">
+<form name="input" action="https://localhost:8443/airavata/acs-start-servlet" method="post">
 
     <table border="0">
         <tr>
             <td>Gateway Name</td>
-            <td><input type="text" name="gatewayName" value="sampleGateway" disabled="true"></td>
+            <td><input type="text" name="gatewayName"></td>
         </tr>
         <tr>
             <td>Portal Username</td>
-            <td><input type="text" name="portalUserName" value="admin" disabled="true"></td>
+            <td><input type="text" name="portalUserName"></td>
         </tr>
         <tr>
             <td>Contact Email</td>
-            <td><input type="text" name="email" value="admin@samplegateway.org" disabled="true"></td>
+            <td><input type="text" name="email"></td>
         </tr>
     </table>
 

Added: airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/callback.jsp
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/callback.jsp?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/callback.jsp (added)
+++ airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/callback.jsp Fri Sep  6 02:03:01 2013
@@ -0,0 +1,73 @@
+<%@ page import="org.apache.airavata.sample.gateway.SampleGateway" %>
+<%--
+  Created by IntelliJ IDEA.
+  User: thejaka
+  Date: 8/5/13
+  Time: 4:48 PM
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%
+    SampleGateway sampleGateway = (SampleGateway)session.getAttribute(SampleGateway.GATEWAY_SESSION);
+
+    boolean success = false;
+
+    String tokenId = request.getParameter("tokenId");
+
+    if (tokenId != null) {
+        sampleGateway.updateTokenId(tokenId);
+        success = true;
+    }
+%>
+
+<html>
+<body>
+<h2>Sample Gateway</h2>
+<%
+    out.println("The received token id - ");
+    out.println(tokenId);
+
+    if (success) {
+%>
+<p>Token id successfully updated.</p>
+
+<p>
+    View users who obtained token id.
+<ol>
+    <li><a href="list_users.jsp">List Users</a></li>
+</ol>
+</p>
+
+<%
+    } else {
+
+%>
+<p> Error updating token id.</p>
+<%
+
+    }
+
+%>
+
+
+</body>
+</html>

Added: airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/job.jsp
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/job.jsp?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/job.jsp (added)
+++ airavata/trunk/samples/sample-gateway/src/main/webapp/gateway/job.jsp Fri Sep  6 02:03:01 2013
@@ -0,0 +1,8 @@
+<html>
+<body>
+<h2>Sample Gateway</h2>
+
+<p>Execute a Workflow.</p>
+
+</body>
+</html>
\ No newline at end of file

Added: airavata/trunk/samples/sample-gateway/src/test/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutorTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/samples/sample-gateway/src/test/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutorTest.java?rev=1520473&view=auto
==============================================================================
--- airavata/trunk/samples/sample-gateway/src/test/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutorTest.java (added)
+++ airavata/trunk/samples/sample-gateway/src/test/java/org/apache/airavata/sample/gateway/executor/WorkflowExecutorTest.java Fri Sep  6 02:03:01 2013
@@ -0,0 +1,140 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.sample.gateway.executor;
+
+import org.apache.airavata.sample.gateway.ExecutionParameters;
+import org.apache.airavata.workflow.model.wf.Workflow;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/27/13
+ * Time: 3:34 PM
+ */
+
+
+public class WorkflowExecutorTest {
+
+    //@Test
+    public void testRunWorkflowTrestlesOGCE() throws Exception {
+
+        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
+        ExecutionParameters executionParameters = getTrestlesOGCEParameters();
+
+        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
+        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));
+
+        System.out.println("sadsd");
+
+    }
+
+    //@Test
+    public void testRunWorkflowStampedeOGCE() throws Exception {
+
+        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
+        ExecutionParameters executionParameters = getStampedeOGCEParameters();
+
+        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
+        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));
+
+        System.out.println("sadsd");
+
+    }
+
+    //@Test
+    public void testRunWorkflowStampedeUS3() throws Exception {
+
+        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
+        ExecutionParameters executionParameters = getStampedeUS3Parameters();
+
+        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
+        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));
+
+    }
+
+    //@Test
+    public void testRunWorkflowStampedeUS3WithToken() throws Exception {
+
+        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
+        ExecutionParameters executionParameters = getStampedeUS3Parameters();
+
+        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
+        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"),
+                "a70b5c63-48d8-4a34-9b9a-d77f74894fb8X", "bunny");
+
+    }
+
+    private WorkflowExecutor getSampleGatewayExecutor() throws IOException {
+        return new WorkflowExecutor("default");
+    }
+
+    private ExecutionParameters getStampedeUS3Parameters() {
+
+        ExecutionParameters executionParameters = new ExecutionParameters();
+
+        executionParameters.setHostAddress("stampede.tacc.utexas.edu");
+        executionParameters.setHostName("stampede");
+        executionParameters.setGateKeeperAddress("login5.stampede.tacc.utexas.edu:2119/jobmanager-slurm3");
+        executionParameters.setGridftpAddress("gsiftp://data1.stampede.tacc.utexas.edu:2811/");
+        executionParameters.setProjectNumber("TG-MCB070039N");
+        executionParameters.setQueueName("normal");
+        executionParameters.setWorkingDirectory("/scratch/01623/us3");
+
+        return executionParameters;
+
+    }
+
+    private ExecutionParameters getStampedeOGCEParameters() {
+
+        ExecutionParameters executionParameters = new ExecutionParameters();
+
+        executionParameters.setHostAddress("stampede.tacc.utexas.edu");
+        executionParameters.setHostName("stampede");
+        executionParameters.setGateKeeperAddress("login5.stampede.tacc.utexas.edu:2119/jobmanager-slurm");
+        executionParameters.setGridftpAddress("gsiftp://data1.stampede.tacc.utexas.edu:2811/");
+        executionParameters.setProjectNumber("TG-STA110014S");
+        executionParameters.setQueueName("normal");
+        executionParameters.setWorkingDirectory("/scratch/01437/ogce");
+
+        return executionParameters;
+
+    }
+
+    private ExecutionParameters getTrestlesOGCEParameters() {
+
+        ExecutionParameters executionParameters = new ExecutionParameters();
+        executionParameters.setHostAddress("trestles.sdsc.edu");
+        executionParameters.setHostName("trestles");
+        executionParameters.setGateKeeperAddress("trestles-login2.sdsc.edu:2119/jobmanager-pbstest2");
+        executionParameters.setGridftpAddress("gsiftp://trestles-dm1.sdsc.edu:2811");
+        executionParameters.setProjectNumber("sds128");
+        executionParameters.setQueueName("shared");
+        executionParameters.setWorkingDirectory("/home/ogce/scratch");
+
+        return executionParameters;
+
+    }
+}