diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-11 13:50:13 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-11 13:50:13 +1300 |
commit | aa289b8600d9a55fdd053e003705de116ab25f2e (patch) | |
tree | 4d778f5b001f7eedc10dfae46603c92611fa8fe5 /src/org | |
parent | 16f2679a18d00270bd733292a11c67b38458bf7b (diff) | |
download | trackermap-server-aa289b8600d9a55fdd053e003705de116ab25f2e.tar.gz trackermap-server-aa289b8600d9a55fdd053e003705de116ab25f2e.tar.bz2 trackermap-server-aa289b8600d9a55fdd053e003705de116ab25f2e.zip |
Make changes to model hierarchy
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/model/Command.java | 35 | ||||
-rw-r--r-- | src/org/traccar/model/Event.java | 10 | ||||
-rw-r--r-- | src/org/traccar/model/Extensible.java | 2 | ||||
-rw-r--r-- | src/org/traccar/model/Message.java | 40 |
4 files changed, 56 insertions, 31 deletions
diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 09bb81a74..99525a02b 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -1,3 +1,18 @@ +/* + * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * + * 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 Command extends Extensible implements Factory { @@ -21,24 +36,4 @@ public class Command extends Extensible implements Factory { return new Command(); } - private long deviceId; - - public long getDeviceId() { - return deviceId; - } - - public void setDeviceId(long deviceId) { - this.deviceId = deviceId; - } - - private String type; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - } diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java index 586885c4a..172203a86 100644 --- a/src/org/traccar/model/Event.java +++ b/src/org/traccar/model/Event.java @@ -80,16 +80,6 @@ public abstract class Event extends Extensible { this.protocol = protocol; } - private long deviceId; - - public long getDeviceId() { - return deviceId; - } - - public void setDeviceId(long deviceId) { - this.deviceId = deviceId; - } - private Date serverTime; public Date getServerTime() { diff --git a/src/org/traccar/model/Extensible.java b/src/org/traccar/model/Extensible.java index d32fec61a..a821d0e43 100644 --- a/src/org/traccar/model/Extensible.java +++ b/src/org/traccar/model/Extensible.java @@ -18,7 +18,7 @@ package org.traccar.model; import java.util.LinkedHashMap; import java.util.Map; -public abstract class Extensible { +public abstract class Extensible extends Message { private Map<String, Object> attributes = new LinkedHashMap<>(); diff --git a/src/org/traccar/model/Message.java b/src/org/traccar/model/Message.java new file mode 100644 index 000000000..bac6661a8 --- /dev/null +++ b/src/org/traccar/model/Message.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013 - 2015 Anton Tananaev (anton.tananaev@gmail.com) + * + * 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 Message { + + private long deviceId; + + public long getDeviceId() { + return deviceId; + } + + public void setDeviceId(long deviceId) { + this.deviceId = deviceId; + } + + private String type; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + +} |