|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester Proxy SDK Reference Project Version 2.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rational.test.ft.sys.RegisteredObject com.rational.test.ft.domain.ProxyTestObject com.rational.test.ft.domain.java.JavaProxy
public class JavaProxy
The Java object proxy's base class, which all Java proxies must extend. The abstract ProxyTestObject base class defines the non-GUI object properties required to implement a proxy object. This abstract class extends that definition with the additional properties needed for a Java object.
This class further contains the default implementation of various base class methods that proxy implementations may need to extend or override.
TestObject
Property | Usage |
---|---|
.class | The Java full class name of the test object. |
.classIndex | The zero-based index of the class relative to the immediate parent in the object map. |
Field Summary | |
---|---|
protected static com.rational.test.ft.util.FtDebug |
debug
|
protected java.lang.String |
uniqueId
|
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 | |
---|---|
JavaProxy(java.lang.Object theObjectInTheSUT)
Sets the SUT object as a member variable for the proxy. |
Method Summary | |
---|---|
protected void |
addMappableChildrenToVector(java.util.Enumeration children, java.util.Vector v)
|
void |
addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
Defines an additional recognition property that this proxy should utilize. |
boolean |
allowProperty(java.lang.String property)
Returns true if the property is allowed. |
void |
childConstructed(ProxyTestObject child)
Inform the parent when child proxies are constructed so additional recognition properties can be added when needed. |
protected java.lang.Object |
getAddedRecognitionPropertyValue(java.lang.String propertyName)
Returns the value associated with an added recognition property. |
ProxyTestObject[] |
getChildren()
Uses getChildren to implement. |
java.util.Enumeration |
getChildrenEnumeration()
Always returns null because object relationships are not understood at this level of abstaction. |
java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI object in a script. |
java.util.Enumeration |
getImmediateChildren()
Returns an enumeration of proxies for the immediate children of this object. |
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()
Uses getChildren to implement. |
ProxyTestObject |
getMappableParent()
Returns null always because object relationships are not understood at this level of abstaction. |
com.rational.test.ft.value.MethodInfo[] |
getMethods()
Returns an array of MethodInfos |
com.rational.test.ft.sys.MethodSpecification |
getMethodSpecForPoint(java.awt.Point pt)
Returns a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates. |
java.util.Hashtable |
getNonValueProperties()
Returns the properties that are not supported because the value is a reference to another object. |
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 null always because object relationships are not understood at this level of abstaction. |
java.lang.Object |
getParentObject()
Returns null always because object relationships are not understood at this level of abstaction. |
java.util.Hashtable |
getProperties()
Returns a complete set of properties for the associated test object. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Gets the value for a specific property. |
java.util.Hashtable |
getRecognitionProperties()
Returns an enumeration of properties used to uniquely identify the associated test object in the SUT. |
int |
getRecognitionPropertyWeight(java.lang.String propertyName)
Returns an indication of how useful this property is for recognition. |
java.lang.String |
getRole()
Returns a brief type name that describes the role this object plays in the UI. |
java.util.Hashtable |
getStandardProperties()
For Java, the definition for standard properties is the same as getProperties() . |
java.util.Hashtable |
getTestDataTypes()
Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT. |
TestDomainImplementation |
getTestDomain()
Return the TestDomainImplementation that this proxy object is associated
with. |
java.lang.String |
getTestObjectClassName()
The default GUI test object classname is returned. |
ProxyTestObject |
getTopMappableParent()
Returns a proxy object for the top parent of this object. |
ProxyTestObject |
getTopParent()
Returns a proxy object for the top parent of this object. |
java.lang.String |
getUniqueId()
Returns a unique string for the associated object. |
protected ProxyTestObject |
getVisualClippableParent()
Return the clippable parent for the control |
boolean |
hasAddedRecognitionProperties()
Returns true if recocnition properties have been added to this proxy from an external source through the addRecognitionProperty method. |
boolean |
isRecognitionProperty(java.lang.String propName)
This function is overloaded at componentProxy level |
void |
processMouseEvent(IMouseActionInfo action)
At this level of the Java proxy abstraction, this method is null. |
void |
setIndexer(java.lang.String name, java.lang.Object[] indexes, java.lang.Object val)
Sets the value of an indexed property |
void |
setProperty(java.lang.String propertyName, java.lang.Object value)
Sets the value for a specific property. |
boolean |
shouldBeMapped()
Returns false; by default only GUI test objects are mapped. |
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 |
Field Detail |
---|
protected static com.rational.test.ft.util.FtDebug debug
protected transient java.lang.String uniqueId
Constructor Detail |
---|
public JavaProxy(java.lang.Object theObjectInTheSUT)
Method Detail |
---|
public java.lang.String getTestObjectClassName()
getTestObjectClassName
in interface IProxyBase
getTestObjectClassName
in class ProxyTestObject
public final TestDomainImplementation getTestDomain()
TestDomainImplementation
that this proxy object is associated
with. This method should not be overriden.
getTestDomain
in interface IProxyBase
getTestDomain
in class ProxyTestObject
TestDomainImplementation
.public java.lang.String getDescriptiveName()
getDescriptiveName
in class ProxyTestObject
public java.lang.String getUniqueId()
getUniqueId
in class ProxyTestObject
public java.lang.String getRole()
ProxyTestObject
java.awt.Button
might return button.
There are suggested role constants in the TestObjectRole
class. However, proxies are not limited to these constants.
The role is used for several purposes by the test infrastructure. First, the role can be used in the construction of object names in scripts, augmenting the name returned by getDescriptiveName()
.
The role is also used in the UI to decorate nodes in the map with icons that help users quickly associate the nodes with the roles they play in the system under test.
getRole
in class ProxyTestObject
public boolean shouldBeMapped()
shouldBeMapped
in class ProxyTestObject
public ProxyTestObject getParent()
getParent
in class ProxyTestObject
public java.lang.Object getParentObject()
public void childConstructed(ProxyTestObject child)
child
- The child proxy that was just constructed.public ProxyTestObject getMappableParent()
getMappableParent
in class ProxyTestObject
public ProxyTestObject getTopParent()
getTopParent
in class ProxyTestObject
public ProxyTestObject getTopMappableParent()
getTopMappableParent
in class ProxyTestObject
public java.util.Enumeration getChildrenEnumeration()
public java.util.Enumeration getImmediateChildren()
public ProxyTestObject[] getChildren()
getChildren
to implement.
getChildren
in class ProxyTestObject
public ProxyTestObject[] getMappableChildren()
getChildren
to implement.
getMappableChildren
in class ProxyTestObject
protected void addMappableChildrenToVector(java.util.Enumeration children, java.util.Vector v)
public ProxyTestObject getOwner()
getOwner
in class ProxyTestObject
public ProxyTestObject[] getOwnedObjects()
getOwnedObjects
in class ProxyTestObject
public void processMouseEvent(IMouseActionInfo action)
JavaGuiProxy
level support.
processMouseEvent
in class ProxyTestObject
action
- The event cache and other mouse state information
for this mouse action.IMouseActionInfo
,
MethodSpecification
public com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
IGraphical.getScreenPoint
is returned. However, if a proxy can fin
getMethodSpecForPoint
in class ProxyTestObject
action
- The event cache and other mouse state information
for this mouse action.MethodSpecification
public java.util.Hashtable getRecognitionProperties()
getRecognitionProperties
in class ProxyTestObject
ProxyTestObject.getRecognitionPropertyWeight(String)
,
ProxyTestObject.getProperty(String)
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public boolean isRecognitionProperty(java.lang.String propName)
propName
-
public int getRecognitionPropertyWeight(java.lang.String propertyName)
getRecognitionPropertyWeight
in class ProxyTestObject
propertyName
- The name of the recognition property to
return a weight value for.ProxyTestObject.getRecognitionProperties()
public void addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
getRecognitionProperties
method.
addRecognitionProperty
in class ProxyTestObject
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 should be returned when the getRecognitionPropertyWeight
method is called.getRecognitionProperties()
,
getRecognitionPropertyWeight(String)
,
getProperty(String)
protected java.lang.Object getAddedRecognitionPropertyValue(java.lang.String propertyName)
added
recognition property.
This method exists for quick lookup of recognition properties
added to this proxy's recognition property set.
propertyName
- The name of the added recognition property to look for.
null
if the property does not exist.public boolean hasAddedRecognitionProperties()
addRecognitionProperty
method.
hasAddedRecognitionProperties
in class ProxyTestObject
addRecognitionProperty
method.addRecognitionProperty(String,Object,int)
public java.util.Hashtable getProperties()
ProxyTestObject
This method does not return properties whose values are references to objects. The method ProxyTestObject.getNonValueProperties()
returns information about such properties.
getProperties
in class ProxyTestObject
ProxyTestObject.getProperty(String)
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getNonValueProperties()
public java.util.Hashtable getStandardProperties()
getProperties()
.
getStandardProperties
in class ProxyTestObject
getProperties()
public java.util.Hashtable getNonValueProperties()
ProxyTestObject
getProperty()
.
If such a property is returned to the test script, it is manifested as a TestObject containing a reference to the object in the SUT. The test script should call the TestObject method unregister() to release the object.
When an object is unregistered, the release() method that all ProxyTestObjects inherit from RegisteredObject is called.
getNonValueProperties
in class ProxyTestObject
ProxyTestObject.getProperties()
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getProperty(String)
,
ProxyTestObject.setProperty(String,Object)
public boolean allowProperty(java.lang.String property)
IPropertyFilter
true
if the property is allowed.
allowProperty
in interface IPropertyFilter
true
if the property is allowed.public com.rational.test.ft.value.MethodInfo[] getMethods()
getMethods
in class ProxyTestObject
ProxyTestObject.getProperties()
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getNonValueProperties()
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in class ProxyTestObject
propertyName
- The name of the property to fetch.
ProxyTestObject.getProperties()
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getRecognitionProperties()
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public void setProperty(java.lang.String propertyName, java.lang.Object value)
setProperty
in class ProxyTestObject
propertyName
- The name of the property to redefine. This name is the same as that returned by
getProperties()
.ProxyTestObject.getProperties()
,
ProxyTestObject.getProperty(String)
public java.lang.Object getIndexer(java.lang.String name, java.lang.Object[] indexes)
getIndexer
in class ProxyTestObject
name
- the name of the indexerindexes
- the indexes to get the value ofpublic com.rational.test.ft.value.IndexerInfo[] getIndexers()
TestObject's
indexed properties
getIndexers
in class ProxyTestObject
IndexerInfo
public void setIndexer(java.lang.String name, java.lang.Object[] indexes, java.lang.Object val)
setIndexer
in class ProxyTestObject
name
- the name of the indexerindexes
- the indexes to set the value ofpublic java.util.Hashtable getTestDataTypes()
getTestDataTypes
in class ProxyTestObject
ProxyTestObject.getTestData(String)
,
ITestData
protected ProxyTestObject getVisualClippableParent()
getVisualClippableParent
in class ProxyTestObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |