Primitive, except byte or byte arrays |
- Call the appropriate setProperty() method to set the
property of the element. Various overrides exist for all primitive
types except byte.
|
Byte array or large strings |
|
Complex |
- Call setProperty(CBActionElement,CBActionElement) to
which you can pass the old and the new value of the attribute. All
model elements extend from the CBActionElement class. The
old value is passed so that it can be removed from the model and the
new value is passed, so it can be set. If you do not have a value,
then pass null. For example, if the value is changing from val1 to val2, then call the setProperty(val1,val2) method.
If you are setting the value for the first time, call the setProperty(null,val1) method. If you want to clear the value, call setProperty(val1,null).
- This is similar to the other setProperty() methods for
the primitive type, with the added restriction that this needs the
old value too.
- When the model gets loaded, the addReference() method
will be called and this method needs to be overwritten to interpret
and properly assign the attribute to the object. Call the appropriate setXXX() method to set that attribute with the value passed
in.
|
List |
- The attribute should be of type EList. To access the
list, if the element is a container, then it can implement the LTElementHost interface and will need to implement the getElements() method. This method must return the EList. To load the
list when the children of this model element are being loaded, the addReference() method is called for each child and the element
must put the child in the right list.
|
Reference to another model element |
- Define an attribute of the type of the element you reference.
This will provide the simple getters and setters to this attribute.
These getters or setters will not call getProperty or setProperty, but they will simply get or set the attribute
value.
- Define another attribute that will act as a proxy for this element.
This element is your own class that extends ProxyElement from
the LTBM.
- When creating the reference, call the setHref() method
of the ProxyElement with the ID (getId()) of the
element that is being referenced.
- To get the element that is being referenced, use the href from
the ProxyElement (getHref()) to locate the element
in the test. You can also use the BehaviorUtil.findElement() method (the test containing this element, the ID of the element
being searched) to get the element.
|