IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain
Class DomainProxy

java.lang.Object   extended by com.rational.test.ft.sys.RegisteredObject       extended by com.rational.test.ft.domain.ProxyTestObject
          extended by com.rational.test.ft.domain.DomainProxy
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase
Direct Known Subclasses:
JavaDomainProxy, ProcessDomainProxy

public abstract class DomainProxy
extends ProxyTestObject

The base class for all domain proxies.

Since:
RFT1.0

Field Summary
 
Fields inherited from class com.rational.test.ft.domain.ProxyTestObject
BROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, debug, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
 
Fields inherited from class com.rational.test.ft.sys.RegisteredObject
theTestObject
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
DomainProxy(java.lang.Object theTestObject)
          Sets the object as a member variable for the proxy.
 
Method Summary
 void addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
          Additional properties are not required for the domain proxy because it is never added to the object map.
 ProxyTestObject[] getChildren()
          Returns an array of proxies for the children of this object.
 java.lang.String getDescriptiveName()
          Returns a name for the associated UI object in a script.
 java.lang.String getImplementationName()
          Returns the name of the domain implementation.
 java.lang.Object getIndexer(java.lang.String name, java.lang.Object[] indexes)
          Gets the value of an indexed property
 com.rational.test.ft.value.IndexerInfo[] getIndexers()
          Gets information about a TestObject's indexed properties
 ProxyTestObject[] getMappableChildren()
          Returns an array of proxies for the children of this object.
 ProxyTestObject getMappableParent()
          Returns a proxy object for the parent of this object.
 com.rational.test.ft.value.MethodInfo[] getMethods()
          Always returns null for the domain proxy.
 com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
          Domains are not graphical.
 java.lang.String getName()
          Returns the name of the domain.
 java.util.Hashtable getNonValueProperties()
          Always returns null for the domain proxy.
 ProxyTestObject[] getOwnedObjects()
          Always returns null because object relationships are not understood at this level of abstaction.
 ProxyTestObject getOwner()
          Always returns null because object relationships are not understood at this level of abstaction.
 ProxyTestObject getParent()
          Returns a proxy object for the parent of this object.
 TestDomainImplementation getTestDomain()
          Returns the TestDomain that this proxy object is associated with.
 java.lang.String getTestObjectClassName()
          Returns a valid class name specification, or returns null if shouldBeMapped() returns true.
 ProxyTestObject getTopMappableParent()
          Returns a proxy object for the parent of this object.
 ProxyTestObject[] getTopObjects()
          Returns an array of references to the top objects in the domain.
 ProxyTestObject getTopParent()
          Returns a proxy object for the parent of this object.
 java.lang.String getUniqueId()
          Returns a unique string for the associated object.
 boolean hasAddedRecognitionProperties()
          Always returns false for the domain proxy.
 java.lang.Object invokeConstructor(java.lang.String className, java.lang.String signature, java.lang.Object[] args)
          Invokes a constructor for a class in the context of the domain.
 java.lang.Object invokeStaticMethod(java.lang.String className, java.lang.String method, java.lang.String signature, java.lang.Object[] args)
          Invokes a static method on a class in the context of the domain.
 void prepareDomainsForRecording()
          Initializes the domains for recording.
 void prepareToStop()
          Prepare the domain to stop while stopping the recorder.
 void processMouseEvent(IMouseActionInfo action)
          Domains are not graphical.
 void readyToStop()
          Prepare the domain to stop while stopping the recorder.
 void setIndexer(java.lang.String name, java.lang.Object[] indexes, java.lang.Object val)
          Sets the value of an indexed property
 
Methods inherited from class com.rational.test.ft.domain.ProxyTestObject
addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommand, getDataDrivableCommands, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProperties, getProperty, getProxy, getRecognitionProperties, getRecognitionPropertyWeight, getRole, getScriptCommandAnchor, getScriptCommandFlags, getStandardProperties, getTestData, getTestDataTypes, getVisualClippableParent, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, setProperty, shouldBeMapped, suppressKeyAction, updateTestData
 
Methods inherited from class com.rational.test.ft.sys.RegisteredObject
addProxyReference, dereference, getObject, getRegisteredId, getTransactionId, isReferenced, isReleaseRequired, register, registerTransiently, release, toString, unregister
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DomainProxy

public DomainProxy(java.lang.Object theTestObject)
Sets the object as a member variable for the proxy. All interactions with the supplied object are performed through this class.

Since:
RFT1.0
Method Detail

getTestObjectClassName

public java.lang.String getTestObjectClassName()
Returns a valid class name specification, or returns null if shouldBeMapped() returns true. The test script (running in a separate process) interacts with a class that supports a shared interface with a specific proxy. This class is called a TestObject class. The testObject performs a cross-process (and cross-JVM) reflected call to the same method against an associated proxy. This proxy.

Specified by:
getTestObjectClassName in interface IProxyBase
Specified by:
getTestObjectClassName in class ProxyTestObject
Returns:
The associated testObject class full name.
Since:
RFT1.0

getTestDomain

public TestDomainImplementation getTestDomain()
Returns the TestDomain that this proxy object is associated with.

Specified by:
getTestDomain in interface IProxyBase
Specified by:
getTestDomain in class ProxyTestObject
Returns:
The associated TestDomain.
Since:
RFT1.0

getParent

public ProxyTestObject getParent()
Returns a proxy object for the parent of this object. Always returns null for a domain.

Specified by:
getParent in class ProxyTestObject
Returns:
null
Since:
RFT1.0

getTopParent

public ProxyTestObject getTopParent()
Returns a proxy object for the parent of this object. Always returns null for a domain.

Specified by:
getTopParent in class ProxyTestObject
Returns:
null
Since:
RFT1.0

getChildren

public ProxyTestObject[] getChildren()
Returns an array of proxies for the children of this object. Always returns null for a domain.

Specified by:
getChildren in class ProxyTestObject
Returns:
null

getMappableParent

public ProxyTestObject getMappableParent()
Returns a proxy object for the parent of this object. Always returns null for a domain.

Specified by:
getMappableParent in class ProxyTestObject
Returns:
null
Since:
RFT1.0

getTopMappableParent

public ProxyTestObject getTopMappableParent()
Returns a proxy object for the parent of this object. Always returns null for a domain.

Specified by:
getTopMappableParent in class ProxyTestObject
Returns:
null
Since:
RFT1.0

getMappableChildren

public ProxyTestObject[] getMappableChildren()
Returns an array of proxies for the children of this object. Always returns null for a domain.

Specified by:
getMappableChildren in class ProxyTestObject
Returns:
null

processMouseEvent

public void processMouseEvent(IMouseActionInfo action)
Domains are not graphical. This method is included for use by subclasses.

Specified by:
processMouseEvent in class ProxyTestObject
Parameters:
action - The event cache and other mouse state information for this mouse action.
Since:
RFT1.0
See Also:
IMouseActionInfo, MethodSpecification

getMethodSpecForPoint

public com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
Domains are not graphical. This method is included for use by subclasses.

Specified by:
getMethodSpecForPoint in class ProxyTestObject
Since:
RFT1.0
See Also:
MethodSpecification

getDescriptiveName

public java.lang.String getDescriptiveName()
Returns a name for the associated UI object in a script. This name may be further adjusted to be unique to the script, but the returned value remains the base for the name. Only characters used in Java identifiers should be returned (alphabetic, numeric, or underscore characters). Non-identifier characters cause script compilation failures. An example of what to return is "OKButton" for a java.awt.Button with the text "OK" on it.

Specified by:
getDescriptiveName in class ProxyTestObject
Returns:
A descriptive object name.
Since:
RFT1.0

getName

public java.lang.String getName()
Returns the name of the domain. This name is shared with all implementations.

Since:
RFT1.0

getImplementationName

public java.lang.String getImplementationName()
Returns the name of the domain implementation. This name typically differs between implementations.

Since:
RFT1.0

getUniqueId

public java.lang.String getUniqueId()
Returns a unique string for the associated object. This string must be identical for each call to this method for the same instance of the UI object. This value must be unique.

Specified by:
getUniqueId in class ProxyTestObject
Returns:
A unique and repeatable identifier for the object being evaluated.
Since:
RFT1.0

getTopObjects

public ProxyTestObject[] getTopObjects()
Returns an array of references to the top objects in the domain. The objects returned can be derived from TestObject and can support more methods. The references to the objects should be released by calling one of the unregister methods.

Since:
RFT1.0

getOwner

public ProxyTestObject getOwner()
Always returns null because object relationships are not understood at this level of abstaction.

Specified by:
getOwner in class ProxyTestObject
Returns:
null
Since:
RFT1.0

getOwnedObjects

public ProxyTestObject[] getOwnedObjects()
Always returns null because object relationships are not understood at this level of abstaction.

Specified by:
getOwnedObjects in class ProxyTestObject
Returns:
null, no known parent.
Since:
RFT1.0

addRecognitionProperty

public void addRecognitionProperty(java.lang.String property,                                    java.lang.Object value,                                    int weight)
Additional properties are not required for the domain proxy because it is never added to the object map.

Specified by:
addRecognitionProperty in class ProxyTestObject
Parameters:
property - The recognition property name. Care should be taken to avoid conflicts with existing property names.
value - The value of the added recognition property.
weight - The weight associated with this recognition property. This value is returned when getRecognitionPropertyWeight() is called.
Since:
RFT1.0
See Also:
ProxyTestObject.getRecognitionProperties(), ProxyTestObject.getRecognitionPropertyWeight(String), ProxyTestObject.getProperty(String)

hasAddedRecognitionProperties

public boolean hasAddedRecognitionProperties()
Always returns false for the domain proxy.

Specified by:
hasAddedRecognitionProperties in class ProxyTestObject
Returns:
true if recognition properties have been added to this proxy from an external source through addRecognitionProperty(String,Object,int).
Since:
RFT1.0
See Also:
ProxyTestObject.addRecognitionProperty(String,Object,int)

getNonValueProperties

public java.util.Hashtable getNonValueProperties()
Always returns null for the domain proxy.

Specified by:
getNonValueProperties in class ProxyTestObject
Returns:
The set of properties that are not available.
Since:
RFT1.0
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.getStandardProperties(), ProxyTestObject.getProperty(String), ProxyTestObject.setProperty(String,Object)

getIndexer

public java.lang.Object getIndexer(java.lang.String name,                                    java.lang.Object[] indexes)
Gets the value of an indexed property

Specified by:
getIndexer in class ProxyTestObject
Parameters:
name - the name of the indexer
indexes - the indexes to get the value of

getIndexers

public com.rational.test.ft.value.IndexerInfo[] getIndexers()
Gets information about a TestObject's indexed properties

Specified by:
getIndexers in class ProxyTestObject
See Also:
IndexerInfo

setIndexer

public void setIndexer(java.lang.String name,                        java.lang.Object[] indexes,                        java.lang.Object val)
Sets the value of an indexed property

Specified by:
setIndexer in class ProxyTestObject
Parameters:
name - the name of the indexer
indexes - the indexes to set the value of

getMethods

public com.rational.test.ft.value.MethodInfo[] getMethods()
Always returns null for the domain proxy.

Specified by:
getMethods in class ProxyTestObject
Returns:
An array containing method signatures for all methods accessible against the associated test object.
Since:
RFT1.0
See Also:
ProxyTestObject.getProperties(), ProxyTestObject.getStandardProperties(), ProxyTestObject.getNonValueProperties()

invokeStaticMethod

public java.lang.Object invokeStaticMethod(java.lang.String className,                                            java.lang.String method,                                            java.lang.String signature,                                            java.lang.Object[] args)
Invokes a static method on a class in the context of the domain. If the returned object is not a value class, invokeStaticMethod returns a reference to the object in the Software Under Test. As always, reference objects should be released by calling one of the unregister methods.

Since:
RFT1.0
See Also:
TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

invokeConstructor

public java.lang.Object invokeConstructor(java.lang.String className,                                           java.lang.String signature,                                           java.lang.Object[] args)
Invokes a constructor for a class in the context of the domain. If the returned object is not a value class, invokeConstructor returns a reference to the object in the Software Under Test. As always, reference objects should be released by calling one of the unregister methods. Note that using invokeConstructor to construct a value class object in the SUT is inefficient because value class objects can be created locally.

See Also:
TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

prepareDomainsForRecording

public void prepareDomainsForRecording()
Initializes the domains for recording. For Domains like SAP we have to flush the events in the SAPGUI event queue before starting the recorder, otherwise those events will appear in the new recording session


prepareToStop

public void prepareToStop()
Prepare the domain to stop while stopping the recorder. For Domains like SAP we have to flush the events in the automation event queue before stopping the recorder, otherwise some of the user recorded actions will not get recorded. Domains that implement prepareToStop has to notify the recorder by invoking recorder.setPrepareToStopDomain() when it is finished with the logic to flush the events. Once the recorder is notified of domain that are in prepare to stop state, the recorder will once again call the domains before stopping the recorder by calling readyToStop() in domains. IMPORTANT : Whoever implementing the prepareToStop() should also implement the routine readyToStop() in domains and should notify the recorder that it is done by invoking recorder.setReadyToStopDomain().


readyToStop

public void readyToStop()
Prepare the domain to stop while stopping the recorder. For Domains like SAP we have to flush the events in the automation event queue before stopping the recorder, otherwise some of the user recorded actions will not get recorded. This routine be implemented only if prepareToStop() has been implemeted in the domains. This routine makes sure that all the flushing has been happend by the logic implemented in the prepareToStop() and it notifies the recorder that it can go ahead with the stopping of the recorder by invoking recorder.setReadyToStopDomain()