Package org.apache.commons.configuration

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


    System.setProperty("wrapper.config", config);

    Configuration localConf = new BaseConfiguration();
    if (config != null)
      localConf.addProperty("wrapper.config", config);
    YajswConfigurationImpl _config = new YajswConfigurationImpl(localConf, true);

    _ahessianClient = new AHessianJmxClient(canonName, _config.getInt("wrapper.tray.port", 0));

    try
View Full Code Here


    {
      System.out.println("file not found "+f.getAbsolutePath());
      //return null;
    }
    Configuration localConf = new BaseConfiguration();
    localConf.addProperty("wrapper.config", config);
    YajswConfigurationImpl _config = new YajswConfigurationImpl(localConf, true);
    int port = _config.getInt("wrapper.jmx.rmi.port", Constants.DEFAULT_RMI_PORT);
    String xname = _config.getString("wrapper.console.title");
    if (xname == null)
      xname = _config.getString("wrapper.ntservice.name");
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

                    subVal = newPath;
                    log.debug("Now: " + subVal);
                }

                loaderConf.addProperty(subProperty + "." + subKey,
                        subVal);
            }

            log.info("Added " + key + " as a component");
        }
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

    {
        final Configuration configuration = new BaseConfiguration();
        ((BaseConfiguration) configuration).setListDelimiter('\0');
        configuration.setProperty("key1", "value1");
        configuration.setProperty("key2", "value2");
        configuration.addProperty("list", "value1");
        configuration.addProperty("list", "value2");
        configuration.addProperty("listesc", "value1\\,value2");

        return createConfiguration(configuration);
    }
View Full Code Here

        final Configuration configuration = new BaseConfiguration();
        ((BaseConfiguration) configuration).setListDelimiter('\0');
        configuration.setProperty("key1", "value1");
        configuration.setProperty("key2", "value2");
        configuration.addProperty("list", "value1");
        configuration.addProperty("list", "value2");
        configuration.addProperty("listesc", "value1\\,value2");

        return createConfiguration(configuration);
    }
View Full Code Here

        ((BaseConfiguration) configuration).setListDelimiter('\0');
        configuration.setProperty("key1", "value1");
        configuration.setProperty("key2", "value2");
        configuration.addProperty("list", "value1");
        configuration.addProperty("list", "value2");
        configuration.addProperty("listesc", "value1\\,value2");

        return createConfiguration(configuration);
    }

    protected AbstractConfiguration getEmptyConfiguration()
View Full Code Here

        String[] values =
        { "test1", "test2\\,test3", "test4\\,test5" };
        final String listKey = "test.list";
        BaseConfiguration config = new BaseConfiguration();
        config.setListDelimiter('\0');
        config.addProperty(listKey, values);
        assertEquals("Wrong number of list elements", values.length, config
                .getList(listKey).size());
        Configuration c = createConfiguration(config);
        List v = c.getList(listKey);
        assertEquals("Wrong number of elements in list", values.length, v
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.