mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 18:33:54 +00:00
change naming of RegattaLike registration methods
This commit is contained in:
1 parent
d43a223e8f
commit
cd5b1bc1d0
1 file changed
+8
-8
+8
-8
@@ -592,7 +592,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
+ ") into regattasByName");
|
||||
regattasByName.put(regatta.getName(), regatta);
|
||||
regatta.addRegattaListener(this);
|
||||
registerRegattaLike(regatta);
|
||||
onRegattaLikeAdded(regatta);
|
||||
regatta.addRaceColumnListener(raceLogReplicator);
|
||||
regatta.addRaceColumnListener(raceLogScoringReplicator);
|
||||
}
|
||||
@@ -649,7 +649,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
}
|
||||
// RaceColumns of RegattaLeaderboards are tracked via its Regatta!
|
||||
if (leaderboard instanceof FlexibleLeaderboard) {
|
||||
registerRegattaLike(((FlexibleLeaderboard) leaderboard).getRegattaLike());
|
||||
onRegattaLikeAdded(((FlexibleLeaderboard) leaderboard).getRegattaLike());
|
||||
leaderboard.addRaceColumnListener(raceLogReplicator);
|
||||
leaderboard.addRaceColumnListener(raceLogScoringReplicator);
|
||||
}
|
||||
@@ -915,7 +915,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
syncGroupsAfterLeaderboardRemove(leaderboardName, true);
|
||||
if (leaderboard instanceof FlexibleLeaderboard) {
|
||||
FlexibleLeaderboard fLeaderboard = (FlexibleLeaderboard) leaderboard;
|
||||
unregisterRegattaLike(fLeaderboard.getRegattaLike());
|
||||
onRegattaLikeRemoved(fLeaderboard.getRegattaLike());
|
||||
getRegattaLogStore().removeRegattaLog(fLeaderboard.getRegattaLikeIdentifier());
|
||||
}
|
||||
leaderboard.destroy();
|
||||
@@ -1047,17 +1047,17 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
boatClassName), /*startDate*/ null, /*endDate*/ null, this, getBaseDomainFactory().createScoringScheme(ScoringSchemeType.LOW_POINT), id,
|
||||
null);
|
||||
logger.info("Created default regatta " + result.getName() + " (" + hashCode() + ") on " + this);
|
||||
registerRegattaLike(result);
|
||||
onRegattaLikeAdded(result);
|
||||
cacheAndReplicateDefaultRegatta(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void registerRegattaLike(IsRegattaLike isRegattaLike) {
|
||||
private void onRegattaLikeAdded(IsRegattaLike isRegattaLike) {
|
||||
isRegattaLike.addListener(regattaLogReplicator);
|
||||
}
|
||||
|
||||
private void unregisterRegattaLike(IsRegattaLike isRegattaLike) {
|
||||
private void onRegattaLikeRemoved(IsRegattaLike isRegattaLike) {
|
||||
isRegattaLike.removeListener(regattaLogReplicator);
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
useStartTimeInference);
|
||||
Regatta regatta = regattaWithCreatedFlag.getA();
|
||||
if (regattaWithCreatedFlag.getB()) {
|
||||
registerRegattaLike(regatta);
|
||||
onRegattaLikeAdded(regatta);
|
||||
replicateSpecificRegattaWithoutRaceColumns(regatta);
|
||||
}
|
||||
return regatta;
|
||||
@@ -1742,7 +1742,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
regatta.removeRegattaListener(this);
|
||||
regatta.removeRaceColumnListener(raceLogReplicator);
|
||||
regatta.removeRaceColumnListener(raceLogScoringReplicator);
|
||||
unregisterRegattaLike(regatta);
|
||||
onRegattaLikeRemoved(regatta);
|
||||
getRegattaLogStore().removeRegattaLog(regatta.getRegattaLikeIdentifier());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user