diff options
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index 0a4da1172..cc7501c9a 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -19,6 +19,7 @@ import java.io.FileInputStream; import java.util.Properties; import org.traccar.database.ConnectionManager; import org.traccar.database.DataManager; +import org.traccar.database.IdentityManager; import org.traccar.database.PermissionsManager; import org.traccar.geocode.GisgraphyReverseGeocoder; import org.traccar.geocode.GoogleReverseGeocoder; @@ -40,6 +41,12 @@ public class Context { public static boolean isLoggerEnabled() { return loggerEnabled; } + + private static IdentityManager identityManager; + + public static IdentityManager getIdentityManager() { + return identityManager; + } private static DataManager dataManager; @@ -90,6 +97,7 @@ public class Context { } dataManager = new DataManager(properties); + identityManager = dataManager; connectionManager = new ConnectionManager(); if (!Boolean.valueOf(properties.getProperty("web.old"))) { @@ -120,10 +128,10 @@ public class Context { /** * Initialize context for unit testing */ - public static void init(DataManager dataManager) { + public static void init(IdentityManager identityManager) { properties = new Properties(); - Context.dataManager = dataManager; connectionManager = new ConnectionManager(); + Context.identityManager = identityManager; } } |