Package org.rioproject.config

Examples of org.rioproject.config.PlatformLoader


            platformCapabilityList.addAll(Arrays.asList(addCaps));

            /*
             * Load the default capabilities
             */
            PlatformLoader loader = new PlatformLoader();
            pCaps = createPlatformCapabilities(loader.getDefaultPlatform(getRioHome()));
            platformCapabilityList.addAll(Arrays.asList(pCaps));
            /*
             * Get additional platform configurations
             */
            String platformDir = getPlatformConfigurationDirectory(config);
View Full Code Here


        pCap.define(PlatformCapability.VERSION, "1.0");
        pCap.setClassPath(new String[]{cwd+File.separator+"target"+File.separator+"classes"+File.separator});
        PlatformCapabilityWriter writer = new PlatformCapabilityWriter();
        String fileName = writer.write(pCap, platform.getPath());
        Assert.assertNotNull(fileName);
        PlatformLoader platformLoader = new PlatformLoader();
        PlatformCapabilityConfig[] pCapConfigs = platformLoader.parsePlatform(platform.getPath());
        Assert.assertNotNull(pCapConfigs);
        Assert.assertEquals(1, pCapConfigs.length);

    }
View Full Code Here

        List<URL> urlList = new ArrayList<URL>();
        if(rioHome==null) {
            logger.warn("RIO_HOME not defined, no default platformDir");
        } else {
            defaultDir = rioHome+ File.separator+"config"+File.separator+"platform";
            PlatformLoader platformLoader = new PlatformLoader();

            PlatformCapabilityConfig[] caps = platformLoader.getDefaultPlatform(rioHome);
            for (PlatformCapabilityConfig cap : caps) {
                URL[] urls = cap.getClasspathURLs();
                urlList.addAll(Arrays.asList(urls));
            }

            String platformDir = (String)config.getEntry(COMPONENT, "platformDir", String.class, defaultDir);
            if(logger.isDebugEnabled())
                logger.debug("Platform directory set as {}", platformDir);
            caps = platformLoader.parsePlatform(platformDir);
            for (PlatformCapabilityConfig cap : caps) {
                if (cap.getCommon()) {
                    URL[] urls = cap.getClasspathURLs();
                    urlList.addAll(Arrays.asList(urls));
                }
View Full Code Here

TOP

Related Classes of org.rioproject.config.PlatformLoader

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.