org.neo4j.server.scripting.javascript
Class GlobalJavascriptInitializer

java.lang.Object
  extended by org.neo4j.server.scripting.javascript.GlobalJavascriptInitializer

public class GlobalJavascriptInitializer
extends Object

Forgive me Kent Beck, for I have sinned. Rhino's security model means we need to globally define it, so that horridness has been delegated to this class. It allows initializing the global javascript context as either sandboxed or unsafe. If you initialize it twice and ask for different modes, an exception will be thrown as the mode cannot be changed after initialization. We could do some crazy stuff and build a context factory that can be hooked into after the fact and modified, but the plan is to get rid of the ability to switch between unsafe and sandboxed modes, and only allow sandboxed. Unsafe exists for backwards compatibility.


Nested Class Summary
static class GlobalJavascriptInitializer.Mode
           
 
Constructor Summary
GlobalJavascriptInitializer()
           
 
Method Summary
static void initialize(GlobalJavascriptInitializer.Mode requestedMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalJavascriptInitializer

public GlobalJavascriptInitializer()
Method Detail

initialize

public static void initialize(GlobalJavascriptInitializer.Mode requestedMode)


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.