blob: a4cff41a7bb2a069a1da70e6c1b956f5e6ef1c2b [file] [log] [blame]
Clement Escoffiered4ca022013-03-13 15:27:20 +00001<!--
2 ~ Licensed to the Apache Software Foundation (ASF) under one
3 ~ or more contributor license agreements. See the NOTICE file
4 ~ distributed with this work for additional information
5 ~ regarding copyright ownership. The ASF licenses this file
6 ~ to you under the Apache License, Version 2.0 (the
7 ~ "License"); you may not use this file except in compliance
8 ~ with the License. You may obtain a copy of the License at
9 ~
10 ~ http://www.apache.org/licenses/LICENSE-2.0
11 ~
12 ~ Unless required by applicable law or agreed to in writing,
13 ~ software distributed under the License is distributed on an
14 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 ~ KIND, either express or implied. See the License for the
16 ~ specific language governing permissions and limitations
17 ~ under the License.
18 -->
19
Clement Escoffier33c03832013-02-26 13:02:34 +000020<ipojo
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd
23 org.apache.felix.composite http://felix.apache.org/ipojo/schemas/SNAPSHOT/composite.xsd"
24 xmlns="org.apache.felix.ipojo"
25 xmlns:comp="org.apache.felix.ipojo.composite">
26 <comp:composite name="composite.test.3" architecture="true">
27 <subservice action="instantiate"
28 specification="org.apache.felix.ipojo.runtime.core.services.BazService"
29 aggregate="true" filter="(factory.name=BazProviderType)" />
30 <comp:provides action="export"
31 specification="org.apache.felix.ipojo.runtime.core.services.BazService" />
32 </comp:composite>
33
34 <comp:composite name="composite.test.2" architecture="true">
35 <subservice action="instantiate"
36 specification="org.apache.felix.ipojo.runtime.core.services.CheckService"
37 filter="(factory.name=Baz2CheckProvider)" />
38 <comp:provides action="export"
39 specification="org.apache.felix.ipojo.runtime.core.services.CheckService" />
40 <subservice action="import"
41 specification="org.apache.felix.ipojo.runtime.core.services.BazService"
42 scope="composite" />
43 </comp:composite>
44
45 <comp:composite name="composite.test.1" architecture="true">
46 <subservice action="instantiate"
47 specification="org.apache.felix.ipojo.runtime.core.services.BazService"
48 filter="(factory.name=composite.test.3)" />
49 <subservice action="instantiate"
50 specification="org.apache.felix.ipojo.runtime.core.services.CheckService"
51 filter="(factory.name=composite.test.2)" />
52 <comp:provides action="export"
53 specification="org.apache.felix.ipojo.runtime.core.services.CheckService" />
54 </comp:composite>
55
56 <comp:composite name="composite.instantiator" architecture="true">
57 <subservice action="instantiate"
58 specification="org.apache.felix.ipojo.runtime.core.services.BazService"
59 filter="(factory.name=composite.test.3)" />
60 <subservice action="instantiate"
61 specification="org.apache.felix.ipojo.runtime.core.services.FooService" />
62 <comp:provides action="export"
63 specification="org.apache.felix.ipojo.runtime.core.services.BazService" />
64 <comp:provides action="export"
65 specification="org.apache.felix.ipojo.runtime.core.services.FooService" />
66 </comp:composite>
67
68 <!-- Test composition provides -->
69
70 <comp:composite name="comp-0" architecture="true">
71 <subservice action="instantiate"
72 specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
73 <subservice action="import"
74 specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
75 <comp:provides action="implement"
76 specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
77 </comp:composite>
78
79 <comp:composite name="comp-1" architecture="true">
80 <subservice action="instantiate"
81 specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
82 <subservice action="import"
83 specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
84 <comp:provides action="implement"
85 specification="org.apache.felix.ipojo.runtime.core.services.Tota">
86 <delegation method="tataInt" policy="One" />
87 <delegation method="toto1" policy="All" />
88 </comp:provides>
89 </comp:composite>
90
91 <comp:composite name="comp-2" architecture="true">
92 <subservice action="instantiate"
93 specification="org.apache.felix.ipojo.runtime.core.services.Tata"
94 aggregate="true" />
95 <subservice action="import"
96 specification="org.apache.felix.ipojo.runtime.core.services.Toto"
97 aggregate="true" />
98 <comp:provides action="implement"
99 specification="org.apache.felix.ipojo.runtime.core.services.Tota">
100 <delegation method="tataInt" policy="One" />
101 <delegation method="toto1" policy="All" />
102 </comp:provides>
103 </comp:composite>
104
105 <comp:composite name="comp-3" architecture="true">
106 <subservice action="instantiate"
107 specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
108 <subservice action="import"
109 specification="org.apache.felix.ipojo.runtime.core.services.Toto"
110 optional="true" />
111 <comp:provides action="implement"
112 specification="org.apache.felix.ipojo.runtime.core.services.Tota">
113 </comp:provides>
114 </comp:composite>
115
116 <comp:composite name="comp-4" architecture="true">
117 <subservice action="instantiate"
118 specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
119 <subservice action="import"
120 specification="org.apache.felix.ipojo.runtime.core.services.Toto"
121 optional="true" />
122 <comp:provides action="implement"
123 specification="org.apache.felix.ipojo.runtime.core.services.Tota">
124 <delegation method="tataInt" policy="One" />
125 <delegation method="toto1" policy="All" />
126 </comp:provides>
127 </comp:composite>
128
129 <comp:composite name="comp-5" architecture="true">
130 <subservice action="instantiate"
131 specification="org.apache.felix.ipojo.runtime.core.services.Tata"
132 aggregate="true" />
133 <!-- <subservice action="import" specification="org.apache.felix.ipojo.test.comp:composite.service.Toto" aggregate ="true" optional="true"/> -->
134 <comp:provides action="implement"
135 specification="org.apache.felix.ipojo.runtime.core.services.Tota">
136 <delegation method="tataInt" policy="One" />
137 <delegation method="toto1" policy="All" />
138 </comp:provides>
139 </comp:composite>
140
141 <comp:composite name="comp-6" architecture="true">
142 <subservice action="instantiate"
143 specification="org.apache.felix.ipojo.runtime.core.services.Tata"
144 aggregate="true" />
145 <subservice action="import"
146 specification="org.apache.felix.ipojo.runtime.core.services.Toto"
147 aggregate="true" optional="true" />
148 <comp:provides action="implement"
149 specification="org.apache.felix.ipojo.runtime.core.services.Toto">
150 <delegation method="toto1" policy="All" />
151 </comp:provides>
152 <comp:provides action="implement"
153 specification="org.apache.felix.ipojo.runtime.core.services.Tata">
154 <delegation method="tataInt" policy="One" />
155 </comp:provides>
156 </comp:composite>
157
158 <comp:composite name="comp-7" architecture="true">
159 <instance component="tata" />
160 <subservice action="import"
161 specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
162 <comp:provides action="implement"
163 specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
164 </comp:composite>
165
166 <comp:composite name="comp-8" architecture="true">
167 <instance component="tata" />
168 <instance component="totoglue" />
169 <subservice action="import"
170 specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
171 <comp:provides action="implement"
172 specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
173 </comp:composite>
174</ipojo>