aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 14:15:24 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 14:15:24 +0500
commitb70e46560359a181b0136fa1c6b0400615bfc904 (patch)
tree540dab6edd4f4178113d4e1fc1a614052bb1edfd /src/org/traccar
parent253f11afa0e31d97d332ca3269111eff36ee347b (diff)
downloadtrackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.tar.gz
trackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.tar.bz2
trackermap-server-b70e46560359a181b0136fa1c6b0400615bfc904.zip
Rename MailMessage to FullMessage
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/api/resource/NotificationResource.java2
-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.java4
-rw-r--r--src/org/traccar/notification/NotificationMail.java6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/org/traccar/api/resource/NotificationResource.java b/src/org/traccar/api/resource/NotificationResource.java
index bec1ce3ab..0d7a7982d 100644
--- a/src/org/traccar/api/resource/NotificationResource.java
+++ b/src/org/traccar/api/resource/NotificationResource.java
@@ -48,7 +48,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
public Collection<Typed> get() {
return Context.getNotificationManager().getAllNotificationTypes();
}
-
+
@GET
@Path("notificators")
public Collection<Typed> getNotificators() {
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 {