blob: ede693525f1a5a22d6b72e76ade6b2f1ef7b7ccc [file] [log] [blame]
Clement Escoffier3269efa2008-09-09 14:21:15 +00001<ipojo
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Clement Escoffier4f2c3732010-12-28 11:10:32 +00003 xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd
Clement Escoffierc80b73d2009-07-03 13:16:24 +00004 org.apache.felix.composite http://felix.apache.org/ipojo/schemas/SNAPSHOT/composite.xsd"
Clement Escoffier3269efa2008-09-09 14:21:15 +00005 xmlns="org.apache.felix.ipojo"
6 xmlns:comp="org.apache.felix.ipojo.composite"
Clement Escoffier4f2c3732010-12-28 11:10:32 +00007 xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
Clement Escoffier3269efa2008-09-09 14:21:15 +00008 <comp:composite name="composite.bar.1" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +00009 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService"/>
Clement Escoffier3269efa2008-09-09 14:21:15 +000010 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000011
Clement Escoffier3269efa2008-09-09 14:21:15 +000012 <comp:composite name="composite.bar.2" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000013 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" aggregate="true"/>
Clement Escoffier3269efa2008-09-09 14:21:15 +000014 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000015
Clement Escoffier3269efa2008-09-09 14:21:15 +000016 <comp:composite name="composite.bar.3" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000017 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" optional="true"/>
Clement Escoffier3269efa2008-09-09 14:21:15 +000018 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000019
Clement Escoffier3269efa2008-09-09 14:21:15 +000020 <comp:composite name="composite.bar.4" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000021 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" optional="true"/>
Clement Escoffier3269efa2008-09-09 14:21:15 +000022 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000023
Clement Escoffier3269efa2008-09-09 14:21:15 +000024 <comp:composite name="composite.bar.5-accept" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000025 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService">
26 <property name="boolean" value="true"/>
27 <property name="string" value="foo"/>
28 <property name="strAprop" value="{foo, bar, baz}"/>
29 <property name="int" value="5"/>
30 </subservice>
Clement Escoffier3269efa2008-09-09 14:21:15 +000031 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000032
Clement Escoffier3269efa2008-09-09 14:21:15 +000033 <comp:composite name="composite.bar.5-refuse1" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000034 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
35 <property name="foo" value="bar"/>
36 <property name="boolean" value="true"/>
37 <property name="string" value="foo"/>
38 <property name="strAprop" value="{foo, bar, baz}"/>
39 <property name="int" value="5"/>
40 </subservice>
Clement Escoffier3269efa2008-09-09 14:21:15 +000041 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000042
Clement Escoffier3269efa2008-09-09 14:21:15 +000043 <comp:composite name="composite.bar.5-refuse2" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000044 <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
45 <property name="string" value="foo"/>
46 <property name="strAprop" value="{foo, bar, baz}"/>
47 </subservice>
Clement Escoffier3269efa2008-09-09 14:21:15 +000048 </comp:composite>
Clement Escoffiercdb4b172008-04-29 22:25:39 +000049
50 <!-- Instance of a specified component -->
Clement Escoffier3269efa2008-09-09 14:21:15 +000051 <comp:composite name="composite.inst.1" architecture="true">
Clement Escoffiercdb4b172008-04-29 22:25:39 +000052 <instance component="COMPO-FooProviderType-1" /> <!-- name="FooProv" -->
53 <instance component="COMPO-FooProviderType-Dyn2">
54 <property name="boolean" value="true"/>
55 <property name="string" value="foo"/>
56 <property name="strAProp" value="{a,b,c}"/>
57 </instance>
Clement Escoffier3269efa2008-09-09 14:21:15 +000058 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000059
Clement Escoffier83507512008-10-13 07:33:03 +000060 <!-- Scope test -->
61 <component name="SCOPE-provider" classname="org.apache.felix.ipojo.test.instance.ServiceProvider">
62 <provides/>
63 </component>
64 <component name="SCOPE-cons" classname="org.apache.felix.ipojo.test.instance.ServiceConsumer">
65 <provides/>
66 <requires field="service"/>
67 </component>
68 <comp:composite name="SCOPE-scope">
69 <instance component="SCOPE-provider"/>
70 <instance component="SCOPE-cons"/>
71 </comp:composite>
72 <comp:composite name="SCOPE-badscope">
73 <instance component="SCOPE-cons"/>
74 </comp:composite>
Clement Escoffier4f2c3732010-12-28 11:10:32 +000075
76 <!-- Instance configuration -->
77 <comp:composite name="CONF-MySuperComposite">
78 <instance component="COMPO-FooProviderType-2">
79 <property name="int" value="3"/>
80 </instance>
81 <subservice action="instantiate"
82 specification="org.apache.felix.ipojo.test.composite.service.FooService">
83 <property name="boolean" value="true"/>
84 <property name="string" value="foo"/>
85 <property name="strAprop" value="{foo, bar, baz}"/>
86 <property name="int" value="3"/>
87 </subservice>
88 </comp:composite>
Clement Escoffiercdb4b172008-04-29 22:25:39 +000089</ipojo>