Package org.apache.commons.configuration

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


        DynamicStringProperty prop1 = factory.getStringProperty("prop1", null);
        DynamicStringProperty prop2 = factory.getStringProperty("prop2", null);
        DynamicStringProperty prop3 = factory.getStringProperty("prop3", null);
        DynamicStringProperty prop4 = factory.getStringProperty("prop4", null);
        AbstractConfiguration containerConfig = new ConcurrentMapConfiguration();
        containerConfig.addProperty("prop1", "prop1");
        containerConfig.addProperty("prop2", "prop2");
        AbstractConfiguration baseConfig = new ConcurrentMapConfiguration();
        baseConfig.addProperty("prop3", "prop3");
        baseConfig.addProperty("prop1", "prop1FromBase");
        // make container configuration the highest priority
View Full Code Here


        DynamicStringProperty prop2 = factory.getStringProperty("prop2", null);
        DynamicStringProperty prop3 = factory.getStringProperty("prop3", null);
        DynamicStringProperty prop4 = factory.getStringProperty("prop4", null);
        AbstractConfiguration containerConfig = new ConcurrentMapConfiguration();
        containerConfig.addProperty("prop1", "prop1");
        containerConfig.addProperty("prop2", "prop2");
        AbstractConfiguration baseConfig = new ConcurrentMapConfiguration();
        baseConfig.addProperty("prop3", "prop3");
        baseConfig.addProperty("prop1", "prop1FromBase");
        // make container configuration the highest priority
        config.setContainerConfiguration(containerConfig, "container configuration", 0);
View Full Code Here

        DynamicStringProperty prop4 = factory.getStringProperty("prop4", null);
        AbstractConfiguration containerConfig = new ConcurrentMapConfiguration();
        containerConfig.addProperty("prop1", "prop1");
        containerConfig.addProperty("prop2", "prop2");
        AbstractConfiguration baseConfig = new ConcurrentMapConfiguration();
        baseConfig.addProperty("prop3", "prop3");
        baseConfig.addProperty("prop1", "prop1FromBase");
        // make container configuration the highest priority
        config.setContainerConfiguration(containerConfig, "container configuration", 0);
        config.addConfiguration(baseConfig, "base configuration");
        assertEquals("prop1", config.getProperty("prop1"));
View Full Code Here

        AbstractConfiguration containerConfig = new ConcurrentMapConfiguration();
        containerConfig.addProperty("prop1", "prop1");
        containerConfig.addProperty("prop2", "prop2");
        AbstractConfiguration baseConfig = new ConcurrentMapConfiguration();
        baseConfig.addProperty("prop3", "prop3");
        baseConfig.addProperty("prop1", "prop1FromBase");
        // make container configuration the highest priority
        config.setContainerConfiguration(containerConfig, "container configuration", 0);
        config.addConfiguration(baseConfig, "base configuration");
        assertEquals("prop1", config.getProperty("prop1"));
        assertEquals("prop1", prop1.get());
View Full Code Here

        assertEquals("prop2", prop2.get());
        assertEquals("prop3", prop3.get());
        containerConfig.setProperty("prop1", "newvalue");
        assertEquals("newvalue", prop1.get());
        assertEquals("newvalue", config.getProperty("prop1"));
        baseConfig.addProperty("prop4", "prop4");
        assertEquals("prop4", config.getProperty("prop4"));
        assertEquals("prop4", prop4.get());
        baseConfig.setProperty("prop1", "newvaluefrombase");
        assertEquals("newvalue", prop1.get());
        containerConfig.clearProperty("prop1");
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.