Merge branch 'master' into bug4300

This commit is contained in:
Axel Uhl committed 2017-09-25 19:24:24 +02:00
commit b5ba5ff3a7
22 files changed
+112 -227

No files matched your search

@@ -14,7 +14,6 @@ import com.sap.sailing.domain.base.BoatClass;
import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.base.CourseArea;
import com.sap.sailing.domain.base.CourseBase;
import com.sap.sailing.domain.base.EventFetcher;
import com.sap.sailing.domain.base.Leg;
import com.sap.sailing.domain.base.Mark;
import com.sap.sailing.domain.base.RaceColumn;
@@ -476,10 +475,6 @@ public class MockedTrackedRace implements DynamicTrackedRace {
public void removeListener(RegattaLikeListener listener) {
}
@Override
public void adjustEventToRegattaAssociation(EventFetcher eventFetcher) {
}
@Override
public RaceExecutionOrderProvider getRaceExecutionOrderProvider() {
return null;
@@ -13,11 +13,6 @@ import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
*
*/
public interface Event extends EventBase {
Iterable<Regatta> getRegattas();
void addRegatta(Regatta regatta);
void removeRegatta(Regatta regatta);
/**
* For events, the ID is always a UUID.
@@ -1,5 +0,0 @@
package com.sap.sailing.domain.base;
public interface EventFetcher {
Iterable<Event> getAllEvents();
}
@@ -208,14 +208,6 @@ public interface Regatta extends NamedWithID, IsRegattaLike, HasRaceColumnsAndRe
*/
void setUseStartTimeInference(boolean useStartTimeInference);
/**
* {@link Event} manages an association to its {@link Event#getRegattas() regattas}. When something on the
* regatta changes (in particular, the implicit link to an event through an event's {@link CourseArea} that
* is assigned as this regatta's {@link #setDefaultCourseArea(CourseArea) default course area}), the
* opposite end of the association needs to be maintained on the event's side.
*/
void adjustEventToRegattaAssociation(EventFetcher eventFetcher);
RaceExecutionOrderProvider getRaceExecutionOrderProvider();
default RankingMetrics getRankingMetricType() {
@@ -3,13 +3,10 @@ package com.sap.sailing.domain.base.impl;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import com.sap.sailing.domain.base.Event;
import com.sap.sailing.domain.base.Regatta;
import com.sap.sailing.domain.base.Venue;
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
import com.sap.sse.common.TimePoint;
@@ -17,24 +14,21 @@ import com.sap.sse.common.Util;
public class EventImpl extends EventBaseImpl implements Event {
private static final long serialVersionUID = 855135446595485715L;
private final Set<Regatta> regattas;
private ConcurrentLinkedQueue<LeaderboardGroup> leaderboardGroups;
public EventImpl(String name, TimePoint startDate, TimePoint endDate, String venueName, boolean isPublic, UUID id) {
this(name, startDate, endDate, new VenueImpl(venueName), isPublic, id);
}
/**
* @param venue must not be <code>null</code>
*/
public EventImpl(String name, TimePoint startDate, TimePoint endDate, Venue venue, boolean isPublic, UUID id) {
super(name, startDate, endDate, venue, isPublic, id);
this.regattas = new HashSet<Regatta>();
this.leaderboardGroups = new ConcurrentLinkedQueue<>();
}
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
ois.defaultReadObject();
if (leaderboardGroups == null) {
@@ -42,21 +36,6 @@ public class EventImpl extends EventBaseImpl implements Event {
}
}
@Override
public Iterable<Regatta> getRegattas() {
return Collections.unmodifiableSet(regattas);
}
@Override
public void addRegatta(Regatta regatta) {
regattas.add(regatta);
}
@Override
public void removeRegatta(Regatta regatta) {
regattas.remove(regatta);
}
public String toString() {
return getId() + " " + getName() + " " + getVenue().getName() + " " + isPublic();
}
@@ -31,8 +31,6 @@ import com.sap.sailing.domain.abstractlog.shared.analyzing.CompetitorsInLogAnaly
import com.sap.sailing.domain.base.BoatClass;
import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.base.CourseArea;
import com.sap.sailing.domain.base.Event;
import com.sap.sailing.domain.base.EventFetcher;
import com.sap.sailing.domain.base.Fleet;
import com.sap.sailing.domain.base.RaceColumn;
import com.sap.sailing.domain.base.RaceColumnInSeries;
@@ -740,19 +738,6 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
return regattaLikeHelper.getTimeOnDistanceAllowancePerNauticalMile(competitor);
}
public void adjustEventToRegattaAssociation(EventFetcher eventFetcher) {
CourseArea defaultCourseArea = getDefaultCourseArea();
for (Event event : eventFetcher.getAllEvents()) {
event.removeRegatta(this);
for (CourseArea courseArea : event.getVenue().getCourseAreas()) {
if (defaultCourseArea != null && courseArea.getId().equals(defaultCourseArea.getId())) {
event.addRegatta(this);
}
}
}
}
@Override
public RaceExecutionOrderProvider getRaceExecutionOrderProvider() {
return raceExecutionOrderCache;
@@ -870,4 +855,5 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
CompetitorDeregistrator<RegattaLog, RegattaLogEvent, RegattaLogEventVisitor> deregisterer = new CompetitorDeregistrator<>(regattaLog, competitors, regattaLogEventAuthorForRegatta);
deregisterer.deregister(deregisterer.analyze());
}
}
@@ -48,13 +48,26 @@ public class EventListYearDTO implements IsSerializable {
protected void addEvent(EventListEventDTO event) {
eventCount += event.getEventSeries() == null ? 1 : event.getEventSeries().getEventsCount();
for (int i = 0; i < events.size(); i++) {
if (events.get(i).getStartDate().compareTo(event.getStartDate()) < 0) {
if (isEventBeforeOtherInList(event, events.get(i))) {
events.add(i, event);
return;
}
}
events.add(event);
}
private boolean isEventBeforeOtherInList(EventListEventDTO eventTocheck, EventListEventDTO referenceEvent) {
// Currently running events should always be the first in the list
// Big events (e.g. Kieler Woche) can start before smaller events but end after them.
// After the smaller event ended, the big event should stay at the beginning of the list.
if (eventTocheck.isRunning() && !referenceEvent.isRunning()) {
return true;
}
if (!eventTocheck.isRunning() && referenceEvent.isRunning()) {
return false;
}
return referenceEvent.getStartDate().before(eventTocheck.getStartDate());
}
@GwtIncompatible
protected void addStatistics(Statistics statistics) {
@@ -4,6 +4,20 @@
<div id="mainContent">
<h4 class="articleHeadline">What's New - SAP Sailing Analytics</h4>
<div class="innerContent">
<h5 class="articleSubheadline">September 2017</h5>
<ul class="bulletList">
<li>The system will now detect "anniversary races" and show those on the start page.
Anniversary races are detected based on the total number of tracked races known (races having GPS data and a valid start date).
Anniversary types currently known are round quarters like 10'000, 25'000, and 50'000 as well as numbers where all digits are the same like 11'111 or 22'222.
Some time before such a milestone is reached, a countdown is shown on the start page. When an anniversary is reached, the determined race is shown at the same place.
</li>
<li>Users that aren't authenticated will now see a message near the login icon in the page header.
This message gently hints about additional functionality being available for authenticated users.
This message lets you show details the additional functionality being available for authenticated users only.
When either logging in, showing details or dismissing this message, the message will disappear for some days until it reappears.
</li>
</ul>
<h5 class="articleSubheadline">August 2017</h5>
<ul class="bulletList">
<li>In the list of past events, you can now find some statistics for the current and past years.
@@ -0,0 +1,42 @@
package com.sap.sailing.gwt.home.shared.partials.anniversary;
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.LocalizableResource.DefaultLocale;
import com.google.gwt.i18n.client.Messages;
@DefaultLocale("en")
/**
* This are legal messages required for Anniversaries, the reason for a separate interface is, that they should not be
* translated by the usual process, to prevent changed meanings of the legal implications
*/
public interface AnniversaryLegalMessages extends Messages{
public static final AnniversaryLegalMessages INSTANCE = GWT.create(AnniversaryLegalMessages.class);
String anniversaryLegalNoticeHeadline(int anniversary);
String anniversaryLegalNoticeSectionOverallCompetitionRulesAndPrizesHeadline();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraphTitle();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph1();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph2();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph3();
String anniversaryLegalNoticeSectionRequirementsHeadline();
String anniversaryLegalNoticeSectionRequirementsListItem1();
String anniversaryLegalNoticeSectionRequirementsListItem2();
String anniversaryLegalNoticeSectionRequirementsListItem3();
String anniversaryLegalNoticeSectionContestParagraphTitle();
String anniversaryLegalNoticeSectionContestParagraph(int anniversary);
String anniversaryLegalNoticeSectionCommunicationParagraphTitle();
String anniversaryLegalNoticeSectionCommunicationParagraph();
String anniversaryLegalNoticeSectionCharitablyPurposeParagraphTitle();
String anniversaryLegalNoticeSectionCharitablyPurposeParagraph();
String anniversaryLegalNoticeSectionPrizesParagraphTitle();
String anniversaryLegalNoticeSectionPrizesParagraph(int anniversary);
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraphTitle();
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph1();
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph2();
String anniversaryLegalNoticeSectionDisclaimerSectionParagraphTitle();
String anniversaryLegalNoticeSectionDisclaimerSectionParagraph();
String anniversaryLegalNoticeSectionOtherParagraphTitle();
String anniversaryLegalNoticeSectionOtherParagraph1();
String anniversaryLegalNoticeSectionOtherParagraph2();
}
@@ -0,0 +1,26 @@
anniversaryLegalNoticeHeadline=The {0,number,#,###}th race
anniversaryLegalNoticeSectionOverallCompetitionRulesAndPrizesHeadline=General contest rules and prizes
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraphTitle=Organization and participation
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph1=No purchase is necessary to participate in or win this contest. All those who organize a race are eligible to participate. This contest is not being sponsored, supported, or managed in any way by Facebook, Twitter, or any other social network and is not to be associated with any such entity.
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph2=Employees of the German federal government, the government of any U.S. federal state or territory, or any other foreign government are not eligible to participate.
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph3=The organizer of this contest is SAP SE, a German company whose headquarters is located at Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany. To be eligible for the contest, a race must be publicly accessible at www.sapsailing.com.
anniversaryLegalNoticeSectionRequirementsHeadline=Prerequisites
anniversaryLegalNoticeSectionRequirementsListItem1=SAP Sailing Analytics must be responsible for the live data analysis of each race.
anniversaryLegalNoticeSectionRequirementsListItem2=To win the prize, a race must enter into the regatta evaluation and be finished.
anniversaryLegalNoticeSectionRequirementsListItem3=The \u20AC10,000 are to be used solely for charitable purposes.
anniversaryLegalNoticeSectionContestParagraphTitle=Contest
anniversaryLegalNoticeSectionContestParagraph=The contest will run until the {0,number,#,###}th race has begun.
anniversaryLegalNoticeSectionCommunicationParagraphTitle=Notification
anniversaryLegalNoticeSectionCommunicationParagraph=The winner will be automatically announced at www.sapsailing.com.
anniversaryLegalNoticeSectionCharitablyPurposeParagraphTitle=Charitable purposes
anniversaryLegalNoticeSectionCharitablyPurposeParagraph=The charitable purpose for which the prize is to be used must fulfill certain requirements. The winner must invest the prize in promoting sports, education, literature, the public good, health and safety, the fight against poverty, or similar aims without attempting to gain any private benefit, profit, or political influence.
anniversaryLegalNoticeSectionPrizesParagraphTitle=Prizes
anniversaryLegalNoticeSectionPrizesParagraph=The organizer of the {0,number,#,###}th race will receive the prize money.
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraphTitle=Personal data and image rights
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph1=By participating in the contest, each organizer grants permission (and warrants to have received corresponding consent from its members) to the organizer, its subsidiaries and affiliated businesses, respective licensees, successors, and assignees to use the contest winner''s name, likeness, and entry for purposes of advertising and trade without further notice, consent, or compensation with regard to the contest and the event at which the contest took place, unless prohibited by law. This includes printing, publishing, broadcasting, distributing, and using the contest winner''s name, portrait, picture, voice, likeness, or image (or statements from associated members about the contest) for promotional purposes in any media now known or hereafter arising anywhere in the world.
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph2=SAP SE has set the total sum at \u20AC10,000. Event organizers must propose a charitable purpose for which they plan to use the prize to SAP SE. SAP SE reserves the right to approve these proposals or reject them should they not be deemed charitable.
anniversaryLegalNoticeSectionDisclaimerSectionParagraphTitle=Disclaimer
anniversaryLegalNoticeSectionDisclaimerSectionParagraph=SAP will assume no responsibility or liability for incomplete, inaccurate, or misdirected entries.
anniversaryLegalNoticeSectionOtherParagraphTitle=Additional information
anniversaryLegalNoticeSectionOtherParagraph1=The winner will be responsible for the taxes and/or any additional costs or fees accrued in connection with winning and using the prize in question. SAP may exclude any individual who disrupts the registration process, interferes with the operation of the contest website, or violates the contest rules in any other way. SAP also reserves the right to interrupt, end, or modify the contest or the conferral of the prize if either cannot be completed as planned due to computer viruses, bugs, manipulation, unauthorized access, technical defects, or any other circumstances beyond its control.
anniversaryLegalNoticeSectionOtherParagraph2=By taking part in the contest, you acknowledge your consent to the terms of participation.
@@ -5,7 +5,6 @@ import com.google.gwt.dom.client.Element;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.client.StringMessages;
class AnniversaryLegalNoticeBubbleContent extends Widget {
@@ -15,7 +14,7 @@ class AnniversaryLegalNoticeBubbleContent extends Widget {
}
@UiField
StringMessages i18n;
AnniversaryLegalMessages i18n;
@UiField
Element legalNoticeHeadline, legalNoticeSectionContest, legalNoticeSectionPrizes;
@@ -1,6 +1,6 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder">
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<ui:with field="i18n" type="com.sap.sailing.gwt.home.shared.partials.anniversary.AnniversaryLegalMessages" />
<ui:style>
.container {
padding: 0 1em !important;
@@ -335,24 +335,6 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
}
};
SafeHtmlCell associatedRegattasCell = new SafeHtmlCell();
Column<EventDTO, SafeHtml> associatedRegattasColumn = new Column<EventDTO, SafeHtml>(associatedRegattasCell) {
@Override
public SafeHtml getValue(EventDTO event) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
int regattaCount = event.regattas.size();
int i = 1;
for (RegattaDTO regatta : event.regattas) {
builder.appendEscaped(regatta.getName());
if (i < regattaCount) {
builder.appendHtmlConstant("<br>");
}
i++;
}
return builder.toSafeHtml();
}
};
ImagesBarColumn<EventDTO, EventConfigImagesBarCell> eventActionColumn = new ImagesBarColumn<EventDTO, EventConfigImagesBarCell>(
new EventConfigImagesBarCell(stringMessages));
eventActionColumn.setFieldUpdater(new FieldUpdater<EventDTO, String>() {
@@ -384,7 +366,6 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
table.addColumn(leaderboardGroupsColumn, stringMessages.leaderboardGroups());
table.addColumn(imagesColumn, stringMessages.images());
table.addColumn(videosColumn, stringMessages.videos());
table.addColumn(associatedRegattasColumn, stringMessages.regattas());
table.addColumn(eventActionColumn, stringMessages.actions());
table.setSelectionModel(eventSelectionCheckboxColumn.getSelectionModel(), eventSelectionCheckboxColumn.getSelectionManager());
@@ -193,8 +193,6 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
List<StrippedLeaderboardDTO> getLeaderboards();
List<StrippedLeaderboardDTO> getLeaderboardsByEvent(EventDTO event);
StrippedLeaderboardDTO updateLeaderboard(String leaderboardName, String newLeaderboardName, String newLeaderboardDisplayName, int[] newDiscardingThreasholds, UUID newCourseAreaId);
StrippedLeaderboardDTO createFlexibleLeaderboard(String leaderboardName, String leaderboardDisplayName, int[] discardThresholds, ScoringSchemeType scoringSchemeType, UUID courseAreaId);
@@ -638,8 +638,6 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
void getEventById(UUID id, boolean withStatisticalData, AsyncCallback<EventDTO> callback);
void getLeaderboardsByEvent(EventDTO event, AsyncCallback<List<StrippedLeaderboardDTO>> callback);
/**
* @return {@code true} if the race was not yet denoted for race log tracking and now has successfully been denoted
* so
@@ -1901,31 +1901,4 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
String anniversaryAnnouncementTeaser(int anniversary);
String anniversaryAnnouncementDescription(String raceDisplayName);
String anniversaryRaceLinkText();
String anniversaryLegalNoticeHeadline(int anniversary);
String anniversaryLegalNoticeSectionOverallCompetitionRulesAndPrizesHeadline();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraphTitle();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph1();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph2();
String anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph3();
String anniversaryLegalNoticeSectionRequirementsHeadline();
String anniversaryLegalNoticeSectionRequirementsListItem1();
String anniversaryLegalNoticeSectionRequirementsListItem2();
String anniversaryLegalNoticeSectionRequirementsListItem3();
String anniversaryLegalNoticeSectionContestParagraphTitle();
String anniversaryLegalNoticeSectionContestParagraph(int anniversary);
String anniversaryLegalNoticeSectionCommunicationParagraphTitle();
String anniversaryLegalNoticeSectionCommunicationParagraph();
String anniversaryLegalNoticeSectionCharitablyPurposeParagraphTitle();
String anniversaryLegalNoticeSectionCharitablyPurposeParagraph();
String anniversaryLegalNoticeSectionPrizesParagraphTitle();
String anniversaryLegalNoticeSectionPrizesParagraph(int anniversary);
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraphTitle();
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph1();
String anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph2();
String anniversaryLegalNoticeSectionDisclaimerSectionParagraphTitle();
String anniversaryLegalNoticeSectionDisclaimerSectionParagraph();
String anniversaryLegalNoticeSectionOtherParagraphTitle();
String anniversaryLegalNoticeSectionOtherParagraph1();
String anniversaryLegalNoticeSectionOtherParagraph2();
}
@@ -1886,29 +1886,3 @@ anniversaryRepdigitCountdownDescription=We are celebrating our lucky number race
anniversaryAnnouncementTeaser=Mission accomplished! {0,number,#,###} races with SAP Sailing Analytics!
anniversaryAnnouncementDescription= 3,2,1... We congratulate the participants of the race {0}. You did it! We thank you for your trust in SAP Sailing Analytics and hopefully continue sailing some more 10,000 races with you!
anniversaryRaceLinkText=Show anniversary race
anniversaryLegalNoticeHeadline=The {0,number,#,###}th race
anniversaryLegalNoticeSectionOverallCompetitionRulesAndPrizesHeadline=General contest rules and prizes
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraphTitle=Organization and participation
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph1=No purchase is necessary to participate in or win this contest. All those who organize a race are eligible to participate. This contest is not being sponsored, supported, or managed in any way by Facebook, Twitter, or any other social network and is not to be associated with any such entity.
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph2=Employees of the German federal government, the government of any U.S. federal state or territory, or any other foreign government are not eligible to participate.
anniversaryLegalNoticeSectionOrganizationAndParticipationParagraph3=The organizer of this contest is SAP SE, a German company whose headquarters is located at Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany. To be eligible for the contest, a race must be publicly accessible at www.sapsailing.com.
anniversaryLegalNoticeSectionRequirementsHeadline=Prerequisites
anniversaryLegalNoticeSectionRequirementsListItem1=SAP Sailing Analytics must be responsible for the live data analysis of each race.
anniversaryLegalNoticeSectionRequirementsListItem2=To win the prize, a race must enter into the regatta evaluation and be finished.
anniversaryLegalNoticeSectionRequirementsListItem3=The €10,000 are to be used solely for charitable purposes.
anniversaryLegalNoticeSectionContestParagraphTitle=Contest
anniversaryLegalNoticeSectionContestParagraph=The contest will run until the {0,number,#,###}th race has begun.
anniversaryLegalNoticeSectionCommunicationParagraphTitle=Notification
anniversaryLegalNoticeSectionCommunicationParagraph=The winner will be automatically announced at www.sapsailing.com.
anniversaryLegalNoticeSectionCharitablyPurposeParagraphTitle=Charitable purposes
anniversaryLegalNoticeSectionCharitablyPurposeParagraph=The charitable purpose for which the prize is to be used must fulfill certain requirements. The winner must invest the prize in promoting sports, education, literature, the public good, health and safety, the fight against poverty, or similar aims without attempting to gain any private benefit, profit, or political influence.
anniversaryLegalNoticeSectionPrizesParagraphTitle=Prizes
anniversaryLegalNoticeSectionPrizesParagraph=The organizer of the {0,number,#,###}th race will receive the prize money.
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraphTitle=Personal data and image rights
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph1=By participating in the contest, each organizer grants permission (and warrants to have received corresponding consent from its members) to the organizer, its subsidiaries and affiliated businesses, respective licensees, successors, and assignees to use the contest winner''s name, likeness, and entry for purposes of advertising and trade without further notice, consent, or compensation with regard to the contest and the event at which the contest took place, unless prohibited by law. This includes printing, publishing, broadcasting, distributing, and using the contest winner''s name, portrait, picture, voice, likeness, or image (or statements from associated members about the contest) for promotional purposes in any media now known or hereafter arising anywhere in the world.
anniversaryLegalNoticeSectionPersonalDataAndRightsToImagesParagraph2=SAP SE has set the total sum at €10,000. Event organizers must propose a charitable purpose for which they plan to use the prize to SAP SE. SAP SE reserves the right to approve these proposals or reject them should they not be deemed charitable.
anniversaryLegalNoticeSectionDisclaimerSectionParagraphTitle=Disclaimer
anniversaryLegalNoticeSectionDisclaimerSectionParagraph=SAP will assume no responsibility or liability for incomplete, inaccurate, or misdirected entries.
anniversaryLegalNoticeSectionOtherParagraphTitle=Additional information
anniversaryLegalNoticeSectionOtherParagraph1=The winner will be responsible for the taxes and/or any additional costs or fees accrued in connection with winning and using the prize in question. SAP may exclude any individual who disrupts the registration process, interferes with the operation of the contest website, or violates the contest rules in any other way. SAP also reserves the right to interrupt, end, or modify the contest or the conferral of the prize if either cannot be completed as planned due to computer viruses, bugs, manipulation, unauthorized access, technical defects, or any other circumstances beyond its control.
anniversaryLegalNoticeSectionOtherParagraph2=By taking part in the contest, you acknowledge your consent to the terms of participation.
@@ -2410,37 +2410,6 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
return result;
}
@Override
public List<StrippedLeaderboardDTO> getLeaderboardsByEvent(EventDTO event) {
List<StrippedLeaderboardDTO> results = new ArrayList<StrippedLeaderboardDTO>();
if (event != null) {
for (RegattaDTO regatta : event.regattas) {
results.addAll(getLeaderboardsByRegatta(regatta));
}
HashSet<StrippedLeaderboardDTO> set = new HashSet<StrippedLeaderboardDTO>(results);
results.clear();
results.addAll(set);
}
return results;
}
private List<StrippedLeaderboardDTO> getLeaderboardsByRegatta(RegattaDTO regatta) {
List<StrippedLeaderboardDTO> results = new ArrayList<StrippedLeaderboardDTO>();
if (regatta != null && regatta.races != null) {
for (RaceDTO race : regatta.races) {
List<StrippedLeaderboardDTO> leaderboard = getLeaderboardsByRaceAndRegatta(race.getName(), regatta.getRegattaIdentifier());
if (leaderboard != null && !leaderboard.isEmpty()) {
results.addAll(leaderboard);
}
}
}
// Removing duplicates
HashSet<StrippedLeaderboardDTO> set = new HashSet<StrippedLeaderboardDTO>(results);
results.clear();
results.addAll(set);
return results;
}
@Override
public List<StrippedLeaderboardDTO> getLeaderboardsByRaceAndRegatta(String raceName, RegattaIdentifier regattaIdentifier) {
List<StrippedLeaderboardDTO> results = new ArrayList<StrippedLeaderboardDTO>();
@@ -3829,13 +3798,6 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
private EventDTO convertToEventDTO(Event event, boolean withStatisticalData) {
EventDTO eventDTO = new EventDTO(event.getName());
copyEventBaseFieldsToDTO(event, eventDTO);
eventDTO.regattas = new ArrayList<RegattaDTO>();
for (Regatta regatta: event.getRegattas()) {
RegattaDTO regattaDTO = new RegattaDTO();
regattaDTO.setName(regatta.getName());
regattaDTO.races = convertToRaceDTOs(regatta);
eventDTO.regattas.add(regattaDTO);
}
eventDTO.venue.setCourseAreas(new ArrayList<CourseAreaDTO>());
for (CourseArea courseArea : event.getVenue().getCourseAreas()) {
CourseAreaDTO courseAreaDTO = convertToCourseAreaDTO(courseArea);
@@ -9,7 +9,6 @@ import com.sap.sailing.domain.common.dto.AbstractLeaderboardDTO;
public class EventDTO extends EventBaseDTO {
private static final long serialVersionUID = -7100030301376959817L;
public List<RegattaDTO> regattas;
private Date currentServerTime;
@@ -33,7 +32,6 @@ public class EventDTO extends EventBaseDTO {
super(name, leaderboardGroups);
this.leaderboardGroups = leaderboardGroups;
initCurrentServerTime();
regattas = new ArrayList<RegattaDTO>();
}
public boolean isFakeSeries() {
@@ -114,31 +114,6 @@ public class RegattaReplicationTest extends AbstractServerReplicationTest {
assertNull(replicatedRegatta.getDefaultCourseArea());
}
@Test
public void testRegattaToEventAssociationBeingReplicated() throws InterruptedException {
final UUID tvCourseAreaId = UUID.randomUUID();
final UUID golfCourseAreaId = UUID.randomUUID();
final TimePoint eventStartDate = new MillisecondsTimePoint(new Date());
final TimePoint eventEndDate = new MillisecondsTimePoint(new Date());
Event event = master.addEvent("Event", /* eventDescription */ null, eventStartDate, eventEndDate, "Venue", /*isPublic*/true, UUID.randomUUID());
master.addCourseAreas(event.getId(), new String[] {"TV"}, new UUID[] {tvCourseAreaId});
master.addCourseAreas(event.getId(), new String[] {"Golf"}, new UUID[] {golfCourseAreaId});
final String regattaName = RegattaImpl.getDefaultName("Kiel Week 2012", "49er");
Regatta masterRegatta = master.createRegatta(regattaName, "49er", /*startDate*/ null, /*endDate*/ null, UUID.randomUUID(), Collections.<Series>emptyList(),
/* persistent */ true, DomainFactory.INSTANCE.createScoringScheme(ScoringSchemeType.LOW_POINT), tvCourseAreaId,
/*buoyZoneRadiusInHullLengths*/2.0, /* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event = master.getEvent(event.getId());
assertTrue(event.getRegattas().iterator().hasNext());
assertEquals(regattaName, event.getRegattas().iterator().next().getName());
Thread.sleep(1000);
Event replicatedEvent = replica.getEvent(event.getId());
Iterator<Regatta> regattasInReplicatedEvent = replicatedEvent.getRegattas().iterator();
assertTrue(regattasInReplicatedEvent.hasNext());
assertEquals(regattaName, regattasInReplicatedEvent.next().getName());
master.apply(new UpdateSpecificRegatta(masterRegatta.getRegattaIdentifier(), /*startDate*/ null, /*endDate*/ null, golfCourseAreaId, null,
/*buoyZoneRadiusInHullLengths*/2.0, /* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false));
}
@Test
public void testUpdateSpecificRegattaReplicationForProcedureAndCourseDesignerAndConfig() throws InterruptedException {
Regatta replicatedRegatta;
@@ -218,7 +218,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -545,7 +545,6 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -703,7 +702,6 @@ public class MasterDataImportTest {
Regatta regatta = sourceService.createRegatta(RegattaImpl.getDefaultName("testRegatta", "29er"), "29er",
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -867,7 +865,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -1027,7 +1025,6 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -1141,7 +1138,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME, /* startDate */
null, /* endDate */null, regattaUUID, seriesNotToOverride, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regattaNotToOverride);
for (String name : raceColumnNamesNotToOverride) {
seriesNotToOverride.get(0).addRaceColumn(name, destService);
}
@@ -1229,7 +1226,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -1339,7 +1336,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME, /* startDate */
null, /* endDate */null, regattaUUID, seriesToOverride, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */ true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regattaToOverride);
for (String name : raceColumnNamesToOverride) {
seriesToOverride.get(0).addRaceColumn(name, destService);
}
@@ -1665,7 +1662,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -1909,7 +1906,7 @@ public class MasterDataImportTest {
RegattaImpl.getDefaultName(TEST_REGATTA_NAME, TEST_BOAT_CLASS_NAME), TEST_BOAT_CLASS_NAME,
/* startDate */null, /* endDate */null, regattaUUID, series, true, new LowPoint(), courseAreaUUID, /*buoyZoneRadiusInHullLengths*/2.0,
/* useStartTimeInference */true, /* controlTrackingFromStartAndFinishTimes */ false, OneDesignRankingMetric::new);
event.addRegatta(regatta);
for (String name : raceColumnNames) {
series.get(0).addRaceColumn(name, sourceService);
}
@@ -70,7 +70,6 @@ import com.sap.sailing.domain.base.CourseArea;
import com.sap.sailing.domain.base.DomainFactory;
import com.sap.sailing.domain.base.Event;
import com.sap.sailing.domain.base.EventBase;
import com.sap.sailing.domain.base.EventFetcher;
import com.sap.sailing.domain.base.Fleet;
import com.sap.sailing.domain.base.LeaderboardSearchResult;
import com.sap.sailing.domain.base.LeaderboardSearchResultBase;
@@ -266,7 +265,7 @@ import com.sap.sse.util.JoinedClassLoader;
import com.sap.sse.util.ThreadPoolUtil;
public class RacingEventServiceImpl implements RacingEventService, ClearStateTestSupport, RegattaListener,
LeaderboardRegistry, Replicator, EventFetcher {
LeaderboardRegistry, Replicator {
private static final Logger logger = Logger.getLogger(RacingEventServiceImpl.class.getName());
/**
@@ -1476,13 +1475,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
if (persistent) {
updateStoredRegatta(regatta);
}
for (Event event : getAllEvents()) {
for (CourseArea eventCourseArea : event.getVenue().getCourseAreas()) {
if (defaultCourseAreaId != null && eventCourseArea.getId().equals(defaultCourseAreaId)) {
event.addRegatta(regatta);
}
}
}
return wasCreated;
}
@@ -2387,7 +2380,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
regatta.addSeries(seriesObj);
}
}
regatta.adjustEventToRegattaAssociation(this);
if (regatta.isPersistent()) {
mongoObjectFactory.storeRegatta(regatta);
}