Package de.elo.utils.io
Class CallbackContext
- java.lang.Object
-
- de.elo.utils.io.CallbackContext
-
public class CallbackContext extends java.lang.ObjectÜberschrift: CallbackContext.
Beschreibung: Kontext-Information, welche die Callback-Funktion und die notwenigen Umgebungsinformationen enthält.
Copyright: Copyright (c) ELO Digital Office GmbH 2018
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringscriptFolderScriptordner für Includes und Ressourcenjava.lang.StringscriptNameScriptnameorg.mozilla.javascript.ScriptablescriptScopeScriptScope für Globalen, etc.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CallbackContextcreateCallback(org.mozilla.javascript.BaseFunction function, org.mozilla.javascript.Scriptable thisScope)Die Funktion erstellt einen erweiterten Kontext, welcher neben dem ausgefphrten Script auch eine Callback-Funktion und den Scope der Funktion enthält.static CallbackContextsetupContext(org.mozilla.javascript.Scriptable scriptScope, java.lang.String scriptFolder, java.lang.String scriptName)Neuen Context erstellen.
-
-
-
Method Detail
-
setupContext
public static CallbackContext setupContext(org.mozilla.javascript.Scriptable scriptScope, java.lang.String scriptFolder, java.lang.String scriptName)
Neuen Context erstellen. Dieser Context enthält nur Informationen zum ausgeführten Script.- Parameters:
scriptScope- Scope des aufgerufenen ScriptesscriptFolder- Ordner des aufgerufenen ScriptesscriptName- Name des aufgerufenen Scriptes- Returns:
- Context
-
createCallback
public CallbackContext createCallback(org.mozilla.javascript.BaseFunction function, org.mozilla.javascript.Scriptable thisScope)
Die Funktion erstellt einen erweiterten Kontext, welcher neben dem ausgefphrten Script auch eine Callback-Funktion und den Scope der Funktion enthält.- Parameters:
function- JavaScript-FunktionthisScope- "this"-Scope der Funktion- Returns:
- Erweiterter Kontext
-
-