aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 09:22:22 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 09:22:22 +0500
commitaba402226403f8b3eb58cc01e8f536eb4104d35a (patch)
treeec884994ad90365fa9b385465a80391606f6d970 /src/org/traccar/model
parentc700bfdb66071ba224ddf01e9827e721562fed7a (diff)
parent575deac9e2df1cbd0601328f7ea7a9f22029fa43 (diff)
downloadtraccar-server-aba402226403f8b3eb58cc01e8f536eb4104d35a.tar.gz
traccar-server-aba402226403f8b3eb58cc01e8f536eb4104d35a.tar.bz2
traccar-server-aba402226403f8b3eb58cc01e8f536eb4104d35a.zip
Merge remote-tracking branch 'ivanfmartinez/notifications'
# Conflicts: # src/org/traccar/Context.java
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Notification.java35
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;
- }
}