Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 1 | <!-- |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 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 |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 9 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 10 | http://www.apache.org/licenses/LICENSE-2.0 |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 11 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 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. |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 18 | --> |
| 19 | <xs:schema elementFormDefault="qualified" targetNamespace="org.apache.felix.ipojo" |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 20 | xmlns="org.apache.felix.ipojo" xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 21 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +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 | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 23 | <xs:element name="ipojo"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 24 | <xs:complexType> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 25 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 26 | <xs:documentation>iPOJO top level element.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 27 | </xs:annotation> |
| 28 | <xs:choice minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 29 | <xs:element ref="handler" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 30 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 31 | <xs:documentation>The handler declarations.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 32 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 33 | </xs:element> |
| 34 | <xs:element ref="instance" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 35 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 36 | <xs:documentation>The instance declarations.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 37 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 38 | </xs:element> |
| 39 | <xs:element ref="component" minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 40 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 41 | <xs:documentation>The component type declarations.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 42 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +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 | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 50 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 51 | <xs:documentation>Description of the handler.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 52 | </xs:annotation> |
| 53 | <xs:complexContent> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +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 | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 61 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 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> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 63 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 64 | </xs:attribute> |
| 65 | <xs:attribute name="name" type="xs:string" use="required"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 66 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 67 | <xs:documentation>The name of the handler.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 68 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 69 | </xs:attribute> |
| 70 | <xs:attribute name="namespace" type="xs:string" use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 71 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 72 | <xs:documentation>The XML namespace of the handler.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 73 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 74 | </xs:attribute> |
| 75 | <xs:attribute name="architecture" type="xs:boolean" |
| 76 | use="optional" fixed="false"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 77 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 78 | <xs:documentation>Enables or disables the architecture exposition. By default, the architecture is not exposed. This allows handler introspection.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 79 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 80 | </xs:attribute> |
| 81 | <xs:attribute name="level" type="xs:int" use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 82 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 83 | <xs:documentation>The start level of the handler.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 84 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 85 | </xs:attribute> |
| 86 | </xs:extension> |
| 87 | </xs:complexContent> |
| 88 | </xs:complexType> |
| 89 | <xs:complexType name="InstanceType"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 90 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 91 | <xs:documentation>Describes an instance of a component.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 92 | </xs:annotation> |
| 93 | <xs:complexContent> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 94 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 106 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 107 | <xs:documentation>The (unique) name of the instance.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 108 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 109 | </xs:attribute> |
| 110 | <xs:attribute name="version" type="xs:string" use="optional"> |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 111 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 112 | <xs:documentation>The version of the factory to use.</xs:documentation> |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 113 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 114 | </xs:attribute> |
| 115 | </xs:extension> |
| 116 | </xs:complexContent> |
| 117 | </xs:complexType> |
| 118 | <xs:complexType name="InstancePropertyType"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 119 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 120 | <xs:documentation>Defines a property of an instance configuration.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 121 | </xs:annotation> |
| 122 | <xs:sequence> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 123 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 128 | The 'instance.name' property has a special semantic as it will be used as the instance name.</xs:documentation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 129 | </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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 147 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 148 | <xs:documentation>Describes the method(s) to invoke when the component's state changes.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 149 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 150 | </xs:element> |
| 151 | <xs:element ref="provides" minOccurs="0" |
| 152 | maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 153 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 154 | <xs:documentation>Indicates the component provided service(s). By default, all implemented interfaces are published.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 155 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 156 | </xs:element> |
| 157 | <xs:element ref="requires" minOccurs="0" |
| 158 | maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 159 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 160 | <xs:documentation>Indicates the service requirements of the component.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 161 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 162 | </xs:element> |
| 163 | <xs:element ref="properties" minOccurs="0" |
| 164 | maxOccurs="unbounded"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 165 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 166 | <xs:documentation>Describes the properties of the component.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 167 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 168 | </xs:element> |
| 169 | <xs:element ref="controller" minOccurs="0" maxOccurs="1"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 170 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 171 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 217 | </xs:annotation> |
| 218 | <xs:complexContent> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 219 | <xs:extension base="ServiceDependencyType"> |
| 220 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
| 221 | <xs:element name="callback" |
| 222 | type="DependencyCallbackType"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 223 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 224 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 225 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 226 | </xs:element> |
| 227 | </xs:sequence> |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 228 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 229 | <xs:attribute name="interface" type="xs:string" |
| 230 | use="prohibited"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 231 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 232 | <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 | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 233 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 234 | </xs:attribute> |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 235 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 236 | <xs:attribute name="field" type="xs:string" |
| 237 | use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 238 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 239 | <xs:documentation>The name of the field representing the service dependency in the implementation class.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 240 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 241 | </xs:attribute> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 242 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 243 | <xs:attribute name="nullable" type="xs:boolean" |
| 244 | use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 245 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 246 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 247 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 248 | </xs:attribute> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 249 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 250 | <xs:attribute name="default-implementation" |
| 251 | type="xs:string" use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 252 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 253 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 254 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 255 | </xs:attribute> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 256 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 257 | <xs:attribute name="from" type="xs:string" |
| 258 | use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 259 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 260 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 261 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 262 | </xs:attribute> |
Clement Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 263 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 264 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 273 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 274 | </xs:extension> |
| 275 | </xs:complexContent> |
| 276 | </xs:complexType> |
| 277 | <xs:complexType name="DependencyCallbackType"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 278 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 279 | <xs:documentation>Dependency callbacks are used to receive notification when service providers arrive and leave.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 280 | </xs:annotation> |
| 281 | <xs:attribute name="method" type="xs:string" use="required"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 282 | <xs:annotation> |
| 283 | <xs:documentation>Method to call</xs:documentation> |
| 284 | </xs:annotation></xs:attribute> |
| 285 | <xs:attribute name="type" use="required"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 286 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 287 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 291 | </xs:annotation> |
| 292 | <xs:simpleType> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 293 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 302 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 303 | <xs:documentation>Lifecycle Callback. Allows a POJO to be notified when the instance becomes valid or invalid.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 304 | </xs:annotation> |
| 305 | <xs:attribute name="method" type="xs:string" use="required"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 306 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 310 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 311 | <xs:documentation>Specifies the transition when the callback needs to be invoked.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 312 | </xs:annotation> |
| 313 | <xs:simpleType> |
| 314 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 315 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 316 | </xs:annotation> |
| 317 | <xs:restriction base="xs:string"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 318 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 326 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 327 | <xs:documentation>Provided service(s) description.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 328 | </xs:annotation> |
| 329 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 330 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 395 | <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 396 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 399 | </xs:complexType> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 400 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 409 | |
| 410 | <xs:element name="properties" type="PropertiesType" id="properties"></xs:element> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 411 | <xs:complexType name="PropertiesType"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 412 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 413 | <xs:documentation>List of component, instance or service properties. This field will receive the property value.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 414 | </xs:annotation> |
| 415 | <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 416 | <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 Escoffier | 0b93f38 | 2009-07-03 13:16:24 +0000 | [diff] [blame] | 434 | |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 435 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 441 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 442 | <xs:documentation>Sets the service dependency optionality</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 443 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 444 | </xs:attribute> |
| 445 | <xs:attribute name="aggregate" type="xs:boolean" use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 446 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 447 | <xs:documentation>Sets the service dependency cardinality.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 448 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 449 | </xs:attribute> |
| 450 | <xs:attribute name="policy" use="optional"> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 451 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 452 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 453 | </xs:annotation> |
| 454 | <xs:simpleType> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 455 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 463 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 464 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 465 | </xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 466 | </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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 476 | |
| 477 | <xs:complexType name="ControllerType"> |
| 478 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 479 | <xs:documentation>Specifies the lifecycle controller of a component, which allows to validate or invalidate component instances.</xs:documentation> |
Clement Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 480 | </xs:annotation> |
| 481 | <xs:attribute name="field" type="xs:string" use="required"> |
| 482 | <xs:annotation> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 483 | <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 Escoffier | 50b8a10 | 2008-11-14 11:08:05 +0000 | [diff] [blame] | 484 | </xs:annotation> |
| 485 | </xs:attribute> |
| 486 | </xs:complexType> |
Clement Escoffier | c0db3a8 | 2009-11-29 10:06:36 +0000 | [diff] [blame] | 487 | </xs:schema> |