Examples of ConfigAdapter


Examples of org.auraframework.adapter.ConfigAdapter

        }
        super.tearDown();
    }

    public static MockConfigAdapter getMockConfigAdapter() {
        ConfigAdapter adapter = Aura.getConfigAdapter();
        if (adapter instanceof MockConfigAdapter) {
            return (MockConfigAdapter) adapter;
        }
        throw new Error("MockConfigAdapter is not configured!");
    }
View Full Code Here

Examples of org.auraframework.adapter.ConfigAdapter

        SourceLoader unprivilegedLoader = new UnprivilegedSourceLoader();
        List<SourceLoader> loaders = Lists.newArrayList(friendlyLoader, selectiveLoader, unprivilegedLoader);
        SourceFactory sf = new SourceFactory(loaders);
        assertEquals(Sets.newHashSet("VIP", "Guest", "Friend1", "Friend2", "Custom_1","Custom_2"), sf.getNamespaces());
       
        ConfigAdapter c = Aura.getConfigAdapter();
        //Assert namespaces of PrivilegedNamespaceSourceLoaders are privileged based on isPrivilegedNamespace()
        assertTrue(c.isPrivilegedNamespace("Friend1"));
        assertTrue(c.isPrivilegedNamespace("Friend2"));
       
        assertTrue(c.isPrivilegedNamespace("VIP"));
        assertFalse(c.isPrivilegedNamespace("Guest"));
       
        //Assert namspaces of non-PrivilegedNamespaceSourceLoaders are not privileged
        assertFalse(c.isPrivilegedNamespace("Custom_1"));
        assertFalse(c.isPrivilegedNamespace("Custom_2"));
    }
View Full Code Here

Examples of org.auraframework.adapter.ConfigAdapter

        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();
        }
        Set<Mode> allowedModes = configAdapter.getAvailableModes();
        boolean forceProdMode = !allowedModes.contains(m) && allowedModes.contains(Mode.PROD);
        if (forceProdMode) {
            m = Mode.PROD;
        }
View Full Code Here

Examples of org.auraframework.adapter.ConfigAdapter

            throws QuickFixException {
        return Aura.getClientLibraryService().getUrls(context, type);
    }

    public static List<String> getBaseScripts(AuraContext context) throws QuickFixException {
        ConfigAdapter config = Aura.getConfigAdapter();
        Set<String> ret = Sets.newLinkedHashSet();

        String html5ShivURL = config.getHTML5ShivURL();
        if (html5ShivURL != null) {
            ret.add(html5ShivURL);
        }

        ret.add(config.getMomentJSURL());
        ret.add(config.getFastClickJSURL());
        ret.addAll(config.getWalltimeJSURLs());

        ret.addAll(getClientLibraryUrls(context, ClientLibraryDef.Type.JS));
        // framework js should be after other client libraries
        ret.add(config.getAuraJSURL());

        return new ArrayList<String>(ret);
    }
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.