aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/NotificationFormatter.java
diff options
context:
space:
mode:
authorSrk <watertext@hotmail.it>2017-11-20 19:55:11 +0100
committerSrk <watertext@hotmail.it>2017-11-20 19:55:11 +0100
commit0daa91ca51ecbb23a7f962fd64bfe5817f8eaa29 (patch)
treed584f67ce2c92116ecf1166c786cf6c63dfe0746 /src/org/traccar/notification/NotificationFormatter.java
parentf74749cac2709989fd627115248c7f363f77cc2b (diff)
downloadtrackermap-server-0daa91ca51ecbb23a7f962fd64bfe5817f8eaa29.tar.gz
trackermap-server-0daa91ca51ecbb23a7f962fd64bfe5817f8eaa29.tar.bz2
trackermap-server-0daa91ca51ecbb23a7f962fd64bfe5817f8eaa29.zip
Minor refactoring
Diffstat (limited to 'src/org/traccar/notification/NotificationFormatter.java')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index ba3fdbecb..114825a83 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -88,7 +88,7 @@ public final class NotificationFormatter {
public static MailMessage formatMailMessage(long userId, Event event, Position position) {
String templatePath = Context.getConfig().getString("mail.templatesPath", "mail");
VelocityContext velocityContext = prepareContext(userId, event, position);
- String formattedMessage = formatterLogic(velocityContext, userId, event, position, templatePath);
+ String formattedMessage = formatMessage(velocityContext, userId, event, position, templatePath);
return new MailMessage((String) velocityContext.get("subject"), formattedMessage);
}
@@ -96,10 +96,10 @@ public final class NotificationFormatter {
public static String formatSmsMessage(long userId, Event event, Position position) {
String templatePath = Context.getConfig().getString("sms.templatesPath", "sms");
- return formatterLogic(null, userId, event, position, templatePath);
+ return formatMessage(null, userId, event, position, templatePath);
}
- private static String formatterLogic(VelocityContext vc, Long userId, Event event, Position position,
+ private static String formatMessage(VelocityContext vc, Long userId, Event event, Position position,
String templatePath) {
VelocityContext velocityContext = vc;