diff options
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/samples/store-vhost/domains/jane/currency-converter.py (renamed from sca-cpp/trunk/samples/store-vhost/currency-converter.py) | 0 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/store-vhost/domains/jane/fruits-catalog.py | 30 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/store-vhost/domains/jane/shopping-cart.py (renamed from sca-cpp/trunk/samples/store-vhost/shopping-cart.py) | 0 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/store-vhost/domains/jane/store.composite (renamed from sca-cpp/trunk/samples/store-vhost/store.composite) | 2 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/store-vhost/domains/jane/store.py (renamed from sca-cpp/trunk/samples/store-vhost/store.py) | 0 |
5 files changed, 31 insertions, 1 deletions
diff --git a/sca-cpp/trunk/samples/store-vhost/currency-converter.py b/sca-cpp/trunk/samples/store-vhost/domains/jane/currency-converter.py index 2fded8f616..2fded8f616 100644 --- a/sca-cpp/trunk/samples/store-vhost/currency-converter.py +++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/currency-converter.py diff --git a/sca-cpp/trunk/samples/store-vhost/domains/jane/fruits-catalog.py b/sca-cpp/trunk/samples/store-vhost/domains/jane/fruits-catalog.py new file mode 100644 index 0000000000..3d108f42eb --- /dev/null +++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/fruits-catalog.py @@ -0,0 +1,30 @@ +# 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. + +# Catalog implementation + +def getcatalog(converter, currencyCode): + code = currencyCode() + def convert(price): + return converter("convert", "USD", code, price) + symbol = converter("symbol", code) + return ( + (("'javaClass", "services.Item"), ("'name", "Passion"), ("'currencyCode", code), ("'currencySymbol", symbol), ("'price", convert(2.99))), + (("'javaClass", "services.Item"), ("'name", "Mango"), ("'currencyCode", code), ("'currencySymbol", symbol), ("'price", convert(3.55))), + (("'javaClass", "services.Item"), ("'name", "Pineapple"), ("'currencyCode", code), ("'currencySymbol", symbol), ("'price", convert(1.55))) + ) + diff --git a/sca-cpp/trunk/samples/store-vhost/shopping-cart.py b/sca-cpp/trunk/samples/store-vhost/domains/jane/shopping-cart.py index 405adb85bf..405adb85bf 100644 --- a/sca-cpp/trunk/samples/store-vhost/shopping-cart.py +++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/shopping-cart.py diff --git a/sca-cpp/trunk/samples/store-vhost/store.composite b/sca-cpp/trunk/samples/store-vhost/domains/jane/store.composite index 045ebe6ec5..893b4f0ed4 100644 --- a/sca-cpp/trunk/samples/store-vhost/store.composite +++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/store.composite @@ -60,7 +60,7 @@ </component> <component name="Cache"> - <implementation.cpp path="../../components/cache" library="libmemcache"/> + <implementation.cpp path="../../../../components/cache" library="libmemcache"/> <service name="Cache"> <t:binding.atom uri="cache"/> </service> diff --git a/sca-cpp/trunk/samples/store-vhost/store.py b/sca-cpp/trunk/samples/store-vhost/domains/jane/store.py index 0b4e0f72fd..0b4e0f72fd 100644 --- a/sca-cpp/trunk/samples/store-vhost/store.py +++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/store.py |