public class Sandbox extends Object
A wrapper of Rythm engine and make sure the rendering is happen in Sandbox mode
| Constructor and Description |
|---|
Sandbox(RythmEngine engine,
SandboxExecutingService executor) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public Sandbox(RythmEngine engine, SandboxExecutingService executor)
public static void turnOffSandbox(String code)
Turn off sandbox mode. Used by Rythm unit testing program
code - public static String hasAccessToRestrictedClasses(RythmEngine engine, String code)
public static final void enterRestrictedZone(String code)
public static final void enterSafeZone(String code)
public static final void leaveCurZone(String code)
public static final boolean isRestricted()
Copyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.