org.rythmengine
Class Sandbox

java.lang.Object
  extended by org.rythmengine.Sandbox

public class Sandbox
extends Object

A wrapper of Rythm engine and make sure the rendering is happen in Sandbox mode


Constructor Summary
Sandbox(RythmEngine engine, SandboxExecutingService executor)
           
 
Method Summary
static void enterRestrictedZone(String code)
           
static void enterSafeZone(String code)
           
static String hasAccessToRestrictedClasses(RythmEngine engine, String code)
           
static boolean isRestricted()
           
static void leaveCurZone(String code)
           
 String render(File file, Object... args)
           
 String render(String template, Object... args)
           
 Sandbox setUserContext(Map<String,Object> context)
           
static void turnOffSandbox(String code)
          Turn off sandbox mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sandbox

public Sandbox(RythmEngine engine,
               SandboxExecutingService executor)
Method Detail

turnOffSandbox

public static void turnOffSandbox(String code)
Turn off sandbox mode. Used by Rythm unit testing program

Parameters:
code -

setUserContext

public Sandbox setUserContext(Map<String,Object> context)

render

public String render(String template,
                     Object... args)

render

public String render(File file,
                     Object... args)

hasAccessToRestrictedClasses

public static String hasAccessToRestrictedClasses(RythmEngine engine,
                                                  String code)

enterRestrictedZone

public static final void enterRestrictedZone(String code)

enterSafeZone

public static final void enterSafeZone(String code)

leaveCurZone

public static final void leaveCurZone(String code)

isRestricted

public static final boolean isRestricted()


Copyright © 2013. All Rights Reserved.