ControlTier Inc. > CTL
 
Font size:      

The type-v1.0 DTD

Note
This is a demonstration document using all possible elements in the current ControlTier type-v10.dtd.

types

The root (aka "top-level") element of the type.xml file. Contains a set of type elements. Any kind of type can be specified in any order.

  <types>
     <type ...>
  </types>
      

type

The type element defines a Type and command module. If the "order" attribute is "Setting" or "Assembly", then the elements required to define the command Module are not required.

attributes
attributedescriptionvalues
nameName of the type
roleSpecifies the role of the type. Concrete means it can be instatiated as objects. Abstract specifies it cannot be instantiated."concrete" or "abstract"
orderName of a well known base type.Setting, Assembly, Deployment, Service, Mediator
uniqueInstancesA boolean signifying if each instance of the type must have a unique name. "false" is default.true or false

 

elements
elementdescription
descriptionText content describing the type
supertypeReference to the parent type
command-settingsProperties of the command module
   <type
        name="TypeName"
        role="concrete"
        order="TypeName"
        uniqueInstances="true">

        <description>describe the type</description>

        <supertype>
            <typereference name="TypeName"/>
        </supertype>

	...
   </type>
   

doc

A documentation block. Can contain any valid Apache Forrest xdoc tag. The doc tags can be used just about anywhere in the type.xml. When ProjectBuilder's generate-forrest-docs command is run, the doc tags are expanded into the generated forrest xdocs.

supertype

A sub-element of type, supertype specifies the parent type of this type. A typereference tag is used to specify the supertype by name.

elements
elementdescription
typereferenceText content describing the type

typereference

Specifies a type.

attributes
attributedescriptionvalues
nameName of the typeAny existing type.

command-settings

Properties of the command module

elements
elementsdescriptionvalues
notificationAdvisory setting stating if notofications are enabled. Specify the notify attribute with a boolean value."true" or "false"
template-directorypath to template directoryAny valid path. By convention it is ${module.dir}/templates
dependency-viewParamaters to the Get-Properties command
loggerName used by log callsBy convention, the type name
     <command-settings>
         <notification notify="false"/>
         <template-directory></template-directory>
         <dependency-view parents="false" children="true" proximity="1"/>
         <logger name="TypeName"/>
     </command-settings>
      

dependency-view

Paramaters used as defaults for the Get-Properties command options

attributes
attributedescriptionvalues
parentsInclude parent dependency info"true" or "false"
childrenInclude children dependency info"true" or "false"
proximityNumber of levels away from the source object1, 2, 3, 4

attributes

define attributes of the Type here. type-property values are the names of properties in the depo: namespace

elements
elementsdescription
attribute
attribute-defaultThese will be generated into type.properties
    <attributes>
       <attribute name="attr_name" type-property="property-name"/>
       <attribute-default name="attr_name" value="VALUE"/>
    </attributes>
       

attribute

attributes
attributedescriptionvalues
nameAttribute's name
type-propertyAssociated RDF property

attribute-default

attributes
attributedescriptionvalues
nameAttribute's name
valueAttribute's default value.

constraints

A sub-element of type. Type constraints are used to control the allowed kinds of dependencies (both parent and child). Also controls the allowed values for its RDF properties.

elements
elementsdescription
allowedvalue-constraintContains any number of allowedvalue elements
dependency-constraintSpecifies allowedtypes and singletontypes
       <constraints>
            <allowedvalue-constraint
                enforced="true/false"
                type-property="depo-property-name">
                <allowedvalue value="<SOME VALUE>" default="true/false"/>
                <allowedvalue value="<SOME VALUE>" default="true/false"/>
            </allowedvalue-constraint>
            <dependency-constraint kind="parent/child" enforced="true/false">
                <allowedtypes>
                    <typereference name="<TYPE NAME>"/>
                    <typereference name="<TYPE NAME>"/>
                </allowedtypes>
                <singletontypes>
                    <typereference name="<TYPE NAME>"/>
                    <typereference name="<TYPE NAME>"/>
                </singletontypes>
            </dependency-constraint>
        </constraints>
      

allowedvalue-constraint

Contains any number of allowed values.

attributes
attributedescriptionvalues
enforcedSpecifies if the constraint should be enforced"true" or "false"
type-propertyName of RDF property.
elements
elementsdescription
allowedvalue

allowedvalue

An allowed value.

attributes
attributedescriptionvalues
valueAn allowed valueAny string
defaultSpecifies if it should be the default value."true" or "false"

dependency-constraint

attributes
attributedescriptionvalues
kindKind of dependency."parent" or "child"
enforcedSpecifies if the constraint should be enforced"true" or "false"

allowedtypes

elements
elementsdescription
typereference

singletontypes

elements
elementsdescription
typereference

commands

A sub-element of type, the commands element contains the command definitions for this type.

    <commands>
       <command name="<ANT COMMAND NAME>"
                description="<ANT COMMAND DESCRIPTION>"
                 command-type="{Command|AntCommand|BsfCommand|WorkflowCommand}">
             <opts>
                <opt parameter="<OPT NAME>"
                     description="<OPT DESCRIPTION>"
                     required="{true|false}"
                     property="opts.<OPT NAME>"
                     type="{string|boolean}"
                     default="<DEFAULT STRING VALUE>"/>
               </opts>
           </command>
	 </commands>
	    

command

Defines a command for the type.

attributes
attributedescriptionvalues
nameThe command's nameAny string
descriptionBreifly describe the command purpose.Any string
command-typeThe type of command implementation"Command", "BsfCommand", "AntCommand", "WorkflowCommand"
is-staticA static command is one that can run outsidef of an object context"true" or "false" daemonizedShould the executable be launched in daemon mode?"true" or "false"

elements
elementsdescription
optsSpecifies the commands options
execution-stringSpecifies the file to execute
argument-stringSpecifies the arguments
implementationSpecifies the AntCommand implementation
scriptSpecifies the BsfCommand script
workflowSpecifies command sequence

execution-string

File to execute

argument-string

Arguments to pass to executable. If the execution-string specifies an interpreter that can read script from stdin, the value of argument-string can be script code.

implementation

Ant tasks to execute.

script

BSF script to execute.

workflow

Command sequence to execute. Takes one more more command elements.

attributes
attributedescriptionvalues
threadcountNumber of threads to execute the workflowAny integer greater than 0

 

elements
elementsdescription
commandName of the command. Command must be in the same module. <command name="<COMMAND NAME>"/>
	 <command name="<WORKFLOW COMMAND NAME>"
                  description="<WORKFLOW COMMAND DESCRIPTION>"
                  command-type="WorkflowCommand"
                  error-handler-type="handler/ignore/fail"
                  >
           <error-handler quiet="true/false">
             <prompt>PROMPT MESSAGE</prompt>
             <command name="<ERROR HANDLER COMMAND NAME>"/>
             <notify email="NAME@HOST">
               <subject>SUBJECT</subject>
               <message-file>PATH</message-file>
             </notify>
             <report>REPORT MESSAGE</report>
           </error-handler>
           <success-handler notify-email="NAME@HOST">
             <notify-subject>SUBJECT</notify-subject>
             <notify-message-file>PATH</notify-message-file>
           </success-handler>
           <workflow threadcount="<INTEGER>">
             <command name="<COMMAND NAME>"/>
             <command name="<COMMAND NAME>"/>
           </workflow>
         </command>
       

error-handler

Handles an error if one occurs

attributes
attributedescriptionvalues
quietLog a message if an error is caught?"true" or "false"
errorpropertyName of property to set error messagestring

 

elements
elementsdescription
promptPrompt user if an error occurs
commandRun the specified command. Must be in the same module.
notifySend an email.
reportCall the report task with the error message.

Example

           <error-handler quiet="true/false">
             <prompt>PROMPT MESSAGE</prompt>
             <command name="<ERROR HANDLER COMMAND NAME>"/>
             <notify email="NAME@HOST">
               <subject>SUBJECT</subject>
               <message-file>PATH</message-file>
             </notify>
             <report>REPORT MESSAGE</report>
           </error-handler>
      

opts

Specifies the commands options

elements
elementsdescription
opt
              <opts>
                <opt parameter="<OPT NAME>"
                     description="<OPT DESCRIPTION>"
                     required="{true|false}"
                     property="opts.<OPT NAME>"
                     type="{string|boolean}"
                     default="<DEFAULT STRING VALUE>"
                     defaultproperty="<PROPERTY NAME>"
                  />
               </opts>
       

opt

Specifies one command option.

attributes
attributedescriptionvalues
parameterThe option's nameAny string
descriptionBreifly describe the option's purpose.Any string
requiredBreifly describe the option's purpose."true" or "false"
propertyName to set the option valueBy convention it is opts.parameter
typeType of parameter. A string option is one that takes an argument. A boolean option does not."string" or "boolean"
defaultLiteral value to use if the option is not specified.Any string
defaultpropertyProperty name to use if the option is not specified.Any property that may exist at execution time.

Base type RDF properties

Attribute constraints can control the allowed values and defaults for the RDF properties of base types. The following is a listing of ones that can have constraints applied.

namedescriptiondomain
deployment-basedir Deployment base directoryDeployment
deployment-install-rootDeployment installation root directory Deployment
deployment-startup-rankDeployment startup rank Deployment
os-archOperating system architecture Node
os-familyOperating system family (windows, unix) Node
os-nameOperating system name Node
os-versionOperating system version Node
package-archPackage architecture Package
package-basePackage base name Package
package-buildtimePackage build time Package
package-filenamePackage file name Package
package-filetypePackage file type Package
package-install-rankPackage install rankPackage
package-install-rootPackage install directory Package
package-releasePackage release identifier Package
package-release-tag Package release tagPackage
package-repo-urlURL to the package in the repo Package
package-restartBoolean flag specifying if a restart is required (true,false) Package
package-versionPackage versionPackage
settingValueHolds the setting valueSetting
settingTypeUser defined type definition of the setting valueSetting