mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 09:11:02 +00:00
# race logs are set after RaceColumn is bound to its container (FlexibleLeaderboard or Regatta)
This commit is contained in:
1 parent
5debe4cf03
commit
6868f3f6d4
15 files changed
+92
-58
No files matched your search
+4
-2
@@ -642,7 +642,10 @@ public class RacingEventServiceImpl implements RacingEventService, RegattaListen
|
||||
@Override
|
||||
public Regatta createRegatta(String baseEventName, String boatClassName,
|
||||
Serializable id, Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme) {
|
||||
Regatta regatta = new RegattaImpl(baseEventName,
|
||||
RaceLogStore raceLogStore = MongoRaceLogStoreFactory.INSTANCE.getMongoRaceLogStore(
|
||||
mongoObjectFactory,
|
||||
domainObjectFactory);
|
||||
Regatta regatta = new RegattaImpl(raceLogStore, baseEventName,
|
||||
getBaseDomainFactory().getOrCreateBoatClass(boatClassName), series, persistent, scoringScheme, id);
|
||||
logger.info("Created regatta " + regatta.getName() + " (" + hashCode() + ") on "+this);
|
||||
cacheAndReplicateSpecificRegattaWithoutRaceColumns(regatta);
|
||||
@@ -785,7 +788,6 @@ public class RacingEventServiceImpl implements RacingEventService, RegattaListen
|
||||
regattasByName.put(regatta.getName(), regatta);
|
||||
regatta.addRegattaListener(this);
|
||||
replicate(new AddSpecificRegatta(
|
||||
MongoRaceLogStoreFactory.INSTANCE.getMongoRaceLogStore(mongoObjectFactory, domainObjectFactory),
|
||||
regatta.getBaseName(), regatta.getBoatClass() == null ? null : regatta
|
||||
.getBoatClass().getName(), regatta.getId(), getSeriesWithoutRaceColumnsConstructionParametersAsMap(regatta),
|
||||
regatta.isPersistent(), regatta.getScoringScheme()));
|
||||
|
||||
+2
-5
@@ -15,7 +15,6 @@ import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.domain.common.impl.Util.Pair;
|
||||
import com.sap.sailing.domain.common.impl.Util.Triple;
|
||||
import com.sap.sailing.domain.leaderboard.ScoringScheme;
|
||||
import com.sap.sailing.domain.racelog.RaceLogStore;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
@@ -25,16 +24,14 @@ public class AddSpecificRegatta extends AbstractAddRegattaOperation {
|
||||
private final Map<String, Pair<List<Triple<String, Integer, Color>>, Boolean>> seriesNamesWithFleetNamesAndFleetOrderingAndMedal;
|
||||
private final boolean persistent;
|
||||
private final ScoringScheme scoringScheme;
|
||||
private final RaceLogStore raceLogStore;
|
||||
|
||||
public AddSpecificRegatta(RaceLogStore raceLogStore, String regattaName, String boatClassName, Serializable id,
|
||||
public AddSpecificRegatta(String regattaName, String boatClassName, Serializable id,
|
||||
Map<String, Pair<List<Triple<String, Integer, Color>>, Boolean>> seriesNamesWithFleetNamesAndFleetOrdering,
|
||||
boolean persistent, ScoringScheme scoringScheme) {
|
||||
super(regattaName, boatClassName, id);
|
||||
this.seriesNamesWithFleetNamesAndFleetOrderingAndMedal = seriesNamesWithFleetNamesAndFleetOrdering;
|
||||
this.persistent = persistent;
|
||||
this.scoringScheme = scoringScheme;
|
||||
this.raceLogStore = raceLogStore;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,7 +44,7 @@ public class AddSpecificRegatta extends AbstractAddRegattaOperation {
|
||||
List<Series> result = new ArrayList<Series>();
|
||||
for (Map.Entry<String, Pair<List<Triple<String, Integer, Color>>, Boolean>> e : seriesNamesWithFleetNamesAndFleetOrderingAndMedal.entrySet()) {
|
||||
final List<String> emptyRaceColumnNamesList = Collections.emptyList();
|
||||
Series s = new SeriesImpl(raceLogStore, e.getKey(), /* isMedal */e.getValue().getB(), createFleets(e.getValue().getA()),
|
||||
Series s = new SeriesImpl(e.getKey(), /* isMedal */e.getValue().getB(), createFleets(e.getValue().getA()),
|
||||
emptyRaceColumnNamesList, trackedRegattaRegistry);
|
||||
result.add(s);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user