summaryrefslogtreecommitdiffstats
path: root/sandbox/sca-cloud-tutorial
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-27 22:09:18 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-27 22:09:18 +0000
commitf94a2904efd56b82c437c29eba14d09773b4d651 (patch)
tree5c1cd8e1a671ce9423fe7ecdb298f1cde748d61e /sandbox/sca-cloud-tutorial
parent57301b4c29de5847993f3f522a27adea5a9a8d1b (diff)
Refactoring common artifacts to store-assets module
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830361 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sandbox/sca-cloud-tutorial/cloud-api/META-INF/MANIFEST.MF6
-rw-r--r--sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF9
-rw-r--r--sandbox/sca-cloud-tutorial/cloud-google/pom.xml15
-rw-r--r--sandbox/sca-cloud-tutorial/pom.xml5
-rw-r--r--sandbox/sca-cloud-tutorial/store-appengine-webapp/.classpath3
-rw-r--r--sandbox/sca-cloud-tutorial/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs2
-rw-r--r--sandbox/sca-cloud-tutorial/store-appengine-webapp/pom.xml117
-rw-r--r--sandbox/sca-cloud-tutorial/store-appengine-webapp/src/store.composite6
-rw-r--r--sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml8
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/META-INF/MANIFEST.MF18
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/pom.xml55
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Cart.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Cart.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Catalog.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Catalog.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CatalogAggregatorImpl.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CatalogAggregatorImpl.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverter.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverter.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverterImpl.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java (renamed from sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/FruitsCatalogImpl.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Item.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Item.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCart.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCart.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartImpl.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartImpl.java)5
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartManager.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartManager.java)3
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Total.java (renamed from sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Total.java)0
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/VegetablesCatalogImpl.java (renamed from sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/VegetablesCatalogImpl.java)2
-rw-r--r--sandbox/sca-cloud-tutorial/store-assets/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/pom.xml6
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/catalog.composite2
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Catalog.java5
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverter.java9
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverterImpl.java24
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Item.java34
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml2
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/index.html2
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/pom.xml13
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Catalog.java27
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverter.java29
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverterImpl.java38
-rw-r--r--sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Item.java51
37 files changed, 210 insertions, 311 deletions
diff --git a/sandbox/sca-cloud-tutorial/cloud-api/META-INF/MANIFEST.MF b/sandbox/sca-cloud-tutorial/cloud-api/META-INF/MANIFEST.MF
index cf5fc0a7ce..ec737dc192 100644
--- a/sandbox/sca-cloud-tutorial/cloud-api/META-INF/MANIFEST.MF
+++ b/sandbox/sca-cloud-tutorial/cloud-api/META-INF/MANIFEST.MF
@@ -11,9 +11,9 @@ 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"
+Import-Package: org.apache.tuscany.sca.cloud.data;version="2.0.0",org.ap
+ ache.tuscany.sca.cloud.user;version="2.0.0",org.apache.tuscany.sca.data
+ .collection;version="2.0.0"
Bundle-SymbolicName: org.apache.tuscany.sca.cloud.api
Bundle-DocURL: http://www.apache.org/
diff --git a/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF b/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF
index 22a14da904..6e6063580b 100644
--- a/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF
+++ b/sandbox/sca-cloud-tutorial/cloud-google/META-INF/MANIFEST.MF
@@ -1,5 +1,6 @@
Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.cloud.data.impl
+Export-Package: org.apache.tuscany.sca.cloud.data.impl,
+ org.apache.tuscany.sca.cloud.user.impl
Tool: Bnd-0.0.357
Bundle-Name: Apache Tuscany SCA Cloud API - Google Implementation
Created-By: 1.6.0_15 (Apple Inc.)
@@ -9,9 +10,9 @@ 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"
+Import-Package: org.apache.tuscany.sca.cloud.data;version="2.0.0",org.ap
+ ache.tuscany.sca.cloud.user;version="2.0.0",org.apache.tuscany.sca.data
+ .collection;version="2.0.0"
Bundle-SymbolicName: org.apache.tuscany.sca.cloud.google
Bundle-DocURL: http://www.apache.org/
diff --git a/sandbox/sca-cloud-tutorial/cloud-google/pom.xml b/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
index 8e95e02356..98144b8197 100644
--- a/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
+++ b/sandbox/sca-cloud-tutorial/cloud-google/pom.xml
@@ -75,21 +75,6 @@
<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>
diff --git a/sandbox/sca-cloud-tutorial/pom.xml b/sandbox/sca-cloud-tutorial/pom.xml
index 71383f4e77..066b3a536b 100644
--- a/sandbox/sca-cloud-tutorial/pom.xml
+++ b/sandbox/sca-cloud-tutorial/pom.xml
@@ -16,7 +16,9 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
---><project>
+-->
+
+<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tuscany.sca</groupId>
@@ -31,6 +33,7 @@
<modules>
<module>cloud-api</module>
<module>cloud-google</module>
+ <module>store-assets</module>
</modules>
</project> \ No newline at end of file
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/.classpath b/sandbox/sca-cloud-tutorial/store-appengine-webapp/.classpath
index b9a1844d52..d98aac5e30 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/.classpath
+++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/.classpath
@@ -3,9 +3,10 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/tuscany-sca-api-2.0-SNAPSHOT.jar"/>
- <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/tuscany-cloud-api"/>
<classpathentry combineaccessrules="false" kind="src" path="/tuscany-cloud-google"/>
<classpathentry combineaccessrules="false" kind="src" path="/tuscany-data-api"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/store-assets"/>
+ <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs b/sandbox/sca-cloud-tutorial/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs
index c22fce6390..d5dcd3db42 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs
+++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs
@@ -1,4 +1,4 @@
-#Sun Oct 18 17:07:56 PDT 2009
+#Mon Oct 26 17:06:08 PDT 2009
eclipse.preferences.version=1
filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.6.jar|appengine-api-labs-1.2.6.jar|datanucleus-appengine-1.0.3.jar|datanucleus-core-1.1.5.jar|datanucleus-jpa-1.1.5.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-eb.jar
ormEnhancementInclusions=
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/pom.xml b/sandbox/sca-cloud-tutorial/store-appengine-webapp/pom.xml
index 332c861797..297fd11bd4 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/pom.xml
+++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/pom.xml
@@ -29,63 +29,70 @@
<packaging>war</packaging>
<name>Apache Tuscany Store</name>
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-cloud-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>store-assets</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-cloud-google</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-webapp</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-databinding-jaxb</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-interface-java-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-cloud-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-cloud-google</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-webapp</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-jaxb</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-interface-java-jaxws</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
<build>
<finalName>${artifactId}</finalName>
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/store.composite b/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/store.composite
index 4fac764518..6b659f2876 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/store.composite
+++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/store.composite
@@ -32,7 +32,7 @@
</service>
<reference name="fruitsCatalog">
<interface.java interface="services.Catalog"/>
- <tuscany:binding.jsonrpc uri="http://tuscany-store-catalog.appspot.com/catalog"/>
+ <tuscany:binding.jsonrpc uri="http://tuscany-store-catalog.appspot.com/Catalog"/>
</reference>
<reference name="vegetablesCatalog">
<interface.java interface="services.Catalog"/>
@@ -54,14 +54,14 @@
<tuscany:binding.jsonrpc uri="/ShoppingCart"/>
</service>
<reference name="userService" target="UserService">
- <binding.sca/>
+ <binding.sca name="local"/>
</reference>
</component>
<component name="UserService">
<implementation.java class="org.apache.tuscany.sca.cloud.user.impl.GoogleUserService"/>
<service name="UserService">
- <binding.sca/>
+ <binding.sca name="local"/>
<tuscany:binding.jsonrpc uri="/User"/>
</service>
</component>
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml
index 3fb1f2b1c7..f3b6c89fe0 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml
+++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml
@@ -18,7 +18,9 @@
* under the License.
-->
<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- xmlns:store="http://store">
-
- <deployable composite="store:catalog"/>
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:store="http://store">
+
+ <deployable composite="store:catalog" />
+ <!-- import.java package="services" / -->
</contribution> \ No newline at end of file
diff --git a/sandbox/sca-cloud-tutorial/store-assets/META-INF/MANIFEST.MF b/sandbox/sca-cloud-tutorial/store-assets/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a03e301420
--- /dev/null
+++ b/sandbox/sca-cloud-tutorial/store-assets/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Export-Package: services
+Tool: Bnd-0.0.357
+Bundle-Name: Apache Tuscany SCA Cloud Store Tutorial Assets
+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.0",
+ org.apache.tuscany.sca.cloud.user;version="2.0.0",
+ org.apache.tuscany.sca.data.collection;version="2.0.0",
+ services
+Bundle-SymbolicName: org.apache.tuscany.sca.store.assets
+Bundle-DocURL: http://www.apache.org/
+
diff --git a/sandbox/sca-cloud-tutorial/store-assets/pom.xml b/sandbox/sca-cloud-tutorial/store-assets/pom.xml
new file mode 100644
index 0000000000..7fb5fed85c
--- /dev/null
+++ b/sandbox/sca-cloud-tutorial/store-assets/pom.xml
@@ -0,0 +1,55 @@
+<?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/xsd/maven-4.0.0.xsd" >
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>store-assets</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <name>Apache Tuscany SCA Cloud store common assets</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-cloud-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-cloud-google</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Cart.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Cart.java
index 3fb5439bc3..3fb5439bc3 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Cart.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Cart.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Catalog.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Catalog.java
index b8630370ad..b8630370ad 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Catalog.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Catalog.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CatalogAggregatorImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CatalogAggregatorImpl.java
index 09cae14100..09cae14100 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CatalogAggregatorImpl.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CatalogAggregatorImpl.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverter.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverter.java
index 59435d9099..59435d9099 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverter.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverter.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverterImpl.java
index d185a2fe83..d185a2fe83 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/CurrencyConverterImpl.java
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/FruitsCatalogImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java
index 5290623487..5290623487 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/FruitsCatalogImpl.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Item.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Item.java
index 74e7239a20..74e7239a20 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Item.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Item.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCart.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCart.java
index e4d590484c..e4d590484c 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCart.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCart.java
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartImpl.java
index cfa9dd7435..000e205948 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartImpl.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartImpl.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
+import java.util.logging.Logger;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.NotFoundException;
@@ -31,7 +32,9 @@ import org.oasisopen.sca.annotation.Scope;
@Scope("COMPOSITE")
public class ShoppingCartImpl implements ShoppingCart {
-
+ private static final Logger log = Logger.getLogger(ShoppingCartImpl.class.getName());
+
+ //private DatastoreDocumentServiceImpl cart = new DatastoreDocumentServiceImpl();
private Map<String, Item> cart = new HashMap<String, Item>();
public Entry<String, Item>[] getAll() {
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartManager.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartManager.java
index 90f25d214c..be2c9216c8 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/ShoppingCartManager.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/ShoppingCartManager.java
@@ -101,17 +101,14 @@ public class ShoppingCartManager implements ShoppingCart {
if(userId == null || userId.length() == 0) {
userId = ANONYMOUS;
}
- log.warning("Using userId:" + userId);
return userId;
}
private String getCartKey() {
String cartKey = "cart-" + this.getUserId();
- log.warning("Using cartKey:" + cartKey);
return cartKey;
}
private String generateItemKey() {
String itemKey = getCartKey() + "-item-" + UUID.randomUUID().toString();
- log.warning("Using itemKey:" + itemKey);
return itemKey;
}
}
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Total.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Total.java
index b77cc1c7ac..b77cc1c7ac 100644
--- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/Total.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/Total.java
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/VegetablesCatalogImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/VegetablesCatalogImpl.java
index 1f22166272..6ca311b42e 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/VegetablesCatalogImpl.java
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/VegetablesCatalogImpl.java
@@ -40,7 +40,7 @@ public class VegetablesCatalogImpl implements Catalog {
public void init() {
String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode);
catalog.add(new Item("Broccoli", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99)));
- catalog.add(new Item("Aspargus", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55)));
+ catalog.add(new Item("Asparagus", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55)));
catalog.add(new Item("Cauliflower", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55)));
}
diff --git a/sandbox/sca-cloud-tutorial/store-assets/src/main/resources/META-INF/sca-contribution.xml b/sandbox/sca-cloud-tutorial/store-assets/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..c3e4e8bab5
--- /dev/null
+++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?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.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:store="http://store">
+
+ <export.java package="services" />
+</contribution> \ No newline at end of file
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/pom.xml b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/pom.xml
index 0df9b4ad7d..647a53746a 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/pom.xml
+++ b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/pom.xml
@@ -30,6 +30,12 @@
<name>Apache Tuscany Store Catalog Service</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>store-assets</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-sca-api</artifactId>
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/catalog.composite b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/catalog.composite
index 9c42d12f2c..a4276816d6 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/catalog.composite
+++ b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/catalog.composite
@@ -28,7 +28,7 @@
<property name="currencyCode">USD</property>
<service name="Catalog">
<interface.java interface="services.Catalog"/>
- <tuscany:binding.jsonrpc uri="/catalog"/>
+ <tuscany:binding.jsonrpc uri="/Catalog"/>
</service>
<reference name="currencyConverter" target="CurrencyConverter" />
</component>
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Catalog.java b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Catalog.java
deleted file mode 100644
index 5d217e2168..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Catalog.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package services;
-
-public interface Catalog {
- Item[] get();
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverter.java b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverter.java
deleted file mode 100644
index 36d64781da..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverter.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package services;
-
-public interface CurrencyConverter {
- public double getConversion(String fromCurrenycCode,
- String toCurrencyCode,
- double amount);
-
- public String getCurrencySymbol(String currencyCode);
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverterImpl.java b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverterImpl.java
deleted file mode 100644
index 7de3894e2e..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/CurrencyConverterImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package services;
-
-import org.oasisopen.sca.annotation.Service;
-
-@Service(CurrencyConverter.class)
-public class CurrencyConverterImpl implements CurrencyConverter {
- public double getConversion(String fromCurrencyCode,
- String toCurrencyCode,
- double amount) {
- if (toCurrencyCode.equals("USD"))
- return amount;
- else if (toCurrencyCode.equals("EUR"))
- return ((double)Math.round(amount * 0.7256 * 100)) /100;
- return 0;
- }
-
- public String getCurrencySymbol(String currencyCode) {
- if (currencyCode.equals("USD"))
- return "$";
- else if (currencyCode.equals("EUR"))
- return "E"; //"€";
- return "?";
- }
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Item.java b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Item.java
deleted file mode 100644
index 65aaa53224..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/src/services/Item.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package services;
-
-import java.io.Serializable;
-
-public class Item implements Serializable {
- private static final long serialVersionUID = -5847326138627338217L;
-
- private String name;
- private String price;
-
- public Item() {
- }
-
- public Item(String name, String price) {
- this.name = name;
- this.price = price;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getPrice() {
- return price;
- }
-
- public void setPrice(String price) {
- this.price = price;
- }
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml
index 167f7a4ce5..276383e283 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml
+++ b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>tuscany-store-catalog</application>
- <version>1</version>
+ <version>2</version>
<!-- Configure java.util.logging -->
<system-properties>
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/index.html b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/index.html
index 3ae8917285..d1efe02bd6 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/index.html
+++ b/sandbox/sca-cloud-tutorial/store-catalog-appengine-webapp/war/index.html
@@ -28,6 +28,6 @@
<h2>Tuscany Store Catalog Service</h2>
</br>
</br>
-Catalog Service Definition available at : <a href="http://tuscany-store-catalog.appspot.com/catalog?smd">http://tuscany-store-catalog.appspot.com/catalog?smd</a>
+Catalog Service Definition available at : <a href="http://tuscany-store-catalog.appspot.com/Catalog?smd">http://tuscany-store-catalog.appspot.com/Catalog?smd</a>
</body>
</html> \ No newline at end of file
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/pom.xml b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/pom.xml
index 7da92d1df5..8f4ad9a709 100644
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/pom.xml
+++ b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/pom.xml
@@ -30,6 +30,12 @@
<name>Apache Tuscany SCA Store Catalog as WebApp</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>store-assets</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-sca-api</artifactId>
@@ -57,6 +63,13 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ <scope>provided</scope>
+ </dependency>
+
<!--
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Catalog.java b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Catalog.java
deleted file mode 100644
index b5e504fe11..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Catalog.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Catalog {
- Item[] get();
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverter.java b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverter.java
deleted file mode 100644
index a064f3dd69..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface CurrencyConverter {
- public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount);
-
- public String getCurrencySymbol(String currencyCode);
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverterImpl.java b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverterImpl.java
deleted file mode 100644
index c354aed447..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/CurrencyConverterImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-
-public class CurrencyConverterImpl implements CurrencyConverter {
- public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) {
- if (toCurrencyCode.equals("USD"))
- return amount;
- else if (toCurrencyCode.equals("EUR"))
- return ((double)Math.round(amount * 0.7256 * 100)) /100;
- return 0;
- }
-
- public String getCurrencySymbol(String currencyCode) {
- if (currencyCode.equals("USD"))
- return "$";
- else if (currencyCode.equals("EUR"))
- return "E"; //"€";
- return "?";
- }
-}
diff --git a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Item.java b/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Item.java
deleted file mode 100644
index 27abd4f016..0000000000
--- a/sandbox/sca-cloud-tutorial/store-catalog-ibmcloud-2x-webapp/src/main/java/services/Item.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package services;
-
-
-public class Item {
- private String name;
- private String price;
-
- public Item() {
- }
-
- public Item(String name, String price) {
- this.name = name;
- this.price = price;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getPrice() {
- return price;
- }
-
- public void setPrice(String price) {
- this.price = price;
- }
-
-}