Services Builder for Screens

com.attachmate.sc.ssa
Interface ITaskData


public interface ITaskData

This interface describes the interaction between a custom step and task variables. Both simple string data and table data is supported by the interface.


Method Summary
 ITable createTable(java.lang.String[] columnNames)
          Returns a new instance of ITable that can be used to populate tabular data for a task output.
 java.lang.String get(java.lang.String varName)
          Retrieves the String data from the variable map using the supplied key.
 ITable getTable(java.lang.String tableName)
          Retrieves an ITable instance from the variable map so it can be further manipulated or queried.
 java.lang.String put(java.lang.String varName, java.lang.String data)
          Stores the supplied String data to the task variable named.
 ITable putTable(java.lang.String tableName, ITable table)
          Stores the ITable instance in the variable map with the key being the tableName parameter.
 java.lang.String remove(java.lang.String varName)
          Remove the String data from the variable map using the supplied variable name.
 ITable removeTable(java.lang.String tableName)
          Removes an ITable instance from the variable map
 

Method Detail

put

public java.lang.String put(java.lang.String varName,
                            java.lang.String data)
Stores the supplied String data to the task variable named.

Parameters:
varName - name of the key to store the data
data - the String data to store in the variable map.
Returns:
the String data previously stored in the variable, otherwise null if no data was mapped.
Throws:
java.lang.NullPointerException - if the varName parameter is null
java.lang.IllegalArgumentException - if the varName parameter matches a key in the variable map used for an ITable instance.

get

public java.lang.String get(java.lang.String varName)
Retrieves the String data from the variable map using the supplied key.

Parameters:
varName - The name of the variable to be returned
Returns:
String data from the map or null if the variable doesn't exisit.
Throws:
java.lang.NullPointerException - if the varName parameter is null
java.lang.IllegalArgumentException - if the varName parameter matches a key in the variable map used for an ITable instance.

remove

public java.lang.String remove(java.lang.String varName)
Remove the String data from the variable map using the supplied variable name.

Parameters:
varName - the name of the variable to remove from the map
Returns:
previous value associated with specified variable name or null if there was no mapping for key. A null return can also indicate that the task data previously associated null with the specified varName, if the implementation supports null values.
Throws:
java.lang.NullPointerException - if varName is null.
java.lang.IllegalArgumentException - if the varName parameter matches a key in the variable map used for an ITable instance.

createTable

public ITable createTable(java.lang.String[] columnNames)
Returns a new instance of ITable that can be used to populate tabular data for a task output.

Parameters:
columnNames - A String array containing the name of the columns. These column names must match the column names specified in the designer in order for this data to be available in the task output. The order of the columns is significant because as rows are added to the table the column order will be assumed as the order specified in this parameter.
Returns:
A new instance of ITable
Throws:
java.lang.NullPointerException - if the columnNames parameters is null
java.lang.IllegalArgumentException - if the columnNames parameter is empty
See Also:
ITable.addRow(java.lang.String[])

getTable

public ITable getTable(java.lang.String tableName)
Retrieves an ITable instance from the variable map so it can be further manipulated or queried. The intention of this method is to facilitate the ability to alter a table data structure that was added to the variable map in a previous task step as the methods provided for populating tabular data will not work on tables in the variable map directly. Any changes to the ITable instance will not be committed to the variable map if the putTable method is not called.

Parameters:
tableName - The name of the ITable instance to be retrieved from the variable map
Returns:
The instance of ITable that was found in the variable map with the given name, or null if not found.
Throws:
java.lang.NullPointerException - if the tableName Parameter is null
java.lang.IllegalArgumentException - if the tableName parameter matches a key in the variable map used for String data.
See Also:
putTable(java.lang.String, com.attachmate.sc.ssa.ITable)

putTable

public ITable putTable(java.lang.String tableName,
                       ITable table)
Stores the ITable instance in the variable map with the key being the tableName parameter.

Parameters:
tableName - The name of the table to be added to the variable map. In order for this table data to be available as a task output the tableName parameter must exactly match that name of a task output specified in the designer.
table - The ITable instance to be put in the variable map.
Returns:
The ITable instance that was previously stored in the variable map with the given tableName, or null if one was not found
Throws:
java.lang.NullPointerException - if either the tableName or table parameters are null
java.lang.IllegalArgumentException - if the tableName parameter matches a key in the variable map used for String data.
See Also:
getTable(java.lang.String)

removeTable

public ITable removeTable(java.lang.String tableName)
Removes an ITable instance from the variable map

Parameters:
tableName - The name of the ITableReturns:
The ITable instance that was removed from the variable map or null if not found
Throws:
java.lang.NullPointerException - if the tableName parameter is null
java.lang.IllegalArgumentException - if the tableName parameter matches a key in the variable map used for String data.
See Also:
putTable(java.lang.String, com.attachmate.sc.ssa.ITable)

Services Builder for Screens