Clement Escoffier | e50ede5 | 2008-03-28 15:33:36 +0000 | [diff] [blame] | 1 | <ipojo xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
|
| 2 | <!-- Composite -->
|
| 3 | <composite name="composite.empty" factory="true" architecture="true">
|
| 4 | </composite>
|
| 5 |
|
| 6 | <composite name="composite.bar.1" architecture="true">
|
| 7 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService"/>
|
| 8 | </composite>
|
| 9 |
|
| 10 | <composite name="composite.bar.2" architecture="true">
|
| 11 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService" aggregate="true"/>
|
| 12 | </composite>
|
| 13 |
|
| 14 | <composite name="composite.bar.3" architecture="true">
|
| 15 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService" optional="true"/>
|
| 16 | </composite>
|
| 17 |
|
| 18 | <composite name="composite.bar.4" architecture="true">
|
| 19 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" aggregate="true" optional="true"/>
|
| 20 | </composite>
|
| 21 |
|
| 22 | <composite name="composite.bar.5-accept" architecture="true">
|
| 23 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService">
|
| 24 | <property name="boolean" value="true"/>
|
| 25 | <property name="string" value="foo"/>
|
| 26 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 27 | <property name="int" value="5"/>
|
| 28 | </subservice>
|
| 29 | </composite>
|
| 30 |
|
| 31 | <composite name="composite.bar.5-refuse1" architecture="true">
|
| 32 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService">
|
| 33 | <property name="foo" value="bar"/>
|
| 34 | <property name="boolean" value="true"/>
|
| 35 | <property name="string" value="foo"/>
|
| 36 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 37 | <property name="int" value="5"/>
|
| 38 | </subservice>
|
| 39 | </composite>
|
| 40 |
|
| 41 | <composite name="composite.bar.5-refuse2" architecture="true">
|
| 42 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService">
|
| 43 | <property name="string" value="foo"/>
|
| 44 | <property name="strAprop" value="{foo, bar, baz}"/>
|
| 45 | </subservice>
|
| 46 | </composite>
|
| 47 |
|
| 48 | <composite name="composite.inst.1" factory="true" architecture="true">
|
| 49 | <instance component="FooProviderType-1" /> <!-- name="FooProv" -->
|
| 50 | <instance component="FooProviderType-Dyn2">
|
| 51 | <property name="boolean" value="true"/>
|
| 52 | <property name="string" value="foo"/>
|
| 53 | <property name="strAProp" value="{a,b,c}"/>
|
| 54 | </instance>
|
| 55 | </composite>
|
| 56 |
|
| 57 | <composite name="composite.requires.1" architecture="true">
|
| 58 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" scope="composite"/>
|
| 59 | </composite>
|
| 60 |
|
| 61 | <composite name="composite.requires.2" architecture="true">
|
| 62 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" aggregate="true" scope="composite"/>
|
| 63 | </composite>
|
| 64 |
|
| 65 | <composite name="composite.requires.3" architecture="true">
|
| 66 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" optional="true" scope="composite"/>
|
| 67 | </composite>
|
| 68 |
|
| 69 | <composite name="composite.requires.4" architecture="true">
|
| 70 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" optional="true" aggregate="true" scope="composite"/>
|
| 71 | </composite>
|
| 72 |
|
| 73 | <composite name="composite.requires.5" architecture="true">
|
| 74 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" filter="(&(int=2)(long=40))" scope="composite"/>
|
| 75 | </composite>
|
| 76 |
|
| 77 | <component className="org.apache.felix.ipojo.test.composite.component.BazProviderType1" factory="BazProviderType" scope="composite">
|
| 78 | <provides/>
|
| 79 | </component>
|
| 80 |
|
| 81 | <composite name="composite.export.1" architecture="true">
|
| 82 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 83 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>
|
| 84 | </composite>
|
| 85 |
|
| 86 | <composite name="composite.export.2" architecture="true">
|
| 87 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>
|
| 88 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" optional="true"/>
|
| 89 | </composite>
|
| 90 |
|
| 91 | <composite name="composite.export.3" architecture="true">
|
| 92 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>
|
| 93 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true"/>
|
| 94 | </composite>
|
| 95 |
|
| 96 | <composite name="composite.export.4" architecture="true">
|
| 97 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 98 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true"/>
|
| 99 | </composite>
|
| 100 |
|
| 101 | <composite name="composite.export.5" architecture="true">
|
| 102 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>
|
| 103 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(instance.name=foo1)"/>
|
| 104 | </composite>
|
| 105 |
|
| 106 | <component className="org.apache.felix.ipojo.test.composite.component.Baz2CheckProvider" factory="Baz2CheckProvider" architecture="true">
|
| 107 | <requires field="fs" scope="composite"/>
|
| 108 | <provides/>
|
| 109 | </component>
|
| 110 |
|
| 111 | <composite name="composite.test.3" architecture="true">
|
| 112 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" filter="(factory.name=BazProviderType)"/>
|
| 113 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>
|
| 114 | </composite>
|
| 115 |
|
| 116 | <composite name="composite.test.2" architecture="true">
|
| 117 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService" filter="(factory.name=Baz2CheckProvider)"/>
|
| 118 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService"/>
|
| 119 | <subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite"/>
|
| 120 | </composite>
|
| 121 |
|
| 122 | <composite name="composite.test.1" architecture="true">
|
| 123 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(factory.name=composite.test.3)" />
|
| 124 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService" filter="(factory.name=composite.test.2)"/>
|
| 125 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService"/>
|
| 126 | </composite>
|
| 127 |
|
| 128 | <composite name="composite.instantiator" architecture="true">
|
| 129 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(factory.name=composite.test.3)"/>
|
| 130 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService"/>
|
| 131 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>
|
| 132 | <provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.FooService"/>
|
| 133 | </composite>
|
| 134 |
|
| 135 | <!-- Test composition provides -->
|
| 136 | <component classname="org.apache.felix.ipojo.test.composite.component.TataProvider" factory="tata">
|
| 137 | <provides/>
|
| 138 | </component>
|
| 139 |
|
| 140 | <component classname="org.apache.felix.ipojo.test.composite.component.TotoProvider" factory="toto" architecture="true">
|
| 141 | <provides/>
|
| 142 | </component>
|
| 143 |
|
| 144 | <component classname="org.apache.felix.ipojo.test.composite.component.TotoProviderGlue" factory="totoglue">
|
| 145 | <requires field="m_toto" scope="composite"/>
|
| 146 | </component>
|
| 147 |
|
| 148 | <composite name="comp-0" architecture="true">
|
| 149 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 150 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 151 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 152 | </composite>
|
| 153 |
|
| 154 | <composite name="comp-1" architecture="true">
|
| 155 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 156 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 157 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 158 | <delegation method="tataInt" policy="One"/>
|
| 159 | <delegation method="toto1" policy="All"/>
|
| 160 | </provides>
|
| 161 | </composite>
|
| 162 |
|
| 163 | <composite name="comp-2" architecture="true">
|
| 164 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 165 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate="true"/>
|
| 166 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 167 | <delegation method="tataInt" policy="One"/>
|
| 168 | <delegation method="toto1" policy="All"/>
|
| 169 | </provides>
|
| 170 | </composite>
|
| 171 |
|
| 172 | <composite name="comp-3" architecture="true">
|
| 173 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 174 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" optional="true"/>
|
| 175 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 176 | </provides>
|
| 177 | </composite>
|
| 178 |
|
| 179 | <composite name="comp-4" architecture="true">
|
| 180 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata"/>
|
| 181 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" optional="true"/>
|
| 182 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 183 | <delegation method="tataInt" policy="One"/>
|
| 184 | <delegation method="toto1" policy="All"/>
|
| 185 | </provides>
|
| 186 | </composite>
|
| 187 |
|
| 188 | <composite name="comp-5" architecture="true">
|
| 189 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 190 | <!-- <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate ="true" optional="true"/> -->
|
| 191 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota">
|
| 192 | <delegation method="tataInt" policy="One"/>
|
| 193 | <delegation method="toto1" policy="All"/>
|
| 194 | </provides>
|
| 195 | </composite>
|
| 196 |
|
| 197 | <composite name="comp-6" architecture="true">
|
| 198 | <subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.Tata" aggregate="true"/>
|
| 199 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate="true" optional="true"/>
|
| 200 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Toto">
|
| 201 | <delegation method="toto1" policy="All"/>
|
| 202 | </provides>
|
| 203 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tata">
|
| 204 | <delegation method="tataInt" policy="One"/>
|
| 205 | </provides>
|
| 206 | </composite>
|
| 207 |
|
| 208 | <composite name="comp-7" architecture="true">
|
| 209 | <instance component="tata"/>
|
| 210 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 211 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 212 | </composite>
|
| 213 |
|
| 214 | <composite name="comp-8" architecture="true">
|
| 215 | <instance component="tata"/>
|
| 216 | <instance component="totoglue"/>
|
| 217 | <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto"/>
|
| 218 | <provides action="implement" specification="org.apache.felix.ipojo.test.composite.service.Tota"/>
|
| 219 | </composite>
|
| 220 |
|
| 221 | </ipojo>
|