1 package com.atlassian.mail.server;
2
3 import alt.javax.mail.Session;
4 import alt.javax.mail.Transport;
5 import com.atlassian.mail.MailException;
6
7 import javax.mail.Authenticator;
8 import java.util.List;
9 import java.util.Map;
10 import java.util.Properties;
11
12 public interface MailServerManager
13 {
14
15
16
17
18 String[] SERVER_TYPES = new String[]{"pop", "smtp"};
19
20 MailServer getMailServer(Long id) throws MailException;
21
22 MailServer getMailServer(String name) throws MailException;
23
24 Long create(MailServer mailServer) throws MailException;
25
26 void update(MailServer mailServer) throws MailException;
27
28 void delete(Long mailServerId) throws MailException;
29
30 List getServerNames() throws MailException;
31
32 List getSmtpMailServers() throws MailException;
33
34 List getPopMailServers() throws MailException;
35
36 SMTPMailServer getDefaultSMTPMailServer() throws MailException;
37
38 PopMailServer getDefaultPopMailServer() throws MailException;
39
40 Session getSession(Properties props, Authenticator auth) throws MailException;
41
42 void init(Map params);
43 }