diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java index c6cea43d115..9c506f53723 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java @@ -47,7 +47,6 @@ import com.sap.sailing.domain.racelogtracking.RaceLogTrackingAdapter; import com.sap.sailing.domain.tracking.TrackedRace; import com.sap.sailing.gwt.ui.adminconsole.RaceLogSetTrackingTimesDTO; import com.sap.sailing.gwt.ui.client.shared.charts.MarkPositionService.MarkTracksDTO; -import com.sap.sailing.gwt.ui.client.shared.charts.RaceIdentifierToLeaderboardRaceColumnAndFleetMapper.LeaderboardNameRaceColumnNameAndFleetName; import com.sap.sailing.gwt.ui.shared.BulkScoreCorrectionDTO; import com.sap.sailing.gwt.ui.shared.CompactBoatPositionsDTO; import com.sap.sailing.gwt.ui.shared.CompactRaceMapDataDTO; diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java index 630a72183f6..d7063ca7078 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java @@ -35,6 +35,7 @@ import com.sap.sailing.domain.common.dto.RegattaCreationParametersDTO; import com.sap.sailing.domain.common.racelog.RacingProcedureType; import com.sap.sailing.domain.tracking.TrackedRace; import com.sap.sailing.gwt.ui.adminconsole.RaceLogSetTrackingTimesDTO; +import com.sap.sailing.gwt.ui.client.shared.charts.MarkPositionService.MarkTracksDTO; import com.sap.sailing.gwt.ui.shared.BulkScoreCorrectionDTO; import com.sap.sailing.gwt.ui.shared.CompactBoatPositionsDTO; import com.sap.sailing.gwt.ui.shared.CompactRaceMapDataDTO; @@ -47,6 +48,7 @@ import com.sap.sailing.gwt.ui.shared.DeviceConfigurationMatcherDTO; import com.sap.sailing.gwt.ui.shared.DeviceMappingDTO; import com.sap.sailing.gwt.ui.shared.EventBaseDTO; import com.sap.sailing.gwt.ui.shared.EventDTO; +import com.sap.sailing.gwt.ui.shared.GPSFixDTO; import com.sap.sailing.gwt.ui.shared.GPSFixDTOWithSpeedWindTackAndLegType; import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO; import com.sap.sailing.gwt.ui.shared.ManeuverDTO; @@ -763,4 +765,19 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan void getCompetitorRegistrationsForLeaderboard(String leaderboardName, AsyncCallback> callback); + + void addMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO newFix, AsyncCallback callback); + + void editMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO oldFix, Position newPosition, AsyncCallback callback); + + void removeMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO fix, AsyncCallback callback); + + void canRemoveMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO fix, AsyncCallback callback); + + void getMarkTracks(String leaderboardName, String raceColumnName, String fleetName, + AsyncCallback callback); } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/EditMarkPositionPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/EditMarkPositionPanel.java index d5b16389b6e..05b56ea2cca 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/EditMarkPositionPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/EditMarkPositionPanel.java @@ -62,6 +62,7 @@ import com.google.gwt.maps.client.events.rightclick.RightClickMapHandler; import com.google.gwt.maps.client.mvc.MVCArray; import com.google.gwt.maps.client.overlays.Polyline; import com.google.gwt.maps.client.overlays.PolylineOptions; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.Label; @@ -79,6 +80,7 @@ import com.sap.sailing.domain.common.impl.DegreePosition; import com.sap.sailing.gwt.ui.client.SailingServiceAsync; import com.sap.sailing.gwt.ui.client.StringMessages; import com.sap.sailing.gwt.ui.client.shared.charts.MarkPositionService.MarkTrackDTO; +import com.sap.sailing.gwt.ui.client.shared.charts.MarkPositionService.MarkTracksDTO; import com.sap.sailing.gwt.ui.client.shared.charts.RaceIdentifierToLeaderboardRaceColumnAndFleetMapper.LeaderboardNameRaceColumnNameAndFleetName; import com.sap.sailing.gwt.ui.client.shared.racemap.BoundsUtil; import com.sap.sailing.gwt.ui.client.shared.racemap.CourseMarkOverlay; @@ -233,43 +235,43 @@ public class EditMarkPositionPanel extends AbstractRaceChart implements Componen } @Override - public MarkTracksDTO getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier) { + public void getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, AsyncCallback callback) { final ArrayList tracksList = new ArrayList(); MarkTracksDTO tracks = new MarkTracksDTO(tracksList); for (Map.Entry> entry : markTracks.entrySet()) { tracksList.add(new MarkTrackDTO(entry.getKey(), entry.getValue(), false)); } - return tracks; + callback.onSuccess(tracks); } @Override - public boolean canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix) { - return true; + public void canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix, AsyncCallback callback) { + callback.onSuccess(true); } @Override public void removeMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, - GPSFixDTO fix) { + GPSFixDTO fix, AsyncCallback callback) { markTracks.get(mark).remove(fix); } @Override public void addMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, - GPSFixDTO newFix) { + GPSFixDTO newFix, AsyncCallback callback) { markTracks.get(mark).add(newFix); } @Override public void editMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix, - Position newPosition) { + Position newPosition, AsyncCallback callback) { markTracks.get(mark).get(markTracks.get(mark).indexOf(fix)).position = newPosition; } } - private boolean canRemoveMarkFix(MarkDTO mark, GPSFixDTO fix) { - return markPositionService.canRemoveMarkFix( + private void canRemoveMarkFix(MarkDTO mark, GPSFixDTO fix, AsyncCallback callback) { + markPositionService.canRemoveMarkFix( raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier), - mark, fix); + mark, fix, callback); } private static class Pixel extends JavaScriptObject { @@ -420,7 +422,7 @@ public class EditMarkPositionPanel extends AbstractRaceChart implements Componen popup = new PopupPanel(true); popup.setStyleName("EditMarkPositionPopup"); - MenuBar menu = new MenuBar(true); + final MenuBar menu = new MenuBar(true); moveMenuItem = new MenuItem(stringMessages.moveFix(), new ScheduledCommand() { @Override public void execute() { @@ -448,26 +450,41 @@ public class EditMarkPositionPanel extends AbstractRaceChart implements Componen }); moveMenuItem.setTitle(stringMessages.useATouchOptimizedUI()); menu.addItem(moveMenuItem); - final MenuItem delete; - if (canRemoveMarkFix(mark, fix)) { - delete = new MenuItem(stringMessages.deleteFix(), new ScheduledCommand() { - @Override - public void execute() { - removeMarkFix(mark, fix); - popup.hide(); + canRemoveMarkFix(mark, fix, new AsyncCallback() { + @Override + public void onFailure(Throwable caught) { + errorReporter.reportError(stringMessages.errorCommunicatingWithServer()+": "+caught.getMessage(), /* silent */ true); + addDeleteItemAndShowPopup(false); + } + + @Override + public void onSuccess(Boolean result) { + addDeleteItemAndShowPopup(result); + } + + private void addDeleteItemAndShowPopup(boolean enableDelete) { + final MenuItem delete; + if (enableDelete) { + delete = new MenuItem(stringMessages.deleteFix(), new ScheduledCommand() { + @Override + public void execute() { + removeMarkFix(mark, fix); + popup.hide(); + } + }); + } else { + delete = new MenuItem(stringMessages.deleteFix(), new ScheduledCommand() { + @Override + public void execute() { + } + }); + delete.setEnabled(false); + delete.setTitle(stringMessages.theDeletionOfThisFix()); } - }); - } else { - delete = new MenuItem(stringMessages.deleteFix(), new ScheduledCommand() { - @Override - public void execute() { - } - }); - delete.setEnabled(false); - delete.setTitle(stringMessages.theDeletionOfThisFix()); - } - menu.addItem(delete); - popup.setWidget(menu); + menu.addItem(delete); + popup.setWidget(menu); + } + }); } private int getIndexOfFixInPolyline(MarkDTO mark, GPSFixDTO fix) { @@ -569,95 +586,139 @@ public class EditMarkPositionPanel extends AbstractRaceChart implements Componen } } + private void finalizeLoadingData() { + hideLoading(); + onSelectionChange(null); + onResize(); + } + private void loadData(final Date from, final Date to) { if (selectedRaceIdentifier != null && from != null && to != null && marks == null) { setWidget(chart); showLoading(stringMessages.loadingMarkFixes()); - Map> result = new HashMap<>(); - for (MarkTrackDTO track : markPositionService.getMarkTracks( - raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier)).getTracks()) { - result.put(track.mark, track.fixes); - } - marks = new HashMap>(); - raceFromTime = timeRangeWithZoomProvider.getFromTime(); - raceToTime = timeRangeWithZoomProvider.getToTime(); - for (final Map.Entry> fixes : result.entrySet()) { - Date fromTime = raceFromTime; - Date toTime = raceToTime; - PolylineOptions options = PolylineOptions.newInstance(); - if (map != null) { - options.setMap(map); - } - options.setStrokeWeight(1); - options.setVisible(false); - final Polyline polyline = Polyline.newInstance(options); // Line can not be dashed at the moment, because line symbols are not supported - polylines.put(fixes.getKey(), polyline); - SortedMap fixOverlayMap = new TreeMap<>(new Comparator() { - @Override - public int compare(GPSFixDTO o1, GPSFixDTO o2) { - return o1.timepoint.compareTo(o2.timepoint); - } - }); - for (final GPSFixDTO fix : fixes.getValue()) { - final FixOverlay overlay = new FixOverlay(map, 1, fix, FixType.BUOY, fixes.getKey().color, raceMap.getCoordinateSystem(), stringMessages.dragToChangePosition()); - fixOverlayMap.put(fix, overlay); - overlay.setVisible(false); - overlayClickHandlers.add(new OverlayClickHandler(fixes.getKey(), fix, overlay).register()); - if (fromTime.after(fix.timepoint)) { - fromTime = fix.timepoint; - } else if (toTime.before(fix.timepoint)) { - toTime = fix.timepoint; - } - } - marks.put(fixes.getKey(), fixOverlayMap); - updatePolylinePoints(fixes.getKey()); - marksFromToTimes.put(fixes.getKey(), new Pair(fromTime, toTime)); - } - List markList = new ArrayList(); - markList.addAll(marks.keySet()); - markDataProvider.setList(markList); - hideLoading(); - onSelectionChange(null); - onResize(); + markPositionService.getMarkTracks( + raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier), + new AsyncCallback() { + @Override + public void onFailure(Throwable caught) { + finalizeLoadingData(); + errorReporter.reportError(stringMessages.errorCommunicatingWithServer()+": "+caught.getMessage()); + } + + @Override + public void onSuccess(MarkTracksDTO markTracks) { + Map> result = new HashMap<>(); + for (MarkTrackDTO track : markTracks.getTracks()) { + result.put(track.mark, track.fixes); + marks = new HashMap>(); + raceFromTime = timeRangeWithZoomProvider.getFromTime(); + raceToTime = timeRangeWithZoomProvider.getToTime(); + for (final Map.Entry> fixes : result.entrySet()) { + Date fromTime = raceFromTime; + Date toTime = raceToTime; + PolylineOptions options = PolylineOptions.newInstance(); + if (map != null) { + options.setMap(map); + } + options.setStrokeWeight(1); + options.setVisible(false); + final Polyline polyline = Polyline.newInstance(options); // Line can not be dashed at the moment, because line symbols are not supported + polylines.put(fixes.getKey(), polyline); + SortedMap fixOverlayMap = new TreeMap<>(new Comparator() { + @Override + public int compare(GPSFixDTO o1, GPSFixDTO o2) { + return o1.timepoint.compareTo(o2.timepoint); + } + }); + for (final GPSFixDTO fix : fixes.getValue()) { + final FixOverlay overlay = new FixOverlay(map, 1, fix, FixType.BUOY, fixes.getKey().color, raceMap.getCoordinateSystem(), stringMessages.dragToChangePosition()); + fixOverlayMap.put(fix, overlay); + overlay.setVisible(false); + overlayClickHandlers.add(new OverlayClickHandler(fixes.getKey(), fix, overlay).register()); + if (fromTime.after(fix.timepoint)) { + fromTime = fix.timepoint; + } else if (toTime.before(fix.timepoint)) { + toTime = fix.timepoint; + } + } + marks.put(fixes.getKey(), fixOverlayMap); + updatePolylinePoints(fixes.getKey()); + marksFromToTimes.put(fixes.getKey(), new Pair(fromTime, toTime)); + } + List markList = new ArrayList(); + markList.addAll(marks.keySet()); + markDataProvider.setList(markList); + + } + finalizeLoadingData(); + } + }); } } - public void addMarkFix(MarkDTO mark, Date timepoint, Position fixPosition) { - GPSFixDTOWithSpeedWindTackAndLegType fix = new GPSFixDTOWithSpeedWindTackAndLegType(timepoint, fixPosition, null, new WindDTO(), null, null, false); + public void addMarkFix(final MarkDTO mark, final Date timepoint, final Position fixPosition) { + final GPSFixDTOWithSpeedWindTackAndLegType fix = new GPSFixDTOWithSpeedWindTackAndLegType(timepoint, fixPosition, null, new WindDTO(), null, null, false); markPositionService.addMarkFix( raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier), - mark, fix); - FixOverlay overlay = new FixOverlay(map, 1, fix, FixType.BUOY, mark.color, raceMap.getCoordinateSystem(), stringMessages.dragToChangePosition()); - overlayClickHandlers.add(new OverlayClickHandler(mark, fix, overlay).register()); - marks.get(mark).put(fix, overlay); - updatePolylinePoints(mark); - setSeriesPoints(mark); - onResize(); - showNotification(stringMessages.fixSuccessfullyAdded(), NotificationType.SUCCESS); + mark, fix, new AsyncCallback() { + @Override + public void onFailure(Throwable caught) { + errorReporter.reportError(stringMessages.errorCommunicatingWithServer()+": "+caught.getMessage()); + } + + @Override + public void onSuccess(Void result) { + FixOverlay overlay = new FixOverlay(map, 1, fix, FixType.BUOY, mark.color, raceMap.getCoordinateSystem(), stringMessages.dragToChangePosition()); + overlayClickHandlers.add(new OverlayClickHandler(mark, fix, overlay).register()); + marks.get(mark).put(fix, overlay); + updatePolylinePoints(mark); + setSeriesPoints(mark); + onResize(); + showNotification(stringMessages.fixSuccessfullyAdded(), NotificationType.SUCCESS); + } + }); } - private void editMarkFix(MarkDTO mark, GPSFixDTO fix, Position newPosition) { + private void editMarkFix(final MarkDTO mark, final GPSFixDTO fix, final Position newPosition) { markPositionService.editMarkFix( raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier), - mark, fix, newPosition); - fix.position = newPosition; - marks.get(mark).get(fix).setGPSFixDTO(fix); - updatePolylinePoints(mark); - setSeriesPoints(mark); - onResize(); - showNotification(stringMessages.fixPositionSuccessfullyEdited(), NotificationType.SUCCESS); + mark, fix, newPosition, new AsyncCallback() { + @Override + public void onFailure(Throwable caught) { + errorReporter.reportError(stringMessages.errorCommunicatingWithServer()+": "+caught.getMessage()); + } + + @Override + public void onSuccess(Void result) { + fix.position = newPosition; + marks.get(mark).get(fix).setGPSFixDTO(fix); + updatePolylinePoints(mark); + setSeriesPoints(mark); + onResize(); + showNotification(stringMessages.fixPositionSuccessfullyEdited(), NotificationType.SUCCESS); + } + }); } - private void removeMarkFix(MarkDTO mark, GPSFixDTO fix) { + private void removeMarkFix(final MarkDTO mark, final GPSFixDTO fix) { markPositionService.removeMarkFix( raceIdentifierToLeaderboardRaceColumnAndFleetMapper.getLeaderboardNameAndRaceColumnNameAndFleetName(selectedRaceIdentifier), - mark, fix); - FixOverlay overlay = marks.get(mark).remove(fix); - overlay.removeFromMap(); - updatePolylinePoints(mark); - setSeriesPoints(mark); - onResize(); - showNotification(stringMessages.fixSuccessfullyRemoved(), NotificationType.SUCCESS); + mark, fix, new AsyncCallback() { + @Override + public void onFailure(Throwable caught) { + errorReporter.reportError(stringMessages.errorCommunicatingWithServer()+": "+caught.getMessage()); + } + + @Override + public void onSuccess(Void result) { + FixOverlay overlay = marks.get(mark).remove(fix); + overlay.removeFromMap(); + updatePolylinePoints(mark); + setSeriesPoints(mark); + onResize(); + showNotification(stringMessages.fixSuccessfullyRemoved(), NotificationType.SUCCESS); + } + }); } private void updatePolylinePoints(MarkDTO mark) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionService.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionService.java index f7ec039acf3..62b2fba1c07 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionService.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionService.java @@ -2,6 +2,7 @@ package com.sap.sailing.gwt.ui.client.shared.charts; import java.util.List; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.sap.sailing.domain.common.Position; import com.sap.sailing.gwt.ui.client.shared.charts.RaceIdentifierToLeaderboardRaceColumnAndFleetMapper.LeaderboardNameRaceColumnNameAndFleetName; import com.sap.sailing.gwt.ui.shared.GPSFixDTO; @@ -36,7 +37,7 @@ public interface MarkPositionService { // think the fixes have to be thinned out somehow and maybe shown in more detail when zoomed in. The aggregation of // fixes is in my eyes no option, because then you have to define behaviour when moving them. // I had no remaining time to incorporate the thinned out variable in my code. - MarkTracksDTO getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier); + void getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, AsyncCallback callback); /** * The service may decide whether a mark fix can be removed. It may, for example, be impossible to @@ -45,11 +46,11 @@ public interface MarkPositionService { * regatta log is the basis of the service and no tracked race exists yet, mark fixes may be removed * by revoking the device mappings. */ - boolean canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix); + void canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix, AsyncCallback callback); - void removeMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix); + void removeMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix, AsyncCallback callback); - void addMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO newFix); + void addMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO newFix, AsyncCallback callback); - void editMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO oldFix, Position newPosition); + void editMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO oldFix, Position newPosition, AsyncCallback callback); } \ No newline at end of file diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionServiceForSailingService.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionServiceForSailingService.java index 4c2040248d3..40ecbfa968b 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionServiceForSailingService.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/charts/MarkPositionServiceForSailingService.java @@ -1,5 +1,6 @@ package com.sap.sailing.gwt.ui.client.shared.charts; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.sap.sailing.domain.common.Position; import com.sap.sailing.gwt.ui.client.SailingServiceAsync; import com.sap.sailing.gwt.ui.client.shared.charts.RaceIdentifierToLeaderboardRaceColumnAndFleetMapper.LeaderboardNameRaceColumnNameAndFleetName; @@ -15,35 +16,30 @@ public class MarkPositionServiceForSailingService implements MarkPositionService } @Override - public MarkTracksDTO getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier) { - // TODO Auto-generated method stub - return null; + public void getMarkTracks(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, AsyncCallback callback) { + sailingService.getMarkTracks(raceIdentifier.getLeaderboardName(), raceIdentifier.getRaceColumnName(), raceIdentifier.getFleetName(), callback); } @Override - public boolean canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, - GPSFixDTO fix) { - // TODO Auto-generated method stub - return false; + public void canRemoveMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, + GPSFixDTO fix, AsyncCallback callback) { + sailingService.canRemoveMarkFix(raceIdentifier.getLeaderboardName(), raceIdentifier.getRaceColumnName(), raceIdentifier.getFleetName(), mark.getIdAsString(), fix, callback); } @Override - public void removeMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix) { - // TODO Auto-generated method stub - + public void removeMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO fix, AsyncCallback callback) { + sailingService.removeMarkFix(raceIdentifier.getLeaderboardName(), raceIdentifier.getRaceColumnName(), raceIdentifier.getFleetName(), mark.getIdAsString(), fix, callback); } @Override - public void addMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO newFix) { - // TODO Auto-generated method stub - + public void addMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO newFix, AsyncCallback callback) { + sailingService.addMarkFix(raceIdentifier.getLeaderboardName(), raceIdentifier.getRaceColumnName(), raceIdentifier.getFleetName(), mark.getIdAsString(), newFix, callback); } @Override public void editMarkFix(LeaderboardNameRaceColumnNameAndFleetName raceIdentifier, MarkDTO mark, GPSFixDTO oldFix, - Position newPosition) { - // TODO Auto-generated method stub - + Position newPosition, AsyncCallback callback) { + sailingService.editMarkFix(raceIdentifier.getLeaderboardName(), raceIdentifier.getRaceColumnName(), raceIdentifier.getFleetName(), mark.getIdAsString(), oldFix, newPosition, callback); } } 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 9fe24344dbf..0542efa0b5d 100644 --- 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 @@ -288,6 +288,7 @@ import com.sap.sailing.domain.tractracadapter.TracTracConfiguration; import com.sap.sailing.domain.tractracadapter.TracTracConnectionConstants; import com.sap.sailing.gwt.ui.adminconsole.RaceLogSetTrackingTimesDTO; import com.sap.sailing.gwt.ui.client.SailingService; +import com.sap.sailing.gwt.ui.client.shared.charts.MarkPositionService.MarkTracksDTO; import com.sap.sailing.gwt.ui.shared.BulkScoreCorrectionDTO; import com.sap.sailing.gwt.ui.shared.CompactBoatPositionsDTO; import com.sap.sailing.gwt.ui.shared.CompactRaceMapDataDTO; @@ -303,6 +304,7 @@ import com.sap.sailing.gwt.ui.shared.DeviceIdentifierDTO; import com.sap.sailing.gwt.ui.shared.DeviceMappingDTO; import com.sap.sailing.gwt.ui.shared.EventBaseDTO; import com.sap.sailing.gwt.ui.shared.EventDTO; +import com.sap.sailing.gwt.ui.shared.GPSFixDTO; import com.sap.sailing.gwt.ui.shared.GPSFixDTOWithSpeedWindTackAndLegType; import com.sap.sailing.gwt.ui.shared.GateDTO; import com.sap.sailing.gwt.ui.shared.LeaderboardGroupBaseDTO; @@ -6096,4 +6098,38 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S RegattaLog regattaLog = getRegattaLogInternal(leaderboardName); return getDeviceMappings(regattaLog); } + + @Override + public MarkTracksDTO getMarkTracks(String leaderboardName, String raceColumnName, String fleetName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean canRemoveMarkFix(String leaderboardName, String raceColumnName, String fleetName, + String markIdAsString, GPSFixDTO fix) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void removeMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO fix) { + // TODO Auto-generated method stub + + } + + @Override + public void addMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO newFix) { + // TODO Auto-generated method stub + + } + + @Override + public void editMarkFix(String leaderboardName, String raceColumnName, String fleetName, String markIdAsString, + GPSFixDTO oldFix, Position newPosition) { + // TODO Auto-generated method stub + + } }