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