com.dynamide.interpreters
Class BshInterpreter

java.lang.Object
  extended by com.dynamide.DynamideObject
      extended by com.dynamide.interpreters.BshInterpreter
All Implemented Interfaces:
IInterpreter, IGet

public class BshInterpreter
extends DynamideObject
implements IInterpreter


Field Summary
 
Fields inherited from class com.dynamide.DynamideObject
m_id
 
Constructor Summary
BshInterpreter()
           
BshInterpreter(DynamideObject owner)
           
 
Method Summary
 void close()
           
 java.lang.String emptyOutputBuffer()
           
 java.lang.Object eval(java.lang.String source)
          Evaluate any string in the beanshell interpreter, the only variable in the context already is a pointer to this session, in a variable called "session".
 void finalize()
           
 ScriptEvent fireEvent(ScriptEvent event, java.lang.String procName, ScriptEventSource eventSource, boolean sourceOnly)
           
static java.lang.String formatError(java.lang.Exception e, boolean html, java.lang.String source, ScriptEvent event)
           
 java.lang.String getOutputBuffer()
           
 Session getSession()
           
 java.lang.String getVersion()
           
static void main(java.lang.String[] args)
           
 void setSession(Session session)
           
 void setVariable(java.lang.String name, java.lang.Object value)
           
 void unsetVariable(java.lang.String name)
           
static void usage()
           
 
Methods inherited from class com.dynamide.DynamideObject
clearProfiler, dump, dump, dumpHTML, expand, findParentExpander, findParentPage, findParentSession, findTopParentPage, get, getCategoryID, getDotName, getID, getNextGetter, getObjectID, getOwner, getProfiler, isDebugEnabled, isInfoEnabled, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logWarn, logWarn, logWarn, logWarn, popLogContext, printf, printProfiler, profileEnter, profileLeave, pushLogContext, setDotName, setID, setNextGetter, setObjectID, setOwner, sprintf, useProfiler, walkParents
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BshInterpreter

public BshInterpreter()

BshInterpreter

public BshInterpreter(DynamideObject owner)
Method Detail

close

public void close()
           throws java.lang.Throwable
Specified by:
close in interface IInterpreter
Throws:
java.lang.Throwable

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class DynamideObject
Throws:
java.lang.Throwable

getSession

public Session getSession()
Specified by:
getSession in interface IInterpreter

setSession

public void setSession(Session session)
Specified by:
setSession in interface IInterpreter

eval

public java.lang.Object eval(java.lang.String source)
                      throws java.lang.Exception
Evaluate any string in the beanshell interpreter, the only variable in the context already is a pointer to this session, in a variable called "session". However, the session variable gives you the keys to the kingdom. See also DynamideObject.expand(String) which is used to expand expressions in the Webmacro interpreter.

Specified by:
eval in interface IInterpreter
Throws:
java.lang.Exception

fireEvent

public ScriptEvent fireEvent(ScriptEvent event,
                             java.lang.String procName,
                             ScriptEventSource eventSource,
                             boolean sourceOnly)
Specified by:
fireEvent in interface IInterpreter

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface IInterpreter

getOutputBuffer

public java.lang.String getOutputBuffer()
Specified by:
getOutputBuffer in interface IInterpreter

emptyOutputBuffer

public java.lang.String emptyOutputBuffer()
Specified by:
emptyOutputBuffer in interface IInterpreter

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
Specified by:
setVariable in interface IInterpreter

unsetVariable

public void unsetVariable(java.lang.String name)
Specified by:
unsetVariable in interface IInterpreter

usage

public static void usage()

formatError

public static java.lang.String formatError(java.lang.Exception e,
                                           boolean html,
                                           java.lang.String source,
                                           ScriptEvent event)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2001-2013 DYNAMIDE.COM. All Rights Reserved.