public interface IScriptDefinition extends IScript
This definition is used to generate the ScriptHelper
class
consistently across multiple recordings to the same script. Note that
the ScriptHelper
class is completely regenerated every time the
script is modified by recording into it. This class represents the
data necessary for generating the ScriptHelper
class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_ARGUMENTS |
static java.lang.String |
RATIONAL_TEST_SCRIPT |
Modifier and Type | Method and Description |
---|---|
void |
addTestObjectName(java.lang.String testObjectName,
java.lang.String mapId,
java.lang.String role)
Adds a new
TestObject name to the map-ID association to the script
definition. |
java.lang.String |
getAuxiliaryDataBaseFileName(java.lang.String vpName)
Returns the base name that should be used to construct an
auxiliary data file.
|
java.util.Enumeration |
getAuxiliaryDataFileNames()
Returns an enumerator for the auxiliary data-file names associated with
a script.
|
java.lang.String |
getDatapoolIteratorClassName()
Returns the name of the datapool iterator associated with the script.
|
java.lang.String |
getDatapoolName()
Returns the name of the datapool associated with the script.
|
java.lang.String |
getDatastore()
This method returns the datastore of the script definition
|
java.lang.String |
getHelperSuperClass()
Returns the class that the helper class extends when generated.
|
java.io.File |
getImageFile(java.lang.String vpName)
Returns the Image file verification point (VP) file corrsponding to VP.
|
java.lang.String |
getMapId(java.lang.String testObjectName)
Returns the map ID for the specified value name.
|
java.lang.String |
getMapName()
Returns the name of the object map associated with the script.
|
java.lang.String |
getRole(java.lang.String testObjectName)
Returns the role associated with a
TestObject . |
java.io.File |
getScriptDefinitionFile()
This method processes the script name into an apporpriate datastore
relative file name for a script definition file.
|
java.lang.String |
getTestObjectName(IMappedTestObject mappedTestObject)
Returns the script-relative unique name for the specified mapped
TestObject . |
java.lang.String |
getTestObjectName(IMappedTestObject mappedTestObject,
java.lang.Object mon)
Returns the script-relative unique name for the specified mapped
TestObject . |
java.lang.String |
getTestObjectName(java.lang.String mapId)
Returns the script-relative unique name for the specified object
map ID.
|
java.lang.String |
getTestObjectNameBase(IMappedTestObject mappedTestObject,
java.lang.Object monitor)
Returns the base name used by
getTestObjectName to generate a script-relative unique name. |
java.lang.String |
getTestObjectNameFromDescriptiveName(IMappedTestObject mappedTestObject,
java.lang.String descriptiveName)
Returns the script-relative unique name for the specified mapped
TestObject . |
java.util.Enumeration |
getTestObjectNames()
Returns an enumerator for the
TestObject names associated with
a script. |
java.lang.String |
getVpBaseFileName()
Returns the base name that should be used to construct a
verification point (VP) file.
|
java.lang.String |
getVpFileName(java.lang.String vpName)
Returns a file name for the named verification point.
|
java.util.Enumeration |
getVpNames()
Returns an enumerator for the verification point names associated with
a script.
|
boolean |
hasAuxiliaryDataName(java.lang.String vpName,
java.lang.String auxDataName)
Returns
true if the supplied name is a known
auxiliary data name. |
boolean |
hasTestObjectName(java.lang.String testObjectName)
Returns
true if the specified TestObject name is
used by this script. |
boolean |
hasVpName(java.lang.String vpName)
Returns
true if the supplied name is a known verification point
name. |
boolean |
isDeletedFromMap(java.lang.String testObjectName)
Returns the deletion flag associated with a
TestObject . |
boolean |
isPrivateMap()
Returns
true if the object map associated with the script is private. |
void |
removeAuxiliaryDataName(java.lang.String vpName,
java.lang.String auxDataName)
Removes the specified name from the list of auxiliary data
names associated with this script.
|
void |
removeTestObjectName(java.lang.String testObjectName)
Removes a
TestObject name from the script definition. |
void |
removeVpName(java.lang.String vpName)
Removes the specified name from the list of verification point (VP)
names associated with this script.
|
void |
renameTestObject(java.lang.String currentTestObjectName,
java.lang.String newTestObjectName)
Replaces the script-relative
TestObject name with a new supplied name. |
void |
setDatapoolIteratorClassName(java.lang.String datapoolIteratorClassName)
Defines the datapool iterator class name for the script.
|
void |
setDatapoolName(java.lang.String datapoolName)
Defines the datapool name for the script.
|
void |
setDeletedFromMap(java.lang.String testObjectName,
boolean deleted)
Sets the deletion flag associated with a
TestObject . |
void |
setHelperSuperClass(java.lang.String helperSuperClass)
Defines the class that the helper class extends when generated.
|
void |
setMapName(java.lang.String mapName)
Defines the datastore-relative object-map file name.
|
getComponentModel, getLanguage, getModelFile, getProperty, getScriptAssets, getScriptAssets, getScriptFile, getScriptHelperFile, getScriptName, removeScriptAssets, setDatastore, setLanguage, setProperty, setScriptName
static final java.lang.String RATIONAL_TEST_SCRIPT
static final java.lang.String DEFAULT_ARGUMENTS
java.lang.String getMapName()
rftxmap
file suffix) or shared by other scripts
(rftmap
file suffix).setMapName(String)
,
isPrivateMap()
void setMapName(java.lang.String mapName)
rftxmap
file suffix)
or shared by other scripts (rftmap
file suffix).mapName
- the name of the object map associated with the scriptgetMapName()
,
isPrivateMap()
boolean isPrivateMap()
true
if the object map associated with the script is private.setMapName(String)
,
getMapName()
java.lang.String getDatapoolName()
setDatapoolName(String)
void setDatapoolName(java.lang.String datapoolName)
datapoolName
- The datastore-relative datapool file name to be
associated with a script.getDatapoolName()
java.lang.String getDatapoolIteratorClassName()
setDatapoolIteratorClassName(String)
void setDatapoolIteratorClassName(java.lang.String datapoolIteratorClassName)
datapoolIteratorClassName
- The full class datapool iterator class name to be
associated with a script.getDatapoolIteratorClassName()
java.lang.String getHelperSuperClass()
null
, which implies that the helper class should directly
extend the RationalTestScript
class.setHelperSuperClass(String)
void setHelperSuperClass(java.lang.String helperSuperClass)
null
, which implies that the helper class should directly
extend the RationalTestScript
class. The supplied class name should be a full class name that includes the complete
package specification for the supplied class.helperSuperClass
- the class that the helper class extendsgetHelperSuperClass()
void addTestObjectName(java.lang.String testObjectName, java.lang.String mapId, java.lang.String role)
TestObject
name to the map-ID association to the script
definition. If the TestObject
name is already known, the existing
value is overwritten.testObjectName
- the script-relative unique name associated with a
node in the associated object mapmapId
- the object map identifier for the desired TestObject
namerole
- the TestObject
role (use for improved display in the IDE)removeTestObjectName(String)
,
getMapId(String)
,
getTestObjectName(String)
void removeTestObjectName(java.lang.String testObjectName)
TestObject
name from the script definition. If the
TestObject
name is not known, this method returns normally.testObjectName
- the script-relative unique name associated with a
node in the associated object mapaddTestObjectName(String,String,String)
,
getMapId(String)
,
getTestObjectName(String)
,
renameTestObject(String,String)
void renameTestObject(java.lang.String currentTestObjectName, java.lang.String newTestObjectName)
TestObject
name with a new supplied name.
If the new name is already in the script-definition name list, a
BadArgumentException
is thrown. The script file itself is not updated by this action.
Any verification-point files or other non-script file assets affected by this change are updated.testObjectName
- the script-relative unique name associated with a
node in the associated object mapaddTestObjectName(String,String,String)
,
getMapId(String)
,
getTestObjectName(String)
,
removeTestObjectName(String)
boolean hasTestObjectName(java.lang.String testObjectName)
true
if the specified TestObject
name is
used by this script. Calling this method is the same as calling
getMapId()
and checking for a returned negative value.testObjectName
- the script-relative unique name being locatedgetMapId(String)
java.lang.String getMapId(java.lang.String testObjectName)
TestObject
in the
persistent map. The map ID is relative to the local map until merged
into a shared map; then the ID is relative to the shared map. A negative
return value implies that the name is not used by this script.testObjectName
- the script-relative unique name associated with a
node in the associated object mapgetTestObjectName(String)
java.lang.String getRole(java.lang.String testObjectName)
TestObject
. This feature exists to improve the
display of TestObjects
in the IDE. Note that this value may be null
if the role is unknown or not set.testObjectName
- the script-relative unique name associated with a
node in the associated object mapTestObject
getTestObjectName(String)
boolean isDeletedFromMap(java.lang.String testObjectName)
TestObject
. This feature exists to improve the
display of deleted TestObjects
in the IDE. Note that by default this flag is
false
and is only set when the TestObject
is noticed to be deleted.testObjectName
- the script-relative unique name associated with a
node in the associated object mapgetTestObjectName(String)
void setDeletedFromMap(java.lang.String testObjectName, boolean deleted)
TestObject
. This exists to improve the
display of deleted TestObjects
in the IDE. Note that by default this flag is
false
and is only set when the TestObject
is noticed to be deleted.testObjectName
- the script-relative unique name associated with a
node in the associated object mapdeleted
- a flag that indicates that the object has been deleted
from the associated object mapisDeletedFromMap(String)
java.lang.String getTestObjectName(java.lang.String mapId)
null
value
is returned if the supplied map ID is not associated with this script.mapId
- the object-map identifier for the desired TestObject
namegetMapId(String)
java.lang.String getTestObjectName(IMappedTestObject mappedTestObject)
TestObject
. The mapped TestObject
must already have a map ID that is relative
to the local map until merged into a shared map; then the ID is relative to
the shared map. An appropriate exception is thrown if the supplied TestObject
does not have a corresponding map ID. If the supplied object is not known to
this script definition, it is added and an appropriate name generated.mappedTestObject
- the mapped TestObject
for which to retrieve the namegetMapId(String)
,
getTestObjectName(String)
java.lang.String getTestObjectName(IMappedTestObject mappedTestObject, java.lang.Object mon)
TestObject
. The mapped TestObject
must already have a map ID that is relative
to the local map until merged into a shared map; then the ID is relative to
the shared map. An appropriate exception is thrown if the supplied TestObject
does not have a corresponding map ID. If the supplied object is not known to
this script definition, it is added and an appropriate name generated.mappedTestObject
- the mapped TestObject
for which to retrieve the namemon
- The monitor for use during recording.getMapId(String)
,
getTestObjectName(String)
java.lang.String getTestObjectNameFromDescriptiveName(IMappedTestObject mappedTestObject, java.lang.String descriptiveName)
TestObject
. The mapped TestObject
must already have a map ID that is relative
to the local map until merged into a shared map; then the ID is relative to
the shared map. An appropriate exception is thrown if the supplied TestObject
does not have a corresponding map ID. If the supplied object is not known to
this script definition, it is added and an appropriate name generated.mappedTestObject
- the mapped TestObject
for which to retrieve the namedescriptiveName
- java.lang.String getTestObjectNameBase(IMappedTestObject mappedTestObject, java.lang.Object monitor)
getTestObjectName
to generate a script-relative unique name. This base name is also used
during recording to display a monitor image of the actions being performed before the
TestObject
is merged into the object map.mappedTestObject
- the mapped TestObject
for which to retrieve the namegetTestObjectName(IMappedTestObject)
java.util.Enumeration getTestObjectNames()
TestObject
names associated with
a script. Each object returned by the enumerator is a java.lang.String
value known to be unique relative to a script.addTestObjectName(String,String,String)
,
getMapId(String)
,
hasTestObjectName(String)
java.lang.String getVpBaseFileName()
java.io.File getImageFile(java.lang.String vpName)
vpName
- the script-relative unique name of a verification pointvoid removeVpName(java.lang.String vpName)
vpName
- the script-relative unique name of a verification pointboolean hasVpName(java.lang.String vpName)
true
if the supplied name is a known verification point
name.vpName
- the script-relative unique name of a verification pointjava.util.Enumeration getVpNames()
java.lang.String
value known to be unique relative to a script.java.lang.String getVpFileName(java.lang.String vpName)
vpName
- the script-relative unique name of a verification pointjava.lang.String getAuxiliaryDataBaseFileName(java.lang.String vpName)
Verification data may be fully encapsulated in a single VP file. If not,
verification point data may have additional data files. The data format used
in external data files is determined by the ITestData
implementation and is not directly managed by the verification point or script
infrastructure. However, the file itself needs to be managed by the script
information infrastructure if it is to be properly copied, CM controlled, and
eventually deleted.
vpName
- the script-relative unique name of a verification pointvoid removeAuxiliaryDataName(java.lang.String vpName, java.lang.String auxDataName)
vpName
- the verification-point name that the auxiliary data is associated
withauxDataName
- the script-relative unique auxiliary data name.getAuxiliaryDataBaseFileName(String vpName)
boolean hasAuxiliaryDataName(java.lang.String vpName, java.lang.String auxDataName)
true
if the supplied name is a known
auxiliary data name.vpName
- the verification point name that the auxiliary data is associated
withauxDataName
- the script-relative unique auxiliary data namegetAuxiliaryDataBaseFileName(String vpName)
java.util.Enumeration getAuxiliaryDataFileNames()
hasAuxiliaryDataName(String,String)
,
getAuxiliaryDataBaseFileName(String vpName)
java.io.File getScriptDefinitionFile()
java.lang.String getDatastore()