aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-04 10:52:23 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-04 10:52:23 -0700
commitb45b64ce97113c68ef6118665c4a8b0106249264 (patch)
tree7b0c8156bb070bf4b9aaaabaf6fc67bd457f73b4 /src
parent8c12ded81c5dce295fcb229c566209d784f55356 (diff)
downloadtrackermap-server-b45b64ce97113c68ef6118665c4a8b0106249264.tar.gz
trackermap-server-b45b64ce97113c68ef6118665c4a8b0106249264.tar.bz2
trackermap-server-b45b64ce97113c68ef6118665c4a8b0106249264.zip
Move common report classes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/Context.java2
-rw-r--r--src/main/java/org/traccar/MainModule.java2
-rw-r--r--src/main/java/org/traccar/handler/MotionHandler.java2
-rw-r--r--src/main/java/org/traccar/handler/events/MotionEventHandler.java4
-rw-r--r--src/main/java/org/traccar/notification/NotificationFormatter.java2
-rw-r--r--src/main/java/org/traccar/notification/TextTemplateFormatter.java2
-rw-r--r--src/main/java/org/traccar/reports/Events.java1
-rw-r--r--src/main/java/org/traccar/reports/Route.java1
-rw-r--r--src/main/java/org/traccar/reports/Stops.java1
-rw-r--r--src/main/java/org/traccar/reports/Summary.java1
-rw-r--r--src/main/java/org/traccar/reports/Trips.java1
-rw-r--r--src/main/java/org/traccar/reports/common/ReportUtils.java (renamed from src/main/java/org/traccar/reports/ReportUtils.java)3
-rw-r--r--src/main/java/org/traccar/reports/common/TripsConfig.java (renamed from src/main/java/org/traccar/reports/model/TripsConfig.java)2
-rw-r--r--src/test/java/org/traccar/handler/MotionHandlerTest.java2
-rw-r--r--src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java2
-rw-r--r--src/test/java/org/traccar/reports/ReportUtilsTest.java3
16 files changed, 18 insertions, 13 deletions
diff --git a/src/main/java/org/traccar/Context.java b/src/main/java/org/traccar/Context.java
index a833d0c52..dde98f505 100644
--- a/src/main/java/org/traccar/Context.java
+++ b/src/main/java/org/traccar/Context.java
@@ -48,7 +48,7 @@ import org.traccar.model.Notification;
import org.traccar.model.User;
import org.traccar.notification.EventForwarder;
import org.traccar.notification.NotificatorManager;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import org.traccar.session.ConnectionManager;
import org.traccar.sms.HttpSmsClient;
import org.traccar.sms.SmsManager;
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index 219a8fc11..fb70a51c6 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -58,7 +58,7 @@ import org.traccar.geolocation.UnwiredGeolocationProvider;
import org.traccar.handler.GeocoderHandler;
import org.traccar.handler.GeolocationHandler;
import org.traccar.handler.SpeedLimitHandler;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import org.traccar.sms.SmsManager;
import org.traccar.speedlimit.OverpassSpeedLimitProvider;
import org.traccar.speedlimit.SpeedLimitProvider;
diff --git a/src/main/java/org/traccar/handler/MotionHandler.java b/src/main/java/org/traccar/handler/MotionHandler.java
index 864eb455d..7b2c04ecf 100644
--- a/src/main/java/org/traccar/handler/MotionHandler.java
+++ b/src/main/java/org/traccar/handler/MotionHandler.java
@@ -19,7 +19,7 @@ package org.traccar.handler;
import io.netty.channel.ChannelHandler;
import org.traccar.BaseDataHandler;
import org.traccar.model.Position;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import javax.inject.Inject;
diff --git a/src/main/java/org/traccar/handler/events/MotionEventHandler.java b/src/main/java/org/traccar/handler/events/MotionEventHandler.java
index e27faf9ce..57d2bc1c5 100644
--- a/src/main/java/org/traccar/handler/events/MotionEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/MotionEventHandler.java
@@ -26,8 +26,8 @@ import org.traccar.model.Device;
import org.traccar.session.DeviceState;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import org.traccar.reports.ReportUtils;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.ReportUtils;
+import org.traccar.reports.common.TripsConfig;
import javax.inject.Inject;
diff --git a/src/main/java/org/traccar/notification/NotificationFormatter.java b/src/main/java/org/traccar/notification/NotificationFormatter.java
index 107426e06..30a862372 100644
--- a/src/main/java/org/traccar/notification/NotificationFormatter.java
+++ b/src/main/java/org/traccar/notification/NotificationFormatter.java
@@ -24,7 +24,7 @@ import org.traccar.model.Geofence;
import org.traccar.model.Maintenance;
import org.traccar.model.Position;
import org.traccar.model.User;
-import org.traccar.reports.ReportUtils;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.session.cache.CacheManager;
public final class NotificationFormatter {
diff --git a/src/main/java/org/traccar/notification/TextTemplateFormatter.java b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
index b7058c824..469de2d4a 100644
--- a/src/main/java/org/traccar/notification/TextTemplateFormatter.java
+++ b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.Context;
import org.traccar.model.User;
-import org.traccar.reports.ReportUtils;
+import org.traccar.reports.common.ReportUtils;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
diff --git a/src/main/java/org/traccar/reports/Events.java b/src/main/java/org/traccar/reports/Events.java
index 818142b16..c5db305ed 100644
--- a/src/main/java/org/traccar/reports/Events.java
+++ b/src/main/java/org/traccar/reports/Events.java
@@ -33,6 +33,7 @@ import org.traccar.model.Event;
import org.traccar.model.Geofence;
import org.traccar.model.Group;
import org.traccar.model.Maintenance;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.DeviceReport;
import org.traccar.storage.Storage;
import org.traccar.storage.StorageException;
diff --git a/src/main/java/org/traccar/reports/Route.java b/src/main/java/org/traccar/reports/Route.java
index 4a5edd295..d7745157a 100644
--- a/src/main/java/org/traccar/reports/Route.java
+++ b/src/main/java/org/traccar/reports/Route.java
@@ -29,6 +29,7 @@ import org.traccar.Context;
import org.traccar.model.Device;
import org.traccar.model.Group;
import org.traccar.model.Position;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.DeviceReport;
import org.traccar.storage.StorageException;
diff --git a/src/main/java/org/traccar/reports/Stops.java b/src/main/java/org/traccar/reports/Stops.java
index 36a4a7549..82eb62f66 100644
--- a/src/main/java/org/traccar/reports/Stops.java
+++ b/src/main/java/org/traccar/reports/Stops.java
@@ -32,6 +32,7 @@ import org.traccar.database.DeviceManager;
import org.traccar.database.IdentityManager;
import org.traccar.model.Device;
import org.traccar.model.Group;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.DeviceReport;
import org.traccar.reports.model.StopReport;
import org.traccar.storage.StorageException;
diff --git a/src/main/java/org/traccar/reports/Summary.java b/src/main/java/org/traccar/reports/Summary.java
index f00b1ca57..20d80a9f5 100644
--- a/src/main/java/org/traccar/reports/Summary.java
+++ b/src/main/java/org/traccar/reports/Summary.java
@@ -29,6 +29,7 @@ import org.jxls.util.JxlsHelper;
import org.traccar.Context;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.SummaryReport;
import org.traccar.storage.StorageException;
diff --git a/src/main/java/org/traccar/reports/Trips.java b/src/main/java/org/traccar/reports/Trips.java
index 1461b869e..58131debb 100644
--- a/src/main/java/org/traccar/reports/Trips.java
+++ b/src/main/java/org/traccar/reports/Trips.java
@@ -31,6 +31,7 @@ import org.traccar.database.DeviceManager;
import org.traccar.database.IdentityManager;
import org.traccar.model.Device;
import org.traccar.model.Group;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.DeviceReport;
import org.traccar.reports.model.TripReport;
import org.traccar.storage.StorageException;
diff --git a/src/main/java/org/traccar/reports/ReportUtils.java b/src/main/java/org/traccar/reports/common/ReportUtils.java
index 98a80a23e..27972b453 100644
--- a/src/main/java/org/traccar/reports/ReportUtils.java
+++ b/src/main/java/org/traccar/reports/common/ReportUtils.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.reports;
+package org.traccar.reports.common;
import org.apache.velocity.tools.generic.DateTool;
import org.apache.velocity.tools.generic.NumberTool;
@@ -40,7 +40,6 @@ import org.traccar.model.Position;
import org.traccar.reports.model.BaseReport;
import org.traccar.reports.model.StopReport;
import org.traccar.reports.model.TripReport;
-import org.traccar.reports.model.TripsConfig;
import org.traccar.storage.Storage;
import org.traccar.storage.StorageException;
import org.traccar.storage.query.Columns;
diff --git a/src/main/java/org/traccar/reports/model/TripsConfig.java b/src/main/java/org/traccar/reports/common/TripsConfig.java
index 34c445f8b..9a7cebafb 100644
--- a/src/main/java/org/traccar/reports/model/TripsConfig.java
+++ b/src/main/java/org/traccar/reports/common/TripsConfig.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.traccar.reports.model;
+package org.traccar.reports.common;
public class TripsConfig {
diff --git a/src/test/java/org/traccar/handler/MotionHandlerTest.java b/src/test/java/org/traccar/handler/MotionHandlerTest.java
index aa73ac60a..93fd16206 100644
--- a/src/test/java/org/traccar/handler/MotionHandlerTest.java
+++ b/src/test/java/org/traccar/handler/MotionHandlerTest.java
@@ -2,7 +2,7 @@ package org.traccar.handler;
import org.junit.Test;
import org.traccar.model.Position;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
diff --git a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
index 94dab4049..780d1b833 100644
--- a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
@@ -4,7 +4,7 @@ import org.junit.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import org.traccar.session.DeviceState;
import java.text.DateFormat;
diff --git a/src/test/java/org/traccar/reports/ReportUtilsTest.java b/src/test/java/org/traccar/reports/ReportUtilsTest.java
index be473a341..247e43499 100644
--- a/src/test/java/org/traccar/reports/ReportUtilsTest.java
+++ b/src/test/java/org/traccar/reports/ReportUtilsTest.java
@@ -5,9 +5,10 @@ import org.traccar.BaseTest;
import org.traccar.database.IdentityManager;
import org.traccar.model.Device;
import org.traccar.model.Position;
+import org.traccar.reports.common.ReportUtils;
import org.traccar.reports.model.StopReport;
import org.traccar.reports.model.TripReport;
-import org.traccar.reports.model.TripsConfig;
+import org.traccar.reports.common.TripsConfig;
import java.text.DateFormat;
import java.text.ParseException;