IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.vp
Interface ITestObjectDescriptor


public interface ITestObjectDescriptor

Defines an abstract reference to an object in the software under test. Verification-point (VP) data contains references to the related objects in the software under test. These objects are represented by classes that implement this interface. This abstract reference is defined in terms of properties that enable the TestObject to be located again when needed.

Since:
RFT1.0

Method Summary
 void addChild(ITestObjectDescriptor child)
          Inserts a description of the child relative to this node (and implicitly sets the child's parent to this).
 ITestObjectDescriptor[] getChildren()
          Returns any child objects in the hierarchy; returns null if the object has no children.
 ITestData getData()
          Returns the data associated with this descriptor.
 java.lang.String getDataType()
          Returns the data type associated with this descriptor.
 boolean getMasked()
          Returns true if this TestObject should not be included in a comparison operation with another similar object.
 boolean getMasked(java.lang.String property)
          Returns the Masked setting for the supplied property.
 ITestObjectDescriptor getParent()
          Returns the parent descriptor or null if this node does not have a parent TestObject descriptor.
 java.lang.Object getProperty(java.lang.String property)
          Returns the value associated with the supplied property.
 com.rational.test.ft.vp.impl.IMaskedProperty getPropertyAttributes(java.lang.String property)
          Returns the attributes associated with the supplied property.
 java.lang.Object getTestObjectProperty(java.lang.String property)
          Returns the value associated with the supplied TestObject property.
 void setData(ITestData data, java.lang.String dataType)
          Associates the supplied Data with this descriptor.
 void setMasked(boolean masked)
          Defines whether this descriptor is used in a comparison operation against other TestObject descriptors.
 void setProperty(java.lang.String property, java.lang.Object value, boolean masked)
          Defines a property that is needed to describe the object in the software under test.
 void setTestObjectProperty(java.lang.String property, java.lang.Object value)
          Defines a TestObject property that is needed to describe the object in the software under test.
 java.lang.String toString()
          Overrides a method in the Object class.
 

Method Detail

setTestObjectProperty

void setTestObjectProperty(java.lang.String property,                            java.lang.Object value)
Defines a TestObject property that is needed to describe the object in the software under test.

Parameters:
property - the name of the property being defined
value - the property value
Since:
RFT1.0
See Also:
getTestObjectProperty(String)

getTestObjectProperty

java.lang.Object getTestObjectProperty(java.lang.String property)
Returns the value associated with the supplied TestObject property. If Property is not defined, a null value is returned.

Parameters:
property - the name for the property being requested
Returns:
The value associated with the supplied property
Since:
RFT1.0
See Also:
setTestObjectProperty(String,Object)

setProperty

void setProperty(java.lang.String property,                  java.lang.Object value,                  boolean masked)
Defines a property that is needed to describe the object in the software under test. If the property is defined as masked, it does not participate in any comparison operations performed against this set of properties and other similar property sets.

Parameters:
property - the name for the property being defined
value - the property value
masked - flags whether the property should be included in comparisons of like named properties in other property sets
Since:
RFT1.0
See Also:
getProperty(String), getMasked(String), getPropertyAttributes(String)

getProperty

java.lang.Object getProperty(java.lang.String property)
Returns the value associated with the supplied property. If Property is not defined, a null value is returned.

Parameters:
property - the name for the property being requested
Returns:
The value associated with the supplied property
Since:
RFT1.0
See Also:
setProperty(String,Object,boolean), getMasked(String), getPropertyAttributes(String)

getMasked

boolean getMasked(java.lang.String property)
Returns the Masked setting for the supplied property. If Property is not defined, false is returned.

Parameters:
property - the name for the property being requested
Returns:
The masked setting for the supplied property
Since:
RFT1.0
See Also:
setProperty(String,Object,boolean), getProperty(String), getPropertyAttributes(String)

getPropertyAttributes

com.rational.test.ft.vp.impl.IMaskedProperty getPropertyAttributes(java.lang.String property)
Returns the attributes associated with the supplied property. If Property is not defined, null is returned. The attributes include the property name, value, and masked setting for the property.

Parameters:
property - the name for the property being requested
Returns:
The attributes associated with the supplied property
Since:
RFT1.0
See Also:
setProperty(String,Object,boolean), getProperty(String), getMasked(String)

setData

void setData(ITestData data,              java.lang.String dataType)
Associates the supplied Data with this descriptor. This method implicitly uses the .DATA and .DATATYPE property names. Therefore, you should take care not to overload the use of these property names.

Parameters:
data - the data to associate with this descriptor

dataType - a type name for the data
Since:
RFT1.0

getData

ITestData getData()
Returns the data associated with this descriptor. A null value is returned if data has not been associated with this descriptor. This method implicitly uses the .DATA property name. Therefore, do not set a property with this name.

Since:
RFT1.0

getDataType

java.lang.String getDataType()
Returns the data type associated with this descriptor. A null value is returned if a data type has not been associated with this descriptor. This method implicitly uses the .DATATYPE property name. Therefore, do not set a property with this name.

Since:
RFT1.0

setMasked

void setMasked(boolean masked)
Defines whether this descriptor is used in a comparison operation against other TestObject descriptors. Be careful when setting this value because the data maintained by this descriptor is also implicitly affected by this setting. The data is merely a property of the descriptor. Typically, the non-data properties are masked from comparison, and only the data is directly unmasked.

Parameters:
masked - If true, this descriptor and all its properties are ignored in comparison operations.
Since:
RFT1.0
See Also:
getMasked()

getMasked

boolean getMasked()
Returns true if this TestObject should not be included in a comparison operation with another similar object. If this TestObject is Masked, all properties that define it, including any associated data, are also masked. However, children are checked directly to find out if they are masked or not. Masking this node does not block comparison of child objects.

Since:
RFT1.0

getParent

ITestObjectDescriptor getParent()
Returns the parent descriptor or null if this node does not have a parent TestObject descriptor.

Since:
RFT1.0

getChildren

ITestObjectDescriptor[] getChildren()
Returns any child objects in the hierarchy; returns null if the object has no children.

Since:
RFT1.0

addChild

void addChild(ITestObjectDescriptor child)
Inserts a description of the child relative to this node (and implicitly sets the child's parent to this).

Since:
RFT1.0

toString

java.lang.String toString()
Overrides a method in the Object class.

Overrides:
toString in class java.lang.Object
Since:
RFT1.0