airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1520104 - in /airavata/sandbox/api-mock: airavata-mock-core/ airavata-mock-core/src/ airavata-mock-core/src/main/ airavata-mock-core/src/main/java/ airavata-mock-core/src/main/java/org/ airavata-mock-core/src/main/java/org/apache/ airavata...
Date Wed, 04 Sep 2013 18:42:56 GMT
Author: samindaw
Date: Wed Sep  4 18:42:54 2013
New Revision: 1520104

URL: http://svn.apache.org/r1520104
Log:
mock server initial dump

Added:
    airavata/sandbox/api-mock/airavata-mock-core/
    airavata/sandbox/api-mock/airavata-mock-core/pom.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-core/src/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationDescriptor.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationParameter.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ExperimentData.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/LocalApplicationDescriptor.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ParameterType.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/WorkflowInput.java
    airavata/sandbox/api-mock/airavata-mock-core/src/main/resources/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF   (with props)
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/lib/
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/
    airavata/sandbox/api-mock/airavata-mock-service-utils/
    airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/ServiceUtils.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/HelpData.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/MethodUtils.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/ConversionUtils.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/ApplicationDescriptorJSONFacotry.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/DataList.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/JSONObjectFactory.java
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/resources/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF   (with props)
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/lib/
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/pom.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/src/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ExperimentService.java
    airavata/sandbox/api-mock/airavata-mock-service/src/main/resources/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/lib/
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml   (with props)
    airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp   (with props)

Added: airavata/sandbox/api-mock/airavata-mock-core/pom.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/pom.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/pom.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/pom.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,75 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.apache.airavata</groupId>
+	<artifactId>airavata-mock-core</artifactId>
+	<packaging>jar</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>${artifactId}</name>
+
+	<repositories>
+		<!--These are needed for Jersey -->
+		<repository>
+			<id>maven2-repository.dev.java.net</id>
+			<name>Java.net Repository for Maven</name>
+			<url>http://download.java.net/maven/2/</url>
+			<layout>default</layout>
+		</repository>
+		<repository>
+			<id>maven-repository.dev.java.net</id>
+			<name>Java.net Maven 1 Repository (legacy)</name>
+			<url>http://download.java.net/maven/1</url>
+			<layout>legacy</layout>
+		</repository>
+	</repositories>
+
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.2</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-server</artifactId>
+			<version>1.4</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-json</artifactId>
+			<version>1.8</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<finalName>orders-server-example</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<inherited>true</inherited>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>maven-jetty-plugin</artifactId>
+				<version>6.1.22</version>
+				<configuration>
+					<connectors>
+						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+							<port>9090</port>
+							<maxIdleTime>60000</maxIdleTime>
+						</connector>
+					</connectors>
+					<jetty-config>jetty.xml</jetty-config>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Propchange: airavata/sandbox/api-mock/airavata-mock-core/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationDescriptor.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationDescriptor.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationDescriptor.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,35 @@
+package org.apache.airavata.core.application;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class ApplicationDescriptor {
+	private String applicationName;
+	private List<ApplicationParameter> inputs;
+	private List<ApplicationParameter> outputs;
+	
+	public String getApplicationName() {
+		return applicationName;
+	}
+	public void setApplicationName(String applicationName) {
+		this.applicationName = applicationName;
+	}
+	public List<ApplicationParameter> getInputs() {
+		if (inputs==null){
+			inputs=new ArrayList<ApplicationParameter>();
+		}
+		return inputs;
+	}
+	public void setInputs(List<ApplicationParameter> inputs) {
+		this.inputs = inputs;
+	}
+	public List<ApplicationParameter> getOutputs() {
+		if (outputs==null){
+			outputs=new ArrayList<ApplicationParameter>();
+		}
+		return outputs;
+	}
+	public void setOutputs(List<ApplicationParameter> outputs) {
+		this.outputs = outputs;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationParameter.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationParameter.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationParameter.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ApplicationParameter.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,40 @@
+package org.apache.airavata.core.application;
+
+public class ApplicationParameter {
+	private String name;
+	private String value;
+	private ParameterType type;
+	
+	public ApplicationParameter() {
+	}
+	
+	public ApplicationParameter(String name, String value, ParameterType type) {
+		setName(name);
+		setValue(value);
+		setType(type);
+	}
+	
+	public String getName(){
+		return name;
+	}
+	
+	public void setName(String name){
+		this.name=name;
+	}
+	
+	public String getValue(){
+		return value;
+	}
+	
+	public void setValue(String value){
+		this.value=value;
+	}
+	
+	public ParameterType getType(){
+		return type;
+	}
+	
+	public void setType(ParameterType type){
+		this.type=type;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ExperimentData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ExperimentData.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ExperimentData.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ExperimentData.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,55 @@
+package org.apache.airavata.core.application;
+
+import java.util.Date;
+
+public class ExperimentData {
+	private String experimentId;
+	private String experimentTemplateId;
+	private Date submissionDate;
+	private String data;
+	private String inputData;
+	public ExperimentData() {
+	}
+	
+	public ExperimentData(String experimentId, String experimentTemplateId,
+			Date submissionDate, String data, String inputData) {
+		this.experimentId = experimentId;
+		this.experimentTemplateId = experimentTemplateId;
+		this.submissionDate = submissionDate;
+		this.data = data;
+		this.inputData = inputData;
+	}
+
+	public String getExperimentId() {
+		return experimentId;
+	}
+	public void setExperimentId(String experimentId) {
+		this.experimentId = experimentId;
+	}
+	public String getExperimentTemplateId() {
+		return experimentTemplateId;
+	}
+	public void setExperimentTemplateId(String experimentTemplateId) {
+		this.experimentTemplateId = experimentTemplateId;
+	}
+	public Date getSubmissionDate() {
+		return submissionDate;
+	}
+	public void setSubmissionDate(Date submissionDate) {
+		this.submissionDate = submissionDate;
+	}
+	public String getData() {
+		return data;
+	}
+	public void setData(String data) {
+		this.data = data;
+	}
+
+	public String getInputData() {
+		return inputData;
+	}
+
+	public void setInputData(String inputData) {
+		this.inputData = inputData;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/LocalApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/LocalApplicationDescriptor.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/LocalApplicationDescriptor.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/LocalApplicationDescriptor.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,18 @@
+package org.apache.airavata.core.application;
+
+public class LocalApplicationDescriptor extends ApplicationDescriptor {
+	private String executablePath;
+	private String scratchLocation;
+	public String getExecutablePath() {
+		return executablePath;
+	}
+	public void setExecutablePath(String executablePath) {
+		this.executablePath = executablePath;
+	}
+	public String getScratchLocation() {
+		return scratchLocation;
+	}
+	public void setScratchLocation(String scratchLocation) {
+		this.scratchLocation = scratchLocation;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ParameterType.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ParameterType.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ParameterType.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/ParameterType.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,8 @@
+package org.apache.airavata.core.application;
+
+public enum ParameterType {
+	STRING,
+	INTEGER;
+}
+
+

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/WorkflowInput.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/WorkflowInput.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/WorkflowInput.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/java/org/apache/airavata/core/application/WorkflowInput.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,18 @@
+package org.apache.airavata.core.application;
+
+public class WorkflowInput {
+	private String name;
+	private String value;
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getValue() {
+		return value;
+	}
+	public void setValue(String value) {
+		this.value = value;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF Wed Sep  4 18:42:54 2013
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Propchange: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,23 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+   <display-name>Archetype Created Web Application</display-name>
+  
+   <servlet>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+      <init-param>
+         <param-name>com.sun.jersey.config.property.packages</param-name>         
+         <param-value>com.joejag.code.orders.restservices</param-value>
+      </init-param>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+   
+   <servlet-mapping>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <url-pattern>/*</url-pattern>
+   </servlet-mapping>
+   
+</web-app>

Propchange: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp (added)
+++ airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp Wed Sep  4 18:42:54 2013
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: airavata/sandbox/api-mock/airavata-mock-core/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,79 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.apache.airavata</groupId>
+	<artifactId>airavata-mock-service-utils</artifactId>
+	<packaging>jar</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>${artifactId}</name>
+
+	<repositories>
+		<!--These are needed for Jersey -->
+		<repository>
+			<id>maven2-repository.dev.java.net</id>
+			<name>Java.net Repository for Maven</name>
+			<url>http://download.java.net/maven/2/</url>
+			<layout>default</layout>
+		</repository>
+		<repository>
+			<id>maven-repository.dev.java.net</id>
+			<name>Java.net Maven 1 Repository (legacy)</name>
+			<url>http://download.java.net/maven/1</url>
+			<layout>legacy</layout>
+		</repository>
+	</repositories>
+
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.2</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-server</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-json</artifactId>
+			<version>1.8</version>
+		</dependency>      
+		<dependency>
+			<groupId>org.apache.airavata</groupId>
+			<artifactId>airavata-mock-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>  
+	</dependencies>
+
+	<build>
+		<finalName>orders-server-example</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<inherited>true</inherited>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>maven-jetty-plugin</artifactId>
+				<version>6.1.22</version>
+				<configuration>
+					<connectors>
+						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+							<port>9090</port>
+							<maxIdleTime>60000</maxIdleTime>
+						</connector>
+					</connectors>
+					<jetty-config>jetty.xml</jetty-config>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Propchange: airavata/sandbox/api-mock/airavata-mock-service-utils/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/ServiceUtils.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/ServiceUtils.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/ServiceUtils.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/ServiceUtils.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,36 @@
+package org.apache.airavata.service.utils;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.airavata.service.utils.model.DataList;
+
+public class ServiceUtils {
+	public static DataList WrapList(List<String> list){
+		DataList dataList = new DataList();
+		dataList.setList(list);
+		return dataList;
+	}
+	
+	public static URI getServiceOperationURIFromHelpURI(UriInfo uriInfo) throws URISyntaxException {
+		String p = uriInfo.getAbsolutePath().getPath();
+		if (p.endsWith("/")){
+			p=p.substring(0,p.length()-1);
+		}
+		if (p.startsWith("/")){
+			p=p.substring(1);
+		}
+		String[] pathSegments = p.split("/");
+		String path="";
+		for (int i = 0; i < pathSegments.length-1; i++) {
+			path+="/"+pathSegments[i];
+		}
+		URI u = uriInfo.getBaseUri();
+		URI uri = new URI(u.getScheme(),u.getUserInfo(),u.getHost(),u.getPort(),path,null,null);
+		return uri;
+	}
+	
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/HelpData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/HelpData.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/HelpData.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/HelpData.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,67 @@
+package org.apache.airavata.service.utils.help;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class HelpData {
+	private String title;
+	private String description;
+	private String syntax;
+	private Map<String,String> parameters;
+	private List<String> examples;
+	private List<String> notes;
+	public HelpData(String tile, String description) {
+		setTitle(tile);
+		setDescription(description);
+	}
+	
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public String getDescription() {
+		return description;
+	}
+	public void setDescription(String description) {
+		this.description = description;
+	}
+	public String getSyntax() {
+		return syntax;
+	}
+	public void setSyntax(String syntax) {
+		this.syntax = syntax;
+	}
+	public Map<String, String> getParameters() {
+		if (parameters==null){
+			parameters=new HashMap<String, String>();
+		}
+		return parameters;
+	}
+	public void setParameters(Map<String, String> parameters) {
+		this.parameters = parameters;
+	}
+	public List<String> getExamples() {
+		if (examples==null){
+			examples=new ArrayList<String>();
+		}
+		return examples;
+	}
+	public void setExamples(List<String> examples) {
+		this.examples = examples;
+	}
+
+	public List<String> getNotes() {
+		if (notes==null){
+			notes=new ArrayList<String>();
+		}
+		return notes;
+	}
+
+	public void setNotes(List<String> notes) {
+		this.notes = notes;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/MethodUtils.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/MethodUtils.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/MethodUtils.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/help/MethodUtils.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,33 @@
+package org.apache.airavata.service.utils.help;
+
+
+public class MethodUtils {
+	public static String getHelpString(HelpData data){
+		String help=data.getTitle()+"\n\n";
+		help+="Usage: "+data.getDescription()+"\n\n";
+		if (data.getSyntax()!=null){
+			help+="Syntax:\n\t"+data.getSyntax();
+		}
+		help+="\n\n";
+		help+="Parameters\n\n";
+		for (String parameterName : data.getParameters().keySet()) {
+			help+=parameterName+"\t\t"+data.getParameters().get(parameterName)+"\n";
+		} 
+		help+="\n";
+		if (data.getExamples().size()>0){
+			help+="Examples:\n";
+			for (String example : data.getExamples()) {
+				help+="\t"+example+"\n";
+			}
+			help+="\n";
+		}
+		if (data.getNotes().size()>0){
+			help+="Notes:\n";
+			for (String note : data.getNotes()) {
+				help+=note+"\n";
+			}
+		}
+			
+		return help;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/ConversionUtils.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/ConversionUtils.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/ConversionUtils.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/json/ConversionUtils.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,49 @@
+package org.apache.airavata.service.utils.json;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+public class ConversionUtils {
+	@SuppressWarnings("unchecked")
+	public static <T> T getJavaObject(String jsonString,
+			List<Class<?>> referenceClasses, Class<?> T) throws Exception {
+		Object obj = getJavaObject(jsonString, referenceClasses);
+		try {
+			T.cast(obj);
+			return (T)obj;
+		} catch (ClassCastException e) {
+			throw new Exception("Object is not of the type "+T.getCanonicalName());
+		}
+	}
+
+	public static String getJSONString(Object o) throws JsonGenerationException, JsonMappingException, IOException{
+		ObjectMapper mapper = new ObjectMapper();
+		return mapper.writeValueAsString(o);
+	}
+	public static Object getJavaObject(String jsonString,
+			List<Class<?>> referenceClasses) throws Exception {
+		ObjectMapper mapper = new ObjectMapper();
+		Object obj = null;
+		for (Class<?> c : referenceClasses) {
+			try {
+				obj = mapper.readValue(jsonString, c);
+				break;
+			} catch (JsonParseException e) {
+				e.printStackTrace();
+			} catch (JsonMappingException e) {
+				e.printStackTrace();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+		if (obj==null){
+			throw new Exception("Invalid JSON String");
+		}
+		return obj;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/ApplicationDescriptorJSONFacotry.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/ApplicationDescriptorJSONFacotry.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/ApplicationDescriptorJSONFacotry.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/ApplicationDescriptorJSONFacotry.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,67 @@
+package org.apache.airavata.service.utils.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.airavata.core.application.ApplicationParameter;
+import org.apache.airavata.core.application.LocalApplicationDescriptor;
+import org.apache.airavata.core.application.ParameterType;
+import org.apache.airavata.service.utils.json.ConversionUtils;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+
+public class ApplicationDescriptorJSONFacotry implements JSONObjectFactory {
+	private static ApplicationDescriptorJSONFacotry defaultInstance;
+	private static List<Class<?>> applicationClasses = new ArrayList<Class<?>>();
+	
+	static{
+		applicationClasses.add(LocalApplicationDescriptor.class);
+	}
+	
+	private ApplicationDescriptorJSONFacotry() {
+	}
+	
+	public static ApplicationDescriptorJSONFacotry getInstance(){
+		if (defaultInstance==null){
+			defaultInstance=new ApplicationDescriptorJSONFacotry();
+		}
+		return defaultInstance;
+	}
+	
+	@Override
+	public List<Class<?>> getTypes() {
+		return applicationClasses;
+	}
+
+	@Override
+	public String getJSONTypeTemplate(Class<?> cl) throws JsonGenerationException, JsonMappingException, IOException {
+		String result=null;
+		if (cl==LocalApplicationDescriptor.class){
+			LocalApplicationDescriptor app = new LocalApplicationDescriptor();
+			app.setApplicationName("{application.name}");
+			app.getInputs().add(new ApplicationParameter("{input.parameter.name}","{input.parameter.value}",ParameterType.STRING));
+			app.getOutputs().add(new ApplicationParameter("{output.parameter.name}","{output.parameter.value}",ParameterType.STRING));
+			app.setExecutablePath("{application.executable.location}");
+			app.setScratchLocation("{scratch.directory.location}");
+			String jsonString = ConversionUtils.getJSONString(app); 
+			jsonString=jsonString.replaceAll("STRING", "{parameter.type}");
+			result=jsonString;
+		}
+		return result;
+	}
+	@Override
+	public String getTypeName(Class<?> cl) {
+		return cl.getSimpleName();
+	}
+	
+	@Override
+	public String getTypeDescription(Class<?> cl) {
+		String result=null;
+		if (cl==LocalApplicationDescriptor.class){
+			result="Defines computational resource residing in the host which Airavata server is running";
+		}
+		return result;
+	}
+
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/DataList.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/DataList.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/DataList.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/DataList.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,16 @@
+package org.apache.airavata.service.utils.model;
+
+import java.util.List;
+
+
+public class DataList {
+	private List<?> list;
+
+	public List<?> getList() {
+		return list;
+	}
+
+	public void setList(List<?> list) {
+		this.list = list;
+	}
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/JSONObjectFactory.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/JSONObjectFactory.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/JSONObjectFactory.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/java/org/apache/airavata/service/utils/model/JSONObjectFactory.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,15 @@
+package org.apache.airavata.service.utils.model;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+
+public interface JSONObjectFactory {
+	public List<Class<?>> getTypes();
+	public String getTypeName(Class<?> cl);
+	public String getTypeDescription(Class<?> cl);
+	public String getJSONTypeTemplate(Class<?> cl) throws JsonGenerationException, JsonMappingException, IOException;
+
+}

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF Wed Sep  4 18:42:54 2013
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Propchange: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,23 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+   <display-name>Archetype Created Web Application</display-name>
+  
+   <servlet>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+      <init-param>
+         <param-name>com.sun.jersey.config.property.packages</param-name>         
+         <param-value>com.joejag.code.orders.restservices</param-value>
+      </init-param>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+   
+   <servlet-mapping>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <url-pattern>/*</url-pattern>
+   </servlet-mapping>
+   
+</web-app>

Propchange: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp (added)
+++ airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp Wed Sep  4 18:42:54 2013
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: airavata/sandbox/api-mock/airavata-mock-service-utils/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service/pom.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/pom.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/pom.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/pom.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,105 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.apache.airavata</groupId>
+	<artifactId>airavata-mock-service</artifactId>
+	<packaging>war</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>${artifactId}</name>
+
+	<repositories>
+		<repository>
+			<id>maven2-repository.dev.java.net</id>
+			<name>Java.net Repository for Maven</name>
+			<url>http://download.java.net/maven/2/</url>
+			<layout>default</layout>
+		</repository>
+		<repository>
+			<id>maven-repository.dev.java.net</id>
+			<name>Java.net Maven 1 Repository (legacy)</name>
+			<url>http://download.java.net/maven/1</url>
+			<layout>legacy</layout>
+		</repository>
+	</repositories>
+
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.2</version>
+			<scope>test</scope>
+		</dependency>
+					<dependency>
+						<groupId>com.sun.jersey</groupId>
+						<artifactId>jersey-server</artifactId>
+						<version>1.9</version>
+					</dependency>
+					<dependency>
+						<groupId>com.sun.jersey</groupId>
+						<artifactId>jersey-json</artifactId>
+						<version>1.9</version>
+					</dependency>
+					<dependency>
+						<groupId>org.apache.airavata</groupId>
+						<artifactId>airavata-mock-core</artifactId>
+						<version>${project.version}</version>
+					</dependency>
+					<dependency>
+						<groupId>org.apache.airavata</groupId>
+						<artifactId>airavata-mock-service-utils</artifactId>
+						<version>${project.version}</version>
+					</dependency>					
+	</dependencies>
+
+	<build>
+		<finalName>orders-server-example</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<inherited>true</inherited>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>maven-jetty-plugin</artifactId>
+				<version>6.1.22</version>
+				<configuration>
+					<connectors>
+						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+							<port>9090</port>
+							<maxIdleTime>60000</maxIdleTime>
+						</connector>
+					</connectors>
+					<jetty-config>jetty.xml</jetty-config>
+				</configuration>
+				<dependencies>
+					<dependency>
+						<groupId>com.sun.jersey</groupId>
+						<artifactId>jersey-server</artifactId>
+						<version>1.9</version>
+					</dependency>
+					<dependency>
+						<groupId>com.sun.jersey</groupId>
+						<artifactId>jersey-json</artifactId>
+						<version>1.8</version>
+					</dependency>
+					<dependency>
+						<groupId>org.apache.airavata</groupId>
+						<artifactId>airavata-mock-core</artifactId>
+						<version>${project.version}</version>
+					</dependency>
+					<dependency>
+						<groupId>org.apache.airavata</groupId>
+						<artifactId>airavata-mock-service-utils</artifactId>
+						<version>${project.version}</version>
+					</dependency>					
+				</dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Propchange: airavata/sandbox/api-mock/airavata-mock-service/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,133 @@
+package org.apache.airavata.service;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.airavata.core.application.ApplicationDescriptor;
+import org.apache.airavata.core.application.ApplicationParameter;
+import org.apache.airavata.core.application.LocalApplicationDescriptor;
+import org.apache.airavata.core.application.ParameterType;
+import org.apache.airavata.service.utils.ServiceUtils;
+import org.apache.airavata.service.utils.help.HelpData;
+import org.apache.airavata.service.utils.help.MethodUtils;
+import org.apache.airavata.service.utils.json.ConversionUtils;
+import org.apache.airavata.service.utils.model.ApplicationDescriptorJSONFacotry;
+import org.apache.airavata.service.utils.model.DataList;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+/**
+ * curl -X PUT http://127.0.0.1:9090/orders-server/orders/1?customer_name=bob
+ * curl -X GET http://127.0.0.1:9090/orders-server/orders/1 curl -X GET
+ * http://127.0.0.1:9090/orders-server/orders/list
+ */
+
+@Path("/applications/")
+public class ApplicationService {
+	@Context
+	UriInfo uriInfo;
+	
+	@Path("add")
+	@GET
+	@Produces(MediaType.TEXT_PLAIN)
+	public String add(@QueryParam("application") String application) {
+		ApplicationDescriptor obj;
+		try {
+			obj = ConversionUtils.getJavaObject(application, ApplicationDescriptorJSONFacotry.getInstance().getTypes(), ApplicationDescriptor.class);
+			String message=obj.getApplicationName()+" application added.";
+			System.out.println(message);
+			return obj.getApplicationName();
+		} catch (Exception e) {
+			throw new WebApplicationException(e);
+		}
+		
+	}
+	
+	@Path("add/help")
+	@GET
+	@Produces(MediaType.TEXT_PLAIN)
+	public String showHelp() {
+		HelpData helpData = new HelpData("Add Application Description","Add the details of how to access an application from Airavata");
+		try {
+			URI uri = ServiceUtils.getServiceOperationURIFromHelpURI(uriInfo);
+			helpData.setSyntax(uri.toString()+"?application=<JSONString>");
+			helpData.getParameters().put("application", "Describes the application access data in JSON format. The supported JSON types are listed in the 'Notes' section.");
+			List<Class<?>> types = ApplicationDescriptorJSONFacotry.getInstance().getTypes();
+			for (Class<?> cl : types) {
+				String help="";
+				help+=ApplicationDescriptorJSONFacotry.getInstance().getTypeName(cl)+"\n";
+				help+="\t "+ApplicationDescriptorJSONFacotry.getInstance().getTypeDescription(cl)+"\n";
+				help+="\t JSON template:\n"+"\t\t"+ApplicationDescriptorJSONFacotry.getInstance().getJSONTypeTemplate(cl)+"\n";
+				helpData.getNotes().add(help);
+			}
+			helpData.getExamples().add(uri.toString()+"?application={%22applicationName%22:%22echoApp%22,%22inputs%22:[{%22name%22:%22input_val%22,%22value%22:%22test%22,%22type%22:%22STRING%22}],%22outputs%22:[{%22name%22:%22output_val%22,%22value%22:%22test%22,%22type%22:%22STRING%22}],%22executablePath%22:null,%22scratchLocation%22:null}");
+		} catch (URISyntaxException e) {
+			e.printStackTrace();
+		} catch (JsonGenerationException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (JsonMappingException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		System.out.println("help called");
+		return MethodUtils.getHelpString(helpData);
+	}
+
+	public static void main(String[] args) throws JsonGenerationException,
+			JsonMappingException, IOException {
+		ApplicationDescriptor aa = new LocalApplicationDescriptor();
+		aa.setApplicationName("echoApp");
+		aa.getInputs().add(
+				new ApplicationParameter("input_val", "test",
+						ParameterType.STRING));
+		aa.getOutputs().add(
+				new ApplicationParameter("output_val", "test",
+						ParameterType.STRING));
+		ObjectMapper mapper = new ObjectMapper();
+		String s = mapper.writeValueAsString(aa);
+		System.out.println(s);
+		DataList d = new DataList();
+		d.setList(new ArrayList<String>());
+		System.out.println(mapper.writeValueAsString(d));
+		// A bb = mapper.readValue(s, AA.class);
+		// System.out.println(bb.getValue());
+	}
+
+	public static interface A {
+		public String getValue();
+
+		public void setValue(String value);
+	}
+
+	public static class AA implements A {
+		private String value;
+
+		@Override
+		public String getValue() {
+			return value;
+		}
+
+		@Override
+		public void setValue(String value) {
+			this.value = value;
+		}
+
+	}
+}
\ No newline at end of file

Propchange: airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ApplicationService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ExperimentService.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ExperimentService.java?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ExperimentService.java (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/src/main/java/org/apache/airavata/service/ExperimentService.java Wed Sep  4 18:42:54 2013
@@ -0,0 +1,74 @@
+package org.apache.airavata.service;
+
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.airavata.core.application.ExperimentData;
+
+@Path("/experiments/")
+public class ExperimentService {
+	private static Map<String,String> templates=new HashMap<String, String>();
+	private static Map<String,String> experiments=new HashMap<String, String>();
+	private static Map<String,ExperimentData> experimentData=new HashMap<String, ExperimentData>();
+
+	@Path("add/template/{templateId}")
+	@GET
+	@Produces(MediaType.TEXT_PLAIN)
+	public String addTemplate(@PathParam("templateId") String templateId, @QueryParam("experimentTemplate") String experimentTemplate) {
+		templates.put(templateId, experimentTemplate);
+		String message=templateId+" added as an experiment template.";
+		System.out.println(message);
+		return templateId;
+	}
+	
+	@Path("list/templates")
+	@GET
+	@Produces(MediaType.APPLICATION_JSON)
+	public List<String> getTemplates() {
+		return (Arrays.asList(templates.keySet().toArray(new String[]{})));
+	}
+
+	@Path("run/{templateId}")
+	@GET
+	@Produces(MediaType.TEXT_PLAIN)
+	public String runExperiment(@PathParam("templateId") String templateId, @QueryParam("experimentInput") String experimentInput) {
+		if (!templates.containsKey(templateId)){
+			throw new WebApplicationException(new Exception("The experiment template "+templateId+" does not exist!!!"));
+		}
+		UUID uuid = UUID.randomUUID();
+		experiments.put(uuid.toString(), experimentInput);
+		experimentData.put(uuid.toString(), new ExperimentData(uuid.toString(), templateId, Calendar.getInstance().getTime(), "test_data", experimentInput));
+		String message="Experiment "+uuid.toString()+" is executing...";
+		System.out.println(message);
+		return uuid.toString();
+	}
+	
+	@Path("list/experiments")
+	@GET
+	@Produces(MediaType.APPLICATION_JSON)
+	public List<String> getExperiments() {
+		return (Arrays.asList(experiments.keySet().toArray(new String[]{})));
+	}
+	
+	@Path("results/{experimentId}")
+	@GET
+	@Produces(MediaType.APPLICATION_JSON)
+	public ExperimentData getExperimentData(@PathParam ("experimentId") String experimentId) {
+		if (experimentData.containsKey(experimentId)){
+			return experimentData.get(experimentId);
+		}
+		throw new WebApplicationException(new Exception("no data for experiment id "+experimentId));
+	}
+}
\ No newline at end of file

Added: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF Wed Sep  4 18:42:54 2013
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Propchange: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml Wed Sep  4 18:42:54 2013
@@ -0,0 +1,27 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+   <display-name>Archetype Created Web Application</display-name>
+  
+   <servlet>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+      <init-param>
+         <param-name>com.sun.jersey.config.property.packages</param-name>         
+         <param-value>org.apache.airavata.service</param-value>
+      </init-param>
+      <init-param>
+	    <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
+	    <param-value>true</param-value>
+		</init-param>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+   
+   <servlet-mapping>
+      <servlet-name>Jersey Web Application</servlet-name>
+      <url-pattern>/*</url-pattern>
+   </servlet-mapping>
+   
+</web-app>

Propchange: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp?rev=1520104&view=auto
==============================================================================
--- airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp (added)
+++ airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp Wed Sep  4 18:42:54 2013
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: airavata/sandbox/api-mock/airavata-mock-service/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message