Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 1 | <ipojo xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 2 | <!-- Used component type -->
|
| 3 | <component
|
| 4 | className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
|
| 5 | factory="COMPO-FooProviderType-1" architecture="true">
|
| 6 | <provides />
|
| 7 | </component>
|
| 8 | <component
|
| 9 | className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
|
| 10 | name="COMPO-FooProviderType-2" architecture="true">
|
| 11 | <provides>
|
| 12 | <property name="int" type="int" value="2" />
|
| 13 | <property name="long" type="long" value="40" />
|
| 14 | <property name="string" type="java.lang.String" value="foo" />
|
| 15 | <property name="strAProp" type="java.lang.String[]"
|
| 16 | value="{foo, bar}" />
|
| 17 | <property name="intAProp" type="int[]" value="{1,2,3}" />
|
| 18 | </provides>
|
| 19 | </component>
|
| 20 | <component
|
| 21 | className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn"
|
| 22 | name="COMPO-FooProviderType-Dyn" architecture="true">
|
| 23 | <provides>
|
| 24 | <property name="int" field="intProp" value="2" />
|
| 25 | <property name="boolean" field="boolProp" value="false" />
|
| 26 | <property name="string" field="strProp" value="foo" />
|
| 27 | <property name="strAProp" field="strAProp"
|
| 28 | value="{foo, bar}" />
|
| 29 | <property name="intAProp" field="intAProp" value="{ 1,2,3}" />
|
| 30 | </provides>
|
| 31 | </component>
|
| 32 | <component
|
| 33 | className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn2"
|
| 34 | name="COMPO-FooProviderType-Dyn2" factory="true" architecture="true">
|
| 35 | <provides>
|
| 36 | <property name="int" field="intProp" value="4" />
|
| 37 | <property name="boolean" field="boolProp" />
|
| 38 | <property name="string" field="strProp" />
|
| 39 | <property name="strAProp" field="strAProp" />
|
| 40 | <property name="intAProp" field="intAProp"
|
| 41 | value="{1, 2,3 }" />
|
| 42 | </provides>
|
| 43 | </component>
|
| 44 | <component
|
| 45 | className="org.apache.felix.ipojo.test.composite.component.CheckServiceProvider"
|
| 46 | factory="COMPO-SimpleCheckServiceProvider" architecture="true">
|
| 47 | <requires field="fs" />
|
| 48 | <provides />
|
| 49 | </component>
|
| 50 | <component
|
| 51 | className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
|
| 52 | factory="COMPO-FooBarProviderType-1" architecture="true">
|
| 53 | <provides />
|
| 54 | </component>
|
| 55 | <component
|
| 56 | className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
|
| 57 | factory="COMPO-FooBarProviderType-2" architecture="true">
|
| 58 | <provides
|
| 59 | interface="{org.apache.felix.ipojo.test.composite.service.FooService, org.apache.felix.ipojo.test.composite.service.BarService }" />
|
| 60 | </component>
|
| 61 | <component
|
| 62 | className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
|
| 63 | factory="COMPO-FooBarProviderType-3" architecture="true">
|
| 64 | <provides
|
| 65 | interface="{org.apache.felix.ipojo.test.composite.service.FooService}">
|
| 66 | <property name="baz" type="java.lang.String" value="foo" />
|
| 67 | </provides>
|
| 68 | <provides
|
| 69 | interface="{org.apache.felix.ipojo.test.composite.service.BarService}">
|
| 70 | <property name="baz" type="java.lang.String" value="bar" />
|
| 71 | </provides>
|
| 72 | </component>
|
| 73 |
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 74 | <!-- Composite -->
|
| 75 | <composite name="composite.empty" factory="true" architecture="true">
|
| 76 | </composite>
|
| 77 |
|
| 78 | <composite name="composite.bar.1" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 79 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 80 | </composite>
|
| 81 |
|
| 82 | <composite name="composite.bar.2" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 83 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" aggregate="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 84 | </composite>
|
| 85 |
|
| 86 | <composite name="composite.bar.3" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 87 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" optional="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 88 | </composite>
|
| 89 |
|
| 90 | <composite name="composite.bar.4" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 91 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" optional="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 92 | </composite>
|
| 93 |
|
| 94 | <composite name="composite.bar.5-accept" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 95 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService">
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 96 | <property name="boolean" value="true"/>
|
| 97 | <property name="string" value="foo"/>
|
| 98 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 99 | <property name="int" value="5"/>
|
| 100 | </subservice>
|
| 101 | </composite>
|
| 102 |
|
| 103 | <composite name="composite.bar.5-refuse1" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 104 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 105 | <property name="foo" value="bar"/>
|
| 106 | <property name="boolean" value="true"/>
|
| 107 | <property name="string" value="foo"/>
|
| 108 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 109 | <property name="int" value="5"/>
|
| 110 | </subservice>
|
| 111 | </composite>
|
| 112 |
|
| 113 | <composite name="composite.bar.5-refuse2" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 114 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 115 | <property name="string" value="foo"/>
|
| 116 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 117 | </subservice>
|
| 118 | </composite>
|
| 119 |
|
| 120 | <composite name="composite.inst.1" factory="true" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 121 | <instance component="COMPO-FooProviderType-1" /> <!-- name="FooProv" -->
|
| 122 | <instance component="COMPO-FooProviderType-Dyn2">
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 123 | <property name="boolean" value="true"/>
|
| 124 | <property name="string" value="foo"/>
|
| 125 | <property name="strAProp" value="{a,b,c}"/>
|
| 126 | </instance>
|
| 127 | </composite>
|
| 128 |
|
| 129 | <composite name="composite.requires.1" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 130 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 131 | </composite>
|
| 132 |
|
| 133 | <composite name="composite.requires.2" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 134 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 135 | </composite>
|
| 136 |
|
| 137 | <composite name="composite.requires.3" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 138 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" optional="true" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 139 | </composite>
|
| 140 |
|
| 141 | <composite name="composite.requires.4" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 142 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" optional="true" aggregate="true" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 143 | </composite>
|
| 144 |
|
| 145 | <composite name="composite.requires.5" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 146 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" filter="(&(int=2)(long=40))" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 147 | </composite>
|
| 148 |
|
| 149 | <component className="org.apache.felix.ipojo.test.composite.component.BazProviderType1" factory="BazProviderType" scope="composite">
|
| 150 | <provides/>
|
| 151 | </component>
|
| 152 |
|
| 153 | <composite name="composite.export.1" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 154 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 155 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 156 | </composite>
|
| 157 |
|
| 158 | <composite name="composite.export.2" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 159 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>
|
| 160 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" optional="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 161 | </composite>
|
| 162 |
|
| 163 | <composite name="composite.export.3" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 164 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>
|
| 165 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 166 | </composite>
|
| 167 |
|
| 168 | <composite name="composite.export.4" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 169 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 170 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 171 | </composite>
|
| 172 |
|
| 173 | <composite name="composite.export.5" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 174 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 175 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(instance.name=foo1)"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 176 | </composite>
|
| 177 |
|
| 178 | <component className="org.apache.felix.ipojo.test.composite.component.Baz2CheckProvider" factory="Baz2CheckProvider" architecture="true">
|
| 179 | <requires field="fs" scope="composite"/>
|
| 180 | <provides/>
|
| 181 | </component>
|
| 182 |
|
| 183 | <composite name="composite.test.3" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 184 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" filter="(factory.name=BazProviderType)"/>
|
| 185 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 186 | </composite>
|
| 187 |
|
| 188 | <composite name="composite.test.2" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 189 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.CheckService" filter="(factory.name=Baz2CheckProvider)"/>
|
| 190 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.CheckService"/>
|
| 191 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 192 | </composite>
|
| 193 |
|
| 194 | <composite name="composite.test.1" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 195 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(factory.name=composite.test.3)" />
|
| 196 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.CheckService" filter="(factory.name=composite.test.2)"/>
|
| 197 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.CheckService"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 198 | </composite>
|
| 199 |
|
| 200 | <composite name="composite.instantiator" architecture="true">
|
Clement Escoffier | 832ab7a | 2008-04-25 16:49:43 +0000 | [diff] [blame^] | 201 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(factory.name=composite.test.3)"/>
|
| 202 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService"/>
|
| 203 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>
|
| 204 | <provides action="export" specification="org.apache.felix.ipojo.test.composite.service.FooService"/>
|
Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 205 | </composite>
|
| 206 |
|
| 207 | <!-- Test composition provides -->
|
| 208 | <component classname="org.apache.felix.ipojo.test.composite.component.TataProvider" factory="tata">
|
| 209 | <provides/>
|
| 210 | </component>
|
| 211 |
|
| 212 | <component classname="org.apache.felix.ipojo.test.composite.component.TotoProvider" factory="toto" architecture="true">
|
| 213 | <provides/>
|
| 214 | </component>
|
| 215 |
|
| 216 | <component classname="org.apache.felix.ipojo.test.composite.component.TotoProviderGlue" factory="totoglue">
|
| 217 | <requires field="m_toto" scope="composite"/>
|
| 218 | </component>
|
| 219 |
|
| 220 | <composite name="comp-0" architecture="true">
|
| 221 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 222 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 223 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 224 | </composite>
|
| 225 |
|
| 226 | <composite name="comp-1" architecture="true">
|
| 227 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 228 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 229 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 230 | <delegation method="tataInt" policy="One"/>
|
| 231 | <delegation method="toto1" policy="All"/>
|
| 232 | </provides>
|
| 233 | </composite>
|
| 234 |
|
| 235 | <composite name="comp-2" architecture="true">
|
| 236 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 237 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate="true"/>
|
| 238 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 239 | <delegation method="tataInt" policy="One"/>
|
| 240 | <delegation method="toto1" policy="All"/>
|
| 241 | </provides>
|
| 242 | </composite>
|
| 243 |
|
| 244 | <composite name="comp-3" architecture="true">
|
| 245 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 246 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" optional="true"/>
|
| 247 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 248 | </provides>
|
| 249 | </composite>
|
| 250 |
|
| 251 | <composite name="comp-4" architecture="true">
|
| 252 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 253 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" optional="true"/>
|
| 254 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 255 | <delegation method="tataInt" policy="One"/>
|
| 256 | <delegation method="toto1" policy="All"/>
|
| 257 | </provides>
|
| 258 | </composite>
|
| 259 |
|
| 260 | <composite name="comp-5" architecture="true">
|
| 261 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 262 | <!-- <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate ="true" optional="true"/> -->
|
| 263 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 264 | <delegation method="tataInt" policy="One"/>
|
| 265 | <delegation method="toto1" policy="All"/>
|
| 266 | </provides>
|
| 267 | </composite>
|
| 268 |
|
| 269 | <composite name="comp-6" architecture="true">
|
| 270 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 271 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate="true" optional="true"/>
|
| 272 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Toto">
|
| 273 | <delegation method="toto1" policy="All"/>
|
| 274 | </provides>
|
| 275 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tata">
|
| 276 | <delegation method="tataInt" policy="One"/>
|
| 277 | </provides>
|
| 278 | </composite>
|
| 279 |
|
| 280 | <composite name="comp-7" architecture="true">
|
| 281 | <instance component="tata"/>
|
| 282 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 283 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 284 | </composite>
|
| 285 |
|
| 286 | <composite name="comp-8" architecture="true">
|
| 287 | <instance component="tata"/>
|
| 288 | <instance component="totoglue"/>
|
| 289 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 290 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 291 | </composite>
|
| 292 |
|
| 293 | </ipojo>
|