private void configureScriptEngine() {
// the EngineController needs to be configured statically before requests start serving so that it can
// properly construct ScriptEngine objects with the correct reset policy. allow script engines to be
// configured so that folks can drop in different gremlin flavors.
HierarchicalConfiguration config = new HierarchicalConfiguration();
config.setProperty("name", "gremlin-groovy");
config.setProperty("reset-threshold", "-1");
List<String> imports = new ArrayList<>();
imports.add("com.tinkerpop.gremlin.*");
imports.add("com.tinkerpop.gremlin.java.*");
imports.add("com.tinkerpop.gremlin.pipes.filter.*");
imports.add("com.tinkerpop.gremlin.pipes.sideeffect.*");
imports.add("com.tinkerpop.gremlin.pipes.transform.*");
imports.add("com.tinkerpop.blueprints.*");
imports.add("com.tinkerpop.blueprints.impls.*");
imports.add("com.tinkerpop.blueprints.impls.tg.*");
imports.add("com.tinkerpop.blueprints.impls.neo4j.*");
imports.add("com.tinkerpop.blueprints.impls.neo4j.batch.*");
imports.add("com.tinkerpop.blueprints.impls.orient.*");
imports.add("com.tinkerpop.blueprints.impls.orient.batch.*");
imports.add("com.tinkerpop.blueprints.impls.dex.*");
imports.add("com.tinkerpop.blueprints.impls.rexster.*");
imports.add("com.tinkerpop.blueprints.impls.sail.*");
imports.add("com.tinkerpop.blueprints.impls.sail.impls.*");
imports.add("com.tinkerpop.blueprints.util.*");
imports.add("com.tinkerpop.blueprints.util.io.*");
imports.add("com.tinkerpop.blueprints.util.io.gml.*");
imports.add("com.tinkerpop.blueprints.util.io.graphml.*");
imports.add("com.tinkerpop.blueprints.util.io.graphson.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.batch.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.batch.cache.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.event.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.event.listener.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.id.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.partition.*");
imports.add("com.tinkerpop.blueprints.util.wrappers.readonly.*");
imports.add("com.tinkerpop.blueprints.oupls.sail.*");
imports.add("com.tinkerpop.blueprints.oupls.sail.pg.*");
imports.add("com.tinkerpop.blueprints.oupls.jung.*");
imports.add("com.tinkerpop.pipes.*");
imports.add("com.tinkerpop.pipes.branch.*");
imports.add("com.tinkerpop.pipes.filter.*");
imports.add("com.tinkerpop.pipes.sideeffect.*");
imports.add("com.tinkerpop.pipes.transform.*");
imports.add("com.tinkerpop.pipes.util.*");
imports.add("com.tinkerpop.pipes.util.iterators.*");
imports.add("com.tinkerpop.pipes.util.structures.*");
imports.add("org.apache.commons.configuration.*");
imports.add("com.thinkaurelius.titan.core.*");
imports.add("com.thinkaurelius.titan.core.attribute.*");
imports.add("com.thinkaurelius.titan.core.util.*");
imports.add("com.thinkaurelius.titan.example.*");
imports.add("org.apache.commons.configuration.*");
imports.add("com.tinkerpop.gremlin.Tokens.T");
imports.add("com.tinkerpop.gremlin.groovy.*");
config.setProperty("imports", imports);
List<String> staticImports = new ArrayList<>();
staticImports.add("com.tinkerpop.blueprints.Direction.*");
staticImports.add("com.tinkerpop.blueprints.TransactionalGraph$Conclusion.*");
staticImports.add("com.tinkerpop.blueprints.Compare.*");
staticImports.add("com.thinkaurelius.titan.core.attribute.Geo.*");
staticImports.add("com.thinkaurelius.titan.core.attribute.Text.*");
staticImports.add("com.thinkaurelius.titan.core.TypeMaker$UniquenessConsistency.*");
staticImports.add("com.tinkerpop.blueprints.Query$Compare.*");
config.setProperty("static-imports", staticImports);
EngineConfiguration engineConfiguration = new EngineConfiguration(config);
List<EngineConfiguration> engineConfigurations = new ArrayList<>();
engineConfigurations.add(engineConfiguration);