Examples of FileBasedBuilderParametersImpl


Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

    {
        File testFile =
                ConfigurationAssert
                        .getTestFile("testDigesterConfiguration.xml");
        ReloadingCombinedConfigurationBuilder confBuilder =
                builder.configure(new FileBasedBuilderParametersImpl()
                        .setFile(testFile));
        assertSame("Wrong configured builder instance", builder, confBuilder);
        builder.getConfiguration();
        CombinedReloadingController rc =
                (CombinedReloadingController) builder.getReloadingController();
View Full Code Here

Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

    @Test
    public void testNestedReloadableSources() throws ConfigurationException
    {
        File testFile =
                ConfigurationAssert.getTestFile("testCCReloadingNested.xml");
        builder.configure(new FileBasedBuilderParametersImpl()
                .setFile(testFile));
        builder.getConfiguration();
        CombinedReloadingController rc =
                (CombinedReloadingController) builder.getReloadingController();
        Collection<ReloadingController> subControllers = rc.getSubControllers();
View Full Code Here

Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

     * Tests whether initialization parameters are correctly processed.
     */
    @Test
    public void testInitWithParameters() throws ConfigurationException
    {
        FileBasedBuilderParametersImpl params =
                new FileBasedBuilderParametersImpl();
        params.setFile(ConfigurationAssert
                .getTestFile("testDigesterConfiguration.xml"));
        builder =
                new ReloadingCombinedConfigurationBuilder(
                        params.getParameters());
        CombinedConfiguration cc = builder.getConfiguration();
        assertTrue("Property not found", cc.getBoolean("test.boolean"));
    }
View Full Code Here

Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

    public void testOrderOfProperties() throws Exception
    {
        Collection<Object> beans = new ArrayList<Object>();
        params = new BasicBuilderParameters();
        beans.add(params);
        beans.add(new FileBasedBuilderParametersImpl());
        for (int i = 0; i < 32; i++)
        {
            beans.add(new BasicBuilderParameters());
        }
        MultiWrapDynaBean bean = new MultiWrapDynaBean(beans);
View Full Code Here

Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

    @Test
    public void testNested() throws Exception
    {
        CombinedConfigurationBuilder builder =
                new CombinedConfigurationBuilder();
        builder.configure(new FileBasedBuilderParametersImpl()
                .setFile(ConfigurationAssert.getTestFile(TEST_FILE)));
        Configuration config = builder.getConfiguration();
        Configuration subConf = config.subset("tables.table(0)");
        assertTrue(subConf.getKeys().hasNext());
        Configuration subSubConf = subConf.subset("fields.field(1)");
View Full Code Here

Examples of org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl

                .setDefinitionBuilderParameters(
                        parameters.fileBased().setFile(TEST_FILE))
                .registerChildDefaultsHandler(
                        FileBasedBuilderProperties.class,
                        new CopyObjectDefaultHandler(
                                new FileBasedBuilderParametersImpl()
                                        .setReloadingRefreshDelay(defRefresh)
                                        .setThrowExceptionOnMissing(true)))
                .registerChildDefaultsHandler(
                        XMLBuilderProperties.class,
                        new CopyObjectDefaultHandler(
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.