You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/10/27 02:42:27 UTC
svn commit: r588823 - in /incubator/tuscany/java/sca/tutorial: ./ cloud/
cloud/launch/ cloud/services/
Author: jsdelfino
Date: Fri Oct 26 17:42:25 2007
New Revision: 588823
URL: http://svn.apache.org/viewvc?rev=588823&view=rev
Log:
Added a service cloud module containing all the services from the store application.
Added:
incubator/tuscany/java/sca/tutorial/cloud/ (with props)
incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite (with props)
incubator/tuscany/java/sca/tutorial/cloud/currency.composite (with props)
incubator/tuscany/java/sca/tutorial/cloud/launch/
incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/pom.xml (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/
incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java (with props)
incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java (with props)
Modified:
incubator/tuscany/java/sca/tutorial/pom.xml
Propchange: incubator/tuscany/java/sca/tutorial/cloud/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 26 17:42:25 2007
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+build.xml
+
Added: incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite Fri Oct 26 17:42:25 2007
@@ -0,0 +1,35 @@
+<?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://cloud"
+ name="catalogs">
+
+ <component name="FruitsCatalog">
+ <implementation.java class="services.FruitsCatalogImpl"/>
+ <property name="currencyCode">USD</property>
+ <reference name="currencyConverter" target="CurrencyConverter"/>
+ </component>
+
+ <component name="VegetablesCatalog">
+ <implementation.java class="services.VegetablesCatalogImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/tutorial/cloud/catalogs.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/currency.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/currency.composite?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/currency.composite (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/currency.composite Fri Oct 26 17:42:25 2007
@@ -0,0 +1,29 @@
+<?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://cloud"
+ name="currency">
+
+ <component name="CurrencyConverter">
+ <implementation.java class="services.CurrencyConverterImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/tutorial/cloud/currency.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/currency.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,65 @@
+/*
+ * 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 java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.domain.SCADomain;
+import org.apache.tuscany.sca.domain.SCADomainFactory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.util.SCAContributionUtil;
+
+
+public class LaunchCloud {
+ public static void main(String[] args) throws Exception {
+
+ System.out.println("Starting ...");
+ SCADomainFactory domainFactory = SCADomainFactory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ SCADomain domain = domainFactory.createSCADomain("http://localhost:9999");
+ System.out.println("Domain controller ready for big business !!!");
+
+ SCANode catalogsNode = nodeFactory.createSCANode("http://localhost:8200/cloud", "http://localhost:9999");
+ URL catalogsContribution = SCAContributionUtil.findContributionFromClass(LaunchCloud.class);
+ catalogsNode.addContribution("http://cloud", catalogsContribution);
+ catalogsNode.addToDomainLevelComposite(new QName("http://cloud", "catalogs"));
+ catalogsNode.start();
+ System.out.println("catalogs.composite ready for big business !!!");
+
+ SCANode currencyNode = nodeFactory.createSCANode("http://localhost:8300/cloud", "http://localhost:9999");
+ URL currencyContribution = SCAContributionUtil.findContributionFromClass(LaunchCloud.class);
+ currencyNode.addContribution("http://cloud", currencyContribution);
+ currencyNode.addToDomainLevelComposite(new QName("http://cloud", "currency"));
+ currencyNode.start();
+ System.out.println("currency.composite ready for big business !!!");
+
+ System.in.read();
+ System.out.println("Stopping ...");
+ currencyNode.destroy();
+ catalogsNode.destroy();
+ domain.destroy();
+ System.out.println();
+ System.exit(0);
+ }
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/pom.xml?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/pom.xml (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/pom.xml Fri Oct 26 17:42:25 2007
@@ -0,0 +1,114 @@
+<?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-tutorial</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>cloud</artifactId>
+ <name>Apache Tuscany Cloud Tutorial</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-axis2</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.1-incubating-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}</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ <exclude>**/.*/**</exclude>
+ <exclude>pom.xml</exclude>
+ <exclude>build.xml</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-ant-generator</artifactId>
+ <version>1.1-incubating-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <configuration>
+ <mainClass>launch.LaunchCloud</mainClass>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: incubator/tuscany/java/sca/tutorial/cloud/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,27 @@
+/*
+ * 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 {
+ String[] get();
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/Catalog.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,29 @@
+/*
+ * 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);
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,38 @@
+/*
+ * 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 amount * 0.7256;
+ return 0;
+ }
+
+ public String getCurrencySymbol(String currencyCode) {
+ if (currencyCode.equals("USD"))
+ return "$";
+ else if (currencyCode.equals("EUR"))
+ return "â¬";
+ return "?";
+ }
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/CurrencyConverterImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,52 @@
+/*
+ * 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<String> catalog = new ArrayList<String>();
+
+ @Init
+ public void init() {
+ String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode);
+ catalog.add("Apple - " + currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99));
+ catalog.add("Orange - " + currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55));
+ catalog.add("Pear - " + currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55));
+ }
+
+ public String[] get() {
+ String[] catalogArray = new String[catalog.size()];
+ catalog.toArray(catalogArray);
+ return catalogArray;
+ }
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/FruitsCatalogImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+/**
+ * Vegetables
+ *
+ * @version $Rev$ $Date$
+ */
+public class Vegetables {
+
+ public String[] items;
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/Vegetables.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,29 @@
+/*
+ * 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 VegetablesCatalog {
+
+ Vegetables get();
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalog.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java?rev=588823&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java Fri Oct 26 17:42:25 2007
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+public class VegetablesCatalogImpl implements VegetablesCatalog {
+ private List<String> catalog = new ArrayList<String>();
+
+ @Init
+ public void init() {
+ catalog.add("Broccoli - $2.99");
+ catalog.add("Asparagus - $3.55");
+ catalog.add("Cauliflower - $1.55");
+ }
+
+ public Vegetables get() {
+ Vegetables vegetables = new Vegetables();
+ vegetables.items = new String[catalog.size()];
+ catalog.toArray(vegetables.items);
+ return vegetables;
+ }
+}
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/cloud/services/VegetablesCatalogImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/tutorial/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/pom.xml?rev=588823&r1=588822&r2=588823&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/pom.xml Fri Oct 26 17:42:25 2007
@@ -36,6 +36,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
+ <module>cloud</module>
<module>store</module>
<module>store-cart</module>
<module>store-catalog</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org