aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
commit014cf82a9e63a36e944e293932f9edf27e452919 (patch)
tree7ac5899f535fbf47e66dc1321738c951473a009b /src/main/java/org/traccar/model
parentce661ec77a957b70c15509c6801e6f34b32ad11d (diff)
downloadtrackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.gz
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.bz2
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.zip
No context dependency for decoder
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r--src/main/java/org/traccar/model/BaseModel.java6
-rw-r--r--src/main/java/org/traccar/model/CellTower.java14
2 files changed, 9 insertions, 11 deletions
diff --git a/src/main/java/org/traccar/model/BaseModel.java b/src/main/java/org/traccar/model/BaseModel.java
index 8bdb916e8..acde0f83d 100644
--- a/src/main/java/org/traccar/model/BaseModel.java
+++ b/src/main/java/org/traccar/model/BaseModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,11 +20,11 @@ public class BaseModel {
private long id;
- public final long getId() {
+ public long getId() {
return id;
}
- public final void setId(long id) {
+ public void setId(long id) {
this.id = id;
}
diff --git a/src/main/java/org/traccar/model/CellTower.java b/src/main/java/org/traccar/model/CellTower.java
index 254487471..af33b1f5c 100644
--- a/src/main/java/org/traccar/model/CellTower.java
+++ b/src/main/java/org/traccar/model/CellTower.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 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.
@@ -16,7 +16,7 @@
package org.traccar.model;
import com.fasterxml.jackson.annotation.JsonInclude;
-import org.traccar.Context;
+import org.traccar.config.Config;
import org.traccar.config.Keys;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -37,14 +37,12 @@ public class CellTower {
return cellTower;
}
- public static CellTower fromLacCid(int lac, long cid) {
- return from(
- Context.getConfig().getInteger(Keys.GEOLOCATION_MCC),
- Context.getConfig().getInteger(Keys.GEOLOCATION_MCC), lac, cid);
+ public static CellTower fromLacCid(Config config, int lac, long cid) {
+ return from(config.getInteger(Keys.GEOLOCATION_MCC), config.getInteger(Keys.GEOLOCATION_MCC), lac, cid);
}
- public static CellTower fromCidLac(long cid, int lac) {
- return fromLacCid(lac, cid);
+ public static CellTower fromCidLac(Config config, long cid, int lac) {
+ return fromLacCid(config, lac, cid);
}
private String radioType;