blob: 2f3491f66ebbb825cd12eb51138f10a0f7d9f3e1 [file] [log] [blame]
Clement Escoffier50b8a102008-11-14 11:08:05 +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 Escoffier50b8a102008-11-14 11:08:05 +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 Escoffier50b8a102008-11-14 11:08:05 +000021 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000022 <xs:documentation>iPOJO Core XML-Schema. This grammars models iPOJO descriptor using core features. It provides several extensibility mechanism in order to compose this schema with external handlers and other component implementation type such as compositions.</xs:documentation></xs:annotation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000023 <xs:element name="ipojo">
Clement Escoffierc0db3a82009-11-29 10:06:36 +000024 <xs:complexType>
Clement Escoffier50b8a102008-11-14 11:08:05 +000025 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000026 <xs:documentation>iPOJO top level element.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000027 </xs:annotation>
28 <xs:choice minOccurs="0" maxOccurs="unbounded">
Clement Escoffierc0db3a82009-11-29 10:06:36 +000029 <xs:element ref="handler" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +000030 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000031 <xs:documentation>The handler declarations.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000032 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000033 </xs:element>
34 <xs:element ref="instance" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +000035 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000036 <xs:documentation>The instance declarations.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000037 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000038 </xs:element>
39 <xs:element ref="component" minOccurs="0" maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +000040 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000041 <xs:documentation>The component type declarations.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000042 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000043 </xs:element>
44 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
45 </xs:any>
46 </xs:choice>
47 </xs:complexType>
48 </xs:element>
49 <xs:complexType name="HandlerType">
Clement Escoffier50b8a102008-11-14 11:08:05 +000050 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000051 <xs:documentation>Description of the handler.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000052 </xs:annotation>
53 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000054 <xs:extension base="RootElementType">
55 <xs:sequence maxOccurs="unbounded" minOccurs="0">
56 <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
57 processContents="skip">
58 </xs:any>
59 </xs:sequence>
60 <xs:attribute name="classname" type="xs:string" use="required">
Clement Escoffier50b8a102008-11-14 11:08:05 +000061 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000062 <xs:documentation>The implementation class of the handler. The specified class must implement (direcly or not) the "org.apache.felix.ipojo.Handler" interface.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000063 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000064 </xs:attribute>
65 <xs:attribute name="name" type="xs:string" use="required">
Clement Escoffier50b8a102008-11-14 11:08:05 +000066 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000067 <xs:documentation>The name of the handler.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000068 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000069 </xs:attribute>
70 <xs:attribute name="namespace" type="xs:string" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +000071 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000072 <xs:documentation>The XML namespace of the handler.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000073 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000074 </xs:attribute>
75 <xs:attribute name="architecture" type="xs:boolean"
76 use="optional" fixed="false">
Clement Escoffier50b8a102008-11-14 11:08:05 +000077 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000078 <xs:documentation>Enables or disables the architecture exposition. By default, the architecture is not exposed. This allows handler introspection.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000079 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000080 </xs:attribute>
81 <xs:attribute name="level" type="xs:int" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +000082 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000083 <xs:documentation>The start level of the handler.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000084 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000085 </xs:attribute>
86 </xs:extension>
87 </xs:complexContent>
88 </xs:complexType>
89 <xs:complexType name="InstanceType">
Clement Escoffier50b8a102008-11-14 11:08:05 +000090 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000091 <xs:documentation>Describes an instance of a component.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +000092 </xs:annotation>
93 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +000094 <xs:extension base="RootElementType">
95 <xs:sequence minOccurs="0" maxOccurs="unbounded">
96 <xs:element name="property" type="InstancePropertyType">
97 <xs:annotation>
98 <xs:documentation>The instance properties.</xs:documentation>
99 </xs:annotation></xs:element>
100 </xs:sequence>
101 <xs:attribute name="component" type="xs:string">
102 <xs:annotation>
103 <xs:documentation>The name of the instance component type.</xs:documentation>
104 </xs:annotation></xs:attribute>
105 <xs:attribute name="name" type="xs:string" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000106 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000107 <xs:documentation>The (unique) name of the instance.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000108 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000109 </xs:attribute>
110 <xs:attribute name="version" type="xs:string" use="optional">
Clement Escoffier0b93f382009-07-03 13:16:24 +0000111 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000112 <xs:documentation>The version of the factory to use.</xs:documentation>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000113 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000114 </xs:attribute>
115 </xs:extension>
116 </xs:complexContent>
117 </xs:complexType>
118 <xs:complexType name="InstancePropertyType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000119 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000120 <xs:documentation>Defines a property of an instance configuration.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000121 </xs:annotation>
122 <xs:sequence>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000123 <xs:element name="property" type="InstancePropertyType" minOccurs="0" maxOccurs="unbounded"></xs:element>
124 </xs:sequence>
125 <xs:attribute name="name" type="xs:string" use="optional">
126 <xs:annotation>
127 <xs:documentation>Name of the property. Can be optional if a property is inside a structure.
Clement Escoffier50b8a102008-11-14 11:08:05 +0000128The 'instance.name' property has a special semantic as it will be used as the instance name.</xs:documentation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000129 </xs:annotation></xs:attribute>
130 <xs:attribute name="value" type="xs:string" use="optional">
131 <xs:annotation>
132 <xs:documentation>Value of the property. Can be null for property containing other properties.</xs:documentation>
133 </xs:annotation></xs:attribute>
134 <xs:attribute name="type" type="xs:string" use="optional">
135 <xs:annotation>
136 <xs:documentation>Type of the property, used to create the adequate object. Supported values are list, array, dictionary and map.</xs:documentation>
137 </xs:annotation></xs:attribute>
138 </xs:complexType>
139 <xs:complexType name="RootElementType"></xs:complexType>
140 <xs:complexType name="ComponentType">
141 <xs:annotation>
142 <xs:documentation>Declares an atomic (i.e. primitive) component type.</xs:documentation>
143 </xs:annotation>
144 <xs:choice minOccurs="0" maxOccurs="unbounded">
145 <xs:element ref="callback" minOccurs="0"
146 maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000147 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000148 <xs:documentation>Describes the method(s) to invoke when the component's state changes.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000149 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000150 </xs:element>
151 <xs:element ref="provides" minOccurs="0"
152 maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000153 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000154 <xs:documentation>Indicates the component provided service(s). By default, all implemented interfaces are published.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000155 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000156 </xs:element>
157 <xs:element ref="requires" minOccurs="0"
158 maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000159 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000160 <xs:documentation>Indicates the service requirements of the component.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000161 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000162 </xs:element>
163 <xs:element ref="properties" minOccurs="0"
164 maxOccurs="unbounded">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000165 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000166 <xs:documentation>Describes the properties of the component.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000167 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000168 </xs:element>
169 <xs:element ref="controller" minOccurs="0" maxOccurs="1">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000170 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000171 <xs:documentation>Lifecycle controller for this component.</xs:documentation>
172 </xs:annotation></xs:element>
173 <xs:any namespace="##other" processContents="lax"
174 minOccurs="0" maxOccurs="unbounded">
175 </xs:any>
176 </xs:choice>
177 <xs:attribute name="name" type="xs:string" use="optional">
178 <xs:annotation>
179 <xs:documentation>Specifies the name of the component type. This name is used to identify the factory attached to this type. If not specified, the factory name is the implementation class name.</xs:documentation>
180 </xs:annotation>
181 </xs:attribute>
182 <xs:attribute name="public" type="xs:boolean" use="optional">
183 <xs:annotation>
184 <xs:documentation>Determines if the component type is public or private. A public factory (default) can be used from any bundles.</xs:documentation>
185 </xs:annotation>
186 </xs:attribute>
187 <xs:attribute name="classname" type="xs:string"
188 use="required">
189 <xs:annotation>
190 <xs:documentation>Specifies the implementation class of the component type.</xs:documentation>
191 </xs:annotation>
192 </xs:attribute>
193 <xs:attribute name="architecture" type="xs:boolean"
194 use="optional">
195 <xs:annotation>
196 <xs:documentation>Enables or disables the architecture exposition. By default, the architecture is exposed. This allows instance introspection.</xs:documentation>
197 </xs:annotation>
198 </xs:attribute>
199 <xs:attribute name="immediate" type="xs:boolean"
200 use="optional">
201 <xs:annotation>
202 <xs:documentation>Creates the object of the component implementation type as soon as the component instance becomes valid. The default value is "true" if the component doesn't provide any service, "false" otherwise.</xs:documentation>
203 </xs:annotation>
204 </xs:attribute>
205 <xs:attribute name="factory-method" type="xs:string" use="optional">
206 <xs:annotation>
207 <xs:documentation>Factory method called to create POJO objects instead of the constructor. The specified method must be a static method of the implementation class returning an instance of this implementation class. The factory method can receive the bundle context in argument.</xs:documentation>
208 </xs:annotation></xs:attribute>
209 <xs:attribute name="version" type="xs:string" use="optional">
210 <xs:annotation>
211 <xs:documentation>Set the version of this component type</xs:documentation>
212 </xs:annotation></xs:attribute>
213 </xs:complexType>
214 <xs:complexType name="RequiresType">
215 <xs:annotation>
216 <xs:documentation>Description of component services requirements.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000217 </xs:annotation>
218 <xs:complexContent>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000219 <xs:extension base="ServiceDependencyType">
220 <xs:sequence minOccurs="0" maxOccurs="unbounded">
221 <xs:element name="callback"
222 type="DependencyCallbackType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000223 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000224 <xs:documentation>Service requirement method invocation description. Here can be specified a bind method called when a service appears and an unbind method called when a service disappears.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000225 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000226 </xs:element>
227 </xs:sequence>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000228
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000229 <xs:attribute name="interface" type="xs:string"
230 use="prohibited">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000231 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000232 <xs:documentation>The interface describing the required service type. This attribute is needed only when using aggregate dependencies with field injection and when the type of this field is a list, vector, collection and set. This attribute is deprecated, use 'specification'.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000233 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000234 </xs:attribute>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000235
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000236 <xs:attribute name="field" type="xs:string"
237 use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000238 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000239 <xs:documentation>The name of the field representing the service dependency in the implementation class.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000240 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000241 </xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000242
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000243 <xs:attribute name="nullable" type="xs:boolean"
244 use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000245 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000246 <xs:documentation>Enable or disable the Nullable pattern on optional service dependencies. By default, Nullable pattern is enabled. If disabled, iPOJO will inject null instead of a Nullable object.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000247 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000248 </xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000249
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000250 <xs:attribute name="default-implementation"
251 type="xs:string" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000252 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000253 <xs:documentation>Specifies the default implementation class for an optional service dependency. If no providers are found, iPOJO creates an instance of the default-implementation (nullary constructor) and injects it. The given class must implement the required service interface.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000254 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000255 </xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000256
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000257 <xs:attribute name="from" type="xs:string"
258 use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000259 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000260 <xs:documentation>Specific service provider. The dependency can only be fulfilled by the component with the matching name, or by the service with a matching PID.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000261 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000262 </xs:attribute>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000263
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000264 <xs:attribute name="scope" use="optional">
265 <xs:simpleType>
266 <xs:restriction base="xs:string">
267 <xs:enumeration value="global"></xs:enumeration>
268 <xs:enumeration value="composite"></xs:enumeration>
269 <xs:enumeration value="composite+global"></xs:enumeration>
270 </xs:restriction>
271 </xs:simpleType>
272 </xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000273
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000274 </xs:extension>
275 </xs:complexContent>
276 </xs:complexType>
277 <xs:complexType name="DependencyCallbackType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000278 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000279 <xs:documentation>Dependency callbacks are used to receive notification when service providers arrive and leave.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000280 </xs:annotation>
281 <xs:attribute name="method" type="xs:string" use="required">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000282 <xs:annotation>
283 <xs:documentation>Method to call</xs:documentation>
284 </xs:annotation></xs:attribute>
285 <xs:attribute name="type" use="required">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000286 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000287 <xs:documentation>
288 Type of callback (bind, unbind, or updated). Bind means that the method will be called when a provider arrives. Unbind means that the method will be called when a provider leaves.
289 Updated means that a service was modified but is still valid for the service dependency.
290 </xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000291 </xs:annotation>
292 <xs:simpleType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000293 <xs:restriction base="xs:string">
294 <xs:enumeration value="bind"></xs:enumeration>
295 <xs:enumeration value="unbind"></xs:enumeration>
296 <xs:enumeration value="modified"></xs:enumeration>
297 </xs:restriction>
298 </xs:simpleType>
299 </xs:attribute>
300 </xs:complexType>
301 <xs:complexType name="CallbackType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000302 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000303 <xs:documentation>Lifecycle Callback. Allows a POJO to be notified when the instance becomes valid or invalid.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000304 </xs:annotation>
305 <xs:attribute name="method" type="xs:string" use="required">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000306 <xs:annotation>
307 <xs:documentation>Specifies the method to call on the transition.</xs:documentation>
308 </xs:annotation></xs:attribute>
309 <xs:attribute name="transition" use="required">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000310 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000311 <xs:documentation>Specifies the transition when the callback needs to be invoked.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000312 </xs:annotation>
313 <xs:simpleType>
314 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000315 <xs:documentation>Lifecycle transition state. "validate" means that the component's instance was invalid and becomes valid, "invalidate" means that the component's intance was valid and becomes invalid.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000316 </xs:annotation>
317 <xs:restriction base="xs:string">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000318 <xs:enumeration value="validate"></xs:enumeration>
319 <xs:enumeration value="invalidate"></xs:enumeration>
320 </xs:restriction>
321 </xs:simpleType>
322 </xs:attribute>
323 </xs:complexType>
324 <xs:element name="provides" type="ProvidesType" id="provides"></xs:element>
325 <xs:complexType name="ProvidesType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000326 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000327 <xs:documentation>Provided service(s) description.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000328 </xs:annotation>
329 <xs:sequence minOccurs="0" maxOccurs="unbounded">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000330 <xs:element name="property" type="PropertyType">
331 <xs:annotation>
332 <xs:documentation>List of service specific properties.</xs:documentation>
333 </xs:annotation></xs:element>
334 </xs:sequence>
335 <xs:attribute name="interface" type="xs:string" use="prohibited">
336 <xs:annotation>
337 <xs:documentation>Deprecated attribute, use 'specifications' instead of 'interface'</xs:documentation>
338 </xs:annotation></xs:attribute>
339 <xs:attribute name="specifications" type="xs:string" use="optional">
340 <xs:annotation>
341 <xs:documentation>The list of service specifications (i.e. interfaces) to expose. By default, all interfaces implemented by the component implementation class are published.</xs:documentation>
342 </xs:annotation></xs:attribute>
343 <xs:attribute name="factory" type="xs:string" use="prohibited">
344 <xs:annotation>
345 <xs:documentation>Use 'strategy' instead of 'factory'</xs:documentation>
346 </xs:annotation></xs:attribute>
347 <xs:attribute name="strategy" type="xs:string" use="optional">
348 <xs:annotation>
349 <xs:documentation>POJO creation strategy. By default, the POJO object is created once (singleton). If the factory is set to "SERVICE", the creation policy follows the OSGi service factory policy (one object object per asking bundle).
350 INSTANCE allows creating one different POJO object per asking instance. Finally, a custom strategy can be used by specifying the qualified name of the class extending CreationPolicy</xs:documentation>
351 </xs:annotation></xs:attribute>
352 </xs:complexType>
353 <xs:complexType name="PropertyType">
354 <xs:annotation>
355 <xs:documentation>
356 Defines a component property.
357 </xs:documentation>
358 </xs:annotation>
359 <xs:attribute name="field" type="xs:string" use="optional">
360 <xs:annotation>
361 <xs:documentation>
362 Field of the property
363 </xs:documentation>
364 </xs:annotation>
365 </xs:attribute>
366 <xs:attribute name="method" type="xs:string" use="optional">
367 <xs:annotation>
368 <xs:documentation>
369 Setter method of the property. This method is called
370 to inject property value.
371 </xs:documentation>
372 </xs:annotation>
373 </xs:attribute>
374 <xs:attribute name="name" type="xs:string" use="optional">
375 <xs:annotation>
376 <xs:documentation>
377 Name of the property.
378 </xs:documentation>
379 </xs:annotation>
380 </xs:attribute>
381 <xs:attribute name="value" type="xs:string" use="optional">
382 <xs:annotation>
383 <xs:documentation>
384 Default value of the property.
385 </xs:documentation>
386 </xs:annotation>
387 </xs:attribute>
388 <xs:attribute name="type" type="xs:string" use="optional">
389 <xs:annotation>
390 <xs:documentation>
391 Type of the property.
392 </xs:documentation>
393 </xs:annotation>
394 </xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000395 <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000396 <xs:annotation>
397 <xs:documentation>Set the property as mandatory. A mandatory property MUST receive a value either in the component type description or in the instance configuration. Properties are optional by default.</xs:documentation>
398 </xs:annotation></xs:attribute>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000399 </xs:complexType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000400 <xs:element name="callback" type="CallbackType" id="callback"></xs:element>
401 <xs:element name="controller" type="ControllerType" id="controller">
402 <xs:annotation>
403 <xs:documentation></xs:documentation>
404 </xs:annotation></xs:element>
405 <xs:element name="requires" type="RequiresType" id="requires"></xs:element>
406 <xs:element name="component" type="ComponentType" id="component"></xs:element>
407 <xs:element name="handler" type="HandlerType" id="handler"></xs:element>
408 <xs:element name="instance" type="InstanceType" id="instance"></xs:element>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000409
410 <xs:element name="properties" type="PropertiesType" id="properties"></xs:element>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000411 <xs:complexType name="PropertiesType">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000412 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000413 <xs:documentation>List of component, instance or service properties. This field will receive the property value.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000414 </xs:annotation>
415 <xs:sequence minOccurs="0" maxOccurs="unbounded">
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000416 <xs:element name="property" type="PropertyType">
417 <xs:annotation>
418 <xs:documentation>The list of properties.</xs:documentation>
419 </xs:annotation></xs:element>
420 </xs:sequence>
421 <xs:attribute name="propagation" type="xs:boolean" use="optional">
422 <xs:annotation>
423 <xs:documentation>Propagation of the component properties to the provided services. If this parameter is set to "true", each time properties are reconfigured, they are propagated to each service published by the component.</xs:documentation>
424 </xs:annotation></xs:attribute>
425 <xs:attribute name="pid" type="xs:string" use="optional">
426 <xs:annotation>
427 <xs:documentation>Unique identifier used to reconfigure components properties (via Managed Services) with the Configuration Admin.</xs:documentation>
428 </xs:annotation></xs:attribute>
429 <xs:attribute name="updated" type="xs:string" use="optional">
430 <xs:annotation>
431 <xs:documentation>Method called when a reconfiguration is done</xs:documentation>
432 </xs:annotation></xs:attribute>
433 </xs:complexType>
Clement Escoffier0b93f382009-07-03 13:16:24 +0000434
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000435 <xs:complexType name="ServiceDependencyType">
436 <xs:attribute name="specification" type="xs:string" use="optional">
437 <xs:annotation>
438 <xs:documentation>The specification describing the required service type. This attribute is needed only when using aggregate dependencies with field injection and when the type of this field is a list, vector, collection and set.</xs:documentation>
439 </xs:annotation></xs:attribute>
440 <xs:attribute name="optional" type="xs:boolean" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000441 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000442 <xs:documentation>Sets the service dependency optionality</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000443 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000444 </xs:attribute>
445 <xs:attribute name="aggregate" type="xs:boolean" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000446 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000447 <xs:documentation>Sets the service dependency cardinality.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000448 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000449 </xs:attribute>
450 <xs:attribute name="policy" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000451 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000452 <xs:documentation>Sets the binding policy of the dependency. Three policies are supported. The dynamic policy supports service providers dynamism. The static policy freezes the provider set as soon as the dependency is used. The dynamic-priority policy is an extension of the dynamic policy, but providers are ranked.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000453 </xs:annotation>
454 <xs:simpleType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000455 <xs:restriction base="xs:string">
456 <xs:enumeration value="dynamic"></xs:enumeration>
457 <xs:enumeration value="static"></xs:enumeration>
458 <xs:enumeration value="dynamic-priority"></xs:enumeration>
459 </xs:restriction>
460 </xs:simpleType>
461 </xs:attribute>
462 <xs:attribute name="comparator" type="xs:string" use="optional">
Clement Escoffier50b8a102008-11-14 11:08:05 +0000463 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000464 <xs:documentation>The comparator attribute allows specifying the class used to compare providers. This class must implemented the java.util.Comparator class and must support the comparison of service references.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000465 </xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000466 </xs:attribute>
467 <xs:attribute name="filter" type="xs:string" use="optional">
468 <xs:annotation>
469 <xs:documentation>LDAP filter used to filter providers</xs:documentation>
470 </xs:annotation></xs:attribute>
471 <xs:attribute name="id" type="xs:string" use="optional">
472 <xs:annotation>
473 <xs:documentation>id of the service dependency. The id allows to indentify and to refert to this dependency.</xs:documentation>
474 </xs:annotation></xs:attribute>
475 </xs:complexType>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000476
477 <xs:complexType name="ControllerType">
478 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000479 <xs:documentation>Specifies the lifecycle controller of a component, which allows to validate or invalidate component instances.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000480 </xs:annotation>
481 <xs:attribute name="field" type="xs:string" use="required">
482 <xs:annotation>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000483 <xs:documentation>The name of the component lifecycle controller field. The type of the specified field must be boolean. Setting the value of the specified field to "true" means the validation of the component instance while setting it to "false" means the invalidation of the component instance.</xs:documentation>
Clement Escoffier50b8a102008-11-14 11:08:05 +0000484 </xs:annotation>
485 </xs:attribute>
486 </xs:complexType>
Clement Escoffierc0db3a82009-11-29 10:06:36 +0000487</xs:schema>