com.altair.hwm.toolkit.utils
Class HWMJavaScript

java.lang.Object
  extended by com.altair.hwm.toolkit.utils.HWMJavaScript

public class HWMJavaScript
extends java.lang.Object

Title: HWMJavaScript

Description: Class that helps in executing a Java script

Company: Altair Engineering, Inc.


Constructor Summary
HWMJavaScript()
          Concstructor.
HWMJavaScript(java.lang.Object objScope)
          Concstructor.
 
Method Summary
 java.lang.Object ExecuteScript(java.lang.Object objScope, java.lang.String strJavaScript)
          Execute the java scripts and return the result
 java.lang.Object ExecuteScript(java.lang.String strJavaScript)
          Execute the java scripts and return the result
 java.lang.Object GetContext(java.lang.String szContKey)
          Retrieves a context value.
 void PutContext(java.lang.String szContKey, java.lang.Object objContValue)
          Stores a javascript scope contect object value.
 java.lang.Object RemoveContext(java.lang.String szContKey)
          Removes a context value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMJavaScript

public HWMJavaScript(java.lang.Object objScope)
Concstructor. Takes the Object scope to evaluate Tcl scripts as


HWMJavaScript

public HWMJavaScript()
Concstructor.

Method Detail

PutContext

public void PutContext(java.lang.String szContKey,
                       java.lang.Object objContValue)
Stores a javascript scope contect object value.

Parameters:
szPrefKey - The key to store the preference under
objPrefValue - The value of the preference

GetContext

public java.lang.Object GetContext(java.lang.String szContKey)
Retrieves a context value. Will return null if value not set.

Parameters:
szContKey - The key of the context
Returns:
Object The context value

RemoveContext

public java.lang.Object RemoveContext(java.lang.String szContKey)
Removes a context value

Parameters:
objContKey - The key of the value to remove
Returns:
Object The object the was removed

ExecuteScript

public java.lang.Object ExecuteScript(java.lang.Object objScope,
                                      java.lang.String strJavaScript)
                               throws java.lang.Exception
Execute the java scripts and return the result

Parameters:
The - current scope
The - script to execute
Returns:
The return object
Throws:
java.lang.Exception

ExecuteScript

public java.lang.Object ExecuteScript(java.lang.String strJavaScript)
                               throws java.lang.Exception
Execute the java scripts and return the result

Parameters:
The - script to execute
Returns:
The return object
Throws:
java.lang.Exception