triggerConstraints.exsd 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!-- Schema file written by PDE -->
  3. <schema targetNamespace="com.jrockit.mc.rjmx" xmlns="http://www.w3.org/2001/XMLSchema">
  4. <annotation>
  5. <appinfo>
  6. <meta.schema plugin="com.jrockit.mc.rjmx" id="triggerConstraints" name="Trigger Constraints"/>
  7. </appinfo>
  8. <documentation>
  9. This extension point is used to add new trigger constraints to the JMX Console.
  10. </documentation>
  11. </annotation>
  12. <element name="extension">
  13. <annotation>
  14. <appinfo>
  15. <meta.element />
  16. </appinfo>
  17. <documentation>
  18. A trigger constraint must have an id, name, description and a class that extends &lt;code&gt;com.jrockit.mc.rjmx.triggers.TriggerConstraint&lt;/code&gt;.
  19. It may also define settings of various types(string, file, boolean, integer, date or time) that can be configured in the JMX Console user interface.
  20. </documentation>
  21. </annotation>
  22. <complexType>
  23. <sequence>
  24. <element ref="triggerConstraint" minOccurs="1" maxOccurs="unbounded"/>
  25. </sequence>
  26. <attribute name="point" type="string" use="required">
  27. <annotation>
  28. <documentation>
  29. </documentation>
  30. </annotation>
  31. </attribute>
  32. <attribute name="id" type="string">
  33. <annotation>
  34. <documentation>
  35. </documentation>
  36. </annotation>
  37. </attribute>
  38. <attribute name="name" type="string">
  39. <annotation>
  40. <documentation>
  41. </documentation>
  42. <appinfo>
  43. <meta.attribute translatable="true"/>
  44. </appinfo>
  45. </annotation>
  46. </attribute>
  47. </complexType>
  48. </element>
  49. <element name="triggerConstraint">
  50. <annotation>
  51. <appinfo>
  52. <meta.element labelAttribute="name" icon="icon"/>
  53. </appinfo>
  54. </annotation>
  55. <complexType>
  56. <sequence>
  57. <element ref="string" minOccurs="0" maxOccurs="unbounded"/>
  58. <element ref="file" minOccurs="0" maxOccurs="unbounded"/>
  59. <element ref="boolean" minOccurs="0" maxOccurs="unbounded"/>
  60. <element ref="integer" minOccurs="0" maxOccurs="unbounded"/>
  61. <element ref="date" minOccurs="0" maxOccurs="unbounded"/>
  62. <element ref="time" minOccurs="0" maxOccurs="unbounded"/>
  63. <element ref="float" minOccurs="0" maxOccurs="unbounded"/>
  64. </sequence>
  65. <attribute name="id" type="string" use="required">
  66. <annotation>
  67. <documentation>
  68. the identifier for the constraint
  69. </documentation>
  70. </annotation>
  71. </attribute>
  72. <attribute name="name" type="string" use="required">
  73. <annotation>
  74. <documentation>
  75. the name for the constraint
  76. </documentation>
  77. <appinfo>
  78. <meta.attribute translatable="true"/>
  79. </appinfo>
  80. </annotation>
  81. </attribute>
  82. <attribute name="icon" type="string">
  83. <annotation>
  84. <documentation>
  85. the icon for the constraint
  86. </documentation>
  87. <appinfo>
  88. <meta.attribute kind="resource"/>
  89. </appinfo>
  90. </annotation>
  91. </attribute>
  92. <attribute name="description" type="string" use="required">
  93. <annotation>
  94. <documentation>
  95. the description for the constraint
  96. </documentation>
  97. <appinfo>
  98. <meta.attribute translatable="true"/>
  99. </appinfo>
  100. </annotation>
  101. </attribute>
  102. <attribute name="class" type="string" use="required">
  103. <annotation>
  104. <documentation>
  105. class that extends &lt;code&gt;com.jrockit.mc.rjmx.triggers.TriggerConstraint&lt;/code&gt; and that implements the method &lt;code&gt;validate(NotificationEvent e)&lt;/code&gt; which accepts or rejects a notification event.
  106. </documentation>
  107. <appinfo>
  108. <meta.attribute kind="java" basedOn="com.jrockit.mc.rjmx.triggers.TriggerConstraint"/>
  109. </appinfo>
  110. </annotation>
  111. </attribute>
  112. </complexType>
  113. </element>
  114. <element name="date">
  115. <annotation>
  116. <documentation>
  117. Date setting for a trigger constraint.
  118. </documentation>
  119. </annotation>
  120. <complexType>
  121. <attribute name="id" type="string" use="required">
  122. <annotation>
  123. <documentation>
  124. the identifier for the setting
  125. </documentation>
  126. </annotation>
  127. </attribute>
  128. <attribute name="name" type="string" use="required">
  129. <annotation>
  130. <documentation>
  131. the name of the setting
  132. </documentation>
  133. <appinfo>
  134. <meta.attribute translatable="true"/>
  135. </appinfo>
  136. </annotation>
  137. </attribute>
  138. <attribute name="description" type="string">
  139. <annotation>
  140. <documentation>
  141. the description of the setting
  142. </documentation>
  143. <appinfo>
  144. <meta.attribute translatable="true"/>
  145. </appinfo>
  146. </annotation>
  147. </attribute>
  148. <attribute name="value" type="string">
  149. <annotation>
  150. <documentation>
  151. the default value
  152. </documentation>
  153. </annotation>
  154. </attribute>
  155. <attribute name="preference" type="boolean">
  156. <annotation>
  157. <documentation>
  158. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  159. </documentation>
  160. </annotation>
  161. </attribute>
  162. </complexType>
  163. </element>
  164. <element name="time">
  165. <annotation>
  166. <documentation>
  167. Time setting for a trigger action.
  168. </documentation>
  169. </annotation>
  170. <complexType>
  171. <attribute name="id" type="string" use="required">
  172. <annotation>
  173. <documentation>
  174. a unique identifier for this setting
  175. </documentation>
  176. </annotation>
  177. </attribute>
  178. <attribute name="name" type="string" use="required">
  179. <annotation>
  180. <documentation>
  181. the name of the setting
  182. </documentation>
  183. <appinfo>
  184. <meta.attribute translatable="true"/>
  185. </appinfo>
  186. </annotation>
  187. </attribute>
  188. <attribute name="description" type="string">
  189. <annotation>
  190. <documentation>
  191. the description of the setting
  192. </documentation>
  193. <appinfo>
  194. <meta.attribute translatable="true"/>
  195. </appinfo>
  196. </annotation>
  197. </attribute>
  198. <attribute name="value" type="string">
  199. <annotation>
  200. <documentation>
  201. the default value
  202. </documentation>
  203. </annotation>
  204. </attribute>
  205. <attribute name="preference" type="boolean">
  206. <annotation>
  207. <documentation>
  208. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  209. </documentation>
  210. </annotation>
  211. </attribute>
  212. </complexType>
  213. </element>
  214. <element name="string">
  215. <annotation>
  216. <documentation>
  217. String setting for a trigger constraint.
  218. </documentation>
  219. </annotation>
  220. <complexType>
  221. <attribute name="id" type="string" use="required">
  222. <annotation>
  223. <documentation>
  224. a unique identifier for this setting
  225. </documentation>
  226. </annotation>
  227. </attribute>
  228. <attribute name="name" type="string" use="required">
  229. <annotation>
  230. <documentation>
  231. the name of the setting
  232. </documentation>
  233. <appinfo>
  234. <meta.attribute translatable="true"/>
  235. </appinfo>
  236. </annotation>
  237. </attribute>
  238. <attribute name="description" type="string">
  239. <annotation>
  240. <documentation>
  241. the description of the setting
  242. </documentation>
  243. <appinfo>
  244. <meta.attribute translatable="true"/>
  245. </appinfo>
  246. </annotation>
  247. </attribute>
  248. <attribute name="value" type="string">
  249. <annotation>
  250. <documentation>
  251. the default value
  252. </documentation>
  253. </annotation>
  254. </attribute>
  255. <attribute name="preference" type="boolean">
  256. <annotation>
  257. <documentation>
  258. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  259. </documentation>
  260. </annotation>
  261. </attribute>
  262. </complexType>
  263. </element>
  264. <element name="file">
  265. <annotation>
  266. <documentation>
  267. File setting for a trigger constraint.
  268. </documentation>
  269. </annotation>
  270. <complexType>
  271. <attribute name="id" type="string" use="required">
  272. <annotation>
  273. <documentation>
  274. a unique identifier for this setting
  275. </documentation>
  276. </annotation>
  277. </attribute>
  278. <attribute name="name" type="string" use="required">
  279. <annotation>
  280. <documentation>
  281. the name of the setting
  282. </documentation>
  283. <appinfo>
  284. <meta.attribute translatable="true"/>
  285. </appinfo>
  286. </annotation>
  287. </attribute>
  288. <attribute name="description" type="string">
  289. <annotation>
  290. <documentation>
  291. the description of the setting
  292. </documentation>
  293. <appinfo>
  294. <meta.attribute translatable="true"/>
  295. </appinfo>
  296. </annotation>
  297. </attribute>
  298. <attribute name="value" type="string">
  299. <annotation>
  300. <documentation>
  301. the default value
  302. </documentation>
  303. </annotation>
  304. </attribute>
  305. <attribute name="preference" type="boolean">
  306. <annotation>
  307. <documentation>
  308. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  309. </documentation>
  310. </annotation>
  311. </attribute>
  312. </complexType>
  313. </element>
  314. <element name="boolean">
  315. <annotation>
  316. <documentation>
  317. Boolean setting for a trigger constraint.
  318. </documentation>
  319. </annotation>
  320. <complexType>
  321. <attribute name="id" type="string" use="required">
  322. <annotation>
  323. <documentation>
  324. a unique identifier for this setting
  325. </documentation>
  326. </annotation>
  327. </attribute>
  328. <attribute name="name" type="string" use="required">
  329. <annotation>
  330. <documentation>
  331. the name of the setting
  332. </documentation>
  333. <appinfo>
  334. <meta.attribute translatable="true"/>
  335. </appinfo>
  336. </annotation>
  337. </attribute>
  338. <attribute name="description" type="string">
  339. <annotation>
  340. <documentation>
  341. the description of the setting
  342. </documentation>
  343. <appinfo>
  344. <meta.attribute translatable="true"/>
  345. </appinfo>
  346. </annotation>
  347. </attribute>
  348. <attribute name="value" type="boolean">
  349. <annotation>
  350. <documentation>
  351. the default value
  352. </documentation>
  353. </annotation>
  354. </attribute>
  355. <attribute name="preference" type="boolean">
  356. <annotation>
  357. <documentation>
  358. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  359. </documentation>
  360. </annotation>
  361. </attribute>
  362. </complexType>
  363. </element>
  364. <element name="integer">
  365. <annotation>
  366. <documentation>
  367. Integer setting for a trigger constraint.
  368. </documentation>
  369. </annotation>
  370. <complexType>
  371. <attribute name="id" type="string" use="required">
  372. <annotation>
  373. <documentation>
  374. a unique identifier for this setting
  375. </documentation>
  376. </annotation>
  377. </attribute>
  378. <attribute name="name" type="string" use="required">
  379. <annotation>
  380. <documentation>
  381. the name of the setting
  382. </documentation>
  383. <appinfo>
  384. <meta.attribute translatable="true"/>
  385. </appinfo>
  386. </annotation>
  387. </attribute>
  388. <attribute name="description" type="string">
  389. <annotation>
  390. <documentation>
  391. the description of the setting
  392. </documentation>
  393. <appinfo>
  394. <meta.attribute translatable="true"/>
  395. </appinfo>
  396. </annotation>
  397. </attribute>
  398. <attribute name="value" type="string">
  399. <annotation>
  400. <documentation>
  401. the default value
  402. </documentation>
  403. </annotation>
  404. </attribute>
  405. <attribute name="preference" type="boolean">
  406. <annotation>
  407. <documentation>
  408. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  409. </documentation>
  410. </annotation>
  411. </attribute>
  412. <attribute name="min" type="string">
  413. <annotation>
  414. <documentation>
  415. the minimum allowed integer value for this setting
  416. </documentation>
  417. </annotation>
  418. </attribute>
  419. <attribute name="max" type="string">
  420. <annotation>
  421. <documentation>
  422. the maximum allowed integer value for this setting
  423. </documentation>
  424. </annotation>
  425. </attribute>
  426. </complexType>
  427. </element>
  428. <element name="float">
  429. <annotation>
  430. <documentation>
  431. Float setting for a trigger action.
  432. </documentation>
  433. </annotation>
  434. <complexType>
  435. <attribute name="id" type="string" use="required">
  436. <annotation>
  437. <documentation>
  438. a unique identifier for this setting
  439. </documentation>
  440. </annotation>
  441. </attribute>
  442. <attribute name="name" type="string" use="required">
  443. <annotation>
  444. <documentation>
  445. the name of the setting
  446. </documentation>
  447. <appinfo>
  448. <meta.attribute translatable="true"/>
  449. </appinfo>
  450. </annotation>
  451. </attribute>
  452. <attribute name="description" type="string">
  453. <annotation>
  454. <documentation>
  455. the description of the setting
  456. </documentation>
  457. <appinfo>
  458. <meta.attribute translatable="true"/>
  459. </appinfo>
  460. </annotation>
  461. </attribute>
  462. <attribute name="value" type="string">
  463. <annotation>
  464. <documentation>
  465. the default value
  466. </documentation>
  467. </annotation>
  468. </attribute>
  469. <attribute name="preference" type="boolean">
  470. <annotation>
  471. <documentation>
  472. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  473. </documentation>
  474. </annotation>
  475. </attribute>
  476. <attribute name="min" type="string">
  477. <annotation>
  478. <documentation>
  479. the minimum allowed float value for this setting
  480. </documentation>
  481. </annotation>
  482. </attribute>
  483. <attribute name="max" type="string">
  484. <annotation>
  485. <documentation>
  486. the maximum allowed float value for this setting
  487. </documentation>
  488. </annotation>
  489. </attribute>
  490. </complexType>
  491. </element>
  492. <annotation>
  493. <appinfo>
  494. <meta.section type="since"/>
  495. </appinfo>
  496. <documentation>
  497. 5.0.0
  498. </documentation>
  499. </annotation>
  500. <annotation>
  501. <appinfo>
  502. <meta.section type="examples"/>
  503. </appinfo>
  504. <documentation>
  505. &lt;pre&gt;
  506. &lt;extension point=&quot;com.jrockit.mc.rjmx.triggerConstraints&quot;&gt;
  507. &lt;triggerConstraint
  508. class=&quot;com.jrockit.example.triggers.constraints.DisablingConstraint&quot;
  509. description=&quot;This constraint will disable the rule, if the &apos;Disable rule&apos; value is true. The event data of a particular event will not matter.&quot;
  510. icon=&quot;icons/disablingconstraint.gif&quot;
  511. id=&quot;com.jrockit.example.triggers.HelloWorld&quot;
  512. name=&quot;Disabling constraint&quot;&gt;
  513. &lt;boolean
  514. id=&quot;com.jrockit.example.triggers.constraint.disable.rule&quot;
  515. name=&quot;Disable rule&quot;&gt;
  516. &lt;/boolean&gt;
  517. &lt;/triggerConstraint&gt;
  518. &lt;/extension&gt;
  519. &lt;/pre&gt;
  520. &lt;pre&gt;
  521. package com.jrockit.example.triggers.constraints;
  522. import com.jrockit.mc.rjmx.triggers.TriggerConstraint;
  523. import com.jrockit.mc.rjmx.triggers.internal.NotificationEvent;
  524. public class DisablingConstraint extends TriggerConstraint {
  525. public boolean isValid(NotificationEvent e) {
  526. return !getSetting(&quot;com.jrockit.example.triggers.constraint.disable.rule&quot;).getBoolean();
  527. }
  528. }
  529. &lt;/pre&gt;
  530. </documentation>
  531. </annotation>
  532. <annotation>
  533. <appinfo>
  534. <meta.section type="copyright"/>
  535. </appinfo>
  536. <documentation>
  537. Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  538. </documentation>
  539. </annotation>
  540. </schema>