Parameters (represented by com.itko.lisa.test.Parameter objects) are the attributes that define and support LISA elements.
A ParameterList (represented by an object of type com.itko.lisa.test.ParameterList) 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 LISA 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.lisa.test.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.lisa.test.Parameter and com.itko.lisa.test.ParameterList classes, see the LISA Javadoc.
|
Copyright © 2014 CA Technologies.
Tous droits réservés.
|
|