Package org.apache.commons.configuration

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


        JDBCRecipientRewriteTable localVirtualUserTable = new JDBCRecipientRewriteTable();
        localVirtualUserTable.setLog(LoggerFactory.getLogger("MockLog"));
        localVirtualUserTable.setDataSource(getDataSource());
        localVirtualUserTable.setFileSystem(new MockFileSystem());
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "db://maildb/RecipientRewriteTable");
        defaultConfiguration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        localVirtualUserTable.configure(defaultConfiguration);
        localVirtualUserTable.init();
        return localVirtualUserTable;
    }
View Full Code Here


        localVirtualUserTable.setLog(LoggerFactory.getLogger("MockLog"));
        localVirtualUserTable.setDataSource(getDataSource());
        localVirtualUserTable.setFileSystem(new MockFileSystem());
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty("[@destinationURL]", "db://maildb/RecipientRewriteTable");
        defaultConfiguration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        localVirtualUserTable.configure(defaultConfiguration);
        localVirtualUserTable.init();
        return localVirtualUserTable;
    }
View Full Code Here

    protected void configureAbstractJdbcUsersRepository(AbstractJdbcUsersRepository res, String tableString) throws Exception {
        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = getDataSource();
        res.setDatasource(dataSource);
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("[@destinationURL]", "db://maildb/" + tableString);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        res.setLog(LoggerFactory.getLogger("MockLog"));
        res.configure(configuration);
        res.init();
    }
View Full Code Here

        res.setFileSystem(new MockFileSystem());
        DataSource dataSource = getDataSource();
        res.setDatasource(dataSource);
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("[@destinationURL]", "db://maildb/" + tableString);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        res.setLog(LoggerFactory.getLogger("MockLog"));
        res.configure(configuration);
        res.init();
    }
View Full Code Here

            if (filestore != null) {

                // prepare Configurations for stream repositories
                DefaultConfigurationBuilder streamConfiguration = new DefaultConfigurationBuilder();

                streamConfiguration.addProperty("[@destinationURL]", filestore);

                sr = new FilePersistentStreamRepository();
                sr.setLog(getLogger());
                sr.setFileSystem(fileSystem);
                sr.configure(streamConfiguration);
View Full Code Here

        DataSource dataSource = getDataSource();

        res.setDatasource(dataSource);

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("[@destinationURL]", "db://maildb/" + tableString);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        res.setLog(LoggerFactory.getLogger("MockLog"));
        res.configure(configuration);
        res.init();
    }
View Full Code Here

        res.setDatasource(dataSource);

        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("[@destinationURL]", "db://maildb/" + tableString);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        res.setLog(LoggerFactory.getLogger("MockLog"));
        res.configure(configuration);
        res.init();
    }
View Full Code Here

            HierarchicalConfiguration defConf = defaultConfigs.get(protocol);
            if (defConf != null) {
                config.addConfiguration(defConf);
            }
            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
            builder.addProperty("[@destinationURL]", destination);
            config.addConfiguration(builder);

            try {
                // Use the classloader which is used for bean instance stuff
                Class<MailRepository> clazz = (Class<MailRepository>) getBeanFactory().getBeanClassLoader().loadClass(repClass);
View Full Code Here

    @Override
    protected UsersRepository getUsersRepository() throws Exception {
        JCRUsersRepository repos = new JCRUsersRepository();
        repos.setRepository(repository);
        DefaultConfigurationBuilder config = new DefaultConfigurationBuilder();
        config.addProperty("username", "admin");
        config.addProperty("password", "test");
        repos.configure(config);
        repos.setLog(LoggerFactory.getLogger("MockLog"));
        return repos;
    }
View Full Code Here

    protected UsersRepository getUsersRepository() throws Exception {
        JCRUsersRepository repos = new JCRUsersRepository();
        repos.setRepository(repository);
        DefaultConfigurationBuilder config = new DefaultConfigurationBuilder();
        config.addProperty("username", "admin");
        config.addProperty("password", "test");
        repos.configure(config);
        repos.setLog(LoggerFactory.getLogger("MockLog"));
        return repos;
    }
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.