Merge branch 'permission-vertical' of ssh://trac@sapsailing.com/home/trac/git into permission-vertical

This commit is contained in:
Kai Börnert committed 2019-01-17 10:13:17 +01:00
commit 665d3f6287
15 files changed
+167 -44

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
#!/bin/bash
BUG_ID="$1"
if [ $# -eq 0 ]; then
echo "$0 [-t -r ] <bugid>"
echo ""
echo "-t Disable tests"
echo "-r Build release"
echo
echo "Constructs a Hudson job for the given bugid"
echo "Example: $0 -r 4221"
echo "Builds a Hudson job for bug branch bug4221, linking to the Bugzilla bug and building a release"
exit 2
fi
options='tr'
while getopts $options option
do
case $option in
t) SKIP_TESTS=1;;
b) BUILD_RELEASE=1;;
\?) echo "Invalid option"
exit 4;;
esac
done
CONFIGFILE=$(mktemp mylocalconfigXXXX.xml)
RESPONSE_HEADERS=$(mktemp responseheadersXXXX)
HUDSON_BASE_URL=https://hudson.sapsailing.com
BUGZILLA_BASE=https://bugzilla.sapsailing.com/bugzilla
COPY_TEMPLATE_JOB=CopyTemplate
read -p "Username: " USERNAME
read -s -p "Password: " PASSWORD
echo
COPY_TEMPLATE_CONFIG_URL="$HUDSON_BASE_URL/job/$COPY_TEMPLATE_JOB/config.xml"
curl -s -X GET $COPY_TEMPLATE_CONFIG_URL -u "$USERNAME:$PASSWORD" -o "$CONFIGFILE"
sed -i -e 's|<description>..*</description>|<description>This is the build job for \&lt;a href=\&quot;'$BUGZILLA_BASE'/show_bug.cgi?id='$BUG_ID'\&quot;\&gt;Bug '$BUG_ID'\&lt;/a\&gt;</description>|' -e 's|<disabled>true</disabled>|<disabled>false</disabled>|' "$CONFIGFILE"
if [ "$SKIP_TESTS" = "1" ]; then
sed -i -e 's|<command>\([^<]*\)build *</command>|<command>\1-t build</command>|' "$CONFIGFILE"
fi
if [ "$BUILD_RELEASE" = "1" ]; then
sed -i -e 's|<command>\([^<]*\)</command>|<command>\1 \&\& PATH=/usr/local/bin:${PATH} configuration/buildAndUpdateProduct.sh -n bug'$BUG_ID' -w trac@sapsailing.com -u release</command>|' "$CONFIGFILE"
fi
sed -i -e '/<branches>$/{
N
N
s|<name>[^<]*</name>|<name>bug'$BUG_ID'</name>|
}' "$CONFIGFILE"
curl -D "$RESPONSE_HEADERS" -s -XPOST "$HUDSON_BASE_URL/createItem?name=bug$BUG_ID" -u "$USERNAME:$PASSWORD" --data-binary "@$CONFIGFILE" -H "Content-Type:text/xml" >/dev/null 2>/dev/null
RESPONSE_CODE=$(cat "$RESPONSE_HEADERS" | head -n 1 | cut -d ' ' -f2 )
if [[ "$RESPONSE_CODE" =~ "2.." ]]; then
echo "Find your new, enabled Hudson job at $HUDSON_BASE_URL/job/bug$BUG_ID/"
else
echo "Error. HTTP response code $RESPONSE_CODE. Did the job already exist?"
fi
rm "$CONFIGFILE"
rm "$RESPONSE_HEADERS"
@@ -111,9 +111,10 @@ public interface RaceLogTrackingAdapter {
/**
* Copy the course in the newest {@link RaceLogCourseDesignChangedEvent} in {@code from} race log to the {@code to}
* race logs. The {@link Mark}s and {@link ControlPoint}s are reused and not duplicated.
* @param priority TODO
*/
void copyCourse(RaceLog fromRaceLog, Set<RaceLog> toRaceLogs, SharedDomainFactory baseDomainFactory,
RacingEventService service);
RacingEventService service, int priority);
void copyCompetitors(RaceColumn fromRaceColumn, Fleet fromFleet, Iterable<Pair<RaceColumn, Fleet>> toRaces);
}
@@ -15,6 +15,7 @@ import javax.mail.MessagingException;
import org.osgi.framework.ServiceReference;
import com.sap.sailing.domain.abstractlog.impl.LastEventOfTypeFinder;
import com.sap.sailing.domain.abstractlog.impl.LogEventAuthorImpl;
import com.sap.sailing.domain.abstractlog.race.RaceLog;
import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
import com.sap.sailing.domain.abstractlog.race.analyzing.impl.LastPublishedCourseDesignFinder;
@@ -194,7 +195,7 @@ public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
@Override
public void copyCourse(RaceLog fromRaceLog, Set<RaceLog> toRaceLogs, SharedDomainFactory baseDomainFactory,
RacingEventService service) {
RacingEventService service, int priority) {
CourseBase course = new LastPublishedCourseDesignFinder(fromRaceLog,
/* onlyCoursesWithValidWaypointList */ true).analyze();
final Set<Mark> marks = new HashSet<>();
@@ -214,7 +215,8 @@ public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
int passId = toRaceLog.getCurrentPassId();
RaceLogEvent newCourseEvent = new RaceLogCourseDesignChangedEventImpl(now,
service.getServerAuthor(), passId, newCourse, CourseDesignerMode.ADMIN_CONSOLE);
new LogEventAuthorImpl(service.getServerAuthor().getName(), priority),
passId, newCourse, CourseDesignerMode.ADMIN_CONSOLE);
toRaceLog.add(newCourseEvent);
}
@@ -6,6 +6,7 @@ import java.util.Set;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.view.client.SelectionChangeEvent;
import com.google.gwt.view.client.SelectionChangeEvent.Handler;
@@ -15,6 +16,7 @@ import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sse.common.Distance;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
import com.sap.sse.gwt.client.controls.IntegerBox;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCompetitorCopyOperation> {
@@ -22,6 +24,8 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
racesTable;
private final CheckBox courseCheckBox;
private final CheckBox competitorCheckBox;
private final IntegerBox priorityBox;
private final StringMessages stringMessages;
private SailingServiceAsync sailingService;
private ErrorReporter errorReporter;
@@ -36,9 +40,13 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
if (valueToValidate.getRaceLogsToCopyTo().isEmpty()) {
return stringMessages.selectAtLeastOne();
}
if (valueToValidate.getPriority() == null || valueToValidate.getPriority() < 0) {
return stringMessages.priorityMustBeANonNegativeNumber();
}
return null;
}
}, true, dialogCallback);
this.stringMessages = stringMessages;
racesTable = new RaceTableWrapper<RefreshableMultiSelectionModel<RaceColumnDTOAndFleetDTOWithNameBasedEquality>>(
sailingService, stringMessages, errorReporter, /* multiSelection */ true);
racesTable.setSelectedLeaderboardName(leaderboardName);
@@ -49,24 +57,29 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
validateAndUpdate();
}
});
courseCheckBox = new CheckBox(stringMessages.copyCourse());
courseCheckBox = createCheckbox(stringMessages.copyCourse());
courseCheckBox.setValue(true);
competitorCheckBox = new CheckBox(stringMessages.copyCompetitors());
competitorCheckBox = createCheckbox(stringMessages.copyCompetitors());
competitorCheckBox.setValue(false); // competitors are usually registered on the regatta
priorityBox = createIntegerBox(/* default priority */ 1, /* visibleLength */ 1);
this.sailingService = sailingService;
this.errorReporter = errorReporter;
}
@Override
protected Widget getAdditionalWidget() {
FlowPanel mainPanel = new FlowPanel();
final FlowPanel mainPanel = new FlowPanel();
HorizontalPanel checkBoxPanel = new HorizontalPanel();
checkBoxPanel.add(courseCheckBox);
checkBoxPanel.add(competitorCheckBox);
mainPanel.add(checkBoxPanel);
mainPanel.add(racesTable);
final HorizontalPanel hp = new HorizontalPanel();
hp.setSpacing(3);
mainPanel.add(hp);
hp.add(new Label(stringMessages.authorPriority()));
hp.add(priorityBox);
return mainPanel;
}
@@ -74,7 +87,8 @@ public class CopyCourseAndCompetitorsDialog extends DataEntryDialog<CourseAndCom
protected CourseAndCompetitorCopyOperation getResult() {
Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> racesToCopyTo = racesTable
.getSelectionModel().getSelectedSet();
return new CourseAndCompetitorCopyOperation(racesToCopyTo, courseCheckBox.getValue(), competitorCheckBox.getValue(), sailingService, errorReporter);
return new CourseAndCompetitorCopyOperation(racesToCopyTo, courseCheckBox.getValue(), competitorCheckBox.getValue(),
priorityBox.getValue(), sailingService, errorReporter);
}
}
@@ -11,20 +11,22 @@ import com.sap.sse.gwt.client.ErrorReporter;
public class CourseAndCompetitorCopyOperation {
Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> raceLogsToCopyTo;
boolean copyCourse;
boolean copyCompetitors;
private ErrorReporter errorReporter;
private SailingServiceAsync sailingService;
final Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> raceLogsToCopyTo;
final boolean copyCourse;
final boolean copyCompetitors;
final Integer priority;
final private ErrorReporter errorReporter;
final private SailingServiceAsync sailingService;
public CourseAndCompetitorCopyOperation(
Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> racesToCopyTo,
boolean copyCourse, boolean copyCompetitors, SailingServiceAsync sailingService, ErrorReporter errorReporter) {
boolean copyCourse, boolean copyCompetitors, Integer priority, SailingServiceAsync sailingService, ErrorReporter errorReporter) {
this.raceLogsToCopyTo = racesToCopyTo;
this.copyCourse = copyCourse;
this.copyCompetitors = copyCompetitors;
this.sailingService = sailingService;
this.errorReporter = errorReporter;
this.priority = priority;
}
public Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> getRaceLogsToCopyTo() {
@@ -39,8 +41,8 @@ public class CourseAndCompetitorCopyOperation {
return copyCompetitors;
}
public void perform(Triple<String, String, String> fromTriple) {
public Integer getPriority() {
return priority;
}
private Set<Triple<String, String, String>> convertToRacelogs(String leaderboardName) {
@@ -63,7 +65,7 @@ public class CourseAndCompetitorCopyOperation {
Set<Triple<String, String, String>> toRacelogs = convertToRacelogs(leaderboardName);
if (copyCourse) {
sailingService.copyCourseToOtherRaceLogs(fromTriple, toRacelogs, new AsyncCallback<Void>() {
sailingService.copyCourseToOtherRaceLogs(fromTriple, toRacelogs, getPriority(), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
errorReporter.reportError("Could not copy course and competitors: " + caught.getMessage());
@@ -6,6 +6,8 @@ import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.domain.common.PassingInstruction;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
@@ -13,25 +15,55 @@ import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.shared.ControlPointDTO;
import com.sap.sse.common.Util.Pair;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.controls.IntegerBox;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class RaceLogTrackingCourseDefinitionDialog extends
DataEntryDialog<List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>>> {
DataEntryDialog<RaceLogTrackingCourseDefinitionDialog.Result> {
private CourseManagementWidget courseManagementWidget;
private Button refreshButton;
private final CourseManagementWidget courseManagementWidget;
private final Button refreshButton;
private final IntegerBox priorityBox;
private final StringMessages stringMessages;
public static class Result {
private final List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>> waypoints;
private final Integer priority;
public Result(List<Pair<ControlPointDTO, PassingInstruction>> waypoints, Integer priority) {
super();
this.waypoints = waypoints;
this.priority = priority;
}
public List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>> getWaypoints() {
return waypoints;
}
public Integer getPriority() {
return priority;
}
}
public RaceLogTrackingCourseDefinitionDialog(final SailingServiceAsync sailingService,
final StringMessages stringMessages, final ErrorReporter errorReporter, final String leaderboardName,
final String raceColumnName, final String fleetName,
DialogCallback<List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>>> callback) {
super(stringMessages.defineCourse(), null, stringMessages.save(), stringMessages.cancel(), /* validator */null,
DialogCallback<Result> callback) {
super(stringMessages.defineCourse(), null, stringMessages.save(), stringMessages.cancel(),
new Validator<Result>() {
@Override
public String getErrorMessage(Result valueToValidate) {
final String errorMessage;
if (valueToValidate.getPriority() == null || valueToValidate.getPriority() < 0) {
errorMessage = stringMessages.priorityMustBeANonNegativeNumber();
} else {
errorMessage = null;
}
return errorMessage;
}
},
callback);
this.stringMessages = stringMessages;
courseManagementWidget = new RaceLogCourseManagementWidget(sailingService, errorReporter, stringMessages,
leaderboardName, raceColumnName, fleetName);
priorityBox = createIntegerBox(/* default priority: race officer */ 1, /* visibleLength */ 1);
refreshButton = new Button(stringMessages.refresh());
refreshButton.addClickHandler(new ClickHandler() {
@Override
@@ -39,7 +71,6 @@ public class RaceLogTrackingCourseDefinitionDialog extends
courseManagementWidget.refresh();
}
});
courseManagementWidget.refresh();
}
@@ -48,10 +79,15 @@ public class RaceLogTrackingCourseDefinitionDialog extends
FlowPanel panel = new FlowPanel();
panel.add(refreshButton);
panel.add(courseManagementWidget);
HorizontalPanel hp = new HorizontalPanel();
panel.add(hp);
hp.setSpacing(3);
hp.add(new Label(stringMessages.authorPriority()));
hp.add(priorityBox);
return panel;
}
@Override
protected List<Pair<ControlPointDTO, PassingInstruction>> getResult() {
return courseManagementWidget.createWaypointPairs();
protected Result getResult() {
return new Result(courseManagementWidget.createWaypointPairs(), priorityBox.getValue());
}
}
@@ -33,7 +33,6 @@ import com.google.gwt.view.client.SelectionChangeEvent;
import com.google.gwt.view.client.SelectionChangeEvent.Handler;
import com.sap.sailing.domain.common.CourseDesignerMode;
import com.sap.sailing.domain.common.LeaderboardNameConstants;
import com.sap.sailing.domain.common.PassingInstruction;
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
import com.sap.sailing.domain.common.RegattaIdentifier;
import com.sap.sailing.domain.common.RegattaName;
@@ -52,7 +51,6 @@ import com.sap.sailing.gwt.ui.client.RegattaRefresher;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
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.DeviceConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.RaceLogSetFinishingAndFinishTimeDTO;
@@ -361,15 +359,15 @@ public class SmartphoneTrackingEventManagementPanel
raceColumnDTOAndFleetDTO);
} else if (RaceLogTrackingEventManagementRaceImagesBarCell.ACTION_DEFINE_COURSE.equals(value)) {
new RaceLogTrackingCourseDefinitionDialog(sailingService, stringMessages, errorReporter, leaderboardName, raceColumnName,
fleetName, new DialogCallback<List<com.sap.sse.common.Util.Pair<ControlPointDTO,PassingInstruction>>>() {
fleetName, new DialogCallback<RaceLogTrackingCourseDefinitionDialog.Result>() {
@Override
public void cancel() {
}
@Override
public void ok(List<Pair<ControlPointDTO, PassingInstruction>> waypointPairs) {
sailingService.addCourseDefinitionToRaceLog(leaderboardName, raceColumnName, fleetName, waypointPairs,
new AsyncCallback<Void>() {
public void ok(RaceLogTrackingCourseDefinitionDialog.Result waypointPairs) {
sailingService.addCourseDefinitionToRaceLog(leaderboardName, raceColumnName, fleetName, waypointPairs.getWaypoints(),
waypointPairs.getPriority(), new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
loadAndRefreshLeaderboard(leaderboardName);
@@ -580,9 +580,10 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
/**
* Adds the course definition to the racelog, while trying to reuse existing marks, controlpoints and waypoints
* from the previous course definition in the racelog.
* @param priority TODO
* @throws NotFoundException
*/
void addCourseDefinitionToRaceLog(String leaderboardName, String raceColumnName, String fleetName, List<Util.Pair<ControlPointDTO, PassingInstruction>> course) throws NotFoundException;
void addCourseDefinitionToRaceLog(String leaderboardName, String raceColumnName, String fleetName, List<Util.Pair<ControlPointDTO, PassingInstruction>> course, int priority) throws NotFoundException;
/**
* Adds public tag as {@link RaceLogTagEvent} to {@link RaceLog} and private tag to
@@ -813,12 +814,13 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
Set<Triple<String, String, String>> toTriples) throws NotFoundException;
/**
* @param priority TODO
* @param raceLogFrom identifies the race log to copy from by its leaderboard name, race column name and fleet name
* @param raceLogsTo identifies the race log to copy from by their leaderboard name, race column name and fleet name
* @throws NotFoundException
*/
void copyCourseToOtherRaceLogs(Triple<String, String, String> fromTriple,
Set<Triple<String, String, String>> toTriples) throws NotFoundException;
Set<Triple<String, String, String>> toTriples, int priority) throws NotFoundException;
/**
* Get the competitors registered for a certain race. This automatically checks, whether competitors are registered
@@ -752,7 +752,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
void getCompetitorRegistrationsForRace(String leaderboardName, String raceColumnName, String fleetName, AsyncCallback<Collection<CompetitorAndBoatDTO>> callback);
void addCourseDefinitionToRaceLog(String leaderboardName, String raceColumnName, String fleetName,
List<Util.Pair<ControlPointDTO, PassingInstruction>> course, AsyncCallback<Void> callback);
List<Util.Pair<ControlPointDTO, PassingInstruction>> course, int priority, AsyncCallback<Void> callback);
void addTag(String leaderboardName, String raceColumnName, String fleetName, String tag, String comment,
String imageURL, String resizedImageURL, boolean visibleForPublic, TimePoint raceTimepoint,
@@ -878,7 +878,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
Set<Triple<String, String, String>> toTriples, AsyncCallback<Void> callback);
void copyCourseToOtherRaceLogs(Triple<String, String, String> fromTriple,
Set<Triple<String, String, String>> toTriples, AsyncCallback<Void> callback);
Set<Triple<String, String, String>> toTriples, int priority, AsyncCallback<Void> callback);
void addMarkToRegattaLog(String leaderboardName, MarkDTO mark, AsyncCallback<Void> asyncCallback);
@@ -2215,6 +2215,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
String sailorProfileRemoveMessage();
String showInDataMining();
String confirmDeletion();
String priorityMustBeANonNegativeNumber();
String selfServiceServer();
String publicServer();
String updatedServerSetupError();
@@ -2214,6 +2214,7 @@ sailorProfileRemoveMessage=Are you sure you want to remove this Sailor Profile?
moreLoginInformationSectionSailorProfilesDescription=After logging in, you can now find a new area under your user profile, which is called 'Sailor Profiles'. You can add some competitors to such a Sailor Profile and get more insights about these competitors. In a Sailor Profile, you can see all the events your favorite competitors participated in and compare their placements to each others. Additionally, you get an overview about the most important statistics, like the maximum speed or the average distance to the start line with direct links to the Race Map to see the exact point in time, where for example the fastest competitor reached his record. For aggregative statistics like the average distance to startline at racestart, you can click on the arrow and are forwarded to Data Mining where you can drill down on the average values.
moreLoginInformationSectionSailorProfilesHeading=Sailor Profiles
confirmDeletion=Confirm Deletion
priorityMustBeANonNegativeNumber=Priority must be a non-negative integer number
selfServiceServer=Server has Self-Service
publicServer=Server is public
updatedServerSetupError=Could not update Server Setup
@@ -2209,6 +2209,7 @@ sailorProfileRemoveMessage=Sicher, dass das Seglerprofil gelöscht werden soll?
moreLoginInformationSectionSailorProfilesDescription=Nach dem Login können Sie nun in ihrem Userprofil einen neuen Bereich namens 'Seglerprofile' finden. Dort können Sie ein solches Seglerprofil anlegen, um detailliertere Informationen zum ausgewählten Team zu erhalten. In einem Seglerprofil können Sie alle Events ihrer Lieblingsteams verfolgen und deren Platzierungen direkt miteinander vergleichen. Außerdem erhalten Sie eine Übersicht über die wichtigsten Statistiken, wie die Maximalgeschwindigkeit oder die durchschnittliche Distanz zur Startlinie am Rennstart. Von hier aus gibt es auch direkte Absprungpunkte zu den für die individuelle Statistik relevanten Orten in Sailing Analytics. So können Sie etwa direkt von der Maximalgeschwindigkeit in die Race Map springen, wo dann das Rennen zu dem Zeitpunkt der Maximalgeschwindigkeit startet. Von der durchschnittlichen Distanz zur Startlinie können Sie dagegen gleich ins Data Mining wechseln, wo Sie dann einen Drill Down der Durchschnittswerte sehen.
moreLoginInformationSectionSailorProfilesHeading=Seglerprofile
confirmDeletion=Löschen bestätigen
priorityMustBeANonNegativeNumber=Priorität muss eine nicht-negative ganze Zahl sein
selfServiceServer=Self-Service Server
publicServer=Server ist öffentlich
updatedServerSetupError=Konnte Server Konfiguration nicht anpassen
@@ -6634,7 +6634,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
@Override
public void addCourseDefinitionToRaceLog(String leaderboardName, String raceColumnName, String fleetName,
List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>> courseDTO) throws NotFoundException {
List<com.sap.sse.common.Util.Pair<ControlPointDTO, PassingInstruction>> courseDTO, int priority) throws NotFoundException {
RaceLog raceLog = getRaceLog(leaderboardName, raceColumnName, fleetName);
String courseName = "Course of " + raceColumnName;
if (!LeaderboardNameConstants.DEFAULT_FLEET_NAME.equals(fleetName)) {
@@ -6657,8 +6657,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
throw new RuntimeException(e);
}
RaceLogEvent event = new RaceLogCourseDesignChangedEventImpl(MillisecondsTimePoint.now(),
// TODO bug 4853: introduce priority as a parameter
new LogEventAuthorImpl(getService().getServerAuthor().getName(), /* priority */ 1),
new LogEventAuthorImpl(getService().getServerAuthor().getName(), priority),
raceLog.getCurrentPassId(), course, CourseDesignerMode.ADMIN_CONSOLE);
raceLog.add(event);
}
@@ -6734,13 +6733,13 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
@Override
public void copyCourseToOtherRaceLogs(com.sap.sse.common.Util.Triple<String, String, String> fromTriple,
Set<com.sap.sse.common.Util.Triple<String, String, String>> toTriples) throws NotFoundException {
Set<com.sap.sse.common.Util.Triple<String, String, String>> toTriples, int priority) throws NotFoundException {
RaceLog fromRaceLog = getRaceLog(fromTriple);
Set<RaceLog> toRaceLogs = new HashSet<>();
for (com.sap.sse.common.Util.Triple<String, String, String> toTriple : toTriples) {
toRaceLogs.add(getRaceLog(toTriple));
}
getRaceLogTrackingAdapter().copyCourse(fromRaceLog, toRaceLogs, baseDomainFactory, getService());
getRaceLogTrackingAdapter().copyCourse(fromRaceLog, toRaceLogs, baseDomainFactory, getService(), priority);
}
@Override
@@ -135,7 +135,7 @@ public class TaggingServiceTest {
assertSame(securityService.getSecurityManager(), ThreadContext.getSecurityManager());
assertSame(subject, SecurityUtils.getSubject());
assertEquals(username, subject.getPrincipal());
securityService.addPermissionForUser(username, editLeaderboardPermission);
securityService.addPermissionForUser(username, readAndEditLeaderboardPermission);
securityService.unsetPreference(username,
serializer.generateUniqueKey(leaderboardName, raceColumnName, fleetName));
final RaceLog raceLog = racingService.getRaceLog(leaderboardName, raceColumnName, fleetName);
@@ -21,6 +21,14 @@
<div class="mainContent">
<h2 class="releaseHeadline">Release Notes - Administration Console</h2>
<div class="innerContent">
<h2 class="articleSubheadline">January 2019</h2>
<ul class="bulletList">
<li>Allow entering a priority for courses managed in the AdminConsole.
The new default priority now is 1. It used to be 0 which caused problems
because the Race Manager app's highest (logically) priority is 1 which
never took priority over the AdminConsole-provided prio-0 events.</li>
</ul>
<h2 class="articleSubheadline">October 2018</h2>
<ul class="bulletList">
<li>Added progress indicator to device mappings panel for smartphone tracking.</li>