Author: slaws
Date: Mon Jul 28 01:04:28 2008
New Revision: 680280

URL: http://svn.apache.org/viewvc?rev=680280&view=rev
Log:
Rename and reorganize

Added:
    tuscany/sandbox/travelsample/currency-contribution/
    tuscany/sandbox/travelsample/currency-contribution/META-INF/
    
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
   (with props)
    tuscany/sandbox/travelsample/currency-contribution/pom.xml   (with props)
    tuscany/sandbox/travelsample/currency-contribution/src/
    tuscany/sandbox/travelsample/currency-contribution/src/scatours/
    
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/
    
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
   (with props)
    
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
   (with props)
Removed:
    tuscany/sandbox/travelsample/currencyconverter/

Added: 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml?rev=680280&view=auto
==============================================================================
--- 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
 (added)
+++ 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
 Mon Jul 28 01:04:28 2008
@@ -0,0 +1,22 @@
+<?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";>
+   <export.java package="scatours.currencyconverter"/>
+</contribution>
\ No newline at end of file

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/travelsample/currency-contribution/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/currency-contribution/pom.xml?rev=680280&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/currency-contribution/pom.xml (added)
+++ tuscany/sandbox/travelsample/currency-contribution/pom.xml Mon Jul 28 
01:04:28 2008
@@ -0,0 +1,63 @@
+<?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-sca</artifactId>
+        <version>1.4-SNAPSHOT</version>
+        <!--relativePath>../../pom.xml</relativePath-->
+    </parent>
+    <artifactId>scatours-currency-contribution</artifactId>
+    <name>Apache Tuscany SCA Tours Currency Converter Contribution</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+       <sourceDirectory>${basedir}/src</sourceDirectory>
+       <resources>
+          <resource>
+              <directory>${basedir}/resources</directory>
+          </resource>
+       </resources>
+    </build>
+</project>

Propchange: tuscany/sandbox/travelsample/currency-contribution/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/currency-contribution/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/currency-contribution/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java?rev=680280&view=auto
==============================================================================
--- 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
 (added)
+++ 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
 Mon Jul 28 01:04:28 2008
@@ -0,0 +1,33 @@
+/*
+ * 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 scatours.currencyconverter;
+
+/**
+ * The CurrencyConverter service interface
+ */
+public interface CurrencyConverter {
+
+    double getExchangeRate(String fromCurrencyCode, 
+                           String toCurrencyCode);
+    
+    double convert(String fromCurrencyCode, 
+                   String toCurrencyCode, 
+                   double amount);    
+
+}

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java?rev=680280&view=auto
==============================================================================
--- 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
 (added)
+++ 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
 Mon Jul 28 01:04:28 2008
@@ -0,0 +1,37 @@
+/*
+ * 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 scatours.currencyconverter;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of the CurrencyConverter service
+ */
[EMAIL PROTECTED](interfaces={CurrencyConverter.class})
+public class CurrencyConverterImpl implements CurrencyConverter {
+
+    public double getExchangeRate(String fromCurrencyCode, String 
toCurrencyCode){
+        // regardless of which currencies are specified return the same value
+        return 1.98;
+    } 
+
+    public double convert(String fromCurrencyCode, String toCurrencyCode, 
double amount){
+        return amount * getExchangeRate(fromCurrencyCode, toCurrencyCode);
+    }
+}

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/currency-contribution/src/scatours/currencyconverter/CurrencyConverterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date


Reply via email to