diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-29 23:11:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-29 23:40:28 +1200 |
commit | 6a218f0d3ab2644a3338f46ac40beac235772fcf (patch) | |
tree | ffb23b7184e92cf30c5920b1dc7e5e04667edbe6 /src/org/traccar/notification | |
parent | 83764daf8bc91ccbc23410f70e937b8c19f562d7 (diff) | |
download | trackermap-server-6a218f0d3ab2644a3338f46ac40beac235772fcf.tar.gz trackermap-server-6a218f0d3ab2644a3338f46ac40beac235772fcf.tar.bz2 trackermap-server-6a218f0d3ab2644a3338f46ac40beac235772fcf.zip |
Re-implement mail notificator
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r-- | src/org/traccar/notification/NotificatorManager.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/notification/NotificatorManager.java b/src/org/traccar/notification/NotificatorManager.java index 41678d65c..a4080a38d 100644 --- a/src/org/traccar/notification/NotificatorManager.java +++ b/src/org/traccar/notification/NotificatorManager.java @@ -25,20 +25,20 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.traccar.Context; import org.traccar.model.Typed; +import org.traccar.notificators.NotificatorFirebase; +import org.traccar.notificators.NotificatorMail; import org.traccar.notificators.NotificatorNull; import org.traccar.notificators.Notificator; +import org.traccar.notificators.NotificatorSms; +import org.traccar.notificators.NotificatorWeb; public final class NotificatorManager { private static final Logger LOGGER = LoggerFactory.getLogger(NotificatorManager.class); - private static final String DEFAULT_WEB_NOTIFICATOR = "org.traccar.notificators.NotificatorWeb"; - private static final String DEFAULT_MAIL_NOTIFICATOR = "org.traccar.notificators.NotificatorMail"; - private static final String DEFAULT_SMS_NOTIFICATOR = "org.traccar.notificators.NotificatorSms"; - private static final String DEFAULT_FIREBASE_NOTIFICATOR = "org.traccar.notificators.NotificatorFirebase"; + private static final Notificator NULL_NOTIFICATOR = new NotificatorNull(); private final Map<String, Notificator> notificators = new HashMap<>(); - private static final Notificator NULL_NOTIFICATOR = new NotificatorNull(); public NotificatorManager() { final String[] types = Context.getConfig().getString("notificator.types", "").split(","); @@ -46,16 +46,16 @@ public final class NotificatorManager { String defaultNotificator = ""; switch (type) { case "web": - defaultNotificator = DEFAULT_WEB_NOTIFICATOR; + defaultNotificator = NotificatorWeb.class.getCanonicalName(); break; case "mail": - defaultNotificator = DEFAULT_MAIL_NOTIFICATOR; + defaultNotificator = NotificatorMail.class.getCanonicalName(); break; case "sms": - defaultNotificator = DEFAULT_SMS_NOTIFICATOR; + defaultNotificator = NotificatorSms.class.getCanonicalName(); break; case "firebase": - defaultNotificator = DEFAULT_FIREBASE_NOTIFICATOR; + defaultNotificator = NotificatorFirebase.class.getCanonicalName(); break; default: break; |