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

Project Version 2.3

com.rational.test.ft.script
Interface IScript

All Known Subinterfaces:
IScriptDefinition

public interface IScript

Enables access to the fundamental abstract properties of a test script, without getting into implementation details of a script. For example, a script has a persistent form and language that the script adheres to. See also IScriptDefinition interface.

Since:
RFT1.0

Method Summary
 com.rational.test.ft.sys.ComponentModel getComponentModel()
          Retrieves the component model for the script (that is, NET or Java)
 java.lang.String getLanguage()
          Returns the language of the script being generated.
 java.io.File getModelFile()
          Constructs the file object for a script helper based on the script name, language attributes, and supplied project name.
 java.lang.Object getProperty(java.lang.String property)
          Returns a specific property value with the script definition.
 java.lang.String[] getScriptAssets(boolean datastoreRelativeNames)
          Returns the set of file names that are direct assets of this script.
 java.lang.String[] getScriptAssets(boolean datastoreRelativeNames, boolean includeSharedAssets)
          Returns the set of file names that are assets of this script.
 java.io.File getScriptFile()
          Constructs the file object for a script based on the script name, language attributes, and supplied project name.
 java.io.File getScriptHelperFile()
           
 java.lang.String getScriptName()
          Returns the full name of the script to be generated.
 void removeScriptAssets()
          Cleans up the assets associated with a script when the script is overwritten.
 void setDatastore(java.lang.String datastore)
          Allows the default project (datastore) location to be specified for this instance of script definition.
 void setLanguage(java.lang.String language)
          Sets the language of the script being generated.
 void setProperty(java.lang.String property, java.lang.Object value)
          Associates a specific property with the script definition.
 void setScriptName(java.lang.String scriptName)
          Defines the full name of the script.
 

Method Detail

getScriptName

java.lang.String getScriptName()
Returns the full name of the script to be generated. This name is case sensitive and can include an optional package name. The package name is used as an implied directory structure for script persistence.

Since:
RFT1.0
See Also:
setScriptName(String)

setScriptName

void setScriptName(java.lang.String scriptName)
Defines the full name of the script. This name is case sensitive and can include an optional package name. The package name is used as an implied directory structure for script persistence.

Parameters:
scriptName - the full name of the script to be generated
Since:
RFT1.0
See Also:
getScriptName()

getLanguage

java.lang.String getLanguage()
Returns the language of the script being generated.

Since:
RFT1.0
See Also:
setLanguage(String)

setLanguage

void setLanguage(java.lang.String language)
Sets the language of the script being generated.

Parameters:
language - the language of the script
Since:
RFT1.0
See Also:
setLanguage(String)

getComponentModel

com.rational.test.ft.sys.ComponentModel getComponentModel()
Retrieves the component model for the script (that is, NET or Java)

Since:
RFT1.1

setDatastore

void setDatastore(java.lang.String datastore)
Allows the default project (datastore) location to be specified for this instance of script definition. All commands that require a test project use this one. If not specified, the project option is looked up and this value becomes the default.

Parameters:
datastore - The relative filesystem directory that the script file is stored in. The package directory structure is implied in the script name.
Since:
RFT1.0

getScriptFile

java.io.File getScriptFile()
Constructs the file object for a script based on the script name, language attributes, and supplied project name.

Returns:
A file object for the script
Since:
RFT1.0

getModelFile

java.io.File getModelFile()
Constructs the file object for a script helper based on the script name, language attributes, and supplied project name.

Returns:
A file object for the script
Since:
RFT1.0

getScriptHelperFile

java.io.File getScriptHelperFile()

getScriptAssets

java.lang.String[] getScriptAssets(boolean datastoreRelativeNames)
Returns the set of file names that are direct assets of this script. The names are optionally relative to the supplied datastore so that it can be easily reconstructed relative to another storage location.

Parameters:
datastoreRelativeNames - specifies whether the names returned are relative to the datastore or are complete file names, including the datastore location
Since:
RFT1.0
See Also:
getScriptAssets(boolean,boolean)

getScriptAssets

java.lang.String[] getScriptAssets(boolean datastoreRelativeNames,                                    boolean includeSharedAssets)
Returns the set of file names that are assets of this script. The names are optionally relative to the supplied datastore or only the direct assets.

Parameters:
datastoreRelativeNames - specifies whether the names returned are relative to the datastore or are complete file names, including the datastore location
includeSharedAssets - specifies whether shared asets should be included in the set of names returned
Since:
RFT2.0
See Also:
getScriptAssets(boolean)

removeScriptAssets

void removeScriptAssets()
Cleans up the assets associated with a script when the script is overwritten.


getProperty

java.lang.Object getProperty(java.lang.String property)
Returns a specific property value with the script definition.

Parameters:
property - the name of the property
Returns:
The value currently associated with the property. If the value is not set, null is returned.

setProperty

void setProperty(java.lang.String property,                  java.lang.Object value)
Associates a specific property with the script definition. The properties do not affect script execution. However, they may be used to provide the script with interesting, script-specific information.

Parameters:
property - the name of the property
value - the value of the property, which must be a value class.