From f20dc0f5c49ddd4449a04c2a888b9e324bb02b11 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Fri, 21 Jun 2013 13:04:25 +0200 Subject: [PATCH] comment and whitespace changed only --- .../sailing/domain/common/dto/RaceColumnDTO.java | 15 ++++++++------- .../impl/AbstractSimpleLeaderboardImpl.java | 1 + .../tracking/impl/DynamicTrackedRaceImpl.java | 6 ++++++ .../sailing/gwt/ui/server/SailingServiceImpl.java | 1 + .../gwt/ui/spectator/LeaderboardGroupPanel.java | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/RaceColumnDTO.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/RaceColumnDTO.java index b9adc6ed4ec..c83a963198c 100755 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/RaceColumnDTO.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/RaceColumnDTO.java @@ -24,16 +24,17 @@ public class RaceColumnDTO extends NamedDTO implements Serializable { private double effectiveFactor; /** - * If the column has tracked races attached, this field tells the latest time point when one of those races was - * still running. It is necessary for the race to have GPS and wind data for the time point to be recorded here. If - * a tracked race has started but hasn't ended yet, the query time point is used for this field if it is after the - * time point when that race started, assuming that at the query time the race was still running. If the race hasn't - * started at the query time, the race isn't considered for setting this field. If the end of the race is known, it - * is used for this field if later than any other value set for this field. + * For each fleet, if the column has a tracked races attached for that fleet, this field tells the latest time point + * when that race was still running. It is necessary for the race to have GPS and wind data for the time point to be + * recorded here. If a tracked race has started but hasn't ended yet, the query time point is used for this field if + * it is after the time point when that race started, assuming that at the query time the race was still running. If + * the race hasn't started at the query time, the race isn't considered for setting this field. If the end of the + * race is known, it is used for this field if later than any other value set for this field. *

* * If no tracked race is attached to this column or none of the tracked races attached has started at the query time - * point, this field is null.

+ * point, this field is null. + *

* * Note that the {@link Date} objects in here are in "server time" and must never be directly compared to an * uncorrected client time because the client's clock may have a significant offset to the server time. diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java index 58068f80a9d..33957e276da 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java @@ -1040,6 +1040,7 @@ public abstract class AbstractSimpleLeaderboardImpl implements Leaderboard, Race result.addRace(raceColumn.getName(), raceColumn.getExplicitFactor(), raceColumn.getFactor(), fleetDTO, raceColumn.isMedalRace(), raceIdentifier, race); if (latestTimePointAfterQueryTimePointWhenATrackedRaceWasLive != null) { + // TODO Bug 1351: unify this with the similar calculation performed in StrippedLeaderboardDTO.createStrippedLeaderboardDTO raceColumnDTO.setWhenLastTrackedRaceWasLive(fleetDTO, latestTimePointAfterQueryTimePointWhenATrackedRaceWasLive.asDate()); } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/DynamicTrackedRaceImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/DynamicTrackedRaceImpl.java index 3f0f880cb38..13434095aab 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/DynamicTrackedRaceImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/DynamicTrackedRaceImpl.java @@ -182,6 +182,12 @@ DynamicTrackedRace, GPSTrackListener { return (DynamicGPSFixTrack) super.getOrCreateTrack(mark); } + /** + * In addition to creating the track which is performed by the superclass implementation, this implementation registers + * a {@link GPSTrackListener} with the mark's track and {@link #notifyListeners(GPSFix, Mark) notifies the listeners} + * about updates. The {@link #updated(TimePoint)} method is not called with the mark fix's time point because + * mark fixes may be received also from marks that don't belong to this race. + */ @Override protected DynamicGPSFixTrackImpl createMarkTrack(Mark mark) { DynamicGPSFixTrackImpl result = super.createMarkTrack(mark); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java index d6bebb0a99d..bb68560c530 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java @@ -1762,6 +1762,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S final FleetDTO fleetDTO = baseDomainFactory.convertToFleetDTO(fleet); RaceColumnDTO raceColumnDTO = leaderboardDTO.addRace(raceColumn.getName(), raceColumn.getExplicitFactor(), raceColumn.getFactor(), fleetDTO, raceColumn.isMedalRace(), raceIdentifier, raceDTO); + // TODO Bug 1351: unify this with the similar calculation performed in AbstractSimpleLeaderboardImpl.computeDTO if (latestTimePointAfterQueryTimePointWhenATrackedRaceWasLive != null) { raceColumnDTO.setWhenLastTrackedRaceWasLive(fleetDTO, latestTimePointAfterQueryTimePointWhenATrackedRaceWasLive.asDate()); } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/spectator/LeaderboardGroupPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/spectator/LeaderboardGroupPanel.java index 76dce7f9459..4c6e2bbfa0e 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/spectator/LeaderboardGroupPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/spectator/LeaderboardGroupPanel.java @@ -130,7 +130,7 @@ public class LeaderboardGroupPanel extends SimplePanel implements HasWelcomeWidg LeaderboardGroupPanel.this.leaderboardGroup = leaderboardGroupDTO; // in case there is a regatta leaderboard in the leaderboard group // we need to know the corresponding regatta structure - if(leaderboardGroup.containsRegattaLeaderboard()) { + if (leaderboardGroup.containsRegattaLeaderboard()) { sailingService.getRegattas(new AsyncCallback>() { @Override public void onSuccess(List regattaDTOs) {