HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.actions
Class ScriptAction

java.lang.Object
  extended by com.ibm.hats.transform.actions.ScriptAction
Direct Known Subclasses:
AllowAlphabeticOnlyAction, AllowDigitsOnlyAction, AllowNumericOnlyAction, AllowSignedNumericOnlyAction, AutoSubmitIfFilledAction, ConvertToUpperCaseAction, SendKeyAction, SetCursorPositionAction, SetFormValue, SubmitFormAction

public abstract class ScriptAction
extends Object

The ScriptAction class is the super class for all classes which are responsible for generating Javascript method calls. It is highly recommended that you use ScriptAction objects to generate calls into the Javascript layer of HSR. This allows your code to continue working if a change is made to the Javascript method signature. The class implementations provided only generate Javascript code - the language parameter has no effect. Please refer to the child classes of this class to find supported javascript hooks.


Field Summary
static String LANG_JAVASCRIPT
           
 
Constructor Summary
ScriptAction()
           
 
Method Summary
static String combineScriptActions(String action1, String action2)
          Combine the two specified scripts into a single script, ie, concatenating with a semicolon.
static String combineScriptActions(String language, String action1, String action2)
          Combine the two specified scripts in the specified language into a single script, ie, concatenating with a semicolon.
 String generateScript(ContextAttributes contextAttributes)
          Produce this script call in the language specified in the context attributes.
 String generateScript(Hashtable contextAttributes)
          Deprecated.  
static String generateScript(List actions, String language, ContextAttributes contextAttributes)
          Produce a set of calls to the specified list of ScriptActionss in a single script.
static String generateScript(List actions, String language, Hashtable contextAttributes)
          Deprecated.  
abstract  String generateScript(String language, ContextAttributes contextAttributes)
          Produce this script call in the specified language using the specified context attributes.
 String generateScript(String language, Hashtable contextAttributes)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANG_JAVASCRIPT

public static final String LANG_JAVASCRIPT
See Also:
Constant Field Values
Constructor Detail

ScriptAction

public ScriptAction()
Method Detail

generateScript

public abstract String generateScript(String language,
                                      ContextAttributes contextAttributes)
Produce this script call in the specified language using the specified context attributes.

Parameters:
language - The language.
contextAttributes - The context attributes.
Returns:
The generated script.

generateScript

public String generateScript(ContextAttributes contextAttributes)
Produce this script call in the language specified in the context attributes.

Parameters:
contextAttributes - The context attributes.
Returns:
The generated script.

combineScriptActions

public static String combineScriptActions(String action1,
                                          String action2)
Combine the two specified scripts into a single script, ie, concatenating with a semicolon.

Parameters:
action1 - The first script action to be combined.
action2 - The second script action to be combined.
Returns:
The combined script actions.

combineScriptActions

public static String combineScriptActions(String language,
                                          String action1,
                                          String action2)
Combine the two specified scripts in the specified language into a single script, ie, concatenating with a semicolon.

Parameters:
language - The language.
action1 - The first script action to be combined.
action2 - The second script action to be combined.
Returns:
The combined script actions.

generateScript

public static String generateScript(List actions,
                                    String language,
                                    ContextAttributes contextAttributes)
Produce a set of calls to the specified list of ScriptActionss in a single script. Uses the specified scripting language and context attributes.

Parameters:
actions - The script actions.
language - The language.
contextAttributes - The context attributes.
Returns:
The generated script action.

generateScript

public static String generateScript(List actions,
                                    String language,
                                    Hashtable contextAttributes)
Deprecated. 

Produce a set of calls to the specified list of ScriptActionss in a single script. Uses the specified scripting language and context attributes.

Parameters:
actions - The script actions.
language - The language.
contextAttributes - The context attributes.
Returns:
The generated script.

generateScript

public String generateScript(Hashtable contextAttributes)
Deprecated. 

Produce this script call in the language specified in the context attributes.

Parameters:
contextAttributes - The context attributes.
Returns:
The generated script.

generateScript

public String generateScript(String language,
                             Hashtable contextAttributes)
Deprecated. 

Produce this script call in the specified language using the specified context attributes.

Parameters:
language - The language.
contextAttributes - The context attributes.
Returns:
The generated script.

HATS 7.5.1 (201005110649)