Package org.apache.james.mailrepository.file

Examples of org.apache.james.mailrepository.file.FileMailRepository


     * @throws ConfigurationException
     * @throws Exception
     */
    protected MailRepository getMailRepository() throws Exception {
        MockFileSystem fs =  new MockFileSystem();
        FileMailRepository mr = new FileMailRepository();
        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");
        file_Persistent_Stream_Repository.configure(defaultConfiguration2);
        file_Persistent_Stream_Repository.init();
       
        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
        FilePersistentObjectRepository file_Persistent_Object_Repository = new FilePersistentObjectRepository();
        file_Persistent_Object_Repository.setFileSystem(fs);
        file_Persistent_Object_Repository.setLog(new SimpleLog("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration22 = new DefaultConfigurationBuilder();
        defaultConfiguration22.addProperty( "[@destinationURL]", "file://target/var/mr");
        file_Persistent_Object_Repository.configure(defaultConfiguration22);
        file_Persistent_Object_Repository.init();
        mockStore.add("OBJECT.mr", file_Persistent_Object_Repository);
        mr.setStore(mockStore);

        mr.setLog(new SimpleLog("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


     * @throws Exception
     */
    @Override
    protected MailRepository getMailRepository() throws Exception {
        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

TOP

Related Classes of org.apache.james.mailrepository.file.FileMailRepository

Copyright © 2018 www.massapicom. 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.