org.apache.tinkerpop.gremlin.jsr223

## Class DefaultBindingsCustomizer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.jsr223.DefaultBindingsCustomizer

- All Implemented Interfaces:
    BindingsCustomizer, Customizer

      public class DefaultBindingsCustomizer
      extends Object
      implements BindingsCustomizer

  Default implementation of the `BindingsCustomizer` which adds bindings to the `ScriptContext.GLOBAL_SCOPE`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultBindingsCustomizer(Bindings bindings)` Creates a new object with `ScriptContext.GLOBAL_SCOPE`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Bindings` | `getBindings()` Gets the bindings to add to a `GremlinScriptEngine`.
    `int` | `getScope()` Gets the scope to which the bindings apply.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultBindingsCustomizer

          public DefaultBindingsCustomizer(Bindings bindings)

      Creates a new object with `ScriptContext.GLOBAL_SCOPE`.

  - ### Method Detail

    - #### getBindings

          public Bindings getBindings()

      Description copied from interface: `BindingsCustomizer`
      Gets the bindings to add to a `GremlinScriptEngine`.
      Specified by:
        `getBindings` in interface `BindingsCustomizer`

    - #### getScope

          public int getScope()

      Description copied from interface: `BindingsCustomizer`
      Gets the scope to which the bindings apply. The scope is determined by the `ScriptContext` values where "100" is `EngineScope` (bindings apply to the current `GremlinScriptEngine`) and "200" is `GlobalScope` (bindings apply to the engines created by the current `GremlinScriptEngineManager`.
      Specified by:
        `getScope` in interface `BindingsCustomizer`

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