You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2008/07/31 19:33:52 UTC

svn commit: r681423 [2/2] - in /felix/sandbox/clement/ipojo-tutorials/advanced.tutorial: ./ felix/ felix/bin/ felix/bundle/ felix/conf/ felix/ipojo/ tasks/ vendor.buns-and-wieners/ vendor.buns-and-wieners/src/ vendor.buns-and-wieners/src/org/ vendor.bu...

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDog.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDog.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDog.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDog.java Thu Jul 31 10:33:48 2008
@@ -0,0 +1,46 @@
+/* 
+ * 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 org.apache.felix.ipojo.example.vendor.hotdog;
+
+import org.apache.felix.ipojo.example.vendor.service.Product;
+
+/**
+ * A hotdog implementation.
+ */
+public class HotDog implements Product {
+
+    /**
+     * Returns the store location.
+     * @return 'Fenway Park'
+     * @see org.apache.felix.ipojo.example.vendor.service.Product#getProductOrigin()
+     */
+    public String getProductOrigin() {
+        return "Fenway Park";
+    }
+
+    /**
+     * Returns the product type
+     * @return 'hotdog'
+     * @see org.apache.felix.ipojo.example.vendor.service.Product#getProductType()
+     */
+    public String getProductType() {
+        return "Hotdog";
+    }
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDogVendor.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDogVendor.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDogVendor.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/src/org/apache/felix/ipojo/example/vendor/hotdog/HotDogVendor.java Thu Jul 31 10:33:48 2008
@@ -0,0 +1,55 @@
+/* 
+ * 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 org.apache.felix.ipojo.example.vendor.hotdog;
+
+import org.apache.felix.ipojo.example.vendor.service.Product;
+import org.apache.felix.ipojo.example.vendor.service.Vendor;
+import org.apache.felix.ipojo.example.vendor.service.ingredient.Bun;
+import org.apache.felix.ipojo.example.vendor.service.ingredient.Wiener;
+
+/**
+ * An hotdog vendor implementation.
+ * To sell hotdog, the vendor requires both a WienerService and a BunService.
+ */
+public class HotDogVendor implements Vendor {
+    
+    /**
+     * Bun provider (required service).
+     */
+    private Bun bunProvider;
+    
+    /**
+     * Wiener provider (required service). 
+     */
+    private Wiener wienerProvider;
+    
+    /**
+     * Sell method.
+     * To provide an hotdog, the vendor consume a bun and a wiener.
+     * This method is synchronized to avoid serving to client at the same time.
+     * @return a hotdog.
+     * @see org.apache.felix.ipojo.example.vendor.service.Vendor#sell()
+     */
+    public synchronized Product sell() {
+        bunProvider.getBun();
+        wienerProvider.getWiener();
+        return new HotDog();
+    }
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/vendor.hotdog.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/vendor.hotdog.bnd?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/vendor.hotdog.bnd (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.hotdog/vendor.hotdog.bnd Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+Private-Package: org.apache.felix.ipojo.example.vendor.hotdog 

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/build.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/build.xml?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/build.xml (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/build.xml Thu Jul 31 10:33:48 2008
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+
+<project name="vendor.popcorn" default="package" basedir=".">
+
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-0.0.223.jar"/>
+	<taskdef name="ipojo" classpath="../tasks/org.apache.felix.ipojo.ant-0.8.1.jar" 
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+	</target>
+
+	<target name="clean-all" depends="clean">
+		<delete dir="${lib.dir}"/>
+	</target>
+
+	<target name="buildclasspath">
+		<copy file="../vendor.services/output/vendor.services.jar" todir="${lib.dir}"/>
+	</target>
+
+	<target name="compile" depends="clean, buildclasspath">
+
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+				 classpath="libs/vendor.services.jar"
+		  />
+
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+
+		<ipojo
+				input="${output.dir}/${ant.project.name}.jar"
+				metadata="metadata.xml"
+		/>
+	</target>
+
+</project>

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/metadata.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/metadata.xml?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/metadata.xml (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/metadata.xml Thu Jul 31 10:33:48 2008
@@ -0,0 +1,13 @@
+<ipojo>
+<component classname="org.apache.felix.ipojo.example.vendor.popcorn.PopCornVendor" name="popcorn" architecture="true">
+	<provides/>
+	<controller field="m_can_sell"/>
+	<properties>
+		<property name="stock" method="refillStock" value="5"/>
+	</properties>
+</component>
+
+<instance component="popcorn" name="SuperPopCorn">
+	<property name="managed.service.pid" value="Super.PopCorn.Stock"/>
+</instance>
+</ipojo>
\ No newline at end of file

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCorn.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCorn.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCorn.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCorn.java Thu Jul 31 10:33:48 2008
@@ -0,0 +1,51 @@
+/* 
+ * 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 org.apache.felix.ipojo.example.vendor.popcorn;
+
+import org.apache.felix.ipojo.example.vendor.service.Product;
+
+/**
+ * A popcorn implementation.
+ */
+public class PopCorn implements Product {
+    
+    /**
+     * Special product to describe that there is no more pop corn. 
+     */
+    public static final Product NO_MORE_POPCORN = new Product() {
+        public String getProductOrigin() {
+            return "D & P";
+        }
+
+        public String getProductType() {
+            return "no more pop corn";
+        }
+    };
+        
+    
+
+    public String getProductOrigin() {
+        return "D & P";
+    }
+
+    public String getProductType() {
+        return "popcorn";
+    }
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCornVendor.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCornVendor.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCornVendor.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/src/org/apache/felix/ipojo/example/vendor/popcorn/PopCornVendor.java Thu Jul 31 10:33:48 2008
@@ -0,0 +1,73 @@
+/* 
+ * 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 org.apache.felix.ipojo.example.vendor.popcorn;
+
+import org.apache.felix.ipojo.example.vendor.service.Product;
+import org.apache.felix.ipojo.example.vendor.service.Vendor;
+
+/**
+ * A popcorn vendor implementation.
+ * To sell popcorn, the vendor use corn. This implementation manage its own corn stock.
+ */
+public class PopCornVendor implements Vendor {
+    
+    /**
+     * The corn stock.
+     */
+    private int m_corn_stock;
+    
+    /**
+     * Lifecycle controller.
+     * If set to false, the instance becomes invalid. 
+     */
+    private boolean m_can_sell = true;
+
+    /**
+     * The sell method.
+     * To provide popcorn, the vendor needs to decrease its corn stock level.
+     * This method is synchronized to avoid to client being serve at the same time. 
+     * @return
+     * @see org.apache.felix.ipojo.example.vendor.service.Vendor#sell()
+     */
+    public synchronized Product sell() {
+        m_corn_stock--;
+        if (m_corn_stock == 0 && m_can_sell) { // Last pop corn
+            m_can_sell = false;
+            System.out.println("Stop selling popcorn ... Run out of stock");
+            return new PopCorn();
+        } else if (m_corn_stock > 0) { // Normal case
+            return new PopCorn();
+        } else { // Cannot serve.
+            return PopCorn.NO_MORE_POPCORN;
+        }
+    }
+    
+    /**
+     * A transporter refills the stock of corn.
+     * This method is synchronized to avoid to client being served during the update.
+     * @param newStock : the stock of corn to add to the current stock.
+     */
+    public synchronized void refillStock(int newStock) {
+        m_corn_stock += newStock;
+        System.out.println("Refill the stock : " + m_corn_stock);
+        if (m_corn_stock > 0) {
+            m_can_sell = true;
+        }
+    }
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/vendor.popcorn.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/vendor.popcorn.bnd?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/vendor.popcorn.bnd (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.popcorn/vendor.popcorn.bnd Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+Private-Package: org.apache.felix.ipojo.example.vendor.popcorn

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/build.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/build.xml?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/build.xml (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/build.xml Thu Jul 31 10:33:48 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+
+<project name="vendor.services" default="package" basedir=".">
+	
+	<property name="src.dir" value="src"/>
+	<property name="lib.dir" value="libs"/>
+	<property name="build.dir" value="output/classes"/>
+	<property name="output.dir" value="output"/>
+	
+	<taskdef resource="aQute/bnd/ant/taskdef.properties"
+		      classpath="../tasks/bnd-0.0.223.jar"/>
+	<taskdef name="ipojo" classpath="../tasks/org.apache.felix.ipojo.ant-0.8.1.jar" 
+		classname="org.apache.felix.ipojo.task.IPojoTask"/>
+	
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+		<delete dir="${output.dir}"/>
+	</target>
+
+	<target name="compile" depends="clean">
+
+		<mkdir dir="${output.dir}"/>
+		<mkdir dir="${build.dir}"/>
+
+		<javac   srcdir="${src.dir}"
+		         destdir="${build.dir}"
+		         debug="on"
+		  />
+	</target>
+
+	<target name="package" depends="compile">
+		<bnd
+	   	  classpath="${build.dir}" 
+	      failok="false" 
+	      exceptions="true" 
+	      files="${ant.project.name}.bnd"
+		  output="${output.dir}"/>
+	</target>
+
+</project>

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Product.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Product.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Product.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Product.java Thu Jul 31 10:33:48 2008
@@ -0,0 +1,39 @@
+/* 
+ * 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 org.apache.felix.ipojo.example.vendor.service;
+
+/**
+ * A sold product.
+ * Products are sold by Vendors.
+ */
+public interface Product {
+    
+    /**
+     * Gets the product type.
+     * @return the product type. 
+     */
+    String getProductType();
+    
+    /**
+     * Gets the product origin.
+     * @return the product store location.?
+     */
+    String getProductOrigin();
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Vendor.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Vendor.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Vendor.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/Vendor.java Thu Jul 31 10:33:48 2008
@@ -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.
+ */
+package org.apache.felix.ipojo.example.vendor.service;
+
+/**
+ * Vendor service interface.
+ */
+public interface Vendor {
+    /**
+     * Sells a product.
+     * @return the sold product. 
+     */
+    public Product sell();
+}

Propchange: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+dist
output*

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Bun.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Bun.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Bun.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Bun.java Thu Jul 31 10:33:48 2008
@@ -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 org.apache.felix.ipojo.example.vendor.service.ingredient;
+
+/**
+ * A very simple service interface to get buns.
+ */
+public interface Bun {
+    
+    /**
+     * Gets a bun
+     */
+    void getBun();
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Wiener.java
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Wiener.java?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Wiener.java (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/src/org/apache/felix/ipojo/example/vendor/service/ingredient/Wiener.java Thu Jul 31 10:33:48 2008
@@ -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 org.apache.felix.ipojo.example.vendor.service.ingredient;
+
+/**
+ * A very simple service interface to get wieners.
+ */
+public interface Wiener {
+    
+    /**
+     * Gets a wiener.
+     */
+    void getWiener();
+
+}

Added: felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/vendor.services.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/vendor.services.bnd?rev=681423&view=auto
==============================================================================
--- felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/vendor.services.bnd (added)
+++ felix/sandbox/clement/ipojo-tutorials/advanced.tutorial/vendor.services/vendor.services.bnd Thu Jul 31 10:33:48 2008
@@ -0,0 +1 @@
+Export-Package: org.apache.felix.ipojo.example.vendor.service, org.apache.felix.ipojo.example.vendor.service.ingredient