aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-16 19:10:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-16 19:10:15 +1300
commitfdebc0f3b0453f7898090be98a3edf9664083471 (patch)
treed3dc4143a3d7d722edaa1ea919ed26f597bb9477 /src/org/traccar/web/client
parent92bd56c8bb8a63cf34a19a6197d988ffc671de6c (diff)
downloadetbsa-traccar-web-fdebc0f3b0453f7898090be98a3edf9664083471.tar.gz
etbsa-traccar-web-fdebc0f3b0453f7898090be98a3edf9664083471.tar.bz2
etbsa-traccar-web-fdebc0f3b0453f7898090be98a3edf9664083471.zip
Created settings classes
Diffstat (limited to 'src/org/traccar/web/client')
-rw-r--r--src/org/traccar/web/client/Context.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/Context.java b/src/org/traccar/web/client/Context.java
new file mode 100644
index 0000000..6cc6f0c
--- /dev/null
+++ b/src/org/traccar/web/client/Context.java
@@ -0,0 +1,42 @@
+package org.traccar.web.client;
+
+import org.traccar.web.shared.model.ApplicationSettings;
+import org.traccar.web.shared.model.UserSettings;
+
+public class Context {
+
+ private static final Context context = new Context();
+
+ public Context getInstance() {
+ return context;
+ }
+
+ private ApplicationSettings applicationSettings;
+
+ public void setApplicationSettings(ApplicationSettings applicationSettings) {
+ this.applicationSettings = applicationSettings;
+ }
+
+ public ApplicationSettings getApplicationSettings() {
+ if (applicationSettings != null) {
+ return applicationSettings;
+ } else {
+ return new ApplicationSettings(); // default settings
+ }
+ }
+
+ private UserSettings userSettings;
+
+ public void setUserSettings(UserSettings userSettings) {
+ this.userSettings = userSettings;
+ }
+
+ public UserSettings getUserSettings() {
+ if (userSettings != null) {
+ return userSettings;
+ } else {
+ return new UserSettings(); // default settings
+ }
+ }
+
+}