Package org.jaggeryjs.scriptengine.engine

Examples of org.jaggeryjs.scriptengine.engine.JaggeryContext.addProperty()


        clone.setEngine(engine);
        clone.setTenantId(shared.getTenantId());
        clone.setScope(instanceScope);

        clone.addProperty(Constants.SERVLET_CONTEXT, shared.getProperty(Constants.SERVLET_CONTEXT));
        clone.addProperty(LogHostObject.LOG_LEVEL, shared.getProperty(LogHostObject.LOG_LEVEL));
        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
View Full Code Here


        clone.setTenantId(shared.getTenantId());
        clone.setScope(instanceScope);

        clone.addProperty(Constants.SERVLET_CONTEXT, shared.getProperty(Constants.SERVLET_CONTEXT));
        clone.addProperty(LogHostObject.LOG_LEVEL, shared.getProperty(LogHostObject.LOG_LEVEL));
        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
        clone.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());
View Full Code Here

        clone.addProperty(Constants.SERVLET_CONTEXT, shared.getProperty(Constants.SERVLET_CONTEXT));
        clone.addProperty(LogHostObject.LOG_LEVEL, shared.getProperty(LogHostObject.LOG_LEVEL));
        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
        clone.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());

        return clone;
View Full Code Here

        clone.addProperty(Constants.SERVLET_CONTEXT, shared.getProperty(Constants.SERVLET_CONTEXT));
        clone.addProperty(LogHostObject.LOG_LEVEL, shared.getProperty(LogHostObject.LOG_LEVEL));
        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
        clone.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());

        return clone;
    }
View Full Code Here

        clone.addProperty(LogHostObject.LOG_LEVEL, shared.getProperty(LogHostObject.LOG_LEVEL));
        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
        clone.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());

        return clone;
    }
View Full Code Here

        clone.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                shared.getProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER));
        clone.addProperty(Constants.JAGGERY_CORE_MANAGER, shared.getProperty(Constants.JAGGERY_CORE_MANAGER));
        clone.addProperty(Constants.JAGGERY_INCLUDED_SCRIPTS, new HashMap<String, Boolean>());
        clone.addProperty(Constants.JAGGERY_INCLUDES_CALLSTACK, new Stack<String>());
        clone.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());

        return clone;
    }

    public static void deploy(org.apache.catalina.Context context) throws ScriptException {
View Full Code Here

        ServletContext ctx = context.getServletContext();
        JaggeryContext sharedContext = new JaggeryContext();
        Context cx = Context.getCurrentContext();
        CommonManager.initContext(sharedContext);

        sharedContext.addProperty(Constants.SERVLET_CONTEXT, ctx);
        sharedContext.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER, new WebAppFileManager(ctx));
        sharedContext.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());
        String logLevel = (String) ctx.getAttribute(LogHostObject.LOG_LEVEL);
        if (logLevel != null) {
            sharedContext.addProperty(LogHostObject.LOG_LEVEL, logLevel);
View Full Code Here

        JaggeryContext sharedContext = new JaggeryContext();
        Context cx = Context.getCurrentContext();
        CommonManager.initContext(sharedContext);

        sharedContext.addProperty(Constants.SERVLET_CONTEXT, ctx);
        sharedContext.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER, new WebAppFileManager(ctx));
        sharedContext.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());
        String logLevel = (String) ctx.getAttribute(LogHostObject.LOG_LEVEL);
        if (logLevel != null) {
            sharedContext.addProperty(LogHostObject.LOG_LEVEL, logLevel);
        }
View Full Code Here

        Context cx = Context.getCurrentContext();
        CommonManager.initContext(sharedContext);

        sharedContext.addProperty(Constants.SERVLET_CONTEXT, ctx);
        sharedContext.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER, new WebAppFileManager(ctx));
        sharedContext.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());
        String logLevel = (String) ctx.getAttribute(LogHostObject.LOG_LEVEL);
        if (logLevel != null) {
            sharedContext.addProperty(LogHostObject.LOG_LEVEL, logLevel);
        }
        ScriptableObject sharedScope = sharedContext.getScope();
View Full Code Here

        sharedContext.addProperty(Constants.SERVLET_CONTEXT, ctx);
        sharedContext.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER, new WebAppFileManager(ctx));
        sharedContext.addProperty(Constants.JAGGERY_REQUIRED_MODULES, new HashMap<String, ScriptableObject>());
        String logLevel = (String) ctx.getAttribute(LogHostObject.LOG_LEVEL);
        if (logLevel != null) {
            sharedContext.addProperty(LogHostObject.LOG_LEVEL, logLevel);
        }
        ScriptableObject sharedScope = sharedContext.getScope();
        JavaScriptProperty application = new JavaScriptProperty("application");
        application.setValue(cx.newObject(sharedScope, "Application", new Object[]{ctx}));
        application.setAttribute(ScriptableObject.READONLY);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.