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.
-
-
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
Constructors Constructor Description RhinoScriptHandler(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
argToVariant(Arg arg)
RhinoScriptHandler
clone()
Clones this JavaScript handler.void
executeOrSyntaxCheck(java.lang.String sScript, Arg oReturnCode, int eReason, boolean bSyntaxCheckOnly)
Executes or checks the syntax of the given script.AppModel
getAppModel()
java.lang.String
languageName()
Gets the name of the scripting language supported by this script handler.LiveComponent
newLiveComponent(RhinoScriptHandler handler, Obj xfaObject)
Instantiates a new LiveComponent.LiveObject
newLiveObject(RhinoScriptHandler handler, Obj xfaObject)
Instantiates a new LiveObject.void
throwError(ExFull oError)
Arg
variantToArg(java.lang.Object variant)
boolean
wasFatalError()
Determines 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 Detail
-
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 Detail
-
clone
public RhinoScriptHandler clone()
Clones this JavaScript handler.- Specified by:
clone
in classScriptHandler
- 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 interfaceScriptHandlerIF
- 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 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(java.lang.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 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
public AppModel getAppModel()
-
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.
-
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 classScriptHandler
-
argToVariant
public java.lang.Object argToVariant(Arg arg)
-
variantToArg
public Arg variantToArg(java.lang.Object variant)
-
-