blob: 90131d8dc919f31094d37fcdc562b047406cd688 [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 xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
27 <comp:composite name="composite.bar.1" architecture="true">
28 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.BarService"/>
29 </comp:composite>
30
31 <comp:composite name="composite.bar.2" architecture="true">
32 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.BarService" aggregate="true"/>
33 </comp:composite>
34
35 <comp:composite name="composite.bar.3" architecture="true">
36 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.BarService" optional="true"/>
37 </comp:composite>
38
39 <comp:composite name="composite.bar.4" architecture="true">
40 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.FooService" aggregate="true" optional="true"/>
41 </comp:composite>
42
43 <comp:composite name="composite.bar.5-accept" architecture="true">
44 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.FooService">
45 <property name="boolean" value="true"/>
46 <property name="string" value="foo"/>
47 <property name="strAprop" value="{foo, bar, baz}"/>
48 <property name="int" value="5"/>
49 </subservice>
50 </comp:composite>
51
52 <comp:composite name="composite.bar.5-refuse1" architecture="true">
53 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.BarService">
54 <property name="foo" value="bar"/>
55 <property name="boolean" value="true"/>
56 <property name="string" value="foo"/>
57 <property name="strAprop" value="{foo, bar, baz}"/>
58 <property name="int" value="5"/>
59 </subservice>
60 </comp:composite>
61
62 <comp:composite name="composite.bar.5-refuse2" architecture="true">
63 <subservice action="instantiate" specification="org.apache.felix.ipojo.runtime.core.services.BarService">
64 <property name="string" value="foo"/>
65 <property name="strAprop" value="{foo, bar, baz}"/>
66 </subservice>
67 </comp:composite>
68
69 <!-- Instance of a specified component -->
70 <comp:composite name="composite.inst.1" architecture="true">
71 <instance component="COMPO-FooProviderType-1" /> <!-- name="FooProv" -->
72 <instance component="COMPO-FooProviderType-Dyn2">
73 <property name="boolean" value="true"/>
74 <property name="string" value="foo"/>
75 <property name="strAProp" value="{a,b,c}"/>
76 </instance>
77 </comp:composite>
78
79 <!-- Scope test -->
80 <component name="SCOPE-provider" classname="org.apache.felix.ipojo.runtime.core.components.ServiceProvider">
81 <provides/>
82 </component>
83 <component name="SCOPE-cons" classname="org.apache.felix.ipojo.runtime.core.components.ServiceConsumer">
84 <provides/>
85 <requires field="service"/>
86 </component>
87 <comp:composite name="SCOPE-scope">
88 <instance component="SCOPE-provider"/>
89 <instance component="SCOPE-cons"/>
90 </comp:composite>
91 <comp:composite name="SCOPE-badscope">
92 <instance component="SCOPE-cons"/>
93 </comp:composite>
94
95 <!-- Instance configuration -->
96 <comp:composite name="CONF-MySuperComposite">
97 <instance component="COMPO-FooProviderType-2">
98 <property name="int" value="3"/>
99 </instance>
100 <subservice action="instantiate"
101 specification="org.apache.felix.ipojo.runtime.core.services.FooService">
102 <property name="boolean" value="true"/>
103 <property name="string" value="foo"/>
104 <property name="strAprop" value="{foo, bar, baz}"/>
105 <property name="int" value="3"/>
106 </subservice>
107 </comp:composite>
108</ipojo>