diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-08-24 23:14:30 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-08-24 23:14:30 -0700 |
commit | 297e330ead69b92a4723369098e7c4dbf7aa5694 (patch) | |
tree | 9643153ca03841a76e76789750e2d6769b673225 /src/main/java/org/traccar/Context.java | |
parent | 0a98b2b5471526d9d166c4b81f1500fd1edb60df (diff) | |
download | trackermap-server-297e330ead69b92a4723369098e7c4dbf7aa5694.tar.gz trackermap-server-297e330ead69b92a4723369098e7c4dbf7aa5694.tar.bz2 trackermap-server-297e330ead69b92a4723369098e7c4dbf7aa5694.zip |
Implement orders functionality
Diffstat (limited to 'src/main/java/org/traccar/Context.java')
-rw-r--r-- | src/main/java/org/traccar/Context.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/Context.java b/src/main/java/org/traccar/Context.java index fe494dabf..aeba9c4c9 100644 --- a/src/main/java/org/traccar/Context.java +++ b/src/main/java/org/traccar/Context.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2021 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. @@ -38,6 +38,7 @@ import org.traccar.database.MailManager; import org.traccar.database.MaintenancesManager; import org.traccar.database.MediaManager; import org.traccar.database.NotificationManager; +import org.traccar.database.OrderManager; import org.traccar.database.PermissionsManager; import org.traccar.database.UsersManager; import org.traccar.geocoder.Geocoder; @@ -53,6 +54,7 @@ import org.traccar.model.Geofence; import org.traccar.model.Group; import org.traccar.model.Maintenance; import org.traccar.model.Notification; +import org.traccar.model.Order; import org.traccar.model.User; import org.traccar.notification.EventForwarder; import org.traccar.notification.NotificatorManager; @@ -235,6 +237,12 @@ public final class Context { return maintenancesManager; } + private static OrderManager orderManager; + + public static OrderManager getOrderManager() { + return orderManager; + } + private static SmsManager smsManager; public static SmsManager getSmsManager() { @@ -337,6 +345,8 @@ public final class Context { commandsManager = new CommandsManager(dataManager, config.getBoolean(Keys.COMMANDS_QUEUEING)); + orderManager = new OrderManager(dataManager); + } private static void initEventsModule() { @@ -397,6 +407,8 @@ public final class Context { return (BaseObjectManager<T>) maintenancesManager; } else if (clazz.equals(Notification.class)) { return (BaseObjectManager<T>) notificationManager; + } else if (clazz.equals(Order.class)) { + return (BaseObjectManager<T>) orderManager; } return null; } |