aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Events.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-08-08 11:55:27 +0500
committerAbyss777 <abyss@fox5.ru>2016-08-08 11:55:27 +0500
commit16771c045a3d6fdffad322e55b6d346c93a03f71 (patch)
tree0990e6387c8143e2da90cf3cc0e4b0184c9bc8b7 /src/org/traccar/reports/Events.java
parent24346c8afd219c607e18306aa509f6029d3e850c (diff)
downloadtrackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.tar.gz
trackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.tar.bz2
trackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.zip
- Used @Consumes and @Produces instead of direct header access
- Renamed General to Summary - Other changes
Diffstat (limited to 'src/org/traccar/reports/Events.java')
-rw-r--r--src/org/traccar/reports/Events.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/reports/Events.java b/src/org/traccar/reports/Events.java
index de4354371..9e14bd3db 100644
--- a/src/org/traccar/reports/Events.java
+++ b/src/org/traccar/reports/Events.java
@@ -20,7 +20,7 @@ public final class Events {
public static String getJson(long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Collection<String> types, Date from, Date to) throws SQLException {
JsonObjectBuilder json = Json.createObjectBuilder();
- for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) {
+ for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
for (String type : types) {
json.add(String.valueOf(deviceId), JsonConverter.arrayToJson(Context.getDataManager()
@@ -34,12 +34,12 @@ public final class Events {
Collection<String> types, Date from, Date to) throws SQLException {
CsvBuilder csv = new CsvBuilder();
csv.addHeaderLine(new Event());
- for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) {
+ for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
for (String type : types) {
csv.addArray(Context.getDataManager().getEvents(deviceId, type, from, to));
}
}
- return csv.get();
+ return csv.build();
}
}