java/com.sap.sailing.awssensorfixstore/src/com/sap/sailing/awssensorfixstore/impl/AwsSensorFixStore.java
... ...
@@ -36,14 +36,14 @@ public class AwsSensorFixStore implements SensorFixStore {
36 36
}
37 37
38 38
@Override
39
- public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix, boolean filterByRegattaAndEventEndDate) {
39
+ public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix) {
40 40
// TODO Auto-generated method stub
41 41
42 42
}
43 43
44 44
@Override
45 45
public <FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> storeFixes(
46
- DeviceIdentifier device, Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
46
+ DeviceIdentifier device, Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay) {
47 47
// TODO Auto-generated method stub
48 48
return null;
49 49
}
java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/racelog/tracking/impl/MongoSensorFixStoreImpl.java
... ...
@@ -204,7 +204,7 @@ public class MongoSensorFixStoreImpl extends MongoFixHandler implements MongoSen
204 204
*/
205 205
@Override
206 206
public <FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> storeFixes(DeviceIdentifier device,
207
- Iterable<FixT> fixes, boolean returnManeuverChanges, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
207
+ Iterable<FixT> fixes, boolean returnManeuverChanges, boolean returnLiveDelay) {
208 208
final Set<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> racesWithManeuverChangesOrLiveDelay = new HashSet<>();
209 209
if (!Util.isEmpty(fixes)) {
210 210
try {
... ...
@@ -235,18 +235,18 @@ public class MongoSensorFixStoreImpl extends MongoFixHandler implements MongoSen
235 235
} catch (TransformationException e) {
236 236
logger.log(Level.WARNING, "Could not store fix in MongoDB", e);
237 237
}
238
- Util.addAll(notifyListeners(device, fixes, returnManeuverChanges, returnLiveDelay, filterByRegattaAndEventEndDate), racesWithManeuverChangesOrLiveDelay);
238
+ Util.addAll(notifyListeners(device, fixes, returnManeuverChanges, returnLiveDelay), racesWithManeuverChangesOrLiveDelay);
239 239
}
240 240
return racesWithManeuverChangesOrLiveDelay;
241 241
}
242 242
243 243
@Override
244
- public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix, boolean filterByRegattaAndEventEndDate) {
245
- storeFixes(device, Collections.singletonList(fix), /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
244
+ public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix) {
245
+ storeFixes(device, Collections.singletonList(fix), /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
246 246
}
247 247
248 248
private <FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> notifyListeners(DeviceIdentifier device,
249
- Iterable<FixT> fixes, boolean returnManeuverChanges, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
249
+ Iterable<FixT> fixes, boolean returnManeuverChanges, boolean returnLiveDelay) {
250 250
final Set<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> raceWithChangedManeuver = new HashSet<>();
251 251
@SuppressWarnings({ "unchecked", "rawtypes" })
252 252
final Map<DeviceIdentifier, Set<FixReceivedListener<FixT>>> listenersWithFixType = (Map) listeners;
... ...
@@ -257,7 +257,7 @@ public class MongoSensorFixStoreImpl extends MongoFixHandler implements MongoSen
257 257
for (FixT fix : fixes) {
258 258
for (FixReceivedListener<FixT> listener : listenersToInform) {
259 259
final Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> racesWithManeuverChangeFromListener =
260
- listener.fixReceived(device, fix, returnManeuverChanges, returnLiveDelay, filterByRegattaAndEventEndDate);
260
+ listener.fixReceived(device, fix, returnManeuverChanges, returnLiveDelay);
261 261
Util.addAll(racesWithManeuverChangeFromListener, raceWithChangedManeuver);
262 262
}
263 263
}
java/com.sap.sailing.domain.queclinkadapter/src/com/sap/sailing/domain/queclinkadapter/impl/PositionRelatedReportToGPSFixConverter.java
... ...
@@ -40,6 +40,6 @@ public class PositionRelatedReportToGPSFixConverter {
40 40
public void ingestFixesToStore(SensorFixStore store, FRIReport fixesReceived) {
41 41
final SmartphoneImeiIdentifier deviceIdentifier = getDeviceIdentifier(fixesReceived);
42 42
final Iterable<GPSFix> fixes = Util.map(Arrays.asList(fixesReceived.getPositionRelatedReports()), this::createGPSFixFromPositionRelatedReport);
43
- store.storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
43
+ store.storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
44 44
}
45 45
}
... ...
\ No newline at end of file
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/CreateAndTrackWithRaceLogTest.java
... ...
@@ -8,7 +8,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
8 8
9 9
import java.io.FileNotFoundException;
10 10
import java.io.IOException;
11
-import java.io.Serializable;
12 11
import java.net.MalformedURLException;
13 12
import java.net.URISyntaxException;
14 13
import java.net.UnknownHostException;
... ...
@@ -39,7 +38,6 @@ import com.sap.sailing.domain.base.BoatClass;
39 38
import com.sap.sailing.domain.base.Competitor;
40 39
import com.sap.sailing.domain.base.CompetitorWithBoat;
41 40
import com.sap.sailing.domain.base.DomainFactory;
42
-import com.sap.sailing.domain.base.Event;
43 41
import com.sap.sailing.domain.base.Fleet;
44 42
import com.sap.sailing.domain.base.RaceColumn;
45 43
import com.sap.sailing.domain.base.Regatta;
... ...
@@ -54,7 +52,6 @@ import com.sap.sailing.domain.common.CompetitorRegistrationType;
54 52
import com.sap.sailing.domain.common.DeviceIdentifier;
55 53
import com.sap.sailing.domain.common.racelog.tracking.NotDenotedForRaceLogTrackingException;
56 54
import com.sap.sailing.domain.common.tracking.impl.GPSFixMovingImpl;
57
-import com.sap.sailing.domain.leaderboard.EventResolver;
58 55
import com.sap.sailing.domain.leaderboard.RegattaLeaderboard;
59 56
import com.sap.sailing.domain.leaderboard.impl.HighPoint;
60 57
import com.sap.sailing.domain.persistence.MongoObjectFactory;
... ...
@@ -97,18 +94,6 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
97 94
private RaceLogTrackingAdapter adapter;
98 95
private Regatta regatta;
99 96
private SensorFixStore sensorFixStore;
100
- private final EventResolver dummyEventResolver = new EventResolver() {
101
- @Override
102
- public Event getEvent(Serializable id) {
103
- return null;
104
- }
105
-
106
- @Override
107
- public Iterable<Event> getAllEvents() {
108
- return Collections.emptySet();
109
- }
110
- };
111
-
112 97
private long time = 0;
113 98
114 99
@BeforeEach
... ...
@@ -180,9 +165,9 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
180 165
private void addFixes0(DeviceIdentifier dev1) throws TransformationException,
181 166
NoCorrespondingServiceRegisteredException {
182 167
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(5), new KnotSpeedWithBearingImpl(
183
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false);
168
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null));
184 169
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(15), new KnotSpeedWithBearingImpl(
185
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false);
170
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null));
186 171
}
187 172
188 173
private void addFixes1(TrackedRace race, Competitor comp1, DeviceIdentifier dev1) throws TransformationException,
... ...
@@ -191,9 +176,9 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
191 176
testSize(race.getTrack(comp1), 1);
192 177
// further fix arrives in race
193 178
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(7), new KnotSpeedWithBearingImpl(
194
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false);
179
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null));
195 180
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(14), new KnotSpeedWithBearingImpl(
196
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false); // outside mapping range
181
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null)); // outside mapping range
197 182
testSize(race.getTrack(comp1), 2);
198 183
}
199 184
... ...
@@ -203,7 +188,7 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
203 188
testSize(race.getTrack(comp1), 4);
204 189
// add another fix in new mapping range
205 190
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(18), new KnotSpeedWithBearingImpl(
206
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false);
191
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null));
207 192
testSize(race.getTrack(comp1), 5);
208 193
}
209 194
... ...
@@ -211,7 +196,7 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
211 196
NoCorrespondingServiceRegisteredException {
212 197
// stop tracking, then no more fixes arrive at race
213 198
sensorFixStore.storeFix(dev1, new GPSFixMovingImpl(new DegreePosition(0, 0), t(8), new KnotSpeedWithBearingImpl(
214
- 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null), /* filterByRegattaAndEventEndDate */ false);
199
+ 10, new DegreeBearingImpl(5)), /* optionalTrueHeading */ null));
215 200
testSize(race.getTrack(comp1), 5);
216 201
}
217 202
... ...
@@ -239,7 +224,7 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
239 224
TrackedRace race = trackAndGetRace(column);
240 225
assertNotNull(race);
241 226
RaceLogFixTrackerManager raceLogFixTrackerManager = new RaceLogFixTrackerManager((DynamicTrackedRace) race,
242
- sensorFixStore, null, /* removeOutliersFromCompetitorTracks */ false, dummyEventResolver);
227
+ sensorFixStore, null, /* removeOutliersFromCompetitorTracks */ false);
243 228
raceLogFixTrackerManager.waitForTracker();
244 229
race.waitForLoadingToFinish();
245 230
addFixes1(race, comp1, dev1);
... ...
@@ -315,7 +300,7 @@ public class CreateAndTrackWithRaceLogTest extends RaceLogTrackingTestHelper {
315 300
TrackedRace race = trackAndGetRace(column);
316 301
assertNotNull(race);
317 302
RaceLogFixTrackerManager raceLogFixTrackerManager = new RaceLogFixTrackerManager((DynamicTrackedRace) race,
318
- sensorFixStore, null, /* removeOutliersFromCompetitorTracks */ false, dummyEventResolver);
303
+ sensorFixStore, null, /* removeOutliersFromCompetitorTracks */ false);
319 304
raceLogFixTrackerManager.waitForTracker();
320 305
race.waitForLoadingToFinish();
321 306
addFixes1(race, comp1, dev1);
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/DeviceMappingsAndSensorFixStoreLockingTest.java
... ...
@@ -45,7 +45,7 @@ public class DeviceMappingsAndSensorFixStoreLockingTest extends AbstractGPSFixSt
45 45
} catch (Exception e) {
46 46
throw new RuntimeException(e);
47 47
}
48
- store.addListener((device, fix, returnManeuverChanges, returnLiveDelay, filterByRegattaAndEventEndDate) -> {
48
+ store.addListener((device, fix, returnManeuverChanges, returnLiveDelay) -> {
49 49
return null;
50 50
}, deviceIdentifier);
51 51
}
... ...
@@ -59,7 +59,7 @@ public class DeviceMappingsAndSensorFixStoreLockingTest extends AbstractGPSFixSt
59 59
Map<RegattaLogDeviceMappingEvent<WithID>, MultiTimeRange> newlyCoveredTimeRanges) {
60 60
}
61 61
};
62
- store.addListener((dev, fix, returnManeuverChanges, returnLiveDelay, filterByRegattaAndEventEndDate)-> {
62
+ store.addListener((dev, fix, returnManeuverChanges, returnLiveDelay)-> {
63 63
try {
64 64
barrier.await();
65 65
} catch (Exception e) {
... ...
@@ -77,7 +77,7 @@ public class DeviceMappingsAndSensorFixStoreLockingTest extends AbstractGPSFixSt
77 77
};
78 78
}.start();
79 79
80
- store.storeFix(device, new DoubleVectorFixImpl(new MillisecondsTimePoint(1), new Double[]{0.0}), /* filterByRegattaAndEventEndDate */ false);
80
+ store.storeFix(device, new DoubleVectorFixImpl(new MillisecondsTimePoint(1), new Double[]{0.0}));
81 81
}
82 82
83 83
}
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/GPSFixStoreListenerTest.java
... ...
@@ -42,7 +42,7 @@ public class GPSFixStoreListenerTest extends AbstractGPSFixStoreTest {
42 42
barrier.await(100, TimeUnit.MILLISECONDS);
43 43
// During iteration in the main thread this causes a modification that makes the iterator throw a
44 44
// ConcurrentModificationException on next()
45
- store.addListener((DeviceIdentifier device, GPSFixMoving fix, boolean returnManeuverChanges, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) -> {
45
+ store.addListener((DeviceIdentifier device, GPSFixMoving fix, boolean returnManeuverChanges, boolean returnLiveDelay) -> {
46 46
return null;
47 47
}, device);
48 48
barrier.await(100, TimeUnit.MILLISECONDS);
... ...
@@ -54,7 +54,7 @@ public class GPSFixStoreListenerTest extends AbstractGPSFixStoreTest {
54 54
};
55 55
thread.start();
56 56
try {
57
- store.storeFix(device, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
57
+ store.storeFix(device, createFix(100, 10, 20, 30, 40));
58 58
} finally {
59 59
// This ensures that the thread is terminated when the test finishes
60 60
// JUnit may behave crazy if there are additional tests running after the test finished
... ...
@@ -71,7 +71,7 @@ public class GPSFixStoreListenerTest extends AbstractGPSFixStoreTest {
71 71
}
72 72
73 73
@Override
74
- public Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> fixReceived(DeviceIdentifier device, GPSFixMoving fix, boolean returnManeuverChanges, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
74
+ public Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> fixReceived(DeviceIdentifier device, GPSFixMoving fix, boolean returnManeuverChanges, boolean returnLiveDelay) {
75 75
try {
76 76
barrier.await(100, TimeUnit.MILLISECONDS);
77 77
} catch (TimeoutException e) {
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/RaceLogFixTrackerManagerTest.java
... ...
@@ -2,7 +2,6 @@ package com.sap.sailing.domain.racelogtracking.test.impl;
2 2
3 3
import static org.mockito.Mockito.mock;
4 4
5
-import java.io.Serializable;
6 5
import java.net.UnknownHostException;
7 6
import java.util.Arrays;
8 7
import java.util.Collections;
... ...
@@ -29,7 +28,6 @@ import com.sap.sailing.domain.base.BoatClass;
29 28
import com.sap.sailing.domain.base.Competitor;
30 29
import com.sap.sailing.domain.base.Course;
31 30
import com.sap.sailing.domain.base.DomainFactory;
32
-import com.sap.sailing.domain.base.Event;
33 31
import com.sap.sailing.domain.base.Mark;
34 32
import com.sap.sailing.domain.base.RaceDefinition;
35 33
import com.sap.sailing.domain.base.Sideline;
... ...
@@ -40,7 +38,6 @@ import com.sap.sailing.domain.base.impl.RegattaImpl;
40 38
import com.sap.sailing.domain.base.impl.WaypointImpl;
41 39
import com.sap.sailing.domain.common.CompetitorRegistrationType;
42 40
import com.sap.sailing.domain.common.DeviceIdentifier;
43
-import com.sap.sailing.domain.leaderboard.EventResolver;
44 41
import com.sap.sailing.domain.persistence.PersistenceFactory;
45 42
import com.sap.sailing.domain.persistence.racelog.tracking.impl.MongoSensorFixStoreImpl;
46 43
import com.sap.sailing.domain.racelog.RaceLogAndTrackedRaceResolver;
... ...
@@ -80,19 +77,6 @@ public class RaceLogFixTrackerManagerTest {
80 77
protected final AbstractLogEventAuthor author = new LogEventAuthorImpl("author", 0);
81 78
private DynamicTrackedRace trackedRace;
82 79
83
- private final EventResolver dummyEventResolver = new EventResolver() {
84
- @Override
85
- public Event getEvent(Serializable id) {
86
- return null;
87
- }
88
-
89
- @Override
90
- public Iterable<Event> getAllEvents() {
91
- return Collections.emptySet();
92
- }
93
- };
94
-
95
-
96 80
@BeforeEach
97 81
public void setUp() throws UnknownHostException, MongoException {
98 82
raceLog = new RaceLogImpl("racelog");
... ...
@@ -132,7 +116,7 @@ public class RaceLogFixTrackerManagerTest {
132 116
Class<? extends RegattaLogDeviceMappingEvent<?>> eventType) {
133 117
throw new IllegalArgumentException("Unknown event type");
134 118
}
135
- }, /* removeOutliersFromCompetitorTracks */ true, dummyEventResolver);
119
+ }, /* removeOutliersFromCompetitorTracks */ true);
136 120
raceLogFixTrackerManager.stop(/* preemptive */ false, /* willBeRemoved */ false);
137 121
}
138 122
... ...
@@ -151,7 +135,7 @@ public class RaceLogFixTrackerManagerTest {
151 135
Class<? extends RegattaLogDeviceMappingEvent<?>> eventType) {
152 136
throw new IllegalArgumentException("Unknown event type");
153 137
}
154
- }, /* removeOutliersFromCompetitorTracks */ true, dummyEventResolver);
138
+ }, /* removeOutliersFromCompetitorTracks */ true);
155 139
trackedRace.attachRaceLog(raceLog2);
156 140
raceLogFixTrackerManager.stop(/* preemptive */ false, /* willBeRemoved */ false);
157 141
}
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/SensorFixStoreAndLoadTest.java
... ...
@@ -52,7 +52,6 @@ import com.sap.sailing.domain.base.BoatClass;
52 52
import com.sap.sailing.domain.base.Competitor;
53 53
import com.sap.sailing.domain.base.Course;
54 54
import com.sap.sailing.domain.base.DomainFactory;
55
-import com.sap.sailing.domain.base.Event;
56 55
import com.sap.sailing.domain.base.Mark;
57 56
import com.sap.sailing.domain.base.RaceDefinition;
58 57
import com.sap.sailing.domain.base.Sideline;
... ...
@@ -70,7 +69,6 @@ import com.sap.sailing.domain.common.tracking.GPSFixMoving;
70 69
import com.sap.sailing.domain.common.tracking.SensorFix;
71 70
import com.sap.sailing.domain.common.tracking.impl.DoubleVectorFixImpl;
72 71
import com.sap.sailing.domain.common.tracking.impl.GPSFixMovingImpl;
73
-import com.sap.sailing.domain.leaderboard.EventResolver;
74 72
import com.sap.sailing.domain.persistence.PersistenceFactory;
75 73
import com.sap.sailing.domain.persistence.impl.CollectionNames;
76 74
import com.sap.sailing.domain.persistence.racelog.tracking.impl.MongoSensorFixStoreImpl;
... ...
@@ -419,15 +417,15 @@ public class SensorFixStoreAndLoadTest {
419 417
}
420 418
421 419
private void addBravoFixes() {
422
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP, FIX_RIDE_HEIGHT.getMeters()), /* filterByRegattaAndEventEndDate */ false);
423
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP2, FIX_RIDE_HEIGHT2.getMeters()), /* filterByRegattaAndEventEndDate */ false);
424
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP3, FIX_RIDE_HEIGHT3.getMeters()), /* filterByRegattaAndEventEndDate */ false);
420
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP, FIX_RIDE_HEIGHT.getMeters()));
421
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP2, FIX_RIDE_HEIGHT2.getMeters()));
422
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP3, FIX_RIDE_HEIGHT3.getMeters()));
425 423
}
426 424
427 425
private void addMoreBravoFixes() {
428
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP + 1, FIX_RIDE_HEIGHT.getMeters()), /* filterByRegattaAndEventEndDate */ false);
429
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP2 + 1, FIX_RIDE_HEIGHT2.getMeters()), /* filterByRegattaAndEventEndDate */ false);
430
- store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP3 + 1, FIX_RIDE_HEIGHT3.getMeters()), /* filterByRegattaAndEventEndDate */ false);
426
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP + 1, FIX_RIDE_HEIGHT.getMeters()));
427
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP2 + 1, FIX_RIDE_HEIGHT2.getMeters()));
428
+ store.storeFix(device, createBravoDoubleVectorFixWithRideHeight(FIX_TIMESTAMP3 + 1, FIX_RIDE_HEIGHT3.getMeters()));
431 429
}
432 430
433 431
private FixLoaderAndTracker createFixLoaderAndTracker() {
... ...
@@ -447,16 +445,6 @@ public class SensorFixStoreAndLoadTest {
447 445
}
448 446
throw new IllegalArgumentException("Unknown event type");
449 447
}
450
- }, new EventResolver() {
451
- @Override
452
- public Event getEvent(Serializable id) {
453
- return null;
454
- }
455
-
456
- @Override
457
- public Iterable<Event> getAllEvents() {
458
- return Collections.emptySet();
459
- }
460 448
}, /* removeOutliersFromCompetitorTracks */ false);
461 449
}
462 450
... ...
@@ -489,7 +477,7 @@ public class SensorFixStoreAndLoadTest {
489 477
}
490 478
491 479
private void addTestFixes() {
492
- store.storeFix(deviceTest, createTestDoubleVectorFixWithTestValue(FIX_TIMESTAMP, FIX_TEST_VALUE), /* filterByRegattaAndEventEndDate */ false);
480
+ store.storeFix(deviceTest, createTestDoubleVectorFixWithTestValue(FIX_TIMESTAMP, FIX_TEST_VALUE));
493 481
}
494 482
495 483
private DoubleVectorFix createTestDoubleVectorFixWithTestValue(long timestamp, double testValue) {
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/SensorFixStoreTest.java
... ...
@@ -211,7 +211,7 @@ public class SensorFixStoreTest {
211 211
FixReceivedListener<DoubleVectorFix> listener = mockFixReceivedListener();
212 212
store.addListener(listener, device);
213 213
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
214
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
214
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
215 215
}
216 216
217 217
@Test
... ...
@@ -221,8 +221,8 @@ public class SensorFixStoreTest {
221 221
store.addListener(listener1, device);
222 222
store.addListener(listener2, device);
223 223
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
224
- Mockito.verify(listener1, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
225
- Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
224
+ Mockito.verify(listener1, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
225
+ Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
226 226
}
227 227
228 228
@Test
... ...
@@ -240,7 +240,7 @@ public class SensorFixStoreTest {
240 240
store.addListener(listener1, device);
241 241
store.addListener(listener2, device2);
242 242
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
243
- Mockito.verify(listener1, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
243
+ Mockito.verify(listener1, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
244 244
Mockito.verifyNoInteractions(listener2);
245 245
}
246 246
... ...
@@ -250,8 +250,8 @@ public class SensorFixStoreTest {
250 250
store.addListener(listener, device);
251 251
DoubleVectorFix doubleVectorFix1 = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
252 252
DoubleVectorFix doubleVectorFix2 = addBravoFix(device, FIX_TIMESTAMP2, FIX_RIDE_HEIGHT2);
253
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix1, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
254
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
253
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix1, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
254
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
255 255
Mockito.verifyNoMoreInteractions(listener);
256 256
}
257 257
... ...
@@ -279,7 +279,7 @@ public class SensorFixStoreTest {
279 279
store.addListener(listener, device);
280 280
store.removeListener(listener, device2);
281 281
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
282
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
282
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
283 283
}
284 284
285 285
@Test
... ...
@@ -289,8 +289,8 @@ public class SensorFixStoreTest {
289 289
store.addListener(listener, device2);
290 290
DoubleVectorFix doubleVectorFix1 = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
291 291
DoubleVectorFix doubleVectorFix2 = addBravoFix(device2, FIX_TIMESTAMP2, FIX_RIDE_HEIGHT2);
292
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix1, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
293
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device2, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
292
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device, doubleVectorFix1, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
293
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device2, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
294 294
Mockito.verifyNoMoreInteractions(listener);
295 295
}
296 296
... ...
@@ -313,7 +313,7 @@ public class SensorFixStoreTest {
313 313
store.removeListener(listener, device);
314 314
addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
315 315
DoubleVectorFix doubleVectorFix2 = addBravoFix(device2, FIX_TIMESTAMP2, FIX_RIDE_HEIGHT2);
316
- Mockito.verify(listener, Mockito.times(1)).fixReceived(device2, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
316
+ Mockito.verify(listener, Mockito.times(1)).fixReceived(device2, doubleVectorFix2, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
317 317
Mockito.verifyNoMoreInteractions(listener);
318 318
}
319 319
... ...
@@ -325,7 +325,7 @@ public class SensorFixStoreTest {
325 325
store.addListener(listener2, device);
326 326
store.removeListener(listener1);
327 327
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
328
- Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
328
+ Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
329 329
Mockito.verifyNoMoreInteractions(listener2);
330 330
Mockito.verifyNoInteractions(listener1);
331 331
}
... ...
@@ -338,7 +338,7 @@ public class SensorFixStoreTest {
338 338
store.addListener(listener2, device);
339 339
store.removeListener(listener1, device);
340 340
DoubleVectorFix doubleVectorFix = addBravoFix(device, FIX_TIMESTAMP, FIX_RIDE_HEIGHT);
341
- Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
341
+ Mockito.verify(listener2, Mockito.times(1)).fixReceived(device, doubleVectorFix, /* returnManeuverChanges */ false, /* returnLiveDelay */ false);
342 342
Mockito.verifyNoMoreInteractions(listener2);
343 343
Mockito.verifyNoInteractions(listener1);
344 344
}
... ...
@@ -388,7 +388,7 @@ public class SensorFixStoreTest {
388 388
389 389
private DoubleVectorFix addBravoFix(DeviceIdentifier device, long timestamp, double rideHeight) {
390 390
DoubleVectorFix fix = createBravoDoubleVectorFixWithRideHeight(timestamp, rideHeight);
391
- store.storeFix(device, fix, /* filterByRegattaAndEventEndDate */ false);
391
+ store.storeFix(device, fix);
392 392
return fix;
393 393
}
394 394
java/com.sap.sailing.domain.racelogtrackingadapter.test/src/com/sap/sailing/domain/racelogtracking/test/impl/TrackedRaceLoadsFixesTest.java
... ...
@@ -2,7 +2,6 @@ package com.sap.sailing.domain.racelogtracking.test.impl;
2 2
3 3
import static org.junit.jupiter.api.Assertions.assertEquals;
4 4
5
-import java.io.Serializable;
6 5
import java.net.UnknownHostException;
7 6
import java.util.ArrayList;
8 7
import java.util.Arrays;
... ...
@@ -27,7 +26,6 @@ import com.sap.sailing.domain.base.BoatClass;
27 26
import com.sap.sailing.domain.base.Competitor;
28 27
import com.sap.sailing.domain.base.Course;
29 28
import com.sap.sailing.domain.base.DomainFactory;
30
-import com.sap.sailing.domain.base.Event;
31 29
import com.sap.sailing.domain.base.Mark;
32 30
import com.sap.sailing.domain.base.RaceDefinition;
33 31
import com.sap.sailing.domain.base.impl.CourseImpl;
... ...
@@ -36,7 +34,6 @@ import com.sap.sailing.domain.base.impl.WaypointImpl;
36 34
import com.sap.sailing.domain.common.DeviceIdentifier;
37 35
import com.sap.sailing.domain.common.tracking.GPSFix;
38 36
import com.sap.sailing.domain.common.tracking.GPSFixMoving;
39
-import com.sap.sailing.domain.leaderboard.EventResolver;
40 37
import com.sap.sailing.domain.racelogtracking.impl.SmartphoneImeiIdentifierImpl;
41 38
import com.sap.sailing.domain.racelogtracking.impl.fixtracker.FixLoaderAndTracker;
42 39
import com.sap.sailing.domain.racelogtracking.test.AbstractGPSFixStoreTest;
... ...
@@ -65,18 +62,6 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
65 62
66 63
private RaceDefinition raceDefinition;
67 64
68
- private final EventResolver dummyEventResolver = new EventResolver() {
69
- @Override
70
- public Event getEvent(Serializable id) {
71
- return null;
72
- }
73
-
74
- @Override
75
- public Iterable<Event> getAllEvents() {
76
- return Collections.emptySet();
77
- }
78
- };
79
-
80 65
@BeforeEach
81 66
public void setUp() throws UnknownHostException, MongoException {
82 67
Map<Competitor, Boat> competitorsAndBoats = new HashMap<>();
... ...
@@ -92,16 +77,16 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
92 77
defineMarksOnRegattaLog(mark, mark2);
93 78
map(comp, device, 0, 10000);
94 79
map(mark, markDevice, 0, 10000);
95
- store.storeFix(device, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // before
96
- store.storeFix(device, createFix(1100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in
97
- store.storeFix(device, createFix(2100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // after
98
- store.storeFix(markDevice, createFix(100, 10, 20), /* filterByRegattaAndEventEndDate */ false);
99
- store.storeFix(markDevice, createFix(1100, 10, 20), /* filterByRegattaAndEventEndDate */ false);
100
- store.storeFix(markDevice, createFix(2100, 10, 20), /* filterByRegattaAndEventEndDate */ false);
80
+ store.storeFix(device, createFix(100, 10, 20, 30, 40)); // before
81
+ store.storeFix(device, createFix(1100, 10, 20, 30, 40)); // in
82
+ store.storeFix(device, createFix(2100, 10, 20, 30, 40)); // after
83
+ store.storeFix(markDevice, createFix(100, 10, 20));
84
+ store.storeFix(markDevice, createFix(1100, 10, 20));
85
+ store.storeFix(markDevice, createFix(2100, 10, 20));
101 86
final DynamicTrackedRaceImpl trackedRace = createDynamicTrackedRace(boatClass, raceDefinition);
102 87
trackedRace.setStartOfTrackingReceived(new MillisecondsTimePoint(1000));
103 88
trackedRace.setEndOfTrackingReceived(new MillisecondsTimePoint(2000));
104
- new FixLoaderAndTracker(trackedRace, store, null, dummyEventResolver, /* removeOutliersFromCompetitorTracks */ false);
89
+ new FixLoaderAndTracker(trackedRace, store, null, /* removeOutliersFromCompetitorTracks */ false);
105 90
trackedRace.attachRaceLog(raceLog);
106 91
trackedRace.attachRegattaLog(regattaLog);
107 92
trackedRace.waitForLoadingToFinish();
... ...
@@ -129,18 +114,18 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
129 114
// reuse device for two marks
130 115
map(mark, device3, 0, 600);
131 116
map(mark2, device3, 0, 600);
132
- store.storeFix(device, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
133
- store.storeFix(device, createFix(200, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
134
- store.storeFix(device2, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
135
- store.storeFix(device3, createFix(100, 10, 20), /* filterByRegattaAndEventEndDate */ false);
136
- store.storeFix(device3, createFix(100, 10, 20), /* filterByRegattaAndEventEndDate */ false);
117
+ store.storeFix(device, createFix(100, 10, 20, 30, 40));
118
+ store.storeFix(device, createFix(200, 10, 20, 30, 40));
119
+ store.storeFix(device2, createFix(100, 10, 20, 30, 40));
120
+ store.storeFix(device3, createFix(100, 10, 20));
121
+ store.storeFix(device3, createFix(100, 10, 20));
137 122
final List<GPSFixMoving> fixes = new ArrayList<>();
138 123
for (int i = 0; i < 10000; i++) {
139 124
fixes.add(createFix(i + 1000, 10, 20, 30, 40));
140 125
}
141
- store.storeFixes(device, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ false);
126
+ store.storeFixes(device, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
142 127
DynamicTrackedRace trackedRace = createDynamicTrackedRace(boatClass, raceDefinition);
143
- new FixLoaderAndTracker(trackedRace, store, null, dummyEventResolver, /* removeOutliersFromCompetitorTracks */ false);
128
+ new FixLoaderAndTracker(trackedRace, store, null, /* removeOutliersFromCompetitorTracks */ false);
144 129
raceLog.add(new RaceLogStartOfTrackingEventImpl(TimePoint.BeginningOfTime, author, 0));
145 130
trackedRace.attachRaceLog(raceLog);
146 131
trackedRace.attachRegattaLog(regattaLog);
... ...
@@ -156,8 +141,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
156 141
throws InterruptedException {
157 142
testFixes(/* start of tracking */ 200, /* end of tracking */ 300, /* mappings and fixes */ () -> {
158 143
map(comp, device, 0, 100);
159
- store.storeFix(device, createFix(10, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
160
- store.storeFix(device, createFix(20, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
144
+ store.storeFix(device, createFix(10, 10, 20, 30, 40));
145
+ store.storeFix(device, createFix(20, 10, 20, 30, 40));
161 146
}, /* tests and expectations */ trackedRace -> testNumberOfRawFixes(trackedRace.getTrack(comp), 0));
162 147
}
163 148
... ...
@@ -166,12 +151,12 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
166 151
throws InterruptedException {
167 152
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings and fixes */ () -> {
168 153
map(comp, device, 0, 200);
169
- store.storeFix(device, createFix(50, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
170
- store.storeFix(device, createFix(150, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
171
- store.storeFix(device, createFix(250, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
154
+ store.storeFix(device, createFix(50, 10, 20, 30, 40));
155
+ store.storeFix(device, createFix(150, 10, 20, 30, 40));
156
+ store.storeFix(device, createFix(250, 10, 20, 30, 40));
172 157
map(comp, device, 350, 500);
173
- store.storeFix(device, createFix(400, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
174
- store.storeFix(device, createFix(450, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
158
+ store.storeFix(device, createFix(400, 10, 20, 30, 40));
159
+ store.storeFix(device, createFix(450, 10, 20, 30, 40));
175 160
}, /* tests and expectations */ trackedRace -> testNumberOfRawFixes(trackedRace.getTrack(comp), 1));
176 161
}
177 162
... ...
@@ -180,10 +165,10 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
180 165
testFixes(/* start of tracking */ 10, /* end of tracking */ 500, /* mappings and fixes */ () -> {
181 166
map(comp, device, 0, 200);
182 167
map(comp, device, 300, 400);
183
- store.storeFix(device, createFix(50, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in first mapping
184
- store.storeFix(device, createFix(150, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in first mapping
185
- store.storeFix(device, createFix(250, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // outside both mappings
186
- store.storeFix(device, createFix(350, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in second mapping
168
+ store.storeFix(device, createFix(50, 10, 20, 30, 40)); // in first mapping
169
+ store.storeFix(device, createFix(150, 10, 20, 30, 40)); // in first mapping
170
+ store.storeFix(device, createFix(250, 10, 20, 30, 40)); // outside both mappings
171
+ store.storeFix(device, createFix(350, 10, 20, 30, 40)); // in second mapping
187 172
}, /* tests and expectations */ trackedRace -> {
188 173
final int[] fixInsertionCount = new int[1];
189 174
trackedRace.getTrack(comp).addListener(new GPSTrackListener<Competitor, GPSFixMoving>() {
... ...
@@ -222,10 +207,10 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
222 207
testFixes(/* start of tracking */ 10, /* end of tracking */ 500, /* mappings and fixes */ () -> {
223 208
map(comp, device, 0, 200);
224 209
map(comp, device, 300, 400);
225
- store.storeFix(device, createFix(50, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in first mapping
226
- store.storeFix(device, createFix(150, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in first mapping
227
- store.storeFix(device, createFix(250, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // outside both mappings
228
- store.storeFix(device, createFix(350, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in second mapping
210
+ store.storeFix(device, createFix(50, 10, 20, 30, 40)); // in first mapping
211
+ store.storeFix(device, createFix(150, 10, 20, 30, 40)); // in first mapping
212
+ store.storeFix(device, createFix(250, 10, 20, 30, 40)); // outside both mappings
213
+ store.storeFix(device, createFix(350, 10, 20, 30, 40)); // in second mapping
229 214
}, /* tests and expectations */ trackedRace -> {
230 215
map(comp, device, 0, 500); // covers fix at 250ms
231 216
try {
... ...
@@ -233,7 +218,7 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
233 218
} catch (Exception e) {
234 219
logger.log(Level.SEVERE, "Exception waiting for loading to finish", e);
235 220
}
236
- store.storeFix(device, createFix(400, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false); // in third mapping
221
+ store.storeFix(device, createFix(400, 10, 20, 30, 40)); // in third mapping
237 222
testNumberOfRawFixes(trackedRace.getTrack(comp), 5);
238 223
});
239 224
}
... ...
@@ -248,8 +233,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
248 233
final long bestFixOffset = 20;
249 234
testFixes(/* start of tracking */ startOfTracking, /* end of tracking */ 300, /* mappings and fixes */ () -> {
250 235
map(mark, device, 0, 100);
251
- store.storeFix(device, createFix(10, 10, 20), /* filterByRegattaAndEventEndDate */ false);
252
- store.storeFix(device, createFix(bestFixOffset, 10, 20), /* filterByRegattaAndEventEndDate */ false);
236
+ store.storeFix(device, createFix(10, 10, 20));
237
+ store.storeFix(device, createFix(bestFixOffset, 10, 20));
253 238
}, /* tests and expectations */ trackedRace -> {
254 239
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
255 240
assertEquals(bestFixOffset, trackedRace.getOrCreateTrack(mark)
... ...
@@ -263,9 +248,9 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
263 248
throws InterruptedException {
264 249
testFixes(/* start of tracking */ 400, /* end of tracking */ 500, /* mappings and fixes */ () -> {
265 250
map(mark, device, 0, 100);
266
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
251
+ store.storeFix(device, createFix(50, 10, 20));
267 252
map(mark2, device, 200, 300);
268
- store.storeFix(device, createFix(250, 10, 20), /* filterByRegattaAndEventEndDate */ false);
253
+ store.storeFix(device, createFix(250, 10, 20));
269 254
}, /* tests and expectations */ trackedRace -> {
270 255
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
271 256
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark2), 1);
... ...
@@ -278,13 +263,13 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
278 263
throws InterruptedException {
279 264
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings and fixes */ () -> {
280 265
map(mark, device, 0, 200);
281
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
282
- store.storeFix(device, createFix(150, 10, 20), /* filterByRegattaAndEventEndDate */ false);
283
- store.storeFix(device, createFix(250, 10, 20), /* filterByRegattaAndEventEndDate */ false);
266
+ store.storeFix(device, createFix(50, 10, 20));
267
+ store.storeFix(device, createFix(150, 10, 20));
268
+ store.storeFix(device, createFix(250, 10, 20));
284 269
285 270
map(mark, device, 350, 500);
286
- store.storeFix(device, createFix(400, 10, 20), /* filterByRegattaAndEventEndDate */ false);
287
- store.storeFix(device, createFix(450, 10, 20), /* filterByRegattaAndEventEndDate */ false);
271
+ store.storeFix(device, createFix(400, 10, 20));
272
+ store.storeFix(device, createFix(450, 10, 20));
288 273
}, /* tests and expectations */ trackedRace -> {
289 274
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
290 275
});
... ...
@@ -301,12 +286,12 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
301 286
public void testFixesBeforeStartOfTrackingForMarkAreLoadedWhenSettingStartOfTracking() throws InterruptedException {
302 287
testFixesInternal(/* start of tracking */ null, /* end of tracking */ null, /* mappings and fixes */ () -> {
303 288
map(mark, device, 0, 200);
304
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
305
- store.storeFix(device, createFix(150, 10, 20), /* filterByRegattaAndEventEndDate */ false);
306
- store.storeFix(device, createFix(250, 10, 20), /* filterByRegattaAndEventEndDate */ false);
289
+ store.storeFix(device, createFix(50, 10, 20));
290
+ store.storeFix(device, createFix(150, 10, 20));
291
+ store.storeFix(device, createFix(250, 10, 20));
307 292
map(mark, device, 350, 500);
308
- store.storeFix(device, createFix(400, 10, 20), /* filterByRegattaAndEventEndDate */ false);
309
- store.storeFix(device, createFix(450, 10, 20), /* filterByRegattaAndEventEndDate */ false);
293
+ store.storeFix(device, createFix(400, 10, 20));
294
+ store.storeFix(device, createFix(450, 10, 20));
310 295
}, /* tests track is initially empty */ trackedRace -> {
311 296
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 0); // still no start of tracking set
312 297
}, /* now set start of tracking */ trackedRace -> trackedRace.setStartOfTrackingReceived(new MillisecondsTimePoint(600)),
... ...
@@ -335,11 +320,11 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
335 320
final long endOfTracking = 300;
336 321
testFixes(/* start of tracking */ startOfTracking, /* end of tracking */ endOfTracking, /* mappings and fixes */ () -> {
337 322
map(mark, device, 0, 200);
338
- store.storeFix(device, createFix(bestFixBeforeStartOfTrackingOffset, 10, 20), /* filterByRegattaAndEventEndDate */ false);
339
- store.storeFix(device, createFix(250, 10, 20), /* filterByRegattaAndEventEndDate */ false);
323
+ store.storeFix(device, createFix(bestFixBeforeStartOfTrackingOffset, 10, 20));
324
+ store.storeFix(device, createFix(250, 10, 20));
340 325
map(mark, device, 350, 500);
341
- store.storeFix(device, createFix(bestFixAfterEndOfTrackingOffset, 10, 20), /* filterByRegattaAndEventEndDate */ false);
342
- store.storeFix(device, createFix(450, 10, 20), /* filterByRegattaAndEventEndDate */ false);
326
+ store.storeFix(device, createFix(bestFixAfterEndOfTrackingOffset, 10, 20));
327
+ store.storeFix(device, createFix(450, 10, 20));
343 328
}, /* tests and expectations */ trackedRace -> {
344 329
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
345 330
assertEquals(bestFixBeforeStartOfTrackingOffset, trackedRace.getOrCreateTrack(mark)
... ...
@@ -359,19 +344,19 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
359 344
final long endOfTracking = 300;
360 345
testFixes(/* start of tracking */ startOfTracking, /* end of tracking */ endOfTracking, /* mappings and fixes */ () -> {
361 346
map(mark, device, 0, 80);
362
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
363
- store.storeFix(device, createFix(70, 10, 20), /* filterByRegattaAndEventEndDate */ false);
347
+ store.storeFix(device, createFix(50, 10, 20));
348
+ store.storeFix(device, createFix(70, 10, 20));
364 349
map(mark, device, 100, 150);
365
- store.storeFix(device, createFix(120, 10, 20), /* filterByRegattaAndEventEndDate */ false);
366
- store.storeFix(device, createFix(bestFixBeforeStartOfTrackingOffset, 10, 20), /* filterByRegattaAndEventEndDate */ false);
350
+ store.storeFix(device, createFix(120, 10, 20));
351
+ store.storeFix(device, createFix(bestFixBeforeStartOfTrackingOffset, 10, 20));
367 352
368 353
map(mark, device, 400, 500);
369
- store.storeFix(device, createFix(420, 10, 20), /* filterByRegattaAndEventEndDate */ false);
370
- store.storeFix(device, createFix(450, 10, 20), /* filterByRegattaAndEventEndDate */ false);
371
- store.storeFix(device, createFix(480, 10, 20), /* filterByRegattaAndEventEndDate */ false);
354
+ store.storeFix(device, createFix(420, 10, 20));
355
+ store.storeFix(device, createFix(450, 10, 20));
356
+ store.storeFix(device, createFix(480, 10, 20));
372 357
map(mark, device, 350, 390);
373
- store.storeFix(device, createFix(bestFixAfterEndOfTrackingOffset, 10, 20), /* filterByRegattaAndEventEndDate */ false);
374
- store.storeFix(device, createFix(380, 10, 20), /* filterByRegattaAndEventEndDate */ false);
358
+ store.storeFix(device, createFix(bestFixAfterEndOfTrackingOffset, 10, 20));
359
+ store.storeFix(device, createFix(380, 10, 20));
375 360
}, /* tests and expectations */ trackedRace -> {
376 361
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
377 362
assertEquals(bestFixBeforeStartOfTrackingOffset, trackedRace.getOrCreateTrack(mark)
... ...
@@ -391,14 +376,14 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
391 376
final long endOfTracking = 300;
392 377
testFixes(/* start of tracking */ startOfTracking, /* end of tracking */ endOfTracking, /* mappings and fixes */ () -> {
393 378
map(mark, device, bestFix1 - 20, bestFix1 + 10);
394
- store.storeFix(device, createFix(bestFix1 - 10, 10, 20), /* filterByRegattaAndEventEndDate */ false);
395
- store.storeFix(device, createFix(bestFix1, 10, 20), /* filterByRegattaAndEventEndDate */ false);
379
+ store.storeFix(device, createFix(bestFix1 - 10, 10, 20));
380
+ store.storeFix(device, createFix(bestFix1, 10, 20));
396 381
}, /* tests and expectations */ trackedRace -> {
397 382
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
398 383
assertEquals(bestFix1, trackedRace.getOrCreateTrack(mark)
399 384
.getLastFixBefore(new MillisecondsTimePoint(startOfTracking)).getTimePoint().asMillis());
400
- store.storeFix(device, createFix(bestFix2 - 10, 10, 20), /* filterByRegattaAndEventEndDate */ false);
401
- store.storeFix(device, createFix(bestFix2, 10, 20), /* filterByRegattaAndEventEndDate */ false);
385
+ store.storeFix(device, createFix(bestFix2 - 10, 10, 20));
386
+ store.storeFix(device, createFix(bestFix2, 10, 20));
402 387
map(mark, device, bestFix2 - 20, bestFix2 + 10);
403 388
}, /* tests and expectations */ trackedRace -> {
404 389
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
... ...
@@ -419,17 +404,17 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
419 404
final long endOfTracking = 300;
420 405
testFixes(/* start of tracking */ startOfTracking, /* end of tracking */ endOfTracking, /* mappings and fixes */ () -> {
421 406
map(mark, device, bestFix1 - 10, bestFix1 + 10);
422
- store.storeFix(device, createFix(bestFix1, 10, 20), /* filterByRegattaAndEventEndDate */ false);
407
+ store.storeFix(device, createFix(bestFix1, 10, 20));
423 408
}, /* tests and expectations */ trackedRace -> {
424 409
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
425 410
assertEquals(bestFix1, trackedRace.getOrCreateTrack(mark)
426 411
.getLastFixBefore(new MillisecondsTimePoint(startOfTracking)).getTimePoint().asMillis());
427
- store.storeFix(device, createFix(startOfTracking + 10, 10, 20), /* filterByRegattaAndEventEndDate */ false);
412
+ store.storeFix(device, createFix(startOfTracking + 10, 10, 20));
428 413
map(mark, device, startOfTracking, startOfTracking + 20);
429 414
}, /* tests and expectations */ trackedRace -> {
430 415
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
431 416
// would be the new best fix if there wasn't a fix in the tracking interval
432
- store.storeFix(device, createFix(bestFix2, 10, 20), /* filterByRegattaAndEventEndDate */ false);
417
+ store.storeFix(device, createFix(bestFix2, 10, 20));
433 418
map(mark, device, bestFix2 - 10, bestFix2 + 10);
434 419
}, /* tests and expectations */ trackedRace -> {
435 420
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
... ...
@@ -443,7 +428,7 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
443 428
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
444 429
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 200),
445 430
/* fixes and tests/expectations */ trackedRace -> {
446
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
431
+ store.storeFix(device, createFix(50, 10, 20));
447 432
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
448 433
});
449 434
}
... ...
@@ -452,7 +437,7 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
452 437
public void testFixForMarkIsAddedIfAfterTrackingIntervalAndNoOtherFixExists()
453 438
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
454 439
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400), /* fixes and tests/expectations */ trackedRace -> {
455
- store.storeFix(device, createFix(350, 10, 20), /* filterByRegattaAndEventEndDate */ false);
440
+ store.storeFix(device, createFix(350, 10, 20));
456 441
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
457 442
});
458 443
}
... ...
@@ -462,8 +447,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
462 447
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
463 448
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400),
464 449
/* fixes and tests/expectations */ trackedRace -> {
465
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
466
- store.storeFix(device, createFix(75, 10, 20), /* filterByRegattaAndEventEndDate */ false);
450
+ store.storeFix(device, createFix(50, 10, 20));
451
+ store.storeFix(device, createFix(75, 10, 20));
467 452
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
468 453
});
469 454
}
... ...
@@ -473,8 +458,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
473 458
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
474 459
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400),
475 460
/* fixes and tests/expectations */ trackedRace -> {
476
- store.storeFix(device, createFix(75, 10, 20), /* filterByRegattaAndEventEndDate */ false);
477
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
461
+ store.storeFix(device, createFix(75, 10, 20));
462
+ store.storeFix(device, createFix(50, 10, 20));
478 463
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
479 464
});
480 465
}
... ...
@@ -484,8 +469,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
484 469
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
485 470
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400),
486 471
/* fixes and tests/expectations */ trackedRace -> {
487
- store.storeFix(device, createFix(375, 10, 20), /* filterByRegattaAndEventEndDate */ false);
488
- store.storeFix(device, createFix(350, 10, 20), /* filterByRegattaAndEventEndDate */ false);
472
+ store.storeFix(device, createFix(375, 10, 20));
473
+ store.storeFix(device, createFix(350, 10, 20));
489 474
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 2);
490 475
});
491 476
}
... ...
@@ -495,8 +480,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
495 480
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
496 481
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400),
497 482
/* fixes and tests/expectations */ trackedRace -> {
498
- store.storeFix(device, createFix(350, 10, 20), /* filterByRegattaAndEventEndDate */ false);
499
- store.storeFix(device, createFix(375, 10, 20), /* filterByRegattaAndEventEndDate */ false);
483
+ store.storeFix(device, createFix(350, 10, 20));
484
+ store.storeFix(device, createFix(375, 10, 20));
500 485
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
501 486
});
502 487
}
... ...
@@ -506,9 +491,9 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
506 491
throws TransformationException, NoCorrespondingServiceRegisteredException, InterruptedException {
507 492
testFixes(/* start of tracking */ 100, /* end of tracking */ 300, /* mappings */ () -> map(mark, device, 0, 400),
508 493
/* fixes and tests/expectations */ trackedRace -> {
509
- store.storeFix(device, createFix(200, 10, 20), /* filterByRegattaAndEventEndDate */ false);
510
- store.storeFix(device, createFix(50, 10, 20), /* filterByRegattaAndEventEndDate */ false);
511
- store.storeFix(device, createFix(350, 10, 20), /* filterByRegattaAndEventEndDate */ false);
494
+ store.storeFix(device, createFix(200, 10, 20));
495
+ store.storeFix(device, createFix(50, 10, 20));
496
+ store.storeFix(device, createFix(350, 10, 20));
512 497
testNumberOfRawFixes(trackedRace.getOrCreateTrack(mark), 1);
513 498
});
514 499
}
... ...
@@ -533,7 +518,7 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
533 518
DynamicTrackedRace trackedRace = createDynamicTrackedRace(boatClass, raceDefinition);
534 519
trackedRace.attachRaceLog(raceLog);
535 520
trackedRace.attachRegattaLog(regattaLog);
536
- new FixLoaderAndTracker(trackedRace, store, null, dummyEventResolver, /* removeOutliersFromCompetitorTracks */ false);
521
+ new FixLoaderAndTracker(trackedRace, store, null, /* removeOutliersFromCompetitorTracks */ false);
537 522
for(Consumer<DynamicTrackedRace> afterTrackingStarted : afterTrackingStartedConsumers) {
538 523
trackedRace.waitForLoadingToFinish();
539 524
afterTrackingStarted.accept(trackedRace);
... ...
@@ -545,8 +530,8 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
545 530
assertEquals(0, store.getNumberOfFixes(device));
546 531
assertEquals(null, store.getTimeRangeCoveredByFixes(device));
547 532
map(comp, device, 0, 600);
548
- store.storeFix(device, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
549
- store.storeFix(device, createFix(200, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
533
+ store.storeFix(device, createFix(100, 10, 20, 30, 40));
534
+ store.storeFix(device, createFix(200, 10, 20, 30, 40));
550 535
assertEquals(2, store.getNumberOfFixes(device));
551 536
assertEquals(TimeRangeImpl.create(100, 200, /* toIsInclusive */ true), store.getTimeRangeCoveredByFixes(device));
552 537
assertEquals(new DegreePosition(10, 20), ((GPSFix) store.getFixLastReceived(Collections.singleton(device)).get(device)).getPosition());
... ...
@@ -554,26 +539,26 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
554 539
555 540
@Test
556 541
public void testFindLatestFixForMapping() throws TransformationException, NoCorrespondingServiceRegisteredException {
557
- store.storeFix(device, createFix(100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
558
- store.storeFix(device, createFix(1100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
559
- store.storeFix(device, createFix(2100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
542
+ store.storeFix(device, createFix(100, 10, 20, 30, 40));
543
+ store.storeFix(device, createFix(1100, 10, 20, 30, 40));
544
+ store.storeFix(device, createFix(2100, 10, 20, 30, 40));
560 545
final Map<DeviceIdentifier, Timed> lastFixes = store.getFixLastReceived(Collections.singleton(device));
561 546
assertEquals(1, lastFixes.size());
562 547
Timed lastFix = lastFixes.get(device);
563 548
assertEquals(2100, lastFix.getTimePoint().asMillis());
564
- store.storeFix(device, createFix(2000, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
549
+ store.storeFix(device, createFix(2000, 10, 20, 30, 40));
565 550
final Map<DeviceIdentifier, Timed> lastFixes2 = store.getFixLastReceived(Collections.singleton(device));
566 551
assertEquals(1, lastFixes2.size());
567 552
Timed lastFix2 = lastFixes2.get(device);
568 553
assertEquals(2000, lastFix2.getTimePoint().asMillis()); // not the fix with the latest time point but the fix that was last received by the store
569
- store.storeFix(device, createFix(2200, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
554
+ store.storeFix(device, createFix(2200, 10, 20, 30, 40));
570 555
final Map<DeviceIdentifier, Timed> lastFixes3 = store.getFixLastReceived(Collections.singleton(device));
571 556
assertEquals(1, lastFixes3.size());
572 557
Timed lastFix3 = lastFixes3.get(device);
573 558
assertEquals(2200, lastFix3.getTimePoint().asMillis());
574 559
final DeviceIdentifier device2 = new SmartphoneImeiIdentifierImpl("b");
575
- store.storeFix(device2, createFix(1200, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
576
- store.storeFix(device2, createFix(1100, 10, 20, 30, 40), /* filterByRegattaAndEventEndDate */ false);
560
+ store.storeFix(device2, createFix(1200, 10, 20, 30, 40));
561
+ store.storeFix(device2, createFix(1100, 10, 20, 30, 40));
577 562
final Map<DeviceIdentifier, Timed> lastFixes4 = store.getFixLastReceived(Arrays.asList(device, device2));
578 563
assertEquals(2, lastFixes4.size());
579 564
Timed lastFix4 = lastFixes4.get(device);
java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/RaceLogTrackingAdapterImpl.java
... ...
@@ -283,7 +283,7 @@ public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
283 283
UUID.randomUUID(), mark, device, timePoint, timePoint);
284 284
log.add(mapping);
285 285
try {
286
- service.getSensorFixStore().storeFix(device, gpsFix, /* filterByRegattaAndEventEndDate */ false);
286
+ service.getSensorFixStore().storeFix(device, gpsFix);
287 287
} catch (NoCorrespondingServiceRegisteredException e) {
288 288
logger.log(Level.WARNING, "Could not ping mark " + mark);
289 289
}
java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/fixtracker/FixLoaderAndTracker.java
... ...
@@ -19,7 +19,6 @@ import java.util.function.Consumer;
19 19
import java.util.logging.Level;
20 20
import java.util.logging.Logger;
21 21
22
-import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
23 22
import com.sap.sailing.domain.abstractlog.regatta.MappingEventVisitor;
24 23
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
25 24
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEventVisitor;
... ...
@@ -31,16 +30,8 @@ import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMapping
31 30
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMarkMappingEvent;
32 31
import com.sap.sailing.domain.base.Boat;
33 32
import com.sap.sailing.domain.base.Competitor;
34
-import com.sap.sailing.domain.base.CourseArea;
35
-import com.sap.sailing.domain.base.Event;
36
-import com.sap.sailing.domain.base.EventListener;
37
-import com.sap.sailing.domain.base.Fleet;
38 33
import com.sap.sailing.domain.base.Mark;
39
-import com.sap.sailing.domain.base.RaceColumn;
40
-import com.sap.sailing.domain.base.RaceColumnListener;
41 34
import com.sap.sailing.domain.base.Regatta;
42
-import com.sap.sailing.domain.base.Venue;
43
-import com.sap.sailing.domain.base.VenueListener;
44 35
import com.sap.sailing.domain.common.DeviceIdentifier;
45 36
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
46 37
import com.sap.sailing.domain.common.TrackedRaceStatusEnum;
... ...
@@ -48,16 +39,6 @@ import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
48 39
import com.sap.sailing.domain.common.tracking.GPSFix;
49 40
import com.sap.sailing.domain.common.tracking.GPSFixMoving;
50 41
import com.sap.sailing.domain.common.tracking.SensorFix;
51
-import com.sap.sailing.domain.leaderboard.EventResolver;
52
-import com.sap.sailing.domain.leaderboard.FlexibleLeaderboard;
53
-import com.sap.sailing.domain.leaderboard.HasCourseAreas;
54
-import com.sap.sailing.domain.leaderboard.HasCourseAreasListener;
55
-import com.sap.sailing.domain.leaderboard.Leaderboard;
56
-import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
57
-import com.sap.sailing.domain.leaderboard.LeaderboardGroupListener;
58
-import com.sap.sailing.domain.leaderboard.RegattaLeaderboard;
59
-import com.sap.sailing.domain.leaderboard.ResultDiscardingRule;
60
-import com.sap.sailing.domain.racelog.RaceLogIdentifier;
61 42
import com.sap.sailing.domain.racelog.tracking.FixReceivedListener;
62 43
import com.sap.sailing.domain.racelog.tracking.SensorFixMapper;
63 44
import com.sap.sailing.domain.racelog.tracking.SensorFixStore;
... ...
@@ -194,27 +175,6 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
194 175
195 176
private AtomicBoolean stopRequested = new AtomicBoolean(false);
196 177
197
- private final EventResolver eventResolver;
198
-
199
- /**
200
- * Caches the result of {@link #getEvents()} (which tells the events to which the {@link #trackedRace} is connected)
201
- * in the pair's {@link Pair#getB() second component} and remembers the result of
202
- * {@link EventResolver#getAllEvents()} from the time point when the cache contents were computed; gets invalidated
203
- * by any change to the leaderboard groups of any of the events in the cache, or when the {@link #trackedRace} is
204
- * attached or detached from any of the leaderboard columns of any of those leaderboards contained in any of those
205
- * leaderboard groups, or if the set of leaderboards in one of those leaderboard groups changes, or if the set of
206
- * all events known by the {@link #eventResolver} changes.
207
- */
208
- private Pair<Iterable<Event>, Iterable<Event>> eventsCache;
209
-
210
- /**
211
- * Subscribed to {@link EventResolver#getAllEvents() all events} returned from the {@link #eventResolver} the last
212
- * time the {@link #eventsCache} was filled. Those are the ones kept in the {@link Pair#getA() first component} of
213
- * the {@link #eventsCache}. Subscribes recursively to all the {@link LeaderboardGroup}s inside those events, and
214
- * inside those to their {@link Leaderboard}s.
215
- */
216
- private EventResolverListener eventResolverListener;
217
-
218 178
private final AbstractRaceChangeListener raceChangeListener = new AbstractRaceChangeListener() {
219 179
@Override
220 180
public void startOfTrackingChanged(TimePoint oldStartOfTracking, TimePoint newStartOfTracking) {
... ...
@@ -247,8 +207,7 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
247 207
private final FixReceivedListener<Timed> listener = new FixReceivedListener<Timed>() {
248 208
@Override
249 209
public Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> fixReceived(DeviceIdentifier device,
250
- Timed fix, boolean returnManeuverChanges, boolean returnLiveDelay,
251
- boolean filterByRegattaAndEventEndDate) {
210
+ Timed fix, boolean returnManeuverChanges, boolean returnLiveDelay) {
252 211
final Set<RegattaAndRaceIdentifier> maneuverChanged = new HashSet<>();
253 212
final Map<RegattaAndRaceIdentifier, Duration> delayToLive = new HashMap<>();
254 213
if (!preemptiveStopRequested.get() && trackedRace.getStartOfTracking() != null) {
... ...
@@ -280,8 +239,7 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
280 239
SensorFixMapper<SensorFix, DynamicSensorFixTrack<Competitor, SensorFix>, Competitor> mapper = sensorFixMapperFactory
281 240
.createCompetitorMapper((Class<? extends RegattaLogDeviceMappingEvent<?>>) event.getClass());
282 241
DynamicSensorFixTrack<Competitor, SensorFix> track = mapper.getTrack(trackedRace, competitor);
283
- if (track != null && trackedRace.isWithinStartAndEndOfTracking(fix.getTimePoint())
284
- && (!filterByRegattaAndEventEndDate || !excludedByRegattaOrEventsEndDates(fix.getTimePoint()))) {
242
+ if (track != null && trackedRace.isWithinStartAndEndOfTracking(fix.getTimePoint())) {
285 243
mapper.addFix(track, (DoubleVectorFix) fix);
286 244
if (returnLiveDelay) {
287 245
delayToLive.put(trackedRace.getRaceIdentifier(), new MillisecondsDurationImpl(trackedRace.getDelayToLiveInMillis()));
... ...
@@ -373,8 +331,7 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
373 331
.getLastFixAtOrBefore(startOfTracking);
374 332
forceFix = (fixBeforeStartOfTracking == null
375 333
|| fixBeforeStartOfTracking.getTimePoint().before(timePoint));
376
- } else if (endOfTracking != null && timePoint.after(endOfTracking)
377
- && (!filterByRegattaAndEventEndDate || !excludedByRegattaOrEventsEndDates(fix.getTimePoint()))) {
334
+ } else if (endOfTracking != null && timePoint.after(endOfTracking)) {
378 335
// check if it is closer to the end of the tracking interval
379 336
GPSFix fixAfterEndOfTracking = markTrack
380 337
.getFirstFixAtOrAfter(endOfTracking);
... ...
@@ -395,9 +352,7 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
395 352
markTrack.unlockAfterRead();
396 353
}
397 354
}
398
- if (!filterByRegattaAndEventEndDate || !excludedByRegattaOrEventsEndDates(fix.getTimePoint())) {
399
- trackedRace.recordFix(mark, (GPSFix) fix, /* only when in tracking interval */ !forceFix);
400
- }
355
+ trackedRace.recordFix(mark, (GPSFix) fix, /* only when in tracking interval */ !forceFix);
401 356
if (returnLiveDelay) {
402 357
delayToLive.put(trackedRace.getRaceIdentifier(), new MillisecondsDurationImpl(trackedRace.getDelayToLiveInMillis()));
403 358
}
... ...
@@ -425,189 +380,6 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
425 380
}
426 381
};
427 382
428
- private class EventResolverListener implements EventResolver.Listener, EventListener, LeaderboardGroupListener,
429
- RaceColumnListener, VenueListener, HasCourseAreasListener {
430
- private static final long serialVersionUID = 5441115548861230410L;
431
-
432
- private void invalidateCache() {
433
- for (final Event oneOfOldAllEvents : eventsCache.getA()) {
434
- removeAsListenerFrom(oneOfOldAllEvents);
435
- }
436
- eventsCache = null;
437
- }
438
-
439
- private void removeAsListenerFrom(Event oneOfOldAllEvents) {
440
- oneOfOldAllEvents.removeEventListener(this);
441
- oneOfOldAllEvents.getVenue().removeListener(this);
442
- for (final LeaderboardGroup leaderboardGroup : oneOfOldAllEvents.getLeaderboardGroups()) {
443
- leaderboardGroup.removeLeaderboardGroupListener(this);
444
- for (final Leaderboard leaderboard : leaderboardGroup.getLeaderboards()) {
445
- leaderboard.removeRaceColumnListener(this);
446
- leaderboard.removeCourseAreaChangeListener(this);
447
- }
448
- }
449
- }
450
-
451
- public void addAsListenerTo(Event event) {
452
- event.addEventListener(this);
453
- event.getVenue().addListener(this);
454
- for (final LeaderboardGroup leaderboardGroup : event.getLeaderboardGroups()) {
455
- leaderboardGroup.addLeaderboardGroupListener(this);
456
- for (final Leaderboard leaderboard : leaderboardGroup.getLeaderboards()) {
457
- leaderboard.addRaceColumnListener(this);
458
- leaderboard.addCourseAreaChangeListener(this);
459
- }
460
- }
461
- }
462
-
463
- @Override
464
- public void trackedRaceLinked(RaceColumn raceColumn, Fleet fleet, TrackedRace trackedRace) {
465
- if (trackedRace == FixLoaderAndTracker.this.trackedRace) {
466
- invalidateCache();
467
- }
468
- }
469
-
470
- @Override
471
- public void trackedRaceUnlinked(RaceColumn raceColumn, Fleet fleet, TrackedRace trackedRace) {
472
- if (trackedRace == FixLoaderAndTracker.this.trackedRace) {
473
- invalidateCache();
474
- }
475
- }
476
-
477
- @Override
478
- public void isMedalRaceChanged(RaceColumn raceColumn, boolean newIsMedalRace) {
479
- }
480
-
481
- @Override
482
- public void isFleetsCanRunInParallelChanged(RaceColumn raceColumn, boolean newIsFleetsCanRunInParallel) {
483
- }
484
-
485
- @Override
486
- public void isStartsWithZeroScoreChanged(RaceColumn raceColumn, boolean newIsStartsWithZeroScore) {
487
- }
488
-
489
- @Override
490
- public void isFirstColumnIsNonDiscardableCarryForwardChanged(RaceColumn raceColumn,
491
- boolean firstColumnIsNonDiscardableCarryForward) {
492
- }
493
-
494
- @Override
495
- public void hasSplitFleetContiguousScoringChanged(RaceColumn raceColumn,
496
- boolean hasSplitFleetContiguousScoring) {
497
- }
498
-
499
- @Override
500
- public void hasCrossFleetMergedRankingChanged(RaceColumn raceColumn, boolean hasCrossFleetMergedRanking) {
501
- }
502
-
503
- @Override
504
- public void oneAlwaysStaysOneChanged(RaceColumn raceColumn, boolean oneAlwaysStaysOne) {
505
- }
506
-
507
- @Override
508
- public void raceColumnAddedToContainer(RaceColumn raceColumn) {
509
- invalidateCache();
510
- }
511
-
512
- @Override
513
- public void raceColumnRemovedFromContainer(RaceColumn raceColumn) {
514
- invalidateCache();
515
- }
516
-
517
- @Override
518
- public void raceColumnMoved(RaceColumn raceColumn, int newIndex) {
519
- }
520
-
521
- @Override
522
- public void raceColumnNameChanged(RaceColumn raceColumn, String oldName, String newName) {
523
- }
524
-
525
- @Override
526
- public void factorChanged(RaceColumn raceColumn, Double oldFactor, Double newFactor) {
527
- }
528
-
529
- @Override
530
- public void competitorDisplayNameChanged(Competitor competitor, String oldDisplayName, String displayName) {
531
- }
532
-
533
- @Override
534
- public void resultDiscardingRuleChanged(ResultDiscardingRule oldDiscardingRule,
535
- ResultDiscardingRule newDiscardingRule) {
536
- }
537
-
538
- @Override
539
- public void maximumNumberOfDiscardsChanged(Integer oldMaximumNumberOfDiscards,
540
- Integer newMaximumNumberOfDiscards) {
541
- }
542
-
543
- @Override
544
- public void raceLogEventAdded(RaceColumn raceColumn, RaceLogIdentifier raceLogIdentifier, RaceLogEvent event) {
545
- }
546
-
547
- /**
548
- * This listener is transient and not to be serialized to a replica. The handling of fixes happens on the
549
- * primary instance of a replica set only.
550
- */
551
- @Override
552
- public boolean isTransient() {
553
- return true;
554
- }
555
-
556
- @Override
557
- public void leaderboardAdded(LeaderboardGroup group, Leaderboard leaderboard) {
558
- invalidateCache();
559
- leaderboard.addRaceColumnListener(this);
560
- leaderboard.addCourseAreaChangeListener(this);
561
- }
562
-
563
- @Override
564
- public void leaderboardRemoved(LeaderboardGroup group, Leaderboard leaderboard) {
565
- invalidateCache();
566
- leaderboard.removeRaceColumnListener(this);
567
- leaderboard.removeCourseAreaChangeListener(this);
568
- }
569
-
570
- @Override
571
- public void eventAdded(Event event) {
572
- invalidateCache();
573
- event.addEventListener(this);
574
- }
575
-
576
- @Override
577
- public void eventRemoved(Event event) {
578
- invalidateCache();
579
- event.removeEventListener(this);
580
- }
581
-
582
- @Override
583
- public void leaderboardGroupAdded(Event event, LeaderboardGroup leaderboardGroup) {
584
- invalidateCache();
585
- leaderboardGroup.addLeaderboardGroupListener(this);
586
- }
587
-
588
- @Override
589
- public void leaderboardGroupRemoved(Event event, LeaderboardGroup leaderboardGroup) {
590
- invalidateCache();
591
- leaderboardGroup.removeLeaderboardGroupListener(this);
592
- }
593
-
594
- @Override
595
- public void courseAreaAdded(Venue venue, CourseArea courseArea) {
596
- invalidateCache();
597
- }
598
-
599
- @Override
600
- public void courseAreaRemoved(Venue venue, CourseArea courseArea) {
601
- invalidateCache();
602
- }
603
-
604
- @Override
605
- public void courseAreasChanged(HasCourseAreas hasCourseAreas, Iterable<CourseArea> oldCourseAreas,
606
- Iterable<CourseArea> newCourseAreas) {
607
- invalidateCache();
608
- }
609
- }
610
-
611 383
/**
612 384
* @param comp
613 385
* The resolved competitor for wich a gpsfix was just recorded.
... ...
@@ -631,12 +403,10 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
631 403
}
632 404
633 405
public FixLoaderAndTracker(DynamicTrackedRace trackedRace, SensorFixStore sensorFixStore,
634
- SensorFixMapperFactory sensorFixMapperFactory, EventResolver eventResolver, boolean removeOutliersFromCompetitorTracks) {
406
+ SensorFixMapperFactory sensorFixMapperFactory, boolean removeOutliersFromCompetitorTracks) {
635 407
this.sensorFixStore = sensorFixStore;
636 408
this.sensorFixMapperFactory = sensorFixMapperFactory;
637 409
this.trackedRace = trackedRace;
638
- this.eventResolver = eventResolver;
639
- this.eventResolverListener = new EventResolverListener();
640 410
this.removeOutliersFromCompetitorTracks = removeOutliersFromCompetitorTracks;
641 411
startTracking();
642 412
}
... ...
@@ -674,63 +444,6 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
674 444
}
675 445
676 446
/**
677
- * Finds the {@link Regatta} and zero or more {@link Event}s to which the {@link #trackedRace} belongs and checks
678
- * their {@link Regatta#getEndDate() regatta end date} and {@link Event#getEndDate() event end dates}. If an end
679
- * date is not set, this is ignored and does not lead to the time point being considered "excluded." If multiple
680
- * events are found, the time point must be excluded for all of them in order to be considered excluded. In other
681
- * words: if one event considers this time point "in" or doesn't define an end date that would explicitly exclude
682
- * it, the time point is implicitly considered "in" overall.
683
- */
684
- private boolean excludedByRegattaOrEventsEndDates(TimePoint timePoint) {
685
- return (getRegatta() != null && getRegatta().getEndDate() != null && timePoint.after(getRegatta().getEndDate()))
686
- || !Util.isEmpty(Util.filter(getEvents(), event->event.getEndDate() == null || !timePoint.after(event.getEndDate())));
687
- }
688
-
689
- private Regatta getRegatta() {
690
- return trackedRace.getTrackedRegatta().getRegatta();
691
- }
692
-
693
- private Iterable<Event> getEvents() {
694
- final Iterable<Event> result;
695
- if (eventsCache != null) {
696
- result = eventsCache.getB();
697
- } else {
698
- final Regatta regatta = getRegatta();
699
- regatta.addCourseAreaChangeListener(eventResolverListener);
700
- final Iterable<Event> allEvents = eventResolver.getAllEvents();
701
- for (final Event event : allEvents) {
702
- eventResolverListener.addAsListenerTo(event); // removal happens upon invalidation by the listener itself
703
- }
704
- result = Util.filter(eventResolver.getAllEvents(), event->isEventContainsRegatta(event, regatta));
705
- eventsCache = new Pair<>(allEvents, result);
706
- }
707
- return result;
708
- }
709
-
710
- /**
711
- * For a {@code true} answer, the {@code event} must have a {@link Venue#getCourseAreas() course area} that
712
- * matches that of the {@code regatta} and where that event then has a leaderboard group with a
713
- * {@link RegattaLeaderboard} that refers to the {@code regatta}, or otherwise another type of leaderboard
714
- * such as a {@link FlexibleLeaderboard} that has the {@link #trackedRace} attached.
715
- */
716
- private boolean isEventContainsRegatta(Event event, Regatta regatta) {
717
- boolean result = false;
718
- if (Util.containsAny(event.getVenue().getCourseAreas(), regatta.getCourseAreas())) {
719
- for (final LeaderboardGroup leaderboardGroup : event.getLeaderboardGroups()) {
720
- for (final Leaderboard leaderboard : leaderboardGroup.getLeaderboards()) {
721
- if ((leaderboard instanceof RegattaLeaderboard && ((RegattaLeaderboard) leaderboard).getRegatta() == regatta)
722
- ||
723
- (leaderboard.hasTrackedRace(trackedRace))) {
724
- result = true;
725
- break;
726
- }
727
- }
728
- }
729
- }
730
- return result;
731
- }
732
-
733
- /**
734 447
* Loads fixes defined by the given mapping and {@link MultiTimeRange}. Only those fixes that are in the mapping
735 448
* time range are being loaded.
736 449
*/
... ...
@@ -1054,8 +767,6 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
1054 767
}
1055 768
}
1056 769
sensorFixStore.removeListener(listener);
1057
- eventResolver.removeEventResolverListener(eventResolverListener);
1058
- getRegatta().removeCourseAreaChangeListener(eventResolverListener);
1059 770
}
1060 771
1061 772
private void startTracking() {
java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/fixtracker/RaceLogFixTrackerManager.java
... ...
@@ -11,7 +11,6 @@ import com.sap.sailing.domain.abstractlog.race.impl.BaseRaceLogEventVisitor;
11 11
import com.sap.sailing.domain.abstractlog.race.tracking.RaceLogDenoteForTrackingEvent;
12 12
import com.sap.sailing.domain.abstractlog.race.tracking.analyzing.impl.RaceLogTrackingStateAnalyzer;
13 13
import com.sap.sailing.domain.common.racelog.tracking.RaceLogTrackingState;
14
-import com.sap.sailing.domain.leaderboard.EventResolver;
15 14
import com.sap.sailing.domain.racelog.tracking.SensorFixStore;
16 15
import com.sap.sailing.domain.racelogsensortracking.SensorFixMapperFactory;
17 16
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
... ...
@@ -69,12 +68,8 @@ public class RaceLogFixTrackerManager implements TrackingDataLoader {
69 68
}
70 69
};
71 70
72
- private final EventResolver eventResolver;
73
-
74 71
public RaceLogFixTrackerManager(DynamicTrackedRace trackedRace, SensorFixStore sensorFixStore,
75
- SensorFixMapperFactory sensorFixMapperFactory, boolean removeOutliersFromCompetitorTracks,
76
- EventResolver eventResolver) {
77
- this.eventResolver = eventResolver;
72
+ SensorFixMapperFactory sensorFixMapperFactory, boolean removeOutliersFromCompetitorTracks) {
78 73
this.removeOutliersFromCompetitorTracks = removeOutliersFromCompetitorTracks;
79 74
this.trackedRace = trackedRace;
80 75
this.sensorFixStore = sensorFixStore;
... ...
@@ -135,7 +130,7 @@ public class RaceLogFixTrackerManager implements TrackingDataLoader {
135 130
private synchronized void startTrackerIfNotAlreadyStarted() {
136 131
if (tracker == null) {
137 132
logger.fine("Starting fix tracker for TrackedRace: " + trackedRace.getRaceIdentifier());
138
- tracker = new FixLoaderAndTracker(trackedRace, sensorFixStore, sensorFixMapperFactory, eventResolver, removeOutliersFromCompetitorTracks);
133
+ tracker = new FixLoaderAndTracker(trackedRace, sensorFixStore, sensorFixMapperFactory, removeOutliersFromCompetitorTracks);
139 134
}
140 135
}
141 136
java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/fixtracker/RegattaLogFixTrackerRegattaListener.java
... ...
@@ -97,8 +97,7 @@ public class RegattaLogFixTrackerRegattaListener extends AbstractTrackedRegattaA
97 97
if (added) {
98 98
RaceLogFixTrackerManager trackerManager = new RaceLogFixTrackerManager(
99 99
(DynamicTrackedRace) trackedRace, racingEventServiceTracker.getInitializedService(0).getSensorFixStore(),
100
- sensorFixMapperFactory, /* removeOutliersFromCompetitorTracks */ true,
101
- /* eventResolver */ racingEventServiceTracker.getInitializedService(0));
100
+ sensorFixMapperFactory, /* removeOutliersFromCompetitorTracks */ true);
102 101
RaceLogFixTrackerManager oldInstance = dataTrackers.put(raceIdentifier, trackerManager);
103 102
if (oldInstance != null) {
104 103
oldInstance.stop(/* preemptive */ true, /* willBeRemoved */ false);
java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/EmptySensorFixStore.java
... ...
@@ -54,12 +54,12 @@ public enum EmptySensorFixStore implements SensorFixStore {
54 54
}
55 55
56 56
@Override
57
- public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix, boolean filterByRegattaAndEventEndDate) {
57
+ public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix) {
58 58
}
59 59
60 60
@Override
61 61
public <FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> storeFixes(DeviceIdentifier device,
62
- Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
62
+ Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay) {
63 63
return Collections.emptySet();
64 64
}
65 65
java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/FixReceivedListener.java
... ...
@@ -23,10 +23,6 @@ public interface FixReceivedListener<FixT extends Timed> {
23 23
* if {@code true} then all listeners to which the fix is forwarded shall check to which races the fix
24 24
* maps and report the live delay for all those races as the third component of the resulting
25 25
* {@link Triple}s.
26
- * @param filterByRegattaAndEventEndDate
27
- * if {@code true}, the fix's {@link Timed#getTimePoint() time point} is matched against the end date of
28
- * any regatta and event that this listener is responsible for; then, fixes that are newer than these end
29
- * dates are dropped and not recorded
30 26
* @param returnManeuverUpdate
31 27
* if {@code true}, all listeners to which this fix is forwarded shall check whether the fix feeds into a
32 28
* competitor's track in the scope of a race where for that competitor the maneuver list has changed
... ...
@@ -39,5 +35,5 @@ public interface FixReceivedListener<FixT extends Timed> {
39 35
* mapping is currently ambiguous.
40 36
*/
41 37
Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> fixReceived(DeviceIdentifier device, FixT fix,
42
- boolean returnManeuverChanges, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate);
38
+ boolean returnManeuverChanges, boolean returnLiveDelay);
43 39
}
java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/SensorFixStore.java
... ...
@@ -65,15 +65,8 @@ public interface SensorFixStore {
65 65
* the device to store the fix for. Must not be <code>null</code>.
66 66
* @param fix
67 67
* The fix to store. Must not be <code>null</code>.
68
- * @param filterByRegattaAndEventEndDate
69
- * if {@code true}, then when forwarding this fix to this store's
70
- * {@link #addListener(FixReceivedListener, DeviceIdentifier) listeners}, this parameter is passed on to
71
- * {@link FixReceivedListener#fixReceived(DeviceIdentifier, Timed, boolean, boolean, boolean)}. It leads
72
- * to the fix's {@link Timed#getTimePoint() time point} being matched against the end date of any regatta
73
- * and event that this listener is responsible for; then, fixes that are newer than these end dates are
74
- * dropped and not recorded
75 68
*/
76
- <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix, boolean filterByRegattaAndEventEndDate);
69
+ <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix);
77 70
78 71
/**
79 72
* Saves a batch of fixes for the given device and informs all registered listeners about the new fix.
... ...
@@ -92,13 +85,6 @@ public interface SensorFixStore {
92 85
* if {@code true} then all listeners to which the fix is forwarded shall check to which races the fix
93 86
* maps and report the live delay for all those races as the third component of the resulting
94 87
* {@link Triple}s.
95
- * @param filterByRegattaAndEventEndDate
96
- * if {@code true}, then when forwarding this fix to this store's
97
- * {@link #addListener(FixReceivedListener, DeviceIdentifier) listeners}, this parameter is passed on to
98
- * {@link FixReceivedListener#fixReceived(DeviceIdentifier, Timed, boolean, boolean, boolean)}. It leads
99
- * to the fix's {@link Timed#getTimePoint() time point} being matched against the end date of any regatta
100
- * and event that this listener is responsible for; then, fixes that are newer than these end dates are
101
- * dropped and not recorded
102 88
* @return An {@link Iterable} with {@link RegattaAndRaceIdentifier}s in their first component is returned that will
103 89
* contain races with new maneuvers which were not available at the last time the given device stored a fix
104 90
* in case the {@code returnManeuverUpdate} parameter was set to {@code true}, and all races with their live
... ...
@@ -107,11 +93,11 @@ public interface SensorFixStore {
107 93
* identifiers if the device mapping is currently ambiguous.
108 94
*/
109 95
<FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> storeFixes(
110
- DeviceIdentifier device, Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate);
96
+ DeviceIdentifier device, Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay);
111 97
112 98
/**
113 99
* Listeners are notified, whenever a {@link GPSFix} submitted by the {@code device}
114
- * is stored through the {@link #storeFix(DeviceIdentifier, GPSFix, boolean)} method.
100
+ * is stored through the {@link #storeFix(DeviceIdentifier, GPSFix)} method.
115 101
*/
116 102
void addListener(FixReceivedListener<? extends Timed> listener, DeviceIdentifier device);
117 103
java/com.sap.sailing.expeditionconnector.test/src/com/sap/sailing/expeditionconnector/test/UDPExpeditionReceiverTest.java
... ...
@@ -144,7 +144,7 @@ public class UDPExpeditionReceiverTest {
144 144
}
145 145
146 146
@Override
147
- public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix, boolean filterByRegattaAndEventEndDate) {
147
+ public <FixT extends Timed> void storeFix(DeviceIdentifier device, FixT fix) {
148 148
List<Timed> fixesReceivedFromDevice = fixesReceived.get(device);
149 149
if (fixesReceivedFromDevice == null) {
150 150
fixesReceivedFromDevice = new ArrayList<>();
... ...
@@ -155,9 +155,9 @@ public class UDPExpeditionReceiverTest {
155 155
156 156
@Override
157 157
public <FixT extends Timed> Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> storeFixes(DeviceIdentifier device,
158
- Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay, boolean filterByRegattaAndEventEndDate) {
158
+ Iterable<FixT> fixes, boolean returnManeuverUpdate, boolean returnLiveDelay) {
159 159
for (final FixT fix : fixes) {
160
- storeFix(device, fix, /* filterByRegattaAndEventEndDate */ false);
160
+ storeFix(device, fix);
161 161
}
162 162
return Collections.emptySet();
163 163
}
java/com.sap.sailing.expeditionconnector/src/com/sap/sailing/expeditionconnector/UDPExpeditionReceiver.java
... ...
@@ -131,7 +131,7 @@ public class UDPExpeditionReceiver extends UDPReceiver<ExpeditionMessage, Expedi
131 131
}
132 132
final DoubleVectorFix fix = new DoubleVectorFixImpl(msg.getTimePoint(), vector);
133 133
if (fix.hasValidData()) {
134
- deviceRegistry.getSensorFixStore().storeFix(sensorDeviceIdentifier, fix, /* filterByRegattaAndEventEndDate */ false);
134
+ deviceRegistry.getSensorFixStore().storeFix(sensorDeviceIdentifier, fix);
135 135
}
136 136
}
137 137
... ...
@@ -142,7 +142,7 @@ public class UDPExpeditionReceiver extends UDPReceiver<ExpeditionMessage, Expedi
142 142
private void tryToProduceAndStoreGpsFix(ExpeditionMessage msg, ExpeditionGpsDeviceIdentifier gpsDeviceIdentifier) {
143 143
final GPSFixMoving fix = msg.getGPSFixMoving();
144 144
if (fix != null) {
145
- deviceRegistry.getSensorFixStore().storeFix(gpsDeviceIdentifier, fix, /* filterByRegattaAndEventEndDate */ false);
145
+ deviceRegistry.getSensorFixStore().storeFix(gpsDeviceIdentifier, fix);
146 146
}
147 147
}
148 148
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/whatsnew/resources/SailingAnalyticsNotes.html
... ...
@@ -6,6 +6,11 @@
6 6
<div id="mainContent">
7 7
<h4 class="articleHeadline" id="sailingAnalyticsHeadline">What's New - Sailing Analytics</h4>
8 8
<div class="innerContent">
9
+ <h5 class="articleSubheadline">April 2026</h5>
10
+ <ul class="bulletList">
11
+ <li>Tables with multi-selection support now have a select/de-select all checkbox in the table header.
12
+ This comes with general improvements in table selection/de-selection handling.</li>
13
+ </ul>
9 14
<h5 class="articleSubheadline">March 2026</h5>
10 15
<ul class="bulletList">
11 16
<li>Maneuver analysis now identifies track segments worth looking at with consistency.
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/AbstractLeaderboardConfigPanel.java
... ...
@@ -16,6 +16,7 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand;
16 16
import com.google.gwt.event.shared.HandlerRegistration;
17 17
import com.google.gwt.user.cellview.client.AbstractCellTable;
18 18
import com.google.gwt.user.cellview.client.CellTable;
19
+import com.google.gwt.user.cellview.client.Header;
19 20
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
20 21
import com.google.gwt.user.client.Command;
21 22
import com.google.gwt.user.client.Window;
... ...
@@ -390,20 +391,18 @@ public abstract class AbstractLeaderboardConfigPanel extends FormPanel
390 391
391 392
protected abstract void addColumnsToRacesTable(CellTable<RaceColumnDTOAndFleetDTOWithNameBasedEquality> racesTable);
392 393
393
- protected SelectionCheckboxColumn<StrippedLeaderboardDTO> createSortableSelectionCheckboxColumn(
394
+ protected SelectionCheckboxColumn<StrippedLeaderboardDTO> createSelectionCheckboxColumn(
394 395
final FlushableCellTable<StrippedLeaderboardDTO> leaderboardTable,
395 396
AdminConsoleTableResources tableResources,
396 397
ListHandler<StrippedLeaderboardDTO> leaderboardColumnListHandler,
397 398
ListDataProvider<StrippedLeaderboardDTO> listDataProvider) {
398
- SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = new SelectionCheckboxColumn<StrippedLeaderboardDTO>(
399
+ final SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = new SelectionCheckboxColumn<StrippedLeaderboardDTO>(
399 400
tableResources.cellTableStyle().cellTableCheckboxSelected(),
400 401
tableResources.cellTableStyle().cellTableCheckboxDeselected(),
401 402
tableResources.cellTableStyle().cellTableCheckboxColumnCell(),
402
- new NameBasedStrippedLeaderboardDTOEntityIdentityComparator(), listDataProvider, leaderboardTable);
403
- selectionCheckboxColumn.setSortable(true);
404
- leaderboardColumnListHandler.setComparator(selectionCheckboxColumn,
405
- (o1, o2) -> (leaderboardTable.getSelectionModel().isSelected(o1) ? 1 : 0)
406
- - (leaderboardTable.getSelectionModel().isSelected(o2) ? 1 : 0));
403
+ new NameBasedStrippedLeaderboardDTOEntityIdentityComparator(), listDataProvider);
404
+ final Header<Boolean> selectAllHeader = selectionCheckboxColumn.createHeader();
405
+ leaderboardTable.addColumn(selectionCheckboxColumn, selectAllHeader);
407 406
return selectionCheckboxColumn;
408 407
}
409 408
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/BoatPanel.java
... ...
@@ -61,11 +61,6 @@ public class BoatPanel extends SimplePanel implements FilterablePanelProvider<Bo
61 61
allowReloadButton.setEnabled(!refreshableBoatSelectionModel.getSelectedSet().isEmpty());
62 62
final Button addBoatButton = buttonPanel.addCreateAction(stringMessages.add(), this::openAddBoatDialog);
63 63
addBoatButton.ensureDebugId("AddBoatButton");
64
- buttonPanel.addUnsecuredAction(stringMessages.selectAll(), () -> {
65
- for (BoatDTO b : boatTable.getDataProvider().getList()) {
66
- refreshableBoatSelectionModel.setSelected(b, true);
67
- }
68
- });
69 64
mainPanel.add(boatTable);
70 65
}
71 66
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/CompetitorPanel.java
... ...
@@ -84,11 +84,6 @@ public class CompetitorPanel extends SimplePanel implements BusyDisplay, Filtera
84 84
final Button addCompetitorButton = buttonPanel.addCreateAction(stringMessages.add(),
85 85
()->openAddCompetitorDialog(createWithBoatByDefault));
86 86
addCompetitorButton.ensureDebugId("AddCompetitorButton");
87
- buttonPanel.addUnsecuredAction(stringMessages.selectAll(), () -> {
88
- for (CompetitorDTO c : competitorTable.getDataProvider().getList()) {
89
- refreshableCompetitorSelectionModel.setSelected(c, true);
90
- }
91
- });
92 87
buttonPanel.addCreateAction(stringMessages.importCompetitors(), () -> {
93 88
sailingServiceWrite.getCompetitorProviderNames(new AsyncCallback<Iterable<String>>() {
94 89
@Override
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/DeviceConfigurationListComposite.java
... ...
@@ -25,9 +25,10 @@ import com.sap.sse.common.Util;
25 25
import com.sap.sse.gwt.adminconsole.AdminConsoleTableResources;
26 26
import com.sap.sse.gwt.client.ErrorReporter;
27 27
import com.sap.sse.gwt.client.celltable.AbstractSortableTextColumn;
28
-import com.sap.sse.gwt.client.celltable.BaseCelltable;
29 28
import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
29
+import com.sap.sse.gwt.client.celltable.FlushableCellTable;
30 30
import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
31
+import com.sap.sse.gwt.client.celltable.SelectionCheckboxColumn;
31 32
import com.sap.sse.security.shared.HasPermissions;
32 33
import com.sap.sse.security.shared.HasPermissions.DefaultActions;
33 34
import com.sap.sse.security.shared.impl.SecuredSecurityTypes;
... ...
@@ -37,11 +38,12 @@ import com.sap.sse.security.ui.client.component.DefaultActionsImagesBarCell;
37 38
import com.sap.sse.security.ui.client.component.EditOwnershipDialog;
38 39
import com.sap.sse.security.ui.client.component.SecuredDTOOwnerColumn;
39 40
import com.sap.sse.security.ui.client.component.editacl.EditACLDialog;
41
+import com.google.gwt.user.cellview.client.Header;
40 42
41 43
public class DeviceConfigurationListComposite extends Composite {
42 44
protected static AdminConsoleTableResources tableResource = GWT.create(AdminConsoleTableResources.class);
43 45
44
- private final RefreshableMultiSelectionModel<DeviceConfigurationWithSecurityDTO> refreshableConfigurationSelectionModel;
46
+ private RefreshableMultiSelectionModel<DeviceConfigurationWithSecurityDTO> refreshableConfigurationSelectionModel;
45 47
private final CellTable<DeviceConfigurationWithSecurityDTO> configurationTable;
46 48
protected ListDataProvider<DeviceConfigurationWithSecurityDTO> configurationsDataProvider;
47 49
... ...
@@ -66,23 +68,9 @@ public class DeviceConfigurationListComposite extends Composite {
66 68
noConfigurationsLabel.setWordWrap(false);
67 69
panel.add(noConfigurationsLabel);
68 70
configurationsDataProvider = new ListDataProvider<DeviceConfigurationWithSecurityDTO>();
69
- refreshTable();
70 71
configurationTable = createConfigurationTable(userService);
71 72
configurationTable.setVisible(true);
72
- refreshableConfigurationSelectionModel = new RefreshableMultiSelectionModel<>(
73
- new EntityIdentityComparator<DeviceConfigurationWithSecurityDTO>() {
74
- @Override
75
- public boolean representSameEntity(DeviceConfigurationWithSecurityDTO dto1,
76
- DeviceConfigurationWithSecurityDTO dto2) {
77
- return Util.equalsWithNull(dto1.id, dto2.id);
78
- }
79
-
80
- @Override
81
- public int hashCode(DeviceConfigurationWithSecurityDTO t) {
82
- return t.id == null ? 0 : t.id.hashCode();
83
- }
84
- }, configurationsDataProvider);
85
- configurationTable.setSelectionModel(refreshableConfigurationSelectionModel);
73
+ refreshTable();
86 74
panel.add(configurationTable);
87 75
initWidget(mainPanel);
88 76
}
... ...
@@ -117,14 +105,31 @@ public class DeviceConfigurationListComposite extends Composite {
117 105
}
118 106
119 107
private CellTable<DeviceConfigurationWithSecurityDTO> createConfigurationTable(final UserService userService) {
120
- CellTable<DeviceConfigurationWithSecurityDTO> table = new BaseCelltable<DeviceConfigurationWithSecurityDTO>(
121
- /* pageSize */10000, tableResource);
108
+ final FlushableCellTable<DeviceConfigurationWithSecurityDTO> table = new FlushableCellTable<>(10000, tableResource);
122 109
configurationsDataProvider.addDataDisplay(table);
123 110
table.ensureDebugId("DeviceConfigurationList");
124 111
table.setWidth("100%");
125 112
ListHandler<DeviceConfigurationWithSecurityDTO> columnSortHandler = new ListHandler<DeviceConfigurationWithSecurityDTO>(
126 113
configurationsDataProvider.getList());
127 114
table.addColumnSortHandler(columnSortHandler);
115
+ final SelectionCheckboxColumn<DeviceConfigurationWithSecurityDTO> checkColumn = new SelectionCheckboxColumn<DeviceConfigurationWithSecurityDTO>(
116
+ tableResource.cellTableStyle().cellTableCheckboxSelected(),
117
+ tableResource.cellTableStyle().cellTableCheckboxDeselected(),
118
+ tableResource.cellTableStyle().cellTableCheckboxColumnCell(),
119
+ new EntityIdentityComparator<DeviceConfigurationWithSecurityDTO>() {
120
+ @Override
121
+ public boolean representSameEntity(DeviceConfigurationWithSecurityDTO a, DeviceConfigurationWithSecurityDTO b) {
122
+ return Util.equalsWithNull(a.id, b.id);
123
+ }
124
+ @Override
125
+ public int hashCode(DeviceConfigurationWithSecurityDTO t) {
126
+ return t.id == null ? 0 : t.id.hashCode();
127
+ }
128
+ }, configurationsDataProvider);
129
+ final Header<Boolean> selectAllHeader = checkColumn.createHeader();
130
+ table.addColumn(checkColumn, selectAllHeader);
131
+ refreshableConfigurationSelectionModel = checkColumn.getSelectionModel();
132
+ table.setSelectionModel(refreshableConfigurationSelectionModel, checkColumn.getSelectionManager());
128 133
TextColumn<DeviceConfigurationWithSecurityDTO> identifierNameColumn = new TextColumn<DeviceConfigurationWithSecurityDTO>() {
129 134
@Override
130 135
public String getValue(DeviceConfigurationWithSecurityDTO config) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java
... ...
@@ -81,6 +81,7 @@ import com.sap.sse.security.ui.client.component.EditOwnershipDialog;
81 81
import com.sap.sse.security.ui.client.component.EditOwnershipDialog.DialogConfig;
82 82
import com.sap.sse.security.ui.client.component.SecuredDTOOwnerColumn;
83 83
import com.sap.sse.security.ui.client.component.editacl.EditACLDialog;
84
+import com.google.gwt.user.cellview.client.Header;
84 85
85 86
/**
86 87
* A composite showing the list of all sailing events
... ...
@@ -229,7 +230,7 @@ public class EventListComposite extends Composite {
229 230
public int hashCode(EventDTO t) {
230 231
return t.id.hashCode();
231 232
}
232
- }, filterTextbox.getAllListDataProvider(),table);
233
+ }, filterTextbox.getAllListDataProvider());
233 234
AnchorCell anchorCell = new AnchorCell();
234 235
ListHandler<EventDTO> listHandler = new ListHandler<EventDTO>(eventListDataProvider.getList());
235 236
final TextColumn<EventDTO> eventUUidColumn = new AbstractSortableTextColumn<EventDTO>(
... ...
@@ -372,7 +373,8 @@ public class EventListComposite extends Composite {
372 373
configureTableColumnSortHandler(listHandler, eventSelectionCheckboxColumn,
373 374
eventNameColumn, venueNameColumn, startEndDateColumn, isPublicColumn, courseAreasColumn,
374 375
leaderboardGroupsColumn, groupColumn, userColumn);
375
- table.addColumn(eventSelectionCheckboxColumn, eventSelectionCheckboxColumn.getHeader());
376
+ final Header<Boolean> selectAllHeader = eventSelectionCheckboxColumn.createHeader();
377
+ table.addColumn(eventSelectionCheckboxColumn, selectAllHeader);
376 378
table.addColumn(eventNameColumn, stringMessages.event());
377 379
table.addColumn(venueNameColumn, stringMessages.venue());
378 380
table.addColumn(startEndDateColumn, stringMessages.from() + "/" + stringMessages.to());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/IgtimiDevicesPanel.java
... ...
@@ -24,6 +24,7 @@ import com.google.gwt.text.shared.SafeHtmlRenderer;
24 24
import com.google.gwt.user.cellview.client.AbstractCellTable;
25 25
import com.google.gwt.user.cellview.client.Column;
26 26
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
27
+import com.google.gwt.user.cellview.client.Header;
27 28
import com.google.gwt.user.cellview.client.TextColumn;
28 29
import com.google.gwt.user.client.Window;
29 30
import com.google.gwt.user.client.rpc.AsyncCallback;
... ...
@@ -310,7 +311,7 @@ public class IgtimiDevicesPanel extends FlowPanel implements FilterablePanelProv
310 311
public int hashCode(IgtimiDeviceWithSecurityDTO t) {
311 312
return 7482 ^ (int) t.getId();
312 313
}
313
- }, filterDevicesPanel.getAllListDataProvider(), table);
314
+ }, filterDevicesPanel.getAllListDataProvider());
314 315
final ListHandler<IgtimiDeviceWithSecurityDTO> columnSortHandler = new ListHandler<>(filteredDevices.getList());
315 316
table.addColumnSortHandler(columnSortHandler);
316 317
columnSortHandler.setComparator(devicesSelectionCheckboxColumn, devicesSelectionCheckboxColumn.getComparator());
... ...
@@ -374,8 +375,8 @@ public class IgtimiDevicesPanel extends FlowPanel implements FilterablePanelProv
374 375
.create(userService.getUserManagementWriteService(), type, roleDefinition -> refreshDevices(), stringMessages);
375 376
actionColumn.addAction(DefaultActionsImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.CHANGE_ACL,
376 377
configACL::openDialog);
377
- // add columns to table:
378
- table.addColumn(devicesSelectionCheckboxColumn, devicesSelectionCheckboxColumn.getHeader());
378
+ final Header<Boolean> devicesSelectAllHeader = devicesSelectionCheckboxColumn.createHeader();
379
+ table.addColumn(devicesSelectionCheckboxColumn, devicesSelectAllHeader);
379 380
table.addColumn(deviceIdColumn, stringMessages.id());
380 381
table.addColumn(deviceNameColumn, stringMessages.name());
381 382
table.addColumn(deviceSerialNumberColumn, stringMessages.serialNumber());
... ...
@@ -464,7 +465,7 @@ public class IgtimiDevicesPanel extends FlowPanel implements FilterablePanelProv
464 465
public int hashCode(IgtimiDataAccessWindowWithSecurityDTO t) {
465 466
return 7482 ^ (int) t.getId();
466 467
}
467
- }, filterDataAccessWindowsPanel.getAllListDataProvider(), table);
468
+ }, filterDataAccessWindowsPanel.getAllListDataProvider());
468 469
final ListHandler<IgtimiDataAccessWindowWithSecurityDTO> columnSortHandler = new ListHandler<>(filteredDAWs.getList());
469 470
table.addColumnSortHandler(columnSortHandler);
470 471
columnSortHandler.setComparator(dawsSelectionCheckboxColumn, dawsSelectionCheckboxColumn.getComparator());
... ...
@@ -491,8 +492,8 @@ public class IgtimiDevicesPanel extends FlowPanel implements FilterablePanelProv
491 492
.create(userService.getUserManagementWriteService(), type, roleDefinition -> refreshDataAccessWindows(), stringMessages);
492 493
actionColumn.addAction(DefaultActionsImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.CHANGE_ACL,
493 494
configACL::openDialog);
494
- // add columns to table:
495
- table.addColumn(dawsSelectionCheckboxColumn, dawsSelectionCheckboxColumn.getHeader());
495
+ final Header<Boolean> dawSelectAllHeader = dawsSelectionCheckboxColumn.createHeader();
496
+ table.addColumn(dawsSelectionCheckboxColumn, dawSelectAllHeader);
496 497
table.addColumn(dawIdColumn, stringMessages.id());
497 498
table.addColumn(dawSerialNumberColumn, stringMessages.serialNumber());
498 499
table.addColumn(dawFromColumn, stringMessages.from());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/LeaderboardConfigPanel.java
... ...
@@ -181,7 +181,7 @@ public class LeaderboardConfigPanel extends AbstractLeaderboardConfigPanel
181 181
ListDataProvider<StrippedLeaderboardDTO> listDataProvider) {
182 182
ListHandler<StrippedLeaderboardDTO> leaderboardColumnListHandler = new ListHandler<StrippedLeaderboardDTO>(
183 183
filteredLeaderboardList.getList());
184
- SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = createSortableSelectionCheckboxColumn(
184
+ SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = createSelectionCheckboxColumn(
185 185
leaderboardTable, tableResources, leaderboardColumnListHandler, listDataProvider);
186 186
AnchorCell anchorCell = new AnchorCell();
187 187
Column<StrippedLeaderboardDTO, SafeHtml> linkColumn = new Column<StrippedLeaderboardDTO, SafeHtml>(
... ...
@@ -379,7 +379,6 @@ public class LeaderboardConfigPanel extends AbstractLeaderboardConfigPanel
379 379
configACL.openDialog(t);
380 380
}
381 381
});
382
- leaderboardTable.addColumn(selectionCheckboxColumn, selectionCheckboxColumn.getHeader());
383 382
leaderboardTable.addColumn(linkColumn, stringMessages.name());
384 383
leaderboardTable.addColumn(leaderboardDisplayNameColumn, stringMessages.displayName());
385 384
leaderboardTable.addColumn(leaderboardCanBoatsOfCompetitorsChangePerRaceColumn,
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/LeaderboardGroupConfigPanel.java
... ...
@@ -30,6 +30,7 @@ import com.google.gwt.safehtml.shared.UriUtils;
30 30
import com.google.gwt.user.cellview.client.AbstractCellTable;
31 31
import com.google.gwt.user.cellview.client.CellTable.Resources;
32 32
import com.google.gwt.user.cellview.client.Column;
33
+import com.google.gwt.user.cellview.client.Header;
33 34
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
34 35
import com.google.gwt.user.cellview.client.TextColumn;
35 36
import com.google.gwt.user.client.Window;
... ...
@@ -235,7 +236,7 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel
235 236
public int hashCode(StrippedLeaderboardDTO t) {
236 237
return t.getName().hashCode();
237 238
}
238
- }, leaderboardsFilterablePanel.getAllListDataProvider(), leaderboardsTable);
239
+ }, leaderboardsFilterablePanel.getAllListDataProvider());
239 240
refreshableLeaderboardsSelectionModel = leaderboardTableSelectionColumn.getSelectionModel();
240 241
leaderboardsTable.setSelectionModel(refreshableLeaderboardsSelectionModel, leaderboardTableSelectionColumn.getSelectionManager());
241 242
leaderboardsFilterablePanel.getTextBox().ensureDebugId("LeaderboardsFilterTextBox");
... ...
@@ -279,7 +280,8 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel
279 280
};
280 281
leaderboardsTable.setWidth("100%");
281 282
leaderboardsTable.addColumnSortHandler(leaderboardsListHandler);
282
- leaderboardsTable.addColumn(leaderboardTableSelectionColumn, leaderboardTableSelectionColumn.getHeader());
283
+ final Header<Boolean> selectAllHeader = leaderboardTableSelectionColumn.createHeader();
284
+ leaderboardsTable.addColumn(leaderboardTableSelectionColumn, selectAllHeader);
283 285
leaderboardsTable.addColumn(leaderboardsNameColumn, stringMessages.leaderboardName());
284 286
leaderboardsTable.addColumn(leaderboardsRacesColumn, stringMessages.races());
285 287
refreshableLeaderboardsSelectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
... ...
@@ -383,9 +385,10 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel
383 385
public int hashCode(StrippedLeaderboardDTO t) {
384 386
return t.getName().hashCode();
385 387
}
386
- }, groupDetailsProvider, groupDetailsTable);
388
+ }, groupDetailsProvider);
389
+ final Header<Boolean> groupDetailsSelectAllHeader = groupDetailsTableSelectionColumn.createHeader();
387 390
groupDetailsTable.setWidth("100%");
388
- groupDetailsTable.addColumn(groupDetailsTableSelectionColumn, groupDetailsTableSelectionColumn.getHeader());
391
+ groupDetailsTable.addColumn(groupDetailsTableSelectionColumn, groupDetailsSelectAllHeader);
389 392
groupDetailsTable.addColumn(groupDetailsNameColumn, stringMessages.leaderboardName());
390 393
groupDetailsTable.addColumn(groupDetailsRacesColumn, stringMessages.races());
391 394
refreshableGroupDetailsSelectionModel = groupDetailsTableSelectionColumn.getSelectionModel();
... ...
@@ -593,9 +596,10 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel
593 596
public int hashCode(LeaderboardGroupDTO t) {
594 597
return t.getId().hashCode();
595 598
}
596
- }, groupsFilterablePanel.getAllListDataProvider(), groupsTable);
599
+ }, groupsFilterablePanel.getAllListDataProvider());
600
+ final Header<Boolean> groupsSelectAllHeader = leaderboardTableSelectionColumn.createHeader();
597 601
groupsTable.setWidth("100%");
598
- groupsTable.addColumn(leaderboardTableSelectionColumn, leaderboardTableSelectionColumn.getHeader());
602
+ groupsTable.addColumn(leaderboardTableSelectionColumn, groupsSelectAllHeader);
599 603
groupsTable.addColumn(groupNameColumn, stringMessages.name());
600 604
groupsTable.addColumn(groupDescriptionColumn, stringMessages.description());
601 605
groupsTable.addColumn(groupDisplayNameColumn, stringMessages.displayName());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/MediaPanel.java
... ...
@@ -122,7 +122,6 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
122 122
add(buttonAndFilterPanel);
123 123
allMediaTracks = new ArrayList<>();
124 124
buttonAndFilterPanel.addUnsecuredAction(stringMessages.refresh(), new Command() {
125
-
126 125
@Override
127 126
public void execute() {
128 127
presenter.getMediaTracksRefresher().reloadAndCallFillAll();
... ...
@@ -138,7 +137,6 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
138 137
@Override
139 138
public void execute() {
140 139
new MultiVideoDialog(sailingServiceWrite, mediaServiceWrite, stringMessages, errorReporter, new Runnable() {
141
-
142 140
@Override
143 141
public void run() {
144 142
presenter.getMediaTracksRefresher().reloadAndCallFillAll();
... ...
@@ -165,11 +163,9 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
165 163
}
166 164
});
167 165
multiURLChange.setEnabled(false);
168
-
169 166
Label lblFilterRaces = new Label(stringMessages.filterMediaByName() + ":");
170 167
lblFilterRaces.setWordWrap(false);
171 168
buttonAndFilterPanel.addUnsecuredWidget(lblFilterRaces);
172
-
173 169
this.filterableMediaTracks = new LabeledAbstractFilterablePanel<MediaTrackWithSecurityDTO>(lblFilterRaces,
174 170
allMediaTracks, mediaTrackListDataProvider, stringMessages) {
175 171
@Override
... ...
@@ -231,17 +227,14 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
231 227
232 228
private void createMediaTracksTable(final UserService userService) {
233 229
// Create a CellTable.
234
-
235 230
// Set a key provider that provides a unique key for each contact. If key is
236 231
// used to identify contacts when fields (such as the name and address)
237 232
// change.
238 233
mediaTracksTable = new BaseCelltable<>(1000, tableResources);
239 234
mediaTracksTable.setWidth("100%");
240
-
241 235
// Attach a column sort handler to the ListDataProvider to sort the list.
242 236
ListHandler<MediaTrackWithSecurityDTO> sortHandler = new ListHandler<>(mediaTrackListDataProvider.getList());
243 237
mediaTracksTable.addColumnSortHandler(sortHandler);
244
-
245 238
// Add a selection model so we can select cells.
246 239
refreshableSelectionModel = new RefreshableMultiSelectionModel<>(
247 240
new EntityIdentityComparator<MediaTrackWithSecurityDTO>() {
... ...
@@ -258,17 +251,17 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
258 251
DefaultSelectionEventManager.createCustomManager(
259 252
new DefaultSelectionEventManager.CheckboxEventTranslator<MediaTrackWithSecurityDTO>() {
260 253
@Override
261
- public boolean clearCurrentSelection(CellPreviewEvent<MediaTrackWithSecurityDTO> event) {
254
+ public boolean clearCurrentSelection(CellPreviewEvent<MediaTrackWithSecurityDTO> event) {
262 255
return !isCheckboxColumn(event.getColumn());
263 256
}
264 257
265 258
@Override
266
- public SelectAction translateSelectionEvent(
259
+ public SelectAction translateSelectionEvent(
267 260
CellPreviewEvent<MediaTrackWithSecurityDTO> event) {
268 261
NativeEvent nativeEvent = event.getNativeEvent();
269 262
if (BrowserEvents.CLICK.equals(nativeEvent.getType())) {
270 263
if (nativeEvent.getCtrlKey()) {
271
- MediaTrackWithSecurityDTO value = event.getValue();
264
+ MediaTrackWithSecurityDTO value = event.getValue();
272 265
refreshableSelectionModel.setSelected(value, !refreshableSelectionModel.isSelected(value));
273 266
return SelectAction.IGNORE;
274 267
}
... ...
@@ -286,7 +279,6 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
286 279
287 280
// Initialize the columns.
288 281
initTableColumns(sortHandler, userService);
289
-
290 282
mediaTrackListDataProvider.addDataDisplay(mediaTracksTable);
291 283
add(mediaTracksTable);
292 284
allMediaTracks.clear();
... ...
@@ -309,7 +301,6 @@ public class MediaPanel extends FlowPanel implements FilterablePanelProvider<Med
309 301
};
310 302
mediaTracksTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
311 303
mediaTracksTable.setColumnWidth(checkColumn, 40, Unit.PX);
312
-
313 304
// db id
314 305
Column<MediaTrackWithSecurityDTO, String> dbIdColumn = new Column<MediaTrackWithSecurityDTO, String>(
315 306
new TextCell()) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/RegattaListComposite.java
... ...
@@ -19,6 +19,7 @@ import com.google.gwt.safehtml.shared.SafeHtml;
19 19
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
20 20
import com.google.gwt.user.cellview.client.AbstractCellTable;
21 21
import com.google.gwt.user.cellview.client.CellTable;
22
+import com.google.gwt.user.cellview.client.Header;
22 23
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
23 24
import com.google.gwt.user.cellview.client.TextColumn;
24 25
import com.google.gwt.user.client.Window;
... ...
@@ -185,7 +186,7 @@ public class RegattaListComposite extends Composite {
185 186
public int hashCode(RegattaDTO t) {
186 187
return t.getRegattaIdentifier().hashCode();
187 188
}
188
- }, filterablePanelRegattas.getAllListDataProvider(), table);
189
+ }, filterablePanelRegattas.getAllListDataProvider());
189 190
ListHandler<RegattaDTO> columnSortHandler = new ListHandler<RegattaDTO>(regattaListDataProvider.getList());
190 191
table.addColumnSortHandler(columnSortHandler);
191 192
columnSortHandler.setComparator(regattaSelectionCheckboxColumn, regattaSelectionCheckboxColumn.getComparator());
... ...
@@ -304,7 +305,8 @@ public class RegattaListComposite extends Composite {
304 305
stringMessages);
305 306
actionsColumn.addAction(RegattaConfigImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.CHANGE_ACL,
306 307
regattaDTO -> configACL.openDialog(regattaDTO));
307
- table.addColumn(regattaSelectionCheckboxColumn, regattaSelectionCheckboxColumn.getHeader());
308
+ final Header<Boolean> selectAllHeader = regattaSelectionCheckboxColumn.createHeader();
309
+ table.addColumn(regattaSelectionCheckboxColumn, selectAllHeader);
308 310
table.addColumn(regattaNameColumn, stringMessages.regattaName());
309 311
table.addColumn(regattaCanBoatsOfCompetitorsChangePerRaceColumn, stringMessages.canBoatsChange());
310 312
table.addColumn(competitorRegistrationTypeColumn, stringMessages.competitorRegistrationTypeShort());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/SmartphoneTrackingEventManagementPanel.java
... ...
@@ -148,7 +148,7 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
148 148
ListDataProvider<StrippedLeaderboardDTO> listDataProvider) {
149 149
ListHandler<StrippedLeaderboardDTO> leaderboardColumnListHandler = new ListHandler<StrippedLeaderboardDTO>(
150 150
filteredLeaderboardList.getList());
151
- SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = createSortableSelectionCheckboxColumn(
151
+ SelectionCheckboxColumn<StrippedLeaderboardDTO> selectionCheckboxColumn = createSelectionCheckboxColumn(
152 152
leaderboardTable, tableResources, leaderboardColumnListHandler, listDataProvider);
153 153
TextColumn<StrippedLeaderboardDTO> leaderboardNameColumn = new TextColumn<StrippedLeaderboardDTO>() {
154 154
@Override
... ...
@@ -212,7 +212,6 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
212 212
configOwnership::openOwnershipDialog);
213 213
leaderboardActionColumn.addAction(DefaultActionsImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.UPDATE,
214 214
configACL::openDialog);
215
- leaderboardTable.addColumn(selectionCheckboxColumn, selectionCheckboxColumn.getHeader());
216 215
leaderboardTable.addColumn(leaderboardNameColumn, stringMessages.name());
217 216
leaderboardTable.addColumn(leaderboardDisplayNameColumn, stringMessages.displayName());
218 217
leaderboardTable.addColumn(leaderboardCanBoatsOfCompetitorsChangePerRaceColumn,
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/StructureImportListComposite.java
... ...
@@ -14,6 +14,7 @@ import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
14 14
import com.sap.sse.gwt.client.celltable.FlushableCellTable;
15 15
import com.sap.sse.gwt.client.celltable.SelectionCheckboxColumn;
16 16
import com.sap.sse.security.ui.client.UserService;
17
+import com.google.gwt.user.cellview.client.Header;
17 18
18 19
public class StructureImportListComposite extends RegattaListComposite {
19 20
... ...
@@ -57,7 +58,7 @@ public class StructureImportListComposite extends RegattaListComposite {
57 58
public int hashCode(RegattaDTO t) {
58 59
return t.getRegattaIdentifier().hashCode();
59 60
}
60
- }, regattaListDataProvider, table);
61
+ }, regattaListDataProvider);
61 62
62 63
ListHandler<RegattaDTO> columnSortHandler = new ListHandler<RegattaDTO>(regattaListDataProvider.getList());
63 64
table.addColumnSortHandler(columnSortHandler);
... ...
@@ -91,7 +92,8 @@ public class StructureImportListComposite extends RegattaListComposite {
91 92
});
92 93
93 94
columnSortHandler.setComparator(selectionCheckboxColumn, selectionCheckboxColumn.getComparator());
94
- table.addColumn(selectionCheckboxColumn, selectionCheckboxColumn.getHeader());
95
+ final Header<Boolean> selectAllHeader = selectionCheckboxColumn.createHeader();
96
+ table.addColumn(selectionCheckboxColumn, selectAllHeader);
95 97
table.addColumn(regattaNameColumn, stringMessages.regattaName());
96 98
table.addColumn(regattaStructureColumn, stringMessages.series());
97 99
table.setSelectionModel(selectionCheckboxColumn.getSelectionModel(), selectionCheckboxColumn.getSelectionManager());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/SwissTimingEventManagementPanel.java
... ...
@@ -11,6 +11,7 @@ import com.google.gwt.user.cellview.client.AbstractCellTable;
11 11
import com.google.gwt.user.cellview.client.Column;
12 12
import com.google.gwt.user.cellview.client.ColumnSortEvent.Handler;
13 13
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
14
+import com.google.gwt.user.cellview.client.Header;
14 15
import com.google.gwt.user.cellview.client.TextColumn;
15 16
import com.google.gwt.user.client.rpc.AsyncCallback;
16 17
import com.google.gwt.user.client.ui.Button;
... ...
@@ -234,10 +235,10 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
234 235
return object.regattaName;
235 236
}
236 237
};
237
- SelectionCheckboxColumn<SwissTimingRaceRecordDTO> selectionColumn = new SelectionCheckboxColumn<SwissTimingRaceRecordDTO>(
238
+ SelectionCheckboxColumn<SwissTimingRaceRecordDTO> raceTableSelectionColumn = new SelectionCheckboxColumn<SwissTimingRaceRecordDTO>(
238 239
tableRes.cellTableStyle().cellTableCheckboxSelected(),
239 240
tableRes.cellTableStyle().cellTableCheckboxDeselected(),
240
- tableRes.cellTableStyle().cellTableCheckboxColumnCell(), entityIdentityComparator, raceList, raceTable);
241
+ tableRes.cellTableStyle().cellTableCheckboxColumnCell(), entityIdentityComparator, raceList);
241 242
242 243
TextColumn<SwissTimingRaceRecordDTO> seriesNameColumn = new TextColumn<SwissTimingRaceRecordDTO>() {
243 244
@Override
... ...
@@ -283,7 +284,9 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
283 284
raceStatusColumn.setSortable(true);
284 285
regattaNameColumn.setSortable(true);
285 286
seriesNameColumn.setSortable(true);
286
- raceTable.addColumn(selectionColumn, selectionColumn.getHeader());
287
+ raceTable.setSelectionModel(raceTableSelectionColumn.getSelectionModel(), raceTableSelectionColumn.getSelectionManager());
288
+ final Header<Boolean> selectAllHeader = raceTableSelectionColumn.createHeader();
289
+ raceTable.addColumn(raceTableSelectionColumn, selectAllHeader);
287 290
raceTable.addColumn(regattaNameColumn, stringConstants.regatta());
288 291
raceTable.addColumn(seriesNameColumn, stringConstants.series());
289 292
raceTable.addColumn(raceNameColumn, stringConstants.name());
... ...
@@ -291,7 +294,6 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
291 294
raceTable.addColumn(boatClassColumn, stringConstants.boatClass());
292 295
raceTable.addColumn(genderColumn, stringConstants.gender());
293 296
raceTable.addColumn(raceStartTimeColumn, stringConstants.startTime());
294
- raceTable.setSelectionModel(selectionColumn.getSelectionModel(), selectionColumn.getSelectionManager());
295 297
trackableRacesPanel.add(raceTable);
296 298
raceList.addDataDisplay(raceTable);
297 299
Handler columnSortHandler = getRaceTableColumnSortHandler(raceList.getList(), regattaNameColumn, seriesNameColumn,
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/SwissTimingReplayConnectorPanel.java
... ...
@@ -10,8 +10,8 @@ import com.google.gwt.core.client.GWT;
10 10
import com.google.gwt.event.dom.client.ClickEvent;
11 11
import com.google.gwt.event.dom.client.ClickHandler;
12 12
import com.google.gwt.user.cellview.client.AbstractCellTable;
13
-import com.google.gwt.user.cellview.client.CellTable;
14 13
import com.google.gwt.user.cellview.client.Column;
14
+import com.google.gwt.user.cellview.client.Header;
15 15
import com.google.gwt.user.cellview.client.ColumnSortEvent.Handler;
16 16
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
17 17
import com.google.gwt.user.cellview.client.TextColumn;
... ...
@@ -41,10 +41,10 @@ import com.sap.sse.gwt.adminconsole.AdminConsoleTableResources;
41 41
import com.sap.sse.gwt.adminconsole.FilterablePanelProvider;
42 42
import com.sap.sse.gwt.client.ErrorReporter;
43 43
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
44
-import com.sap.sse.gwt.client.celltable.BaseCelltable;
45 44
import com.sap.sse.gwt.client.celltable.CellTableWithCheckboxResources;
46 45
import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
47
-import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
46
+import com.sap.sse.gwt.client.celltable.FlushableCellTable;
47
+import com.sap.sse.gwt.client.celltable.SelectionCheckboxColumn;
48 48
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
49 49
import com.sap.sse.gwt.client.panels.AbstractFilterablePanel;
50 50
import com.sap.sse.gwt.client.panels.LabeledAbstractFilterablePanel;
... ...
@@ -62,7 +62,7 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
62 62
private final ErrorReporter errorReporter;
63 63
private final LabeledAbstractFilterablePanel<SwissTimingReplayRaceDTO> filterablePanelEvents;
64 64
private final ListDataProvider<SwissTimingReplayRaceDTO> raceList;
65
- private final CellTable<SwissTimingReplayRaceDTO> raceTable;
65
+ private final FlushableCellTable<SwissTimingReplayRaceDTO> raceTable;
66 66
private final List<SwissTimingReplayRaceDTO> availableSwissTimingRaces;
67 67
68 68
private final SwissTimingArchivedConnectionTableWrapper connectionsTable;
... ...
@@ -71,32 +71,25 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
71 71
super(presenter, true, stringMessages);
72 72
this.errorReporter = presenter.getErrorReporter();
73 73
availableSwissTimingRaces = new ArrayList<SwissTimingReplayRaceDTO>();
74
-
75 74
// setup UI
76 75
final VerticalPanel mainPanel = new VerticalPanel();
77 76
this.setWidget(mainPanel);
78 77
mainPanel.setWidth("100%");
79
-
80 78
final CaptionPanel captionPanelConnections = new CaptionPanel(stringMessages.connections());
81 79
mainPanel.add(captionPanelConnections);
82
-
83 80
final VerticalPanel verticalPanel = new VerticalPanel();
84
-
85 81
captionPanelConnections.setContentWidget(verticalPanel);
86 82
captionPanelConnections.setStyleName("bold");
87
-
88 83
// add connections table
89 84
connectionsTable = new SwissTimingArchivedConnectionTableWrapper(presenter.getUserService(), sailingServiceWrite, stringMessages,
90 85
errorReporter, true, tableResources, () -> {
91 86
});
92 87
connectionsTable.refreshConnectionList();
93
-
94 88
// create button UI
95 89
final AccessControlledButtonPanel buttonPanel = createButtonPanel(sailingServiceWrite, presenter.getUserService(), errorReporter,
96 90
stringMessages);
97 91
verticalPanel.add(buttonPanel);
98 92
verticalPanel.add(connectionsTable);
99
-
100 93
// Table
101 94
TextColumn<SwissTimingReplayRaceDTO> regattaNameColumn = new TextColumn<SwissTimingReplayRaceDTO>() {
102 95
@Override
... ...
@@ -121,29 +114,22 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
121 114
public String getValue(SwissTimingReplayRaceDTO object) {
122 115
return object.boat_class;
123 116
}
124
-
125 117
};
126
-
127 118
HorizontalPanel racesSplitPanel = new HorizontalPanel();
128 119
mainPanel.add(racesSplitPanel);
129
-
130 120
CaptionPanel racesCaptionPanel = new CaptionPanel(stringMessages.trackableRaces());
131 121
racesSplitPanel.add(racesCaptionPanel);
132 122
racesCaptionPanel.setWidth("50%");
133
-
134 123
CaptionPanel trackedRacesCaptionPanel = new CaptionPanel(stringMessages.trackedRaces());
135 124
racesSplitPanel.add(trackedRacesCaptionPanel);
136 125
trackedRacesCaptionPanel.setWidth("50%");
137
-
138 126
VerticalPanel racesPanel = new VerticalPanel();
139 127
racesCaptionPanel.setContentWidget(racesPanel);
140 128
racesCaptionPanel.setStyleName("bold");
141
-
142 129
VerticalPanel trackedRacesPanel = new VerticalPanel();
143 130
trackedRacesPanel.setWidth("100%");
144 131
trackedRacesCaptionPanel.setContentWidget(trackedRacesPanel);
145 132
trackedRacesCaptionPanel.setStyleName("bold");
146
-
147 133
// text box for filtering the cell table
148 134
// the regatta selection for a tracked race
149 135
HorizontalPanel regattaPanel = new HorizontalPanel();
... ...
@@ -155,16 +141,12 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
155 141
regattaPanel.add(lblRegattas);
156 142
regattaPanel.add(getAvailableRegattasListBox());
157 143
regattaPanel.setCellVerticalAlignment(getAvailableRegattasListBox(), HasVerticalAlignment.ALIGN_MIDDLE);
158
-
159 144
HorizontalPanel filterPanel = new HorizontalPanel();
160 145
filterPanel.setSpacing(5);
161 146
racesPanel.add(filterPanel);
162
-
163 147
Label lblFilterEvents = new Label(stringMessages.filterRaces()+ ":");
164 148
filterPanel.add(lblFilterEvents);
165 149
filterPanel.setCellVerticalAlignment(lblFilterEvents, HasVerticalAlignment.ALIGN_MIDDLE);
166
-
167
-
168 150
HorizontalPanel racesHorizontalPanel = new HorizontalPanel();
169 151
racesPanel.add(racesHorizontalPanel);
170 152
VerticalPanel trackPanel = new VerticalPanel();
... ...
@@ -173,11 +155,7 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
173 155
raceStartTrackingColumn.setSortable(true);
174 156
boatClassNamesColumn.setSortable(true);
175 157
AdminConsoleTableResources tableRes = GWT.create(AdminConsoleTableResources.class);
176
- raceTable = new BaseCelltable<SwissTimingReplayRaceDTO>(/* pageSize */10000, tableRes);
177
- raceTable.addColumn(raceNameColumn, stringMessages.race());
178
- raceTable.addColumn(regattaNameColumn, "RSC");
179
- raceTable.addColumn(boatClassNamesColumn, stringMessages.boatClass());
180
- raceTable.addColumn(raceStartTrackingColumn, stringMessages.startTime());
158
+ raceTable = new FlushableCellTable<>(10000, tableRes);
181 159
raceTable.setWidth("300px");
182 160
raceList = new ListDataProvider<SwissTimingReplayRaceDTO>();
183 161
filterablePanelEvents = new LabeledAbstractFilterablePanel<SwissTimingReplayRaceDTO>(lblFilterEvents,
... ...
@@ -194,19 +172,28 @@ public class SwissTimingReplayConnectorPanel extends AbstractEventManagementPane
194 172
return raceTable;
195 173
}
196 174
};
197
- raceTable.setSelectionModel(new RefreshableMultiSelectionModel<SwissTimingReplayRaceDTO>(
175
+ final SelectionCheckboxColumn<SwissTimingReplayRaceDTO> checkColumn = new SelectionCheckboxColumn<SwissTimingReplayRaceDTO>(
176
+ tableRes.cellTableStyle().cellTableCheckboxSelected(),
177
+ tableRes.cellTableStyle().cellTableCheckboxDeselected(),
178
+ tableRes.cellTableStyle().cellTableCheckboxColumnCell(),
198 179
new EntityIdentityComparator<SwissTimingReplayRaceDTO>() {
199 180
@Override
200
- public boolean representSameEntity(SwissTimingReplayRaceDTO dto1, SwissTimingReplayRaceDTO dto2) {
201
- return dto1.race_id.equals(dto2.race_id);
181
+ public boolean representSameEntity(SwissTimingReplayRaceDTO a, SwissTimingReplayRaceDTO b) {
182
+ return a.race_id.equals(b.race_id);
202 183
}
203 184
@Override
204 185
public int hashCode(SwissTimingReplayRaceDTO t) {
205 186
return t.race_id.hashCode();
206 187
}
207
- }, filterablePanelEvents.getAllListDataProvider()) {
208
- });
209
-
188
+ }, filterablePanelEvents.getAllListDataProvider());
189
+ checkColumn.setSortable(false);
190
+ final Header<Boolean> selectAllHeader = checkColumn.createHeader();
191
+ raceTable.setSelectionModel(checkColumn.getSelectionModel(), checkColumn.getSelectionManager());
192
+ raceTable.addColumn(checkColumn, selectAllHeader);
193
+ raceTable.addColumn(raceNameColumn, stringMessages.race());
194
+ raceTable.addColumn(regattaNameColumn, "RSC");
195
+ raceTable.addColumn(boatClassNamesColumn, stringMessages.boatClass());
196
+ raceTable.addColumn(raceStartTrackingColumn, stringMessages.startTime());
210 197
racesHorizontalPanel.add(raceTable);
211 198
racesHorizontalPanel.add(trackPanel);
212 199
raceList.addDataDisplay(raceTable);
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/TracTracEventManagementPanel.java
... ...
@@ -5,6 +5,7 @@ import java.util.Comparator;
5 5
import java.util.List;
6 6
import java.util.Set;
7 7
8
+import com.google.gwt.user.cellview.client.Header;
8 9
import com.google.gwt.core.client.GWT;
9 10
import com.google.gwt.event.dom.client.ClickEvent;
10 11
import com.google.gwt.event.dom.client.ClickHandler;
... ...
@@ -332,8 +333,9 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel i
332 333
public int hashCode(TracTracRaceRecordDTO t) {
333 334
return t.id.hashCode();
334 335
}
335
- }, racesFilterablePanel.getAllListDataProvider(), racesTable);
336
- racesTable.addColumn(selectionCheckboxColumn, selectionCheckboxColumn.getHeader());
336
+ }, racesFilterablePanel.getAllListDataProvider());
337
+ final Header<Boolean> selectAllHeader = selectionCheckboxColumn.createHeader();
338
+ racesTable.addColumn(selectionCheckboxColumn, selectAllHeader);
337 339
racesTable.addColumn(regattaNameColumn, stringMessages.event());
338 340
racesTable.addColumn(raceNameColumn, stringMessages.race());
339 341
racesTable.addColumn(boatClassColumn, stringMessages.boatClass());
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/coursecreation/CourseTemplatePanel.java
... ...
@@ -19,10 +19,10 @@ import java.util.stream.Collectors;
19 19
import com.google.gwt.cell.client.TextCell;
20 20
import com.google.gwt.core.client.GWT;
21 21
import com.google.gwt.dom.client.Style.Unit;
22
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
23 22
import com.google.gwt.user.cellview.client.AbstractCellTable;
24 23
import com.google.gwt.user.cellview.client.Column;
25 24
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
25
+import com.google.gwt.user.cellview.client.Header;
26 26
import com.google.gwt.user.client.Window;
27 27
import com.google.gwt.user.client.rpc.AsyncCallback;
28 28
import com.google.gwt.user.client.ui.FlowPanel;
... ...
@@ -102,12 +102,10 @@ public class CourseTemplatePanel extends FlowPanel implements FilterablePanelPro
102 102
buttonAndFilterPanel.addRemoveAction(stringMessages.remove(), refreshableSelectionModel, true,
103 103
() -> removeCourseTemplates(refreshableSelectionModel.getSelectedSet().stream()
104 104
.map(courseTemplateDTO -> courseTemplateDTO.getUuid()).collect(Collectors.toList())));
105
-
106 105
buttonAndFilterPanel.addUnsecuredWidget(lblFilterRaces);
107 106
buttonAndFilterPanel.addUnsecuredWidget(filterableCourseTemplatePanel);
108 107
filterableCourseTemplatePanel
109 108
.setUpdatePermissionFilterForCheckbox(event -> userService.hasPermission(event, DefaultActions.UPDATE));
110
-
111 109
}
112 110
113 111
private void removeCourseTemplates(Collection<UUID> courseTemplatesUuids) {
... ...
@@ -175,7 +173,6 @@ public class CourseTemplatePanel extends FlowPanel implements FilterablePanelPro
175 173
private void createCourseTemplateTable(final UserService userService) {
176 174
courseTemplateTable = new FlushableCellTable<>(1000, tableResources);
177 175
courseTemplateTable.setWidth("100%");
178
-
179 176
// Attach a column sort handler to the ListDataProvider to sort the list.
180 177
ListHandler<CourseTemplateDTO> sortHandler = new ListHandler<>(courseTemplateListDataProvider.getList());
181 178
courseTemplateTable.addColumnSortHandler(sortHandler);
... ...
@@ -203,9 +200,9 @@ public class CourseTemplatePanel extends FlowPanel implements FilterablePanelPro
203 200
public int hashCode(CourseTemplateDTO t) {
204 201
return t.getUuid().hashCode();
205 202
}
206
- }, filterableCourseTemplatePanel.getAllListDataProvider(), courseTemplateTable);
207
-
208
- courseTemplateTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
203
+ }, filterableCourseTemplatePanel.getAllListDataProvider());
204
+ final Header<Boolean> selectAllHeader = checkColumn.createHeader();
205
+ courseTemplateTable.addColumn(checkColumn, selectAllHeader);
209 206
courseTemplateTable.setColumnWidth(checkColumn, 40, Unit.PX);
210 207
// id
211 208
Column<CourseTemplateDTO, String> idColumn = new Column<CourseTemplateDTO, String>(new TextCell()) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/coursecreation/MarkPropertiesPanel.java
... ...
@@ -22,10 +22,10 @@ import com.google.gwt.cell.client.TextCell;
22 22
import com.google.gwt.core.client.GWT;
23 23
import com.google.gwt.dom.client.Style.Unit;
24 24
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
25
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
26 25
import com.google.gwt.user.cellview.client.AbstractCellTable;
27 26
import com.google.gwt.user.cellview.client.Column;
28 27
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
28
+import com.google.gwt.user.cellview.client.Header;
29 29
import com.google.gwt.user.client.Window;
30 30
import com.google.gwt.user.client.rpc.AsyncCallback;
31 31
import com.google.gwt.user.client.ui.AbstractImagePrototype;
... ...
@@ -183,8 +183,9 @@ public class MarkPropertiesPanel extends FlowPanel implements FilterablePanelPro
183 183
public int hashCode(MarkPropertiesDTO t) {
184 184
return t.getUuid().hashCode();
185 185
}
186
- }, filterableMarkProperties.getAllListDataProvider(), markPropertiesTable);
187
- markPropertiesTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
186
+ }, filterableMarkProperties.getAllListDataProvider());
187
+ final Header<Boolean> selectAllHeader = checkColumn.createHeader();
188
+ markPropertiesTable.addColumn(checkColumn, selectAllHeader);
188 189
markPropertiesTable.setColumnWidth(checkColumn, 40, Unit.PX);
189 190
// id
190 191
Column<MarkPropertiesDTO, String> idColumn = new Column<MarkPropertiesDTO, String>(new TextCell()) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/coursecreation/MarkRolePanel.java
... ...
@@ -13,10 +13,10 @@ import com.google.gwt.core.client.GWT;
13 13
import com.google.gwt.dom.client.BrowserEvents;
14 14
import com.google.gwt.dom.client.NativeEvent;
15 15
import com.google.gwt.dom.client.Style.Unit;
16
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
17 16
import com.google.gwt.user.cellview.client.AbstractCellTable;
18 17
import com.google.gwt.user.cellview.client.Column;
19 18
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
19
+import com.google.gwt.user.cellview.client.Header;
20 20
import com.google.gwt.user.client.Command;
21 21
import com.google.gwt.user.client.rpc.AsyncCallback;
22 22
import com.google.gwt.user.client.ui.FlowPanel;
... ...
@@ -71,7 +71,6 @@ public class MarkRolePanel extends FlowPanel implements FilterablePanelProvider<
71 71
add(buttonAndFilterPanel);
72 72
allMarkRoles = new ArrayList<>();
73 73
buttonAndFilterPanel.addUnsecuredAction(stringMessages.refresh(), new Command() {
74
-
75 74
@Override
76 75
public void execute() {
77 76
loadMarkRoles();
... ...
@@ -187,8 +186,9 @@ public class MarkRolePanel extends FlowPanel implements FilterablePanelProvider<
187 186
public int hashCode(MarkRoleDTO t) {
188 187
return t.getUuid().hashCode();
189 188
}
190
- }, filterableMarkRoles.getAllListDataProvider(), markRolesTable);
191
- markRolesTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
189
+ }, filterableMarkRoles.getAllListDataProvider());
190
+ final Header<Boolean> selectAllHeader = checkColumn.createHeader();
191
+ markRolesTable.addColumn(checkColumn, selectAllHeader);
192 192
markRolesTable.setColumnWidth(checkColumn, 40, Unit.PX);
193 193
// id
194 194
Column<MarkRoleDTO, String> idColumn = new Column<MarkRoleDTO, String>(new TextCell()) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/coursecreation/MarkTemplatePanel.java
... ...
@@ -11,10 +11,10 @@ import java.util.List;
11 11
import com.google.gwt.cell.client.TextCell;
12 12
import com.google.gwt.core.client.GWT;
13 13
import com.google.gwt.dom.client.Style.Unit;
14
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
15 14
import com.google.gwt.user.cellview.client.AbstractCellTable;
16 15
import com.google.gwt.user.cellview.client.Column;
17 16
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
17
+import com.google.gwt.user.cellview.client.Header;
18 18
import com.google.gwt.user.client.Command;
19 19
import com.google.gwt.user.client.rpc.AsyncCallback;
20 20
import com.google.gwt.user.client.ui.FlowPanel;
... ...
@@ -152,8 +152,9 @@ public class MarkTemplatePanel extends FlowPanel implements FilterablePanelProvi
152 152
public int hashCode(MarkTemplateDTO t) {
153 153
return t.getUuid().hashCode();
154 154
}
155
- }, filterableMarkTemplates.getAllListDataProvider(), markTemplateTable);
156
- markTemplateTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
155
+ }, filterableMarkTemplates.getAllListDataProvider());
156
+ Header<Boolean> selectAllHeader = checkColumn.createHeader();
157
+ markTemplateTable.addColumn(checkColumn, selectAllHeader);
157 158
markTemplateTable.setColumnWidth(checkColumn, 40, Unit.PX);
158 159
// id
159 160
Column<MarkTemplateDTO, String> idColumn = new Column<MarkTemplateDTO, String>(new TextCell()) {
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java
... ...
@@ -56,7 +56,6 @@ import com.google.gwt.view.client.CellPreviewEvent;
56 56
import com.google.gwt.view.client.ListDataProvider;
57 57
import com.google.gwt.view.client.SelectionChangeEvent;
58 58
import com.google.gwt.view.client.SelectionChangeEvent.Handler;
59
-import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
60 59
import com.sap.sailing.domain.common.DetailType;
61 60
import com.sap.sailing.domain.common.LeaderboardNameConstants;
62 61
import com.sap.sailing.domain.common.MaxPointsReason;
... ...
@@ -109,6 +108,7 @@ import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
109 108
import com.sap.sse.gwt.client.celltable.AbstractSortableColumnWithMinMax;
110 109
import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
111 110
import com.sap.sse.gwt.client.celltable.FlushableSortedCellTableWithStylableHeaders;
111
+import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
112 112
import com.sap.sse.gwt.client.celltable.SelectionCheckboxColumn;
113 113
import com.sap.sse.gwt.client.celltable.SortedCellTable;
114 114
import com.sap.sse.gwt.client.controls.busyindicator.BusyIndicator;
... ...
@@ -2123,7 +2123,7 @@ public abstract class LeaderboardPanel<LS extends LeaderboardSettings> extends A
2123 2123
public int hashCode(LeaderboardRowDTO t) {
2124 2124
return t.competitor.getIdAsString().hashCode();
2125 2125
}
2126
- }, getData(), leaderboardTable);
2126
+ }, getData());
2127 2127
// Note: LeaderboardPanel is the ONLY listener that syncs selection state with CompetitorSelectionProvider.
2128 2128
// SelectionCheckboxColumn no longer needs to listen separately.
2129 2129
}
... ...
@@ -2489,8 +2489,7 @@ public abstract class LeaderboardPanel<LS extends LeaderboardSettings> extends A
2489 2489
// This causes in consequence potentiallyChangedSettings to not be equal to currentSettings anymore.
2490 2490
// We then apply the new settings to make all new race columns visible.
2491 2491
// TODO check if there is an easier way to get to know if we need to reapply the settings.
2492
- LS potentiallyChangedSettings = overrideDefaultsForNamesOfRaceColumns(currentSettings,
2493
- result);
2492
+ LS potentiallyChangedSettings = overrideDefaultsForNamesOfRaceColumns(currentSettings, result);
2494 2493
// reapply, when this is the first time we received the race columns or if columns have
2495 2494
// changed
2496 2495
if (wasEmptyRaceColumnSelection
... ...
@@ -3129,7 +3128,7 @@ public abstract class LeaderboardPanel<LS extends LeaderboardSettings> extends A
3129 3128
if (getLeaderboardTable().getColumnCount() > selectionCheckboxColumnIndex) {
3130 3129
if (showSelectionCheckbox) {
3131 3130
if (getLeaderboardTable().getColumn(selectionCheckboxColumnIndex) != selectionCheckboxColumn) {
3132
- insertColumn(selectionCheckboxColumnIndex, selectionCheckboxColumn);
3131
+ insertSelectionCheckboxColumn(selectionCheckboxColumnIndex);
3133 3132
} // else, the column is needed and is already in place
3134 3133
} else {
3135 3134
if (getLeaderboardTable().getColumn(selectionCheckboxColumnIndex) == selectionCheckboxColumn) {
... ...
@@ -3138,12 +3137,19 @@ public abstract class LeaderboardPanel<LS extends LeaderboardSettings> extends A
3138 3137
}
3139 3138
} else {
3140 3139
if (showSelectionCheckbox) {
3141
- insertColumn(selectionCheckboxColumnIndex, selectionCheckboxColumn);
3140
+ insertSelectionCheckboxColumn(selectionCheckboxColumnIndex);
3142 3141
}
3143 3142
}
3144 3143
return indexOfNextColumn;
3145 3144
}
3146 3145
3146
+ private void insertSelectionCheckboxColumn(int beforeIndex) {
3147
+ removeColumnStyles(beforeIndex);
3148
+ getLeaderboardTable().insertColumn(beforeIndex, selectionCheckboxColumn, selectionCheckboxColumn.createHeader(),
3149
+ /* comparator */ null, selectionCheckboxColumn.getPreferredSortingOrder().isAscending());
3150
+ addColumnStyles(beforeIndex);
3151
+ }
3152
+
3147 3153
/**
3148 3154
* @return the 0-based index for the next column
3149 3155
*/
java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/GPSFixesResource.java
... ...
@@ -64,7 +64,7 @@ public class GPSFixesResource extends AbstractSailingServerResource {
64 64
List<GPSFixMoving> fixes = data.getB();
65 65
JSONObject answer = new JSONObject();
66 66
try {
67
- Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> racesWithManeuverChangedAndLiveDelay = getService().getSensorFixStore().storeFixes(device, fixes, returnManeuverUpdate, returnLiveDelay, /* filterByRegattaAndEventEndDate */ false);
67
+ Iterable<Triple<RegattaAndRaceIdentifier, Boolean, Duration>> racesWithManeuverChangedAndLiveDelay = getService().getSensorFixStore().storeFixes(device, fixes, returnManeuverUpdate, returnLiveDelay);
68 68
if (!Util.isEmpty(racesWithManeuverChangedAndLiveDelay)) {
69 69
JSONArray changed = new JSONArray();
70 70
answer.put("maneuverchanged", changed);
java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/SensorDataImporter.java
... ...
@@ -98,7 +98,7 @@ public class SensorDataImporter {
98 98
99 99
private void storeFixes(Iterable<DoubleVectorFix> fixes, DeviceIdentifier deviceIdentifier) {
100 100
try {
101
- service.getSensorFixStore().storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ true);
101
+ service.getSensorFixStore().storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
102 102
} catch (NoCorrespondingServiceRegisteredException e) {
103 103
logger.log(Level.WARNING, "Could not store fix for " + deviceIdentifier);
104 104
}
java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/TrackFilesImporter.java
... ...
@@ -131,7 +131,7 @@ public class TrackFilesImporter {
131 131
132 132
void storeFix(GPSFix fix, DeviceIdentifier deviceIdentifier) {
133 133
try {
134
- service.getSensorFixStore().storeFix(deviceIdentifier, fix, /* filterByRegattaAndEventEndDate */ true);
134
+ service.getSensorFixStore().storeFix(deviceIdentifier, fix);
135 135
} catch (NoCorrespondingServiceRegisteredException e) {
136 136
logger.log(Level.WARNING, "Could not store fix for " + deviceIdentifier);
137 137
}
... ...
@@ -139,7 +139,7 @@ public class TrackFilesImporter {
139 139
140 140
<FixT extends Timed> void storeFixes(Iterable<FixT> fixes, DeviceIdentifier deviceIdentifier) {
141 141
try {
142
- service.getSensorFixStore().storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ true);
142
+ service.getSensorFixStore().storeFixes(deviceIdentifier, fixes, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
143 143
} catch (NoCorrespondingServiceRegisteredException e) {
144 144
logger.log(Level.WARNING, "Could not store fix for " + deviceIdentifier);
145 145
}
java/com.sap.sailing.server.interface/src/com/sap/sailing/server/operationaltransformation/ImportMasterDataOperation.java
... ...
@@ -547,7 +547,7 @@ public class ImportMasterDataOperation extends
547 547
548 548
private void storeFixes(SensorFixStore store, DeviceIdentifier device, final Collection<Timed> fixesToAddAsBatch) {
549 549
try {
550
- store.storeFixes(device, fixesToAddAsBatch, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false, /* filterByRegattaAndEventEndDate */ true);
550
+ store.storeFixes(device, fixesToAddAsBatch, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
551 551
fixesToAddAsBatch.clear();
552 552
} catch (NoCorrespondingServiceRegisteredException e) {
553 553
logger.severe("Failed to store race log tracking fixes while importing.");
java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java
... ...
@@ -372,7 +372,7 @@ public class MasterDataImportTest {
372 372
regatta.getRegattaLog().add(mappingEvent);
373 373
GPSFix gpsFix = new GPSFixMovingImpl(new DegreePosition(54.333, 10.133), logTimePoint2,
374 374
new KnotSpeedWithBearingImpl(10, new DegreeBearingImpl(90)), /* optionalTrueHeading */ null);
375
- sourceService.getSensorFixStore().storeFix(deviceIdentifier, gpsFix, /* filterByRegattaAndEventEndDate */ false);
375
+ sourceService.getSensorFixStore().storeFix(deviceIdentifier, gpsFix);
376 376
// test to check that batch-import of fixes works as intended
377 377
DeviceIdentifier deviceBatch1 = addDeviceMappingWithFixes(sourceService, regatta, competitor, logTimePoint, logTimePoint3, logTimePoint4, "x", 4999);
378 378
DeviceIdentifier deviceBatch2 = addDeviceMappingWithFixes(sourceService, regatta, competitor, logTimePoint, logTimePoint3, logTimePoint4, "y", 5000);
... ...
@@ -388,7 +388,7 @@ public class MasterDataImportTest {
388 388
fixData[BravoSensorDataMetadata.RIDE_HEIGHT_PORT_HULL.getColumnIndex()] = rideHeightValue;
389 389
fixData[BravoSensorDataMetadata.RIDE_HEIGHT_STBD_HULL.getColumnIndex()] = rideHeightValue;
390 390
DoubleVectorFixImpl doubleVectorFix = new DoubleVectorFixImpl(logTimePoint2, fixData);
391
- sourceService.getSensorFixStore().storeFix(deviceIdentifier2, doubleVectorFix, /* filterByRegattaAndEventEndDate */ false);
391
+ sourceService.getSensorFixStore().storeFix(deviceIdentifier2, doubleVectorFix);
392 392
// Set score correction
393 393
double scoreCorrection = 12.0;
394 394
leaderboard.getScoreCorrection().correctScore(competitor, raceColumn, scoreCorrection);
... ...
@@ -537,8 +537,7 @@ public class MasterDataImportTest {
537 537
fixesToSave.add(new GPSFixMovingImpl(new DegreePosition(54.333, 10.133), logTimePoint.plus(i),
538 538
new KnotSpeedWithBearingImpl(10, new DegreeBearingImpl(90)), /* optionalTrueHeading */ null));
539 539
}
540
- sourceService.getSensorFixStore().storeFixes(deviceIdentifier, fixesToSave, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false,
541
- /* filterByRegattaAndEventEndDate */ true);
540
+ sourceService.getSensorFixStore().storeFixes(deviceIdentifier, fixesToSave, /* returnManeuverUpdate */ false, /* returnLiveDelay */ false);
542 541
return deviceIdentifier;
543 542
}
544 543
java/com.sap.sailing.server/src/com/sap/sailing/server/impl/CourseAndMarkConfigurationFactoryImpl.java
... ...
@@ -553,7 +553,7 @@ public class CourseAndMarkConfigurationFactoryImpl implements CourseAndMarkConfi
553 553
// TODO check if we can use com.sap.sailing.domain.racelogtracking.impl.RaceLogTrackingAdapterImpl.pingMark(RegattaLog, Mark, GPSFix, RacingEventService)
554 554
final PingDeviceIdentifierImpl pingIdentifier = new PingDeviceIdentifierImpl(UUID.randomUUID());
555 555
sensorFixStore.storeFix(pingIdentifier,
556
- new GPSFixImpl(position[0], timePointForDefinitionOfMarksAndDeviceMappings), /* filterByRegattaAndEventEndDate */ false);
556
+ new GPSFixImpl(position[0], timePointForDefinitionOfMarksAndDeviceMappings));
557 557
regatta.getRegattaLog()
558 558
.add(new RegattaLogDeviceMarkMappingEventImpl(
559 559
timePointForDefinitionOfMarksAndDeviceMappings, author, mark, pingIdentifier,
java/com.sap.sailing.www/release_notes_admin.html
... ...
@@ -23,6 +23,11 @@
23 23
<div class="mainContent">
24 24
<h2 class="releaseHeadline">Release Notes - Administration Console</h2>
25 25
<div class="innerContent">
26
+ <h2 class="articleSubheadline">April 2026</h2>
27
+ <ul class="bulletList">
28
+ <li>Tables with multi-selection support now have a select/de-select all checkbox in the table header.
29
+ This comes with general improvements in table selection/de-selection handling.</li>
30
+ </ul>
26 31
<h2 class="articleSubheadline">March 2026</h2>
27 32
<ul class="bulletList">
28 33
<li>When a server is re-started, e.g., for an upgrade or when switching to larger
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/celltable/RefreshableMultiSelectionModel.java
... ...
@@ -99,7 +99,6 @@ public class RefreshableMultiSelectionModel<T> extends MultiSelectionModelWithSe
99 99
}
100 100
if (wasSelectedBefore != null) {
101 101
super.setSelected(wasSelectedBefore, false);
102
- isSelected(item); // triggers the deleting of the wasSelectedBefore element in super class
103 102
super.setSelected(item, selected);
104 103
} else {
105 104
super.setSelected(item, selected);
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/celltable/SelectionCheckboxColumn.java
... ...
@@ -1,6 +1,7 @@
1 1
package com.sap.sse.gwt.client.celltable;
2 2
3 3
import com.google.gwt.cell.client.Cell.Context;
4
+import com.google.gwt.cell.client.CheckboxCell;
4 5
import com.google.gwt.dom.client.BrowserEvents;
5 6
import com.google.gwt.dom.client.NativeEvent;
6 7
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
... ...
@@ -15,6 +16,7 @@ import com.google.gwt.view.client.DefaultSelectionEventManager.SelectAction;
15 16
import com.google.gwt.view.client.ListDataProvider;
16 17
import com.sap.sse.common.InvertibleComparator;
17 18
import com.sap.sse.common.SortingOrder;
19
+import com.sap.sse.common.Util;
18 20
import com.sap.sse.common.impl.InvertibleComparatorAdapter;
19 21
import com.sap.sse.gwt.client.controls.BetterCheckboxCell;
20 22
... ...
@@ -22,26 +24,37 @@ import com.sap.sse.gwt.client.controls.BetterCheckboxCell;
22 24
* A column to be used in a {@link CellTable} that controls and reflects a table's selection model using stylable
23 25
* "check boxes". To make things work, clients have to also call
24 26
* {@link CellTable#setSelectionModel(com.google.gwt.view.client.SelectionModel, com.google.gwt.view.client.CellPreviewEvent.Handler)}
25
- * with the result of this columns {@link #getSelectionModel} as the first and the result of the
27
+ * with the result of this column's {@link #getSelectionModel()} as the first and the result of the
26 28
* {@link #getSelectionManager()} method as second argument. This will ensure that the event handling and selection
27 29
* updates work properly.
28 30
* <p>
29
- *
30 31
* Clients should use the column's own {@link #getSelectionModel() RefreshableMultiSelectionModel}. This will ensure that
31 32
* the {@link SelectionCheckboxColumn} will be refreshed correctly when the selection changes or the
32 33
* {@link ListDataProvider} has new elements. Clients should also ensure that the {@link Flushable} and the
33 34
* {@link ListDataProvider} are not <code>null</code>; otherwise the {@link RefreshableMultiSelectionModel selection model}
34
- * won�t work correctly. The {@link Flushable} interface is used to ensure that the selection state is displayed
35
+ * won't work correctly. The {@link Flushable} interface is used to ensure that the selection state is displayed
35 36
* correctly by {@link SelectionCheckboxColumn}. To ensure this, the {@link Flushable#flush()} method is called after
36 37
* every selection state change.
37 38
* <p>
38 39
* The column uses the {@link BetterCheckboxCell} cell to implement the display properties. Three CSS styles can be used
39 40
* to parameterize this column: one for the <code>&lt;td&gt;</code> element rendering the cell, and two for the
40 41
* <code>&lt;div&gt;</code> element representing a selected or deselected element.
41
- *
42
+ * <p>
43
+ * Column header: There are two ways to provide a header for this column:
44
+ * <ol>
45
+ * <li>{@link #createHeader()} returns a live select-all/deselect-all {@link Header} backed by a {@link CheckboxCell}.
46
+ * It ticks when all rows are selected and unticks as soon as all rows are deselected. Clicking it selects or deselects
47
+ * all rows in the {@link ListDataProvider}. This header must be passed explicitly to the table's
48
+ * {@code addColumn(Column, Header)} or {@code insertColumn(int, Column, Header, ...)} call — it is not
49
+ * returned by {@link #getHeader()}.</li>
50
+ * <li>{@link #getHeader()} returns a static checkmark (&#x2713;) header. It serves as a fallback default if no
51
+ * select-all behavior is needed, but is not currently used by any caller — {@link #createHeader()} is the
52
+ * preferred choice for all existing usages.</li>
53
+ * </ol>
54
+ *
42 55
* @author Axel Uhl (D043530)
43 56
* @author Lukas Furmanek
44
- *
57
+ *
45 58
* @param <T>
46 59
*/
47 60
public class SelectionCheckboxColumn<T> extends AbstractSortableColumnWithMinMax<T, Boolean> {
... ...
@@ -50,7 +63,6 @@ public class SelectionCheckboxColumn<T> extends AbstractSortableColumnWithMinMax
50 63
private final EventTranslator<T> selectionEventTranslator;
51 64
private final RefreshableMultiSelectionModel<T> selectionModel;
52 65
private final ListDataProvider<T> listDataProvider;
53
- private final Flushable display;
54 66
55 67
/**
56 68
* @param selectedCheckboxCSSClass
... ...
@@ -63,26 +75,67 @@ public class SelectionCheckboxColumn<T> extends AbstractSortableColumnWithMinMax
63 75
* {@link EntityIdentityComparator} to create a {@link RefreshableMultiSelectionModel}
64 76
* @param listDataProvider
65 77
* {@link ListDataProvider} to create a {@link RefreshableMultiSelectionModel}
66
- * @param display
67
- * {@link Flushable} to redraw the selected elements on the display
68 78
*/
69 79
public SelectionCheckboxColumn(String selectedCheckboxCSSClass, String deselectedCheckboxCSSClass,
70 80
String checkboxColumnCellCSSClass, EntityIdentityComparator<T> entityIdentityComparator,
71
- ListDataProvider<T> listDataProvider, Flushable display) {
81
+ ListDataProvider<T> listDataProvider) {
72 82
this(new BetterCheckboxCell(selectedCheckboxCSSClass, deselectedCheckboxCSSClass), checkboxColumnCellCSSClass,
73
- entityIdentityComparator, listDataProvider, display);
83
+ entityIdentityComparator, listDataProvider);
74 84
}
75 85
76 86
private SelectionCheckboxColumn(BetterCheckboxCell checkboxCell, String checkboxColumnCellCSSClass,
77
- EntityIdentityComparator<T> entityIdentityComparator, ListDataProvider<T> listDataProvider,
78
- Flushable display) {
87
+ EntityIdentityComparator<T> entityIdentityComparator, ListDataProvider<T> listDataProvider) {
79 88
super(checkboxCell, SortingOrder.DESCENDING);
80
- this.display = display;
81 89
this.listDataProvider = listDataProvider;
82 90
this.cell = checkboxCell;
83 91
this.checkboxColumnCellCSSClass = checkboxColumnCellCSSClass;
84 92
this.selectionEventTranslator = createSelectionEventTranslator();
85
- this.selectionModel = createSelectionModel(entityIdentityComparator);
93
+ final EntityIdentityComparator<T> entityIdentityComparator1 = entityIdentityComparator;
94
+ this.selectionModel = new RefreshableMultiSelectionModel<T>(entityIdentityComparator1, listDataProvider);
95
+ this.setSortable(false);
96
+ }
97
+
98
+ /**
99
+ * Creates and returns a live select-all/deselect-all {@link Header} for use as this column's header. The returned
100
+ * header displays a {@link CheckboxCell} that is ticked when all rows in the {@link ListDataProvider} are selected,
101
+ * and unticked whenever there is no selection. Clicking the header checkbox selects or
102
+ * deselects all rows accordingly.
103
+ * <p>
104
+ * The returned header must be passed explicitly to the table when adding this column, e.g.:
105
+ * <pre>
106
+ * final Header&lt;Boolean&gt; selectAllHeader = checkboxColumn.createHeader();
107
+ * table.addColumn(checkboxColumn, selectAllHeader);
108
+ * </pre>
109
+ * This method should be called exactly once per column instance, as each call registers a new selection change
110
+ * handler on the underlying selection model.
111
+ *
112
+ * @return a {@link Header} with select-all/deselect-all behavior; distinct from the static checkmark returned by
113
+ * {@link #getHeader()}
114
+ */
115
+ public Header<Boolean> createHeader() {
116
+ final CheckboxCell selectAllCell = new CheckboxCell();
117
+ final Header<Boolean> selectAllHeader = new Header<Boolean>(selectAllCell) {
118
+ @Override
119
+ public Boolean getValue() {
120
+ return false;
121
+ }
122
+ };
123
+ selectAllHeader.setUpdater(value -> {
124
+ for (final T mp : listDataProvider.getList()) {
125
+ if (selectionModel != null) {
126
+ selectionModel.setSelected(mp, value);
127
+ }
128
+ }
129
+ });
130
+ selectionModel.addSelectionChangeHandler(e -> {
131
+ final int selected = Util.size(selectionModel.getSelectedElements());
132
+ if (selected == 0) {
133
+ selectAllCell.setViewData(/* key */ selectAllHeader.getValue(), false);
134
+ } else if (selected == listDataProvider.getList().size()) {
135
+ selectAllCell.setViewData(/* key */ selectAllHeader.getValue(), true);
136
+ }
137
+ });
138
+ return selectAllHeader;
86 139
}
87 140
88 141
/**
... ...
@@ -103,31 +156,6 @@ public class SelectionCheckboxColumn<T> extends AbstractSortableColumnWithMinMax
103 156
}
104 157
105 158
/**
106
- * Clients should use the {@link RefreshableMultiSelectionModel} returned by this method for the {@link CellTable}
107
- * to which they add this column. If they do so, the {@link Flushable#flush()} method will be
108
- * triggered correctly for all selection changes. Otherwise, clients or subclasses are responsible to issue the
109
- * necessary calls to {@link Flushable#flush()} after selection changes.
110
- */
111
- private RefreshableMultiSelectionModel<T> createSelectionModel(final EntityIdentityComparator<T> entityIdentityComparator) {
112
- return new RefreshableMultiSelectionModel<T>(entityIdentityComparator, listDataProvider) {
113
- @Override
114
- public void clear() {
115
- super.clear();
116
- display.flush();
117
- }
118
-
119
- @Override
120
- public void setSelected(T item, boolean selected) {
121
- boolean wasSelected = isSelected(item);
122
- super.setSelected(item, selected);
123
- if (wasSelected != selected) {
124
- display.flush();
125
- }
126
- }
127
- };
128
- }
129
-
130
- /**
131 159
* @return a selection event translator that works nicely with
132 160
* {@link DefaultSelectionEventManager#createCustomManager(EventTranslator)} to ensure that this selection
133 161
* checkbox column does what it is supposed to do. Client may want to obtain the custom event manager
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/celltable/TableWrapper.java
... ...
@@ -6,6 +6,7 @@ import java.util.function.Function;
6 6
import com.google.gwt.core.client.GWT;
7 7
import com.google.gwt.user.cellview.client.Column;
8 8
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
9
+import com.google.gwt.user.cellview.client.Header;
9 10
import com.google.gwt.user.cellview.client.SimplePager;
10 11
import com.google.gwt.user.cellview.client.TextColumn;
11 12
import com.google.gwt.user.client.ui.IsWidget;
... ...
@@ -236,17 +237,17 @@ public abstract class TableWrapper<T, S extends RefreshableSelectionModel<T>, SM
236 237
selectionCheckboxColumn = new SelectionCheckboxColumn<T>(
237 238
getTableRes().cellTableStyle().cellTableCheckboxSelected(),
238 239
getTableRes().cellTableStyle().cellTableCheckboxDeselected(),
239
- getTableRes().cellTableStyle().cellTableCheckboxColumnCell(), entityIdentityComparator, dataProvider,
240
- table);
240
+ getTableRes().cellTableStyle().cellTableCheckboxColumnCell(), entityIdentityComparator, dataProvider);
241 241
columnSortHandler.setComparator(selectionCheckboxColumn, selectionCheckboxColumn.getComparator());
242 242
@SuppressWarnings("unchecked")
243
- S typedSelectionModel = (S) selectionCheckboxColumn.getSelectionModel();
243
+ final S typedSelectionModel = (S) selectionCheckboxColumn.getSelectionModel();
244 244
selectionModel = typedSelectionModel;
245 245
table.setSelectionModel(selectionModel, selectionCheckboxColumn.getSelectionManager());
246
- table.addColumn(selectionCheckboxColumn, selectionCheckboxColumn.getHeader());
246
+ final Header<Boolean> selectAllHeader = selectionCheckboxColumn.createHeader();
247
+ table.addColumn(selectionCheckboxColumn, selectAllHeader);
247 248
} else {
248 249
@SuppressWarnings("unchecked")
249
- S typedSelectionModel = (S) new RefreshableSingleSelectionModel<T>(entityIdentityComparator, dataProvider);
250
+ final S typedSelectionModel = (S) new RefreshableSingleSelectionModel<T>(entityIdentityComparator, dataProvider);
250 251
selectionModel = typedSelectionModel;
251 252
table.setSelectionModel(selectionModel);
252 253
}
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/controls/BetterCheckboxCell.java
... ...
@@ -46,12 +46,10 @@ public class BetterCheckboxCell extends AbstractEditableCell<Boolean, Boolean> {
46 46
public void onBrowserEvent(Context context, Element parent, Boolean value, NativeEvent event,
47 47
ValueUpdater<Boolean> valueUpdater) {
48 48
String type = event.getType();
49
-
50 49
boolean enterPressed = BrowserEvents.KEYDOWN.equals(type) && event.getKeyCode() == KeyCodes.KEY_ENTER;
51 50
if (BrowserEvents.CLICK.equals(type) || BrowserEvents.CHANGE.equals(type) || enterPressed) {
52 51
InputElement input = parent.getFirstChild().cast();
53 52
Boolean isChecked = input.isChecked();
54
-
55 53
/*
56 54
* Toggle the value if the enter key was pressed and the cell handles selection or doesn't depend on
57 55
* selection. If the cell depends on selection but doesn't handle selection, then ignore the enter key and
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/client/component/RoleDefinitionsPanel.java
... ...
@@ -22,6 +22,7 @@ import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
22 22
import com.google.gwt.user.cellview.client.AbstractCellTable;
23 23
import com.google.gwt.user.cellview.client.Column;
24 24
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
25
+import com.google.gwt.user.cellview.client.Header;
25 26
import com.google.gwt.user.cellview.client.TextColumn;
26 27
import com.google.gwt.user.client.Window;
27 28
import com.google.gwt.user.client.rpc.AsyncCallback;
... ...
@@ -164,7 +165,7 @@ public class RoleDefinitionsPanel extends VerticalPanel {
164 165
private FlushableCellTable<RoleDefinitionDTO> createRoleDefinitionsTable(CellTableWithCheckboxResources tableResources) {
165 166
final FlushableCellTable<RoleDefinitionDTO> table = new FlushableCellTable<>(/* pageSize */ 50, tableResources);
166 167
rolesListDataProvider.addDataDisplay(table);
167
- SelectionCheckboxColumn<RoleDefinitionDTO> roleSelectionCheckboxColumn = new SelectionCheckboxColumn<RoleDefinitionDTO>(
168
+ final SelectionCheckboxColumn<RoleDefinitionDTO> roleSelectionCheckboxColumn = new SelectionCheckboxColumn<RoleDefinitionDTO>(
168 169
tableResources.cellTableStyle().cellTableCheckboxSelected(),
169 170
tableResources.cellTableStyle().cellTableCheckboxDeselected(),
170 171
tableResources.cellTableStyle().cellTableCheckboxColumnCell(), new EntityIdentityComparator<RoleDefinitionDTO>() {
... ...
@@ -176,14 +177,13 @@ public class RoleDefinitionsPanel extends VerticalPanel {
176 177
public int hashCode(RoleDefinitionDTO t) {
177 178
return t.getId().hashCode();
178 179
}
179
- }, filterablePanelRoleDefinitions.getAllListDataProvider(), table);
180
- ListHandler<RoleDefinitionDTO> columnSortHandler = new ListHandler<>(rolesListDataProvider.getList());
180
+ }, filterablePanelRoleDefinitions.getAllListDataProvider());
181
+ final ListHandler<RoleDefinitionDTO> columnSortHandler = new ListHandler<>(rolesListDataProvider.getList());
181 182
table.addColumnSortHandler(columnSortHandler);
182
- columnSortHandler.setComparator(roleSelectionCheckboxColumn, roleSelectionCheckboxColumn.getComparator());
183 183
final TextColumn<RoleDefinitionDTO> roleDefinitionUUidColumn = new AbstractSortableTextColumn<RoleDefinitionDTO>(
184 184
role -> role.getId() == null ? "<null>" : role.getId().toString(), columnSortHandler);
185
- TextColumn<RoleDefinitionDTO> roleDefinitionNameColumn = new AbstractSortableTextColumn<RoleDefinitionDTO>(role->role.getName(), columnSortHandler);
186
- Column<RoleDefinitionDTO, SafeHtml> permissionsColumn = new Column<RoleDefinitionDTO, SafeHtml>(new SafeHtmlCell()) {
185
+ final TextColumn<RoleDefinitionDTO> roleDefinitionNameColumn = new AbstractSortableTextColumn<RoleDefinitionDTO>(role->role.getName(), columnSortHandler);
186
+ final Column<RoleDefinitionDTO, SafeHtml> permissionsColumn = new Column<RoleDefinitionDTO, SafeHtml>(new SafeHtmlCell()) {
187 187
@Override
188 188
public SafeHtml getValue(RoleDefinitionDTO role) {
189 189
SafeHtmlBuilder builder = new SafeHtmlBuilder();
... ...
@@ -204,7 +204,6 @@ public class RoleDefinitionsPanel extends VerticalPanel {
204 204
return new NaturalComparator().compare(r1.getPermissions().toString(), r2.getPermissions().toString());
205 205
}
206 206
});
207
-
208 207
final HasPermissions type = SecuredSecurityTypes.ROLE_DEFINITION;
209 208
final AccessControlledActionsColumn<RoleDefinitionDTO, DefaultActionsImagesBarCell> roleActionColumn = create(
210 209
new DefaultActionsImagesBarCell(stringMessages), userService);
... ...
@@ -222,8 +221,8 @@ public class RoleDefinitionsPanel extends VerticalPanel {
222 221
stringMessages);
223 222
roleActionColumn.addAction(DefaultActionsImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.CHANGE_ACL,
224 223
configACL::openDialog);
225
-
226
- table.addColumn(roleSelectionCheckboxColumn, roleSelectionCheckboxColumn.getHeader());
224
+ final Header<Boolean> selectAllHeader = roleSelectionCheckboxColumn.createHeader();
225
+ table.addColumn(roleSelectionCheckboxColumn, selectAllHeader);
227 226
table.addColumn(roleDefinitionNameColumn, stringMessages.name());
228 227
table.addColumn(permissionsColumn, stringMessages.permissions());
229 228
SecuredDTOOwnerColumn.configureOwnerColumns(table, columnSortHandler, stringMessages);