org.safs
Class TestRecordHelper

java.lang.Object
  extended by org.safs.TestRecordData
      extended by org.safs.TestRecordHelper
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ATestRecordHelper, DCTestRecordHelper, JREXTestRecordData, RTestRecordData, STAFProcessContainerHelper, STestRecordHelper

public class TestRecordHelper
extends TestRecordData


Purpose:TestRecordHelper: helper class which can populate data in TestRecordData It can be populated from a STAF Variables pool.

Since:
MAY 30, 2003
MAY 30, 2003 (DBauman) Original Release
NOV 15, 2005 (bolawl) Added support for new TRD statusinfo field (RJL).
See Also:
Serialized Form

Field Summary
protected  STAFRequester requester
           
 
Fields inherited from class org.safs.TestRecordData
possibleSeparator
 
Constructor Summary
TestRecordHelper()
          
Purpose: no-arg constructor to make this fully qualified javabean
 
Method Summary
 java.lang.String getCompInstancePath()
          A method to return a default class package prefix used by some processors.
 DDGUIUtilities getDDGUtils()
           
protected  STAFHelper getStaf()
           
 STAFHelper getSTAFHelper()
           
 void populateDataFromVar()
          
Purpose: populate data from the VAR pool using STAF, basically grabs the following fields in a TestRecordData instance from the VAR of STAF:
- inputRecord
- filename
- lineNumber
- separator
- testLevel
- appMapName
- fac
- statusCode
- statusInfo

Side Effects:
State Read:
Assumptions: none
 void sendbackResponse()
          
Purpose: sendback response, the statusCode is sent back in the VAR: getInstanceName() + "statuscode"
Assumptions: none
 void setDDGUtils(DDGUIUtilities ddgutils)
           
 void setSTAFHelper(STAFHelper helper)
           
 
Methods inherited from class org.safs.TestRecordData
copyData, getAltCompType, getAppMapName, getCommand, getCompClass, getCompGuiId, getCompModule, getCompName, getCompType, getEnvironment, getFac, getFileID, getFilename, getInputRecord, getInputRecordToken, getInstanceName, getLineNumber, getNotSeparatorString, getRecordType, getSeparator, getStatusCode, getStatusInfo, getTestLevel, getTrimmedUnquotedInputRecordToken, getWindowGuiId, getWindowName, inputRecordSize, reinit, setAltCompType, setAppMapName, setCommand, setCompClass, setCompGuiId, setCompModule, setCompName, setCompType, setEnvironment, setFac, setFileID, setFilename, setInputRecord, setInstanceName, setLineNumber, setRecordType, setSeparator, setShutdownData, setStatusCode, setStatusInfo, setTestLevel, setWindowGuiId, setWindowName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requester

protected STAFRequester requester
Constructor Detail

TestRecordHelper

public TestRecordHelper()

Purpose: no-arg constructor to make this fully qualified javabean

Method Detail

getSTAFHelper

public STAFHelper getSTAFHelper()

getStaf

protected STAFHelper getStaf()

setSTAFHelper

public void setSTAFHelper(STAFHelper helper)

getDDGUtils

public DDGUIUtilities getDDGUtils()

setDDGUtils

public void setDDGUtils(DDGUIUtilities ddgutils)

populateDataFromVar

public void populateDataFromVar()
                         throws SAFSException

Purpose: populate data from the VAR pool using STAF, basically grabs the following fields in a TestRecordData instance from the VAR of STAF:
- inputRecord
- filename
- lineNumber
- separator
- testLevel
- appMapName
- fac
- statusCode
- statusInfo

Side Effects:
State Read:
Assumptions: none

Parameters:
helper, - STAFHelper
old, - TestRecordData, if null then a new instance is returned.
Throws:
SAFSException, - if not ok (since it used the method getVariable)
SAFSException

sendbackResponse

public void sendbackResponse()
                      throws SAFSException

Purpose: sendback response, the statusCode is sent back in the VAR: getInstanceName() + "statuscode"
Assumptions: none

Parameters:
helper, - STAFHelper
data, - TestRecordData
Throws:
SAFSException, - if STAF has a problem
SAFSException

getCompInstancePath

public java.lang.String getCompInstancePath()
A method to return a default class package prefix used by some processors. This allows subclassing engines to create a subclass of TestRecordHelper and provide a single package designation used to dynamically instance tool-specific processors.

For example, RTestRecordData used by Rational RobotJ returns "org.safs.rational." This enables default processors to location the following processors:

org.safs.rational.DCDriverCommand
org.safs.rational.custom.DCDriverCommand
org.safs.rational.CF[componentType] classes
org.safs.rational.CFComponent
org.safs.rational.custom.CF[componentType]

This requires that the subclassing implementations stick to this strict class naming convention.

The org.safs.Processor class now allows users to specify any package and or classname for use in dynamically locating classes at runtime. This means that subclasses like DriverCommandProcessor and TestStepProcessor can be given alternative package or class names to search for.

This method is no longer required, though it will be queried first to maintain compatibility with processors using this feature.