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

Project Version 2.3

com.rational.test.ft.object.map
Class MappedTestObject

java.lang.Object   extended by com.rational.test.ft.object.map.MappedTestObject
All Implemented Interfaces:
com.rational.test.ft.object.map.IMappedTestObject, IMapPropertyName, java.io.Serializable

public class MappedTestObject
extends java.lang.Object
implements com.rational.test.ft.object.map.IMappedTestObject, java.io.Serializable

See Also:
Serialized Form

Field Summary
static com.rational.test.ft.util.FtDebug debug
           
 
Fields inherited from interface com.rational.test.ft.object.map.IMappedTestObject
CHILDREN, IGNOREOWNER, NAMEINSCRIPT, OWNED, OWNER, PARENT, SPYMAPPEDTESTOBJECT, TRANSIENT_USED, TRANSIENTNAME, VOM_CRC, VOM_DD, VOM_ID, VOM_RECTANGLE
 
Fields inherited from interface com.rational.test.ft.script.IMapPropertyName
CLASS, DESCRIPTION, DESCRIPTIONOBJECT, DESCRIPTIVENAME, DOMAIN, MAPID, NESTEDCOMMENT, PROXYCLASSNAME, ROLE, SCRIPTNAME, SIMPLENAME, STATE, TESTOBJECTCLASSNAME
 
Constructor Summary
MappedTestObject()
           
MappedTestObject(com.rational.test.ft.object.map.IMappedTestObject mto)
           
MappedTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mto, boolean saveReferenceToSpyMto)
           
 
Method Summary
 void clearId()
          Clears the map-relative unique identifier.
 void debugDisplay()
           
 int getChildCount(boolean allChildren)
          Returns the count of children associated with this MappedTestObject.
 com.rational.test.ft.object.map.IMappedTestObject[] getChildren()
          Returns the known list of children associated with this MappedTestObject.
 java.lang.Object getClassName()
          Defines the required class name recognition property.
 java.lang.String getDescriptiveName()
          Returns the descriptive name administrative property.
 java.lang.String getDomainName()
          Returns the domain administrative property.
 java.lang.String getId()
          Assigns, to every test object added to a map, a unique identifier relative to the associated map .
 com.rational.test.ft.object.map.IObjectMapPropertySet getMapProperties()
           
 java.lang.String getNameInScript()
          Check to see if this test object knows what its name is in the context of a running test script.
 com.rational.test.ft.object.map.IMappedTestObject[] getOwned()
          Returns the known list of owned children associated with this MappedTestObject.
 com.rational.test.ft.object.map.IMappedTestObject getOwner()
          Returns the owner object.
 com.rational.test.ft.object.map.IMappedTestObject getParent()
          Returns the parent object.
 java.lang.Object getProperty(java.lang.String property)
          Returns a non-administrative property value associated with this MappedTestObject.
 com.rational.test.ft.object.map.MappedTestObjectProperty getPropertyData(java.lang.String property)
          Returns a non-administrative property+value+weight associated with this MappedTestObject.
 java.util.Enumeration getPropertyEnumeration()
          Returns an enumeration object that returns a MappedTestObjectProperty instance for each property associated with this MappedTestObject.
 java.lang.String[] getPropertyNames()
          Returns the current list of recognition properties.
 int getPropertyWeight(java.lang.String property)
          Returns a property weight associated with this MappedTestObject.
 java.lang.String getProxyClassName()
          Returns the proxy class name administrative property.
 java.lang.String getRole()
          Returns the role administrative property.
 java.lang.String getSimpleDescription()
          Returns the getDescriptiveName() if the name is not null; otherwise, the getRole() is returned.
 java.lang.String getSimpleName()
          Returns the simple name administrative property.
 java.lang.String getTestObjectClassName()
          Returns the TestObject interface class name administrative property.
 com.rational.test.ft.object.map.IMappedTestObject getTopParent()
          Returns the topmost parent for an object.
 boolean hasProperty(java.lang.String property)
          Returns true if the specified property is available in the associated property set.
 boolean isArtificialProperty(java.lang.String propertyName)
          Returns true if the property name corresponds to an extended property, that is, a property not defined by the underlying domain.
 boolean isDescriptionObject()
           
 boolean isIgnoreOwner()
          This method returns whether an owner found in the SUT is ignored or not.
 boolean isNew()
          Returns the state of the associated test object.
 boolean isPersistentProperty(java.lang.String propertyName)
          Returns true if the property name corresponds to a property that should be persisted, for example, a property in a verification-point Object recognition property cache.
 boolean isUsed()
          This method returns the referrence status of the associated test object.
 void removeChild(com.rational.test.ft.object.map.IMappedTestObject child)
          Deletes the specified child from this nodes list of child objects.
 void removeOwned(com.rational.test.ft.object.map.IMappedTestObject owned)
          Deletes the specified owned child from this nodes list of owned objects.
 void removeProperty(java.lang.String property)
          Removes the specified property from the associated property set.
 void setClassName(java.lang.Object className)
          Defines the required class name recognition property.
 void setDescriptionObject(boolean isDescriptionObject)
           
 void setDescriptiveName(java.lang.String descriptiveName)
          Defines the descriptive name administrative property.
 void setDomainName(java.lang.String domainName)
          Defines the domain administrative property.
 void setId(java.lang.String id)
          Associates a map-relative unique identifier with this MappedTestObject.
 void setIgnoreOwner(boolean ignoreOwner)
          Set the flag to ignore any owner for this object in the SUT.
 void setMapProperties(com.rational.test.ft.object.map.IObjectMapPropertySet propSet)
           
 void setNameInScript(java.lang.String nameInScript)
          Define the test object name used to reference this test object in the executing script.
 void setNew(boolean state)
          Updates the state of the associated test object.
 void setOwner(com.rational.test.ft.object.map.IMappedTestObject owner)
          Sets a reference to the owner object.
 void setParent(com.rational.test.ft.object.map.IMappedTestObject parent)
          Sets a reference to the parent object.
 void setProperty(com.rational.test.ft.object.map.MappedTestObjectProperty property)
          Adds a property to the set of properties associated with this test object.
 void setProperty(java.lang.String property, boolean value, int weight)
          This method defines a non-administrative property.
 void setProperty(java.lang.String property, byte value, int weight)
          Defines a byte-valued non-administrative property.
 void setProperty(java.lang.String property, char value, int weight)
          Defines a character-valued non-administrative property.
 void setProperty(java.lang.String property, double value, int weight)
          Defines a double-valued non-administrative property.
 void setProperty(java.lang.String property, float value, int weight)
          Defines a float-valued non-administrative property.
 void setProperty(java.lang.String property, int value, int weight)
          Defines an integer-valued non-administrative property.
 void setProperty(java.lang.String property, long value, int weight)
          Defines a long-valued non-administrative property.
 void setProperty(java.lang.String property, java.lang.Object value, int weight)
          Defines a non-administrative property associated with this MappedTestObject.
 void setProperty(java.lang.String property, short value, int weight)
          Defines a short-valued non-administrative property.
 void setProxyClassName(java.lang.String proxy)
          Defines the proxy class name name administrative property.
 void setRole(java.lang.String role)
          Defines the role administrative property.
 void setSimpleName(java.lang.String simpleName)
          Defines the simple name administrative property.
 void setTestObjectClassName(java.lang.String testObjectClassName)
          Defines the test object interface class name administrative property.
 void setUsed(boolean used)
          This method updates the referrence status of the associated test object.
 java.lang.String toString()
           
 void updateChildOrder(com.rational.test.ft.object.map.IMappedTestObject[] orderedChildren)
          Update the order of the children associated with this mapped test object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static com.rational.test.ft.util.FtDebug debug
Constructor Detail

MappedTestObject

public MappedTestObject()

MappedTestObject

public MappedTestObject(com.rational.test.ft.object.map.IMappedTestObject mto)

MappedTestObject

public MappedTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mto,                         boolean saveReferenceToSpyMto)
Method Detail

setMapProperties

public void setMapProperties(com.rational.test.ft.object.map.IObjectMapPropertySet propSet)
Specified by:
setMapProperties in interface com.rational.test.ft.object.map.IMappedTestObject

getMapProperties

public com.rational.test.ft.object.map.IObjectMapPropertySet getMapProperties()
Specified by:
getMapProperties in interface com.rational.test.ft.object.map.IMappedTestObject

getId

public java.lang.String getId()
Assigns, to every test object added to a map, a unique identifier relative to the associated map .

Specified by:
getId in interface com.rational.test.ft.object.map.IMappedTestObject

setId

public void setId(java.lang.String id)
Associates a map-relative unique identifier with this MappedTestObject. Note that no MappedTestObject can be an element in more than one object map; this object therefore has only this one unique identifier.

Specified by:
setId in interface com.rational.test.ft.object.map.IMappedTestObject

clearId

public void clearId()
Clears the map-relative unique identifier. This method is called when a node is removed from an object map or when a node is cloned for an unknown use.

Specified by:
clearId in interface com.rational.test.ft.object.map.IMappedTestObject

isNew

public boolean isNew()
Returns the state of the associated test object. When the state is added to a transient map, it is set to new.

Specified by:
isNew in interface com.rational.test.ft.object.map.IMappedTestObject
Returns:
The state of this MappedTestObject.

setNew

public void setNew(boolean state)
Updates the state of the associated test object. When the state is added to a transient map, it is set to new.

Specified by:
setNew in interface com.rational.test.ft.object.map.IMappedTestObject
Parameters:
state - The updated state of this MappedTestObject.

setDescriptionObject

public void setDescriptionObject(boolean isDescriptionObject)

isDescriptionObject

public boolean isDescriptionObject()

getSimpleDescription

public java.lang.String getSimpleDescription()
Returns the getDescriptiveName() if the name is not null; otherwise, the getRole() is returned.

Specified by:
getSimpleDescription in interface com.rational.test.ft.object.map.IMappedTestObject

getDescriptiveName

public java.lang.String getDescriptiveName()
Returns the descriptive name administrative property. The descriptive name associated with a test object is an interesting way to refer to a test object.

Specified by:
getDescriptiveName in interface com.rational.test.ft.object.map.IMappedTestObject

setDescriptiveName

public void setDescriptiveName(java.lang.String descriptiveName)
Defines the descriptive name administrative property. The descriptive name associated with a test object is an interesting way to refer to a test object.

Specified by:
setDescriptiveName in interface com.rational.test.ft.object.map.IMappedTestObject

getSimpleName

public java.lang.String getSimpleName()
Returns the simple name administrative property. The simple name associated with a test object is an interesting way to show in the simplified script.

Specified by:
getSimpleName in interface com.rational.test.ft.object.map.IMappedTestObject

setSimpleName

public void setSimpleName(java.lang.String simpleName)
Defines the simple name administrative property. The simple name associated with a test object is an interesting way to show in the simplified script.

Specified by:
setSimpleName in interface com.rational.test.ft.object.map.IMappedTestObject

getRole

public java.lang.String getRole()
Returns the role administrative property. The role associated with a test object is an interesting simple type description of the test object.

Specified by:
getRole in interface com.rational.test.ft.object.map.IMappedTestObject

setRole

public void setRole(java.lang.String role)
Defines the role administrative property. The role associated with a test object is an interesting simple type description of the test object.

Specified by:
setRole in interface com.rational.test.ft.object.map.IMappedTestObject

getNameInScript

public java.lang.String getNameInScript()
Check to see if this test object knows what its name is in the context of a running test script. Note that this is a transient property that may be set during playback. If not set then null is returned.

Specified by:
getNameInScript in interface com.rational.test.ft.object.map.IMappedTestObject

setNameInScript

public void setNameInScript(java.lang.String nameInScript)
Define the test object name used to reference this test object in the executing script. This property is transient and is only relavent in the context of a running script.

Specified by:
setNameInScript in interface com.rational.test.ft.object.map.IMappedTestObject

getParent

public com.rational.test.ft.object.map.IMappedTestObject getParent()
Returns the parent object.

Specified by:
getParent in interface com.rational.test.ft.object.map.IMappedTestObject

setParent

public void setParent(com.rational.test.ft.object.map.IMappedTestObject parent)
Sets a reference to the parent object. This method implicitly updates the parent object to refer to this object as a child.

Specified by:
setParent in interface com.rational.test.ft.object.map.IMappedTestObject

getChildCount

public int getChildCount(boolean allChildren)
Returns the count of children associated with this MappedTestObject. If allChildren is requested, a deep count is performed, meaning that immediate children, grandchildren, and so on are counted.

Specified by:
getChildCount in interface com.rational.test.ft.object.map.IMappedTestObject

getChildren

public com.rational.test.ft.object.map.IMappedTestObject[] getChildren()
Returns the known list of children associated with this MappedTestObject. The list of children is updated when the parent relationship is established with the child.

Specified by:
getChildren in interface com.rational.test.ft.object.map.IMappedTestObject

updateChildOrder

public void updateChildOrder(com.rational.test.ft.object.map.IMappedTestObject[] orderedChildren)
Update the order of the children associated with this mapped test object. These node are already the children associated with this test object so reparenting is not necessary, just reordering the existing children.


removeChild

public void removeChild(com.rational.test.ft.object.map.IMappedTestObject child)
Deletes the specified child from this nodes list of child objects. If this child is not found in the child list, no action is performed.

Specified by:
removeChild in interface com.rational.test.ft.object.map.IMappedTestObject

getOwner

public com.rational.test.ft.object.map.IMappedTestObject getOwner()
Returns the owner object.

Specified by:
getOwner in interface com.rational.test.ft.object.map.IMappedTestObject

setOwner

public void setOwner(com.rational.test.ft.object.map.IMappedTestObject owner)
Sets a reference to the owner object. This method implicitly updates the parent object to refer to this object as an owned object.

Specified by:
setOwner in interface com.rational.test.ft.object.map.IMappedTestObject

getOwned

public com.rational.test.ft.object.map.IMappedTestObject[] getOwned()
Returns the known list of owned children associated with this MappedTestObject. The list of owned children is updated when the owner relationship is established with the owned child.

Specified by:
getOwned in interface com.rational.test.ft.object.map.IMappedTestObject

removeOwned

public void removeOwned(com.rational.test.ft.object.map.IMappedTestObject owned)
Deletes the specified owned child from this nodes list of owned objects. If this owned child is not found in the owned list, no action is performed.

Specified by:
removeOwned in interface com.rational.test.ft.object.map.IMappedTestObject

setIgnoreOwner

public void setIgnoreOwner(boolean ignoreOwner)
Set the flag to ignore any owner for this object in the SUT. This property only applies to top level objects and any attempt to set it on a node that is not a top level object (a node that has a parent) will cause an internal map exception to be thrown. A side effect of setting this value to true is that if the node has an owner it will be removed.

Specified by:
setIgnoreOwner in interface com.rational.test.ft.object.map.IMappedTestObject
Parameters:
ignoreOwner -

isIgnoreOwner

public boolean isIgnoreOwner()
This method returns whether an owner found in the SUT is ignored or not. This administrative property only applies to top level MappedTestObjects and is always false if the object has a parent object.

Specified by:
isIgnoreOwner in interface com.rational.test.ft.object.map.IMappedTestObject
Returns:
true if the top level object should ignore any owner defined in the SUT.

getDomainName

public java.lang.String getDomainName()
Returns the domain administrative property.

Specified by:
getDomainName in interface com.rational.test.ft.object.map.IMappedTestObject

setDomainName

public void setDomainName(java.lang.String domainName)
Defines the domain administrative property.

Specified by:
setDomainName in interface com.rational.test.ft.object.map.IMappedTestObject

getProxyClassName

public java.lang.String getProxyClassName()
Returns the proxy class name administrative property. The proxy class name is used to associate nodes in the script with interesting information about the interface support for the test object.

Specified by:
getProxyClassName in interface com.rational.test.ft.object.map.IMappedTestObject

setProxyClassName

public void setProxyClassName(java.lang.String proxy)
Defines the proxy class name name administrative property. The proxy class name is used to associate nodes in the script with interesting information about the interface support for the test object.

Specified by:
setProxyClassName in interface com.rational.test.ft.object.map.IMappedTestObject

getTestObjectClassName

public java.lang.String getTestObjectClassName()
Returns the TestObject interface class name administrative property.

Specified by:
getTestObjectClassName in interface com.rational.test.ft.object.map.IMappedTestObject

setTestObjectClassName

public void setTestObjectClassName(java.lang.String testObjectClassName)
Defines the test object interface class name administrative property.

Specified by:
setTestObjectClassName in interface com.rational.test.ft.object.map.IMappedTestObject

getClassName

public java.lang.Object getClassName()
Defines the required class name recognition property. Note the class name is an Object so that the class can be converted to a regular expression and not limited to just a String value.

Specified by:
getClassName in interface com.rational.test.ft.object.map.IMappedTestObject

setClassName

public void setClassName(java.lang.Object className)
Defines the required class name recognition property.

Specified by:
setClassName in interface com.rational.test.ft.object.map.IMappedTestObject

hasProperty

public boolean hasProperty(java.lang.String property)
Returns true if the specified property is available in the associated property set.

Specified by:
hasProperty in interface com.rational.test.ft.object.map.IMappedTestObject

getPropertyData

public com.rational.test.ft.object.map.MappedTestObjectProperty getPropertyData(java.lang.String property)
Returns a non-administrative property+value+weight associated with this MappedTestObject.

Specified by:
getPropertyData in interface com.rational.test.ft.object.map.IMappedTestObject

getProperty

public java.lang.Object getProperty(java.lang.String property)
Returns a non-administrative property value associated with this MappedTestObject.

Specified by:
getProperty in interface com.rational.test.ft.object.map.IMappedTestObject

getPropertyWeight

public int getPropertyWeight(java.lang.String property)
Returns a property weight associated with this MappedTestObject. The property weight is a measure of importance associated with non-administrative properties. The property weight is a value that is greater than or equal to zero (not important) and less than or equal to one hundred (most important).

Specified by:
getPropertyWeight in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(com.rational.test.ft.object.map.MappedTestObjectProperty property)
Adds a property to the set of properties associated with this test object.


setProperty

public void setProperty(java.lang.String property,                         java.lang.Object value,                         int weight)
Defines a non-administrative property associated with this MappedTestObject.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         int value,                         int weight)
Defines an integer-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         long value,                         int weight)
Defines a long-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         short value,                         int weight)
Defines a short-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         byte value,                         int weight)
Defines a byte-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         float value,                         int weight)
Defines a float-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         double value,                         int weight)
Defines a double-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         char value,                         int weight)
Defines a character-valued non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

setProperty

public void setProperty(java.lang.String property,                         boolean value,                         int weight)
This method defines a non-administrative property.

Specified by:
setProperty in interface com.rational.test.ft.object.map.IMappedTestObject

removeProperty

public void removeProperty(java.lang.String property)
Removes the specified property from the associated property set. If the property does not exist, this method has no effect.

Specified by:
removeProperty in interface com.rational.test.ft.object.map.IMappedTestObject

getTopParent

public com.rational.test.ft.object.map.IMappedTestObject getTopParent()
Returns the topmost parent for an object. If the object has no parent, the object itself is returned.

Specified by:
getTopParent in interface com.rational.test.ft.object.map.IMappedTestObject
Returns:
The topmost parent in the test object hierarchy

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns the current list of recognition properties. The list of recognition property names returned includes all the administrative properties associated with this MappedTestObject and also those added by the associated proxy.

Specified by:
getPropertyNames in interface com.rational.test.ft.object.map.IMappedTestObject

getPropertyEnumeration

public java.util.Enumeration getPropertyEnumeration()
Returns an enumeration object that returns a MappedTestObjectProperty instance for each property associated with this MappedTestObject.

Specified by:
getPropertyEnumeration in interface com.rational.test.ft.object.map.IMappedTestObject

isArtificialProperty

public boolean isArtificialProperty(java.lang.String propertyName)
Returns true if the property name corresponds to an extended property, that is, a property not defined by the underlying domain. All artifical properties use a '#' character as the first character in the property name. Non-administrative properties should not use this character as the first character.

Specified by:
isArtificialProperty in interface com.rational.test.ft.object.map.IMappedTestObject

isPersistentProperty

public boolean isPersistentProperty(java.lang.String propertyName)
Returns true if the property name corresponds to a property that should be persisted, for example, a property in a verification-point Object recognition property cache. By convention, transient properties begin with a double pound sign (##) sequence so that they can be identified easily.

Specified by:
isPersistentProperty in interface com.rational.test.ft.object.map.IMappedTestObject

isUsed

public boolean isUsed()
This method returns the referrence status of the associated test object. If used in a script, the status is set to true.

Specified by:
isUsed in interface com.rational.test.ft.object.map.IMappedTestObject
Returns:
The reference status of this mapped test object.

setUsed

public void setUsed(boolean used)
This method updates the referrence status of the associated test object. If used in a script, the status is set to true.

Specified by:
setUsed in interface com.rational.test.ft.object.map.IMappedTestObject
Parameters:
state - The updated reference status of this mapped test object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

debugDisplay

public void debugDisplay()