diff options
Diffstat (limited to '')
-rw-r--r-- | sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java index 5290623487..c480991ef7 100644 --- a/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java +++ b/sandbox/sca-cloud-tutorial/store-assets/src/main/java/services/FruitsCatalogImpl.java @@ -14,6 +14,7 @@ import org.oasisopen.sca.annotation.Service; public class FruitsCatalogImpl implements Catalog { @Property public String currencyCode = "USD"; + @Reference public CurrencyConverter currencyConverter; @@ -22,12 +23,9 @@ public class FruitsCatalogImpl implements Catalog { @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))); + catalog.add(new Item("Apple", currencyCode, currencySymbol, currencyConverter.getConversion("USD", currencyCode, 2.99))); + catalog.add(new Item("Orange", currencyCode, currencySymbol, currencyConverter.getConversion("USD", currencyCode, 3.55))); + catalog.add(new Item("Pear", currencyCode, currencySymbol, currencyConverter.getConversion("USD", currencyCode, 1.55))); } public Item[] get() { |