blob: 6046c8d3d23b7abc6d661808127a0a13f6994fe0 [file] [log] [blame]
Clement Escoffierf58887c2008-09-09 14:21:15 +00001<!--
Clement Escoffierc0db3a82009-11-29 10:06:36 +00002 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
Clement Escoffier0b93f382009-07-03 13:16:24 +00009
Clement Escoffierc0db3a82009-11-29 10:06:36 +000010 http://www.apache.org/licenses/LICENSE-2.0
Clement Escoffier0b93f382009-07-03 13:16:24 +000011
Clement Escoffierc0db3a82009-11-29 10:06:36 +000012 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.
Clement Escoffierf58887c2008-09-09 14:21:15 +000018-->
19<xs:schema elementFormDefault="qualified" targetNamespace="org.apache.felix.ipojo"
Clement Escoffierc0db3a82009-11-29 10:06:36 +000020 xmlns="org.apache.felix.ipojo" xmlns:xs="http://www.w3.org/2001/XMLSchema">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000021 <xs:annotation>
22 <xs:documentation>iPOJO Core XML-Schema. This grammars models iPOJO descriptor using core
23 features. It provides several extensibility mechanism in order to compose this schema with
24 external handlers and other component implementation type such as
25 compositions.</xs:documentation>
26 </xs:annotation>
27 <xs:element name="ipojo">
Clement Escoffierc0db3a82009-11-29 10:06:36 +000028 <xs:complexType>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000029 <xs:annotation>
30 <xs:documentation>iPOJO top level element.</xs:documentation>
31 </xs:annotation>
32 <xs:choice minOccurs="0" maxOccurs="unbounded">
Clement Escoffierc0db3a82009-11-29 10:06:36 +000033 <xs:element ref="handler" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000034 <xs:annotation>
35 <xs:documentation>The handler declarations.</xs:documentation>
36 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000037 </xs:element>
38 <xs:element ref="instance" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000039 <xs:annotation>
40 <xs:documentation>The instance declarations.</xs:documentation>
41 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000042 </xs:element>
43 <xs:element ref="component" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000044 <xs:annotation>
45 <xs:documentation>The component type declarations.</xs:documentation>
46 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000047 </xs:element>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000048 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"
49 > </xs:any>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000050 </xs:choice>
51 </xs:complexType>
52 </xs:element>
53 <xs:complexType name="HandlerType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000054 <xs:annotation>
55 <xs:documentation>Description of the handler.</xs:documentation>
56 </xs:annotation>
57 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000058 <xs:extension base="RootElementType">
59 <xs:sequence maxOccurs="unbounded" minOccurs="0">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000060 <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any" processContents="skip"
61 > </xs:any>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000062 </xs:sequence>
63 <xs:attribute name="classname" type="xs:string" use="required">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000064 <xs:annotation>
65 <xs:documentation>The implementation class of the handler. The specified class must
66 implement (direcly or not) the "org.apache.felix.ipojo.Handler"
67 interface.</xs:documentation>
68 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000069 </xs:attribute>
70 <xs:attribute name="name" type="xs:string" use="required">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000071 <xs:annotation>
72 <xs:documentation>The name of the handler.</xs:documentation>
73 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000074 </xs:attribute>
75 <xs:attribute name="namespace" type="xs:string" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000076 <xs:annotation>
77 <xs:documentation>The XML namespace of the handler.</xs:documentation>
78 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000079 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000080 <xs:attribute name="architecture" type="xs:boolean" use="optional" fixed="false">
81 <xs:annotation>
82 <xs:documentation>Enables or disables the architecture exposition. By default, the
83 architecture is not exposed. This allows handler introspection.</xs:documentation>
84 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000085 </xs:attribute>
86 <xs:attribute name="level" type="xs:int" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000087 <xs:annotation>
88 <xs:documentation>The start level of the handler.</xs:documentation>
89 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000090 </xs:attribute>
91 </xs:extension>
92 </xs:complexContent>
93 </xs:complexType>
94 <xs:complexType name="InstanceType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +000095 <xs:annotation>
96 <xs:documentation>Describes an instance of a component.</xs:documentation>
97 </xs:annotation>
98 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000099 <xs:extension base="RootElementType">
100 <xs:sequence minOccurs="0" maxOccurs="unbounded">
101 <xs:element name="property" type="InstancePropertyType">
102 <xs:annotation>
103 <xs:documentation>The instance properties.</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000104 </xs:annotation>
105 </xs:element>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000106 </xs:sequence>
107 <xs:attribute name="component" type="xs:string">
108 <xs:annotation>
109 <xs:documentation>The name of the instance component type.</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000110 </xs:annotation>
111 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000112 <xs:attribute name="name" type="xs:string" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000113 <xs:annotation>
114 <xs:documentation>The (unique) name of the instance.</xs:documentation>
115 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000116 </xs:attribute>
117 <xs:attribute name="version" type="xs:string" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000118 <xs:annotation>
119 <xs:documentation>The version of the factory to use.</xs:documentation>
120 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000121 </xs:attribute>
122 </xs:extension>
123 </xs:complexContent>
124 </xs:complexType>
125 <xs:complexType name="InstancePropertyType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000126 <xs:annotation>
127 <xs:documentation>Defines a property of an instance configuration.</xs:documentation>
128 </xs:annotation>
129 <xs:sequence>
130 <xs:element name="property" type="InstancePropertyType" minOccurs="0" maxOccurs="unbounded"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000131 </xs:sequence>
132 <xs:attribute name="name" type="xs:string" use="optional">
133 <xs:annotation>
134 <xs:documentation>Name of the property. Can be optional if a property is inside a structure.
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000135 The 'instance.name' property has a special semantic as it will be used as the instance
136 name.</xs:documentation>
137 </xs:annotation>
138 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000139 <xs:attribute name="value" type="xs:string" use="optional">
140 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000141 <xs:documentation>Value of the property. Can be null for property containing other
142 properties.</xs:documentation>
143 </xs:annotation>
144 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000145 <xs:attribute name="type" type="xs:string" use="optional">
146 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000147 <xs:documentation>Type of the property, used to create the adequate object. Supported values
148 are list, array, dictionary and map.</xs:documentation>
149 </xs:annotation>
150 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000151 </xs:complexType>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000152 <xs:complexType name="RootElementType"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000153 <xs:complexType name="ComponentType">
154 <xs:annotation>
155 <xs:documentation>Declares an atomic (i.e. primitive) component type.</xs:documentation>
156 </xs:annotation>
157 <xs:choice minOccurs="0" maxOccurs="unbounded">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000158 <xs:element ref="callback" minOccurs="0" maxOccurs="unbounded">
159 <xs:annotation>
160 <xs:documentation>Describes the method(s) to invoke when the component's state
161 changes.</xs:documentation>
162 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000163 </xs:element>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000164 <xs:element ref="provides" minOccurs="0" maxOccurs="unbounded">
165 <xs:annotation>
166 <xs:documentation>Indicates the component provided service(s). By default, all implemented
167 interfaces are published.</xs:documentation>
168 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000169 </xs:element>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000170 <xs:element ref="requires" minOccurs="0" maxOccurs="unbounded">
171 <xs:annotation>
172 <xs:documentation>Indicates the service requirements of the component.</xs:documentation>
173 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000174 </xs:element>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000175 <xs:element ref="properties" minOccurs="0" maxOccurs="unbounded">
176 <xs:annotation>
177 <xs:documentation>Describes the properties of the component.</xs:documentation>
178 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000179 </xs:element>
180 <xs:element ref="controller" minOccurs="0" maxOccurs="1">
Clement Escoffier58b3f182008-09-22 18:36:07 +0000181 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000182 <xs:documentation>Lifecycle controller for this component.</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000183 </xs:annotation>
184 </xs:element>
185 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"
186 > </xs:any>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000187 </xs:choice>
188 <xs:attribute name="name" type="xs:string" use="optional">
189 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000190 <xs:documentation>Specifies the name of the component type. This name is used to identify
191 the factory attached to this type. If not specified, the factory name is the
192 implementation class name.</xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000193 </xs:annotation>
194 </xs:attribute>
195 <xs:attribute name="public" type="xs:boolean" use="optional">
196 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000197 <xs:documentation>Determines if the component type is public or private. A public factory
198 (default) can be used from any bundles.</xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000199 </xs:annotation>
200 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000201 <xs:attribute name="classname" type="xs:string" use="required">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000202 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000203 <xs:documentation>Specifies the implementation class of the component
204 type.</xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000205 </xs:annotation>
206 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000207 <xs:attribute name="architecture" type="xs:boolean" use="optional">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000208 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000209 <xs:documentation>Enables or disables the architecture exposition. By default, the
210 architecture is exposed. This allows instance introspection.</xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000211 </xs:annotation>
212 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000213 <xs:attribute name="immediate" type="xs:boolean" use="optional">
214 <xs:annotation>
215 <xs:documentation>Creates the object of the component implementation type as soon as the
216 component instance becomes valid. The default value is "true" if the component doesn't
217 provide any service, "false" otherwise.</xs:documentation>
218 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000219 </xs:attribute>
220 <xs:attribute name="factory-method" type="xs:string" use="optional">
221 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000222 <xs:documentation>Factory method called to create POJO objects instead of the constructor.
223 The specified method must be a static method of the implementation class returning an
224 instance of this implementation class. The factory method can receive the bundle context
225 in argument.</xs:documentation>
226 </xs:annotation>
227 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000228 <xs:attribute name="version" type="xs:string" use="optional">
229 <xs:annotation>
230 <xs:documentation>Set the version of this component type</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000231 </xs:annotation>
232 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000233 </xs:complexType>
234 <xs:complexType name="RequiresType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000235 <xs:annotation>
236 <xs:documentation>Description of component services requirements.</xs:documentation>
237 </xs:annotation>
238 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000239 <xs:extension base="ServiceDependencyType">
240 <xs:sequence minOccurs="0" maxOccurs="unbounded">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000241 <xs:element name="callback" type="DependencyCallbackType">
242 <xs:annotation>
243 <xs:documentation>Service requirement method invocation description. Here can be
244 specified a bind method called when a service appears and an unbind method called
245 when a service disappears.</xs:documentation>
246 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000247 </xs:element>
248 </xs:sequence>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000249
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000250 <xs:attribute name="interface" type="xs:string" use="prohibited">
251 <xs:annotation>
252 <xs:documentation>The interface describing the required service type. This attribute is
253 needed only when using aggregate dependencies with field injection and when the type
254 of this field is a list, vector, collection and set. This attribute is deprecated, use
255 'specification'.</xs:documentation>
256 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000257 </xs:attribute>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000258
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000259 <xs:attribute name="field" type="xs:string" use="optional">
260 <xs:annotation>
261 <xs:documentation>The name of the field representing the service dependency in the
262 implementation class.</xs:documentation>
263 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000264 </xs:attribute>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000265
Clement Escoffier93013662011-01-04 09:48:23 +0000266 <xs:attribute name="constructor-parameter" type="xs:int" use="optional">
267 <xs:annotation>
268 <xs:documentation>The index of the parameter if the dependency is injected
269 using the constructor.</xs:documentation>
270 </xs:annotation>
271 </xs:attribute>
272
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000273 <xs:attribute name="nullable" type="xs:boolean" use="optional">
274 <xs:annotation>
275 <xs:documentation>Enable or disable the Nullable pattern on optional service
276 dependencies. By default, Nullable pattern is enabled. If disabled, iPOJO will inject
277 null instead of a Nullable object.</xs:documentation>
278 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000279 </xs:attribute>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000280
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000281 <xs:attribute name="default-implementation" type="xs:string" use="optional">
282 <xs:annotation>
283 <xs:documentation>Specifies the default implementation class for an optional service
284 dependency. If no providers are found, iPOJO creates an instance of the
285 default-implementation (nullary constructor) and injects it. The given class must
286 implement the required service interface.</xs:documentation>
287 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000288 </xs:attribute>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000289
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000290 <xs:attribute name="from" type="xs:string" use="optional">
291 <xs:annotation>
292 <xs:documentation>Specific service provider. The dependency can only be fulfilled by the
293 component with the matching name, or by the service with a matching
294 PID.</xs:documentation>
295 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000296 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000297
298 <xs:attribute name="proxy" type="xs:boolean" use="optional">
299 <xs:annotation>
300 <xs:documentation>Enables or Disable the proxy injection (on field
301 injection)</xs:documentation>
302 </xs:annotation>
Clement Escoffier769c9942009-12-26 11:15:42 +0000303 </xs:attribute>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000304
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000305 <xs:attribute name="scope" use="optional">
306 <xs:simpleType>
307 <xs:restriction base="xs:string">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000308 <xs:enumeration value="global"/>
309 <xs:enumeration value="composite"/>
310 <xs:enumeration value="composite+global"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000311 </xs:restriction>
312 </xs:simpleType>
313 </xs:attribute>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000314
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000315 </xs:extension>
316 </xs:complexContent>
317 </xs:complexType>
318 <xs:complexType name="DependencyCallbackType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000319 <xs:annotation>
320 <xs:documentation>Dependency callbacks are used to receive notification when service providers
321 arrive and leave.</xs:documentation>
322 </xs:annotation>
323 <xs:attribute name="method" type="xs:string" use="required">
324 <xs:annotation>
325 <xs:documentation>Method to call</xs:documentation>
326 </xs:annotation>
327 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000328 <xs:attribute name="type" use="required">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000329 <xs:annotation>
330 <xs:documentation> Type of callback (bind, unbind, or updated). Bind means that the method
331 will be called when a provider arrives. Unbind means that the method will be called when a
332 provider leaves. Updated means that a service was modified but is still valid for the
333 service dependency. </xs:documentation>
334 </xs:annotation>
335 <xs:simpleType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000336 <xs:restriction base="xs:string">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000337 <xs:enumeration value="bind"/>
338 <xs:enumeration value="unbind"/>
339 <xs:enumeration value="modified"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000340 </xs:restriction>
341 </xs:simpleType>
342 </xs:attribute>
343 </xs:complexType>
344 <xs:complexType name="CallbackType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000345 <xs:annotation>
346 <xs:documentation>Lifecycle Callback. Allows a POJO to be notified when the instance becomes
347 valid or invalid.</xs:documentation>
348 </xs:annotation>
349 <xs:attribute name="method" type="xs:string" use="required">
350 <xs:annotation>
351 <xs:documentation>Specifies the method to call on the transition.</xs:documentation>
352 </xs:annotation>
353 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000354 <xs:attribute name="transition" use="required">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000355 <xs:annotation>
356 <xs:documentation>Specifies the transition when the callback needs to be
357 invoked.</xs:documentation>
358 </xs:annotation>
359 <xs:simpleType>
360 <xs:annotation>
361 <xs:documentation>Lifecycle transition state. "validate" means that the component's
362 instance was invalid and becomes valid, "invalidate" means that the component's intance
363 was valid and becomes invalid.</xs:documentation>
364 </xs:annotation>
365 <xs:restriction base="xs:string">
366 <xs:enumeration value="validate"/>
367 <xs:enumeration value="invalidate"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000368 </xs:restriction>
369 </xs:simpleType>
370 </xs:attribute>
371 </xs:complexType>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000372 <xs:element name="provides" type="ProvidesType" id="provides"/>
373 <xs:complexType name="ProvidesType">
374 <xs:annotation>
375 <xs:documentation>Provided service(s) description.</xs:documentation>
376 </xs:annotation>
377 <xs:sequence minOccurs="0" maxOccurs="unbounded">
378 <xs:choice>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000379 <xs:element name="property" type="PropertyType">
380 <xs:annotation>
381 <xs:documentation>List of service specific properties.</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000382 </xs:annotation>
383 </xs:element>
384 <xs:element name="controller" minOccurs="0" maxOccurs="1" type="ServiceControllerType">
385 <xs:annotation>
386 <xs:documentation>Service Controller impacting the current provided
387 service</xs:documentation>
388 </xs:annotation>
389 </xs:element>
390 </xs:choice>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000391 </xs:sequence>
392 <xs:attribute name="interface" type="xs:string" use="prohibited">
393 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000394 <xs:documentation>Deprecated attribute, use 'specifications' instead of
395 'interface'</xs:documentation>
396 </xs:annotation>
397 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000398 <xs:attribute name="specifications" type="xs:string" use="optional">
399 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000400 <xs:documentation>The list of service specifications (i.e. interfaces) to expose. By
401 default, all interfaces implemented by the component implementation class are
402 published.</xs:documentation>
403 </xs:annotation>
404 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000405 <xs:attribute name="factory" type="xs:string" use="prohibited">
406 <xs:annotation>
407 <xs:documentation>Use 'strategy' instead of 'factory'</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000408 </xs:annotation>
409 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000410 <xs:attribute name="strategy" type="xs:string" use="optional">
411 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000412 <xs:documentation>POJO creation strategy. By default, the POJO object is created once
413 (singleton). If the factory is set to "SERVICE", the creation policy follows the OSGi
414 service factory policy (one object object per asking bundle). INSTANCE allows creating one
415 different POJO object per asking instance. Finally, a custom strategy can be used by
416 specifying the qualified name of the class extending CreationPolicy</xs:documentation>
417 </xs:annotation>
418 </xs:attribute>
Clement Escoffierf4d84772010-05-04 15:22:36 +0000419 <xs:attribute name="post-registration" type="xs:string" use="optional">
420 <xs:annotation>
421 <xs:documentation>Defines a callback called after the service registration. The callback takes a ServiceReference
422 as parameter</xs:documentation>
423 </xs:annotation>
424 </xs:attribute>
425 <xs:attribute name="post-unregistration" type="xs:string" use="optional">
426 <xs:annotation>
427 <xs:documentation>Defines a callback called after the service unregistration. The callback takes a ServiceReference
428 as parameter</xs:documentation>
429 </xs:annotation>
430 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000431 </xs:complexType>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000432 <xs:complexType name="ServiceControllerType">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000433 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000434 <xs:documentation> Defines a service controller. </xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000435 </xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000436 <xs:attribute name="field" type="xs:string" use="required">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000437 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000438 <xs:documentation> Field of the controller </xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000439 </xs:annotation>
440 </xs:attribute>
441 <xs:attribute name="value" type="xs:string" use="optional">
442 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000443 <xs:documentation> Intiail value of the controller </xs:documentation>
444 </xs:annotation>
445 </xs:attribute>
446 </xs:complexType>
447 <xs:complexType name="PropertyType">
448 <xs:annotation>
449 <xs:documentation> Defines a component property. </xs:documentation>
450 </xs:annotation>
451 <xs:attribute name="field" type="xs:string" use="optional">
452 <xs:annotation>
453 <xs:documentation> Field of the property </xs:documentation>
454 </xs:annotation>
455 </xs:attribute>
456 <xs:attribute name="method" type="xs:string" use="optional">
457 <xs:annotation>
458 <xs:documentation> Setter method of the property. This method is called to inject property
459 value. </xs:documentation>
460 </xs:annotation>
461 </xs:attribute>
Clement Escoffier93013662011-01-04 09:48:23 +0000462 <xs:attribute name="constructor-parameter" type="xs:int" use="optional">
463 <xs:annotation>
464 <xs:documentation>The index of the parameter if the property is injected
465 using the constructor.</xs:documentation>
466 </xs:annotation>
467 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000468 <xs:attribute name="name" type="xs:string" use="optional">
469 <xs:annotation>
470 <xs:documentation> Name of the property. </xs:documentation>
471 </xs:annotation>
472 </xs:attribute>
473 <xs:attribute name="value" type="xs:string" use="optional">
474 <xs:annotation>
475 <xs:documentation> Default value of the property. </xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000476 </xs:annotation>
477 </xs:attribute>
478 <xs:attribute name="type" type="xs:string" use="optional">
479 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000480 <xs:documentation> Type of the property. </xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000481 </xs:annotation>
482 </xs:attribute>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000483 <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false">
484 <xs:annotation>
485 <xs:documentation>Set the property as mandatory. A mandatory property MUST receive a value
486 either in the component type description or in the instance configuration. Properties are
487 optional by default.</xs:documentation>
488 </xs:annotation>
489 </xs:attribute>
490 </xs:complexType>
491 <xs:element name="callback" type="CallbackType" id="callback"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000492 <xs:element name="controller" type="ControllerType" id="controller">
493 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000494 <xs:documentation/>
495 </xs:annotation>
496 </xs:element>
497 <xs:element name="requires" type="RequiresType" id="requires"/>
498 <xs:element name="component" type="ComponentType" id="component"/>
499 <xs:element name="handler" type="HandlerType" id="handler"/>
500 <xs:element name="instance" type="InstanceType" id="instance"/>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000501
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000502 <xs:element name="properties" type="PropertiesType" id="properties"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000503 <xs:complexType name="PropertiesType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000504 <xs:annotation>
505 <xs:documentation>List of component, instance or service properties. This field will receive
506 the property value.</xs:documentation>
507 </xs:annotation>
508 <xs:sequence minOccurs="0" maxOccurs="unbounded">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000509 <xs:element name="property" type="PropertyType">
510 <xs:annotation>
511 <xs:documentation>The list of properties.</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000512 </xs:annotation>
513 </xs:element>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000514 </xs:sequence>
515 <xs:attribute name="propagation" type="xs:boolean" use="optional">
516 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000517 <xs:documentation>Propagation of the component properties to the provided services. If this
518 parameter is set to "true", each time properties are reconfigured, they are propagated to
519 each service published by the component.</xs:documentation>
520 </xs:annotation>
521 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000522 <xs:attribute name="pid" type="xs:string" use="optional">
523 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000524 <xs:documentation>Unique identifier used to reconfigure components properties (via Managed
525 Services) with the Configuration Admin.</xs:documentation>
526 </xs:annotation>
527 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000528 <xs:attribute name="updated" type="xs:string" use="optional">
529 <xs:annotation>
530 <xs:documentation>Method called when a reconfiguration is done</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000531 </xs:annotation>
532 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000533 </xs:complexType>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000534
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000535 <xs:complexType name="ServiceDependencyType">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000536 <xs:attribute name="specification" type="xs:string" use="optional">
537 <xs:annotation>
538 <xs:documentation>The specification describing the required service type. This attribute is
539 needed only when using aggregate dependencies with field injection and when the type of
540 this field is a list, vector, collection and set.</xs:documentation>
541 </xs:annotation>
542 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000543 <xs:attribute name="optional" type="xs:boolean" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000544 <xs:annotation>
545 <xs:documentation>Sets the service dependency optionality</xs:documentation>
546 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000547 </xs:attribute>
548 <xs:attribute name="aggregate" type="xs:boolean" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000549 <xs:annotation>
550 <xs:documentation>Sets the service dependency cardinality.</xs:documentation>
551 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000552 </xs:attribute>
553 <xs:attribute name="policy" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000554 <xs:annotation>
555 <xs:documentation>Sets the binding policy of the dependency. Three policies are supported.
556 The dynamic policy supports service providers dynamism. The static policy freezes the
557 provider set as soon as the dependency is used. The dynamic-priority policy is an
558 extension of the dynamic policy, but providers are ranked.</xs:documentation>
559 </xs:annotation>
560 <xs:simpleType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000561 <xs:restriction base="xs:string">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000562 <xs:enumeration value="dynamic"/>
563 <xs:enumeration value="static"/>
564 <xs:enumeration value="dynamic-priority"/>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000565 </xs:restriction>
566 </xs:simpleType>
567 </xs:attribute>
568 <xs:attribute name="comparator" type="xs:string" use="optional">
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000569 <xs:annotation>
570 <xs:documentation>The comparator attribute allows specifying the class used to compare
571 providers. This class must implemented the java.util.Comparator class and must support the
572 comparison of service references.</xs:documentation>
573 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000574 </xs:attribute>
575 <xs:attribute name="filter" type="xs:string" use="optional">
576 <xs:annotation>
577 <xs:documentation>LDAP filter used to filter providers</xs:documentation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000578 </xs:annotation>
579 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000580 <xs:attribute name="id" type="xs:string" use="optional">
581 <xs:annotation>
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000582 <xs:documentation>id of the service dependency. The id allows to indentify and to refert to
583 this dependency.</xs:documentation>
584 </xs:annotation>
585 </xs:attribute>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000586 </xs:complexType>
Clement Escoffierf58887c2008-09-09 14:21:15 +0000587
Clement Escoffier5f7d5a82010-02-24 18:15:44 +0000588 <xs:complexType name="ControllerType">
589 <xs:annotation>
590 <xs:documentation>Specifies the lifecycle controller of a component, which allows to validate
591 or invalidate component instances.</xs:documentation>
592 </xs:annotation>
593 <xs:attribute name="field" type="xs:string" use="required">
594 <xs:annotation>
595 <xs:documentation>The name of the component lifecycle controller field. The type of the
596 specified field must be boolean. Setting the value of the specified field to "true" means
597 the validation of the component instance while setting it to "false" means the
598 invalidation of the component instance.</xs:documentation>
599 </xs:annotation>
600 </xs:attribute>
601 </xs:complexType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000602</xs:schema>