diff options
Diffstat (limited to '')
8 files changed, 0 insertions, 438 deletions
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 deleted file mode 100644 index 87db06d8dd..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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/200912" - 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-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/appengine-web.xml deleted file mode 100644 index bfec5c4e26..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?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. ---> -<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> - <application>tuscany-store</application> - <version>5</version> - - <!-- Configure java.util.logging --> - <system-properties> - <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> - </system-properties> - -</appengine-web-app>
\ No newline at end of file diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/logging.properties b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/logging.properties deleted file mode 100644 index bd3b8308fc..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/logging.properties +++ /dev/null @@ -1,37 +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. -# -# -# 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: -# -# <system-properties> -# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> -# </system-properties> -# - -# 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-appengine-webapp/war/WEB-INF/web.xml b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/web.xml deleted file mode 100644 index 31fc39a160..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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. ---> -<!DOCTYPE web-app - PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd"> - -<web-app> - - <!-- Tuscany Filter --> - <filter> - <filter-name>tuscany</filter-name> - <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> - </filter> - - <filter-mapping> - <filter-name>tuscany</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <!-- Default page to serve --> - <welcome-file-list> - <welcome-file>store.html</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/log4j.properties b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/log4j.properties deleted file mode 100644 index 036b48afd7..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/log4j.properties +++ /dev/null @@ -1,28 +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. -# -# - -# 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-appengine-webapp/war/store.composite b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite deleted file mode 100644 index 23505dcd5b..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.composite +++ /dev/null @@ -1,60 +0,0 @@ -<?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/200912" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" - xmlns:s="http://store" - targetNamespace="http://store" - name="catalog"> - - <component name="Catalog"> - <implementation.java class="services.FruitsCatalogImpl"/> - <property name="currencyCode">USD</property> - <service name="Catalog"> - <interface.java interface="services.Catalog"/> - <tuscany:binding.jsonrpc uri="/Catalog"/> - </service> - <reference name="currencyConverter" target="CurrencyConverter" /> - </component> - - <component name="CurrencyConverter"> - <implementation.java class="services.CurrencyConverterImpl" /> - <service name="CurrencyConverter"> - <interface.java interface="services.CurrencyConverter"/> - </service> - </component> - - <component name="ShoppingCartManager"> - <implementation.java class="services.ShoppingCartManager"/> - <service name="ShoppingCart"> - <tuscany:binding.jsonrpc uri="/ShoppingCart"/> - </service> - <reference name="userService" target="UserService"> - <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 name="local"/> - <tuscany:binding.jsonrpc uri="/User"/> - </service> - </component> -</composite> diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.css b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.css deleted file mode 100644 index 0b1d541bea..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.css +++ /dev/null @@ -1,22 +0,0 @@ -<style type="text/css"> - -html, body { - height:100%; - margin:0; - overflow:hidden; - width:100%; -} - -.header { - font-size:13px; - text-align:right; - color:#CCCCCC; - - - padding:5px 5px 0; - padding-right:8px; - padding-top:0px !important; - padding-bottom: 0px; - border-bottom: 1px solid black; -} -</style>
\ No newline at end of file diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html b/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html deleted file mode 100644 index aadb4ebd4f..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/war/store.html +++ /dev/null @@ -1,194 +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. ---> -<html> -<head> -<meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>Online Store - Powered by Apache Tuscany</title> - -<link href="store.css" rel="stylesheet" type="text/css"> - -<script type="text/javascript" src="dojo/dojo/dojo.js"></script> - -<script type="text/javascript"> - dojo.require("dojo.rpc.JsonService"); -</script> - -<script language="JavaScript"> - - var userServices = new dojo.rpc.JsonService("/User?smd"); - - var catalog = new dojo.rpc.JsonService("/Catalog?smd"); - - var shoppingCart = new dojo.rpc.JsonService("/ShoppingCart?smd"); - - var userContext; - - var catalogItems; - - function showHeader() { - var userContextCallback = function(context) { - userContext = context; - //alert(userContext.userId + " --> " + userContext.loginUrl); - - var html=''; - if(! userContext.userId) { - html = "<a href='" + userContext.loginUrl +"'>Login</a>"; - } else { - html = userContext.email + " | <a href='" + userContext.logoutUrl +"'> Logout</a>"; - } - - document.getElementById('appHeader').innerHTML = html; - } - - userServices.getUserContext(document.URL, "").addCallback(userContextCallback); - } - - function showCatalogs() { - var catalogCallback = function(items) { - var catalog = ""; - for (var i=0; i<items.length; i++) { - var item = items[i].name + ' - ' + items[i].currencySymbol + items[i].price; - catalog += '<input name="items" type="checkbox" value="' + - item + '">' + item + ' <br>'; - } - document.getElementById('catalog').innerHTML=catalog; - catalogItems = items; - } - - catalog.get().addCallback(catalogCallback); - } - - - // This handles the response from shoppingCart.getAll - // which is a collection of Entry<K,D> - function shoppingCart_getResponse(items) { - var list=''; - for (var i=0; i<items.length; i++) { - //get the actual item, that is Entry.data - var item = items[i].data; - // process its attributes - var name = item.name; - var symbol = item.currencySymbol; - var price = item.price - list += name + ' - ' + symbol + price + ' <br>'; - } - document.getElementById("shoppingCart").innerHTML = list; - - if (items.length != 0) { - try { - shoppingCart.getTotal().addCallback(shoppingCart_getTotalResponse); - } - catch(e){ - alert(e); - } - } - } - - function shoppingCart_getTotalResponse(total,exception) { - if(exception) { - alert(exception.message); - return; - } - document.getElementById('total').innerHTML = total; - } - - function shoppingCart_postResponse(entry) { - shoppingCart.getAll().addCallback(shoppingCart_getResponse); - } - - function addToCart() { - var items = document.catalogForm.items; - var j = 0; - for (var i=0; i<items.length; i++) - if (items[i].checked) { - shoppingCart.post("", catalogItems[i]).addCallback(shoppingCart_postResponse); - items[i].checked = false; - } - } - function checkoutCart() { - document.getElementById('store').innerHTML='<h2>' + - 'Thanks for Shopping With Us!</h2>'+ - '<h2>Your Order</h2>'+ - '<form name="orderForm">'+ - document.getElementById('shoppingCart').innerHTML+ - '<br>'+ - document.getElementById('total').innerHTML+ - '<br>'+ - '<br>'+ - '<input type="submit" value="Continue Shopping">'+ - '</form>'; - shoppingCart.delete(""); - } - function deleteCart() { - shoppingCart.delete(""); - document.getElementById('shoppingCart').innerHTML = ""; - document.getElementById('total').innerHTML = ""; - } - - - - function init() { - try { - showHeader(); - - showCatalogs(); - - shoppingCart.getAll().addCallback(shoppingCart_getResponse); - } catch (e) { - alert(e); - } - } - - -</script> - -</head> - -<body onload="init()"> - <div id="appHeader" class="header"> - </div> - - <h1>Store</h1> - - - - <div id="store"> - <h2>Catalog</h2> - <form name="catalogForm"> - <div id="catalog" ></div> - <br> - <input type="button" onClick="addToCart()" value="Add to Cart"> - </form> - - - <br> - - <h2>Your Shopping Cart</h2> - <form name="shoppingCartForm"> - <div id="shoppingCart"></div> - <br> - <div id="total"></div> - <br> - <input type="button" onClick="checkoutCart()" value="Checkout"> - <input type="button" onClick="deleteCart()" value="Empty"> - </form> - </div> -</body> - -</html>
\ No newline at end of file |