aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/model/Command.java35
-rw-r--r--src/org/traccar/model/Event.java10
-rw-r--r--src/org/traccar/model/Extensible.java2
-rw-r--r--src/org/traccar/model/Message.java40
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;
+ }
+
+}