diff --git a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java index 7b9b907c983..277d6f80fd2 100644 --- a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java +++ b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java @@ -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; diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Event.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Event.java index aef4e907422..071b0bce01a 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Event.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Event.java @@ -13,11 +13,6 @@ import com.sap.sailing.domain.leaderboard.LeaderboardGroup; * */ public interface Event extends EventBase { - Iterable getRegattas(); - - void addRegatta(Regatta regatta); - - void removeRegatta(Regatta regatta); /** * For events, the ID is always a UUID. diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/EventFetcher.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/EventFetcher.java deleted file mode 100755 index 1ef00c35ccf..00000000000 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/EventFetcher.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.sap.sailing.domain.base; - -public interface EventFetcher { - Iterable getAllEvents(); -} diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Regatta.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Regatta.java index 279d0527a20..e03ad7197e0 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Regatta.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/Regatta.java @@ -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() { diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/EventImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/EventImpl.java index 723872c740f..cf7c0044f97 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/EventImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/EventImpl.java @@ -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 regattas; - + private ConcurrentLinkedQueue 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 null */ 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(); 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 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(); } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/RegattaImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/RegattaImpl.java index 578d94770fe..2a6a8c4ba84 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/RegattaImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/base/impl/RegattaImpl.java @@ -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 deregisterer = new CompetitorDeregistrator<>(regattaLog, competitors, regattaLogEventAuthorForRegatta); deregisterer.deregister(deregisterer.analyze()); } + } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/communication/eventlist/EventListYearDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/communication/eventlist/EventListYearDTO.java index 5d07eac5178..794f112f4c2 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/communication/eventlist/EventListYearDTO.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/communication/eventlist/EventListYearDTO.java @@ -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) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/whatsnew/resources/SailingAnalyticsNotes.html b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/whatsnew/resources/SailingAnalyticsNotes.html index e153d2fc624..29553918314 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/whatsnew/resources/SailingAnalyticsNotes.html +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/whatsnew/resources/SailingAnalyticsNotes.html @@ -4,6 +4,20 @@

What's New - SAP Sailing Analytics

+
September 2017
+
    +
  • 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. +
  • +
  • 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. +
  • +
+
August 2017
  • In the list of past events, you can now find some statistics for the current and past years. diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.java new file mode 100644 index 00000000000..2218004f08c --- /dev/null +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.java @@ -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(); + +} diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.properties new file mode 100644 index 00000000000..2f61292ba8b --- /dev/null +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalMessages.properties @@ -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. diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.java index 23a82612d71..8b7fe91fedd 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.java @@ -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; diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.ui.xml index 706a946de15..e3e118c6b44 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.ui.xml +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/partials/anniversary/AnniversaryLegalNoticeBubbleContent.ui.xml @@ -1,6 +1,6 @@ - + .container { padding: 0 1em !important; diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java index 7daf40adf9c..956659bd3e8 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java @@ -335,24 +335,6 @@ public class EventListComposite extends Composite implements EventsRefresher, Le } }; - SafeHtmlCell associatedRegattasCell = new SafeHtmlCell(); - Column associatedRegattasColumn = new Column(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("
    "); - } - i++; - } - return builder.toSafeHtml(); - } - }; - ImagesBarColumn eventActionColumn = new ImagesBarColumn( new EventConfigImagesBarCell(stringMessages)); eventActionColumn.setFieldUpdater(new FieldUpdater() { @@ -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()); 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 dac74894adc..12f34d25528 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 @@ -193,8 +193,6 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS List getLeaderboards(); - List 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); 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 e27f0020bad..b4ed031ba99 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 @@ -638,8 +638,6 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan void getEventById(UUID id, boolean withStatisticalData, AsyncCallback callback); - void getLeaderboardsByEvent(EventDTO event, AsyncCallback> callback); - /** * @return {@code true} if the race was not yet denoted for race log tracking and now has successfully been denoted * so diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java index 3b0cd58ac96..b835b0622e2 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java @@ -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(); - } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties index b6de05164e0..9ba733e186a 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties @@ -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. 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 dbf12049462..cf267c086f6 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java @@ -2410,37 +2410,6 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S return result; } - @Override - public List getLeaderboardsByEvent(EventDTO event) { - List results = new ArrayList(); - if (event != null) { - for (RegattaDTO regatta : event.regattas) { - results.addAll(getLeaderboardsByRegatta(regatta)); - } - HashSet set = new HashSet(results); - results.clear(); - results.addAll(set); - } - return results; - } - - private List getLeaderboardsByRegatta(RegattaDTO regatta) { - List results = new ArrayList(); - if (regatta != null && regatta.races != null) { - for (RaceDTO race : regatta.races) { - List leaderboard = getLeaderboardsByRaceAndRegatta(race.getName(), regatta.getRegattaIdentifier()); - if (leaderboard != null && !leaderboard.isEmpty()) { - results.addAll(leaderboard); - } - } - } - // Removing duplicates - HashSet set = new HashSet(results); - results.clear(); - results.addAll(set); - return results; - } - @Override public List getLeaderboardsByRaceAndRegatta(String raceName, RegattaIdentifier regattaIdentifier) { List results = new ArrayList(); @@ -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(); - 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()); for (CourseArea courseArea : event.getVenue().getCourseAreas()) { CourseAreaDTO courseAreaDTO = convertToCourseAreaDTO(courseArea); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventDTO.java index 614513f7299..070f415a7da 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventDTO.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventDTO.java @@ -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 regattas; private Date currentServerTime; @@ -33,7 +32,6 @@ public class EventDTO extends EventBaseDTO { super(name, leaderboardGroups); this.leaderboardGroups = leaderboardGroups; initCurrentServerTime(); - regattas = new ArrayList(); } public boolean isFakeSeries() { diff --git a/java/com.sap.sailing.server.replication.test/src/com/sap/sailing/server/replication/test/RegattaReplicationTest.java b/java/com.sap.sailing.server.replication.test/src/com/sap/sailing/server/replication/test/RegattaReplicationTest.java index 5721e8df718..4808ae62264 100755 --- a/java/com.sap.sailing.server.replication.test/src/com/sap/sailing/server/replication/test/RegattaReplicationTest.java +++ b/java/com.sap.sailing.server.replication.test/src/com/sap/sailing/server/replication/test/RegattaReplicationTest.java @@ -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.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 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; diff --git a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java index 7c85376be0c..6d186f1c3a9 100644 --- a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java +++ b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java @@ -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); } diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java index 74d6119b2e3..dbac14efd5c 100644 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java @@ -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); }