Class RhinoScriptHandler
java.lang.Object
com.adobe.xfa.ScriptHandler
com.adobe.xfa.scripthandler.rhino.RhinoScriptHandler
- All Implemented Interfaces:
ScriptHandlerIF
A class to enable scripting support for the JavaScript language.
-
Nested Class Summary
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
ConstructorsConstructorDescriptionRhinoScriptHandler(AppModel appModel) Instantiates a JavaScript script handler.RhinoScriptHandler(AppModel appModel, ScriptDebugger scriptDebugger) Instantiates a JavaScript script handler.RhinoScriptHandler(AppModel appModel, ScriptDebugger scriptDebugger, int javaScriptTimeout) -
Method Summary
Modifier and TypeMethodDescriptionargToVariant(Arg arg) clone()Clones this JavaScript handler.voidexecuteOrSyntaxCheck(String sScript, Arg oReturnCode, int eReason, boolean bSyntaxCheckOnly) Executes or checks the syntax of the given script.Gets the name of the scripting language supported by this script handler.newLiveComponent(RhinoScriptHandler handler, Obj xfaObject) Instantiates a new LiveComponent.newLiveObject(RhinoScriptHandler handler, Obj xfaObject) Instantiates a new LiveObject.voidthrowError(ExFull oError) variantToArg(Object variant) booleanDetermines the severity of an error is returned from execute().Methods inherited from class com.adobe.xfa.ScriptHandler
createScriptHandler, debugBreakPoint, debugCommand, debugGetStack, debugGetVariables, execute, executeReasonToString, executeReasonToXFAEnum, getDebugger, getOption, removeReference, setDebugger, setOption, stringToExecuteReason, syntaxCheck
-
Constructor Details
-
RhinoScriptHandler
Instantiates a JavaScript script handler.- Parameters:
appModel- the application model.
-
RhinoScriptHandler
Instantiates a JavaScript script handler.- Parameters:
appModel- an application model.scriptDebugger- an script debugger.
-
RhinoScriptHandler
- 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
Clones this JavaScript handler.- Specified by:
clonein classScriptHandler- Returns:
- a copy of this script handler.
-
newLiveObject
Description copied from interface:ScriptHandlerIFInstantiates a new LiveObject.- Specified by:
newLiveObjectin interfaceScriptHandlerIF- Parameters:
handler- a Rhino script handler.xfaObject- the XFA object that is peered to this instance.- Returns:
- the LiveObject.
-
newLiveComponent
Description copied from interface:ScriptHandlerIFInstantiates a new LiveComponent.- Specified by:
newLiveComponentin interfaceScriptHandlerIF- 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:ScriptHandlerExecutes or checks the syntax of the given script.- Specified by:
executeOrSyntaxCheckin classScriptHandler- 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
-
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.
-
throwError
-
wasFatalError
public boolean wasFatalError()Description copied from class:ScriptHandlerDetermines the severity of an error is returned from execute().- Overrides:
wasFatalErrorin classScriptHandler
-
argToVariant
-
variantToArg
-