aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 07:29:09 -0300
committerIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 07:29:09 -0300
commit25eb3d86b97f8a0eb806f3e0c572d80c495257d6 (patch)
tree4e47ee8bd6247c725b912984069beeda8c9918cd /src/org/traccar/model
parent9339c709e5a6d521fd0bdd4b1221b909c0a888d6 (diff)
downloadtraccar-server-25eb3d86b97f8a0eb806f3e0c572d80c495257d6.tar.gz
traccar-server-25eb3d86b97f8a0eb806f3e0c572d80c495257d6.tar.bz2
traccar-server-25eb3d86b97f8a0eb806f3e0c572d80c495257d6.zip
replace database definition with comma separated list
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Notification.java41
1 files changed, 9 insertions, 32 deletions
diff --git a/src/org/traccar/model/Notification.java b/src/org/traccar/model/Notification.java
index 0d0b34cd4..0b632c861 100644
--- a/src/org/traccar/model/Notification.java
+++ b/src/org/traccar/model/Notification.java
@@ -40,46 +40,23 @@ 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;
-
- public boolean getMail() {
- return mail;
- }
+ private String transports;
- public void setMail(boolean mail) {
- this.mail = mail;
+ public String getTransports() {
+ return transports;
}
- private boolean sms;
-
- public boolean getSms() {
- return sms;
+ public void setTransports(String transports) {
+ this.transports = transports;
}
- public void setSms(boolean sms) {
- this.sms = sms;
- }
- public Set<String> getMethods() {
+ public Set<String> getTransportMethods() {
final Set<String> set = new HashSet<>();
- if (web) {
- set.add("web");
- }
- if (mail) {
- set.add("mail");
- }
- if (sms) {
- set.add("sms");
+ final String[] tmp = transports.split(",");
+ for (String t : tmp) {
+ set.add(t.trim());
}
return set;
}