org.jactr.scripting
Class ScopeManager

java.lang.Object
  extended by org.jactr.scripting.ScopeManager

public class ScopeManager
extends java.lang.Object

Maps javascript contexts to a model

Author:
harrison

Method Summary
static void defineVariable(org.mozilla.javascript.Scriptable scope, java.lang.String variableName, java.lang.Object object)
           
static org.mozilla.javascript.Scriptable getPublicScope()
          Gets the publicScope attribute of the ScopeManager class
static org.mozilla.javascript.Scriptable getScopeForModel(IModel m)
          Gets the scopeForModel attribute of the ScopeManager class
static java.lang.Object getVariable(org.mozilla.javascript.Scriptable scope, java.lang.String variableName)
           
static org.mozilla.javascript.Scriptable newScope(org.mozilla.javascript.Scriptable scriptable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPublicScope

public static org.mozilla.javascript.Scriptable getPublicScope()
Gets the publicScope attribute of the ScopeManager class

Returns:
The publicScope value

getScopeForModel

public static org.mozilla.javascript.Scriptable getScopeForModel(IModel m)
Gets the scopeForModel attribute of the ScopeManager class

Parameters:
m - Description of the Parameter
Returns:
The scopeForModel value

newScope

public static org.mozilla.javascript.Scriptable newScope(org.mozilla.javascript.Scriptable scriptable)

defineVariable

public static void defineVariable(org.mozilla.javascript.Scriptable scope,
                                  java.lang.String variableName,
                                  java.lang.Object object)
Parameters:
scope -
variableName -
object -

getVariable

public static java.lang.Object getVariable(org.mozilla.javascript.Scriptable scope,
                                           java.lang.String variableName)