Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.httpunit.scripting
Class ScriptableDelegate  view ScriptableDelegate download ScriptableDelegate.java

java.lang.Object
  extended bycom.meterware.httpunit.scripting.ScriptableDelegate

public abstract class ScriptableDelegate
extends java.lang.Object

An interface for objects which will be accessible via scripting.


Field Summary
private  ScriptingEngine _scriptEngine
           
private static ScriptingEngine NULL_SCRIPT_ENGINE
           
 
Constructor Summary
ScriptableDelegate()
           
 
Method Summary
 boolean doEvent(java.lang.String eventScript)
          Executes the specified scripted event.
 java.lang.String evaluateExpression(java.lang.String urlString)
          Evaluates the specified javascript expression, returning its value.
 java.lang.Object get(int index)
          Returns the value of the index property.
 java.lang.Object get(java.lang.String propertyName)
          Returns the value of the named property.
protected  ScriptableDelegate[] getDelegates(com.meterware.httpunit.HTMLElement[] elements)
           
 ScriptingEngine getScriptEngine()
           
 ScriptingEngine getScriptEngine(ScriptableDelegate child)
           
 java.lang.String runScript(java.lang.String language, java.lang.String script)
          Executes the specified script, returning any intended replacement text.
 void set(java.lang.String propertyName, java.lang.Object value)
          Sets the value of the named property.
 void setScriptEngine(ScriptingEngine scriptEngine)
          Specifies the scripting engine to be used.
 boolean supportsScript(java.lang.String language)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_scriptEngine

private ScriptingEngine _scriptEngine

NULL_SCRIPT_ENGINE

private static final ScriptingEngine NULL_SCRIPT_ENGINE
Constructor Detail

ScriptableDelegate

public ScriptableDelegate()
Method Detail

supportsScript

public boolean supportsScript(java.lang.String language)

doEvent

public boolean doEvent(java.lang.String eventScript)
Executes the specified scripted event.


runScript

public java.lang.String runScript(java.lang.String language,
                                  java.lang.String script)
Executes the specified script, returning any intended replacement text.


evaluateExpression

public java.lang.String evaluateExpression(java.lang.String urlString)
Evaluates the specified javascript expression, returning its value.


get

public java.lang.Object get(java.lang.String propertyName)
Returns the value of the named property. Will return null if the property does not exist.


get

public java.lang.Object get(int index)
Returns the value of the index property. Will return null if the property does not exist.


set

public void set(java.lang.String propertyName,
                java.lang.Object value)
Sets the value of the named property. Will throw a runtime exception if the property does not exist or cannot accept the specified value.


setScriptEngine

public void setScriptEngine(ScriptingEngine scriptEngine)
Specifies the scripting engine to be used.


getScriptEngine

public ScriptingEngine getScriptEngine()

getScriptEngine

public ScriptingEngine getScriptEngine(ScriptableDelegate child)

getDelegates

protected ScriptableDelegate[] getDelegates(com.meterware.httpunit.HTMLElement[] elements)