summaryrefslogtreecommitdiffstats
path: root/tags/java/sca/1.3/tutorial/store-client
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:26:33 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:26:33 +0000
commita40e527938d76ba71f211da7e327adb50384ba69 (patch)
treecb8f99f1727122b040a3f0fbb6649292b6a74302 /tags/java/sca/1.3/tutorial/store-client
parent968721109881107520d7aefa91d7fcc0519d7739 (diff)
Moving 1.x tags
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/java/sca/1.3/tutorial/store-client')
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/META-INF/sca-contribution.xml23
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/client/Shopper.java29
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/client/ShopperImpl.java63
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/launch/LaunchStoreClientNode.java43
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/pom.xml123
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/services/Cart.java28
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/services/Catalog.java27
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/services/Item.java66
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/services/Total.java29
-rw-r--r--tags/java/sca/1.3/tutorial/store-client/store-client.composite38
10 files changed, 0 insertions, 469 deletions
diff --git a/tags/java/sca/1.3/tutorial/store-client/META-INF/sca-contribution.xml b/tags/java/sca/1.3/tutorial/store-client/META-INF/sca-contribution.xml
deleted file mode 100644
index 30ffa61ed2..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/META-INF/sca-contribution.xml
+++ /dev/null
@@ -1,23 +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://www.osoa.org/xmlns/sca/1.0"
- xmlns:s="http://store">
- <deployable composite="s:store-client"/>
-</contribution> \ No newline at end of file
diff --git a/tags/java/sca/1.3/tutorial/store-client/client/Shopper.java b/tags/java/sca/1.3/tutorial/store-client/client/Shopper.java
deleted file mode 100644
index f8643d4c52..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/client/Shopper.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 client;
-
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Shopper {
-
- String shop(String itemName, int quantity);
-
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/client/ShopperImpl.java b/tags/java/sca/1.3/tutorial/store-client/client/ShopperImpl.java
deleted file mode 100644
index c017548fb3..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/client/ShopperImpl.java
+++ /dev/null
@@ -1,63 +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 client;
-
-import org.apache.tuscany.sca.data.collection.NotFoundException;
-import org.osoa.sca.annotations.Reference;
-
-import services.Cart;
-import services.Catalog;
-import services.Item;
-import services.Total;
-
-public class ShopperImpl implements Shopper {
-
- @Reference
- public Catalog catalog;
-
- @Reference
- public Cart shoppingCart;
-
- @Reference
- public Total shoppingTotal;
-
- public String shop(String itemName, int quantity) {
-
- Item[] items = catalog.get();
- for (Item item: items) {
- if (item.getName().startsWith(itemName)) {
-
- try {
- shoppingCart.delete("");
- } catch (NotFoundException e) {
- }
-
- for (int i = 0; i < quantity; i++) {
- shoppingCart.post("item" + i, item);
- }
-
- return shoppingTotal.getTotal();
- }
- }
-
- return "";
- }
-
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/launch/LaunchStoreClientNode.java b/tags/java/sca/1.3/tutorial/store-client/launch/LaunchStoreClientNode.java
deleted file mode 100644
index 4709240db5..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/launch/LaunchStoreClientNode.java
+++ /dev/null
@@ -1,43 +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 launch;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.launcher.NodeLauncher;
-
-import client.Shopper;
-
-public class LaunchStoreClientNode {
-
- public static void main(String[] args) throws Exception {
- NodeLauncher nodeLauncher = NodeLauncher.newInstance();
- SCANode2 storeClientNode = nodeLauncher.createNode("http://localhost:9990/node-config/StoreClientNode");
- storeClientNode.start();
- SCAClient client = (SCAClient)storeClientNode;
-
- Shopper shopper = client.getService(Shopper.class, "StoreClient");
-
- String total = shopper.shop("Orange", 5);
- System.out.println("Total: " + total);
-
- storeClientNode.stop();
- }
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/pom.xml b/tags/java/sca/1.3/tutorial/store-client/pom.xml
deleted file mode 100644
index 347350d8bf..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/pom.xml
+++ /dev/null
@@ -1,123 +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.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-tutorial</artifactId>
- <version>1.3</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>tutorial-store-client</artifactId>
- <name>Apache Tuscany SCA Tutorial Online Store Client</name>
-
- <repositories>
- <repository>
- <id>apache.incubator</id>
- <url>http://people.apache.org/repo/m2-incubating-repository</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-data-api</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-launcher</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-node-runtime</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-atom-abdera</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <sourceDirectory>${basedir}</sourceDirectory>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- <exclude>**/.*/**</exclude>
- <exclude>pom.xml</exclude>
- <exclude>build.xml</exclude>
- <exclude>target/**</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-maven-ant-generator</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/tags/java/sca/1.3/tutorial/store-client/services/Cart.java b/tags/java/sca/1.3/tutorial/store-client/services/Cart.java
deleted file mode 100644
index 9e6226d963..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/services/Cart.java
+++ /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.
- */
-
-package services;
-
-import org.apache.tuscany.sca.data.collection.Collection;
-import org.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Cart extends Collection<String, Item> {
-
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/services/Catalog.java b/tags/java/sca/1.3/tutorial/store-client/services/Catalog.java
deleted file mode 100644
index 2c3b19f579..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/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.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Catalog {
- Item[] get();
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/services/Item.java b/tags/java/sca/1.3/tutorial/store-client/services/Item.java
deleted file mode 100644
index 81cefcdbef..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/services/Item.java
+++ /dev/null
@@ -1,66 +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;
- private String origin;
-
- public Item() {
- }
-
- public Item(String name, String price, String origin) {
- this.name = name;
- this.price = price;
- this.origin = origin;
- }
-
- 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;
- }
-
- public String getOrigin() {
- return origin;
- }
-
- public void setOrigin(String origin) {
- this.origin = origin;
- }
-
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/services/Total.java b/tags/java/sca/1.3/tutorial/store-client/services/Total.java
deleted file mode 100644
index 8f464e526f..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/services/Total.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.osoa.sca.annotations.Remotable;
-
-@Remotable
-public interface Total {
-
- String getTotal();
-
-}
diff --git a/tags/java/sca/1.3/tutorial/store-client/store-client.composite b/tags/java/sca/1.3/tutorial/store-client/store-client.composite
deleted file mode 100644
index 3c5f1637ef..0000000000
--- a/tags/java/sca/1.3/tutorial/store-client/store-client.composite
+++ /dev/null
@@ -1,38 +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://www.osoa.org/xmlns/sca/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://store"
- name="store-client">
-
- <component name="StoreClient">
- <implementation.java class="client.ShopperImpl"/>
- <reference name="catalog" target="StoreSupplierCatalog">
- <binding.ws/>
- </reference>
- <reference name="shoppingCart" target="StoreSupplierShoppingCart/Cart">
- <t:binding.atom/>
- </reference>
- <reference name="shoppingTotal" target="StoreSupplierShoppingCart/Total">
- <binding.ws/>
- </reference>
- </component>
-
-</composite>