mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-22 20:13:52 +00:00
Merge remote-tracking branch 'origin/master' into ribdashboard
This commit is contained in:
commit
f37513a496
67 files changed
+1560
-237
No files matched your search
@@ -9,6 +9,7 @@ import java.net.URL;
|
||||
import java.util.Collection;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -369,7 +370,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
* @return The new event
|
||||
*/
|
||||
void updateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos);
|
||||
|
||||
/**
|
||||
@@ -465,7 +466,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
ConcurrentHashMap<String, Regatta> getPersistentRegattasForRaceIDs();
|
||||
|
||||
Event createEventWithoutReplication(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue,
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable<ImageDescriptor> images,
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs, Iterable<ImageDescriptor> images,
|
||||
Iterable<VideoDescriptor> videos);
|
||||
|
||||
void setRegattaForRace(Regatta regatta, String raceIdAsString);
|
||||
|
||||
+5
-3
@@ -22,6 +22,7 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
@@ -2618,12 +2619,13 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
|
||||
@Override
|
||||
public Event createEventWithoutReplication(String eventName, String eventDescription, TimePoint startDate,
|
||||
TimePoint endDate, String venue, boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
TimePoint endDate, String venue, boolean isPublic, UUID id, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
Event result = new EventImpl(eventName, startDate, endDate, venue, isPublic, id);
|
||||
addEvent(result);
|
||||
result.setDescription(eventDescription);
|
||||
result.setOfficialWebsiteURL(officialWebsiteURL);
|
||||
result.setSailorsInfoWebsiteURLs(sailorsInfoWebsiteURLs);
|
||||
result.setImages(images);
|
||||
result.setVideos(videos);
|
||||
return result;
|
||||
@@ -2640,7 +2642,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
|
||||
@Override
|
||||
public void updateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
final Event event = eventsById.get(id);
|
||||
if (event == null) {
|
||||
@@ -2664,7 +2666,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
}
|
||||
event.setLeaderboardGroups(leaderboardGroups);
|
||||
event.setOfficialWebsiteURL(officialWebsiteURL);
|
||||
event.setSailorsInfoWebsiteURL(sailorsInfoWebsiteURL);
|
||||
event.setSailorsInfoWebsiteURLs(sailorsInfoWebsiteURLs);
|
||||
event.setImages(images);
|
||||
event.setVideos(videos);
|
||||
// TODO consider use diffutils to compute diff between old and new leaderboard groups list and apply the patch
|
||||
|
||||
+6
-4
@@ -1,6 +1,8 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
@@ -28,10 +30,10 @@ public class CreateEvent extends AbstractEventOperation<Event> {
|
||||
private final Iterable<ImageDescriptor> images;
|
||||
private final Iterable<VideoDescriptor> videos;
|
||||
private final URL officialWebsiteURL;
|
||||
private final URL sailorsInfoWebsiteURL;
|
||||
private final Map<Locale, URL> sailorsInfoWebsiteURLs;
|
||||
|
||||
public CreateEvent(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue,
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs, Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
super(id);
|
||||
this.eventName = eventName;
|
||||
this.eventDescription = eventDescription;
|
||||
@@ -40,7 +42,7 @@ public class CreateEvent extends AbstractEventOperation<Event> {
|
||||
this.venue = venue;
|
||||
this.isPublic = isPublic;
|
||||
this.officialWebsiteURL = officialWebsiteURL;
|
||||
this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL;
|
||||
this.sailorsInfoWebsiteURLs = sailorsInfoWebsiteURLs;
|
||||
this.images = images;
|
||||
this.videos = videos;
|
||||
}
|
||||
@@ -64,7 +66,7 @@ public class CreateEvent extends AbstractEventOperation<Event> {
|
||||
@Override
|
||||
public Event internalApplyTo(RacingEventService toState) {
|
||||
return toState.createEventWithoutReplication(getEventName(), eventDescription, startDate, endDate, venue, isPublic,
|
||||
getId(), officialWebsiteURL, sailorsInfoWebsiteURL, images, videos);
|
||||
getId(), officialWebsiteURL, sailorsInfoWebsiteURLs, images, videos);
|
||||
}
|
||||
|
||||
}
|
||||
+6
-4
@@ -1,6 +1,8 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
@@ -19,12 +21,12 @@ public class UpdateEvent extends AbstractEventOperation<Void> {
|
||||
private final String eventName;
|
||||
private final String eventDescription;
|
||||
private final URL officialWebsiteURL;
|
||||
private final URL sailorsInfoWebsiteURL;
|
||||
private final Map<Locale, URL> sailorsInfoWebsiteURLs;
|
||||
private final Iterable<ImageDescriptor> images;
|
||||
private final Iterable<VideoDescriptor> videos;
|
||||
|
||||
public UpdateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, Map<Locale, URL> sailorsInfoWebsiteURLs,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
super(id);
|
||||
this.eventName = eventName;
|
||||
@@ -35,7 +37,7 @@ public class UpdateEvent extends AbstractEventOperation<Void> {
|
||||
this.isPublic = isPublic;
|
||||
this.leaderboardGroupIds = leaderboardGroupIds;
|
||||
this.officialWebsiteURL = officialWebsiteURL;
|
||||
this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL;
|
||||
this.sailorsInfoWebsiteURLs = sailorsInfoWebsiteURLs;
|
||||
this.images = images;
|
||||
this.videos = videos;
|
||||
}
|
||||
@@ -55,7 +57,7 @@ public class UpdateEvent extends AbstractEventOperation<Void> {
|
||||
@Override
|
||||
public Void internalApplyTo(RacingEventService toState) {
|
||||
toState.updateEvent(getId(), eventName, eventDescription, startDate, endDate, venueName, isPublic,
|
||||
leaderboardGroupIds, officialWebsiteURL, sailorsInfoWebsiteURL, images, videos);
|
||||
leaderboardGroupIds, officialWebsiteURL, sailorsInfoWebsiteURLs, images, videos);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user