Class 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.String scriptFolder
      Scriptordner für Includes und Ressourcen
      java.lang.String scriptName
      Scriptname
      org.mozilla.javascript.Scriptable scriptScope
      ScriptScope für Globalen, etc.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static CallbackContext setupContext​(org.mozilla.javascript.Scriptable scriptScope, java.lang.String scriptFolder, java.lang.String scriptName)
      Neuen Context erstellen.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scriptScope

        public final org.mozilla.javascript.Scriptable scriptScope
        ScriptScope für Globalen, etc.
      • scriptFolder

        public final java.lang.String scriptFolder
        Scriptordner für Includes und Ressourcen
      • scriptName

        public final java.lang.String scriptName
        Scriptname
    • 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 Scriptes
        scriptFolder - Ordner des aufgerufenen Scriptes
        scriptName - 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-Funktion
        thisScope - "this"-Scope der Funktion
        Returns:
        Erweiterter Kontext