Package org.auraframework.system.AuraContext

Examples of org.auraframework.system.AuraContext.Mode


                ((JsonSerializable) value).serialize(json);
            } else {
                json.writeMapBegin();
                json.writeMapEntry("message", value.getMessage());
                if (Aura.getContextService().isEstablished()) {
                    Mode mode = Aura.getContextService().getCurrentContext().getMode();
                    if (mode != Mode.PROD && mode != Mode.PRODDEBUG) {
                        json.writeMapEntry("stack", AuraExceptionUtil.getStackTrace(value));
                    }
                }
                json.writeMapEnd();
View Full Code Here


        }

        /** parses the CSS according to the specified configuration */
        public ParserResult parse() throws StyleParserException, QuickFixException {
            // determine the output compression level based on the aura mode
            Mode mode = Aura.getContextService().getCurrentContext().getMode();
            StyleWriter writer = mode.prettyPrint() ? StyleWriter.inline() : StyleWriter.compressed();

            if (!runtime) {
                // write annotated comments out on the initial pass, in case the runtime pass needs them
                writer.writeComments(true, true);
            }
View Full Code Here

        Client clientWEBKIT = new Client(ua);
        assertEquals(uaType,clientWEBKIT.getType());
    context.setClient(clientWEBKIT);
    final String uid = context.getDefRegistry().getUid(null, appDesc);
        context.addLoaded(appDesc, uid);
        Mode mode = context.getMode();
        final boolean minify = !(mode.isTestMode() || mode.isDevMode());
        final String mKey = minify ? "MIN:" : "DEV:";

        DummyHttpServletRequest request = new DummyHttpServletRequest(){
            @Override
            public long getDateHeader(String name) {
View Full Code Here

                ApplicationDef.class);
        AuraContext context = Aura.getContextService()
                .startContext(Mode.DEV, AuraContext.Format.CSS, AuraContext.Authentication.AUTHENTICATED, appDesc);
        final String uid = context.getDefRegistry().getUid(null, appDesc);
        context.addLoaded(appDesc, uid);
        Mode mode = context.getMode();
        final boolean minify = !(mode.isTestMode() || mode.isDevMode());
        final String mKey = minify ? "MIN:" : "DEV:";

        DummyHttpServletRequest request = new DummyHttpServletRequest(){
            @Override
            public long getDateHeader(String name) {
View Full Code Here

                ApplicationDef.class);
        AuraContext context = Aura.getContextService()
                .startContext(Mode.DEV, AuraContext.Format.JS, AuraContext.Authentication.AUTHENTICATED, appDesc);
        final String uid = context.getDefRegistry().getUid(null, appDesc);
        context.addLoaded(appDesc, uid);
        Mode mode = context.getMode();
        final boolean minify = !(mode.isTestMode() || mode.isDevMode());
        final String mKey = minify ? "MIN:" : "DEV:";

        DummyHttpServletRequest request = new DummyHttpServletRequest(){
            @Override
            public long getDateHeader(String name) {
View Full Code Here

    protected void readAttributes() throws QuickFixException {
        AuraContext context = Aura.getContextService().getCurrentContext();
        MasterDefRegistry mdr = context.getDefRegistry();
        context.pushCallingDescriptor(builder.getDescriptor());
        try {
            Mode mode = context.getMode();

            super.readAttributes();
            String controllerName = getAttributeValue(ATTRIBUTE_CONTROLLER);
            DefDescriptor<ControllerDef> controllerDescriptor = null;
            if (controllerName != null) {
View Full Code Here

    private MasterDefRegistry restartContextGetNewMDR() {
        // simulate new request
        MasterDefRegistry mdr = getAuraMDR();
        AuraContext ctx = Aura.getContextService().getCurrentContext();
        Mode mode = ctx.getMode();
        Format format = ctx.getFormat();
        Authentication access = ctx.getAccess();
        Aura.getContextService().endContext();

        Aura.getContextService().startContext(mode, format, access);
View Full Code Here

        Format f = format.get(request);
        Authentication a = access.get(request, Authentication.AUTHENTICATED);

        Map<String, Object> configMap = getConfigMap(request);
        Mode m = getMode(request, configMap);
        boolean d = getDebugToolParam(request);

        DefDescriptor<? extends BaseComponentDef> appDesc = getAppParam(request, configMap);

        if (componentDir != null) {
View Full Code Here

    private Mode getModeParam(HttpServletRequest request, Map<String, Object> configMap) {
        // Get the passed in mode param.
        // Check the aura.mode param first then fall back to the mode value
        // embedded in the aura.context param
        Mode m = null;
        m = mode.get(request);
        if (m == null && configMap != null && configMap.containsKey("mode")) {
            m = Mode.valueOf((String) configMap.get("mode"));
        }
        return m;
View Full Code Here

        Map<String, Object> configMap = getConfigMap(request);
        return getModeParam(request, configMap);
    }

    protected Mode getMode(HttpServletRequest request, Map<String, Object> configMap) {
        Mode m = getModeParam(request, configMap);
        ConfigAdapter configAdapter = Aura.getConfigAdapter();
       
        if (m == null) {
            m = configAdapter.getDefaultMode();
        }
View Full Code Here

TOP

Related Classes of org.auraframework.system.AuraContext.Mode

Copyright © 2018 www.massapicom. 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.