From 5754acc82733ed48679c4d06ed38f48291982411 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 2 Jul 2008 16:35:19 +0000 Subject: Skeleton for photo-gallery sample git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@673436 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/samples/photo-gallery/README | 28 ++ java/sca/samples/photo-gallery/build.xml | 79 ++++++ java/sca/samples/photo-gallery/photo-gallery.png | Bin 0 -> 15670 bytes java/sca/samples/photo-gallery/photo-gallery.svg | 304 +++++++++++++++++++++ java/sca/samples/photo-gallery/pom.xml | 106 +++++++ .../photo-gallery/src/main/java/launch/Launch.java | 34 +++ .../src/main/resources/photo-gallery.composite | 64 +++++ .../src/main/resources/uiservices/gallery.html | 141 ++++++++++ 8 files changed, 756 insertions(+) create mode 100644 java/sca/samples/photo-gallery/README create mode 100644 java/sca/samples/photo-gallery/build.xml create mode 100644 java/sca/samples/photo-gallery/photo-gallery.png create mode 100644 java/sca/samples/photo-gallery/photo-gallery.svg create mode 100644 java/sca/samples/photo-gallery/pom.xml create mode 100644 java/sca/samples/photo-gallery/src/main/java/launch/Launch.java create mode 100644 java/sca/samples/photo-gallery/src/main/resources/photo-gallery.composite create mode 100644 java/sca/samples/photo-gallery/src/main/resources/uiservices/gallery.html (limited to 'java/sca/samples/photo-gallery') diff --git a/java/sca/samples/photo-gallery/README b/java/sca/samples/photo-gallery/README new file mode 100644 index 0000000000..51c9163fce --- /dev/null +++ b/java/sca/samples/photo-gallery/README @@ -0,0 +1,28 @@ +Photo-Gallery Sample +====================================== + +This is a sample store scenario that is used as a getting started guide +for Tuscany SCA. For detailed information, please see: + +http://incubator.apache.org/tuscany/getting-started-with-tuscany.html + +or + +http://incubator.apache.org/tuscany/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html + + +Building And Running The Sample Using Ant +----------------------------------------- +With the binary distribution the sample can be built using Ant as follows: + +cd store +ant compile + +and then, to run: + +ant run + +Once the store application is running use your browser to visit the following +URL: + +http://localhost:8080/gallery/ diff --git a/java/sca/samples/photo-gallery/build.xml b/java/sca/samples/photo-gallery/build.xml new file mode 100644 index 0000000000..652afc3570 --- /dev/null +++ b/java/sca/samples/photo-gallery/build.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/samples/photo-gallery/photo-gallery.png b/java/sca/samples/photo-gallery/photo-gallery.png new file mode 100644 index 0000000000..da413edeee Binary files /dev/null and b/java/sca/samples/photo-gallery/photo-gallery.png differ diff --git a/java/sca/samples/photo-gallery/photo-gallery.svg b/java/sca/samples/photo-gallery/photo-gallery.svg new file mode 100644 index 0000000000..74f8ecd36d --- /dev/null +++ b/java/sca/samples/photo-gallery/photo-gallery.svg @@ -0,0 +1,304 @@ + + + + + + + + + + image/svg+xml + + + + + + + + store + ufs + + ShoppingCart + + CurrencyConverter + + + + + + + + + + CurrenyCode HTTP JSONRPC Atom + + Catalog + + + + diff --git a/java/sca/samples/photo-gallery/pom.xml b/java/sca/samples/photo-gallery/pom.xml new file mode 100644 index 0000000000..e00272e6cb --- /dev/null +++ b/java/sca/samples/photo-gallery/pom.xml @@ -0,0 +1,106 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.4-SNAPSHOT + ../pom.xml + + sample-photo-gallery + Apache Tuscany SCA Getting Started Online Store Sample + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.4-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-data-api + 1.4-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-widget-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + 1.4-SNAPSHOT + runtime + + + + junit + junit + 4.2 + test + + + + + + ${artifactId} + + + diff --git a/java/sca/samples/photo-gallery/src/main/java/launch/Launch.java b/java/sca/samples/photo-gallery/src/main/java/launch/Launch.java new file mode 100644 index 0000000000..858fdb6bf2 --- /dev/null +++ b/java/sca/samples/photo-gallery/src/main/java/launch/Launch.java @@ -0,0 +1,34 @@ +/* + * 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 launch; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +public class Launch { + public static void main(String[] args) throws Exception { + System.out.println("Starting ..."); + SCADomain scaDomain = SCADomain.newInstance("photo-gallery.composite"); + System.out.println("store.composite ready for big business !!!"); + System.in.read(); + System.out.println("Stopping ..."); + scaDomain.close(); + System.out.println(); + } +} diff --git a/java/sca/samples/photo-gallery/src/main/resources/photo-gallery.composite b/java/sca/samples/photo-gallery/src/main/resources/photo-gallery.composite new file mode 100644 index 0000000000..4f4a9d2e3d --- /dev/null +++ b/java/sca/samples/photo-gallery/src/main/resources/photo-gallery.composite @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + USD + + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/samples/photo-gallery/src/main/resources/uiservices/gallery.html b/java/sca/samples/photo-gallery/src/main/resources/uiservices/gallery.html new file mode 100644 index 0000000000..095570f949 --- /dev/null +++ b/java/sca/samples/photo-gallery/src/main/resources/uiservices/gallery.html @@ -0,0 +1,141 @@ + + + +Store + + + + + + + + +

Store

+
+

Catalog

+
+
+
+ +
+ +
+ +

Your Shopping Cart

+
+
+
+
+
+ + + (feed) +
+
+ + -- cgit v1.2.3