org.apache.tinkerpop.gremlin.groovy.jsr223

## Interface DependencyManager

- All Known Implementing Classes:
    GremlinGroovyScriptEngine

  Deprecated.
  As of release 3.2.4, not replaced - no longer needed under the new `GremlinScriptEngine` model.

      @Deprecated
      public interface DependencyManager

  Provides a way to dynamically consume dependencies into the ScriptEngine classloader. With Groovy this is somewhat easily accomplished with Grape, but other ScriptEngine implementations might have ways to do it too, so this interface makes that possible to expose.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addImports(Set<String> importStatements)` Deprecated. Perform class imports for the ScriptEngine.
    `Map[]` | `dependencies()` Deprecated. List the dependencies in the ScriptEngine classloader.
    `Map<String,Set<String>>` | `imports()` Deprecated. List the imports in the ScriptEngine;
    `void` | `loadPlugins(List<GremlinPlugin> plugins)` Deprecated. Load a list of `GremlinPlugin` instances.
    `void` | `reset()` Deprecated. Reset the ScriptEngine.
    `List<GremlinPlugin>` | `use(String group, String artifact, String version)` Deprecated. Take maven coordinates and load the classes into the classloader used by the ScriptEngine.

- - ### Method Detail

    - #### use

          List<GremlinPlugin> use(String group,
                                  String artifact,
                                  String version)

      Deprecated.
      Take maven coordinates and load the classes into the classloader used by the ScriptEngine. Those ScriptEngines that can support script engine plugins should check if there are any new `GremlinPlugin` implementations in the classloader. The `GremlinGroovyScriptEngine` implementation uses ServiceLoader to figure out if there are such classes to return.

      It is up to the caller to execute the `GremlinPlugin.pluginTo(org.apache.tinkerpop.gremlin.groovy.plugin.PluginAcceptor)` method. The reason for this has to do with conflicts that can occur with mapper imports that are added via the `ImportCustomizerProvider` and scripts executed through the `PluginAcceptor`. Generally speaking, all calls to this "use" method should be complete prior to calling `GremlinPlugin.pluginTo(PluginAcceptor)`.

    - #### loadPlugins

          void loadPlugins(List<GremlinPlugin> plugins)
                    throws GremlinPluginException

      Deprecated.
      Load a list of `GremlinPlugin` instances. These plugins are typically returned from calls to `use(String, String, String)`.
      Throws:
        `GremlinPluginException` - if there is a problem loading the plugin itself.

    - #### addImports

          void addImports(Set<String> importStatements)

      Deprecated.
      Perform class imports for the ScriptEngine.

    - #### dependencies

          Map[] dependencies()

      Deprecated.
      List the dependencies in the ScriptEngine classloader.

    - #### imports

          Map<String,Set<String>> imports()

      Deprecated.
      List the imports in the ScriptEngine;

    - #### reset

          void reset()

      Deprecated.
      Reset the ScriptEngine. Clear caches and kill the classloader.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.