This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
/
rhq-plugin.xsd
1435 lines (1355 loc) · 65.9 KB
/
rhq-plugin.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:config="urn:xmlns:rhq-configuration"
xmlns:rhq="urn:xmlns:rhq-plugin"
targetNamespace="urn:xmlns:rhq-plugin"
elementFormDefault="qualified"
jaxb:version="2.0"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" blockDefault="">
<xs:import namespace="urn:xmlns:rhq-configuration" schemaLocation="rhq-configuration.xsd"/>
<xs:annotation>
<xs:documentation>Schema for the definition of an AMPS plugin. AMPS plugins provide the metadata for new
supported systems to manage and the implementation of the necessary interfaces to utilize these features.
</xs:documentation>
<xs:appinfo>
<jaxb:schemaBindings>
<jaxb:package name="org.rhq.core.clientapi.descriptor.plugin"/>
</jaxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
<xs:element name="plugin">
<xs:annotation>
<xs:documentation>Root of a plugin representing an ON plugin definition and the resource model of supported
managed systems and their components
</xs:documentation>
<xs:appinfo>
<jaxb:class name="PluginDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="depends" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Identifies the plugins this plugin depends on. A plugin depends
on another if it requires some of that other plugin's
classes or extends that other plugin's resource types.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="depends" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="plugin" type="xs:string" use="required"/>
<xs:attribute name="useClasses" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>
If true, the classes from this dependency plugin will be accessible. Can only be
true for one depends reference. If never specified, the last depends reference
will default this value to true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element ref="rhq:discovery-callbacks" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Defines the types and discovery classes whose discovered resources must be
funneled through this plugin's discovery classback classes.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="discoveryCallbacks" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:platform" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Defines a supported platform type (i.e. operating
system). Platforms are already defined in the
standard platform plugin deployed with the plugin
container itself; custom plugins typically do not
have to define new platforms.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="platforms" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:server" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Defines a supported server. A server is typically a
standalone product that can be managed and
monitored. Servers may be auto-discovered via
process scans.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="servers" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:service" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Defines a supported service. A service is typically
a child of server and provides distinct
functionality within the parent server. Services
are usually discovered by their parent servers.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="services" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:help" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Programmatic name of the plugin. This should be unique across all plugins deployed in the
system.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" type="xs:string">
<xs:annotation>
<xs:documentation>
Formatted name displayed to the user. If this is omitted, the value "name" attribute will be used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation>
Summary of what the plugin provides to be displayed to the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="package" type="rhq:classNameType">
<xs:annotation>
<xs:documentation>
Package in which all resource discovery and component classes in this plugin reside. These component
classes may use classes in other packages, however each resource discovery and component class
must be in this package in order for the plugin descriptor to be able to instantiate them.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pluginLifecycleListener" type="rhq:classNameType" use="optional">
<xs:annotation>
<xs:documentation>
A class that performs global initialization and shutdown of the plugin. If specified,
this class will be notified when the plugin is loaded and unloaded. This provides a place
for plugin developers to allocate global resources needed by all plugin components and
a place to clean up those resources.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="version" type="xs:string">
<xs:annotation>
<xs:documentation>
The version of this plugin in and OSGI compatible format. (e.g. 2.0.4 or 3.1.beta2)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ampsVersion" type="xs:string">
<xs:annotation>
<xs:documentation>
The AMPS version this plugin requires in OSGI compatible format. (e.g. 2.0)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- == Measurement ================================================== -->
<xs:element name="metric">
<xs:annotation>
<xs:documentation>A declared value that can be monitored for changes over time. Metrics are divided into
several main types including numeric, string traits, timings and complex.
</xs:documentation>
<xs:appinfo>
<jaxb:class name="MetricDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="rhq:version" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="displayName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
The name that is used to identify this metric in the UI.
If this attribute is not specified, the 'property' attribute
will be used as the display name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="property" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The plugin-specific name of the property that identifies the metric. In particular,
it helps identify what and possibly how the plugin retrieves the measurement from the
monitored resource. This is usually a product specific name of the metric emitted
by the managed resource. For example, it could be an attribute name from a JMX MBean,
or it could be a table name within a database.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="defaultInterval">
<xs:annotation>
<xs:documentation>
The default collection interval, in milliseconds. The metric is not necessarily
enabled by default - see the defaultOn and displayType attributes for that.
The minimum allowed value is 30000 (30 seconds).
If unspecified, the default collection interval is set according to the
resource type category, metric data type, and metric display type, as follows:
Platform numeric metrics: summary - 10m, detail - 20m
Server numeric metrics: summary - 10m, detail - 20m
Service numeric metrics: summary - 20m, detail - 40m
All Traits: summary and detail - 24 hours
Calltime metrics: 10m
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:unsignedLong">
<xs:minInclusive value="30000"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="defaultOn" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>
If true, this metric will get collected as soon as possible.
If false, a user must explicitly tell the plugin to collect this metric.
This is only used for metrics with a displayType of "detail". All
"summary" metrics are enabled by default, regardless of this value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="category" default="performance">
<xs:annotation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="availability"/>
<xs:enumeration value="performance"/>
<xs:enumeration value="throughput"/>
<xs:enumeration value="utilization"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="units" type="config:measurementUnitsDescriptor" default="none">
<xs:annotation>
<xs:documentation>
The units for this measurement.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayType" default="detail">
<xs:annotation>
<xs:documentation>
Data displayed in the summary view will appear in the main measurement display page.
Data displayed in the detail view will only appear in the UI when examining
the entire set of metric data. The location in the UI where the measurement data
is shown is typically in a different area from where the trait data is shown.
Note that metric collection is by default enabled for metrics with a displayType of summary.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="summary"/>
<xs:enumeration value="detail"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="measurementType" default="dynamic">
<xs:annotation>
<xs:documentation>
If dataType is "measurement", this further describes the measurement data.
This defines whether the measurement values that get collected
consistently increase over time or are dynamic and can "randomly"
be higher or lower than previous values. The system will by itself generate
per minute metris for data with measurementType of
trendsup or trendsdown.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="dynamic"/>
<xs:enumeration value="trendsup"/>
<xs:enumeration value="trendsdown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="dataType" default="measurement">
<xs:annotation>
<xs:documentation>
Describes the type of data that is to be collected. The typical type is
"measurement" (i.e. numeric) data that normally changes over time - this is the default.
A "trait" is typically a value that changes rarely (e.g. number of CPUs on a platform,
or an install path). A "calltime" metric is the min/max/avg call durations for each
destination (e.g. URL or session EJB method) in a set of destinations.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="measurement"/>
<xs:enumeration value="trait"/>
<xs:enumeration value="calltime"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="destinationType">
<xs:annotation>
<xs:documentation>
The destination type (e.g. "URL" or "Method Name") - only defined for call-time measurements.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="collapse"/>
<xs:minLength value="1"/>
<xs:maxLength value="100"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- == Event ================================================== -->
<xs:element name="event">
<xs:annotation>
<xs:documentation>A type of event that can be checked periodically for occurrences.
</xs:documentation>
<xs:appinfo>
<jaxb:class name="EventDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="rhq:version" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
A name that uniquely identifies the event type.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" type="xs:string">
<xs:annotation>
<xs:documentation>
The name that is used to identify this event in the UI.
If this attribute is not specified, the 'name' attribute
will be used as the display name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
<!-- == Content ================================================== -->
<xs:element name="content">
<xs:annotation>
<xs:documentation>Represents a particular type of package that is present on resources of this type, such as
libraries, log files, and deployed applications. Each package discovered on these resources will be of
one of the defined package types (i.e. an instance of this element).
</xs:documentation>
<xs:appinfo>
<jaxb:class name="ContentDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="configuration" type="config:configuration" minOccurs="0">
<xs:annotation>
<xs:documentation>
Describes properties that dictate how the package was deployed or installed. The user will be
prompted for values for these properties when deploying a new package of this type.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:version" minOccurs="0">
<xs:annotation>
<xs:documentation>
Resource version to which this content applies. If this is omitted, the content applies to
all versions.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Name of this package type. This must be unique across all other package types defined for this
resource type.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
The user friendly name of the package type that will be displayed in the UI.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Description of the package type that will be displayed in the UI.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="category" type="rhq:contentDescriptorCategory" use="required">
<xs:annotation>
<xs:documentation>
Describes the contents of the package type and how they act with respect to the resource.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="discoveryInterval" type="xs:int" use="optional" default="43200000">
<xs:annotation>
<xs:documentation>
Time interval, in milliseconds, between discovery scans being performed for packages of this type.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isCreationType" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>
Indicates a package of this type must be uploaded when creating the resource to which this package
type belongs. This attribute is only honored when the resource's creationType attribute is set
to "content".
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="supportsArchitecture" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>
Indicates packages of this type may be of different architectures. If this is set to false, when
creating new packages of this type, the architecture will be defaulted to "noarch".
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:simpleType name="contentDescriptorCategory">
<xs:restriction base="xs:string">
<xs:enumeration value="executableScript"/>
<xs:enumeration value="executableBinary"/>
<xs:enumeration value="deployable"/>
<xs:enumeration value="configuration"/>
</xs:restriction>
</xs:simpleType>
<!-- == Operation ================================================== -->
<xs:element name="operation">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="OperationDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="parameters" type="config:configuration" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
If this operation accepts incoming arguments from the caller, this defines
the paramter definitions for those argument values. They are defined using
the Configuration API.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="results" type="config:configuration" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
If this operation returns data back to the caller, this defines
what the returned results will look like using the Configuration API.
</xs:documentation>
</xs:annotation>
</xs:element>
<!-- resource versions this operation applies to; if omitted, it applies to all versions -->
<xs:element ref="rhq:version" minOccurs="0" />
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string" />
<xs:attribute name="displayName" type="xs:string" />
<xs:attribute name="description" type="xs:string" />
<!-- TODO: return value type -->
<xs:attribute name="timeout" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>
The default timeout, in seconds. If this amount of time passes before the
invocation completes, an error will be returned. If defined, this
overrides the plugin container's default operation invocation timeout.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- == Bundle Target ================================================== -->
<xs:complexType name="BundleDestination">
<xs:sequence>
<xs:element name="accepts" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Using the accepts elements, one can limit the applicability of
the destination to only given bundle types.
The rules governing whether a destination is available when deploying
a bundle of type "B" to a group of resources of type "T" are the following:
1) If no destination from type "T" explicitly accepts bundle type "B", only those
destinations that don't specifically accept ANY bundle type are available
for deployment.
2) If at least one destination from type "T" accepts bundle type "B" then
only those that accept it explicitly are available for deployment.
These rules support the 2 main kinds of bundle types: generic, filesystem based
bundle types and specific, API based bundle types.
The generic types deploy to the destinations that don't explicitly accept any
type, while specific types deploy to destinations specifically tailored for
those types.
It is supposed that a single destination will not likely be shared between
the generic and specific bundle types.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="bundle-type" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The name of the bundle type that can deploy to this destination.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The name given to identify this particular destination.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="BundleDestinationBaseDir">
<xs:complexContent>
<xs:extension base="rhq:BundleDestination">
<xs:annotation>
<xs:documentation>
Defines where a bundle can be deployed under the resource.
You must define one destination base directory, but may define more.
Each destination base directory's value is obtained from a particular context
(e.g. in the resource's plugin configuration or its resource configuration).
Within that context, the base directory value is obtained by looking up the named value in the given context.
For example, if the value-name is "install.dir" and the value-context is "pluginConfiguration",
then the destination base directory value is obtained by getting the "install.dir" property value
found in the resource's plugin configuration.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="value-context">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="pluginConfiguration"/>
<xs:enumeration value="resourceConfiguration"/>
<xs:enumeration value="measurementTrait"/>
<xs:enumeration value="fileSystem"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value-name" type="xs:string"/>
</xs:sequence>
<xs:attribute name="description" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
An explanation to the user to describe what this destination location is.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="BundleDestinationDefinition">
<xs:complexContent>
<xs:extension base="rhq:BundleDestination">
<xs:annotation>
<xs:documentation>
A complex definition of a destination meant for bundle handlers that
require a rich set of "connection properties" to successfully connect
to an API-based bundle target and deploy stuff to it.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="description" minOccurs="0" type="xs:normalizedString">
<xs:annotation>
<xs:documentation>
The description of the destination definition.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="connection" minOccurs="0" type="xs:normalizedString">
<xs:annotation>
<xs:documentation>
The expression specifying the location of the destination.
You can reference the values from the plugin or resource configuration
or a value of a trait using the ${} notation.
E.g. connection="http://${pluginConfiguration.host}/webapp" would replace
the ${} section with the value of the "host" property from the plugin configuration.
The escape character in expression is the backslash, i.e. \${} would be
interpreted as literal "${}".
The names of properties are free form, so in case the name of the property
contains a closing curly brace "}", you can quote the name of the property in
double quotes, with backslash as the escape char.
E.g. expression='http://${pluginConfiguration."crazy\"Name{}"}/webapp' reads the
value of property called crazy"Name{} from the plugin configuration.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:sequence>
<xs:choice minOccurs="0">
<!-- Note that this guy would require quite large scale changes, because this
basically is a replacement for the "deployDir" of bundle destination with
a fully-fledged configuration definition of props that can be defined on a
bundle destination. While this would be nice, it is actually not needed for
the current round of enhancements
<xs:element name="explicit-configuration" type="config:configuration">
<xs:annotation>
<xs:documentation>
The configuration options required to be specified by the user when
creating the destination.
</xs:documentation>
</xs:annotation>
</xs:element>
-->
<xs:element name="referenced-configuration">
<xs:complexType>
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element name="map-property-ref" type="rhq:BundleConfigPropertyReference"/>
<xs:element name="list-property-ref" type="rhq:BundleConfigPropertyReference"/>
<xs:element name="simple-property-ref" type="rhq:BundleConfigPropertyReference"/>
<xs:element name="trait-ref" type="rhq:BundleTraitReference" />
<xs:element name="all" type="rhq:BundleConfigFullCopy"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="bundle-target">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="BundleTargetDescriptor"/>
</xs:appinfo>
<xs:documentation>
If defined, the resource can be used as a target for bundle deployment.
The child elements describe where, under the resource, bundles can be deployed.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="destination-base-dir" type="rhq:BundleDestinationBaseDir"/>
<xs:element name="destination-definition" type="rhq:BundleDestinationDefinition"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- == Drift ================================================== -->
<xs:complexType name="Drift">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="DriftDescriptor" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="basedir" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:annotation>
<xs:documentation>
The root directory from which snapshots will be generated during drift detection.
Each base directory's value is obtained from a particular context (e.g. in the
resource's plugin configuration or its resource configuration).
Within that context, the base directory value is obtained by looking up the named value in the given context.
For example, if the value-name is "install.dir" and the value-context is "pluginConfiguration",
then the destination base directory value is obtained by getting the "install.dir" property value
found in the resource's plugin configuration.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="value-context">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="pluginConfiguration"></xs:enumeration>
<xs:enumeration value="resourceConfiguration"></xs:enumeration>
<xs:enumeration value="measurementTrait"></xs:enumeration>
<xs:enumeration value="fileSystem"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value-name" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="interval" type="xs:long" minOccurs="0" maxOccurs="1" default="1800">
<xs:annotation>
<xs:documentation>
The frequency in seconds in which drift monitoring should run. Defaults to thirty minutes.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="drift-handling-mode" minOccurs="0" maxOccurs="1" default="normal">
<xs:annotation>
<xs:documentation>
Specifies the way in which drift occurrences will be handled when reported. Normal
handling implies the reported drift is unexpected and as such can trigger alerts,
will be present in recent drift reports, etc. Setting to "Planned Changes" implies
that the reported drift is happening at a time when drift is expected due to
planned changes in the monitored environment, such as an application deployment, a
configuration change, or something similar. With this setting drift is only reported
for inspection, in the drift history view.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="normal"/>
<xs:enumeration value="plannedChange"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="includes" type="rhq:DriftIncludes" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
A set of patterns that specify files and/or directories to include.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="excludes" type="rhq:DriftExcludes" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
A set of patterns that specify files and/or directories to exclude.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation>
A summary of the drift definition template to be displayed to the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="DriftIncludes">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="DriftIncludesDescriptor" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="include" type="rhq:DriftFilter" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="DriftExcludes">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="DriftExcludesDescriptor" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="exclude" type="rhq:DriftFilter" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="DriftFilter">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="DriftFilterDescriptor" />
</xs:appinfo>
</xs:annotation>
<xs:attribute name="path" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
A file system path that can be a directory or a file. The path is assumed to be
relative to the base directory of the drift configuration.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pattern" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Provides a pattern that matches those files to be monitored for drift.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- BASE RESOURCE -->
<xs:element name="resource" type="rhq:resource">
<xs:annotation>
<xs:documentation>Represents an item in the management inventory</xs:documentation>
</xs:annotation>
<xs:keyref name="subcategoryNameRef" refer="rhq:subcategoryName">
<xs:selector xpath="./subcategories/subcategory"/>
<xs:field xpath="@subcategory"/>
</xs:keyref>
</xs:element>
<xs:complexType name="resource" abstract="true">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="ResourceDescriptor"/>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element ref="rhq:version" minOccurs="0" maxOccurs="1"/>
<xs:element name="runs-inside" type="rhq:runsInsideType" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
Declares that the resource type will be injected as a child type
to the resource types defined in this tag. In effect, this says
resources of this type can "run inside" resources of those parent types.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="subcategories" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="rhq:subcategory" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="bundle" type="rhq:bundle" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Defines the type of bundle this resource can process. Resource components that support
bundles must implement BundleFacet.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="bundle" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="plugin-configuration" type="config:configuration" minOccurs="0">
<xs:annotation>
<xs:documentation>
Defines properties that are used by the resource component to connect to a specific resource.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="process-scan" type="rhq:processScan" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Defines what to look for during a process scan in order to identify server
resources that should be auto-discovered. Process scan elements are only
useful when specified for server resources; they will be ignored when
specified for child services.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="rhq:operation" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="rhq:metric" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="rhq:event" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="rhq:content" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="resource-configuration" type="config:configuration" minOccurs="0"/>
<xs:element name="drift-definition" type="rhq:Drift" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="rhq:bundle-target" minOccurs="0" maxOccurs="1"/>
<xs:element ref="rhq:help" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="singleton" use="optional" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>Resources that are marked as singletons may only ever have
one instance discovered per parent resource.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="supportsManualAdd" use="optional" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>Defines whether resources of this type can be manually added to inventory
by the user (i.e. rather than being autodiscovered and then imported).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="supportsMissingAvailabilityType" use="optional" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>Defines whether this resource type may report AvailabilityType.MISSING in its implementation
of AvailabilityFacet.getAvailability().</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="classLoader" use="optional" default="shared">
<xs:annotation>
<xs:documentation>Dictates what classes the resource component has available. If 'shared', the resource
will only need to share classes from its parent resource. If 'instance', the resource will need its own
classloader instance and that classloader instance will get additional jars added to it if the resource's
discovery component implements the ClassLoaderFacet. Note that this attribute is ignored if the resource
and its parent are from the same plugin - in that case, the resource's classloader will always be that
of its parent resource.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="shared" />
<xs:enumeration value="instance" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="subCategory" use="optional">
<xs:annotation>
<xs:documentation>
Resource types can be grouped into subcategories. A subcategory
defines "like" resource types so they can, for example, be shown together
in a UI group tab. You can, therefore, define multiple resource types
and group them together by making their subCategory attributes the same.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" use="optional" type="xs:string"/>
<xs:attribute name="discovery" use="optional" type="rhq:classNameType">
<xs:annotation>
<xs:documentation>
The discovery component class used to discover this resource. Optional when the
resource may be discovered by a parent resource.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" type="rhq:classNameType">
<xs:annotation>
<xs:documentation>
The resource component class that is used to represent instances of this resource.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Formatted name displayed to the user. If this is omitted, the value "name" attribute will be used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute/>
</xs:complexType>
<xs:simpleType name="resourceCreateDeletePolicy">
<xs:restriction base="xs:string">
<xs:enumeration value="neither"/>
<xs:enumeration value="create-only"/>
<xs:enumeration value="delete-only"/>
<xs:enumeration value="both"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="resourceCreationData">
<xs:restriction base="xs:string">
<xs:enumeration value="configuration"/>
<xs:enumeration value="content"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="bundle">
<xs:all>
<xs:element name="targets" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Optionally lists the resource types that this bundle type can be target of.
If no resource types are specified, the bundle type can target any resource type.
The resource types can then further limit the destinations the bundle type can
target by using the "accepts" element in the destination specifications.
</xs:documentation>
</xs:annotation>