Bug1564 - change to Double and add validation

Change-Id: I916dd6fb7f8ae5fe227d81cc0e0b05a84bfd4765
This commit is contained in:
Alexander Tatarinovich committed 2016-10-03 13:45:38 +03:00
1 parent f048a43aac
commit 0d0a385e6b
28 files changed
+98 -69

No files matched your search

@@ -447,12 +447,12 @@ public class MockedTrackedRace implements DynamicTrackedRace {
} }
@Override @Override
public double getHullLengthRadiusFactor(){ public Double getHullLengthRadiusFactor(){
return 1.0; return 1.0;
} }
@Override @Override
public void setHullLengthRadiusFactor(double hullLengthRadiusFactor){ public void setHullLengthRadiusFactor(Double hullLengthRadiusFactor){
} }
@Override @Override
@@ -162,9 +162,9 @@ public interface Regatta extends NamedWithID, IsRegattaLike, HasRaceColumnsAndRe
* Define the value which would be multipled by hull length from {@link BoatClass}. * Define the value which would be multipled by hull length from {@link BoatClass}.
* Next the calculated value {@link RegattaUtil} would be used to fill out radius of buoy on race map setting. * Next the calculated value {@link RegattaUtil} would be used to fill out radius of buoy on race map setting.
*/ */
public double getHullLengthRadiusFactor(); public Double getHullLengthRadiusFactor();
public void setHullLengthRadiusFactor(double hullLengthRadiusFactor); public void setHullLengthRadiusFactor(Double hullLengthRadiusFactor);
/** /**
* When there is no race committee app in place and no operator is managing the race start times for this regatta, * When there is no race committee app in place and no operator is managing the race start times for this regatta,
@@ -115,7 +115,7 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
private transient RaceLogStore raceLogStore; private transient RaceLogStore raceLogStore;
private final IsRegattaLike regattaLikeHelper; private final IsRegattaLike regattaLikeHelper;
private final RankingMetricConstructor rankingMetricConstructor; private final RankingMetricConstructor rankingMetricConstructor;
private double hullLengthRadiusFactor; private Double hullLengthRadiusFactor;
private CourseArea defaultCourseArea; private CourseArea defaultCourseArea;
private RegattaConfiguration configuration; private RegattaConfiguration configuration;
@@ -216,7 +216,7 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
*/ */
public <S extends Series> RegattaImpl(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, String name, public <S extends Series> RegattaImpl(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, String name,
BoatClass boatClass, TimePoint startDate, TimePoint endDate, Iterable<S> series, boolean persistent, BoatClass boatClass, TimePoint startDate, TimePoint endDate, Iterable<S> series, boolean persistent,
ScoringScheme scoringScheme, Serializable id, CourseArea courseArea, double hullLengthRadiusFactor, boolean useStartTimeInference, ScoringScheme scoringScheme, Serializable id, CourseArea courseArea, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, RankingMetricConstructor rankingMetricConstructor) { boolean controlTrackingFromStartAndFinishTimes, RankingMetricConstructor rankingMetricConstructor) {
super(name); super(name);
this.rankingMetricConstructor = rankingMetricConstructor; this.rankingMetricConstructor = rankingMetricConstructor;
@@ -575,12 +575,12 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
} }
@Override @Override
public double getHullLengthRadiusFactor() { public Double getHullLengthRadiusFactor() {
return hullLengthRadiusFactor; return hullLengthRadiusFactor;
} }
@Override @Override
public void setHullLengthRadiusFactor(double hullLengthRadiusFactor) { public void setHullLengthRadiusFactor(Double hullLengthRadiusFactor) {
this.hullLengthRadiusFactor = hullLengthRadiusFactor; this.hullLengthRadiusFactor = hullLengthRadiusFactor;
} }
@@ -8,9 +8,9 @@ public class RegattaUtil {
public static final double DEFAULT_BUOY_ZONE_RADIUS = 15; public static final double DEFAULT_BUOY_ZONE_RADIUS = 15;
public static double getCalculatedRegattaBuoyZoneRadius(Regatta regatta, BoatClass boatClass) { public static double getCalculatedRegattaBuoyZoneRadiusInMeters(Regatta regatta, BoatClass boatClass) {
double hullLengthRadiusFactor = Regatta.DEFAULT_HULL_LENGHT_FACTOR; double hullLengthRadiusFactor = Regatta.DEFAULT_HULL_LENGHT_FACTOR;
if (regatta != null) { if (regatta != null && regatta.getHullLengthRadiusFactor() != null) {
hullLengthRadiusFactor = regatta.getHullLengthRadiusFactor(); hullLengthRadiusFactor = regatta.getHullLengthRadiusFactor();
} }
@@ -18,7 +18,7 @@ public class RegattaMetadataDTO extends RegattaReferenceDTO implements HasRegatt
private RegattaState state; private RegattaState state;
private boolean flexibleLeaderboard; private boolean flexibleLeaderboard;
private RaceDataInfo raceDataInfo; private RaceDataInfo raceDataInfo;
private double buoyZoneRadius; private double buoyZoneRadiusInMeters;
public RegattaMetadataDTO() { public RegattaMetadataDTO() {
} }
@@ -124,12 +124,12 @@ public class RegattaMetadataDTO extends RegattaReferenceDTO implements HasRegatt
this.raceDataInfo = raceDataInfo; this.raceDataInfo = raceDataInfo;
} }
public double getBuoyZoneRadius() { public double getBuoyZoneRadiusInMeters() {
return buoyZoneRadius; return buoyZoneRadiusInMeters;
} }
public void setBuoyZoneRadius(double buoyZoneRadius) { public void setBuoyZoneRadiusInMeters(double buoyZoneRadiusInMeters) {
this.buoyZoneRadius = buoyZoneRadius; this.buoyZoneRadiusInMeters = buoyZoneRadiusInMeters;
} }
/** /**
@@ -181,17 +181,17 @@ public abstract class AbstractEventActivity<PLACE extends AbstractEventPlace> ex
linkParams.put(RaceMapSettings.PARAM_SHOW_MAPCONTROLS, "true"); linkParams.put(RaceMapSettings.PARAM_SHOW_MAPCONTROLS, "true");
linkParams.put(RaceBoardPerspectiveSettings.PARAM_VIEW_SHOW_NAVIGATION_PANEL, "true"); linkParams.put(RaceBoardPerspectiveSettings.PARAM_VIEW_SHOW_NAVIGATION_PANEL, "true");
linkParams.put("regattaName", regattaName); linkParams.put("regattaName", regattaName);
linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, String.valueOf(getRegattaBuoyZoneRadius(regattaName))); linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS, String.valueOf(getRegattaBuoyZoneRadius(regattaName)));
return linkParams; return linkParams;
} }
private double getRegattaBuoyZoneRadius(String regattaName) { private double getRegattaBuoyZoneRadius(String regattaName) {
for (RegattaMetadataDTO regatta : eventDTO.getRegattas()) { for (RegattaMetadataDTO regatta : eventDTO.getRegattas()) {
if (regattaName != null && regattaName.equals(regatta.getId())) { if (regattaName != null && regattaName.equals(regatta.getId())) {
return regatta.getBuoyZoneRadius(); return regatta.getBuoyZoneRadiusInMeters();
} }
} }
return RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS; return RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS;
} }
@Override @Override
@@ -275,19 +275,19 @@ public abstract class AbstractEventActivity<PLACE extends AbstractEventPlace> ex
} }
linkParams.put("raceName", trackedRaceName); linkParams.put("raceName", trackedRaceName);
linkParams.put("regattaName", regattaName); linkParams.put("regattaName", regattaName);
linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, String.valueOf(getRegattaBuoyZoneRadius(regattaName))); linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS, String.valueOf(getRegattaBuoyZoneRadiusInMeters(regattaName)));
// TODO this must only be forwarded if there is a logged-on user // TODO this must only be forwarded if there is a logged-on user
// linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true"); // linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true");
return linkParams; return linkParams;
} }
private double getRegattaBuoyZoneRadius(String regattaName) { private double getRegattaBuoyZoneRadiusInMeters(String regattaName) {
for (RegattaMetadataDTO regatta : eventDTO.getRegattas()) { for (RegattaMetadataDTO regatta : eventDTO.getRegattas()) {
if (regattaName != null && regattaName.equals(regatta.getId())) { if (regattaName != null && regattaName.equals(regatta.getId())) {
return regatta.getBuoyZoneRadius(); return regatta.getBuoyZoneRadiusInMeters();
} }
} }
return RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS; return RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS;
} }
public String getRegattaId() { public String getRegattaId() {
@@ -250,13 +250,13 @@ public class LeaderboardContext {
RegattaRaceDataInfoCalculator regattaRaceDataInfoCalculator = new RegattaRaceDataInfoCalculator(); RegattaRaceDataInfoCalculator regattaRaceDataInfoCalculator = new RegattaRaceDataInfoCalculator();
forRaces(regattaRaceDataInfoCalculator); forRaces(regattaRaceDataInfoCalculator);
regattaDTO.setRaceDataInfo(regattaRaceDataInfoCalculator.getRaceDataInfo()); regattaDTO.setRaceDataInfo(regattaRaceDataInfoCalculator.getRaceDataInfo());
regattaDTO.setBuoyZoneRadius(getRegattaBuoyZoneRadius()); regattaDTO.setBuoyZoneRadiusInMeters(getRegattaBuoyZoneRadiusInMeters());
} }
private double getRegattaBuoyZoneRadius() { private double getRegattaBuoyZoneRadiusInMeters() {
Regatta regatta = service.getRegattaByName(getLeaderboardName()); Regatta regatta = service.getRegattaByName(getLeaderboardName());
BoatClass boatClass = HomeServiceUtil.getBoatClass(leaderboard); BoatClass boatClass = HomeServiceUtil.getBoatClass(leaderboard);
double boatHullLength = RegattaUtil.getCalculatedRegattaBuoyZoneRadius(regatta, boatClass); double boatHullLength = RegattaUtil.getCalculatedRegattaBuoyZoneRadiusInMeters(regatta, boatClass);
return boatHullLength; return boatHullLength;
} }
@@ -934,7 +934,7 @@ public class RegattaRaceStatesComponent extends SimplePanel implements Component
raceLinkParameters.put("raceName", entryDTO.raceInfo.raceIdentifier.getRaceName()); raceLinkParameters.put("raceName", entryDTO.raceInfo.raceIdentifier.getRaceName());
raceLinkParameters.put("canReplayDuringLiveRaces", "true"); raceLinkParameters.put("canReplayDuringLiveRaces", "true");
raceLinkParameters.put("regattaName", entryDTO.regattaName); raceLinkParameters.put("regattaName", entryDTO.regattaName);
raceLinkParameters.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, String.valueOf(entryDTO.buyZoneRadius)); raceLinkParameters.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS, String.valueOf(entryDTO.buyZoneRadius));
return EntryPointLinkFactory.createRaceBoardLink(raceLinkParameters); return EntryPointLinkFactory.createRaceBoardLink(raceLinkParameters);
} }
@@ -192,9 +192,9 @@ public abstract class AbstractLeaderboardConfigPanel extends FormPanel implement
raceColumnTable.setSelectedLeaderboardName(getSelectedLeaderboardName()); raceColumnTable.setSelectedLeaderboardName(getSelectedLeaderboardName());
RegattaDTO regatta = getSelectedRegatta(); RegattaDTO regatta = getSelectedRegatta();
double buoyZoneRadius = regatta == null ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS double buoyZoneRadius = regatta == null ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS
: regatta.getCalculatedBuoyZoneRadius(); : regatta.getCalculatedBuoyZoneRadiusInMeters();
raceColumnTable.setSelectedRegattaHullLenghtCircleFactor(buoyZoneRadius); raceColumnTable.setSelectedBuoyZoneRadiusInMeters(buoyZoneRadius);
} }
}); });
@@ -27,7 +27,7 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
public CopyCourseAndCompetitorsDialog(SailingServiceAsync sailingService, ErrorReporter errorReporter, final StringMessages stringMessages, public CopyCourseAndCompetitorsDialog(SailingServiceAsync sailingService, ErrorReporter errorReporter, final StringMessages stringMessages,
Collection<RaceColumnDTOAndFleetDTOWithNameBasedEquality> races, Collection<RaceColumnDTOAndFleetDTOWithNameBasedEquality> races,
String leaderboardName, double regattaHullLenghtCircleFactor, DialogCallback<CourseAndCompetitorCopyOperation> dialogCallback) { String leaderboardName, double buoyZoneRadiusInMeters, DialogCallback<CourseAndCompetitorCopyOperation> dialogCallback) {
super(stringMessages.selectRaces(), stringMessages.selectRaces(), stringMessages.ok(), stringMessages.cancel(), super(stringMessages.selectRaces(), stringMessages.selectRaces(), stringMessages.ok(), stringMessages.cancel(),
new Validator<CourseAndCompetitorCopyOperation>() { new Validator<CourseAndCompetitorCopyOperation>() {
@Override @Override
@@ -41,7 +41,7 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
racesTable = new RaceTableWrapper<RefreshableMultiSelectionModel<RaceColumnDTOAndFleetDTOWithNameBasedEquality>>( racesTable = new RaceTableWrapper<RefreshableMultiSelectionModel<RaceColumnDTOAndFleetDTOWithNameBasedEquality>>(
sailingService, stringMessages, errorReporter, /* multiSelection */ true); sailingService, stringMessages, errorReporter, /* multiSelection */ true);
racesTable.setSelectedLeaderboardName(leaderboardName); racesTable.setSelectedLeaderboardName(leaderboardName);
racesTable.setSelectedRegattaHullLenghtCircleFactor(regattaHullLenghtCircleFactor); racesTable.setSelectedBuoyZoneRadiusInMeters(buoyZoneRadiusInMeters);
racesTable.getDataProvider().getList().addAll(races); racesTable.getDataProvider().getList().addAll(races);
racesTable.getSelectionModel().addSelectionChangeHandler(new Handler() { racesTable.getSelectionModel().addSelectionChangeHandler(new Handler() {
@Override @Override
@@ -26,7 +26,7 @@ public class RaceTableWrapper<S extends RefreshableSelectionModel<RaceColumnDTOA
extends TableWrapper<RaceColumnDTOAndFleetDTOWithNameBasedEquality, S> { extends TableWrapper<RaceColumnDTOAndFleetDTOWithNameBasedEquality, S> {
private final AnchorTemplates ANCHORTEMPLATE = GWT.create(AnchorTemplates.class); private final AnchorTemplates ANCHORTEMPLATE = GWT.create(AnchorTemplates.class);
private String selectedLeaderboardName; private String selectedLeaderboardName;
private double selectedRegattaHullLenghtCircleFactor; private double selectedBuoyZoneRadiusInMeters;
public RaceTableWrapper(SailingServiceAsync sailingService, StringMessages stringMessages, public RaceTableWrapper(SailingServiceAsync sailingService, StringMessages stringMessages,
ErrorReporter errorReporter, boolean multiSelection) { ErrorReporter errorReporter, boolean multiSelection) {
@@ -54,7 +54,7 @@ extends TableWrapper<RaceColumnDTOAndFleetDTOWithNameBasedEquality, S> {
.getA().getRaceIdentifier(raceInLeaderboardDTOAndFleetName.getB()); .getA().getRaceIdentifier(raceInLeaderboardDTOAndFleetName.getB());
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("leaderboardName", selectedLeaderboardName); params.put("leaderboardName", selectedLeaderboardName);
params.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, String.valueOf(selectedRegattaHullLenghtCircleFactor)); params.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS, String.valueOf(selectedBuoyZoneRadiusInMeters));
params.put("regattaName", raceIdentifier.getRegattaName()); params.put("regattaName", raceIdentifier.getRegattaName());
params.put("raceName", raceIdentifier.getRaceName()); params.put("raceName", raceIdentifier.getRaceName());
params.put("canReplayDuringLiveRaces", "true"); params.put("canReplayDuringLiveRaces", "true");
@@ -93,7 +93,7 @@ extends TableWrapper<RaceColumnDTOAndFleetDTOWithNameBasedEquality, S> {
this.selectedLeaderboardName = name; this.selectedLeaderboardName = name;
} }
public void setSelectedRegattaHullLenghtCircleFactor(double selectedRegattaHullLenghtCircleFactor) { public void setSelectedBuoyZoneRadiusInMeters(double selectedBuoyZoneRadiusInMeters) {
this.selectedRegattaHullLenghtCircleFactor = selectedRegattaHullLenghtCircleFactor; this.selectedBuoyZoneRadiusInMeters = selectedBuoyZoneRadiusInMeters;
} }
} }
@@ -73,6 +73,10 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends RegattaWithSeriesAnd
errorMessage = stringMessages.regattaWithThisNameAlreadyExists(); errorMessage = stringMessages.regattaWithThisNameAlreadyExists();
} }
if (regattaToValidate.hullLengthRadiusFactor == null) {
errorMessage = stringMessages.incorrectValueForRegattaHullLengthRadiusFactor();
}
if (errorMessage == null) { if (errorMessage == null) {
List<SeriesDTO> seriesToValidate = regattaToValidate.series; List<SeriesDTO> seriesToValidate = regattaToValidate.series;
int index = 0; int index = 0;
@@ -25,10 +25,27 @@ public class RegattaWithSeriesAndFleetsEditDialog extends RegattaWithSeriesAndFl
private RegattaConfigurationDTO currentRegattaConfiguration; private RegattaConfigurationDTO currentRegattaConfiguration;
protected static class RegattaParameterValidator implements Validator<RegattaDTO> {
private StringMessages stringMessages;
public RegattaParameterValidator(StringMessages stringMessages) {
this.stringMessages = stringMessages;
}
@Override
public String getErrorMessage(RegattaDTO regattaToValidate) {
String errorMessage = null;
if (regattaToValidate.hullLengthRadiusFactor == null) {
errorMessage = stringMessages.incorrectValueForRegattaHullLengthRadiusFactor();
}
return errorMessage;
}
}
public RegattaWithSeriesAndFleetsEditDialog(RegattaDTO regatta, Collection<RegattaDTO> existingRegattas, public RegattaWithSeriesAndFleetsEditDialog(RegattaDTO regatta, Collection<RegattaDTO> existingRegattas,
List<EventDTO> existingEvents, EventDTO correspondingEvent, final StringMessages stringMessages, DialogCallback<RegattaDTO> callback) { List<EventDTO> existingEvents, EventDTO correspondingEvent, final StringMessages stringMessages, DialogCallback<RegattaDTO> callback) {
super(regatta, regatta.series, existingEvents, correspondingEvent, stringMessages.editRegatta(), stringMessages.ok(), stringMessages, super(regatta, regatta.series, existingEvents, correspondingEvent, stringMessages.editRegatta(), stringMessages.ok(), stringMessages,
null, callback); new RegattaParameterValidator(stringMessages), callback);
ensureDebugId("RegattaWithSeriesAndFleetsEditDialog"); ensureDebugId("RegattaWithSeriesAndFleetsEditDialog");
currentRegattaConfiguration = regatta.configuration; currentRegattaConfiguration = regatta.configuration;
@@ -49,6 +49,7 @@ import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages; import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.FlushableCellTable; import com.sap.sailing.gwt.ui.client.shared.controls.FlushableCellTable;
import com.sap.sailing.gwt.ui.client.shared.controls.SelectionCheckboxColumn; import com.sap.sailing.gwt.ui.client.shared.controls.SelectionCheckboxColumn;
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMapSettings;
import com.sap.sailing.gwt.ui.shared.ControlPointDTO; import com.sap.sailing.gwt.ui.shared.ControlPointDTO;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO; import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO; import com.sap.sailing.gwt.ui.shared.EventDTO;
@@ -336,9 +337,11 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
List<RaceColumnDTOAndFleetDTOWithNameBasedEquality> races = List<RaceColumnDTOAndFleetDTOWithNameBasedEquality> races =
new ArrayList<>(raceColumnTable.getDataProvider().getList()); new ArrayList<>(raceColumnTable.getDataProvider().getList());
races.remove(raceColumnDTOAndFleetDTO); races.remove(raceColumnDTOAndFleetDTO);
double regattaHullLenghtCircleFactor = getSelectedRegatta() != null ? null : getSelectedRegatta().hullLengthRadiusFactor; double buoyZoneRadiusInMeters = getSelectedRegatta() == null
? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS
: getSelectedRegatta().getCalculatedBuoyZoneRadiusInMeters();
new CopyCourseAndCompetitorsDialog(sailingService, errorReporter, stringMessages, races, new CopyCourseAndCompetitorsDialog(sailingService, errorReporter, stringMessages, races,
leaderboardName, regattaHullLenghtCircleFactor, new DialogCallback<CourseAndCompetitorCopyOperation>() { leaderboardName, buoyZoneRadiusInMeters, new DialogCallback<CourseAndCompetitorCopyOperation>() {
@Override @Override
public void ok(CourseAndCompetitorCopyOperation operation) { public void ok(CourseAndCompetitorCopyOperation operation) {
operation.perform(leaderboardName, raceColumnDTOAndFleetDTO, /* onSuccessCallback */ new Runnable() { operation.perform(leaderboardName, raceColumnDTOAndFleetDTO, /* onSuccessCallback */ new Runnable() {
@@ -215,7 +215,7 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
RegattaDTO createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate, RegattaDTO createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate,
RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal, boolean persistent, RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal, boolean persistent,
ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, double hullLengthRadiusFactor, boolean useStartTimeInference, ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType); boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType);
void removeRegatta(RegattaIdentifier regattaIdentifier); void removeRegatta(RegattaIdentifier regattaIdentifier);
@@ -225,7 +225,7 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
void removeRegattas(Collection<RegattaIdentifier> regattas); void removeRegattas(Collection<RegattaIdentifier> regattas);
void updateRegatta(RegattaIdentifier regattaIdentifier, Date startDate, Date endDate, UUID defaultCourseAreaUuid, void updateRegatta(RegattaIdentifier regattaIdentifier, Date startDate, Date endDate, UUID defaultCourseAreaUuid,
RegattaConfigurationDTO regattaConfiguration, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes); RegattaConfigurationDTO regattaConfiguration, Double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes);
List<RaceColumnInSeriesDTO> addRaceColumnsToSeries(RegattaIdentifier regattaIdentifier, String seriesName, List<RaceColumnInSeriesDTO> addRaceColumnsToSeries(RegattaIdentifier regattaIdentifier, String seriesName,
List<Pair<String, Integer>> columnNames); List<Pair<String, Integer>> columnNames);
@@ -441,7 +441,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
void createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate, void createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate,
RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal, boolean persistent, RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal, boolean persistent,
ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, double hullLengthRadiusFactor, boolean useStartTimeInference, ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType, boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType,
AsyncCallback<RegattaDTO> callback); AsyncCallback<RegattaDTO> callback);
@@ -528,7 +528,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
void storeSwissTimingArchiveConfiguration(String swissTimingUrl, AsyncCallback<Void> asyncCallback); void storeSwissTimingArchiveConfiguration(String swissTimingUrl, AsyncCallback<Void> asyncCallback);
void updateRegatta(RegattaIdentifier regattaIdentifier, Date startDate, Date endDate, UUID defaultCourseAreaUuid, void updateRegatta(RegattaIdentifier regattaIdentifier, Date startDate, Date endDate, UUID defaultCourseAreaUuid,
RegattaConfigurationDTO regattaConfiguration, double hullLengthRadiusFactor, boolean useStartTimeInference, RegattaConfigurationDTO regattaConfiguration, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, AsyncCallback<Void> callback); boolean controlTrackingFromStartAndFinishTimes, AsyncCallback<Void> callback);
/** /**
@@ -1740,4 +1740,6 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
String lastFix(); String lastFix();
String filterDeviceMappings(); String filterDeviceMappings();
String hullLengthRadiusFactor(); String hullLengthRadiusFactor();
String incorrectValueForRegattaHullLengthRadiusFactor();
} }
@@ -1712,4 +1712,5 @@ strategySimulatorReadMore=Learn More
impressum=Imprint impressum=Imprint
lastFix=Last fix lastFix=Last fix
filterDeviceMappings=Filter device mappings filterDeviceMappings=Filter device mappings
hullLengthRadiusFactor=Hull length radius factor hullLengthRadiusFactor=Hull length radius factor
incorrectValueForRegattaHullLengthRadiusFactor=Incorrect value for "Hull length radius factor"
@@ -17,9 +17,9 @@ public class RaceMapSettings extends AbstractSettings {
public static final String PARAM_VIEW_SHOW_STREAMLETS = "viewShowStreamlets"; public static final String PARAM_VIEW_SHOW_STREAMLETS = "viewShowStreamlets";
public static final String PARAM_VIEW_SHOW_STREAMLET_COLORS = "viewShowStreamletColors"; public static final String PARAM_VIEW_SHOW_STREAMLET_COLORS = "viewShowStreamletColors";
public static final String PARAM_VIEW_SHOW_SIMULATION = "viewShowSimulation"; public static final String PARAM_VIEW_SHOW_SIMULATION = "viewShowSimulation";
public static final String PARAM_BUOY_ZONE_RADIUS = "buoyZoneRadius"; public static final String PARAM_BUOY_ZONE_RADIUS_IN_METERS = "buoyZoneRadiusInMeters";
public static final double DEFAULT_BUOY_ZONE_RADIUS = 15; public static final double DEFAULT_BUOY_ZONE_RADIUS_IN_METERS = 15;
private final boolean showDouglasPeuckerPoints; private final boolean showDouglasPeuckerPoints;
@@ -64,7 +64,7 @@ public class RaceMapSettings extends AbstractSettings {
/* showMapControls */ true, /* showMapControls */ true,
new RaceMapHelpLinesSettings(), new RaceMapHelpLinesSettings(),
/* windUp */ false, /* windUp */ false,
/* buoyZoneRadiusInMeters */ DEFAULT_BUOY_ZONE_RADIUS, /* buoyZoneRadiusInMeters */ DEFAULT_BUOY_ZONE_RADIUS_IN_METERS,
/* showWindStreamletOverlay */ false, /* showWindStreamletOverlay */ false,
/* showWindStreamletColors */ false, /* showWindStreamletColors */ false,
/* showSimulationOverlay */ false); /* showSimulationOverlay */ false);
@@ -243,7 +243,7 @@ public class RaceMapSettings extends AbstractSettings {
final boolean showWindStreamletOverlay = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_STREAMLETS, defaultForViewShowStreamlets /* default */); final boolean showWindStreamletOverlay = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_STREAMLETS, defaultForViewShowStreamlets /* default */);
final boolean showWindStreamletColors = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_STREAMLET_COLORS, defaultForViewShowStreamletColors /* default */); final boolean showWindStreamletColors = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_STREAMLET_COLORS, defaultForViewShowStreamletColors /* default */);
final boolean showSimulationOverlay = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_SIMULATION, defaultForViewShowSimulation /* default */); final boolean showSimulationOverlay = GwtHttpRequestUtils.getBooleanParameter(PARAM_VIEW_SHOW_SIMULATION, defaultForViewShowSimulation /* default */);
final double buoyZoneRadiusInMeters = GwtHttpRequestUtils.getDoubleParameter(PARAM_BUOY_ZONE_RADIUS, 0.0 /* default */); final double buoyZoneRadiusInMeters = GwtHttpRequestUtils.getDoubleParameter(PARAM_BUOY_ZONE_RADIUS_IN_METERS, DEFAULT_BUOY_ZONE_RADIUS_IN_METERS /* default */);
return new RaceMapSettings(showMapControls, showCourseGeometry, windUp, buoyZoneRadiusInMeters, showWindStreamletOverlay, showWindStreamletColors, showSimulationOverlay); return new RaceMapSettings(showMapControls, showCourseGeometry, windUp, buoyZoneRadiusInMeters, showWindStreamletOverlay, showWindStreamletColors, showSimulationOverlay);
} }
@@ -208,7 +208,7 @@ public class RaceBoardPanel extends AbstractPerspectiveComposite<RaceBoardPerspe
RaceTimePanelLifecycle raceTimePanelLifecycle = perspectiveLifecycleWithAllSettings.getPerspectiveLifecycle().getRaceTimePanelLifecycle(); RaceTimePanelLifecycle raceTimePanelLifecycle = perspectiveLifecycleWithAllSettings.getPerspectiveLifecycle().getRaceTimePanelLifecycle();
RaceTimePanelSettings raceTimePanelSettings = perspectiveLifecycleWithAllSettings.findComponentSettingsByLifecycle(raceTimePanelLifecycle); RaceTimePanelSettings raceTimePanelSettings = perspectiveLifecycleWithAllSettings.findComponentSettingsByLifecycle(raceTimePanelLifecycle);
final double buoyZoneRadiusInMeters = GwtHttpRequestUtils.getDoubleParameter(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS /* default */); final double buoyZoneRadiusInMeters = GwtHttpRequestUtils.getDoubleParameter(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS, RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS /* default */);
final RaceMapSettings raceMapSettings = new RaceMapSettings(defaultRaceMapSettings.getZoomSettings(), defaultRaceMapSettings.getHelpLinesSettings(), final RaceMapSettings raceMapSettings = new RaceMapSettings(defaultRaceMapSettings.getZoomSettings(), defaultRaceMapSettings.getHelpLinesSettings(),
defaultRaceMapSettings.getTransparentHoverlines(), defaultRaceMapSettings.getHoverlineStrokeWeight(), defaultRaceMapSettings.getTransparentHoverlines(), defaultRaceMapSettings.getHoverlineStrokeWeight(),
defaultRaceMapSettings.getTailLengthInMilliseconds(), defaultRaceMapSettings.isWindUp(), defaultRaceMapSettings.getTailLengthInMilliseconds(), defaultRaceMapSettings.isWindUp(),
@@ -3914,7 +3914,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
@Override @Override
public void updateRegatta(RegattaIdentifier regattaName, Date startDate, Date endDate, UUID defaultCourseAreaUuid, public void updateRegatta(RegattaIdentifier regattaName, Date startDate, Date endDate, UUID defaultCourseAreaUuid,
RegattaConfigurationDTO configurationDTO, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) { RegattaConfigurationDTO configurationDTO, Double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) {
Regatta regatta = getService().getRegatta(regattaName); Regatta regatta = getService().getRegatta(regattaName);
if (regatta != null) { if (regatta != null) {
SecurityUtils.getSubject().checkPermission(Permission.REGATTA.getStringPermissionForObjects(Mode.UPDATE, regatta.getName())); SecurityUtils.getSubject().checkPermission(Permission.REGATTA.getStringPermissionForObjects(Mode.UPDATE, regatta.getName()));
@@ -4013,7 +4013,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
@Override @Override
public RegattaDTO createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate, public RegattaDTO createRegatta(String regattaName, String boatClassName, Date startDate, Date endDate,
RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal, RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedal,
boolean persistent, ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean persistent, ScoringSchemeType scoringSchemeType, UUID defaultCourseAreaId, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType) { boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType) {
SecurityUtils.getSubject().checkPermission(Permission.REGATTA.getStringPermissionForObjects(Mode.CREATE, regattaName)); SecurityUtils.getSubject().checkPermission(Permission.REGATTA.getStringPermissionForObjects(Mode.CREATE, regattaName));
TimePoint startTimePoint = startDate != null ? new MillisecondsTimePoint(startDate) : null; TimePoint startTimePoint = startDate != null ? new MillisecondsTimePoint(startDate) : null;
@@ -4236,7 +4236,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
RegattaLeaderboard regattaLeaderboard = (RegattaLeaderboard) leaderboard; RegattaLeaderboard regattaLeaderboard = (RegattaLeaderboard) leaderboard;
Regatta regatta = regattaLeaderboard.getRegatta(); Regatta regatta = regattaLeaderboard.getRegatta();
BoatClass boatClass = regatta.getBoatClass(); BoatClass boatClass = regatta.getBoatClass();
double buyZoneRadius = RegattaUtil.getCalculatedRegattaBuoyZoneRadius(regatta, boatClass); double buyZoneRadius = RegattaUtil.getCalculatedRegattaBuoyZoneRadiusInMeters(regatta, boatClass);
for (Series series : regatta.getSeries()) { for (Series series : regatta.getSeries()) {
Map<String, List<RegattaOverviewEntryDTO>> entriesPerFleet = new HashMap<String, List<RegattaOverviewEntryDTO>>(); Map<String, List<RegattaOverviewEntryDTO>> entriesPerFleet = new HashMap<String, List<RegattaOverviewEntryDTO>>();
for (RaceColumn raceColumn : series.getRaceColumns()) { for (RaceColumn raceColumn : series.getRaceColumns()) {
@@ -4252,7 +4252,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
boatClass = trackedRace.getRace().getBoatClass(); boatClass = trackedRace.getRace().getBoatClass();
break; break;
} }
double buyZoneRadius = RegattaUtil.getCalculatedRegattaBuoyZoneRadius(null, boatClass); double buyZoneRadius = RegattaUtil.getCalculatedRegattaBuoyZoneRadiusInMeters(null, boatClass);
Map<String, List<RegattaOverviewEntryDTO>> entriesPerFleet = new HashMap<String, List<RegattaOverviewEntryDTO>>(); Map<String, List<RegattaOverviewEntryDTO>> entriesPerFleet = new HashMap<String, List<RegattaOverviewEntryDTO>>();
for (RaceColumn raceColumn : leaderboard.getRaceColumns()) { for (RaceColumn raceColumn : leaderboard.getRaceColumns()) {
getRegattaOverviewEntries(showOnlyRacesOfSameDay, dayToCheck, usedCourseArea, getRegattaOverviewEntries(showOnlyRacesOfSameDay, dayToCheck, usedCourseArea,
@@ -5,6 +5,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import com.sap.sailing.domain.base.Regatta;
import com.sap.sailing.domain.common.RankingMetrics; import com.sap.sailing.domain.common.RankingMetrics;
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier; import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
import com.sap.sailing.domain.common.RegattaIdentifier; import com.sap.sailing.domain.common.RegattaIdentifier;
@@ -35,7 +36,7 @@ public class RegattaDTO extends NamedDTO {
public boolean useStartTimeInference = true; public boolean useStartTimeInference = true;
public boolean controlTrackingFromStartAndFinishTimes = false; public boolean controlTrackingFromStartAndFinishTimes = false;
public RankingMetrics rankingMetricType; public RankingMetrics rankingMetricType;
public double hullLengthRadiusFactor; public Double hullLengthRadiusFactor;
public RegattaDTO() {} public RegattaDTO() {}
@@ -124,9 +125,10 @@ public class RegattaDTO extends NamedDTO {
return false; return false;
} }
public double getCalculatedBuoyZoneRadius() { public double getCalculatedBuoyZoneRadiusInMeters() {
double boatHullLength = boatClass == null ? 0.0 : boatClass.getHullLengthInMeters(); Double boatHullLength = boatClass == null ? null : boatClass.getHullLengthInMeters();
return boatHullLength == 0.0 ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS : (boatHullLength * hullLengthRadiusFactor); double hullLengthFactor = this.hullLengthRadiusFactor == null ? Regatta.DEFAULT_HULL_LENGHT_FACTOR : this.hullLengthRadiusFactor;
return boatHullLength == null ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS : (boatHullLength * hullLengthFactor);
} }
@Override @Override
@@ -434,18 +434,18 @@ public class LeaderboardGroupPanel extends SimplePanel implements HasWelcomeWidg
Boolean.toString(showNavigationPanel)); Boolean.toString(showNavigationPanel));
linkParams.put("regattaName", raceIdentifier.getRegattaName()); linkParams.put("regattaName", raceIdentifier.getRegattaName());
linkParams.put("leaderboardGroupName", leaderboardGroup.getName()); linkParams.put("leaderboardGroupName", leaderboardGroup.getName());
linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS, linkParams.put(RaceMapSettings.PARAM_BUOY_ZONE_RADIUS_IN_METERS,
String.valueOf(getRegattaBuoyZoneRadius(raceIdentifier.getRegattaName()))); String.valueOf(getRegattaBuoyZoneRadiusInMeters(raceIdentifier.getRegattaName())));
if (viewMode != null && !viewMode.isEmpty()) { if (viewMode != null && !viewMode.isEmpty()) {
linkParams.put("viewMode", viewMode); linkParams.put("viewMode", viewMode);
} }
return linkParams; return linkParams;
} }
private double getRegattaBuoyZoneRadius(String regattaName) { private double getRegattaBuoyZoneRadiusInMeters(String regattaName) {
RegattaDTO regatta = regattasByName.get(regattaName); RegattaDTO regatta = regattasByName.get(regattaName);
double buoyZoneRadius = regatta == null ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS double buoyZoneRadius = regatta == null ? RaceMapSettings.DEFAULT_BUOY_ZONE_RADIUS_IN_METERS
: regatta.getCalculatedBuoyZoneRadius(); : regatta.getCalculatedBuoyZoneRadiusInMeters();
return buoyZoneRadius; return buoyZoneRadius;
} }
@@ -314,12 +314,12 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
* @param controlTrackingFromStartAndFinishTimes TODO * @param controlTrackingFromStartAndFinishTimes TODO
*/ */
Regatta createRegatta(String regattaName, String boatClassName, TimePoint startDate, TimePoint endDate, Serializable id, Iterable<? extends Series> series, Regatta createRegatta(String regattaName, String boatClassName, TimePoint startDate, TimePoint endDate, Serializable id, Iterable<? extends Series> series,
boolean persistent, ScoringScheme scoringScheme, Serializable defaultCourseAreaId, double hullLengthRadiusFactor, boolean persistent, ScoringScheme scoringScheme, Serializable defaultCourseAreaId, Double hullLengthRadiusFactor,
boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes, RankingMetricConstructor rankingMetricConstructor); boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes, RankingMetricConstructor rankingMetricConstructor);
Regatta updateRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate, Regatta updateRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate,
Serializable newDefaultCourseAreaId, RegattaConfiguration regattaConfiguration, Serializable newDefaultCourseAreaId, RegattaConfiguration regattaConfiguration,
Iterable<? extends Series> series, double hullLengthRadiusFactor, boolean useStartTimeInference, Iterable<? extends Series> series, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes); boolean controlTrackingFromStartAndFinishTimes);
/** /**
@@ -1239,7 +1239,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
@Override @Override
public Regatta createRegatta(String fullRegattaName, String boatClassName, TimePoint startDate, TimePoint endDate, public Regatta createRegatta(String fullRegattaName, String boatClassName, TimePoint startDate, TimePoint endDate,
Serializable id, Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme, Serializable id, Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme,
Serializable defaultCourseAreaId, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes, Serializable defaultCourseAreaId, Double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes,
RankingMetricConstructor rankingMetricConstructor) { RankingMetricConstructor rankingMetricConstructor) {
com.sap.sse.common.Util.Pair<Regatta, Boolean> regattaWithCreatedFlag = getOrCreateRegattaWithoutReplication( com.sap.sse.common.Util.Pair<Regatta, Boolean> regattaWithCreatedFlag = getOrCreateRegattaWithoutReplication(
fullRegattaName, boatClassName, startDate, endDate, id, series, persistent, scoringScheme, fullRegattaName, boatClassName, startDate, endDate, id, series, persistent, scoringScheme,
@@ -2144,7 +2144,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
@Override @Override
public Regatta updateRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate, public Regatta updateRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate,
Serializable newDefaultCourseAreaId, RegattaConfiguration newRegattaConfiguration, Serializable newDefaultCourseAreaId, RegattaConfiguration newRegattaConfiguration,
Iterable<? extends Series> series, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) { Iterable<? extends Series> series, Double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) {
// We're not doing any renaming of the regatta itself, therefore we don't have to sync on the maps. // We're not doing any renaming of the regatta itself, therefore we don't have to sync on the maps.
Regatta regatta = getRegatta(regattaIdentifier); Regatta regatta = getRegatta(regattaIdentifier);
CourseArea newCourseArea = getCourseArea(newDefaultCourseAreaId); CourseArea newCourseArea = getCourseArea(newDefaultCourseAreaId);
@@ -29,14 +29,14 @@ public class AddSpecificRegatta extends AbstractAddRegattaOperation {
private final boolean persistent; private final boolean persistent;
private final ScoringScheme scoringScheme; private final ScoringScheme scoringScheme;
private final Serializable defaultCourseAreaId; private final Serializable defaultCourseAreaId;
private final double hullLengthRadiusFactor; private final Double hullLengthRadiusFactor;
private final boolean useStartTimeInference; private final boolean useStartTimeInference;
private final boolean controlTrackingFromStartAndFinishTimes; private final boolean controlTrackingFromStartAndFinishTimes;
private final RankingMetrics rankingMetricType; private final RankingMetrics rankingMetricType;
public AddSpecificRegatta(String regattaName, String boatClassName, TimePoint startDate, TimePoint endDate, Serializable id, public AddSpecificRegatta(String regattaName, String boatClassName, TimePoint startDate, TimePoint endDate, Serializable id,
RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndDiscardingThresholds, RegattaCreationParametersDTO seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndDiscardingThresholds,
boolean persistent, ScoringScheme scoringScheme, Serializable defaultCourseAreaId, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean persistent, ScoringScheme scoringScheme, Serializable defaultCourseAreaId, Double hullLengthRadiusFactor, boolean useStartTimeInference,
boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType) { boolean controlTrackingFromStartAndFinishTimes, RankingMetrics rankingMetricType) {
super(regattaName, boatClassName, startDate, endDate, id); super(regattaName, boatClassName, startDate, endDate, id);
this.seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndStartsWithZeroScoreAndDiscardingThresholds = seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndDiscardingThresholds; this.seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndStartsWithZeroScoreAndDiscardingThresholds = seriesNamesWithFleetNamesAndFleetOrderingAndMedalAndDiscardingThresholds;
@@ -15,14 +15,14 @@ public class UpdateSpecificRegatta extends AbstractRacingEventServiceOperation<R
private final RegattaIdentifier regattaIdentifier; private final RegattaIdentifier regattaIdentifier;
private final UUID newDefaultCourseAreaId; private final UUID newDefaultCourseAreaId;
private final RegattaConfiguration newConfiguration; private final RegattaConfiguration newConfiguration;
private final double hullLengthRadiusFactor; private final Double hullLengthRadiusFactor;
private final boolean useStartTimeInference; private final boolean useStartTimeInference;
private final boolean controlTrackingFromStartAndFinishTimes; private final boolean controlTrackingFromStartAndFinishTimes;
private final TimePoint startDate; private final TimePoint startDate;
private final TimePoint endDate; private final TimePoint endDate;
public UpdateSpecificRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate, UUID newDefaultCourseAreaId, public UpdateSpecificRegatta(RegattaIdentifier regattaIdentifier, TimePoint startDate, TimePoint endDate, UUID newDefaultCourseAreaId,
RegattaConfiguration newConfiguration, double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) { RegattaConfiguration newConfiguration, Double hullLengthRadiusFactor, boolean useStartTimeInference, boolean controlTrackingFromStartAndFinishTimes) {
this.regattaIdentifier = regattaIdentifier; this.regattaIdentifier = regattaIdentifier;
this.startDate = startDate; this.startDate = startDate;
this.endDate = endDate; this.endDate = endDate;