aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-13 22:15:49 +1200
committerGitHub <noreply@github.com>2017-09-13 22:15:49 +1200
commit8a45a056b7e0814526904e915c3886b29ba2833a (patch)
treedc821e2134f4ae2c9881ce8de006a29b33da289f /src/org/traccar/Context.java
parente05f0b83a911c522123a5a2cd14d6c16bd2de027 (diff)
parent7530522cbca477cb822cb494ffe12480e5237934 (diff)
downloadtrackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.tar.gz
trackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.tar.bz2
trackermap-server-8a45a056b7e0814526904e915c3886b29ba2833a.zip
Merge pull request #3522 from Abyss777/saved_commands
Implement Saved Commands
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 87d8257ee..210d52429 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -26,6 +26,7 @@ import java.util.Properties;
import org.apache.velocity.app.VelocityEngine;
import org.eclipse.jetty.util.URIUtil;
import org.traccar.database.CalendarManager;
+import org.traccar.database.CommandsManager;
import org.traccar.database.AttributesManager;
import org.traccar.database.BaseObjectManager;
import org.traccar.database.ConnectionManager;
@@ -56,6 +57,7 @@ import org.traccar.helper.Log;
import org.traccar.model.Attribute;
import org.traccar.model.BaseModel;
import org.traccar.model.Calendar;
+import org.traccar.model.Command;
import org.traccar.model.Device;
import org.traccar.model.Driver;
import org.traccar.model.Geofence;
@@ -213,6 +215,12 @@ public final class Context {
return driversManager;
}
+ private static CommandsManager commandsManager;
+
+ public static CommandsManager getCommandsManager() {
+ return commandsManager;
+ }
+
private static StatisticsManager statisticsManager;
public static StatisticsManager getStatisticsManager() {
@@ -392,6 +400,8 @@ public final class Context {
driversManager = new DriversManager(dataManager);
+ commandsManager = new CommandsManager(dataManager);
+
statisticsManager = new StatisticsManager();
if (config.getBoolean("sms.smpp.enable")) {
@@ -421,6 +431,8 @@ public final class Context {
return (BaseObjectManager<T>) geofenceManager;
} else if (clazz.equals(Driver.class)) {
return (BaseObjectManager<T>) driversManager;
+ } else if (clazz.equals(Command.class)) {
+ return (BaseObjectManager<T>) commandsManager;
}
return null;
}