diff options
Diffstat (limited to 'src/org/traccar/model/Notification.java')
-rw-r--r-- | src/org/traccar/model/Notification.java | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/org/traccar/model/Notification.java b/src/org/traccar/model/Notification.java index cc80f2ae2..0b632c861 100644 --- a/src/org/traccar/model/Notification.java +++ b/src/org/traccar/model/Notification.java @@ -15,6 +15,9 @@ */ package org.traccar.model; +import java.util.HashSet; +import java.util.Set; + public class Notification extends ScheduledModel { private boolean always; @@ -37,33 +40,25 @@ public class Notification extends ScheduledModel { this.type = type; } - private boolean web; - - public boolean getWeb() { - return web; - } - - public void setWeb(boolean web) { - this.web = web; - } - private boolean mail; + private String transports; - public boolean getMail() { - return mail; + public String getTransports() { + return transports; } - public void setMail(boolean mail) { - this.mail = mail; + public void setTransports(String transports) { + this.transports = transports; } - private boolean sms; - public boolean getSms() { - return sms; + public Set<String> getTransportMethods() { + final Set<String> set = new HashSet<>(); + final String[] tmp = transports.split(","); + for (String t : tmp) { + set.add(t.trim()); + } + return set; } - public void setSms(boolean sms) { - this.sms = sms; - } } |