aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config/LookupContext.java
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-30 11:18:41 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-30 11:18:41 -0800
commit5d0bacea7ebdd169d55c7da0f7d6f3ae1ecf372f (patch)
tree1232cb272eb7163b214de692d0570601fbe435b4 /src/main/java/org/traccar/config/LookupContext.java
parentb7677cbcc610c775ba57fa82486e88f42a30d5bd (diff)
downloadtraccar-server-5d0bacea7ebdd169d55c7da0f7d6f3ae1ecf372f.tar.gz
traccar-server-5d0bacea7ebdd169d55c7da0f7d6f3ae1ecf372f.tar.bz2
traccar-server-5d0bacea7ebdd169d55c7da0f7d6f3ae1ecf372f.zip
Add lookup context classes
Diffstat (limited to 'src/main/java/org/traccar/config/LookupContext.java')
-rw-r--r--src/main/java/org/traccar/config/LookupContext.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/config/LookupContext.java b/src/main/java/org/traccar/config/LookupContext.java
new file mode 100644
index 000000000..e73e5a35e
--- /dev/null
+++ b/src/main/java/org/traccar/config/LookupContext.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2020 Anton Tananaev (anton@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.config;
+
+public interface LookupContext {
+
+ class Global implements LookupContext {
+ }
+
+ class User implements LookupContext {
+
+ private final long userId;
+
+ public long getUserId() {
+ return userId;
+ }
+
+ public User(long userId) {
+ this.userId = userId;
+ }
+
+ }
+
+ class Device implements LookupContext {
+
+ private final long deviceId;
+
+ public long getDeviceId() {
+ return deviceId;
+ }
+
+ public Device(long deviceId) {
+ this.deviceId = deviceId;
+ }
+
+ }
+
+}