1 <?xml version='1.0' encoding='UTF-8'?>
   2 <!--   
   3    Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
   4    
   5    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6    
   7    The contents of this file are subject to the terms of either the Universal Permissive License 
   8    v 1.0 as shown at http://oss.oracle.com/licenses/upl
   9    
  10    or the following license:
  11    
  12    Redistribution and use in source and binary forms, with or without modification, are permitted
  13    provided that the following conditions are met:
  14    
  15    1. Redistributions of source code must retain the above copyright notice, this list of conditions
  16    and the following disclaimer.
  17    
  18    2. Redistributions in binary form must reproduce the above copyright notice, this list of
  19    conditions and the following disclaimer in the documentation and/or other materials provided with
  20    the distribution.
  21    
  22    3. Neither the name of the copyright holder nor the names of its contributors may be used to
  23    endorse or promote products derived from this software without specific prior written permission.
  24    
  25    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  26    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  27    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  28    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  30    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  31    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  32    WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33 -->
  34 <schema targetNamespace="org.openjdk.jmc.commands" xmlns="http://www.w3.org/2001/XMLSchema">
  35 <annotation>
  36       <appinfo>
  37          <meta.schema plugin="org.openjdk.jmc.commands" id="command" name="Mission Control Command"/>
  38       </appinfo>
  39       <documentation>
  40          Extension point that can be executed from the Mission Control shell or from the command line using &apos;-&apos; as a prefix.
  41       </documentation>
  42    </annotation>
  43 
  44    <element name="extension">
  45       <annotation>
  46          <appinfo>
  47             <meta.element />
  48          </appinfo>
  49       </annotation>
  50       <complexType>
  51          <sequence>
  52             <element ref="command" minOccurs="1" maxOccurs="unbounded"/>
  53          </sequence>
  54          <attribute name="point" type="string" use="required">
  55             <annotation>
  56                <documentation>
  57                   
  58                </documentation>
  59             </annotation>
  60          </attribute>
  61          <attribute name="id" type="string">
  62             <annotation>
  63                <documentation>
  64                   
  65                </documentation>
  66             </annotation>
  67          </attribute>
  68          <attribute name="name" type="string">
  69             <annotation>
  70                <documentation>
  71                   
  72                </documentation>
  73                <appinfo>
  74                   <meta.attribute translatable="true"/>
  75                </appinfo>
  76             </annotation>
  77          </attribute>
  78       </complexType>
  79    </element>
  80 
  81    <element name="command">
  82       <complexType>
  83          <choice minOccurs="0" maxOccurs="unbounded">
  84             <element ref="boolean"/>
  85             <element ref="number"/>
  86             <element ref="string"/>
  87          </choice>
  88          <attribute name="identifier" type="string" use="required">
  89             <annotation>
  90                <documentation>
  91                   The name or keyword for the command.
  92                </documentation>
  93                <appinfo>
  94                   <meta.attribute kind="identifier"/>
  95                </appinfo>
  96             </annotation>
  97          </attribute>
  98          <attribute name="name" type="string">
  99             <annotation>
 100                <documentation>
 101                   A human readabe name of the command.
 102                </documentation>
 103             </annotation>
 104          </attribute>
 105          <attribute name="description" type="string">
 106             <annotation>
 107                <documentation>
 108                   A description of the command.
 109                </documentation>
 110             </annotation>
 111          </attribute>
 112          <attribute name="class" type="string" use="required">
 113             <annotation>
 114                <documentation>
 115                   The class that should be invoked when the command is executed. The class must implement org.openjdk.jmc.commands.IExecute.
 116                </documentation>
 117                <appinfo>
 118                   <meta.attribute kind="java" basedOn=":org.openjdk.jmc.commands.IExecute"/>
 119                </appinfo>
 120             </annotation>
 121          </attribute>
 122          <attribute name="category" type="string" use="required">
 123             <annotation>
 124                <documentation>
 125                   The category the command belongs to, e.g. &quot;General&quot;, &quot;Scripting&quot;
 126                </documentation>
 127             </annotation>
 128          </attribute>
 129          <attribute name="userInterface" type="boolean" use="required">
 130             <annotation>
 131                <documentation>
 132                   Set to true if the command requires a display or access to the workbench window to execute.
 133                </documentation>
 134             </annotation>
 135          </attribute>
 136          <attribute name="commandHelper" type="string">
 137             <annotation>
 138                <documentation>
 139                   
 140                </documentation>
 141                <appinfo>
 142                   <meta.attribute kind="java" basedOn=":org.openjdk.jmc.commands.ICommandHelper"/>
 143                </appinfo>
 144             </annotation>
 145          </attribute>
 146       </complexType>
 147    </element>
 148 
 149    <element name="string">
 150       <complexType>
 151          <attribute name="identifier" type="string" use="required">
 152             <annotation>
 153                <documentation>
 154                   The name that should be used to identify the parameter.
 155                </documentation>
 156                <appinfo>
 157                   <meta.attribute kind="identifier"/>
 158                </appinfo>
 159             </annotation>
 160          </attribute>
 161          <attribute name="name" type="string">
 162             <annotation>
 163                <documentation>
 164                   A human readabe name of the parameter.
 165                </documentation>
 166             </annotation>
 167          </attribute>
 168          <attribute name="description" type="string">
 169             <annotation>
 170                <documentation>
 171                   A description of the parameter.
 172                </documentation>
 173             </annotation>
 174          </attribute>
 175          <attribute name="exampleValue" type="string" use="required">
 176             <annotation>
 177                <documentation>
 178                   An example value for the parameter. Used by the help system.
 179                </documentation>
 180             </annotation>
 181          </attribute>
 182          <attribute name="optional" type="boolean" use="required">
 183             <annotation>
 184                <documentation>
 185                   Set to true if the parameter should be optional.
 186                </documentation>
 187             </annotation>
 188          </attribute>
 189       </complexType>
 190    </element>
 191 
 192    <element name="boolean">
 193       <complexType>
 194          <attribute name="identifier" type="string" use="required">
 195             <annotation>
 196                <documentation>
 197                   the name that should be used to identigy the parameter
 198                </documentation>
 199             </annotation>
 200          </attribute>
 201          <attribute name="name" type="string">
 202             <annotation>
 203                <documentation>
 204                   A human readabe name of the parameter.
 205                </documentation>
 206             </annotation>
 207          </attribute>
 208          <attribute name="description" type="string">
 209             <annotation>
 210                <documentation>
 211                   A description of the parameter.
 212                </documentation>
 213             </annotation>
 214          </attribute>
 215          <attribute name="exampleValue" type="string" use="required">
 216             <annotation>
 217                <documentation>
 218                   An example value for the parameter. Used by the help system.
 219                </documentation>
 220             </annotation>
 221          </attribute>
 222          <attribute name="optional" type="boolean" use="required">
 223             <annotation>
 224                <documentation>
 225                   Set to true if the parameter should be optional.
 226                </documentation>
 227             </annotation>
 228          </attribute>
 229       </complexType>
 230    </element>
 231 
 232    <element name="number">
 233       <complexType>
 234          <attribute name="identifier" type="string" use="required">
 235             <annotation>
 236                <documentation>
 237                   the name that should be used to identigy the parameter
 238                </documentation>
 239             </annotation>
 240          </attribute>
 241          <attribute name="name" type="string">
 242             <annotation>
 243                <documentation>
 244                   A human readabe name of the parameter.
 245                </documentation>
 246             </annotation>
 247          </attribute>
 248          <attribute name="description" type="string">
 249             <annotation>
 250                <documentation>
 251                   A description of the parameter.
 252                </documentation>
 253             </annotation>
 254          </attribute>
 255          <attribute name="exampleValue" type="string" use="required">
 256             <annotation>
 257                <documentation>
 258                   An example value for the parameter. Used by the help system.
 259                </documentation>
 260             </annotation>
 261          </attribute>
 262          <attribute name="optional" type="boolean" use="required">
 263             <annotation>
 264                <documentation>
 265                   Set to true if the parameter should be optional.
 266                </documentation>
 267             </annotation>
 268          </attribute>
 269       </complexType>
 270    </element>
 271 
 272    <annotation>
 273       <appinfo>
 274          <meta.section type="since"/>
 275       </appinfo>
 276       <documentation>
 277          4.1.0
 278       </documentation>
 279    </annotation>
 280 
 281    <annotation>
 282       <appinfo>
 283          <meta.section type="examples"/>
 284       </appinfo>
 285       <documentation>
 286          &lt;pre&gt;
 287 &lt;command
 288   class=&quot;com.test.HelloWorld&quot;
 289   description=&quot;Prints hello world.&quot;
 290   identifier=&quot;helloworld&quot;
 291   name=&quot;Hello World&quot;
 292   category=&quot;General&quot;/&gt;
 293 
 294 package com.test;
 295 
 296 import java.io.PrintStream;
 297 import org.openjdk.jmc.commands.IExecute;
 298 import org.openjdk.jmc.commands.Statement;
 299 
 300 public class HelloWorld implements IExecute
 301 {
 302  public boolean execute(Statement statment, PrintStream writer)
 303  {
 304   System.out.println(&quot;Hello World&quot;);
 305  }
 306 }
 307 &lt;/pre&gt;
 308       </documentation>
 309    </annotation>
 310 
 311 
 312 
 313    <annotation>
 314       <appinfo>
 315          <meta.section type="copyright"/>
 316       </appinfo>
 317       <documentation>
 318          Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
 319       </documentation>
 320    </annotation>
 321 
 322 </schema>