Package org.apache.commons.configuration

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


                valueBuilder.append(values[i]);
                if (i + 1 < values.length) {
                    valueBuilder.append(",");
                }
            }
            builder.addProperty(key, valueBuilder.toString());
        }

        configuration = builder;
    }
View Full Code Here


        try {
            // TODO Check how to remove this!
            // prepare Configurations for object and stream repositories
            final DefaultConfigurationBuilder objectConfiguration = new DefaultConfigurationBuilder();

            objectConfiguration.addProperty("[@destinationURL]", destination);

            objectRepository = new FilePersistentObjectRepository();
            objectRepository.setLog(getLogger());
            objectRepository.setFileSystem(fileSystem);
            objectRepository.configure(objectConfiguration);
View Full Code Here

public class XMLDomainListTest {

    private HierarchicalConfiguration setUpConfiguration(boolean auto, boolean autoIP, List<String> names) {
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();

        configuration.addProperty("autodetect", auto);
        configuration.addProperty("autodetectIP", autoIP);
        for (String name : names) {
            configuration.addProperty("domainnames.domainname", name);
        }
        return configuration;
View Full Code Here

    private HierarchicalConfiguration setUpConfiguration(boolean auto, boolean autoIP, List<String> names) {
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();

        configuration.addProperty("autodetect", auto);
        configuration.addProperty("autodetectIP", autoIP);
        for (String name : names) {
            configuration.addProperty("domainnames.domainname", name);
        }
        return configuration;
    }
View Full Code Here

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();

        configuration.addProperty("autodetect", auto);
        configuration.addProperty("autodetectIP", autoIP);
        for (String name : names) {
            configuration.addProperty("domainnames.domainname", name);
        }
        return configuration;
    }

    private DNSService setUpDNSServer(final String hostName) {
View Full Code Here

        MockFileSystem fs = new MockFileSystem();
        FileMailRepository mr = new FileMailRepository();
        mr.setFileSystem(fs);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "file://target/var/mr");
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.configure(defaultConfiguration);
        mr.init();
        return mr;
    }
View Full Code Here

        FileMailRepository mr = new FileMailRepository();
        mr.setFileSystem(fs);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "file://target/var/mr");
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.configure(defaultConfiguration);
        mr.init();
        return mr;
    }
View Full Code Here

            }

        };

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder("test");
        configuration.addProperty("destination.[@URL]", "file://target/var/users");
        // Configure with ignoreCase = false, we need some more work to support true
        configuration.addProperty("ignoreCase", "false");

        UsersFileRepository res = new UsersFileRepository();
View Full Code Here

        };

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder("test");
        configuration.addProperty("destination.[@URL]", "file://target/var/users");
        // Configure with ignoreCase = false, we need some more work to support true
        configuration.addProperty("ignoreCase", "false");

        UsersFileRepository res = new UsersFileRepository();

        res.setFileSystem(fs);
        res.setLog(LoggerFactory.getLogger("MockLog"));
View Full Code Here

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();

        File fInbox = new MockFileSystem().getFile("file://conf/org/apache/james/mailrepository/testdata/Inbox");
        String mboxPath = "mbox://" + fInbox.toURI().toString().substring(new File("").toURI().toString().length());

        defaultConfiguration.addProperty("[@destinationURL]", mboxPath);
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        mr.configure(defaultConfiguration);

        return mr;
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.