initial commit
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath b/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/.project b/runtime/org.eclipse.egf.usecase.fc.uc1/.project
new file mode 100644
index 0000000..6d9ad86
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.usecase.fc.uc1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.egf.pattern.ui.PatternBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.egf.core.EGFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF b/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a96df5c
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.egf.usecase.fc.uc1
+Bundle-SymbolicName: org.eclipse.egf.usecase.fc.uc1;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.egf.model.ftask;visibility:=reexport
+Export-Package: org.eclipse.egf.usecase.fc.uc1
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties b/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties
new file mode 100644
index 0000000..6832b74
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties
@@ -0,0 +1,17 @@
+##
+# Copyright (c) 2010 Thales Corporate Services S.A.S.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Thales Corporate Services S.A.S - initial API and implementation
+##
+
+bin.includes = META-INF/,\
+ egf/,\
+ plugin.xml,\
+ .,\
+ bin/
+source.. = src/
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore
new file mode 100644
index 0000000..020c8fe
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmi:id="_UaP9kBvVEd-W6L66jY5sHw"
+ name="UseCase - Factory Component - UC1 - All Together">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_aMiFQBvVEd-W6L66jY5sHw">
+ <invocations xmi:id="_azHkIBvVEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_NTILsRuaEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_e4LVABvVEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore#_NHi_EBugEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_nl_xABvmEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore#_rPuYIBvjEd-W6L66jY5sHw"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore
new file mode 100644
index 0000000..cc330bc
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_NTILsRuaEd-ffO4YhZA0ZQ" name="FC - UC1.1 - FC">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_PjN_ABuaEd-ffO4YhZA0ZQ">
+ <invocations xmi:id="_Uj7DUBubEd-ffO4YhZA0ZQ" invokedActivity="#_Q5pmcBuaEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_Zrmu0BubEd-ffO4YhZA0ZQ" invokedActivity="#_Q5pmcBuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_btGFcBubEd-ffO4YhZA0ZQ">
+ <invocationContracts xmi:id="_cd0XwBubEd-ffO4YhZA0ZQ" invokedContract="#_KRvo4BubEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_eT1eMBubEd-ffO4YhZA0ZQ" value="Folks"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:TaskJava xmi:id="_Q5pmcBuaEd-ffO4YhZA0ZQ" name="FC - UC1.1 - HelloWorldTask"
+ value="org.eclipse.egf.usecase.fc.uc1.HelloWorld">
+ <contractContainer xmi:id="_Jyv_wBubEd-ffO4YhZA0ZQ">
+ <contracts xmi:id="_KRvo4BubEd-ffO4YhZA0ZQ" name="value">
+ <type xmi:type="types:TypeString" xmi:id="_OgDcYBubEd-ffO4YhZA0ZQ" value="World"/>
+ </contracts>
+ </contractContainer>
+ </ftask:TaskJava>
+</xmi:XMI>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore
new file mode 100644
index 0000000..6ebaf2a
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_NHi_EBugEd-ffO4YhZA0ZQ" name="FC - UC1.2 - FC with contracts">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_C2OuABulEd-iZpx-nITNvw">
+ <invocations xmi:id="_G-IXgBulEd-iZpx-nITNvw" invokedActivity="#_NTILsRuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_J7OawBulEd-iZpx-nITNvw">
+ <invocationContracts xmi:id="_KbkHsBulEd-iZpx-nITNvw" invokedContract="#_b0jmEBugEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_L1RFkBulEd-iZpx-nITNvw" value="Romeo and Juliet"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_NTILsRuaEd-ffO4YhZA0ZQ" name="FC - UC1.2 - FC parameterized">
+ <contractContainer xmi:id="_bSIOcBugEd-ffO4YhZA0ZQ">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_b0jmEBugEd-ffO4YhZA0ZQ"
+ name="who" invocationContracts="#_6UjIMBuhEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_8gwroRuiEd-iZpx-nITNvw" value="undefined"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_PjN_ABuaEd-ffO4YhZA0ZQ">
+ <invocations xmi:id="_Uj7DUBubEd-ffO4YhZA0ZQ" name="Hello for Who Parameter"
+ invokedActivity="ftask:TaskJava platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_Q5pmcBuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_5p7d4BuhEd-ffO4YhZA0ZQ">
+ <invocationContracts xmi:id="_6UjIMBuhEd-ffO4YhZA0ZQ" description="" factoryComponentContract="#_b0jmEBugEd-ffO4YhZA0ZQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_KRvo4BubEd-ffO4YhZA0ZQ"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+</xmi:XMI>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore
new file mode 100644
index 0000000..0027a7a
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_rPuYIBvjEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_uAJRUBvjEd-W6L66jY5sHw">
+ <invocations xmi:id="_uzs1MBvjEd-W6L66jY5sHw" invokedActivity="#_ni7LsBviEd-W6L66jY5sHw"/>
+ <invocations xmi:id="_zIGpoBvjEd-W6L66jY5sHw" invokedActivity="#_P_2ckBvaEd-W6L66jY5sHw"/>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_ni7LsBviEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Version with Task call">
+ <contractContainer xmi:id="_ECwpYBvjEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpYRvjEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_Rlhq0BvjEd-W6L66jY5sHw #_ZWwygBvjEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_ECwpYhvjEd-W6L66jY5sHw" value="2"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpYxvjEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_UJSBABvjEd-W6L66jY5sHw #_bCfUgBvjEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_ECwpZBvjEd-W6L66jY5sHw" value="4.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpZRvjEd-W6L66jY5sHw"
+ name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_ECwpZhvjEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_ECwpZxvjEd-W6L66jY5sHw">
+ <invocations xmi:id="_ECwpaBvjEd-W6L66jY5sHw" invokedActivity="#_Si3L4BvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_RRQrABvjEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_Rlhq0BvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYRvjEd-W6L66jY5sHw"
+ invokedContract="#_bvSfMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_UJSBABvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYxvjEd-W6L66jY5sHw"
+ invokedContract="#_hllkMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_WSX0cBvjEd-W6L66jY5sHw" targetInvocationContract="#_dQfdIBvjEd-W6L66jY5sHw"
+ invokedContract="#_l5PxwBvaEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_ECwpbRvjEd-W6L66jY5sHw" invokedActivity="#_DZf4sBvdEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_Y_XmMBvjEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_ZWwygBvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYRvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8RvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_bCfUgBvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYxvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8xvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_dQfdIBvjEd-W6L66jY5sHw" sourceInvocationContract="#_WSX0cBvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl9RvdEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_P_2ckBvaEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Version with FC call">
+ <contractContainer xmi:id="_sRw2MBveEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2MRveEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_IVHosBveEd-W6L66jY5sHw #_VjUvYBveEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_sRw2MhveEd-W6L66jY5sHw" value="3"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2MxveEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_LivbQBveEd-W6L66jY5sHw #_9gjdcBveEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_sRw2NBveEd-W6L66jY5sHw" value="5.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2NRveEd-W6L66jY5sHw"
+ name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_sRw2NhveEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_4pQz0BvdEd-W6L66jY5sHw">
+ <invocations xmi:id="_EnJiIBveEd-W6L66jY5sHw" invokedActivity="#_5AJKIBvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_H77soBveEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_IVHosBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MRveEd-W6L66jY5sHw"
+ invokedContract="#_SiuzkBvbEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_LivbQBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MxveEd-W6L66jY5sHw"
+ invokedContract="#_WrOS8BvbEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_OsWQgBveEd-W6L66jY5sHw" targetInvocationContract="#_Dcq2kBvfEd-W6L66jY5sHw"
+ invokedContract="#_evOloBvbEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_ScjLsBveEd-W6L66jY5sHw" invokedActivity="#_11YzcBvcEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_VELVQBveEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_VjUvYBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MRveEd-W6L66jY5sHw"
+ invokedContract="#_5360wBvcEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_9gjdcBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MxveEd-W6L66jY5sHw"
+ invokedContract="#_5360whvcEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_Dcq2kBvfEd-W6L66jY5sHw" sourceInvocationContract="#_OsWQgBveEd-W6L66jY5sHw"
+ invokedContract="#_5360xBvcEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_5AJKIBvaEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Computation">
+ <contractContainer xmi:id="_9oNhcBvaEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_SiuzkBvbEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_qqlkYBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_WRvb8BvbEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_WrOS8BvbEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_vWFqMBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_eJh3kBvbEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_evOloBvbEd-W6L66jY5sHw"
+ name="amount" mandatory="true" mode="Out" invocationContracts="#_x7x6EBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_iNPkoBvbEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_m86_0BvbEd-W6L66jY5sHw">
+ <invocations xmi:id="_nmMmUBvbEd-W6L66jY5sHw" invokedActivity="#_Si3L4BvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_qWBpoBvbEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_qqlkYBvbEd-W6L66jY5sHw" factoryComponentContract="#_SiuzkBvbEd-W6L66jY5sHw"
+ invokedContract="#_bvSfMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_vWFqMBvbEd-W6L66jY5sHw" factoryComponentContract="#_WrOS8BvbEd-W6L66jY5sHw"
+ invokedContract="#_hllkMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_x7x6EBvbEd-W6L66jY5sHw" factoryComponentContract="#_evOloBvbEd-W6L66jY5sHw"
+ invokedContract="#_l5PxwBvaEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_11YzcBvcEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Display">
+ <contractContainer xmi:id="_46-EUBvcEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360wBvcEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_UKfJoBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_5360wRvcEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360whvcEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_Wo4esBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_5360wxvcEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360xBvcEd-W6L66jY5sHw"
+ name="amount" mandatory="true" invocationContracts="#_YoSKoBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_5360xRvcEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_8qbYoBvcEd-W6L66jY5sHw">
+ <invocations xmi:id="_9XR3kBvcEd-W6L66jY5sHw" invokedActivity="#_DZf4sBvdEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_Ti2h4BvdEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_UKfJoBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360wBvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8RvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_Wo4esBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360whvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8xvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_YoSKoBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360xBvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl9RvdEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:TaskJava xmi:id="_Si3L4BvaEd-W6L66jY5sHw" name="FC - UC1.3 - PricerComputerTask"
+ value="org.eclipse.egf.usecase.fc.uc1.PricerComputation">
+ <contractContainer xmi:id="_bRMN8BvaEd-W6L66jY5sHw">
+ <contracts xmi:id="_bvSfMBvaEd-W6L66jY5sHw" name="quantity" mandatory="true">
+ <type xmi:type="types:TypeInteger" xmi:id="_hGTAIBvaEd-W6L66jY5sHw"/>
+ </contracts>
+ <contracts xmi:id="_hllkMBvaEd-W6L66jY5sHw" name="price" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_kZ430BvaEd-W6L66jY5sHw"/>
+ </contracts>
+ <contracts xmi:id="_l5PxwBvaEd-W6L66jY5sHw" name="amount" mandatory="true" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_rGkyQBvaEd-W6L66jY5sHw"/>
+ </contracts>
+ </contractContainer>
+ </ftask:TaskJava>
+ <ftask:TaskJava xmi:id="_DZf4sBvdEd-W6L66jY5sHw" name="FC - UC1.3 - PricerDisplayTask"
+ value="org.eclipse.egf.usecase.fc.uc1.PricerDisplay">
+ <contractContainer xmi:id="_PEwl8BvdEd-W6L66jY5sHw">
+ <contracts xmi:id="_PEwl8RvdEd-W6L66jY5sHw" name="quantity" mandatory="true">
+ <type xmi:type="types:TypeInteger" xmi:id="_PEwl8hvdEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:id="_PEwl8xvdEd-W6L66jY5sHw" name="price" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_PEwl9BvdEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:id="_PEwl9RvdEd-W6L66jY5sHw" name="amount" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_PEwl9hvdEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ </ftask:TaskJava>
+</xmi:XMI>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml b/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml
new file mode 100644
index 0000000..9f18e40
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Copyright (c) 2010 Thales Corporate Services S.A.S.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Thales Corporate Services S.A.S - initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="egf/FC_UC1_1_FCAndTask.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_2_FCWithContracts.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_0_AllTogether.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_3_FCPricer.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java
new file mode 100644
index 0000000..cab08fd
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java
@@ -0,0 +1,52 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2010 Thales Corporate Services S.A.S.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thales Corporate Services S.A.S - initial API and implementation
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class HelloWorld implements ITaskProduction {
+
+ private static final String VALUE_PARAMETER = "value";
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ String value = taskProductionContext.getInputValue(VALUE_PARAMETER, String.class);
+ String message = new String ("Hello " + value + "!");
+
+ // Message on the default console
+ System.out.println(message);
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+}
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java
new file mode 100644
index 0000000..4430596
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2010 Thales Corporate Services S.A.S.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thales Corporate Services S.A.S - initial API and implementation
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class PricerComputation implements ITaskProduction {
+
+ private static final String PRICE_PARAMETER = "price";
+ private static final String QUANTITY_PARAMETER = "quantity";
+ private static final String AMOUNT_PARAMETER = "amount";
+
+ private Integer quantity;
+ private Float price;
+ private Float amount;
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ quantity = taskProductionContext.getInputValue(QUANTITY_PARAMETER, Integer.class);
+ price = taskProductionContext.getInputValue(PRICE_PARAMETER, Float.class);
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ amount = quantity * price;
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ taskProductionContext.setOutputValue(AMOUNT_PARAMETER, amount);
+ }
+
+}
diff --git a/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java
new file mode 100644
index 0000000..b8de012
--- /dev/null
+++ b/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java
@@ -0,0 +1,61 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2010 Thales Corporate Services S.A.S.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thales Corporate Services S.A.S - initial API and implementation
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class PricerDisplay implements ITaskProduction {
+
+ private static final String PRICE_PARAMETER = "price";
+ private static final String QUANTITY_PARAMETER = "quantity";
+ private static final String AMOUNT_PARAMETER = "amount";
+
+ private Integer quantity;
+ private Float price;
+ private Float amount;
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ quantity = taskProductionContext.getInputValue(QUANTITY_PARAMETER, Integer.class);
+ price = taskProductionContext.getInputValue(PRICE_PARAMETER, Float.class);
+ amount = taskProductionContext.getInputValue(AMOUNT_PARAMETER, Float.class);
+
+ String message = new String ("Pricer: " + quantity + " * " + price + " = " + amount);
+
+ // Message on the default console
+ System.out.println(message);
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+}