diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-27 22:09:18 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-27 22:09:18 +0000 |
commit | f94a2904efd56b82c437c29eba14d09773b4d651 (patch) | |
tree | 5c1cd8e1a671ce9423fe7ecdb298f1cde748d61e /sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java | |
parent | 57301b4c29de5847993f3f522a27adea5a9a8d1b (diff) |
Refactoring common artifacts to store-assets module
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830361 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java')
-rw-r--r-- | sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java b/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.java deleted file mode 100644 index d185a2fe83..0000000000 --- a/sandbox/sca-cloud-tutorial/store-appengine-webapp/src/services/CurrencyConverterImpl.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 services; - -import org.oasisopen.sca.annotation.Service; - -@Service(CurrencyConverter.class) -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 "?"; - } -} |