From e8419233f758611b0b73057f685f1aff675b7e0e Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 4 Nov 2009 22:02:45 +0000 Subject: Providing a store-merger application that explores adding new catalogs from different cloud environments to the store application git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@832884 13f79535-47bb-0310-9956-ffa450edef68 --- sandbox/sca-cloud-tutorial/pom.xml | 1 + .../store-appengine-webapp/war/store.composite | 14 +- .../store-appengine-webapp/war/store.html | 2 +- .../store-merger-appengine-webapp/build-dojo.xml | 92 +++++++++ .../store-merger-appengine-webapp/pom.xml | 216 +++++++++++++++++++++ .../src/Workaround.java | 22 +++ .../war/META-INF/sca-contribution.xml | 26 +++ .../war/WEB-INF/appengine-web.xml | 29 +++ .../war/WEB-INF/logging.properties | 37 ++++ .../war/WEB-INF/web.xml | 42 ++++ .../war/log4j.properties | 28 +++ .../war/store.composite | 68 +++++++ .../store-merger-appengine-webapp/war/store.css | 22 +++ .../store-merger-appengine-webapp/war/store.html | 194 ++++++++++++++++++ 14 files changed, 781 insertions(+), 12 deletions(-) create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/build-dojo.xml create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/pom.xml create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/src/Workaround.java create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/META-INF/sca-contribution.xml create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/appengine-web.xml create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/logging.properties create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/web.xml create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/log4j.properties create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.composite create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.css create mode 100644 sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.html (limited to 'sandbox') diff --git a/sandbox/sca-cloud-tutorial/pom.xml b/sandbox/sca-cloud-tutorial/pom.xml index 1f8d1dad5e..d69a32a0c6 100644 --- a/sandbox/sca-cloud-tutorial/pom.xml +++ b/sandbox/sca-cloud-tutorial/pom.xml @@ -42,6 +42,7 @@ cloud-google store-assets store-appengine-webapp + store-merger-appengine-webapp store-catalog-appengine-webapp store-catalog-ibmcloud-webapp expertise-rest-appengine-webapp diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite index 8705f9a52a..bbd90a63bb 100644 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite +++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite @@ -23,21 +23,13 @@ targetNamespace="http://store" name="catalog"> - - + + USD - + - - - - - - - - diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html index 0afe661540..aadb4ebd4f 100644 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html +++ b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html @@ -33,7 +33,7 @@ var userServices = new dojo.rpc.JsonService("/User?smd"); - var catalog = new dojo.rpc.JsonService("/CatalogAggregator?smd"); + var catalog = new dojo.rpc.JsonService("/Catalog?smd"); var shoppingCart = new dojo.rpc.JsonService("/ShoppingCart?smd"); diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/build-dojo.xml b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/build-dojo.xml new file mode 100644 index 0000000000..4708b1bcea --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/build-dojo.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/pom.xml b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/pom.xml new file mode 100644 index 0000000000..509ce68f91 --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/pom.xml @@ -0,0 +1,216 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../pom.xml + + store-merger-appengine-webapp + war + Apache Tuscany Store + + + + org.apache.tuscany.sca + store-assets + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-cloud-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-cloud-google + 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} + src + war/WEB-INF/classes + + + 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/sca-cloud-tutorial/store-merger-appengine-webapp/src/Workaround.java b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/src/Workaround.java new file mode 100644 index 0000000000..2f345ecedd --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/src/Workaround.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +public class Workaround { + +} diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/META-INF/sca-contribution.xml b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..f3b6c89fe0 --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/META-INF/sca-contribution.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/appengine-web.xml new file mode 100644 index 0000000000..0e5f6fc072 --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/appengine-web.xml @@ -0,0 +1,29 @@ + + + + tuscany-store-merger + 1 + + + + + + + \ No newline at end of file diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/logging.properties b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/logging.properties new file mode 100644 index 0000000000..bd3b8308fc --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/logging.properties @@ -0,0 +1,37 @@ +# +# +# 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. +# +# +# 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 + +#tuscany debug messages +org.apache.tuscany.level = WARNING + diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/web.xml b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/web.xml new file mode 100644 index 0000000000..31fc39a160 --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + + + + + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + + + store.html + + + diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/log4j.properties b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/log4j.properties new file mode 100644 index 0000000000..036b48afd7 --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/log4j.properties @@ -0,0 +1,28 @@ +# +# +# 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. +# +# + +# 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 + +#tuscany debug messages +log4j.category.org.apache.tuscany=ALL,A1 diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.composite b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.composite new file mode 100644 index 0000000000..5671c81f1a --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.composite @@ -0,0 +1,68 @@ + + + + + + + USD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.css b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.css new file mode 100644 index 0000000000..0b1d541bea --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.css @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.html b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.html new file mode 100644 index 0000000000..aadb4ebd4f --- /dev/null +++ b/sandbox/sca-cloud-tutorial/store-merger-appengine-webapp/war/store.html @@ -0,0 +1,194 @@ + + + + +Online Store - Powered by Apache Tuscany + + + + + + + + + + + + +
+
+ +

Store

+ + + +
+

Catalog

+
+
+
+ +
+ + +
+ +

Your Shopping Cart

+
+
+
+
+
+ + +
+
+ + + \ No newline at end of file -- cgit v1.2.3