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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormCalcScriptHandler.FormCalcParser
-
Nested classes/interfaces inherited from class com.adobe.xfa.ScriptHandler
ScriptHandler.ScriptException
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.ScriptHandler
ACTIVITY_CHANGE, ACTIVITY_CLICK, ACTIVITY_DOCCLOSE, ACTIVITY_DOCREADY, ACTIVITY_ENTER, ACTIVITY_EXIT, ACTIVITY_FULL, ACTIVITY_INDEXCHANGE, ACTIVITY_INITIALIZE, ACTIVITY_MOUSEDOWN, ACTIVITY_MOUSEENTER, ACTIVITY_MOUSEEXIT, ACTIVITY_MOUSEUP, ACTIVITY_POSTEXECUTE, ACTIVITY_POSTOPEN, ACTIVITY_POSTPRINT, ACTIVITY_POSTSAVE, ACTIVITY_POSTSIGN, ACTIVITY_POSTSUBMIT, ACTIVITY_PREEXECUTE, ACTIVITY_PREOPEN, ACTIVITY_PREPRINT, ACTIVITY_PRESAVE, ACTIVITY_PRESIGN, ACTIVITY_PRESUBMIT, ACTIVITY_READY, ACTIVITY_VALIDATIONSTATE, BP_CLEAR, BP_SET, BREAK, CALCULATE, ERR_BadBreakContinue, ERR_FuncBuiltIn, ERR_FuncUnknown, ERR_OK, ERR_Syntax, executeReason_LAST, FEATURE_CAN_BREAK, FEATURE_CAN_HALT, FEATURE_CAN_SET_BREAKPOINT, FEATURE_CAN_STEP_INTO, FEATURE_CAN_STEP_OUT, FEATURE_CAN_STEP_OVER, FEATURE_IS_REMOTE, FEATURE_NONE, HALT, ObjectInteraction_End, ObjectInteraction_Start, PREDICATE, STEP_INTO, STEP_OUT, STEP_OVER, UNSPECIFIED, VALIDATE
-
-
Constructor Summary
Constructors Constructor Description FormCalcScriptHandler(AppModel oAppModel)
Instantiates a script handler for the FormCalc language.FormCalcScriptHandler(AppModel oAppModel, ScriptDebugger oScriptDebugger)
Instantiates a script handler for the FormCalc language.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormCalcScriptHandler
clone()
Clones this script handler.boolean
debugBreakPoint(int nScriptID, int nLine, int eSetType)
Set or clear a break-point.boolean
debugCommand(int eCmd)
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).boolean
debugGetStack(java.util.List<java.lang.String> oStack)
Get the current stack frame.boolean
debugGetVariables(java.util.List<java.lang.String> oVarNames, java.util.List<Arg> oVarValues)
Retrieve parallel lists of variable names and their values (lists have the same size).void
executeOrSyntaxCheck(java.lang.String script, Arg returnCode, int eReason, boolean bSyntaxCheckOnly)
Executes or checks the syntax of the given script.boolean
getCancelOrTimeState()
Method to check for the Esc Key press to halt the execution.java.lang.String
getOption(java.lang.String sOptionName)
Gets the value of the given option.java.lang.String
languageName()
Gets the name of the scripting language supported by this script handler.void
setOption(java.lang.String sOptionName, java.lang.String sOptionValue)
Sets the value of the given option.void
syntaxCheck(java.lang.String script)
Checks the given script for syntax errors.boolean
wasFatalError()
Determines the severity of an error is returned from execute().-
Methods inherited from class com.adobe.xfa.ScriptHandler
createScriptHandler, execute, executeReasonToString, executeReasonToXFAEnum, getDebugger, removeReference, setDebugger, stringToExecuteReason
-
-
-
-
Constructor Detail
-
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 Detail
-
executeOrSyntaxCheck
public void executeOrSyntaxCheck(java.lang.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 classScriptHandler
- 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(java.lang.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 classScriptHandler
- Parameters:
script
- the script to execute.
-
languageName
public java.lang.String languageName()
Description copied from class:ScriptHandler
Gets the name of the scripting language supported by this script handler.- Specified by:
languageName
in classScriptHandler
- 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(java.lang.String sOptionName, java.lang.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 classScriptHandler
- Parameters:
sOptionName
- the name of the option to set.sOptionValue
- the value to set.
-
getOption
public java.lang.String getOption(java.lang.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 classScriptHandler
- 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 classScriptHandler
- 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 classScriptHandler
-
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 classScriptHandler
-
debugBreakPoint
public boolean debugBreakPoint(int nScriptID, int nLine, int eSetType)
Description copied from class:ScriptHandler
Set or clear a break-point.- Overrides:
debugBreakPoint
in classScriptHandler
-
debugGetStack
public boolean debugGetStack(java.util.List<java.lang.String> oStack)
Description copied from class:ScriptHandler
Get the current stack frame.- Overrides:
debugGetStack
in classScriptHandler
-
debugGetVariables
public boolean debugGetVariables(java.util.List<java.lang.String> oVarNames, java.util.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 classScriptHandler
-
-