Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.BaseConfiguration.addProperty()


    }

    BaseConfiguration conf = new BaseConfiguration();
    conf.addProperty(Engine.CONFIG_PACKAGES, packages);
    conf.addProperty(Engine.CONFIG_INPUT_PLUGINS, inputPlugins);
    conf.addProperty(Engine.CONFIG_OUTPUT_PLUGINS, outputPlugins);
    conf.addProperty(Engine.CONFIG_BASE_OUTPUT_DIR, f.getAbsolutePath());
    Engine eng = new Engine(conf);
    List<PackageContainer> parsedPackages = eng.execute();
    getLog().info(
        String.format("Parsed %d packages", parsedPackages.size()));
View Full Code Here


    BaseConfiguration conf = new BaseConfiguration();
    conf.addProperty(Engine.CONFIG_PACKAGES, packages);
    conf.addProperty(Engine.CONFIG_INPUT_PLUGINS, inputPlugins);
    conf.addProperty(Engine.CONFIG_OUTPUT_PLUGINS, outputPlugins);
    conf.addProperty(Engine.CONFIG_BASE_OUTPUT_DIR, f.getAbsolutePath());
    Engine eng = new Engine(conf);
    List<PackageContainer> parsedPackages = eng.execute();
    getLog().info(
        String.format("Parsed %d packages", parsedPackages.size()));
  }
View Full Code Here

    if (!f.exists()) {
      f.mkdirs();
    }

    BaseConfiguration conf = new BaseConfiguration();
    conf.addProperty(Engine.CONFIG_PACKAGES, packages);
    conf.addProperty(Engine.CONFIG_INPUT_PLUGINS, inputPlugins);
    conf.addProperty(Engine.CONFIG_OUTPUT_PLUGINS, outputPlugins);
    conf.addProperty(Engine.CONFIG_BASE_OUTPUT_DIR, f.getAbsolutePath());
    Engine eng = new Engine(conf);
    List<PackageContainer> parsedPackages = eng.execute();
View Full Code Here

      f.mkdirs();
    }

    BaseConfiguration conf = new BaseConfiguration();
    conf.addProperty(Engine.CONFIG_PACKAGES, packages);
    conf.addProperty(Engine.CONFIG_INPUT_PLUGINS, inputPlugins);
    conf.addProperty(Engine.CONFIG_OUTPUT_PLUGINS, outputPlugins);
    conf.addProperty(Engine.CONFIG_BASE_OUTPUT_DIR, f.getAbsolutePath());
    Engine eng = new Engine(conf);
    List<PackageContainer> parsedPackages = eng.execute();
    getLog().info(
View Full Code Here

        c = new Criteria();
        Criteria.Criterion cc =
            c.getNewCriterion("TABLE.COLUMN", Boolean.TRUE, Criteria.EQUAL);

        Configuration conf = new BaseConfiguration();
        conf.addProperty("driver", "org.postgresql.Driver");
        try
        {
            cc.setDB(DBFactory.create("org.postgresql.Driver"));
        }
        catch (Exception e)
View Full Code Here

        c = new Criteria();
        Criteria.Criterion cc =
            c.getNewCriterion("TABLE.COLUMN", Boolean.TRUE, Criteria.EQUAL);

        Configuration conf = new BaseConfiguration();
        conf.addProperty("driver", "org.postgresql.Driver");
        try
        {
            cc.setDB(DBFactory.create("org.postgresql.Driver"));
        }
        catch (Exception e)
View Full Code Here

    }
   
    @Test
    public void testDeletingPollingSource() throws Exception {
        BaseConfiguration config = new BaseConfiguration();
        config.addProperty("prop1", "original");
        DummyPollingSource source = new DummyPollingSource(false);       
        source.setFull("prop1=changed");
        FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 10, false);
        ConfigurationWithPollingSource pollingConfig = new ConfigurationWithPollingSource(config, source, scheduler);       
        Thread.sleep(200);
View Full Code Here

    }
   
    @Test
    public void testNoneDeletingPollingSource() throws Exception {
        BaseConfiguration config = new BaseConfiguration();
        config.addProperty("prop1", "original");
        DummyPollingSource source = new DummyPollingSource(false);          
        source.setFull("");
        FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 10, true);
        ConfigurationWithPollingSource pollingConfig = new ConfigurationWithPollingSource(config, source, scheduler);
        Thread.sleep(200);
View Full Code Here

    public void testIncrementalPollingSource() throws Exception {
        BaseConfiguration config = new BaseConfiguration();
        DynamicPropertyFactory.initWithConfigurationSource(config);
        DynamicStringProperty prop1 = new DynamicStringProperty("prop1", null);
        DynamicStringProperty prop2 = new DynamicStringProperty("prop2", null);
        config.addProperty("prop1", "original");
        DummyPollingSource source = new DummyPollingSource(true)
        FixedDelayPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 10, true);
        scheduler.setIgnoreDeletesFromSource(false);
        // ConfigurationWithPollingSource pollingConfig = new ConfigurationWithPollingSource(config, source,scheduler);
        scheduler.startPolling(source, config);
View Full Code Here

        for (int i = 0; i < names.length; i++)
        {
            String key = names[i];

            loaderConf.addProperty(COMPONENT + "." + NAME, key);

            String subProperty = COMPONENT + "." + key;
            Configuration subConf = getConfiguration().subset(key);

            for (Iterator it = subConf.getKeys(); it.hasNext();)
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.