/framework/service/dtd/service-config.xsd

https://bitbucket.org/chatcharin/ofbiz · XML Schema · 270 lines · 267 code · 3 blank · 0 comment · 0 complexity · 8245d90ee06d1d71266612d75ed86b6b MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  19. <!-- ====================== Root Element ======================= -->
  20. <xs:element name="service-config">
  21. <xs:complexType>
  22. <xs:sequence>
  23. <xs:element minOccurs="1" maxOccurs="unbounded" ref="service-engine"/>
  24. </xs:sequence>
  25. </xs:complexType>
  26. </xs:element>
  27. <xs:element name="service-engine">
  28. <xs:complexType>
  29. <xs:sequence>
  30. <xs:element ref="authorization"/>
  31. <xs:element ref="thread-pool"/>
  32. <xs:element minOccurs="0" maxOccurs="unbounded" ref="engine"/>
  33. <xs:element minOccurs="0" maxOccurs="unbounded" ref="service-location"/>
  34. <xs:element minOccurs="0" maxOccurs="unbounded" ref="notification-group"/>
  35. <xs:element minOccurs="0" maxOccurs="unbounded" ref="startup-service"/>
  36. <xs:element minOccurs="0" maxOccurs="unbounded" ref="resource-loader"/>
  37. <xs:element minOccurs="0" maxOccurs="unbounded" ref="global-services"/>
  38. <xs:element minOccurs="0" maxOccurs="unbounded" ref="service-groups"/>
  39. <xs:element minOccurs="0" maxOccurs="unbounded" ref="service-ecas"/>
  40. <xs:element minOccurs="0" maxOccurs="unbounded" ref="jms-service"/>
  41. </xs:sequence>
  42. <xs:attributeGroup ref="attlist.service-engine"/>
  43. </xs:complexType>
  44. </xs:element>
  45. <xs:attributeGroup name="attlist.service-engine">
  46. <xs:attribute type="xs:string" name="name" use="required"/>
  47. </xs:attributeGroup>
  48. <xs:element name="authorization">
  49. <xs:complexType>
  50. <xs:attributeGroup ref="attlist.authorization"/>
  51. </xs:complexType>
  52. </xs:element>
  53. <xs:attributeGroup name="attlist.authorization">
  54. <xs:attribute type="xs:string" name="service-name" use="required"/>
  55. </xs:attributeGroup>
  56. <xs:element name="thread-pool">
  57. <xs:complexType>
  58. <xs:sequence>
  59. <xs:element minOccurs="0" maxOccurs="unbounded" ref="run-from-pool"/>
  60. </xs:sequence>
  61. <xs:attributeGroup ref="attlist.thread-pool"/>
  62. </xs:complexType>
  63. </xs:element>
  64. <xs:attributeGroup name="attlist.thread-pool">
  65. <xs:attribute type="xs:string" name="send-to-pool" use="required"/>
  66. <xs:attribute type="xs:nonNegativeInteger" name="purge-job-days" default="30"/>
  67. <xs:attribute type="xs:nonNegativeInteger" name="failed-retry-min" default="30"/>
  68. <xs:attribute type="xs:nonNegativeInteger" name="ttl" use="required"/>
  69. <xs:attribute type="xs:nonNegativeInteger" name="wait-millis" use="required"/>
  70. <xs:attribute type="xs:nonNegativeInteger" name="jobs" use="required"/>
  71. <xs:attribute type="xs:nonNegativeInteger" name="min-threads" use="required"/>
  72. <xs:attribute type="xs:nonNegativeInteger" name="max-threads" use="required"/>
  73. <xs:attribute name="poll-enabled" default="true">
  74. <xs:simpleType>
  75. <xs:restriction base="xs:token">
  76. <xs:enumeration value="true"/>
  77. <xs:enumeration value="false"/>
  78. </xs:restriction>
  79. </xs:simpleType>
  80. </xs:attribute>
  81. <xs:attribute type="xs:nonNegativeInteger" name="poll-db-millis" use="required"/>
  82. </xs:attributeGroup>
  83. <xs:element name="run-from-pool">
  84. <xs:complexType>
  85. <xs:attributeGroup ref="attlist.run-from-pool"/>
  86. </xs:complexType>
  87. </xs:element>
  88. <xs:attributeGroup name="attlist.run-from-pool">
  89. <xs:attribute type="xs:string" name="name" use="required"/>
  90. </xs:attributeGroup>
  91. <xs:element name="engine">
  92. <xs:complexType>
  93. <xs:sequence>
  94. <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter"/>
  95. </xs:sequence>
  96. <xs:attributeGroup ref="attlist.engine"/>
  97. </xs:complexType>
  98. </xs:element>
  99. <xs:element name="parameter">
  100. <xs:annotation>
  101. <xs:documentation>
  102. Technical parameters use by engine
  103. </xs:documentation>
  104. </xs:annotation>
  105. <xs:complexType>
  106. <xs:attributeGroup ref="attlist.parameter"/>
  107. </xs:complexType>
  108. </xs:element>
  109. <xs:attributeGroup name="attlist.parameter">
  110. <xs:attribute type="xs:string" name="name" use="required"/>
  111. <xs:attribute type="xs:string" name="value" use="required"/>
  112. </xs:attributeGroup>
  113. <xs:attributeGroup name="attlist.engine">
  114. <xs:attribute type="xs:string" name="name" use="required"/>
  115. <xs:attribute type="xs:string" name="class" use="required"/>
  116. </xs:attributeGroup>
  117. <xs:element name="startup-service">
  118. <xs:complexType>
  119. <xs:attributeGroup ref="attlist.startup-service"/>
  120. </xs:complexType>
  121. </xs:element>
  122. <xs:attributeGroup name="attlist.startup-service">
  123. <xs:attribute type="xs:string" name="name" use="required"/>
  124. <xs:attribute type="xs:string" name="runtime-data-id"/>
  125. <xs:attribute type="xs:nonNegativeInteger" name="runtime-delay" default="0"/>
  126. <xs:attribute type="xs:string" name="run-in-pool"/>
  127. </xs:attributeGroup>
  128. <xs:element name="service-location">
  129. <xs:complexType>
  130. <xs:attributeGroup ref="attlist.service-location"/>
  131. </xs:complexType>
  132. </xs:element>
  133. <xs:attributeGroup name="attlist.service-location">
  134. <xs:attribute type="xs:string" name="name" use="required"/>
  135. <xs:attribute type="xs:string" name="location" use="required"/>
  136. </xs:attributeGroup>
  137. <xs:element name="resource-loader">
  138. <xs:complexType>
  139. <xs:attributeGroup ref="attlist.resource-loader"/>
  140. </xs:complexType>
  141. </xs:element>
  142. <xs:attributeGroup name="attlist.resource-loader">
  143. <xs:attribute type="xs:string" name="name" use="required"/>
  144. <xs:attribute type="xs:string" name="class" use="required"/>
  145. <xs:attribute type="xs:string" name="prepend-env"/>
  146. <xs:attribute type="xs:string" name="prefix"/>
  147. </xs:attributeGroup>
  148. <xs:element name="global-services">
  149. <xs:complexType>
  150. <xs:attributeGroup ref="attlist.global-services"/>
  151. </xs:complexType>
  152. </xs:element>
  153. <xs:attributeGroup name="attlist.global-services">
  154. <xs:attribute type="xs:string" name="loader" use="required"/>
  155. <xs:attribute type="xs:string" name="location" use="required"/>
  156. </xs:attributeGroup>
  157. <xs:element name="service-groups">
  158. <xs:complexType>
  159. <xs:attributeGroup ref="attlist.service-groups"/>
  160. </xs:complexType>
  161. </xs:element>
  162. <xs:attributeGroup name="attlist.service-groups">
  163. <xs:attribute type="xs:string" name="loader" use="required"/>
  164. <xs:attribute type="xs:string" name="location" use="required"/>
  165. </xs:attributeGroup>
  166. <xs:element name="service-ecas">
  167. <xs:complexType>
  168. <xs:attributeGroup ref="attlist.service-ecas"/>
  169. </xs:complexType>
  170. </xs:element>
  171. <xs:attributeGroup name="attlist.service-ecas">
  172. <xs:attribute type="xs:string" name="loader" use="required"/>
  173. <xs:attribute type="xs:string" name="location" use="required"/>
  174. </xs:attributeGroup>
  175. <xs:element name="jms-service">
  176. <xs:complexType>
  177. <xs:sequence>
  178. <xs:element maxOccurs="unbounded" ref="server"/>
  179. </xs:sequence>
  180. <xs:attributeGroup ref="attlist.jms-service"/>
  181. </xs:complexType>
  182. </xs:element>
  183. <xs:attributeGroup name="attlist.jms-service">
  184. <xs:attribute type="xs:string" name="name" use="required"/>
  185. <xs:attribute name="send-mode" default="none">
  186. <xs:simpleType>
  187. <xs:restriction base="xs:token">
  188. <xs:enumeration value="none"/>
  189. <xs:enumeration value="all"/>
  190. <xs:enumeration value="first-available"/>
  191. <xs:enumeration value="random"/>
  192. <xs:enumeration value="round-robin"/>
  193. <xs:enumeration value="least-load"/>
  194. </xs:restriction>
  195. </xs:simpleType>
  196. </xs:attribute>
  197. </xs:attributeGroup>
  198. <xs:element name="server">
  199. <xs:complexType>
  200. <xs:attributeGroup ref="attlist.server"/>
  201. </xs:complexType>
  202. </xs:element>
  203. <xs:attributeGroup name="attlist.server">
  204. <xs:attribute type="xs:string" name="jndi-server-name" use="required"/>
  205. <xs:attribute type="xs:string" name="jndi-name" use="required"/>
  206. <xs:attribute type="xs:string" name="topic-queue" use="required"/>
  207. <xs:attribute name="type" use="required">
  208. <xs:simpleType>
  209. <xs:restriction base="xs:token">
  210. <xs:enumeration value="topic"/>
  211. <xs:enumeration value="queue"/>
  212. </xs:restriction>
  213. </xs:simpleType>
  214. </xs:attribute>
  215. <xs:attribute type="xs:string" name="username"/>
  216. <xs:attribute type="xs:string" name="password"/>
  217. <xs:attribute type="xs:string" name="client-id"/>
  218. <xs:attribute name="listen" default="false">
  219. <xs:simpleType>
  220. <xs:restriction base="xs:token">
  221. <xs:enumeration value="true"/>
  222. <xs:enumeration value="false"/>
  223. </xs:restriction>
  224. </xs:simpleType>
  225. </xs:attribute>
  226. <xs:attribute type="xs:string" name="listener-class"/>
  227. </xs:attributeGroup>
  228. <xs:element name="notification-group">
  229. <xs:complexType>
  230. <xs:sequence>
  231. <xs:element minOccurs="1" maxOccurs="1" ref="notification"/>
  232. <xs:element minOccurs="2" maxOccurs="unbounded" ref="notify"/>
  233. </xs:sequence>
  234. <xs:attributeGroup ref="attlist.notification-group"/>
  235. </xs:complexType>
  236. </xs:element>
  237. <xs:attributeGroup name="attlist.notification-group">
  238. <xs:attribute type="xs:string" name="name"/>
  239. </xs:attributeGroup>
  240. <xs:element name="notification">
  241. <xs:complexType>
  242. <xs:attributeGroup ref="attlist.notification"/>
  243. </xs:complexType>
  244. </xs:element>
  245. <xs:attributeGroup name="attlist.notification">
  246. <xs:attribute type="xs:string" name="subject" use="required"/>
  247. <xs:attribute type="xs:string" name="screen" use="required"/>
  248. <xs:attribute type="xs:string" name="service" default="sendMailFromScreen"/>
  249. </xs:attributeGroup>
  250. <xs:element name="notify">
  251. <xs:complexType mixed="true">
  252. <xs:attributeGroup ref="attlist.notify"/>
  253. </xs:complexType>
  254. </xs:element>
  255. <xs:attributeGroup name="attlist.notify">
  256. <xs:attribute name="type" use="required">
  257. <xs:simpleType>
  258. <xs:restriction base="xs:token">
  259. <xs:enumeration value="to"/>
  260. <xs:enumeration value="cc"/>
  261. <xs:enumeration value="bcc"/>
  262. <xs:enumeration value="from"/>
  263. </xs:restriction>
  264. </xs:simpleType>
  265. </xs:attribute>
  266. </xs:attributeGroup>
  267. </xs:schema>