Mail Archive Home | gotm-commits List | December 2004 Index
| <-- Date Index | <-- Thread Index |
Date: Tuesday, December 21, 2004 @ 11:48:04
Author: serrano
Path: /cvsroot/gotm/gotm-drink
Added:
src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoMakerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcChocolateBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcChocolateMakerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcCoffeBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcCoffeMakerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcCupBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcDrinkItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcDrinkMakerServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcMilkBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcRobinetServerItf.fractal
src/fractal/org/objectweb/gotm/drink/api/FcSuggarBoxServerItf.fractal
src/fractal/org/objectweb/gotm/drink/comp/FcDrinkComposite.fractal
src/fractal/org/objectweb/gotm/drink/comp/FcIngredientsComposite.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoBoxComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoMakerComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcChocolateBoxComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcChocolateMakerComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcCoffeBoxComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcCoffeMakerComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcCupBoxComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcDrinkDispatcherComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcMilkBoxComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcRobinetComponent.fractal
src/fractal/org/objectweb/gotm/drink/lib/FcSuggarBoxComponent.fractal
src/java/org/objectweb/gotm/drink/api/ChocolateBoxItf.java
src/java/org/objectweb/gotm/drink/api/CoffeBoxItf.java
src/java/org/objectweb/gotm/drink/api/CupBoxItf.java
src/java/org/objectweb/gotm/drink/api/DrinkDispatcherItf.java
src/java/org/objectweb/gotm/drink/api/DrinkMakerItf.java
src/java/org/objectweb/gotm/drink/api/IngredientBoxItf.java
src/java/org/objectweb/gotm/drink/api/IngredientItf.java
src/java/org/objectweb/gotm/drink/api/MilkBoxItf.java
src/java/org/objectweb/gotm/drink/api/RobinetItf.java
src/java/org/objectweb/gotm/drink/api/SuggarBoxItf.java
src/java/org/objectweb/gotm/drink/lib/CapuccinoMakerComponent.java
src/java/org/objectweb/gotm/drink/lib/Chocolate.java
src/java/org/objectweb/gotm/drink/lib/ChocolateBoxComponent.java
src/java/org/objectweb/gotm/drink/lib/ChocolateMakerComponent.java
src/java/org/objectweb/gotm/drink/lib/Coffe.java
src/java/org/objectweb/gotm/drink/lib/CoffeBoxComponent.java
src/java/org/objectweb/gotm/drink/lib/CoffeMakerComponent.java
src/java/org/objectweb/gotm/drink/lib/Cup.java
src/java/org/objectweb/gotm/drink/lib/CupBoxComponent.java
src/java/org/objectweb/gotm/drink/lib/DrinkDispatcherComponent.java
src/java/org/objectweb/gotm/drink/lib/Milk.java
src/java/org/objectweb/gotm/drink/lib/MilkBoxComponent.java
src/java/org/objectweb/gotm/drink/lib/RobinetComponent.java
src/java/org/objectweb/gotm/drink/lib/Suggar.java
src/java/org/objectweb/gotm/drink/lib/SuggarBoxComponent.java
src/java/org/objectweb/gotm/drink/lib/Water.java
Modified: .classpath .cvsignore
src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal
src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal
src/java/org/objectweb/gotm/drink/lib/AccountComponent.java
src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java
Component for the drink machine
-----------------------------------------------------------------------------+
.classpath
| 1
.cvsignore
| 1
src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoMakerItf.fractal
| 13 +
src/fractal/org/objectweb/gotm/drink/api/FcChocolateBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcChocolateMakerItf.fractal
| 11
src/fractal/org/objectweb/gotm/drink/api/FcCoffeBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcCoffeMakerItf.fractal
| 11
src/fractal/org/objectweb/gotm/drink/api/FcCupBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcDrinkItf.fractal
| 14 +
src/fractal/org/objectweb/gotm/drink/api/FcDrinkMakerServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcMilkBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcRobinetServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/api/FcSuggarBoxServerItf.fractal
| 8
src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal
| 1
src/fractal/org/objectweb/gotm/drink/comp/FcDrinkComposite.fractal
| 57 ++++
src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal
| 24 +
src/fractal/org/objectweb/gotm/drink/comp/FcIngredientsComposite.fractal
| 34 ++
src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoBoxComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoMakerComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcChocolateBoxComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcChocolateMakerComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcCoffeBoxComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcCoffeMakerComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcCupBoxComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcDrinkDispatcherComponent.fractal
| 15 +
src/fractal/org/objectweb/gotm/drink/lib/FcMilkBoxComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcRobinetComponent.fractal
| 9
src/fractal/org/objectweb/gotm/drink/lib/FcSuggarBoxComponent.fractal
| 9
src/java/org/objectweb/gotm/drink/api/ChocolateBoxItf.java
| 22 +
src/java/org/objectweb/gotm/drink/api/CoffeBoxItf.java
| 22 +
src/java/org/objectweb/gotm/drink/api/CupBoxItf.java
| 22 +
src/java/org/objectweb/gotm/drink/api/DrinkDispatcherItf.java
| 22 +
src/java/org/objectweb/gotm/drink/api/DrinkMakerItf.java
| 22 +
src/java/org/objectweb/gotm/drink/api/IngredientBoxItf.java
| 23 +
src/java/org/objectweb/gotm/drink/api/IngredientItf.java
| 20 +
src/java/org/objectweb/gotm/drink/api/MilkBoxItf.java
| 23 +
src/java/org/objectweb/gotm/drink/api/RobinetItf.java
| 23 +
src/java/org/objectweb/gotm/drink/api/SuggarBoxItf.java
| 23 +
src/java/org/objectweb/gotm/drink/lib/AccountComponent.java
| 3
src/java/org/objectweb/gotm/drink/lib/CapuccinoMakerComponent.java
| 130 ++++++++++
src/java/org/objectweb/gotm/drink/lib/Chocolate.java
| 22 +
src/java/org/objectweb/gotm/drink/lib/ChocolateBoxComponent.java
| 69 +++++
src/java/org/objectweb/gotm/drink/lib/ChocolateMakerComponent.java
| 102 +++++++
src/java/org/objectweb/gotm/drink/lib/Coffe.java
| 25 +
src/java/org/objectweb/gotm/drink/lib/CoffeBoxComponent.java
| 67 +++++
src/java/org/objectweb/gotm/drink/lib/CoffeMakerComponent.java
| 100 +++++++
src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java
| 4
src/java/org/objectweb/gotm/drink/lib/Cup.java
| 43 +++
src/java/org/objectweb/gotm/drink/lib/CupBoxComponent.java
| 65 +++++
src/java/org/objectweb/gotm/drink/lib/DrinkDispatcherComponent.java
| 98 +++++++
src/java/org/objectweb/gotm/drink/lib/Milk.java
| 23 +
src/java/org/objectweb/gotm/drink/lib/MilkBoxComponent.java
| 60 ++++
src/java/org/objectweb/gotm/drink/lib/RobinetComponent.java
| 62 ++++
src/java/org/objectweb/gotm/drink/lib/Suggar.java
| 23 +
src/java/org/objectweb/gotm/drink/lib/SuggarBoxComponent.java
| 64 ++++
src/java/org/objectweb/gotm/drink/lib/Water.java
| 23 +
59 files changed, 1551 insertions(+), 6 deletions(-)
Index: gotm-drink/.classpath
diff -u gotm-drink/.classpath:1.2 gotm-drink/.classpath:1.3
--- gotm-drink/.classpath:1.2 Fri Nov 19 19:20:18 2004
+++ gotm-drink/.classpath Tue Dec 21 11:48:04 2004
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/fractal"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="externals/fractal/fractal.jar"/>
<classpathentry kind="lib" path="externals/monolog/ow_monolog.jar"/>
Index: gotm-drink/.cvsignore
diff -u gotm-drink/.cvsignore:1.2 gotm-drink/.cvsignore:1.3
--- gotm-drink/.cvsignore:1.2 Fri Nov 19 19:20:18 2004
+++ gotm-drink/.cvsignore Tue Dec 21 11:48:04 2004
@@ -1,2 +1,3 @@
bin
build
+hs_err_pid860.log
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcCapuccinoBoxServerItf">
+ <interface name="capuccino-box" role="server"
signature="org.objectweb.gotm.drink.api.CapuccinoBoxItf"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoMakerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoMakerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCapuccinoMakerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcCapuccinoMakerItf"
extends="org.objectweb.gotm.drink.api.FcDrinkMakerServerItf">
+ <interface name="cup-box"
signature="org.objectweb.gotm.drink.api.CupBoxItf" role="client"/>
+ <interface name="suggar-box"
signature="org.objectweb.gotm.drink.api.SuggarBoxItf" role="client"/>
+ <interface name="coffe-box"
signature="org.objectweb.gotm.drink.api.CoffeBoxItf" role="client"/>
+ <interface name="chocolate-box"
signature="org.objectweb.gotm.drink.api.ChocolateBoxItf" role="client"/>
+ <interface name="milk-box"
signature="org.objectweb.gotm.drink.api.MilkBoxItf" role="client"/>
+ <interface name="robinet"
signature="org.objectweb.gotm.drink.api.RobinetItf" role="client"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcChocolateBoxServerItf">
+ <interface name="chocolate-box" role="server"
signature="org.objectweb.gotm.drink.api.ChocolateBoxItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateMakerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateMakerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcChocolateMakerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcChocolateMakerItf"
extends="org.objectweb.gotm.drink.api.FcDrinkMakerServerItf">
+ <interface name="cup-box"
signature="org.objectweb.gotm.drink.api.CupBoxItf" role="client"/>
+ <interface name="suggar-box"
signature="org.objectweb.gotm.drink.api.SuggarBoxItf" role="client"/>
+ <interface name="chocolate-box"
signature="org.objectweb.gotm.drink.api.ChocolateBoxItf" role="client"/>
+ <interface name="robinet"
signature="org.objectweb.gotm.drink.api.RobinetItf" role="client"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcCoffeBoxServerItf">
+ <interface name="coffe-box" role="server"
signature="org.objectweb.gotm.drink.api.CoffeBoxItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeMakerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeMakerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCoffeMakerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcCoffeMakerItf"
extends="org.objectweb.gotm.drink.api.FcDrinkMakerServerItf">
+ <interface name="cup-box"
signature="org.objectweb.gotm.drink.api.CupBoxItf" role="client"/>
+ <interface name="suggar-box"
signature="org.objectweb.gotm.drink.api.SuggarBoxItf" role="client"/>
+ <interface name="coffe-box"
signature="org.objectweb.gotm.drink.api.CoffeBoxItf" role="client"/>
+ <interface name="robinet"
signature="org.objectweb.gotm.drink.api.RobinetItf" role="client"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCupBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCupBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcCupBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcCupBoxServerItf">
+ <interface name="cup-box" role="server"
signature="org.objectweb.gotm.drink.api.CupBoxItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcDrinkDispatcherItf"
+ extends="org.objectweb.gotm.drink.api.FcDrinkDispatcherServerItf">
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkDispatcherServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcDrinkDispatcherServerItf">
+ <interface name="drink-dispatcher" role="server"
signature="org.objectweb.gotm.drink.api.DrinkDispatcherItf" />
+</definition>
Index: gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcDrinkItf"
+ extends="org.objectweb.gotm.drink.api.FcDrinkDispatcherServerItf">
+ <interface name="cup-box"
signature="org.objectweb.gotm.drink.api.CupBoxItf" role="client"/>
+ <interface name="suggar-box"
signature="org.objectweb.gotm.drink.api.SuggarBoxItf" role="client"/>
+ <interface name="coffe-box"
signature="org.objectweb.gotm.drink.api.CoffeBoxItf" role="client"/>
+ <interface name="chocolate-box"
signature="org.objectweb.gotm.drink.api.ChocolateBoxItf" role="client"/>
+ <interface name="milk-box"
signature="org.objectweb.gotm.drink.api.MilkBoxItf" role="client"/>
+ <interface name="robinet"
signature="org.objectweb.gotm.drink.api.RobinetItf" role="client"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkMakerServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkMakerServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcDrinkMakerServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcDrinkMakerServerItf">
+ <interface name="drink-maker" role="server"
signature="org.objectweb.gotm.drink.api.DrinkMakerItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcMilkBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcMilkBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcMilkBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcMilkBoxServerItf">
+ <interface name="milk-box" role="server"
signature="org.objectweb.gotm.drink.api.MilkBoxItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcRobinetServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcRobinetServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcRobinetServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcRobinetServerItf">
+ <interface name="robinet" role="server"
signature="org.objectweb.gotm.drink.api.RobinetItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcSuggarBoxServerItf.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcSuggarBoxServerItf.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/api/FcSuggarBoxServerItf.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.api.FcSuggarBoxServerItf">
+ <interface name="suggar-box" role="server"
signature="org.objectweb.gotm.drink.api.SuggarBoxItf" />
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal
diff -u
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal:1.1
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal:1.2
---
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal:1.1
Fri Nov 19 19:20:19 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcApplication.fractal
Tue Dec 21 11:48:04 2004
@@ -8,7 +8,6 @@
definition="org.objectweb.gotm.drink.comp.FcFractalExplorer"/>
<component name="FcDrinkMachine"
definition="org.objectweb.gotm.drink.comp.FcDrinkMachine"/>
-
<binding client="FcFractalExplorer.fcAppl"
server="FcDrinkMachine.component"/>
</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkComposite.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkComposite.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkComposite.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.comp.FcDrinkComposite"
+ extends="org.objectweb.gotm.drink.api.FcDrinkItf">
+
+ <component name="FcDrinkDispatcherComponent"
+
definition="org.objectweb.gotm.drink.lib.FcDrinkDispatcherComponent"/>
+ <component name="FcCoffeMakerComponent"
+ definition="org.objectweb.gotm.drink.lib.FcCoffeMakerComponent"/>
+ <component name="FcChocolateMakerComponent"
+
definition="org.objectweb.gotm.drink.lib.FcChocolateMakerComponent"/>
+ <component name="FcCapuccinoMakerComponent"
+
definition="org.objectweb.gotm.drink.lib.FcCapuccinoMakerComponent"/>
+
+ <binding client="this.drink-dispatcher"
+ server="FcDrinkDispatcherComponent.drink-dispatcher"/>
+ <binding client="FcDrinkDispatcherComponent.coffeClientItf"
+ server="FcCoffeMakerComponent.drink-maker"/>
+ <binding client="FcDrinkDispatcherComponent.chocolateClientItf"
+ server="FcChocolateMakerComponent.drink-maker"/>
+ <binding client="FcDrinkDispatcherComponent.capuccinoClientItf"
+ server="FcCapuccinoMakerComponent.drink-maker"/>
+
+ <binding client="FcCoffeMakerComponent.cup-box"
+ server="this.cup-box"/>
+ <binding client="FcCoffeMakerComponent.suggar-box"
+ server="this.suggar-box"/>
+ <binding client="FcCoffeMakerComponent.coffe-box"
+ server="this.coffe-box"/>
+ <binding client="FcCoffeMakerComponent.robinet"
+ server="this.robinet"/>
+
+ <binding client="FcChocolateMakerComponent.cup-box"
+ server="this.cup-box"/>
+ <binding client="FcChocolateMakerComponent.suggar-box"
+ server="this.suggar-box"/>
+ <binding client="FcChocolateMakerComponent.chocolate-box"
+ server="this.chocolate-box"/>
+ <binding client="FcChocolateMakerComponent.robinet"
+ server="this.robinet"/>
+
+ <binding client="FcCapuccinoMakerComponent.cup-box"
+ server="this.cup-box"/>
+ <binding client="FcCapuccinoMakerComponent.suggar-box"
+ server="this.suggar-box"/>
+ <binding client="FcCapuccinoMakerComponent.coffe-box"
+ server="this.coffe-box"/>
+ <binding client="FcCapuccinoMakerComponent.chocolate-box"
+ server="this.chocolate-box"/>
+ <binding client="FcCapuccinoMakerComponent.milk-box"
+ server="this.milk-box"/>
+ <binding client="FcCapuccinoMakerComponent.robinet"
+ server="this.robinet"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal
diff -u
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal:1.1
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal:1.2
---
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal:1.1
Fri Nov 19 19:20:19 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcDrinkMachine.fractal
Tue Dec 21 11:48:04 2004
@@ -4,10 +4,30 @@
"classpath://org/objectweb/fractal/adl/xml/basic.dtd">
<definition name="org.objectweb.gotm.drink.comp.FcDrinkMachine"
- extends="org.objectweb.gotm.drink.api.FcUserCoiner">
+
extends="org.objectweb.gotm.drink.api.FcUserCoiner,org.objectweb.gotm.drink.api.FcDrinkDispatcherServerItf">
+
<component name="FcCoinerComposite"
definition="org.objectweb.gotm.drink.comp.FcCoinerComposite"/>
+ <component name="FcDrinkComposite"
+ definition="org.objectweb.gotm.drink.comp.FcDrinkComposite"/>
+ <component name="FcIngredientsComposite"
+ definition="org.objectweb.gotm.drink.comp.FcIngredientsComposite"/>
<binding client="this.user-coiner"
- server="FcCoinerComposite.user-coiner"/>
+ server="FcCoinerComposite.user-coiner"/>
+ <binding client="this.drink-dispatcher"
+ server="FcDrinkComposite.drink-dispatcher"/>
+
+ <binding client="FcDrinkComposite.cup-box"
+ server="FcIngredientsComposite.cup-box"/>
+ <binding client="FcDrinkComposite.suggar-box"
+ server="FcIngredientsComposite.suggar-box"/>
+ <binding client="FcDrinkComposite.coffe-box"
+ server="FcIngredientsComposite.coffe-box"/>
+ <binding client="FcDrinkComposite.chocolate-box"
+ server="FcIngredientsComposite.chocolate-box"/>
+ <binding client="FcDrinkComposite.milk-box"
+ server="FcIngredientsComposite.milk-box"/>
+ <binding client="FcDrinkComposite.robinet"
+ server="FcIngredientsComposite.robinet"/>
</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcIngredientsComposite.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcIngredientsComposite.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/comp/FcIngredientsComposite.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.comp.FcIngredientsComposite"
+
extends="org.objectweb.gotm.drink.api.FcCupBoxServerItf,org.objectweb.gotm.drink.api.FcSuggarBoxServerItf,org.objectweb.gotm.drink.api.FcCoffeBoxServerItf,org.objectweb.gotm.drink.api.FcChocolateBoxServerItf,org.objectweb.gotm.drink.api.FcMilkBoxServerItf,org.objectweb.gotm.drink.api.FcRobinetServerItf">
+
+ <component name="FcCupBoxComponent"
+ definition="org.objectweb.gotm.drink.lib.FcCupBoxComponent"/>
+ <component name="FcSuggarBoxComponent"
+ definition="org.objectweb.gotm.drink.lib.FcSuggarBoxComponent"/>
+ <component name="FcCoffeBoxComponent"
+ definition="org.objectweb.gotm.drink.lib.FcCoffeBoxComponent"/>
+ <component name="FcChocolateBoxComponent"
+ definition="org.objectweb.gotm.drink.lib.FcChocolateBoxComponent"/>
+ <component name="FcMilkBoxComponent"
+ definition="org.objectweb.gotm.drink.lib.FcMilkBoxComponent"/>
+ <component name="FcRobinetComponent"
+ definition="org.objectweb.gotm.drink.lib.FcRobinetComponent"/>
+
+ <binding client="this.cup-box"
+ server="FcCupBoxComponent.cup-box"/>
+ <binding client="this.suggar-box"
+ server="FcSuggarBoxComponent.suggar-box"/>
+ <binding client="this.coffe-box"
+ server="FcCoffeBoxComponent.coffe-box"/>
+ <binding client="this.chocolate-box"
+ server="FcChocolateBoxComponent.chocolate-box"/>
+ <binding client="this.milk-box"
+ server="FcMilkBoxComponent.milk-box"/>
+ <binding client="this.robinet"
+ server="FcRobinetComponent.robinet"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcCapuccinoBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcCapuccinoBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.CapuccinoBoxComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoMakerComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoMakerComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCapuccinoMakerComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcCapuccinoMakerComponent"
+ extends="org.objectweb.gotm.drink.api.FcCapuccinoMakerItf">
+ <content class="org.objectweb.gotm.drink.lib.CapuccinoMakerComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcChocolateBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcChocolateBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.ChocolateBoxComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateMakerComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateMakerComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcChocolateMakerComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcChocolateMakerComponent"
+ extends="org.objectweb.gotm.drink.api.FcChocolateMakerItf">
+ <content class="org.objectweb.gotm.drink.lib.ChocolateMakerComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcCoffeBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcCoffeBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.CoffeBoxComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeMakerComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeMakerComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCoffeMakerComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcCoffeMakerComponent"
+ extends="org.objectweb.gotm.drink.api.FcCoffeMakerItf">
+ <content class="org.objectweb.gotm.drink.lib.CoffeMakerComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCupBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCupBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcCupBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcCupBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcCupBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.CupBoxComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcDrinkDispatcherComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcDrinkDispatcherComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcDrinkDispatcherComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcDrinkDispatcherComponent"
+ extends="org.objectweb.gotm.drink.api.FcDrinkDispatcherItf">
+ <interface name="coffeClientItf"
+ signature="org.objectweb.gotm.drink.api.DrinkMakerItf" role="client"/>
+ <interface name="chocolateClientItf"
+ signature="org.objectweb.gotm.drink.api.DrinkMakerItf" role="client"/>
+ <interface name="capuccinoClientItf"
+ signature="org.objectweb.gotm.drink.api.DrinkMakerItf" role="client"/>
+ <content class="org.objectweb.gotm.drink.lib.DrinkDispatcherComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcMilkBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcMilkBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcMilkBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcMilkBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcMilkBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.MilkBoxComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcRobinetComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcRobinetComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcRobinetComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcRobinetComponent"
+ extends="org.objectweb.gotm.drink.api.FcRobinetServerItf">
+ <content class="org.objectweb.gotm.drink.lib.RobinetComponent"/>
+</definition>
Index:
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcSuggarBoxComponent.fractal
diff -u /dev/null
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcSuggarBoxComponent.fractal:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++
gotm-drink/src/fractal/org/objectweb/gotm/drink/lib/FcSuggarBoxComponent.fractal
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE definition PUBLIC
+ "-//objectweb.org//DTD Fractal ADL 2.0//EN"
+ "classpath://org/objectweb/fractal/adl/xml/basic.dtd">
+
+<definition name="org.objectweb.gotm.drink.lib.FcSuggarBoxComponent"
+ extends="org.objectweb.gotm.drink.api.FcSuggarBoxServerItf">
+ <content class="org.objectweb.gotm.drink.lib.SuggarBoxComponent"/>
+</definition>
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/ChocolateBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/ChocolateBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/ChocolateBoxItf.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Chocolate;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface ChocolateBoxItf {
+
+ public static final String CHOCOLATE_BOX = "chocolate-box";
+
+ public Chocolate getChocolate(Integer quantity);
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/CoffeBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/CoffeBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/CoffeBoxItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Coffe;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface CoffeBoxItf {
+
+ public static final String COFFE_BOX = "coffe-box";
+
+ public Coffe getCoffe(Integer quantity);
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/CupBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/CupBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/CupBoxItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Cup;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface CupBoxItf {
+
+ public static final String CUP_BOX = "cup-box";
+
+ public Cup getCup();
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkDispatcherItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkDispatcherItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkDispatcherItf.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Cup;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface DrinkDispatcherItf {
+
+ public static final String DRINK_DISPATCHER ="drink-dispatcher";
+
+ public Cup dispatchDrink(String drinkName, Boolean withSuggar);
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkMakerItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkMakerItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/DrinkMakerItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Cup;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface DrinkMakerItf{
+
+ public static final String DRINK_MAKER = "drink-maker";
+
+ public Cup makeDrink(Boolean withSuggar);
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:04 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientBoxItf.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface IngredientBoxItf {
+
+ public static final String INGREDIENT_BOX = "ingredient-box";
+
+ public Integer getStock();
+
+ public void fullFillBox();
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientItf.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/IngredientItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,20 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface IngredientItf {
+
+ public static final String INGREDIENT = "ingredient";
+
+ public String toString();
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/MilkBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/MilkBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/MilkBoxItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Milk;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface MilkBoxItf {
+
+ public static final String MILK_BOX = "milk-box";
+
+ public Milk getMilk(Integer quantity);
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/RobinetItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/RobinetItf.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/RobinetItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Water;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface RobinetItf {
+
+ public static final String ROBINET = "robinet";
+
+ public Water getWater(Integer quantity);
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/api/SuggarBoxItf.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/api/SuggarBoxItf.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/api/SuggarBoxItf.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 16 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.api;
+
+import org.objectweb.gotm.drink.lib.Suggar;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface SuggarBoxItf {
+
+ public static final String SUGGAR_BOX = "suggar-box";
+
+ public Suggar getSuggar(Integer quantity);
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/AccountComponent.java
diff -u
gotm-drink/src/java/org/objectweb/gotm/drink/lib/AccountComponent.java:1.2
gotm-drink/src/java/org/objectweb/gotm/drink/lib/AccountComponent.java:1.3
---
gotm-drink/src/java/org/objectweb/gotm/drink/lib/AccountComponent.java:1.2
Fri Nov 19 19:27:19 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/AccountComponent.java
Tue Dec 21 11:48:04 2004
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: AccountComponent.java,v 1.2 2004/11/19 18:27:19 rouvoy Exp $
+$Id: AccountComponent.java,v 1.3 2004/12/21 10:48:04 serrano Exp $
====================================================================*/
package org.objectweb.gotm.drink.lib;
@@ -100,4 +100,5 @@
public AccountComponent() {
setBalance(new Double(0));
}
+
}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CapuccinoMakerComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CapuccinoMakerComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CapuccinoMakerComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,130 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.gotm.drink.api.ChocolateBoxItf;
+import org.objectweb.gotm.drink.api.CoffeBoxItf;
+import org.objectweb.gotm.drink.api.CupBoxItf;
+import org.objectweb.gotm.drink.api.DrinkMakerItf;
+import org.objectweb.gotm.drink.api.MilkBoxItf;
+import org.objectweb.gotm.drink.api.RobinetItf;
+import org.objectweb.gotm.drink.api.SuggarBoxItf;
+import org.objectweb.util.monolog.api.BasicLevel;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class CapuccinoMakerComponent extends PrimitiveComponent
+ implements DrinkMakerItf {
+
+
+ public Cup makeDrink(Boolean withSuggar){
+
+ Cup cup = null;
+
+ /** Get a cup */
+ try {
+ CupBoxItf cupBox = (CupBoxItf)lookupFc(CupBoxItf.CUP_BOX);
+ cup = cupBox.getCup();
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(CupBoxItf.CUP_BOX) failed in the
CapuccinoMakerComponent",e);
+ }
+
+ /** Put suggar into the cup if the drink is requested with suggar. */
+ try{
+ SuggarBoxItf suggarBox =
(SuggarBoxItf)lookupFc(SuggarBoxItf.SUGGAR_BOX);
+ if (withSuggar.booleanValue()){
+ Suggar sucre = suggarBox.getSuggar(new Integer(5));
+ cup.put(sucre);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(SuggarBoxItf.SUGGAR_BOX) failed in the
CapuccinoMakerComponent",e);
+ }
+
+ /** Put coffe into the cup. */
+ try{
+ CoffeBoxItf coffeBox =
(CoffeBoxItf)lookupFc(CoffeBoxItf.COFFE_BOX);
+ Coffe coffe = coffeBox.getCoffe(new Integer(10));
+ if (coffe == null) {
+ return null;
+ } else {cup.put(coffe);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(CoffeBoxItf.COFFE_BOX) failed in the
CapuccinoMakerComponent",e);
+ }
+
+ /** Put chocolate into the cup. */
+ try{
+ ChocolateBoxItf chocolateBox =
(ChocolateBoxItf)lookupFc(ChocolateBoxItf.CHOCOLATE_BOX);
+ Chocolate chocolate = chocolateBox.getChocolate(new
Integer(10));
+ if (chocolate == null) {
+ return null;
+ } else {cup.put(chocolate);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(ChocolateBoxItf.CHOCOLATE_BOX) failed in
the CapuccinoMakerComponent",e);
+ }
+
+ /** Put milk into the cup. */
+ try{
+ MilkBoxItf milkBox =
(MilkBoxItf)lookupFc(MilkBoxItf.MILK_BOX);
+ Milk milk = milkBox.getMilk(new Integer(10));
+ if (milk == null) {
+ return null;
+ } else {cup.put(milk);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(MilkBoxItf.MILK_BOX) failed in the
CapuccinoMakerComponent",e);
+ }
+
+ /** Put water into the cup. */
+ try {
+ RobinetItf robinet = (RobinetItf)lookupFc(RobinetItf.ROBINET);
+ Water water = robinet.getWater(new Integer(50));
+ if (water == null){
+ return null;
+ } else {cup.put(water);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(RobinetItf.ROBINET_BOX) failed in the
CapuccinoMakerComponent",e);
+ }
+ return cup;
+}
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[]{CupBoxItf.CUP_BOX,
+ SuggarBoxItf.SUGGAR_BOX,
+ CoffeBoxItf.COFFE_BOX,
+ ChocolateBoxItf.CHOCOLATE_BOX,
+ MilkBoxItf.MILK_BOX,
+ RobinetItf.ROBINET};
+ }
+
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Chocolate.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Chocolate.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Chocolate.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,22 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Chocolate implements IngredientItf {
+
+ public String toString(){
+ return "Chocolate";
+ }
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateBoxComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateBoxComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateBoxComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,69 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.ChocolateBoxItf;
+import org.objectweb.gotm.drink.api.IngredientBoxItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ChocolateBoxComponent extends PrimitiveComponent
+ implements IngredientBoxItf,
+ ChocolateBoxItf{
+
+ public Integer stock;
+ public Integer topStock;
+
+ /* Constructor of this class*/
+ public ChocolateBoxComponent() {
+ topStock = new Integer(100);
+ stock = new Integer(topStock.intValue());
+ }
+
+ /**
+ * Provides chocolate to a chocolate based drink.
+ * @param quantity The quantity of chocolate to provide
+ * @return Chocolate Return chocolate if there is enough stock or
null otherwise
+ */
+ public Chocolate getChocolate(Integer quantity){
+ int tmp = stock.intValue() - quantity.intValue();
+ if (tmp >= 0){
+ stock = new Integer(tmp);
+ return new Chocolate();
+ }
+ else{
+ return null;
+ }
+ }
+
+ /*
+ * Returns the current stock.
+ */
+ public Integer getStock() {
+ return this.stock;
+ }
+
+ /*
+ * Fullfill the stock of the chocolate box.
+ */
+ public void fullFillBox() {
+ stock = new Integer(topStock.intValue());
+ }
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[0];
+ }
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateMakerComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateMakerComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++
gotm-drink/src/java/org/objectweb/gotm/drink/lib/ChocolateMakerComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,102 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.gotm.drink.api.ChocolateBoxItf;
+import org.objectweb.gotm.drink.api.CupBoxItf;
+import org.objectweb.gotm.drink.api.DrinkMakerItf;
+import org.objectweb.gotm.drink.api.RobinetItf;
+import org.objectweb.gotm.drink.api.SuggarBoxItf;
+import org.objectweb.util.monolog.api.BasicLevel;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ChocolateMakerComponent extends PrimitiveComponent
+ implements DrinkMakerItf {
+
+
+
//**************************************************************************
+ //Implements the DrinkMakerItf interface.
+
//**************************************************************************
+
+ public Cup makeDrink(Boolean withSuggar){
+
+ Cup cup = null;
+
+ /** Get a cup */
+ try {
+ CupBoxItf cupBox = (CupBoxItf)lookupFc(CupBoxItf.CUP_BOX);
+ cup = cupBox.getCup();
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(CupBoxItf.CUP_BOX) failed in the
ChocolateMakerComponent",e);
+ }
+
+ /** Put suggar into the cup if the drink is requested with
suggar. */
+ try{
+ SuggarBoxItf suggarBox =
(SuggarBoxItf)lookupFc(SuggarBoxItf.SUGGAR_BOX);
+ if (withSuggar.booleanValue()){
+ Suggar sucre = suggarBox.getSuggar(new
Integer(5));
+ cup.put(sucre);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(SuggarBoxItf.SUGGAR_BOX) failed in
the ChocolateMakerComponent",e);
+ }
+
+ /** Put chocolate into the cup. */
+ try{
+ ChocolateBoxItf chocolateBox =
(ChocolateBoxItf)lookupFc(ChocolateBoxItf.CHOCOLATE_BOX);
+ Chocolate chocolate = chocolateBox.getChocolate(new
Integer(10));
+ if (chocolate == null) {
+ return null;
+ } else {cup.put(chocolate);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(ChocolateBoxItf.CHOCOLATE_BOX)
failed in the ChocolateMakerComponent",e);
+ }
+
+ /** Put water into the cup. */
+ try {
+ RobinetItf robinet =
(RobinetItf)lookupFc(RobinetItf.ROBINET);
+ Water water = robinet.getWater(new Integer(50));
+ if (water == null){
+ return null;
+ } else {cup.put(water);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(RobinetItf.ROBINET_BOX) failed in
the ChocolateMakerComponent",e);
+ }
+ return cup;
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[]{CupBoxItf.CUP_BOX,
+ SuggarBoxItf.SUGGAR_BOX,
+ ChocolateBoxItf.CHOCOLATE_BOX,
+ RobinetItf.ROBINET};
+ }
+
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Coffe.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Coffe.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Coffe.java Tue Dec 21
11:48:04 2004
@@ -0,0 +1,25 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Coffe implements IngredientItf {
+
+ private String coffeType = "Arabica";
+
+ public String toString(){
+ return "Coffe";
+ }
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeBoxComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeBoxComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeBoxComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,67 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+import org.objectweb.gotm.drink.api.IngredientBoxItf;
+import org.objectweb.gotm.drink.api.CoffeBoxItf;
+
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class CoffeBoxComponent extends PrimitiveComponent
+ implements IngredientBoxItf,
+ CoffeBoxItf {
+
+ /** The current quantity of coffe available. */
+ private Integer stock;
+ private Integer topStock;
+
+ /**Constructor of this class */
+ public CoffeBoxComponent(){
+ topStock=new Integer(100);
+ stock = new Integer(topStock.intValue());
+ }
+
+ /*
+ * Provides a quantity of coffe to coffe based drinks.
+ */
+ public Coffe getCoffe(Integer quantity) {
+ int tmp = stock.intValue() - quantity.intValue();
+ if (tmp >= 0){
+ stock = new Integer (tmp);
+ return new Coffe();
+ }
+ else{
+ return null;
+ }
+ }
+
+
//*************************************************************************
+ // Implementation of the IngredientBoxItf interface
+
//*************************************************************************
+
+ public Integer getStock() {
+ return this.stock;
+ }
+
+ public void fullFillBox() {
+ stock = new Integer (topStock.intValue());
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[0];
+ }
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeMakerComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeMakerComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoffeMakerComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,100 @@
+/*
+ * Created on 10 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.gotm.drink.api.CoffeBoxItf;
+import org.objectweb.gotm.drink.api.CupBoxItf;
+import org.objectweb.gotm.drink.api.DrinkMakerItf;
+import org.objectweb.gotm.drink.api.RobinetItf;
+import org.objectweb.gotm.drink.api.SuggarBoxItf;
+import org.objectweb.util.monolog.api.BasicLevel;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+
+public class CoffeMakerComponent extends PrimitiveComponent
+ implements DrinkMakerItf {
+
+ //
*************************************************************************
+ // Implements the DrinkMakerItf interface
+ //
*************************************************************************
+
+ public Cup makeDrink(Boolean withSuggar) {
+ Cup cup = null;
+
+ /** Get a cup */
+ try {
+ CupBoxItf cupBox = (CupBoxItf)lookupFc(CupBoxItf.CUP_BOX);
+ cup = cupBox.getCup();
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(CupBoxItf.CUP_BOX) failed in the
CoffeMakerComponent",e);
+ }
+
+ /** Put suggar into the cup if the drink is requested with
suggar. */
+ try{
+ SuggarBoxItf suggarBox =
(SuggarBoxItf)lookupFc(SuggarBoxItf.SUGGAR_BOX);
+ if (withSuggar.booleanValue()){
+ Suggar sucre = suggarBox.getSuggar(new
Integer(5));
+ cup.put(sucre);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(SuggarBoxItf.SUGGAR_BOX) failed in
the CoffeMakerComponent",e);
+ }
+
+ /** Put coffe into the cup. */
+ try{
+ CoffeBoxItf coffeBox =
(CoffeBoxItf)lookupFc(CoffeBoxItf.COFFE_BOX);
+ Coffe coffe = coffeBox.getCoffe(new Integer(10));
+ if (coffe == null) {
+ return null;
+ } else {cup.put(coffe);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(CoffeBoxItf.COFFE_BOX) failed in
the CoffeMakerComponent",e);
+ }
+
+ /** Put water into the cup. */
+ try {
+ RobinetItf robinet =
(RobinetItf)lookupFc(RobinetItf.ROBINET);
+ Water water = robinet.getWater(new Integer(50));
+ if (water == null){
+ return null;
+ } else {cup.put(water);
+ }
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(RobinetItf.ROBINET_BOX) failed in
the CoffeMakerComponent",e);
+ }
+ return cup;
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[]{CupBoxItf.CUP_BOX,
+ SuggarBoxItf.SUGGAR_BOX,
+ CoffeBoxItf.COFFE_BOX,
+ RobinetItf.ROBINET};
+ }
+
+}
\ No newline at end of file
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java
diff -u
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java:1.3
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java:1.4
--- gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java:1.3
Fri Dec 3 11:32:48 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/CoinerComponent.java
Tue Dec 21 11:48:04 2004
@@ -23,7 +23,7 @@
Contributor(s): .
---------------------------------------------------------------------
-$Id: CoinerComponent.java,v 1.3 2004/12/03 10:32:48 rouvoy Exp $
+$Id: CoinerComponent.java,v 1.4 2004/12/21 10:48:04 serrano Exp $
====================================================================*/
package org.objectweb.gotm.drink.lib;
@@ -111,7 +111,7 @@
//
*************************************************************************
- // Implementation of the UserCoiner interface.
+ // Implementation of the MixerCoiner interface.
//
*************************************************************************
/* (non-Javadoc)
* @see
org.objectweb.gotm.drink.api.MixerCoiner#consumeMoney(java.lang.Double)
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Cup.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Cup.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Cup.java Tue Dec 21
11:48:04 2004
@@ -0,0 +1,43 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Cup {
+
+ private Vector ingredients;
+
+ public Cup(){
+ this.ingredients = new Vector();
+ }
+
+ public boolean put(IngredientItf ingredient){
+ return ingredients.add(ingredient);
+ }
+
+ public Iterator getIngredients(){
+ return ingredients.iterator();
+ }
+
+ public void print(){
+ System.out.println("Cup : ");
+ for (int i=0;i<ingredients.size();i++){
+ System.out.println("-
"+((IngredientItf)ingredients.elementAt(i)).toString());
+ }
+ }
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/CupBoxComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/CupBoxComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/CupBoxComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,65 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.CupBoxItf;
+import org.objectweb.gotm.drink.api.IngredientBoxItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class CupBoxComponent extends PrimitiveComponent
+ implements IngredientBoxItf,
+ CupBoxItf {
+
+ private Integer stock;
+ private Integer topStock;
+
+ public CupBoxComponent(){
+ topStock=new Integer(100);
+ stock=new Integer(topStock.intValue());
+ }
+
+ public Cup getCup(){
+ int tmp = stock.intValue();
+ if (tmp > 0) {
+ stock = new Integer(tmp);
+ return new Cup();
+ }
+ else{
+ return null;
+ }
+ }
+
+
//*************************************************************************
+ //Implementation of the IngredientBoxItf
+
//*************************************************************************
+ public Integer getStock() {
+ return this.stock;
+ }
+
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.api.IngredientBoxItf#fullFillBox()
+ */
+ public void fullFillBox() {
+ stock = new Integer (topStock.intValue());
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[0];
+ }
+
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/DrinkDispatcherComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/DrinkDispatcherComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++
gotm-drink/src/java/org/objectweb/gotm/drink/lib/DrinkDispatcherComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,98 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.gotm.drink.api.DrinkDispatcherItf;
+import org.objectweb.gotm.drink.api.DrinkMakerItf;
+import org.objectweb.util.monolog.api.BasicLevel;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */
+public class DrinkDispatcherComponent extends PrimitiveComponent
+ implements DrinkDispatcherItf {
+
+ private CoffeMakerComponent coffeMaker;
+
+ private ChocolateMakerComponent chocolateMaker;
+
+ private CapuccinoMakerComponent capuccinoMaker;
+
+ public DrinkDispatcherComponent() {
+ CupBoxComponent cupBox = new CupBoxComponent();
+ SuggarBoxComponent suggarBox = new SuggarBoxComponent();
+ CoffeBoxComponent coffeBox = new CoffeBoxComponent();
+ ChocolateBoxComponent chocolateBox = new
ChocolateBoxComponent();
+ MilkBoxComponent milkBox = new MilkBoxComponent();
+ RobinetComponent robinet = new RobinetComponent();
+
+/* this.coffeMaker = new CoffeMakerComponent(coffeBox,
+ suggarBox, robinet, cupBox);
+ this.chocolateMaker = new ChocolateMakerComponent(cupBox,
+ suggarBox,chocolateBox,robinet);
+ this.capuccinoMaker = new CapuccinoMakerComponent(cupBox,
+
suggarBox,coffeBox,chocolateBox,milkBox,robinet);
+*/
+ }
+
//**************************************************************************
+ //Implementation of the RequestDrinkItf interface.
+
//**************************************************************************
+ public Cup dispatchDrink(String drinkName, Boolean withSuggar) {
+ Cup cup = null;
+
+ if (drinkName.equals("coffe")) {
+ try {
+ DrinkMakerItf coffeMaker =
(DrinkMakerItf)lookupFc("coffeClientItf");
+ cup = coffeMaker.makeDrink(withSuggar);
+ return cup;
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(coffeItf) failed",e);
+ }
+ }
+ if (drinkName.equals("chocolate")) {
+ try {
+ DrinkMakerItf chocolateMaker =
(DrinkMakerItf)lookupFc("chocolateClientItf");
+ cup = chocolateMaker.makeDrink(withSuggar);
+ return cup;
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(chocolateClientItf)
failed",e);
+ }
+ }
+ if (drinkName.equals("capuccino")) {
+ try {
+ DrinkMakerItf chocolateMaker =
(DrinkMakerItf)lookupFc("capuccinoClientItf");
+ cup = capuccinoMaker.makeDrink(withSuggar);
+ return cup;
+ }
+ catch (NoSuchInterfaceException e) {
+ getLogger().log(BasicLevel.ERROR,
+ "lookupFc(capuccinoClientItf)
failed",e);
+ }
+ }
+ return cup;
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new
String[]{"coffeClientItf","chocolateClientItf","capuccinoClientItf"};
+ }
+
+
+}
\ No newline at end of file
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Milk.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Milk.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Milk.java Tue Dec 21
11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Milk implements IngredientItf {
+
+ public String toString(){
+ return "Milk";
+ }
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/MilkBoxComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/MilkBoxComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/MilkBoxComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,60 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientBoxItf;
+import org.objectweb.gotm.drink.api.MilkBoxItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class MilkBoxComponent extends PrimitiveComponent
+ implements IngredientBoxItf,
+ MilkBoxItf {
+
+ public Integer stock;
+ public Integer topStock;
+
+ public MilkBoxComponent (){
+ topStock = new Integer(1000);
+ stock = new Integer(topStock.intValue());
+ }
+
+ public Milk getMilk(Integer quantity){
+ int tmp = stock.intValue() - quantity.intValue();
+ if (tmp >=0){
+ stock = new Integer(tmp);
+ return new Milk();
+ }
+ else{
+ return null;
+ }
+ }
+
+
+ public Integer getStock(){
+ return this.stock;
+ }
+
+ public void fullFillBox() {
+ stock = new Integer(topStock.intValue());
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[0];
+ }
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/RobinetComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/RobinetComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/RobinetComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,62 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.RobinetItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class RobinetComponent extends PrimitiveComponent
+ implements RobinetItf {
+
+ private Boolean open;
+ private Integer consumation;
+
+ /* Constructor of this class*/
+ public RobinetComponent(){
+ open=new Boolean(true);
+ consumation=new Integer(1000);
+ }
+
+ /**
+ * Provides water to all drinks.
+ * @param quantity Quantity of water to provide.
+ * @return water If robinet is open returns water, null otherwise.
+ */
+ public Water getWater(Integer quantity){
+ if (open.booleanValue()==true) {
+ consumation= new
Integer(consumation.intValue()+quantity.intValue());
+ return new Water();
+ }
+ else{
+ return null;
+ }
+ }
+
+ /**
+ * Provides the current consomation.
+ * @return consomation The current water consomation.
+ */
+ public Integer getConsomation(){
+ return consumation;
+ }
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+
+ protected String[] clientFc() {
+ return new String[0];
+ }
+
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Suggar.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Suggar.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Suggar.java Tue
Dec 21 11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Suggar implements IngredientItf {
+
+ public String toString(){
+ return "Suggar";
+ }
+
+}
Index:
gotm-drink/src/java/org/objectweb/gotm/drink/lib/SuggarBoxComponent.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/SuggarBoxComponent.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/SuggarBoxComponent.java
Tue Dec 21 11:48:04 2004
@@ -0,0 +1,64 @@
+/*
+ * Created on 14 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientBoxItf;
+import org.objectweb.gotm.drink.api.SuggarBoxItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class SuggarBoxComponent extends PrimitiveComponent
+ implements IngredientBoxItf,
+ SuggarBoxItf{
+
+ /** The current quantity of suggar available. */
+ private Integer stock;
+ private Integer topStock;
+
+ /* Constructor of this class*/
+ public SuggarBoxComponent() {
+ topStock = new Integer(100);
+ stock = new Integer(topStock.intValue());
+ }
+
+ public Suggar getSuggar(Integer quantity){
+ int tmp = stock.intValue() - quantity.intValue();
+ if (tmp >= 0){
+ stock = new Integer(tmp);
+ return new Suggar();
+ }
+ else{
+ return null;
+ }
+ }
+
+
//*************************************************************************
+ // Implementation of the IngredientBoxItf interface
+
//*************************************************************************
+
+ public Integer getStock() {
+ return this.stock;
+ }
+
+ public void fullFillBox() {
+ stock = new Integer (topStock.intValue());
+ }
+
+ //
*************************************************************************
+ // Implementation of the PrimitiveComponent class.
+ //
*************************************************************************
+ /* (non-Javadoc)
+ * @see org.objectweb.gotm.drink.lib.PrimitiveComponent#clientFc()
+ */
+ protected String[] clientFc() {
+ return new String[0];
+ }
+}
Index: gotm-drink/src/java/org/objectweb/gotm/drink/lib/Water.java
diff -u /dev/null
gotm-drink/src/java/org/objectweb/gotm/drink/lib/Water.java:1.1
--- /dev/null Tue Dec 21 11:48:05 2004
+++ gotm-drink/src/java/org/objectweb/gotm/drink/lib/Water.java Tue Dec 21
11:48:04 2004
@@ -0,0 +1,23 @@
+/*
+ * Created on 13 déc. 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.objectweb.gotm.drink.lib;
+
+import org.objectweb.gotm.drink.api.IngredientItf;
+
+/**
+ * @author serrano
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class Water implements IngredientItf {
+
+ public String toString(){
+ return "Water";
+ }
+
+}
| <-- Date Index | <-- Thread Index |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.