<?xml version="1.0" encoding="UTF-8"?>
<!--
  - mycommand.xml - MetaModel descriptor for the MyCommand example component.
  -
  - This component is an example of how to use OSCommand as a plugin to execute
  - an external program from a custom component.
 -->
<MetaModel name="examples.development.components.MyCommand"
			version="2.0.0"
			supername="com.engineous.system.component.Activity"
			superversion="2.*.*">

	<Requires>
		<SystemRelease>3.0.0+</SystemRelease>
	</Requires>

	<DisplayName>MyCommand</DisplayName>
	<Description>Example of a custom component that uses an OSCommand plugin to execute a command.</Description>
	<Runtime type="com.engineous.sdk.runtime.Component">
			examples.development.components.mycommand.MyCommandExecutor</Runtime>
	<Editor type="com.engineous.desktop.sdk.DesktopEditor">
			examples.development.components.mycommand.MyCommandEditor</Editor>
	<Handler type="com.engineous.sdk.component.ComponentHandler">
			examples.development.components.mycommand.MyCommandHandler</Handler>
   
	<!--  Create required properties and parameters
	   -  Currently there are none.  Everything is done by the plugins.
	   -  and the plugins are located by name.  The oscommand is plugin 'oscommand'.
	   -  Input parsers are 'in1' through 'in9' and output parsers are 'out1' through 'out9'.
	  -->
	<Variables>
		<!-- Properties of the component MyComponent -->
		<!-- The Editor for the component allows the user to change the value of these. -->
		
	    <Variable name="wincommand" tag="wincommand" role="Property" structure="Scalar" mode="Local" 
	    		type="com.engineous.datatype.String">
	    	<Value>notepad.exe</Value>
	    </Variable>
	    <Variable name="unixcommand" tag="unixcommand" role="Property" structure="Scalar" mode="Local" 
	    		type="com.engineous.datatype.String">
	    	<Value>gedit</Value>
	    </Variable>
	
		<!-- Standard Parameters of component MyComponent -->
		<!--  Every instance of the component will have these parameters as soon as it is created -->
		
	    <!-- There are always 2 file parameters for the input and output data.  
	       - They must point to the same local file.  These are configured in the handler
	       - when the plugin is added.  There is no portable way to configure them here.
		   - The <Value> used to configure file parameters is not public. -->
	    <Variable name="inputFile" tag="inputFile" role="Parameter" structure="Scalar" mode="Input" 
	    		type="com.engineous.datatype.File">
	    </Variable>
	    <Variable name="outputFile" tag="outputFile" role="Parameter" structure="Scalar" mode="Output" 
	    		type="com.engineous.datatype.File">
	    </Variable>
	    
	    <!-- Parameter used to hold the command name to execute.  Is changed in the execute() method based on the platform -->
	    <Variable name="command" tag="command" role="Parameter" structure="Scalar" mode="Input" 
	    		type="com.engineous.datatype.String">
	    	<Value>notepad.exe</Value>
	    </Variable>
	</Variables>
</MetaModel>
