Class FormCalcScriptHandler

java.lang.Object
com.adobe.xfa.ScriptHandler
com.adobe.xfa.scripthandler.formcalc.FormCalcScriptHandler

public class FormCalcScriptHandler extends ScriptHandler
A class to enable scripting support for the FormCalc language.
  • Constructor Details

    • FormCalcScriptHandler

      public FormCalcScriptHandler(AppModel oAppModel)
      Instantiates a script handler for the FormCalc language.
      Parameters:
      oAppModel - the application AppModel.
    • FormCalcScriptHandler

      public FormCalcScriptHandler(AppModel oAppModel, ScriptDebugger oScriptDebugger)
      Instantiates a script handler for the FormCalc language.
      Parameters:
      oAppModel - the application model.
      oScriptDebugger - the option script debugger.
  • Method Details

    • executeOrSyntaxCheck

      public void executeOrSyntaxCheck(String script, Arg returnCode, 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:
      script - the script to execute.
      returnCode - the return value of the script.
      eReason - the reason for the execution of the script.
      bSyntaxCheckOnly - the flag to only check syntax when set.
    • syntaxCheck

      public void syntaxCheck(String script)
      Description copied from class: ScriptHandler
      Checks the given script for syntax errors. Errors are reported in the form of a scriptException exception (scriptException derives from ExFull).
      Overrides:
      syntaxCheck in class ScriptHandler
      Parameters:
      script - the script to execute.
    • 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.
    • getCancelOrTimeState

      public boolean getCancelOrTimeState()
      Method to check for the Esc Key press to halt the execution. May be we can extend it to set server side time-out for FormCalc execution.
    • setOption

      public void setOption(String sOptionName, String sOptionValue)
      Description copied from class: ScriptHandler
      Sets the value of the given option. If the option is unknown, the call is ignored.
      Overrides:
      setOption in class ScriptHandler
      Parameters:
      sOptionName - the name of the option to set.
      sOptionValue - the value to set.
    • getOption

      public String getOption(String sOptionName)
      Description copied from class: ScriptHandler
      Gets the value of the given option. If the option is unknown, the empty string is returned.
      Overrides:
      getOption in class ScriptHandler
      Parameters:
      sOptionName - the name of the option to get.
      Returns:
      the value of the specified option as a string.
    • clone

      public FormCalcScriptHandler clone()
      Description copied from class: ScriptHandler
      Clones this script handler.
      Specified by:
      clone in class ScriptHandler
      Returns:
      a copy of this script handler.
    • wasFatalError

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

      public boolean debugCommand(int eCmd)
      Description copied from class: ScriptHandler
      Set an internal flag in the script handler indicating that, when control is returned to the script handler, it should perform a step-over, step-into or step-out function (calling the stopped callback on the associated debugger).
      Overrides:
      debugCommand in class ScriptHandler
    • debugBreakPoint

      public boolean debugBreakPoint(int nScriptID, int nLine, int eSetType)
      Description copied from class: ScriptHandler
      Set or clear a break-point.
      Overrides:
      debugBreakPoint in class ScriptHandler
    • debugGetStack

      public boolean debugGetStack(List<String> oStack)
      Description copied from class: ScriptHandler
      Get the current stack frame.
      Overrides:
      debugGetStack in class ScriptHandler
    • debugGetVariables

      public boolean debugGetVariables(List<String> oVarNames, List<Arg> oVarValues)
      Description copied from class: ScriptHandler
      Retrieve parallel lists of variable names and their values (lists have the same size). Note that this will only give meaningful results when stopped at a break-point.
      Overrides:
      debugGetVariables in class ScriptHandler