Interface ScriptBinding

    • Method Detail

      • getWorkspacePattern

        Pattern getWorkspacePattern()
        Return the pattern of the workspace corresponding to this script binding.
        Returns:
        The pattern to match
      • getVariables

        Map<String,​ObjectgetVariables​(ScriptExecArguments execArgs)
        Returns the list of variables this ScriptBinding provides, mapped by variable name.
        Parameters:
        execArgs - The The arguments for script execution
        Returns:
        The list of variables, or null if no variable is provided.
      • getVariablesScripts

        String getVariablesScripts()
        Returns the JavaScript variables script to inject at the start of the script, in the form of a single String prepended to the script.
        Returns:
        The functions text, or null if no function is provided.
      • getVariablesDescriptions

        Map<String,​ScriptBindingDocumentationgetVariablesDescriptions()
        Returns the list of variables descriptions, mapped by variable name. This list does not have to match the getVariables return value, but the description is used to inform the user of the existence and usability of each variable.
        Returns:
        The list of variables descriptions, or null if no description is provided.
      • cleanVariables

        void cleanVariables​(Map<String,​Object> variables)
        Allows clean up of variables created during the getVariables call.
        Parameters:
        variables - The map of variables.
      • getFunctions

        String getFunctions()
        Returns the JavaScript functions to inject at the start of the script, in the form of a single String prepended to the script.
        Returns:
        The functions text, or null if no function is provided.
      • getFunctionsDescriptions

        Map<String,​ScriptBindingDocumentationgetFunctionsDescriptions()
        Returns the list of functions descriptions, mapped by function name. This list does not have to match the functions returned by getFunctions, but the description is used to inform the user of the existence and usability of each function.
        Returns:
        The list of functions descriptions, or null if no description is provided.