aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BaseProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-18 11:44:40 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-18 11:44:40 -0700
commit03b50c61afd7c9d7e19a76feb261147dd0f69588 (patch)
tree575f1737e3006c66844c1fa9e06a3323bac7746c /src/main/java/org/traccar/BaseProtocolEncoder.java
parentddbe4d7de6ae7590e2b927066312597efa129393 (diff)
downloadtrackermap-server-03b50c61afd7c9d7e19a76feb261147dd0f69588.tar.gz
trackermap-server-03b50c61afd7c9d7e19a76feb261147dd0f69588.tar.bz2
trackermap-server-03b50c61afd7c9d7e19a76feb261147dd0f69588.zip
Remove identity manager
Diffstat (limited to 'src/main/java/org/traccar/BaseProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/BaseProtocolEncoder.java15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolEncoder.java b/src/main/java/org/traccar/BaseProtocolEncoder.java
index 612d91c57..bc1180a08 100644
--- a/src/main/java/org/traccar/BaseProtocolEncoder.java
+++ b/src/main/java/org/traccar/BaseProtocolEncoder.java
@@ -21,10 +21,10 @@ import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.traccar.database.IdentityManager;
import org.traccar.helper.NetworkUtil;
import org.traccar.helper.model.AttributeUtil;
import org.traccar.model.Command;
+import org.traccar.model.Device;
import org.traccar.session.cache.CacheManager;
import javax.inject.Inject;
@@ -39,8 +39,6 @@ public abstract class BaseProtocolEncoder extends ChannelOutboundHandlerAdapter
private CacheManager cacheManager;
- private IdentityManager identityManager;
-
public BaseProtocolEncoder(Protocol protocol) {
this.protocol = protocol;
}
@@ -54,21 +52,12 @@ public abstract class BaseProtocolEncoder extends ChannelOutboundHandlerAdapter
this.cacheManager = cacheManager;
}
- public IdentityManager getIdentityManager() {
- return identityManager;
- }
-
- @Inject
- public void setIdentityManager(IdentityManager identityManager) {
- this.identityManager = identityManager;
- }
-
public String getProtocolName() {
return protocol != null ? protocol.getName() : PROTOCOL_UNKNOWN;
}
protected String getUniqueId(long deviceId) {
- return identityManager.getById(deviceId).getUniqueId();
+ return cacheManager.getObject(Device.class, deviceId).getUniqueId();
}
protected void initDevicePassword(Command command, String defaultPassword) {