tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r829148 - in /tuscany/sandbox/sca-cloud-tutorial/cloud-google: ./ .settings/ META-INF/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/ma...
Date Fri, 23 Oct 2009 17:55:52 GMT
Author: lresende
Date: Fri Oct 23 17:55:50 2009
New Revision: 829148

URL: http://svn.apache.org/viewvc?rev=829148&view=rev
Log:
Initial implementation of the cloud-api based on Google AppEngine infrastructure services

Added:
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/.classpath
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/.project
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/com.google.appengine.eclipse.core.prefs
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/org.eclipse.jdt.core.prefs
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml   (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml   (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
  (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
  (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
  (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
  (with props)
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/
    tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
  (with props)

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/.classpath
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/.classpath?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/.classpath (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/.classpath Fri Oct 23 17:55:50 2009
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+	<classpathentry excluding="**/*.java" including="LICENSE|NOTICE|README|META-INF/**/*|OSGI-INF/**/*"
kind="src" path=""/>
+	<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/cglib/cglib/2.2/cglib-2.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/>
+	<classpathentry kind="var" path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-assembly/2.0-SNAPSHOT/tuscany-assembly-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-assembly-xml/2.0-SNAPSHOT/tuscany-assembly-xml-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-assembly-xsd/2.0-SNAPSHOT/tuscany-assembly-xsd-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-binding-sca-runtime/2.0-SNAPSHOT/tuscany-binding-sca-runtime-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-builder/2.0-SNAPSHOT/tuscany-builder-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="src" path="/tuscany-cloud-api"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-common-java/2.0-SNAPSHOT/tuscany-common-java-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-common-xml/2.0-SNAPSHOT/tuscany-common-xml-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-contribution/2.0-SNAPSHOT/tuscany-contribution-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-core/2.0-SNAPSHOT/tuscany-core-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-core-databinding/2.0-SNAPSHOT/tuscany-core-databinding-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-core-spi/2.0-SNAPSHOT/tuscany-core-spi-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-data-api/2.0-SNAPSHOT/tuscany-data-api-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-databinding/2.0-SNAPSHOT/tuscany-databinding-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-databinding-jaxb/2.0-SNAPSHOT/tuscany-databinding-jaxb-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-extensibility/2.0-SNAPSHOT/tuscany-extensibility-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-interface-java/2.0-SNAPSHOT/tuscany-interface-java-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-interface-java-jaxws/2.0-SNAPSHOT/tuscany-interface-java-jaxws-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-monitor/2.0-SNAPSHOT/tuscany-monitor-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-node-api/2.0-SNAPSHOT/tuscany-node-api-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-node-impl/2.0-SNAPSHOT/tuscany-node-impl-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-sca-api/2.0-SNAPSHOT/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/tuscany/sca/tuscany-xsd/2.0-SNAPSHOT/tuscany-xsd-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.4.2/XmlSchema-1.4.2.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/.project
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/.project?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/.project (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/.project Fri Oct 23 17:55:50 2009
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>tuscany-cloud-google</name>
+	<comment>The Apache Software Foundation provides support for the Apache community
of open-source software projects.
+    The Apache projects are characterized by a collaborative, consensus based development
process, an open and
+    pragmatic software license, and a desire to create high quality software that leads the
way in its field.
+    We consider ourselves not simply a group of projects sharing a server, but rather a community
of developers
+    and users.</comment>
+	<projects>
+		<project>tuscany-cloud-api</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.google.appengine.eclipse.core.enhancerbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.google.appengine.eclipse.core.projectValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.google.appengine.eclipse.core.gaeNature</nature>
+	</natures>
+</projectDescription>

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/com.google.appengine.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/com.google.appengine.eclipse.core.prefs?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/com.google.appengine.eclipse.core.prefs
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/com.google.appengine.eclipse.core.prefs
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,3 @@
+#Wed Oct 14 15:34:49 PDT 2009
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/org.eclipse.jdt.core.prefs?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/org.eclipse.jdt.core.prefs (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/.settings/org.eclipse.jdt.core.prefs Fri
Oct 23 17:55:50 2009
@@ -0,0 +1,5 @@
+#Wed Oct 14 14:08:11 PDT 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF Fri Oct 23 17:55:50
2009
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Export-Package: org.apache.tuscany.sca.cloud.data.impl
+Tool: Bnd-0.0.357
+Bundle-Name: Apache Tuscany SCA Cloud API - Google Implementation
+Created-By: 1.6.0_15 (Apple Inc.)
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.0
+Bnd-LastModified: 1256186081729
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Apache Tuscany SCA Cloud API
+Import-Package: org.apache.tuscany.sca.cloud.data;version="2.0",org.ap
+ ache.tuscany.sca.cloud.user;version="2.0",org.apache.tuscany.sca.data
+ .collection;version="2.0"
+Bundle-SymbolicName: org.apache.tuscany.sca.cloud.google
+Bundle-DocURL: http://www.apache.org/
+

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml Fri Oct 23 17:55:50
2009
@@ -0,0 +1,97 @@
+<?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.
+-->
+<project name="AppEngineSDKInstaller">
+	
+
+    <property name="appengine.version" value="1.2.6"/>
+	<property name="appengine.distribution.location" value="http://googleappengine.googlecode.com/files/appengine-java-sdk-${appengine.version}.zip"
/>
+    <property name="unpack.location" value="${basedir}/target/appengine-java-sdk-${appengine.version}"/>
+	
+	<property name="appengine.tools.api" value="${basedir}/target/appengine-java-sdk-${appengine.version}/lib/appengine-tools-api.jar"/>
+	<property name="appengine.api" value="${basedir}/target/appengine-java-sdk-${appengine.version}/lib/impl/appengine-api.jar"/>
+	<property name="appengine.local.runtime.shared" value="${basedir}/target/appengine-java-sdk-${appengine.version}/lib/shared/appengine-local-runtime-shared.jar"/>
+
+    <target name="check-installed">
+        <condition property="already.installed" >
+            <available file="${localRepository}/com/google/appengine-java-sdk/${appengine.version}/appengine-java-sdk-${appengine.version}.zip"/>
+        </condition>
+        <condition property="maven.suffix" value="">
+            <os family="unix"/>
+        </condition>
+        <condition property="maven.suffix" value=".bat">
+            <os family="windows"/>
+        </condition>
+    </target>
+	
+
+    <target name="check-unpacked">
+        <condition property="already.unpacked" >
+            <available file="${unpack.location}"/>
+        </condition>
+    </target>
+
+    <target name="install" depends="check-installed" unless="already.installed">
+        <mkdir dir="${basedir}/target/appengine-download/"/>
+        <get src="${appengine.distribution.location}"
+            dest="${basedir}/target/appengine-download/appengine-java-sdk-${appengine.version}.zip"
+            verbose="true"
+            usetimestamp="true"/>
+        <exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+            <arg line="install:install-file -DgroupId=com.google  -DartifactId=appengine-java-sdk
-Dversion=${appengine.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/appengine-download/appengine-java-sdk-${appengine.version}.zip"/>
+        </exec>
+    	
+    	<antcall target="unpack-appengine-sdk"/>
+
+    	<exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+            <arg line="install:install-file -DgroupId=com.google.appengine  -DartifactId=appengine-tools
-Dversion=${appengine.version} -Dpackaging=jar -DgeneratePom=true -Dfile=${appengine.tools.api}"/>
+        </exec>
+
+    	<exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+            <arg line="install:install-file -DgroupId=com.google.appengine  -DartifactId=appengine-api
-Dversion=${appengine.version} -Dpackaging=jar -DgeneratePom=true -Dfile=${appengine.api}"/>
+        </exec>
+
+    	<exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+            <arg line="install:install-file -DgroupId=com.google.appengine  -DartifactId=appengine-local-runtime-shared
-Dversion=${appengine.version} -Dpackaging=jar -DgeneratePom=true -Dfile=${appengine.local.runtime.shared}"/>
+        </exec>
+
+    	<exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+            <arg line="install:install-file -DgroupId=com.google.appengine  -DartifactId=appengine-tools
-Dversion=${appengine.version} -Dpackaging=jar -DgeneratePom=true -Dfile=${appengine.tools.api}"/>
+        </exec>
+
+    </target>
+
+    <target name="unpack-appengine-sdk" depends="check-installed, check-unpacked" unless="already.unpacked">
+        <fail message="AppEngine SDK zip file not installed in local repository: ${localRepository}"
unless="already.installed"/>
+        <mkdir dir="${basedir}/target/appengine-unpack-temp/"/>
+        <unzip src="${localRepository}/com/google/appengine-java-sdk/${appengine.version}/appengine-java-sdk-${appengine.version}.zip"
+               dest="${basedir}/target/appengine-unpack-temp/"
+               overwrite="false">
+        </unzip>
+        <move todir="${unpack.location}">
+        	<fileset dir="${basedir}/target/appengine-unpack-temp/appengine-java-sdk-${appengine.version}"/>
+        </move>
+        <delete dir="${basedir}/target/appengine-unpack-temp/"/>
+    </target>
+	
+
+    <target name="clean-appengine-files">
+        <delete dir="${unpack.location}"/>
+    </target>
+</project>

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/build-appengine.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml (added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml Fri Oct 23 17:55:50 2009
@@ -0,0 +1,163 @@
+<?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.    
+-->
+<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>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-modules</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>tuscany-cloud-google</artifactId>
+    <name>Apache Tuscany SCA Cloud API Google AppEngine Implementation</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-cloud-api</artifactId>
+			<version>2.0-SNAPSHOT</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>com.google.appengine</groupId>
+			<artifactId>appengine-tools</artifactId>
+			<version>1.2.6</version>
+			<scope>provided</scope>
+		</dependency>		
+
+		<dependency>
+			<groupId>com.google.appengine</groupId>
+			<artifactId>appengine-api</artifactId>
+			<version>1.2.6</version>
+			<scope>provided</scope>
+		</dependency>		
+
+		<dependency>
+			<groupId>com.google.appengine</groupId>
+			<artifactId>appengine-local-runtime-shared</artifactId>
+			<version>1.2.6</version>
+			<scope>provided</scope>
+		</dependency>		
+		
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        		
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+	</dependencies>
+	
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+
+				<configuration>
+					<instructions>
+						<Bundle-Version>2.0.0</Bundle-Version>
+						<Bundle-SymbolicName>org.apache.tuscany.sca.cloud.api.google</Bundle-SymbolicName>
+						<Bundle-Description>${pom.name}</Bundle-Description>
+						<Export-Package>org.apache.tuscany.sca.cloud*</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-eclipse-plugin</artifactId>
+                <configuration>
+                    <projectnatures>
+                        <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+                        <projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
+                        <projectnature>com.google.gdt.eclipse.core.webAppNature</projectnature>
+                    </projectnatures>
+                    <buildcommands>
+                        <buildCommand>org.eclipse.jdt.core.javabuilder</buildCommand>
+                        <buildCommand>com.google.appengine.eclipse.core.enhancerbuilder</buildCommand>
+                        <buildCommand>com.google.appengine.eclipse.core.projectValidator>
</buildCommand>
+                        <buildCommand>com.google.gdt.eclipse.core.webAppProjectValidator>
</buildCommand>
+                    </buildcommands>
+                    <classpathContainers>
+                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+                        <classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
+                    </classpathContainers>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <!-- version>1.1</version --> 
+			    <dependencies>
+			        <dependency>
+			    	    <groupId>ant</groupId>
+			    	    <artifactId>ant-trax</artifactId>
+			    	    <version>1.6.5</version>
+			        </dependency>
+			    </dependencies>                    
+                <executions>
+                    <execution> 
+                        <id>install-appengine</id>                       
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <ant antfile="./build-appengine.xml" target="install">
+                                    <property name="localRepository" value="${settings.localRepository}"/>
+                                </ant>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                    <execution> 
+                        <id>clean-appengine-files</id>                      

+                        <phase>clean</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <ant antfile="./build-appengine.xml" target="clean-appengine-files">
+                                    <property name="localRepository" value="${settings.localRepository}"/>
+                                </ant>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin> 
+
+        </plugins>   		
+	</build>		
+	
+	
+
+</project>
+

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,92 @@
+/*
+ * 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.tuscany.sca.cloud.data.impl;
+
+import java.util.UUID;
+
+import org.apache.tuscany.sca.cloud.data.DocumentService;
+import org.apache.tuscany.sca.data.collection.Entry;
+import org.apache.tuscany.sca.data.collection.NotFoundException;
+import org.oasisopen.sca.annotation.Init;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.Key;
+import com.google.appengine.api.datastore.KeyFactory;
+
+public class DatastoreDocumentServiceImpl implements DocumentService<Key, Entity> {
+    private DatastoreService googleDataStoreService;
+
+    @Init
+    public void init() {
+        googleDataStoreService = DatastoreServiceFactory.getDatastoreService();
+    }
+    
+    public Entry<Key, Entity>[] getAll() {
+        throw new UnsupportedOperationException();
+    }
+
+    public Entity get(Key key) throws NotFoundException {
+        Entity entity = null;
+        
+        try {
+            entity =  googleDataStoreService.get(key);
+        } catch(EntityNotFoundException nf) {
+            throw new NotFoundException(nf);
+        }
+
+        return entity;
+    }
+
+
+    public Key post(Key key, Entity entity) {
+
+        if( key == null ) {
+            key = KeyFactory.createKey("key", UUID.randomUUID().toString());
+        }
+        
+        return googleDataStoreService.put(entity);
+    }
+
+    public void put(Key key, Entity entity) throws NotFoundException {
+        if( get(key) == null) {
+            throw new NotFoundException("Could not find entity with key '" + key.toString()
+"'");
+        }
+        
+        googleDataStoreService.put(entity);
+    }
+
+    public void delete(Key key) throws NotFoundException {
+        googleDataStoreService.delete(key);
+        
+    }
+
+    public void delete(Key... keys) throws NotFoundException {
+        googleDataStoreService.delete(keys);
+        
+    }
+
+    public Entry<Key, Entity>[] query(String query) {
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,90 @@
+/*
+ * 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.tuscany.sca.cloud.data.impl;
+
+import java.util.UUID;
+
+import org.apache.tuscany.sca.cloud.data.DocumentService;
+import org.apache.tuscany.sca.data.collection.Entry;
+import org.apache.tuscany.sca.data.collection.NotFoundException;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Property;
+
+import com.google.appengine.api.memcache.Expiration;
+import com.google.appengine.api.memcache.MemcacheService;
+import com.google.appengine.api.memcache.MemcacheServiceFactory;
+
+public class MemcacheDocumentServiceImpl implements DocumentService<Object, Object>
{
+    private MemcacheService googleMemecacheService;
+    
+    @Property(required=false)
+    protected Expiration defaultExpiration = Expiration.byDeltaSeconds(3600); // 1hr
+
+    @Init
+    public void init() {
+        googleMemecacheService = MemcacheServiceFactory.getMemcacheService();
+    }
+    
+    public Entry<Object, Object>[] getAll() {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object get(Object key) throws NotFoundException {
+        Object entity = null;
+        
+        entity =  googleMemecacheService.get(key);
+        
+        if(entity == null) {
+            throw new NotFoundException("Could not find object with key '" + key.toString()
+ "'");
+        }
+
+        return entity;
+    }
+
+    public Object post(Object key, Object entity) {
+        if( key == null ) {
+            key = UUID.randomUUID().toString();
+        }
+        
+        googleMemecacheService.put(key, entity, defaultExpiration);
+        
+        return entity;
+    }
+
+    public void put(Object key, Object entity) throws NotFoundException {
+        if( get(key) == null) {
+            throw new NotFoundException("Could not find entity with key '" + key.toString()
+"'");
+        }
+        
+        googleMemecacheService.put(key, entity, defaultExpiration);
+    }
+
+    public void delete(Object key) throws NotFoundException {
+        googleMemecacheService.delete(key);
+    }
+
+    public void delete(Object... keys) throws NotFoundException {
+        googleMemecacheService.delete(keys);
+    }
+
+    public Entry<Object, Object>[] query(String query) {
+        throw new UnsupportedOperationException();
+    }
+}

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/main/java/org/apache/tuscany/sca/cloud/data/impl/MemcacheDocumentServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,51 @@
+/*
+ * 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.tuscany.sca.cloud.data.impl;
+
+import java.io.Serializable;
+
+
+public class Customer implements Serializable {
+
+    private static final long serialVersionUID = 3465788478651204747L;
+
+    private String id;
+    private String name;
+    private String creditCard;
+    
+    public String getId() {
+        return id;
+    }
+    public void setId(String id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getCreditCard() {
+        return creditCard;
+    }
+    public void setCreditCard(String creditCard) {
+        this.creditCard = creditCard;
+    }
+}

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/Customer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,27 @@
+/*
+ * 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.tuscany.sca.cloud.data.impl;
+
+import org.junit.Ignore;
+
+@Ignore("Nothing to do here")
+public class DatastoreDocumentServiceTestCase {
+
+}

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/java/org/apache/tuscany/sca/cloud/data/impl/DatastoreDocumentServiceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite?rev=829148&view=auto
==============================================================================
--- tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
(added)
+++ tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
Fri Oct 23 17:55:50 2009
@@ -0,0 +1,29 @@
+<?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.    
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+	xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+	targetNamespace="http://google"
+    name="datastore">
+
+    <component name="DataStoreDocumentServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.cloud.data.impl.DatastoreDocumentServiceImpl"/>
+    </component>    
+    
+</composite>

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/sca-cloud-tutorial/cloud-google/src/test/resources/org/apache/tuscany/sca/cloud/data/impl/datastore.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message