From edaa23b27bef36d1de03779baa3883c75ce51adc Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 16 Oct 2009 02:38:41 +0000 Subject: Moving cloud store sample to cloud tutorial sandbox git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@825743 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/samples/store-appengine-webapp/.classpath | 9 - ...e.appengine.eclipse.core.enhancerbuilder.launch | 7 - .../sca/samples/store-appengine-webapp/.project | 39 ----- .../com.google.appengine.eclipse.core.prefs | 5 - .../.settings/com.google.gdt.eclipse.core.prefs | 3 - .../.settings/com.google.gwt.eclipse.core.prefs | 3 - .../samples/store-appengine-webapp/build-dojo.xml | 92 ---------- .../sca/samples/store-appengine-webapp/pom.xml | 190 --------------------- .../store-appengine-webapp/src/log4j.properties | 27 --- .../src/services/Catalog.java | 8 - .../src/services/CatalogAggregatorImpl.java | 56 ------ .../src/services/CurrencyConverter.java | 12 -- .../src/services/CurrencyConverterImpl.java | 24 --- .../store-appengine-webapp/src/services/Item.java | 34 ---- .../store-appengine-webapp/src/store.composite | 46 ----- .../war/META-INF/sca-contribution.xml | 24 --- .../war/WEB-INF/appengine-web.xml | 11 -- .../war/WEB-INF/logging.properties | 32 ---- .../store-appengine-webapp/war/WEB-INF/web.xml | 24 --- .../samples/store-appengine-webapp/war/store.html | 53 ------ 20 files changed, 699 deletions(-) delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.classpath delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.externalToolBuilders/com.google.appengine.eclipse.core.enhancerbuilder.launch delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.project delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/build-dojo.xml delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/pom.xml delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/log4j.properties delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Catalog.java delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CatalogAggregatorImpl.java delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverter.java delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverterImpl.java delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Item.java delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/src/store.composite delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml delete mode 100644 sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html (limited to 'sandbox/lresende') diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.classpath b/sandbox/lresende/sca/samples/store-appengine-webapp/.classpath deleted file mode 100644 index ccc7355a00..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.externalToolBuilders/com.google.appengine.eclipse.core.enhancerbuilder.launch b/sandbox/lresende/sca/samples/store-appengine-webapp/.externalToolBuilders/com.google.appengine.eclipse.core.enhancerbuilder.launch deleted file mode 100644 index f97b807c3b..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.externalToolBuilders/com.google.appengine.eclipse.core.enhancerbuilder.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.project b/sandbox/lresende/sca/samples/store-appengine-webapp/.project deleted file mode 100644 index 974c61f3ad..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - store-appengine-webapp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, - - - LaunchConfigHandle - <project>/.externalToolBuilders/com.google.appengine.eclipse.core.enhancerbuilder.launch - - - - - com.google.appengine.eclipse.core.projectValidator - - - - - com.google.gdt.eclipse.core.webAppProjectValidator - - - - - - org.eclipse.jdt.core.javanature - com.google.appengine.eclipse.core.gaeNature - com.google.gdt.eclipse.core.webAppNature - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs b/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs deleted file mode 100644 index befefbd93b..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Oct 15 18:16:29 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= -validationExclusions= diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs b/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs deleted file mode 100644 index 9fc852536a..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Sep 21 18:15:57 PDT 2009 -eclipse.preferences.version=1 -jarsExcludedFromWebInfLib= diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs b/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs deleted file mode 100644 index 2d3aa6f07f..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Sep 21 18:15:57 PDT 2009 -eclipse.preferences.version=1 -filesCopiedToWebInfLib= diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/build-dojo.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/build-dojo.xml deleted file mode 100644 index 4708b1bcea..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/pom.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/pom.xml deleted file mode 100644 index 0a889520f5..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/pom.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../pom.xml - - store-appengine-webapp - war - Apache Tuscany Store - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-webapp - 2.0-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-databinding-jaxb - - - org.apache.tuscany.sca - tuscany-interface-java-jaxws - - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-eclipse-plugin - - - org.eclipse.jdt.core.javanature - com.google.appengine.eclipse.core.gaeNature - com.google.gdt.eclipse.core.webAppNature - - - org.eclipse.jdt.core.javabuilder - com.google.appengine.eclipse.core.enhancerbuilder - com.google.appengine.eclipse.core.projectValidator> - com.google.gdt.eclipse.core.webAppProjectValidator> - - - org.eclipse.jdt.launching.JRE_CONTAINER - com.google.appengine.eclipse.core.GAE_CONTAINER - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.1 - - - copy-dependencies - process-sources - - copy-dependencies - - - war/WEB-INF/lib - true - - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.1-beta-1 - - war - - - - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/src/log4j.properties b/sandbox/lresende/sca/samples/store-appengine-webapp/src/log4j.properties deleted file mode 100644 index f98cabf1b8..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/src/log4j.properties +++ /dev/null @@ -1,27 +0,0 @@ -# A default log4j configuration for log4j users. -# -# To use this configuration, deploy it into your application's WEB-INF/classes -# directory. You are also encouraged to edit it as you like. - -# Configure the console as our one appender -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n - -# tighten logging on the DataNucleus Categories -log4j.category.DataNucleus.JDO=WARN, A1 -log4j.category.DataNucleus.Persistence=WARN, A1 -log4j.category.DataNucleus.Cache=WARN, A1 -log4j.category.DataNucleus.MetaData=WARN, A1 -log4j.category.DataNucleus.General=WARN, A1 -log4j.category.DataNucleus.Utility=WARN, A1 -log4j.category.DataNucleus.Transaction=WARN, A1 -log4j.category.DataNucleus.Datastore=WARN, A1 -log4j.category.DataNucleus.ClassLoading=WARN, A1 -log4j.category.DataNucleus.Plugin=WARN, A1 -log4j.category.DataNucleus.ValueGeneration=WARN, A1 -log4j.category.DataNucleus.Enhancer=WARN, A1 -log4j.category.DataNucleus.SchemaTool=WARN, A1 - -#tuscany debug messages -log4j.category.org.apache.tuscany=ALL,A1 diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Catalog.java b/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Catalog.java deleted file mode 100644 index 2ecf9ae855..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Catalog.java +++ /dev/null @@ -1,8 +0,0 @@ -package services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CatalogAggregatorImpl.java b/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CatalogAggregatorImpl.java deleted file mode 100644 index 29c99bbcb5..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CatalogAggregatorImpl.java +++ /dev/null @@ -1,56 +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.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(Catalog.class) -@Scope("COMPOSITE") -public class CatalogAggregatorImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - @Reference - public Catalog fruitsCatalog; - - public Item[] get() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - - Item[] fruits = fruitsCatalog.get(); - - Item[] catalog = new Item[fruits.length]; - int i =0; - for (Item item: fruits) { - double price = Double.valueOf(item.getPrice().substring(1)); - price = currencyConverter.getConversion("USD", currencyCode, price); - catalog[i++] = new Item(item.getName(), currencySymbol + price); - } - - return catalog; - } - -} diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverter.java b/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverter.java deleted file mode 100644 index 07a152a276..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverter.java +++ /dev/null @@ -1,12 +0,0 @@ -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/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverterImpl.java b/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/CurrencyConverterImpl.java deleted file mode 100644 index 7de3894e2e..0000000000 --- a/sandbox/lresende/sca/samples/store-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/lresende/sca/samples/store-appengine-webapp/src/services/Item.java b/sandbox/lresende/sca/samples/store-appengine-webapp/src/services/Item.java deleted file mode 100644 index 65aaa53224..0000000000 --- a/sandbox/lresende/sca/samples/store-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/lresende/sca/samples/store-appengine-webapp/src/store.composite b/sandbox/lresende/sca/samples/store-appengine-webapp/src/store.composite deleted file mode 100644 index 9a5897e87b..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/src/store.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - USD - - - - - - - - - - - - - - - - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml deleted file mode 100644 index 3fb1f2b1c7..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml deleted file mode 100644 index 2e265231e9..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - tuscany-store - 1 - - - - - - - \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties deleted file mode 100644 index 411c7f2003..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties +++ /dev/null @@ -1,32 +0,0 @@ -# A default java.util.logging configuration. -# (All App Engine logging is through java.util.logging by default). -# -# To use this configuration, copy it into your application's WEB-INF -# folder and add the following to your appengine-web.xml: -# -# -# -# -# - -# Set the default logging level for all loggers to WARNING -.level = WARNING - -# Set the default logging level for ORM, specifically, to WARNING -DataNucleus.JDO.level=WARNING -DataNucleus.Persistence.level=WARNING -DataNucleus.Cache.level=WARNING -DataNucleus.MetaData.level=WARNING -DataNucleus.General.level=WARNING -DataNucleus.Utility.level=WARNING -DataNucleus.Transaction.level=WARNING -DataNucleus.Datastore.level=WARNING -DataNucleus.ClassLoading.level=WARNING -DataNucleus.Plugin.level=WARNING -DataNucleus.ValueGeneration.level=WARNING -DataNucleus.Enhancer.level=WARNING -DataNucleus.SchemaTool.level=WARNING - -#tuscany debug messages -org.apache.tuscany.level=WARNING - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml deleted file mode 100644 index 31ad8abe98..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - - store.html - - - diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html b/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html deleted file mode 100644 index cd9cff53a9..0000000000 --- a/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html +++ /dev/null @@ -1,53 +0,0 @@ - - -Store - - - - - - - - - - -

Store

-
-

Catalog

-
-
-
-
- -
-
- - -- cgit v1.2.3