Package org.jconfig

Examples of org.jconfig.Configuration.removeProperty()


        }
    }
   
    public void removeProperty(String name, String category) {
        Configuration config = ConfigurationManager.getConfiguration(configName);
        config.removeProperty(name, category);
    }
   
    public void saveConfiguration() throws Exception {
        ConfigurationManager.getInstance().save(configName);
    }
View Full Code Here


        config.setProperty("max","10000","inner/myinner/moreinner");
        next = config.getProperty("max",null,"inner/myinner/moreinner");
        assertEquals("10000",next);
        next = config.getProperty("vartest","not set","inner/myinner/moreinner");
        assertEquals("VarValue-is here",next);
        config.removeProperty("max","inner/myinner/moreinner");
        next = config.getProperty("max",null,"inner/myinner/moreinner");
        assertEquals(null,next);
    }
   
     public void testCreateNewTopLevelCategory() {
View Full Code Here

        config.setProperty("max","10000","inner/myinner/moreinner");
        next = config.getProperty("max",null,"inner/myinner/moreinner");
        assertEquals("10000",next);
        next = config.getProperty("vartest","not set","inner/myinner/moreinner");
        assertEquals("VarValue-is here",next);
        config.removeProperty("max","inner/myinner/moreinner");
        next = config.getProperty("max",null,"inner/myinner/moreinner");
        assertEquals(null,next);
    }
   
    public void testParseCircularDependency() {
View Full Code Here

        assertEquals(var,"${my.path}/workflow.xml");
    }
   
    public void testRemoveProperty() {               
        Configuration cfg = getConfig();       
        cfg.removeProperty("delete");
        try {
            ConfigurationHandler handler = new MockJDBCHandler();       
            handler.store(cfg);           
        } catch (ConfigurationManagerException e) {           
        }
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.