Parameters (represented by an object of type com.itko.util.Parameter in lisa-util-8.0.0.jar) are the attributes that define and support DevTest elements.
A ParameterList (represented by an object of type com.itko.util.ParameterList in lisa-util-8.0.0.jar) is a collection of such parameters. In a way, ParameterList can be treated as an extension of java.util.HashMap.
The class that defines a DevTest element defines the parameters that the element exposes in a callback method that returns a com.itko.lisa.test.ParameterList. For example, the getParameters() method below defines the parameters for the Parse Property Value As Argument String filter:
public ParameterList getParameters() { ParameterList p = new ParameterList(); p.addParameter( new Parameter( "Existing Property", PROPKEY_PARAM, propkey, TestExec.PROPERTY_PARAM_TYPE ) ); p.addParameter( new Parameter( "IsURL", ISURL_PARAM, new Boolean(isurl).toString(), Boolean.class ) ); p.addParameter( new Parameter( "Attribute", ATTRIB_PARAM, attrib, TestExec.ATTRIB_PARAM_TYPE ) ); p.addParameter( new Parameter( "New Property", PROP_PARAM, prop, TestExec.PROPERTY_PARAM_TYPE ) ); return p; }
For each parameter exposed, the method creates a com.itko.util.Parameter. The previous example defined the following parameters:
The parameters to the constructor of Parameter are:
The model editor uses the last parameter to determine the user interface element that is associated with the parameter. For example, passing Boolean.class renders the parameter as a check box. Passing TestExec.PROPERTY_PARAM_TYPE renders the parameter as a drop-down list containing the keys of all existing properties.
For more information about the com.itko.util.Parameter and com.itko.util.ParameterList classes, see the JavaDocs in the doc folder of your installation directory.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|