1 19 20 package org.apache.james.imapserver.mock; 21 22 import org.apache.james.imapserver.ImapHandlerConfigurationData; 23 import org.apache.james.mailboxmanager.manager.MailboxManagerProvider; 24 import org.apache.james.services.MailServer; 25 import org.apache.james.services.UsersRepository; 26 27 public class MockImapHandlerConfigurationData implements 28 ImapHandlerConfigurationData 29 { 30 31 public MailServer mailServer; 32 public UsersRepository usersRepository = new MockUsersRepository(); 33 public MailboxManagerProvider mailboxManagerProvider; 34 35 public String getHelloName() 36 { 37 return "thats.my.host.org"; 38 } 39 40 public int getResetLength() 41 { 42 return 24*1024; 43 } 44 45 public MailServer getMailServer() 46 { 47 if (mailServer==null) { 48 mailServer=new MockMailServer(); 49 } 50 return mailServer; 51 } 52 53 public UsersRepository getUsersRepository() 54 { 55 56 return usersRepository; 57 } 58 59 60 public MailboxManagerProvider getMailboxManagerProvider() { 61 if (mailboxManagerProvider==null) { 62 try { 63 mailboxManagerProvider=MailboxManagerProviderSingleton.getMailboxManagerProviderInstance(); 64 } catch (Exception e) { 65 throw new RuntimeException (e); 66 } 67 } 68 return mailboxManagerProvider; 69 } 70 71 } 72 | Popular Tags |