aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-31 21:07:43 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-05-31 21:07:43 +1200
commit62028d2d507f54ed50962bdb9dfb027baccb5e1c (patch)
tree91f783025d015c8153f87507e537f5eeb68caefc /src/org/traccar/Context.java
parent4519b449ed5eb64fb26ef891944147d0eaaf418b (diff)
downloadtrackermap-server-62028d2d507f54ed50962bdb9dfb027baccb5e1c.tar.gz
trackermap-server-62028d2d507f54ed50962bdb9dfb027baccb5e1c.tar.bz2
trackermap-server-62028d2d507f54ed50962bdb9dfb027baccb5e1c.zip
Add media manager class
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 07ede4cad..9626d949c 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -32,6 +32,7 @@ import org.traccar.database.ConnectionManager;
import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.IdentityManager;
+import org.traccar.database.MediaManager;
import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
import org.traccar.database.GeofenceManager;
@@ -90,6 +91,12 @@ public final class Context {
return dataManager;
}
+ private static MediaManager mediaManager;
+
+ public static MediaManager getMediaManager() {
+ return mediaManager;
+ }
+
private static DeviceManager deviceManager;
public static DeviceManager getDeviceManager() {
@@ -214,6 +221,10 @@ public final class Context {
dataManager = new DataManager(config);
}
+ if (config.hasKey("media.path")) {
+ mediaManager = new MediaManager(config);
+ }
+
if (dataManager != null) {
deviceManager = new DeviceManager(dataManager);
}