aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-05 11:59:04 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-05 11:59:04 +1200
commitb1b22e5339d53f8b6eadb190432f4761f0380ff7 (patch)
tree06cfd5dd52ed59d89346341cad4b6fd21e37d7ec /src/org/traccar/Context.java
parentccd93309bdcd282abb14e68b462c97960ccf2f96 (diff)
downloadtrackermap-server-b1b22e5339d53f8b6eadb190432f4761f0380ff7.tar.gz
trackermap-server-b1b22e5339d53f8b6eadb190432f4761f0380ff7.tar.bz2
trackermap-server-b1b22e5339d53f8b6eadb190432f4761f0380ff7.zip
Separate identity manager interface
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java12
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;
}
}