Class RhinoScriptHandler

java.lang.Object
com.adobe.xfa.ScriptHandler
com.adobe.xfa.scripthandler.rhino.RhinoScriptHandler
All Implemented Interfaces:
ScriptHandlerIF

public class RhinoScriptHandler extends ScriptHandler implements ScriptHandlerIF
A class to enable scripting support for the JavaScript language.
  • Constructor Details

    • RhinoScriptHandler

      public RhinoScriptHandler(AppModel appModel)
      Instantiates a JavaScript script handler.
      Parameters:
      appModel - the application model.
    • RhinoScriptHandler

      public RhinoScriptHandler(AppModel appModel, ScriptDebugger scriptDebugger)
      Instantiates a JavaScript script handler.
      Parameters:
      appModel - an application model.
      scriptDebugger - an script debugger.
    • RhinoScriptHandler

      public RhinoScriptHandler(AppModel appModel, ScriptDebugger scriptDebugger, int javaScriptTimeout)
      Parameters:
      appModel - the application's XFAAppModel.
      scriptDebugger - the application's XFAScriptDebugger-derived class.
      javaScriptTimeout - the maximum amount of time, in milliseconds, a single script is allowed to execute before it gets timed out. A value of '0' means infinite which also is the default.
  • Method Details

    • clone

      public RhinoScriptHandler clone()
      Clones this JavaScript handler.
      Specified by:
      clone in class ScriptHandler
      Returns:
      a copy of this script handler.
    • newLiveObject

      public LiveObject newLiveObject(RhinoScriptHandler handler, Obj xfaObject)
      Description copied from interface: ScriptHandlerIF
      Instantiates a new LiveObject.
      Specified by:
      newLiveObject in interface ScriptHandlerIF
      Parameters:
      handler - a Rhino script handler.
      xfaObject - the XFA object that is peered to this instance.
      Returns:
      the LiveObject.
    • newLiveComponent

      public LiveComponent newLiveComponent(RhinoScriptHandler handler, Obj xfaObject)
      Description copied from interface: ScriptHandlerIF
      Instantiates a new LiveComponent.
      Specified by:
      newLiveComponent in interface ScriptHandlerIF
      Parameters:
      handler - a Rhino script handler.
      xfaObject - the XFA object (app model) associated with the given script handler.
      Returns:
      the LiveComponent.
    • executeOrSyntaxCheck

      public void executeOrSyntaxCheck(String sScript, Arg oReturnCode, int eReason, boolean bSyntaxCheckOnly)
      Description copied from class: ScriptHandler
      Executes or checks the syntax of the given script.
      Specified by:
      executeOrSyntaxCheck in class ScriptHandler
      Parameters:
      sScript - the script to execute.
      oReturnCode - the return value of the script.
      eReason - the reason for the execution of the script.
      bSyntaxCheckOnly - the flag to only check syntax when set.
    • getAppModel

      public AppModel getAppModel()
    • languageName

      public String languageName()
      Description copied from class: ScriptHandler
      Gets the name of the scripting language supported by this script handler.
      Specified by:
      languageName in class ScriptHandler
      Returns:
      the name of the scripting language.
    • throwError

      public void throwError(ExFull oError)
    • wasFatalError

      public boolean wasFatalError()
      Description copied from class: ScriptHandler
      Determines the severity of an error is returned from execute().
      Overrides:
      wasFatalError in class ScriptHandler
    • argToVariant

      public Object argToVariant(Arg arg)
    • variantToArg

      public Arg variantToArg(Object variant)