Examples of DefaultListDelimiterHandler


Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

        assertEquals("Wrong configuration class",
                PropertiesConfiguration.class, config.getClass());
        PropertiesConfiguration pconfig = (PropertiesConfiguration) config;
        assertTrue("Wrong exception flag",
                pconfig.isThrowExceptionOnMissing());
        DefaultListDelimiterHandler listHandler =
                (DefaultListDelimiterHandler) pconfig.getListDelimiterHandler();
        assertEquals("Wrong list delimiter", ';', listHandler.getDelimiter());
        assertTrue("Configuration not loaded",
                pconfig.getBoolean("configuration.loaded"));
        return builder;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

        else
        {
            config = new MapConfiguration(parameters);
        }

        config.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return config;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

     * Tests the force single line flag.
     */
    @Test
    public void testSaveForceSingleLine() throws ConfigurationException
    {
        config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
        config.addProperty(TEST_KEY, TEST_VALUE);
        config.addProperty(TEST_KEY, TEST_VALUE + "2");
        config.addProperty("AnotherProperty", "value1;value2;value3");
        layout.setComment(TEST_KEY, TEST_COMMENT);
        layout.setForceSingleLine(true);
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

        props.setProperty("int", "123");
        props.setProperty("list", "item 1, item 2");

        AbstractConfiguration config =
                (AbstractConfiguration) ConfigurationConverter.getConfiguration(props);
        config.setListDelimiterHandler(new DefaultListDelimiterHandler(','));

        assertEquals("This returns 'teststring'", "teststring", config.getString("string"));
        List<Object> item1 = config.getList("list");
        assertEquals("This returns 'item 1'", "item 1", item1.get(0));
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

     */
    @Test
    public void testConfigurationToPropertiesListDelimiterHandler()
    {
        BaseConfiguration config = createTestConfiguration();
        config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
        Properties props = ConfigurationConverter.getProperties(config);
        assertEquals("'array' property", "item 1;item 2", props.getProperty("array"));
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

                return config;
            }
        };

        ServletConfiguration servletConfiguration = new ServletConfiguration(servlet);
        servletConfiguration.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return servletConfiguration;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

        config.setInitParameter("key2", "value2");
        config.setInitParameter("list", "value1, value2");
        config.setInitParameter("listesc", "value1\\,value2");

        ServletFilterConfiguration resultConfig = new ServletFilterConfiguration(config);
        resultConfig.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return resultConfig;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

    @Test
    public void testConfiguration() throws Exception
    {
        DynamicCombinedConfiguration config = new DynamicCombinedConfiguration();
        DefaultListDelimiterHandler listHandler = new DefaultListDelimiterHandler(',');
        config.setListDelimiterHandler(listHandler);
        XPathExpressionEngine engine = new XPathExpressionEngine();
        config.setExpressionEngine(engine);
        config.setKeyPattern(PATTERN);
        ConfigurationBuilder<XMLConfiguration> multiBuilder =
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

                return new ConfigurationMap(base);
            }
        };

        ServletRequestConfiguration config = new ServletRequestConfiguration(request);
        config.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return config;
    }
View Full Code Here

Examples of org.apache.commons.configuration2.convert.DefaultListDelimiterHandler

                return config;
            }
        };

        ServletContextConfiguration resultConfig = new ServletContextConfiguration(servlet);
        resultConfig.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return resultConfig;
    }
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.