diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-12 17:42:16 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-12 17:42:16 +0500 |
commit | 925806fe70e10e47bcc12eb8bcc4fe21a9ece220 (patch) | |
tree | a2972e4915f941699c6582b915c27189f28c63e4 /src/org/traccar/Context.java | |
parent | 195e7b5b45c08fa4fad4f9c8797f8807ded1dbea (diff) | |
download | trackermap-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.tar.gz trackermap-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.tar.bz2 trackermap-server-925806fe70e10e47bcc12eb8bcc4fe21a9ece220.zip |
Implement Saved Commands
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 12 |
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; } |