Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.PropertiesConfiguration.load()


    {       
        super.setUp();
        // need to flag internal JNDI on...
        System.setProperty(AbstractEngine.JNDI_SUPPORT_FLAG_KEY, "true");
        PropertiesConfiguration config = new  PropertiesConfiguration();
        config.load(new FileInputStream("./src/webapp/WEB-INF/conf/jetspeed.properties"));
        Mock servletConfigMock = new Mock(ServletConfig.class);
        MockServletConfig msc = new MockServletConfig();
        msc.setServletContext(new MockServletContext());
        engine = Jetspeed.createEngine(config, "./src/webapp", msc, getEngineClass());
   
View Full Code Here


                return null;
            }
            else
            {
                PropertiesConfiguration configuration = new PropertiesConfiguration();
                configuration.load(stream);
                return configuration;
            }
        }
        catch (Exception e1)
        {
View Full Code Here

        // need to flag internal JNDI on...
        System.setProperty(AbstractEngine.JNDI_SUPPORT_FLAG_KEY, "true");
       
        // create Engine
        PropertiesConfiguration config = new  PropertiesConfiguration();
        config.load(new FileInputStream("./src/webapp/WEB-INF/conf/jetspeed.properties"));
        Mock servletConfigMock = new Mock(ServletConfig.class);
        MockServletConfig msc = new MockServletConfig();
        msc.setServletContext(new MockServletContext());
        Engine engine = Jetspeed.createEngine(config, "./src/webapp", msc, SpringEngine.class);
View Full Code Here

    if (confFile != null) {
      try {
        PropertiesConfiguration conf = new PropertiesConfiguration();
        conf.setDelimiterParsingDisabled(true);
        conf.load(confFile);
        ctx.setAttribute(SENSEI_CONF_OBJ, conf);
      }
      catch (ConfigurationException e) {
          logger.error(e.getMessage(),e);
      }
View Full Code Here

                return null;
            }
            else
            {
                PropertiesConfiguration configuration = new PropertiesConfiguration();
                configuration.load(stream);
                return configuration;
            }
        }
        catch (Exception e1)
        {
View Full Code Here

    {
        String fileName = System.getProperty("org.apache.jetspeed.page.import.configuration", "import.properties");
        PropertiesConfiguration configuration = new PropertiesConfiguration();
        try
        {
            configuration.load(fileName);       
            String [] bootAssemblies = configuration.getStringArray("boot.assemblies");
            String [] assemblies = configuration.getStringArray("assemblies");
            ClassPathXmlApplicationContext ctx;           
           
            if (bootAssemblies != null)
View Full Code Here

    static PropertiesConfiguration getPropertiesConfig(String file) {
        PropertiesConfiguration config = new PropertiesConfiguration();
        if (existsFile(file)) {
            try {
                config.load(file);
            } catch (ConfigurationException e) {
                throw new IllegalArgumentException("Cannot load existing configuration file", e);
            }
        }
        config.setFileName(file);
View Full Code Here

        // need to flag internal JNDI on...
        System.setProperty(AbstractEngine.JNDI_SUPPORT_FLAG_KEY, "true");
       
        // create Engine
        PropertiesConfiguration config = new  PropertiesConfiguration();
        config.load(new FileInputStream("./src/webapp/WEB-INF/conf/jetspeed.properties"));
        Mock servletConfigMock = new Mock(ServletConfig.class);
        MockServletConfig msc = new MockServletConfig();
        msc.setServletContext(new MockServletContext());
        Engine engine = Jetspeed.createEngine(config, "./src/webapp", msc, SpringEngine.class);
View Full Code Here

                return null;
            }
            else
            {
                PropertiesConfiguration configuration = new PropertiesConfiguration();
                configuration.load(stream);
                return configuration;
            }
        }
        catch (Exception e1)
        {
View Full Code Here

    }

    private PropertiesConfiguration loadConfig() throws org.apache.commons.configuration.ConfigurationException,
            IOException {
        PropertiesConfiguration config = new PropertiesConfiguration();
        config.load(Resources.getResource("default.s4.core.properties").openStream());
        return config;
    }

    @Test
    public void testInitialDeploymentFromFileSystem() throws Exception {
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.