<< Click to Display Table of Contents >> RayQC > 7.3 u2 > User Guide > Appendices Basic External Plug-in Structure |
As already described within the plug-ins section of this document, an external plug-in consists of two basic elements: the script file and the descriptive manifest file.
Source code that is about to be used as plug-in script for RayQC must validate against a set of minimal requirements in order to be integrated correctly:
•External plug-ins have to be valid PowerShell .ps1 files. (To launch other files, like executables, the internal command plug-in can be used.)
•Parameter definitions within script and manifest file must match
Every plug-in script users want to use in combination with RayQC checklists has to come along with a manifest XML file that is valid against the RayQC plug-in Schema Definition. The definition file ManifestSchema.xsd is available from the root of the application installation directory (e. g., C:\Program Files (x86)\RayQC\). Open this file in a suiting editor of your choice to take a look at the requirements for a minimal RayQC plug-in manifest file:
•XML version must be 1.0 or higher
•Encoding must be utf-8
•Root node must be <pluginData>
•<pluginData> must have non-empty attribute name
•<pluginData> attribute description must be present exactly once but may be empty
•<pluginData> must have non-empty attribute version
•<pluginData> must have non-empty attribute FileName
•<pluginData> may have one non-empty attribute Encrypted
•<pluginData> must have non-empty attribute PowerShellVersion
•<pluginData> child <Function> must be present exactly once
•<Function> must contain one or more child <FunctionParameters>
•<FunctionParameters> must have non-empty attribute FunctionName
•<FunctionParameters> attribute <description> must be present exactly once but may be empty
•<FunctionParameters> child <Parameters> must be present exactly once
•At least one <Parameters> child out of the following options must be present
o<BooleanParameter> : Expects a boolean input (true/false)
▪<Name> : Name of the parameter
▪<Description> : User defined description of the parameter
▪<IsOptional> : When set to true, providing input for this parameter is optional
▪<Default> : Default parameter value
o<StringParameter> : Expects a string as input parameter
▪<Name> : Name of the parameter
▪<Description> :User defined description of the parameter
▪<IsOptional> : When set to to true, providing input for this parameter is optional
▪<Default> : Default parameter value
▪<RegexString>: Regular expression
▪<ValidationMessage> : Validation message that is shown if the string does not satisfy the regular expression
o<NumberParameter> : Expects an integer value between Min and Max
▪<Name> : Name of the parameter
▪<Description> : User defined description of the parameter
▪<IsOptional> : When set to true, providing input for this parameter is optional
▪<Default> : Default integer parameter value
▪<Min> : Minimum input integer value
▪<Max> : Maximum input integer value
▪<Increment> : Increment value
o<MultiStringParameter> : Provides user option to select from drop-down a string that is provided as parameter
▪<Name> : Name of the parameter
▪<Description> : User defined description of the parameter
▪<IsOptional> : When set to true, providing input for this parameter is optional
▪<Default> : Default string from the string list
▪<StringList> : List of strings defined. e.g. <string1/> <string2/> <string3/>
According to this description, the following manifest file source code is valid:
<?xml version="1.0" encoding="utf-8"?> <pluginData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Name /> <Description /> <Version /> <Filename /> <PowerShellVersion /> <Functions> <FunctionParameters> <FunctionName /> <Description /> <Parameters /> </FunctionParameters> </Functions> </plug-inData> |
However, a manifest file without any productive content may be valid, but is definitively useless at the same time. In order to understand the required and optional elements and nestings of RayQC plug-in manifest files, it is highly recommended to review the sample plug-ins and their manifest files, which are available with the RayQC application installation directory (e. g., C:\Program Files (x86)\RayQC\Samples\).