summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5.1/samples/store-secure/src
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:14:18 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:14:18 +0000
commitfdd5b43d3c139cf2cbd1655d2efbfaf9032a5b5e (patch)
treebcd16e19fa4bbd45f956812be8b65f7a143b573f /branches/sca-java-1.5.1/samples/store-secure/src
parent3caf8614f25d6b1962e20331fdf423c863bc02f3 (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/samples/store-secure/src')
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/Launch.java34
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchProtected.java34
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchSSL.java34
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Cart.java28
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Catalog.java27
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverter.java29
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverterImpl.java38
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/FruitsCatalogImpl.java52
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Item.java51
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/ShoppingCartImpl.java112
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Total.java29
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/definitions.xml50
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-protected.composite64
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-ssl.composite64
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store.composite64
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/tuscany.keyStorebin1265 -> 0 bytes
-rw-r--r--branches/sca-java-1.5.1/samples/store-secure/src/main/resources/uiservices/store.html162
17 files changed, 0 insertions, 872 deletions
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/Launch.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/Launch.java
deleted file mode 100644
index 801697abea..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/Launch.java
+++ /dev/null
@@ -1,34 +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.host.embedded.SCADomain;
-
-public class Launch {
- public static void main(String[] args) throws Exception {
- System.out.println("Starting ...");
- SCADomain scaDomain = SCADomain.newInstance("store.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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchProtected.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchProtected.java
deleted file mode 100644
index ffdf9db47b..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchProtected.java
+++ /dev/null
@@ -1,34 +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.host.embedded.SCADomain;
-
-public class LaunchProtected {
- public static void main(String[] args) throws Exception {
- System.out.println("Starting ...");
- SCADomain scaDomain = SCADomain.newInstance("store-protected.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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchSSL.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchSSL.java
deleted file mode 100644
index a3703869ac..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/launch/LaunchSSL.java
+++ /dev/null
@@ -1,34 +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.host.embedded.SCADomain;
-
-public class LaunchSSL {
- public static void main(String[] args) throws Exception {
- System.out.println("Starting ...");
- SCADomain scaDomain = SCADomain.newInstance("store-ssl.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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Cart.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Cart.java
deleted file mode 100644
index 9e6226d963..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Catalog.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Catalog.java
deleted file mode 100644
index 2c3b19f579..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverter.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverter.java
deleted file mode 100644
index e104a0423a..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverter.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 CurrencyConverter {
- public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount);
-
- public String getCurrencySymbol(String currencyCode);
-}
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverterImpl.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverterImpl.java
deleted file mode 100644
index c354aed447..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/CurrencyConverterImpl.java
+++ /dev/null
@@ -1,38 +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 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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/FruitsCatalogImpl.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/FruitsCatalogImpl.java
deleted file mode 100644
index 377b3d7e59..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/FruitsCatalogImpl.java
+++ /dev/null
@@ -1,52 +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 java.util.ArrayList;
-import java.util.List;
-
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-
-public class FruitsCatalogImpl implements Catalog {
-
- @Property
- public String currencyCode = "USD";
-
- @Reference
- public CurrencyConverter currencyConverter;
-
- private List<Item> catalog = new ArrayList<Item>();
-
- @Init
- public void init() {
- String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode);
- catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99)));
- catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55)));
- catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55)));
- }
-
- public Item[] get() {
- Item[] catalogArray = new Item[catalog.size()];
- catalog.toArray(catalogArray);
- return catalogArray;
- }
-}
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Item.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Item.java
deleted file mode 100644
index 27abd4f016..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Item.java
+++ /dev/null
@@ -1,51 +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;
-
- 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/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/ShoppingCartImpl.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/ShoppingCartImpl.java
deleted file mode 100644
index 9889921a96..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/ShoppingCartImpl.java
+++ /dev/null
@@ -1,112 +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 java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.tuscany.sca.data.collection.Entry;
-import org.apache.tuscany.sca.data.collection.NotFoundException;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Scope;
-
-@Scope("COMPOSITE")
-public class ShoppingCartImpl implements Cart, Total {
-
- private Map<String, Item> cart;
-
- @Init
- public void init() {
- cart = new HashMap<String, Item>();
- }
-
- public Entry<String, Item>[] getAll() {
- Entry<String, Item>[] entries = new Entry[cart.size()];
- int i = 0;
- for (Map.Entry<String, Item> e: cart.entrySet()) {
- entries[i++] = new Entry<String, Item>(e.getKey(), e.getValue());
- }
- return entries;
- }
-
- public Item get(String key) throws NotFoundException {
- Item item = cart.get(key);
- if (item == null) {
- throw new NotFoundException(key);
- } else {
- return item;
- }
- }
-
- public String post(String key, Item item) {
- if (key == null) {
- key ="cart-" + UUID.randomUUID().toString();
- }
- cart.put(key, item);
- return key;
- }
-
- public void put(String key, Item item) throws NotFoundException {
- if (!cart.containsKey(key)) {
- throw new NotFoundException(key);
- }
- cart.put(key, item);
- }
-
- public void delete(String key) throws NotFoundException {
- if (key == null || key.equals("")) {
- cart.clear();
- } else {
- Item item = cart.remove(key);
- if (item == null)
- throw new NotFoundException(key);
- }
- }
-
- public Entry<String, Item>[] query(String queryString) {
- List<Entry<String, Item>> entries = new ArrayList<Entry<String,Item>>();
- if (queryString.startsWith("name=")) {
- String name = queryString.substring(5);
- for (Map.Entry<String, Item> e: cart.entrySet()) {
- Item item = e.getValue();
- if (item.getName().equals(name)) {
- entries.add(new Entry<String, Item>(e.getKey(), e.getValue()));
- }
- }
- }
- return entries.toArray(new Entry[entries.size()]);
- }
-
- public String getTotal() {
- double total = 0;
- String currencySymbol = "";
- if (!cart.isEmpty()) {
- Item item = cart.values().iterator().next();
- currencySymbol = item.getPrice().substring(0, 1);
- }
- for (Item item : cart.values()) {
- total += Double.valueOf(item.getPrice().substring(1));
- }
- return currencySymbol + String.valueOf(total);
- }
-}
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Total.java b/branches/sca-java-1.5.1/samples/store-secure/src/main/java/services/Total.java
deleted file mode 100644
index 8f464e526f..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/java/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/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/definitions.xml b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/definitions.xml
deleted file mode 100644
index 140c5fd1c5..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:store="http://store">
-
-
- <sca:policySet name="widgetBindingAuthenticationPolicySet"
- provides="sca:authentication"
- appliesTo="tuscany:binding.http">
- <tuscany:authenticationConfiguration>
- <tuscany:user username="admin" password="tuscany" roles="admin"/>
- <tuscany:user username="user1" password="tuscany" roles="user"/>
- <tuscany:user username="user2" password="tuscany" roles="user"/>
- </tuscany:authenticationConfiguration>
- </sca:policySet>
-
- <sca:policySet name="widgetConfidentialityConfigurationPolicySet"
- provides="sca:confidentiality"
- appliesTo="tuscany:binding.http">
- <tuscany:confidentiality>
- <tuscany:keyStore type="JKS" file="target/classes/tuscany.keyStore" password="apache"/>
- <tuscany:trustStore type="" file="" password=""/>
- </tuscany:confidentiality>
- </sca:policySet>
-
-
-
-
-
- </sca:definitions>
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-protected.composite b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-protected.composite
deleted file mode 100644
index 5619afd8d9..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-protected.composite
+++ /dev/null
@@ -1,64 +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">
-
- <component name="Store">
- <t:implementation.widget location="uiservices/store.html"/>
- <service name="Widget">
- <t:binding.http uri="/store" requires="authentication"/>
- </service>
- <reference name="catalog" target="Catalog">
- <t:binding.jsonrpc/>
- </reference>
- <reference name="shoppingCart" target="ShoppingCart/Cart">
- <t:binding.atom/>
- </reference>
- <reference name="shoppingTotal" target="ShoppingCart/Total">
- <t:binding.jsonrpc/>
- </reference>
- </component>
-
- <component name="Catalog">
- <implementation.java class="services.FruitsCatalogImpl"/>
- <property name="currencyCode">USD</property>
- <service name="Catalog">
- <t:binding.jsonrpc/>
- </service>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
-
- <component name="ShoppingCart">
- <implementation.java class="services.ShoppingCartImpl"/>
- <service name="Cart">
- <t:binding.atom uri="/ShoppingCart/Cart"/>
- </service>
- <service name="Total">
- <t:binding.jsonrpc/>
- </service>
- </component>
-
- <component name="CurrencyConverter">
- <implementation.java class="services.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-ssl.composite b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-ssl.composite
deleted file mode 100644
index 79ef3f31a3..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store-ssl.composite
+++ /dev/null
@@ -1,64 +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">
-
- <component name="Store">
- <t:implementation.widget location="uiservices/store.html"/>
- <service name="Widget">
- <t:binding.http uri="/store" requires="confidentiality"/>
- </service>
- <reference name="catalog" target="Catalog">
- <t:binding.jsonrpc/>
- </reference>
- <reference name="shoppingCart" target="ShoppingCart/Cart">
- <t:binding.atom/>
- </reference>
- <reference name="shoppingTotal" target="ShoppingCart/Total">
- <t:binding.jsonrpc/>
- </reference>
- </component>
-
- <component name="Catalog">
- <implementation.java class="services.FruitsCatalogImpl"/>
- <property name="currencyCode">USD</property>
- <service name="Catalog">
- <t:binding.jsonrpc/>
- </service>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
-
- <component name="ShoppingCart">
- <implementation.java class="services.ShoppingCartImpl"/>
- <service name="Cart">
- <t:binding.atom uri="/ShoppingCart/Cart"/>
- </service>
- <service name="Total">
- <t:binding.jsonrpc/>
- </service>
- </component>
-
- <component name="CurrencyConverter">
- <implementation.java class="services.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store.composite b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store.composite
deleted file mode 100644
index 8aef45c53c..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/store.composite
+++ /dev/null
@@ -1,64 +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">
-
- <component name="Store">
- <t:implementation.widget location="uiservices/store.html"/>
- <service name="Widget" requires="authentication">
- <t:binding.http uri="/store"/>
- </service>
- <reference name="catalog" target="Catalog">
- <t:binding.jsonrpc/>
- </reference>
- <reference name="shoppingCart" target="ShoppingCart/Cart">
- <t:binding.atom/>
- </reference>
- <reference name="shoppingTotal" target="ShoppingCart/Total">
- <t:binding.jsonrpc/>
- </reference>
- </component>
-
- <component name="Catalog">
- <implementation.java class="services.FruitsCatalogImpl"/>
- <property name="currencyCode">USD</property>
- <service name="Catalog">
- <t:binding.jsonrpc/>
- </service>
- <reference name="currencyConverter" target="CurrencyConverter"/>
- </component>
-
- <component name="ShoppingCart">
- <implementation.java class="services.ShoppingCartImpl"/>
- <service name="Cart">
- <t:binding.atom uri="/ShoppingCart/Cart"/>
- </service>
- <service name="Total">
- <t:binding.jsonrpc/>
- </service>
- </component>
-
- <component name="CurrencyConverter">
- <implementation.java class="services.CurrencyConverterImpl"/>
- </component>
-
-</composite>
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/tuscany.keyStore b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/tuscany.keyStore
deleted file mode 100644
index 7ea23f7ff4..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/tuscany.keyStore
+++ /dev/null
Binary files differ
diff --git a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/uiservices/store.html b/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/uiservices/store.html
deleted file mode 100644
index ba004e02ac..0000000000
--- a/branches/sca-java-1.5.1/samples/store-secure/src/main/resources/uiservices/store.html
+++ /dev/null
@@ -1,162 +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>
-<title>Store</title>
-
-<script type="text/javascript" src="store.js"></script>
-
-<script language="JavaScript">
-
- //@Reference
- var catalog = new tuscany.sca.Reference("catalog");
-
- //@Reference
- var shoppingCart = new tuscany.sca.Reference("shoppingCart");
-
- //@Reference
- var shoppingTotal = new tuscany.sca.Reference("shoppingTotal");
-
- var catalogItems;
-
- function catalog_getResponse(items,exception) {
- if(exception){
- alert(exception.message);
- return;
- }
- var catalog = "";
-
- for (var i=0; i<items.length; i++) {
- var item = items[i].name + ' - ' + items[i].price;
- catalog += '<input name="items" type="checkbox" value="' +
- item + '">' + item + ' <br>';
- }
- document.getElementById('catalog').innerHTML=catalog;
- catalogItems = items;
- }
-
- function shoppingCart_getResponse(feed) {
- if (feed != null) {
- var entries = feed.getElementsByTagName("entry");
- var list = "";
- for (var i=0; i<entries.length; i++) {
- var content = entries[i].getElementsByTagName("content")[0];
- var name = content.getElementsByTagName("name")[0].firstChild.nodeValue;
- var price = content.getElementsByTagName("price")[0].firstChild.nodeValue;
- list += name + ' - ' + price + ' <br>';
- }
- document.getElementById("shoppingCart").innerHTML = list;
-
- if (entries.length != 0) {
- try {
- shoppingTotal.getTotal(shoppingTotal_getTotalResponse);
- }
- catch(e){
- alert(e);
- }
- }
- }
- }
-
- function shoppingTotal_getTotalResponse(total,exception) {
- if(exception) {
- alert(exception.message);
- return;
- }
- document.getElementById('total').innerHTML = total;
- }
-
- function shoppingCart_postResponse(entry) {
- shoppingCart.get("", shoppingCart_getResponse);
- }
-
- function addToCart() {
- var items = document.catalogForm.items;
- var j = 0;
- for (var i=0; i<items.length; i++)
- if (items[i].checked) {
-
- var entry = '<entry xmlns="http://www.w3.org/2005/Atom"><title>item</title><content type="text/xml">' +
- '<Item xmlns="http://services/">' +
- '<name xmlns="">' + catalogItems[i].name + '</name>' + '<price xmlns="">' + catalogItems[i].price + '</price>' +
- '</Item>' + '</content></entry>';
- shoppingCart.post(entry, 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.del("", null);
- }
- function deleteCart() {
- shoppingCart.del("", null);
- document.getElementById('shoppingCart').innerHTML = "";
- document.getElementById('total').innerHTML = "";
- }
-
- function init() {
-
- try {
- catalog.get(catalog_getResponse);
- shoppingCart.get("", shoppingCart_getResponse);
- }
- catch(e){
- alert(e);
- }
- }
-
-</script>
-
-</head>
-
-<body onload="init()">
-<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">
- <a href="../ShoppingCart/Cart/">(feed)</a>
- </form>
- </div>
-</body>
-</html>