Class CallbackContext

java.lang.Object
de.elo.utils.io.CallbackContext

public class CallbackContext extends 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 Details

    • scriptScope

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

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

      public final String scriptName
      Scriptname
  • Method Details

    • setupContext

      public static CallbackContext setupContext(org.mozilla.javascript.Scriptable scriptScope, String scriptFolder, 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