Interface CustomScriptServiceLocal

    • Method Detail

      • getFunctions

        ScriptFunction[] getFunctions​(ScriptType type)
        Returns the script function instances for the given type
      • getReverseDependencyIds

        Set<Long> getReverseDependencyIds​(Long id)
        Returns the identifiers of all scripts which depend, directly or indirectly on the script with the given id. The purpose of exposing this method in the interface is to test it
      • resolveBindings

        Bindings resolveBindings​(String parameters,
                                 Map<String,​Object> additionalBindings)
        Returns all bindings which are common to all scripts, plus the given script parameters and additional bindings
      • resolveCodeAndParameters

        Pair<String,​String> resolveCodeAndParameters​(CustomScript script,
                                                           ScriptFunction function)
        Returns the final code for the given script function, together with the final parameters, concatenated from all dependencies. The purpose of exposing this method in the interface is to test it
      • resolveCodeForProfiling

        String resolveCodeForProfiling​(String scriptName,
                                       String scriptType,
                                       String functionName)
        Returns the final code for the given script function concatenated from all dependencies. The parameters (which can contain sensitive information like API keys, credentials, etc.) are not included because the resulting code will be stored in a profiling session.
      • runScript

        <T> T runScript​(String code,
                        Set<CustomScript> libraries)
        Runs the given script code directly. Will run as system, with all default bindings available
      • runScript

        <T> T runScript​(String code,
                        String parameters,
                        Map<String,​Object> bindings,
                        Set<CustomScript> libraries,
                        boolean allPermissions)
        Runs the given script code directly, with parameters. Will run as system, with all default bindings available