diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-25 18:59:29 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 18:59:29 +1200 |
commit | 234223a179d3f5e390cf8a649158676f8c349e5c (patch) | |
tree | e40066f50ead2270bda27fd9ce2cbf4a702c09fd /src/org/traccar/Context.java | |
parent | 6253fa291c3a2962fef2076c0cbb0f4e1ca8a3b4 (diff) | |
parent | 68af658ea2ff9593e5be7a2b2cfcb75c744fd749 (diff) | |
download | trackermap-server-234223a179d3f5e390cf8a649158676f8c349e5c.tar.gz trackermap-server-234223a179d3f5e390cf8a649158676f8c349e5c.tar.bz2 trackermap-server-234223a179d3f5e390cf8a649158676f8c349e5c.zip |
Merge pull request #3388 from Abyss777/optimize_users
Move users management to separate manager
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index a4fc5b679..47472b1d4 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -38,6 +38,7 @@ import org.traccar.database.NotificationManager; import org.traccar.database.PermissionsManager; import org.traccar.database.GeofenceManager; import org.traccar.database.StatisticsManager; +import org.traccar.database.UsersManager; import org.traccar.geocoder.BingMapsGeocoder; import org.traccar.geocoder.FactualGeocoder; import org.traccar.geocoder.GeocodeFarmGeocoder; @@ -98,6 +99,12 @@ public final class Context { return mediaManager; } + private static UsersManager usersManager; + + public static UsersManager getUsersManager() { + return usersManager; + } + private static DeviceManager deviceManager; public static DeviceManager getDeviceManager() { @@ -233,6 +240,10 @@ public final class Context { } if (dataManager != null) { + usersManager = new UsersManager(dataManager); + } + + if (dataManager != null) { deviceManager = new DeviceManager(dataManager); } @@ -298,7 +309,7 @@ public final class Context { webServer = new WebServer(config, dataManager.getDataSource()); } - permissionsManager = new PermissionsManager(dataManager); + permissionsManager = new PermissionsManager(dataManager, usersManager); connectionManager = new ConnectionManager(); |