Package org.apache.commons.configuration

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


    private Object selectRepository(MailStore store, String type) throws Exception {
        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }
View Full Code Here


    private Object selectRepository(MailStore store, String type) throws Exception {
        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }

    /**
 
View Full Code Here

        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }

    /**
     * @see org.apache.james.mailrepository.lib.AbstractMailRepository#internalStore(Mail)
View Full Code Here

        MockMailStore mockStore = new MockMailStore();
        FilePersistentStreamRepository file_Persistent_Stream_Repository = new FilePersistentStreamRepository();
        file_Persistent_Stream_Repository.setFileSystem(fs);
        file_Persistent_Stream_Repository.setLog(new SimpleLog("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration2 = new DefaultConfigurationBuilder();
        defaultConfiguration2.addProperty("[@destinationURL]", "file://target/var/mr/testrepo");
        file_Persistent_Stream_Repository.configure(defaultConfiguration2);
        file_Persistent_Stream_Repository.init();
        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
       
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
View Full Code Here

        file_Persistent_Stream_Repository.configure(defaultConfiguration2);
        file_Persistent_Stream_Repository.init();
        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
       
        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.setStore(mockStore);
        mr.setDatasource(datasource);
View Full Code Here

        file_Persistent_Stream_Repository.init();
        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
       
        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.setStore(mockStore);
        mr.setDatasource(datasource);
        mr.setLog(new SimpleLog("MockLog"));
View Full Code Here

        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
       
        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.setStore(mockStore);
        mr.setDatasource(datasource);
        mr.setLog(new SimpleLog("MockLog"));
        mr.configure(defaultConfiguration);
View Full Code Here

     * @return DefaultConfiguration
     * @throws ConfigurationException
     */
    private HierarchicalConfiguration addHandler(String className) throws ConfigurationException {
        HierarchicalConfiguration hConf = new DefaultConfigurationBuilder();
        hConf.addProperty("handler.[@class]", className);
        return hConf;
    }
   
   
    /* (non-Javadoc)
 
View Full Code Here

        }

        try {
            DefaultConfigurationBuilder mailConf
                = new DefaultConfigurationBuilder();
            mailConf.addProperty("[@destinationURL]", repositoryPath);
            mailConf.addProperty("[@type]", "MAIL");
            repository = (MailRepository) mailStore.select(mailConf);
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
View Full Code Here

        try {
            DefaultConfigurationBuilder mailConf
                = new DefaultConfigurationBuilder();
            mailConf.addProperty("[@destinationURL]", repositoryPath);
            mailConf.addProperty("[@type]", "MAIL");
            repository = (MailRepository) mailStore.select(mailConf);
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
    }
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.