Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 1 | <!-- |
| 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 | <xs:schema elementFormDefault="qualified" targetNamespace="org.apache.felix.ipojo" |
| 20 | xmlns="org.apache.felix.ipojo" xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| 21 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 22 | <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 Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 23 | <xs:element name="ipojo"> |
| 24 | <xs:complexType> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 25 | <xs:annotation> |
| 26 | <xs:documentation>iPOJO top level element.</xs:documentation> |
| 27 | </xs:annotation> |
| 28 | <xs:choice minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 29 | <xs:element ref="handler" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 30 | <xs:annotation> |
| 31 | <xs:documentation>The handler declarations.</xs:documentation> |
| 32 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 33 | </xs:element> |
| 34 | <xs:element ref="instance" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 35 | <xs:annotation> |
| 36 | <xs:documentation>The instance declarations.</xs:documentation> |
| 37 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 38 | </xs:element> |
| 39 | <xs:element ref="component" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 40 | <xs:annotation> |
| 41 | <xs:documentation>The component type declarations.</xs:documentation> |
| 42 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 43 | </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 Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 50 | <xs:annotation> |
| 51 | <xs:documentation>Description of the handler.</xs:documentation> |
| 52 | </xs:annotation> |
| 53 | <xs:complexContent> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 54 | <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 Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 61 | <xs:annotation> |
| 62 | <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> |
| 63 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 64 | </xs:attribute> |
| 65 | <xs:attribute name="name" type="xs:string" use="required"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 66 | <xs:annotation> |
| 67 | <xs:documentation>The name of the handler.</xs:documentation> |
| 68 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 69 | </xs:attribute> |
| 70 | <xs:attribute name="namespace" type="xs:string" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 71 | <xs:annotation> |
| 72 | <xs:documentation>The XML namespace of the handler.</xs:documentation> |
| 73 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 74 | </xs:attribute> |
| 75 | <xs:attribute name="architecture" type="xs:boolean" |
| 76 | use="optional" fixed="false"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 77 | <xs:annotation> |
| 78 | <xs:documentation>Enables or disables the architecture exposition. By default, the architecture is not exposed. This allows handler introspection.</xs:documentation> |
| 79 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 80 | </xs:attribute> |
| 81 | <xs:attribute name="level" type="xs:int" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 82 | <xs:annotation> |
| 83 | <xs:documentation>The start level of the handler.</xs:documentation> |
| 84 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 85 | </xs:attribute> |
| 86 | </xs:extension> |
| 87 | </xs:complexContent> |
| 88 | </xs:complexType> |
| 89 | <xs:complexType name="InstanceType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 90 | <xs:annotation> |
| 91 | <xs:documentation>Describes an instance of a component.</xs:documentation> |
| 92 | </xs:annotation> |
| 93 | <xs:complexContent> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 94 | <xs:extension base="RootElementType"> |
| 95 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 96 | <xs:element name="property" type="InstancePropertyType"> |
| 97 | <xs:annotation> |
| 98 | <xs:documentation>The instance properties.</xs:documentation> |
| 99 | </xs:annotation></xs:element> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 100 | </xs:sequence> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 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> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 105 | <xs:attribute name="name" type="xs:string" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 106 | <xs:annotation> |
| 107 | <xs:documentation>The (unique) name of the instance.</xs:documentation> |
| 108 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 109 | </xs:attribute> |
| 110 | </xs:extension> |
| 111 | </xs:complexContent> |
| 112 | </xs:complexType> |
| 113 | <xs:complexType name="InstancePropertyType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 114 | <xs:annotation> |
| 115 | <xs:documentation>Defines a property of an instance configuration.</xs:documentation> |
| 116 | </xs:annotation> |
| 117 | <xs:sequence> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 118 | <xs:element name="property" type="InstancePropertyType" minOccurs="0" maxOccurs="unbounded"></xs:element> |
| 119 | </xs:sequence> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 120 | <xs:attribute name="name" type="xs:string" use="optional"> |
| 121 | <xs:annotation> |
| 122 | <xs:documentation>Name of the property. Can be optional if a property is inside a structure. |
| 123 | The 'instance.name' property has a special semantic as it will be used as the instance name.</xs:documentation> |
| 124 | </xs:annotation></xs:attribute> |
| 125 | <xs:attribute name="value" type="xs:string" use="optional"> |
| 126 | <xs:annotation> |
| 127 | <xs:documentation>Value of the property. Can be null for property containing other properties.</xs:documentation> |
| 128 | </xs:annotation></xs:attribute> |
| 129 | <xs:attribute name="type" type="xs:string" use="optional"> |
| 130 | <xs:annotation> |
| 131 | <xs:documentation>Type of the property, used to create the adequate object. Supported values are list, array, dictionary and map.</xs:documentation> |
| 132 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 133 | </xs:complexType> |
| 134 | <xs:complexType name="RootElementType"></xs:complexType> |
| 135 | <xs:complexType name="ComponentType"> |
| 136 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 137 | <xs:documentation>Declares an atomic (i.e. primitive) component type.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 138 | </xs:annotation> |
| 139 | <xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 140 | <xs:element ref="callback" minOccurs="0" |
| 141 | maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 142 | <xs:annotation> |
| 143 | <xs:documentation>Describes the method(s) to invoke when the component's state changes.</xs:documentation> |
| 144 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 145 | </xs:element> |
| 146 | <xs:element ref="provides" minOccurs="0" |
| 147 | maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 148 | <xs:annotation> |
| 149 | <xs:documentation>Indicates the component provided service(s). By default, all implemented interfaces are published.</xs:documentation> |
| 150 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 151 | </xs:element> |
| 152 | <xs:element ref="requires" minOccurs="0" |
| 153 | maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 154 | <xs:annotation> |
| 155 | <xs:documentation>Indicates the service requirements of the component.</xs:documentation> |
| 156 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 157 | </xs:element> |
| 158 | <xs:element ref="properties" minOccurs="0" |
| 159 | maxOccurs="unbounded"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 160 | <xs:annotation> |
| 161 | <xs:documentation>Describes the properties of the component.</xs:documentation> |
| 162 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 163 | </xs:element> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 164 | <xs:element ref="controller" minOccurs="0" maxOccurs="1"> |
| 165 | <xs:annotation> |
| 166 | <xs:documentation>Lifecycle controller for this component.</xs:documentation> |
| 167 | </xs:annotation></xs:element> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 168 | <xs:any namespace="##other" processContents="lax" |
| 169 | minOccurs="0" maxOccurs="unbounded"> |
| 170 | </xs:any> |
| 171 | </xs:choice> |
| 172 | <xs:attribute name="name" type="xs:string" use="optional"> |
| 173 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 174 | <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> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 175 | </xs:annotation> |
| 176 | </xs:attribute> |
| 177 | <xs:attribute name="public" type="xs:boolean" use="optional"> |
| 178 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 179 | <xs:documentation>Determines if the component type is public or private. A public factory (default) can be used from any bundles.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 180 | </xs:annotation> |
| 181 | </xs:attribute> |
| 182 | <xs:attribute name="classname" type="xs:string" |
| 183 | use="required"> |
| 184 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 185 | <xs:documentation>Specifies the implementation class of the component type.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 186 | </xs:annotation> |
| 187 | </xs:attribute> |
| 188 | <xs:attribute name="architecture" type="xs:boolean" |
| 189 | use="optional"> |
| 190 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 191 | <xs:documentation>Enables or disables the architecture exposition. By default, the architecture is exposed. This allows instance introspection.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 192 | </xs:annotation> |
| 193 | </xs:attribute> |
| 194 | <xs:attribute name="immediate" type="xs:boolean" |
| 195 | use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 196 | <xs:annotation> |
| 197 | <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> |
| 198 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 199 | </xs:attribute> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 200 | <xs:attribute name="factory-method" type="xs:string" use="optional"> |
| 201 | <xs:annotation> |
| 202 | <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> |
| 203 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 204 | </xs:complexType> |
| 205 | <xs:complexType name="RequiresType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 206 | <xs:annotation> |
| 207 | <xs:documentation>Description of component services requirements.</xs:documentation> |
| 208 | </xs:annotation> |
| 209 | <xs:complexContent> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 210 | <xs:extension base="ServiceDependencyType"> |
| 211 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
| 212 | <xs:element name="callback" |
| 213 | type="DependencyCallbackType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 214 | <xs:annotation> |
| 215 | <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> |
| 216 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 217 | </xs:element> |
| 218 | </xs:sequence> |
| 219 | |
| 220 | <xs:attribute name="interface" type="xs:string" |
Clement Escoffier | 2bbf30b | 2008-11-05 13:10:54 +0000 | [diff] [blame] | 221 | use="prohibited"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 222 | <xs:annotation> |
Clement Escoffier | 2bbf30b | 2008-11-05 13:10:54 +0000 | [diff] [blame] | 223 | <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 Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 224 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 225 | </xs:attribute> |
Clement Escoffier | 2bbf30b | 2008-11-05 13:10:54 +0000 | [diff] [blame] | 226 | |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 227 | <xs:attribute name="field" type="xs:string" |
| 228 | use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 229 | <xs:annotation> |
| 230 | <xs:documentation>The name of the field representing the service dependency in the implementation class.</xs:documentation> |
| 231 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 232 | </xs:attribute> |
| 233 | |
| 234 | <xs:attribute name="nullable" type="xs:boolean" |
| 235 | use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 236 | <xs:annotation> |
| 237 | <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> |
| 238 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 239 | </xs:attribute> |
| 240 | |
| 241 | <xs:attribute name="default-implementation" |
| 242 | type="xs:string" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 243 | <xs:annotation> |
| 244 | <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> |
| 245 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 246 | </xs:attribute> |
| 247 | |
| 248 | <xs:attribute name="from" type="xs:string" |
| 249 | use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 250 | <xs:annotation> |
| 251 | <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> |
| 252 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 253 | </xs:attribute> |
| 254 | |
| 255 | <xs:attribute name="scope" use="optional"> |
| 256 | <xs:simpleType> |
| 257 | <xs:restriction base="xs:string"> |
| 258 | <xs:enumeration value="global"></xs:enumeration> |
| 259 | <xs:enumeration value="composite"></xs:enumeration> |
| 260 | <xs:enumeration value="composite+global"></xs:enumeration> |
| 261 | </xs:restriction> |
| 262 | </xs:simpleType> |
| 263 | </xs:attribute> |
| 264 | |
| 265 | </xs:extension> |
| 266 | </xs:complexContent> |
| 267 | </xs:complexType> |
| 268 | <xs:complexType name="DependencyCallbackType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 269 | <xs:annotation> |
| 270 | <xs:documentation>Dependency callbacks are used to receive notification when service providers arrive and leave.</xs:documentation> |
| 271 | </xs:annotation> |
| 272 | <xs:attribute name="method" type="xs:string" use="required"> |
| 273 | <xs:annotation> |
| 274 | <xs:documentation>Method to call</xs:documentation> |
| 275 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 276 | <xs:attribute name="type" use="required"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 277 | <xs:annotation> |
| 278 | <xs:documentation>Type of callback (bind or unbind). Bind means that the method will be called when a provider arrives. Unbind means that the method will be called when a provider leaves.</xs:documentation> |
| 279 | </xs:annotation> |
| 280 | <xs:simpleType> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 281 | <xs:restriction base="xs:string"> |
| 282 | <xs:enumeration value="bind"></xs:enumeration> |
| 283 | <xs:enumeration value="unbind"></xs:enumeration> |
| 284 | </xs:restriction> |
| 285 | </xs:simpleType> |
| 286 | </xs:attribute> |
| 287 | </xs:complexType> |
| 288 | <xs:complexType name="CallbackType"> |
| 289 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 290 | <xs:documentation>Lifecycle Callback. Allows a POJO to be notified when the instance becomes valid or invalid.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 291 | </xs:annotation> |
| 292 | <xs:attribute name="method" type="xs:string" use="required"> |
| 293 | <xs:annotation> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 294 | <xs:documentation>Specifies the method to call on the transition.</xs:documentation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 295 | </xs:annotation></xs:attribute> |
| 296 | <xs:attribute name="transition" use="required"> |
| 297 | <xs:annotation> |
| 298 | <xs:documentation>Specifies the transition when the callback needs to be invoked.</xs:documentation> |
| 299 | </xs:annotation> |
| 300 | <xs:simpleType> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 301 | <xs:annotation> |
| 302 | <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> |
| 303 | </xs:annotation> |
| 304 | <xs:restriction base="xs:string"> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 305 | <xs:enumeration value="validate"></xs:enumeration> |
| 306 | <xs:enumeration value="invalidate"></xs:enumeration> |
| 307 | </xs:restriction> |
| 308 | </xs:simpleType> |
| 309 | </xs:attribute> |
| 310 | </xs:complexType> |
| 311 | <xs:element name="provides" type="ProvidesType" id="provides"></xs:element> |
Clement Escoffier | 422057d | 2008-12-19 16:04:04 +0000 | [diff] [blame^] | 312 | <xs:complexType name="ProvidesType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 313 | <xs:annotation> |
| 314 | <xs:documentation>Provided service(s) description.</xs:documentation> |
| 315 | </xs:annotation> |
| 316 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
| 317 | <xs:element name="property" type="PropertyType"> |
| 318 | <xs:annotation> |
| 319 | <xs:documentation>List of service specific properties.</xs:documentation> |
| 320 | </xs:annotation></xs:element> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 321 | </xs:sequence> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 322 | <xs:attribute name="interface" type="xs:string" use="optional"> |
| 323 | <xs:annotation> |
| 324 | <xs:documentation>The list of interfaces of the service to expose. By default, all interfaces implemented by the component implementation class are published.</xs:documentation> |
| 325 | </xs:annotation></xs:attribute> |
Clement Escoffier | 422057d | 2008-12-19 16:04:04 +0000 | [diff] [blame^] | 326 | <xs:attribute name="factory" type="xs:string" use="prohibited"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 327 | <xs:annotation> |
Clement Escoffier | 422057d | 2008-12-19 16:04:04 +0000 | [diff] [blame^] | 328 | <xs:documentation>Use 'strategy' instead of 'factory'</xs:documentation> |
| 329 | </xs:annotation></xs:attribute> |
| 330 | <xs:attribute name="strategy" type="xs:string" use="optional"> |
| 331 | <xs:annotation> |
| 332 | <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). |
| 333 | 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> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 334 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 335 | </xs:complexType> |
| 336 | <xs:complexType name="PropertyType"> |
Clement Escoffier | aa52ee3 | 2008-11-14 11:05:57 +0000 | [diff] [blame] | 337 | <xs:annotation> |
| 338 | <xs:documentation> |
| 339 | Defines a component property. |
| 340 | </xs:documentation> |
| 341 | </xs:annotation> |
| 342 | <xs:attribute name="field" type="xs:string" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 343 | <xs:annotation> |
Clement Escoffier | aa52ee3 | 2008-11-14 11:05:57 +0000 | [diff] [blame] | 344 | <xs:documentation> |
| 345 | Field of the property |
| 346 | </xs:documentation> |
| 347 | </xs:annotation> |
| 348 | </xs:attribute> |
| 349 | <xs:attribute name="method" type="xs:string" use="optional"> |
| 350 | <xs:annotation> |
| 351 | <xs:documentation> |
| 352 | Setter method of the property. This method is called |
| 353 | to inject property value. |
| 354 | </xs:documentation> |
| 355 | </xs:annotation> |
| 356 | </xs:attribute> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 357 | <xs:attribute name="name" type="xs:string" use="optional"> |
| 358 | <xs:annotation> |
Clement Escoffier | aa52ee3 | 2008-11-14 11:05:57 +0000 | [diff] [blame] | 359 | <xs:documentation> |
| 360 | Name of the property. |
| 361 | </xs:documentation> |
| 362 | </xs:annotation> |
| 363 | </xs:attribute> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 364 | <xs:attribute name="value" type="xs:string" use="optional"> |
| 365 | <xs:annotation> |
Clement Escoffier | aa52ee3 | 2008-11-14 11:05:57 +0000 | [diff] [blame] | 366 | <xs:documentation> |
| 367 | Default value of the property. |
| 368 | </xs:documentation> |
| 369 | </xs:annotation> |
| 370 | </xs:attribute> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 371 | <xs:attribute name="type" type="xs:string" use="optional"> |
| 372 | <xs:annotation> |
Clement Escoffier | aa52ee3 | 2008-11-14 11:05:57 +0000 | [diff] [blame] | 373 | <xs:documentation> |
| 374 | Type of the property. |
| 375 | </xs:documentation> |
| 376 | </xs:annotation> |
| 377 | </xs:attribute> |
| 378 | <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false"> |
| 379 | <xs:annotation> |
| 380 | <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> |
| 381 | </xs:annotation></xs:attribute> |
| 382 | </xs:complexType> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 383 | <xs:element name="callback" type="CallbackType" id="callback"></xs:element> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 384 | <xs:element name="controller" type="ControllerType" id="controller"> |
| 385 | <xs:annotation> |
| 386 | <xs:documentation></xs:documentation> |
| 387 | </xs:annotation></xs:element> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 388 | <xs:element name="requires" type="RequiresType" id="requires"></xs:element> |
| 389 | <xs:element name="component" type="ComponentType" id="component"></xs:element> |
| 390 | <xs:element name="handler" type="HandlerType" id="handler"></xs:element> |
| 391 | <xs:element name="instance" type="InstanceType" id="instance"></xs:element> |
| 392 | |
| 393 | <xs:element name="properties" type="PropertiesType" id="properties"></xs:element> |
| 394 | <xs:complexType name="PropertiesType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 395 | <xs:annotation> |
| 396 | <xs:documentation>List of component, instance or service properties. This field will receive the property value.</xs:documentation> |
| 397 | </xs:annotation> |
| 398 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
| 399 | <xs:element name="property" type="PropertyType"> |
| 400 | <xs:annotation> |
| 401 | <xs:documentation>The list of properties.</xs:documentation> |
| 402 | </xs:annotation></xs:element> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 403 | </xs:sequence> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 404 | <xs:attribute name="propagation" type="xs:boolean" use="optional"> |
| 405 | <xs:annotation> |
| 406 | <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> |
| 407 | </xs:annotation></xs:attribute> |
| 408 | <xs:attribute name="pid" type="xs:string" use="optional"> |
| 409 | <xs:annotation> |
| 410 | <xs:documentation>Unique identifier used to reconfigure components properties (via Managed Services) with the Configuration Admin.</xs:documentation> |
| 411 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 412 | </xs:complexType> |
| 413 | |
| 414 | <xs:complexType name="ServiceDependencyType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 415 | <xs:attribute name="specification" type="xs:string" use="optional"> |
| 416 | <xs:annotation> |
| 417 | <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> |
| 418 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 419 | <xs:attribute name="optional" type="xs:boolean" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 420 | <xs:annotation> |
| 421 | <xs:documentation>Sets the service dependency optionality</xs:documentation> |
| 422 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 423 | </xs:attribute> |
| 424 | <xs:attribute name="aggregate" type="xs:boolean" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 425 | <xs:annotation> |
| 426 | <xs:documentation>Sets the service dependency cardinality.</xs:documentation> |
| 427 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 428 | </xs:attribute> |
| 429 | <xs:attribute name="policy" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 430 | <xs:annotation> |
| 431 | <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> |
| 432 | </xs:annotation> |
| 433 | <xs:simpleType> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 434 | <xs:restriction base="xs:string"> |
| 435 | <xs:enumeration value="dynamic"></xs:enumeration> |
| 436 | <xs:enumeration value="static"></xs:enumeration> |
| 437 | <xs:enumeration value="dynamic-priority"></xs:enumeration> |
| 438 | </xs:restriction> |
| 439 | </xs:simpleType> |
| 440 | </xs:attribute> |
| 441 | <xs:attribute name="comparator" type="xs:string" use="optional"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 442 | <xs:annotation> |
| 443 | <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> |
| 444 | </xs:annotation> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 445 | </xs:attribute> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 446 | <xs:attribute name="filter" type="xs:string" use="optional"> |
| 447 | <xs:annotation> |
| 448 | <xs:documentation>LDAP filter used to filter providers</xs:documentation> |
| 449 | </xs:annotation></xs:attribute> |
| 450 | <xs:attribute name="id" type="xs:string" use="optional"> |
| 451 | <xs:annotation> |
| 452 | <xs:documentation>id of the service dependency. The id allows to indentify and to refert to this dependency.</xs:documentation> |
| 453 | </xs:annotation></xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 454 | </xs:complexType> |
| 455 | |
| 456 | <xs:complexType name="ControllerType"> |
Clement Escoffier | 58b3f18 | 2008-09-22 18:36:07 +0000 | [diff] [blame] | 457 | <xs:annotation> |
| 458 | <xs:documentation>Specifies the lifecycle controller of a component, which allows to validate or invalidate component instances.</xs:documentation> |
| 459 | </xs:annotation> |
| 460 | <xs:attribute name="field" type="xs:string" use="required"> |
| 461 | <xs:annotation> |
| 462 | <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> |
| 463 | </xs:annotation> |
| 464 | </xs:attribute> |
Clement Escoffier | f58887c | 2008-09-09 14:21:15 +0000 | [diff] [blame] | 465 | </xs:complexType> |
| 466 | </xs:schema> |