diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java index f77fb9b316f..20fbfe1a757 100644 --- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java +++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java @@ -35,7 +35,6 @@ import com.mongodb.util.JSON; import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor; import com.sap.sailing.domain.abstractlog.impl.LogEventAuthorImpl; import com.sap.sailing.domain.abstractlog.race.CompetitorResults; -import com.sap.sailing.domain.abstractlog.race.RaceLogFixedMarkPassingEvent; import com.sap.sailing.domain.abstractlog.race.RaceLog; import com.sap.sailing.domain.abstractlog.race.RaceLogCourseAreaChangedEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogCourseDesignChangedEvent; @@ -44,6 +43,7 @@ import com.sap.sailing.domain.abstractlog.race.RaceLogEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogEventRestoreFactory; import com.sap.sailing.domain.abstractlog.race.RaceLogFinishPositioningConfirmedEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogFinishPositioningListChangedEvent; +import com.sap.sailing.domain.abstractlog.race.RaceLogFixedMarkPassingEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogFlagEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogGateLineOpeningTimeEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogPassChangeEvent; @@ -53,9 +53,9 @@ import com.sap.sailing.domain.abstractlog.race.RaceLogRaceStatusEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogRevokeEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogStartProcedureChangedEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogStartTimeEvent; +import com.sap.sailing.domain.abstractlog.race.RaceLogSuppressedMarkPassingsEvent; import com.sap.sailing.domain.abstractlog.race.RaceLogWindFixEvent; import com.sap.sailing.domain.abstractlog.race.SimpleRaceLogIdentifier; -import com.sap.sailing.domain.abstractlog.race.RaceLogSuppressedMarkPassingsEvent; import com.sap.sailing.domain.abstractlog.race.impl.CompetitorResultsImpl; import com.sap.sailing.domain.abstractlog.race.impl.RaceLogImpl; import com.sap.sailing.domain.abstractlog.race.impl.SimpleRaceLogIdentifierImpl; @@ -141,7 +141,6 @@ import com.sap.sailing.domain.common.racelog.RaceLogRaceStatus; import com.sap.sailing.domain.common.racelog.RacingProcedureType; import com.sap.sailing.domain.common.racelog.tracking.TransformationException; import com.sap.sailing.domain.leaderboard.DelayedLeaderboardCorrections; -import com.sap.sailing.domain.leaderboard.DelayedLeaderboardCorrections.LeaderboardCorrectionsResolvedListener; import com.sap.sailing.domain.leaderboard.EventResolver; import com.sap.sailing.domain.leaderboard.FlexibleLeaderboard; import com.sap.sailing.domain.leaderboard.Leaderboard; @@ -315,7 +314,6 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { .add(FieldNames.WIND.name() + "." + FieldNames.TIME_AS_MILLIS.name(), 1).get(), new BasicDBObjectBuilder().add("unique", true).add("dropDups", true).get()); } catch (MongoException exception) { - if (exception.getCode() == 10092) { logger.warning(String.format( "Setting the unique index on the %s collection failed because you have too many duplicates. " @@ -408,19 +406,9 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { if (result != null) { final Leaderboard finalResult = result; finalResult.setDisplayName((String) dbLeaderboard.get(FieldNames.LEADERBOARD_DISPLAY_NAME.name())); - DelayedLeaderboardCorrections loadedLeaderboardCorrections = new DelayedLeaderboardCorrectionsImpl(result, baseDomainFactory); - final boolean[] needsMigration = new boolean[1]; - loadedLeaderboardCorrections.addLeaderboardCorrectionsResolvedListener(new LeaderboardCorrectionsResolvedListener() { - @Override - public void correctionsResolved(DelayedLeaderboardCorrections delayedLeaderboardCorrections) { - if (needsMigration[0]) { - new MongoObjectFactoryImpl(database).storeLeaderboard(finalResult); - } - } - }); - needsMigration[0] = loadLeaderboardCorrections(dbLeaderboard, loadedLeaderboardCorrections, result.getScoreCorrection()) || needsMigration[0]; - needsMigration[0] = loadSuppressedCompetitors(dbLeaderboard, loadedLeaderboardCorrections) || needsMigration[0]; + loadLeaderboardCorrections(dbLeaderboard, loadedLeaderboardCorrections, result.getScoreCorrection()); + loadSuppressedCompetitors(dbLeaderboard, loadedLeaderboardCorrections); loadColumnFactors(dbLeaderboard, result); // add the leaderboard to the registry if (leaderboardRegistry != null) { @@ -449,25 +437,13 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { } } - private boolean loadSuppressedCompetitors(DBObject dbLeaderboard, - DelayedLeaderboardCorrections loadedLeaderboardCorrections) { - final boolean needsMigration; - BasicDBList dbSuppressedCompetitorNames = (BasicDBList) dbLeaderboard.get(FieldNames.LEADERBOARD_SUPPRESSED_COMPETITORS.name()); - if (dbSuppressedCompetitorNames != null) { - needsMigration = true; - for (Object escapedCompetitorName : dbSuppressedCompetitorNames) { - loadedLeaderboardCorrections.suppressCompetitorByName(MongoUtils.unescapeDollarAndDot((String) escapedCompetitorName)); - } - } else { - needsMigration = false; - } + private void loadSuppressedCompetitors(DBObject dbLeaderboard, DelayedLeaderboardCorrections loadedLeaderboardCorrections) { BasicDBList dbSuppressedCompetitorIDs = (BasicDBList) dbLeaderboard.get(FieldNames.LEADERBOARD_SUPPRESSED_COMPETITOR_IDS.name()); if (dbSuppressedCompetitorIDs != null) { for (Object competitorId : dbSuppressedCompetitorIDs) { - loadedLeaderboardCorrections.suppressCompetitorById((Serializable) competitorId); + loadedLeaderboardCorrections.suppressCompetitorByID((Serializable) competitorId); } } - return needsMigration; } /** @@ -576,19 +552,8 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { return scoringScheme; } - private boolean loadLeaderboardCorrections(DBObject dbLeaderboard, DelayedLeaderboardCorrections correctionsToUpdate, + private void loadLeaderboardCorrections(DBObject dbLeaderboard, DelayedLeaderboardCorrections correctionsToUpdate, SettableScoreCorrection scoreCorrectionToUpdate) { - boolean needsMigration = false; - DBObject carriedPoints = (DBObject) dbLeaderboard.get(FieldNames.LEADERBOARD_CARRIED_POINTS.name()); - if (carriedPoints != null) { - needsMigration = true; - for (String escapedCompetitorName : carriedPoints.keySet()) { - Double carriedPointsForCompetitor = ((Number) carriedPoints.get(escapedCompetitorName)).doubleValue(); - if (carriedPointsForCompetitor != null) { - correctionsToUpdate.setCarriedPointsByName(MongoUtils.unescapeDollarAndDot(escapedCompetitorName), carriedPointsForCompetitor); - } - } - } BasicDBList carriedPointsById = (BasicDBList) dbLeaderboard.get(FieldNames.LEADERBOARD_CARRIED_POINTS_BY_ID.name()); if (carriedPointsById != null) { for (Object o : carriedPointsById) { @@ -618,44 +583,22 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { DBObject dbScoreCorrectionForRace = (DBObject) dbScoreCorrection.get(escapedRaceColumnName); final RaceColumn raceColumn = correctionsToUpdate.getLeaderboard().getRaceColumnByName(MongoUtils.unescapeDollarAndDot(escapedRaceColumnName)); if (raceColumn != null) { - if (dbScoreCorrectionForRace instanceof BasicDBList) { - for (Object o : (BasicDBList) dbScoreCorrectionForRace) { - DBObject dbScoreCorrectionForCompetitorInRace = (DBObject) o; - Serializable competitorId = (Serializable) dbScoreCorrectionForCompetitorInRace - .get(FieldNames.COMPETITOR_ID.name()); - if (dbScoreCorrectionForCompetitorInRace - .containsField(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name())) { - correctionsToUpdate.setMaxPointsReasonByID(competitorId, raceColumn, MaxPointsReason - .valueOf((String) dbScoreCorrectionForCompetitorInRace - .get(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name()))); - } - if (dbScoreCorrectionForCompetitorInRace.containsField(FieldNames.LEADERBOARD_CORRECTED_SCORE - .name())) { - final Double leaderboardCorrectedScore = ((Number) dbScoreCorrectionForCompetitorInRace - .get(FieldNames.LEADERBOARD_CORRECTED_SCORE.name())).doubleValue(); - correctionsToUpdate.correctScoreByID(competitorId, raceColumn, - (Double) leaderboardCorrectedScore); - } + for (Object o : (BasicDBList) dbScoreCorrectionForRace) { + DBObject dbScoreCorrectionForCompetitorInRace = (DBObject) o; + Serializable competitorId = (Serializable) dbScoreCorrectionForCompetitorInRace + .get(FieldNames.COMPETITOR_ID.name()); + if (dbScoreCorrectionForCompetitorInRace + .containsField(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name())) { + correctionsToUpdate.setMaxPointsReasonByID(competitorId, raceColumn, MaxPointsReason + .valueOf((String) dbScoreCorrectionForCompetitorInRace + .get(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name()))); } - } else { - needsMigration = true; - for (String competitorName : dbScoreCorrectionForRace.keySet()) { - DBObject dbScoreCorrectionForCompetitorInRace = (DBObject) dbScoreCorrectionForRace - .get(competitorName); - if (dbScoreCorrectionForCompetitorInRace - .containsField(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name())) { - correctionsToUpdate.setMaxPointsReasonByName(MongoUtils - .unescapeDollarAndDot(competitorName), raceColumn, MaxPointsReason - .valueOf((String) dbScoreCorrectionForCompetitorInRace - .get(FieldNames.LEADERBOARD_SCORE_CORRECTION_MAX_POINTS_REASON.name()))); - } - if (dbScoreCorrectionForCompetitorInRace.containsField(FieldNames.LEADERBOARD_CORRECTED_SCORE - .name())) { - final Double leaderboardCorrectedScore = ((Number) dbScoreCorrectionForCompetitorInRace - .get(FieldNames.LEADERBOARD_CORRECTED_SCORE.name())).doubleValue(); - correctionsToUpdate.correctScoreByName(MongoUtils.unescapeDollarAndDot(competitorName), - raceColumn, (Double) leaderboardCorrectedScore); - } + if (dbScoreCorrectionForCompetitorInRace.containsField(FieldNames.LEADERBOARD_CORRECTED_SCORE + .name())) { + final Double leaderboardCorrectedScore = ((Number) dbScoreCorrectionForCompetitorInRace + .get(FieldNames.LEADERBOARD_CORRECTED_SCORE.name())).doubleValue(); + correctionsToUpdate.correctScoreByID(competitorId, raceColumn, + (Double) leaderboardCorrectedScore); } } } else { @@ -667,22 +610,13 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { // deprecated style: a DBObject whose keys are the escaped competitor names // new style: a BasicDBList whose entries are DBObjects with COMPETITOR_ID and COMPETITOR_DISPLAY_NAME fields if (competitorDisplayNames != null) { - if (competitorDisplayNames instanceof BasicDBList) { - for (Object o : (BasicDBList) competitorDisplayNames) { - DBObject competitorDisplayName = (DBObject) o; - final Serializable competitorId = (Serializable) competitorDisplayName.get(FieldNames.COMPETITOR_ID.name()); - final String displayName = (String) competitorDisplayName.get(FieldNames.COMPETITOR_DISPLAY_NAME.name()); - correctionsToUpdate.setDisplayNameByID(competitorId, displayName); - } - } else { - needsMigration = true; - for (String escapedCompetitorName : competitorDisplayNames.keySet()) { - correctionsToUpdate.setDisplayNameByName(MongoUtils.unescapeDollarAndDot(escapedCompetitorName), - (String) competitorDisplayNames.get(escapedCompetitorName)); - } + for (Object o : (BasicDBList) competitorDisplayNames) { + DBObject competitorDisplayName = (DBObject) o; + final Serializable competitorId = (Serializable) competitorDisplayName.get(FieldNames.COMPETITOR_ID.name()); + final String displayName = (String) competitorDisplayName.get(FieldNames.COMPETITOR_DISPLAY_NAME.name()); + correctionsToUpdate.setDisplayNameByID(competitorId, displayName); } } - return needsMigration; } /** diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/DelayedLeaderboardCorrections.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/DelayedLeaderboardCorrections.java index a56de1af5c7..8897561ef11 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/DelayedLeaderboardCorrections.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/DelayedLeaderboardCorrections.java @@ -34,39 +34,13 @@ public interface DelayedLeaderboardCorrections extends RaceColumnListener, Seria void correctScoreByID(Serializable competitorId, RaceColumn raceColumn, double correctedScore); - /** - * Deprecated. Use {@link #correctScoreByID(Serializable, RaceColumn, double)} instead. Remains available until all - * databases have been migrated to the use of competitor IDs instead of competitor names. - */ - void correctScoreByName(String competitorName, RaceColumn raceColumn, double correctedScore); - void setCarriedPointsByID(Serializable competitorId, double carriedPoints); - /** - * Deprecated. Use {@link #setCarriedPointsByID(Serializable, double)} instead. Remains available until all databases have been - * migrated to the use of competitor IDs instead of competitor names. - */ - void setCarriedPointsByName(String competitorName, double carriedPoints); - void setMaxPointsReasonByID(Serializable competitorId, RaceColumn raceColumn, MaxPointsReason maxPointsReason); - /** - * Deprecated. Use {@link #setMaxPointsReasonByID(Serializable, RaceColumn, MaxPointsReason)} instead. Remains - * available until all databases have been migrated to the use of competitor IDs instead of competitor names. - */ - void setMaxPointsReasonByName(String competitorName, RaceColumn raceColumn, MaxPointsReason maxPointsReason); - void setDisplayNameByID(Serializable competitorId, String displayName); - void setDisplayNameByName(String competitorName, String displayName); - - void suppressCompetitorById(Serializable escapedCompetitorId); - - /** - * Deprecated. Use {@link #suppressCompetitorById(Serializable)} instead. Remains available until all databases have been - * migrated to the use of competitor IDs instead of competitor names. - */ - void suppressCompetitorByName(String competitorName); + void suppressCompetitorByID(Serializable escapedCompetitorId); void addLeaderboardCorrectionsResolvedListener(LeaderboardCorrectionsResolvedListener listener); diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/DelayedLeaderboardCorrectionsImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/DelayedLeaderboardCorrectionsImpl.java index 95979bb56e6..15e2db0a7cf 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/DelayedLeaderboardCorrectionsImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/DelayedLeaderboardCorrectionsImpl.java @@ -44,13 +44,6 @@ import com.sap.sse.common.IsManagedByCache; public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorrections, IsManagedByCache { private static final long serialVersionUID = 8824782847677232275L; - // deprecated structures that key corrections by name; to be removed once all databases have been migrated - private final Map carriedPointsByCompetitorName; - private final Map> maxPointsReasonsByCompetitorName; - private final Map> correctedScoresByCompetitorName; - private final Map displayNamesByCompetitorName; - private final Set suppressedCompetitorNames; - // structures that key corrections by competitor ID private final Map carriedPointsByCompetitorID; private final Map> maxPointsReasonsByCompetitorID; @@ -66,11 +59,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr public DelayedLeaderboardCorrectionsImpl(Leaderboard leaderboard, CompetitorFactory competitorFactory) { this.competitorFactory = competitorFactory; listeners = new HashSet<>(); - carriedPointsByCompetitorName = new HashMap(); - maxPointsReasonsByCompetitorName = new HashMap>(); - correctedScoresByCompetitorName = new HashMap>(); - displayNamesByCompetitorName = new HashMap(); - suppressedCompetitorNames = new HashSet(); carriedPointsByCompetitorID = new HashMap(); maxPointsReasonsByCompetitorID = new HashMap>(); correctedScoresByCompetitorID = new HashMap>(); @@ -121,14 +109,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } - @Override - public void setCarriedPointsByName(String competitorName, double carriedPoints) { - assertNoTrackedRaceAssociatedYet(); - synchronized (carriedPointsByCompetitorName) { - carriedPointsByCompetitorName.put(competitorName, carriedPoints); - } - } - @Override public void setMaxPointsReasonByID(Serializable competitorId, RaceColumn raceColumn, MaxPointsReason maxPointsReason) { assertNoTrackedRaceAssociatedYet(); @@ -147,19 +127,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } - @Override - public void setMaxPointsReasonByName(String competitorName, RaceColumn raceColumn, MaxPointsReason maxPointsReason) { - assertNoTrackedRaceAssociatedYet(); - synchronized (maxPointsReasonsByCompetitorName) { - Map map = maxPointsReasonsByCompetitorName.get(competitorName); - if (map == null) { - map = new HashMap(); - maxPointsReasonsByCompetitorName.put(competitorName, map); - } - map.put(raceColumn, maxPointsReason); - } - } - @Override public void correctScoreByID(Serializable competitorId, RaceColumn raceColumn, double correctedScore) { assertNoTrackedRaceAssociatedYet(); @@ -178,19 +145,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } - @Override - public void correctScoreByName(String competitorName, RaceColumn raceColumn, double correctedScore) { - assertNoTrackedRaceAssociatedYet(); - synchronized (correctedScoresByCompetitorName) { - Map map = correctedScoresByCompetitorName.get(competitorName); - if (map == null) { - map = new HashMap(); - correctedScoresByCompetitorName.put(competitorName, map); - } - map.put(raceColumn, correctedScore); - } - } - /** * Checks if there are any carried points, max points reasons or corrected scores left over that may now receive * their competitor record. If so, {@link #setCarriedPointsByName(com.sap.sailing.domain.base.Competitor, int)}, @@ -216,16 +170,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } } - synchronized (carriedPointsByCompetitorName) { - for (Iterator> carryEntryIter = carriedPointsByCompetitorName.entrySet() - .iterator(); carryEntryIter.hasNext();) { - Map.Entry carryEntry = carryEntryIter.next(); - if (competitorsByName.containsKey(carryEntry.getKey())) { - leaderboard.setCarriedPoints(competitorsByName.get(carryEntry.getKey()), carryEntry.getValue()); - carryEntryIter.remove(); - } - } - } synchronized (maxPointsReasonsByCompetitorID) { for (Iterator>> maxPointsReasonsEntryIter = maxPointsReasonsByCompetitorID .entrySet().iterator(); maxPointsReasonsEntryIter.hasNext();) { @@ -242,22 +186,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } } - synchronized (maxPointsReasonsByCompetitorName) { - for (Iterator>> maxPointsReasonsEntryIter = maxPointsReasonsByCompetitorName - .entrySet().iterator(); maxPointsReasonsEntryIter.hasNext();) { - java.util.Map.Entry> maxPointsReasonEntries = maxPointsReasonsEntryIter - .next(); - if (competitorsByName.containsKey(maxPointsReasonEntries.getKey())) { - for (Map.Entry maxPointsReasonEntry : maxPointsReasonEntries - .getValue().entrySet()) { - leaderboard.getScoreCorrection().setMaxPointsReason( - competitorsByName.get(maxPointsReasonEntries.getKey()), maxPointsReasonEntry.getKey(), - maxPointsReasonEntry.getValue()); - } - maxPointsReasonsEntryIter.remove(); - } - } - } synchronized (correctedScoresByCompetitorID) { for (Iterator>> correctedScoresEntryIter = correctedScoresByCompetitorID .entrySet().iterator(); correctedScoresEntryIter.hasNext();) { @@ -274,22 +202,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } } - synchronized (correctedScoresByCompetitorName) { - for (Iterator>> correctedScoresEntryIter = correctedScoresByCompetitorName - .entrySet().iterator(); correctedScoresEntryIter.hasNext();) { - java.util.Map.Entry> correctedScoresEntries = correctedScoresEntryIter - .next(); - if (competitorsByName.containsKey(correctedScoresEntries.getKey())) { - for (java.util.Map.Entry correctedScoreEntry : correctedScoresEntries - .getValue().entrySet()) { - leaderboard.getScoreCorrection().correctScore( - competitorsByName.get(correctedScoresEntries.getKey()), correctedScoreEntry.getKey(), - correctedScoreEntry.getValue()); - } - correctedScoresEntryIter.remove(); - } - } - } synchronized (displayNamesByCompetitorID) { for (Iterator> displayNamesEntryIter = displayNamesByCompetitorID .entrySet().iterator(); displayNamesEntryIter.hasNext();) { @@ -301,17 +213,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } } - synchronized (displayNamesByCompetitorName) { - for (Iterator> displayNamesEntryIter = displayNamesByCompetitorName - .entrySet().iterator(); displayNamesEntryIter.hasNext();) { - java.util.Map.Entry displayNamesEntry = displayNamesEntryIter.next(); - if (competitorsByName.containsKey(displayNamesEntry.getKey())) { - leaderboard.setDisplayName(competitorsByName.get(displayNamesEntry.getKey()), - displayNamesEntry.getValue()); - displayNamesEntryIter.remove(); - } - } - } synchronized (suppressedCompetitorIDs) { for (Iterator suppressedCompetitorNameIter = suppressedCompetitorIDs.iterator(); suppressedCompetitorNameIter .hasNext();) { @@ -322,24 +223,11 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } } - synchronized (suppressedCompetitorNames) { - for (Iterator suppressedCompetitorNameIter = suppressedCompetitorNames.iterator(); suppressedCompetitorNameIter - .hasNext();) { - String next = suppressedCompetitorNameIter.next(); - if (competitorsByName.containsKey(next)) { - leaderboard.setSuppressed(competitorsByName.get(next), true); - suppressedCompetitorNameIter.remove(); - } - } - } removeAsListenerIfNoLeftOvers(); } private void removeAsListenerIfNoLeftOvers() { - if (carriedPointsByCompetitorName.isEmpty() && maxPointsReasonsByCompetitorName.isEmpty() && - correctedScoresByCompetitorName.isEmpty() && displayNamesByCompetitorName.isEmpty() && - suppressedCompetitorNames.isEmpty() && - carriedPointsByCompetitorID.isEmpty() && maxPointsReasonsByCompetitorID.isEmpty() && + if (carriedPointsByCompetitorID.isEmpty() && maxPointsReasonsByCompetitorID.isEmpty() && correctedScoresByCompetitorID.isEmpty() && displayNamesByCompetitorID.isEmpty() && suppressedCompetitorIDs.isEmpty()) { getLeaderboard().removeRaceColumnListener(this); @@ -365,15 +253,7 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } @Override - public void setDisplayNameByName(String competitorName, String displayName) { - assertNoTrackedRaceAssociatedYet(); - synchronized (displayNamesByCompetitorName) { - displayNamesByCompetitorName.put(competitorName, displayName); - } - } - - @Override - public void suppressCompetitorById(Serializable competitorId) { + public void suppressCompetitorByID(Serializable competitorId) { assertNoTrackedRaceAssociatedYet(); Competitor competitor = competitorFactory.getExistingCompetitorById(competitorId); if (competitor != null) { @@ -385,14 +265,6 @@ public class DelayedLeaderboardCorrectionsImpl implements DelayedLeaderboardCorr } } - @Override - public void suppressCompetitorByName(String competitorName) { - assertNoTrackedRaceAssociatedYet(); - synchronized (suppressedCompetitorNames) { - suppressedCompetitorNames.add(competitorName); - } - } - @Override public void trackedRaceLinked(RaceColumn raceColumn, Fleet fleet, TrackedRace trackedRace) { assignLeftOvers(trackedRace); diff --git a/java/com.sap.sailing.gwt.ui/SailingGWT sdm.launch b/java/com.sap.sailing.gwt.ui/SailingGWT sdm.launch index d73c14c31f1..19df6cdef27 100644 --- a/java/com.sap.sailing.gwt.ui/SailingGWT sdm.launch +++ b/java/com.sap.sailing.gwt.ui/SailingGWT sdm.launch @@ -1,78 +1,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/com.sap.sse.security.ui/Security UI sdm.launch b/java/com.sap.sse.security.ui/Security UI sdm.launch index 7ff5e9979c7..63fc7dc7116 100755 --- a/java/com.sap.sse.security.ui/Security UI sdm.launch +++ b/java/com.sap.sse.security.ui/Security UI sdm.launch @@ -1,48 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +