From 94a2a94330d82fa1c1960b8783e5061c188196e3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 4 Jun 2022 10:55:50 -0700 Subject: Rename report models --- src/main/java/org/traccar/reports/Stops.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main/java/org/traccar/reports/Stops.java') diff --git a/src/main/java/org/traccar/reports/Stops.java b/src/main/java/org/traccar/reports/Stops.java index 82eb62f66..e688d53da 100644 --- a/src/main/java/org/traccar/reports/Stops.java +++ b/src/main/java/org/traccar/reports/Stops.java @@ -33,8 +33,8 @@ 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.reports.model.DeviceReportSection; +import org.traccar.reports.model.StopReportItem; import org.traccar.storage.StorageException; public final class Stops { @@ -42,7 +42,7 @@ public final class Stops { private Stops() { } - private static Collection detectStops(long deviceId, Date from, Date to) throws StorageException { + private static Collection detectStops(long deviceId, Date from, Date to) throws StorageException { boolean ignoreOdometer = Context.getDeviceManager() .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, false, true); @@ -51,14 +51,14 @@ public final class Stops { return ReportUtils.detectTripsAndStops( identityManager, deviceManager, Context.getDataManager().getPositions(deviceId, from, to), - Context.getTripsConfig(), ignoreOdometer, StopReport.class); + Context.getTripsConfig(), ignoreOdometer, StopReportItem.class); } - public static Collection getObjects( + public static Collection getObjects( long userId, Collection deviceIds, Collection groupIds, Date from, Date to) throws StorageException { ReportUtils.checkPeriodLimit(from, to); - ArrayList result = new ArrayList<>(); + ArrayList result = new ArrayList<>(); for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); result.addAll(detectStops(deviceId, from, to)); @@ -70,12 +70,12 @@ public final class Stops { OutputStream outputStream, long userId, Collection deviceIds, Collection groupIds, Date from, Date to) throws StorageException, IOException { ReportUtils.checkPeriodLimit(from, to); - ArrayList devicesStops = new ArrayList<>(); + ArrayList devicesStops = new ArrayList<>(); ArrayList sheetNames = new ArrayList<>(); for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); - Collection stops = detectStops(deviceId, from, to); - DeviceReport deviceStops = new DeviceReport(); + Collection stops = detectStops(deviceId, from, to); + DeviceReportSection deviceStops = new DeviceReportSection(); Device device = Context.getIdentityManager().getById(deviceId); deviceStops.setDeviceName(device.getName()); sheetNames.add(WorkbookUtil.createSafeSheetName(deviceStops.getDeviceName())); -- cgit v1.2.3