|
|
|
@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory;
@@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -117,10 +118,17 @@ public class MailingList {
@@ -117,10 +118,17 @@ public class MailingList {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Map<String, Object> safeMap() { |
|
|
|
|
return Map.of(EMAIL, email, NAME, name, |
|
|
|
|
IMAP_HOST, imapHost, IMAP_PORT, imapPort, IMAP_USER, imapUser, |
|
|
|
|
SMTP_HOST, smtpHost, SMTP_PORT, smtpPort, SMTP_USER, smtpUser, |
|
|
|
|
STATE, stateString(state)); |
|
|
|
|
var map = new HashMap<String,Object>(); |
|
|
|
|
map.put(EMAIL,email); |
|
|
|
|
map.put(NAME, name); |
|
|
|
|
if (imapHost != null) map.put(IMAP_HOST, imapHost); |
|
|
|
|
if (imapPort != 0) map.put(IMAP_PORT, imapPort); |
|
|
|
|
if (imapUser != null) map.put(IMAP_USER, imapUser); |
|
|
|
|
if (smtpHost != null) map.put(SMTP_HOST, smtpHost); |
|
|
|
|
if (smtpPort != 0) map.put(SMTP_PORT, smtpPort); |
|
|
|
|
if (smtpUser != null) map.put(SMTP_USER, smtpUser); |
|
|
|
|
map.put(STATE, stateString(state)); |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static String stateString(int state) { |
|
|
|
|