diff options
author | Abyss777 <abyss@fox5.ru> | 2018-06-26 14:15:24 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-06-26 14:15:24 +0500 |
commit | b70e46560359a181b0136fa1c6b0400615bfc904 (patch) | |
tree | 540dab6edd4f4178113d4e1fc1a614052bb1edfd /src/org/traccar/notification | |
parent | 253f11afa0e31d97d332ca3269111eff36ee347b (diff) | |
download | trackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.tar.gz trackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.tar.bz2 trackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.zip |
Rename MailMessage to FullMessage
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r-- | src/org/traccar/notification/FullMessage.java (renamed from src/org/traccar/notification/MailMessage.java) | 4 | ||||
-rw-r--r-- | src/org/traccar/notification/NotificationFormatter.java | 4 | ||||
-rw-r--r-- | src/org/traccar/notification/NotificationMail.java | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/notification/MailMessage.java b/src/org/traccar/notification/FullMessage.java index 0fce43740..f66537c6e 100644 --- a/src/org/traccar/notification/MailMessage.java +++ b/src/org/traccar/notification/FullMessage.java @@ -16,12 +16,12 @@ */ package org.traccar.notification; -public class MailMessage { +public class FullMessage { private String subject; private String body; - public MailMessage(String subject, String body) { + public FullMessage(String subject, String body) { this.subject = subject; this.body = body; } diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java index ddc35227e..a1abdd0cc 100644 --- a/src/org/traccar/notification/NotificationFormatter.java +++ b/src/org/traccar/notification/NotificationFormatter.java @@ -88,12 +88,12 @@ public final class NotificationFormatter { return template; } - public static MailMessage formatFullMessage(long userId, Event event, Position position) { + public static FullMessage formatFullMessage(long userId, Event event, Position position) { String templatePath = Context.getConfig().getString("message.full.templatesPath", "full"); VelocityContext velocityContext = prepareContext(userId, event, position); String formattedMessage = formatMessage(velocityContext, userId, event, position, templatePath); - return new MailMessage((String) velocityContext.get("subject"), formattedMessage); + return new FullMessage((String) velocityContext.get("subject"), formattedMessage); } public static String formatShortMessage(long userId, Event event, Position position) { diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java index 76387c73b..808acca76 100644 --- a/src/org/traccar/notification/NotificationMail.java +++ b/src/org/traccar/notification/NotificationMail.java @@ -108,10 +108,10 @@ public final class NotificationMail extends Notificator { } message.addRecipient(Message.RecipientType.TO, new InternetAddress(user.getEmail())); - MailMessage mailMessage = NotificationFormatter.formatFullMessage(userId, event, position); - message.setSubject(mailMessage.getSubject()); + FullMessage fullMessage = NotificationFormatter.formatFullMessage(userId, event, position); + message.setSubject(fullMessage.getSubject()); message.setSentDate(new Date()); - message.setContent(mailMessage.getBody(), "text/html; charset=utf-8"); + message.setContent(fullMessage.getBody(), "text/html; charset=utf-8"); Transport transport = session.getTransport(); try { |