Package org.apache.commons.configuration

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


        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


    @PostConstruct
    public void init() throws Exception {
        try {
            DefaultConfigurationBuilder reposConfiguration = new DefaultConfigurationBuilder();

            reposConfiguration.addProperty("[@destinationURL]", destination);
            objectRepository = new FilePersistentObjectRepository();
            objectRepository.setLog(getLogger());
            objectRepository.setFileSystem(fileSystem);
            objectRepository.configure(reposConfiguration);
            objectRepository.init();
View Full Code Here

        MockFileSystem fs = new MockFileSystem();
        DataSource datasource = getDataSource();
        JDBCMailRepository mr = new JDBCMailRepository();

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "db://maildb/mr/testrepo");
        defaultConfiguration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.setFileSystem(fs);
        mr.setDatasource(datasource);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
View Full Code Here

        DataSource datasource = getDataSource();
        JDBCMailRepository mr = new JDBCMailRepository();

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "db://maildb/mr/testrepo");
        defaultConfiguration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.setFileSystem(fs);
        mr.setDatasource(datasource);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        mr.configure(defaultConfiguration);
View Full Code Here

        JDBCMailRepository mr = new JDBCMailRepository();

        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "db://maildb/mr/testrepo");
        defaultConfiguration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        defaultConfiguration.addProperty("[@type]", "MAIL");
        mr.setFileSystem(fs);
        mr.setDatasource(datasource);
        mr.setLog(LoggerFactory.getLogger("MockLog"));
        mr.configure(defaultConfiguration);
        mr.init();
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.