diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-23 22:15:29 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 22:15:29 +1300 |
commit | 00534cbfde4883dc6264aef1d7a913b89a712fb1 (patch) | |
tree | 21f687b4fcbb8d66d91b96c7b1b0a704ec139f26 /src/org/traccar/model | |
parent | e2e0501877c501cdf09158684df046e4e4c41734 (diff) | |
parent | 2fc0683c9611c55997e85c5775a8b82f71b575ae (diff) | |
download | trackermap-server-00534cbfde4883dc6264aef1d7a913b89a712fb1.tar.gz trackermap-server-00534cbfde4883dc6264aef1d7a913b89a712fb1.tar.bz2 trackermap-server-00534cbfde4883dc6264aef1d7a913b89a712fb1.zip |
Merge pull request #3736 from Abyss777/notification_calendar
Implement scheduled notifications
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r-- | src/org/traccar/model/Geofence.java | 12 | ||||
-rw-r--r-- | src/org/traccar/model/Notification.java | 4 | ||||
-rw-r--r-- | src/org/traccar/model/ScheduledModel.java | 30 |
3 files changed, 33 insertions, 13 deletions
diff --git a/src/org/traccar/model/Geofence.java b/src/org/traccar/model/Geofence.java index 21c196da9..7042325dc 100644 --- a/src/org/traccar/model/Geofence.java +++ b/src/org/traccar/model/Geofence.java @@ -26,7 +26,7 @@ import org.traccar.geofence.GeofencePolyline; import com.fasterxml.jackson.annotation.JsonIgnore; -public class Geofence extends ExtendedModel { +public class Geofence extends ScheduledModel { public static final String TYPE_GEOFENCE_CILCLE = "geofenceCircle"; public static final String TYPE_GEOFENCE_POLYGON = "geofencePolygon"; @@ -87,14 +87,4 @@ public class Geofence extends ExtendedModel { area = geometry.toWkt(); this.geometry = geometry; } - - private long calendarId; - - public long getCalendarId() { - return calendarId; - } - - public void setCalendarId(long calendarId) { - this.calendarId = calendarId; - } } diff --git a/src/org/traccar/model/Notification.java b/src/org/traccar/model/Notification.java index 9d6034fff..cc80f2ae2 100644 --- a/src/org/traccar/model/Notification.java +++ b/src/org/traccar/model/Notification.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package org.traccar.model; -public class Notification extends ExtendedModel { +public class Notification extends ScheduledModel { private boolean always; diff --git a/src/org/traccar/model/ScheduledModel.java b/src/org/traccar/model/ScheduledModel.java new file mode 100644 index 000000000..9e6a4b9a6 --- /dev/null +++ b/src/org/traccar/model/ScheduledModel.java @@ -0,0 +1,30 @@ +/* + * Copyright 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2018 Andrey Kunitsyn (andrey@traccar.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.traccar.model; + +public class ScheduledModel extends ExtendedModel { + + private long calendarId; + + public long getCalendarId() { + return calendarId; + } + + public void setCalendarId(long calendarId) { + this.calendarId = calendarId; + } +} |