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 classFormCalcScriptHandler.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 FormCalcScriptHandlerclone()Clones this script handler.booleandebugBreakPoint(int nScriptID, int nLine, int eSetType)Set or clear a break-point.booleandebugCommand(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).booleandebugGetStack(java.util.List<java.lang.String> oStack)Get the current stack frame.booleandebugGetVariables(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).voidexecuteOrSyntaxCheck(java.lang.String script, Arg returnCode, int eReason, boolean bSyntaxCheckOnly)Executes or checks the syntax of the given script.booleangetCancelOrTimeState()Method to check for the Esc Key press to halt the execution.java.lang.StringgetOption(java.lang.String sOptionName)Gets the value of the given option.java.lang.StringlanguageName()Gets the name of the scripting language supported by this script handler.voidsetOption(java.lang.String sOptionName, java.lang.String sOptionValue)Sets the value of the given option.voidsyntaxCheck(java.lang.String script)Checks the given script for syntax errors.booleanwasFatalError()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:ScriptHandlerExecutes or checks the syntax of the given script.- Specified by:
 executeOrSyntaxCheckin 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:ScriptHandlerChecks the given script for syntax errors. Errors are reported in the form of a scriptException exception (scriptException derives from ExFull).- Overrides:
 syntaxCheckin classScriptHandler- Parameters:
 script- the script to execute.
 
- 
languageName
public java.lang.String languageName()
Description copied from class:ScriptHandlerGets the name of the scripting language supported by this script handler.- Specified by:
 languageNamein 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:ScriptHandlerSets the value of the given option. If the option is unknown, the call is ignored.- Overrides:
 setOptionin 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:ScriptHandlerGets the value of the given option. If the option is unknown, the empty string is returned.- Overrides:
 getOptionin 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:ScriptHandlerClones this script handler.- Specified by:
 clonein classScriptHandler- Returns:
 - a copy of this script handler.
 
 
- 
wasFatalError
public boolean wasFatalError()
Description copied from class:ScriptHandlerDetermines the severity of an error is returned from execute().- Overrides:
 wasFatalErrorin classScriptHandler
 
- 
debugCommand
public boolean debugCommand(int eCmd)
Description copied from class:ScriptHandlerSet 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:
 debugCommandin classScriptHandler
 
- 
debugBreakPoint
public boolean debugBreakPoint(int nScriptID, int nLine, int eSetType)Description copied from class:ScriptHandlerSet or clear a break-point.- Overrides:
 debugBreakPointin classScriptHandler
 
- 
debugGetStack
public boolean debugGetStack(java.util.List<java.lang.String> oStack)
Description copied from class:ScriptHandlerGet the current stack frame.- Overrides:
 debugGetStackin classScriptHandler
 
- 
debugGetVariables
public boolean debugGetVariables(java.util.List<java.lang.String> oVarNames, java.util.List<Arg> oVarValues)Description copied from class:ScriptHandlerRetrieve 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:
 debugGetVariablesin classScriptHandler
 
 - 
 
 -