public static void initContext(JaggeryContext context) throws ScriptException { context.setEngine(manager.engine); context.setScope(manager.engine.getRuntimeScope()); context.setTenantId( Integer.toString(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId())); context.addProperty(Constants.JAGGERY_CORE_MANAGER, manager); context.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>()); context.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>()); }