Merge branch 'master' into foiling

Conflicts:
	java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/DetailType.java
	java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/RaceLogRaceTracker.java
	java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java
	java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedRace.java
	java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/DynamicTrackedRaceImpl.java
	java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRaceImpl.java
	java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/TrackFileImportWidget.java
	java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties
	java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties
This commit is contained in:
Benjamin Barth committed 2016-05-19 14:02:20 +02:00
commit 60bca7d374
253 files changed
+5101 -1988

No files matched your search

@@ -12,6 +12,8 @@
<booleanAttribute key="default_auto_start" value="true"/>
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;classpathContainer path=&amp;quot;org.eclipse.jdt.launching.JRE_CONTAINER&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.classpathContainer&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;classpathContainer path=&amp;quot;com.google.gwt.eclipse.core.GWT_CONTAINER&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.classpathContainer&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
@@ -592,7 +592,8 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
Executor simulatorExecutor = new ThreadPoolExecutor(/* corePoolSize */SIMULATION_THREAD_POOL_SIZE,
/* maximumPoolSize */SIMULATION_THREAD_POOL_SIZE,
/* keepAliveTime */60, TimeUnit.SECONDS,
/* workQueue */new LinkedBlockingQueue<Runnable>());
/* workQueue */new LinkedBlockingQueue<Runnable>(), new ThreadFactoryWithPriority(
Thread.NORM_PRIORITY, /* daemon */true));
// TODO: initialize smart-future-cache for simulation-results and add to simulation-service
simulationService = SimulationServiceFactory.INSTANCE.getService(simulatorExecutor, this);
this.raceLogReplicator = new RaceLogReplicator(this);
@@ -1648,6 +1649,12 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
// see raceTimesChanged(TimePoint, TimePoint, TimePoint).
}
@Override
public void finishedTimeChanged(TimePoint oldFinishedTime, TimePoint newFinishedTime) {
// no action required; the update signaled by this call is implicit; the race log
// updates that led to this change are replicated separately
}
@Override
public void waypointAdded(int zeroBasedIndex, Waypoint waypointThatGotAdded) {
// no-op; the course change is replicated by the separate CourseChangeReplicator
@@ -108,6 +108,11 @@ public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
return null;
}
@Override
public TimePoint getFinishedTime() {
return null;
}
@Override
public TimePoint getEndOfRace() {
return null;
@@ -633,7 +638,7 @@ public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
}
@Override
public void updateStartAndEndOfTracking() {
public void updateStartAndEndOfTracking(boolean waitForGPSFixesToLoad) {
}
@Override
@@ -291,18 +291,18 @@ public class ImportMasterDataOperation extends
RaceLogIdentifier identifier = raceColumn.getRaceLogIdentifier(fleet);
RaceLog currentPersistedLog = mongoRaceLogStore.getRaceLog(identifier, true);
if (currentPersistedLog.isEmpty()) {
addAllmportedEvents(mongoObjectFactory, mongoRaceLogStore, log, identifier);
addAllImportedEvents(mongoObjectFactory, mongoRaceLogStore, log, identifier);
} else if (override) {
// Clear existing race log
mongoRaceLogStore.removeRaceLog(identifier);
addAllmportedEvents(mongoObjectFactory, mongoRaceLogStore, log, identifier);
addAllImportedEvents(mongoObjectFactory, mongoRaceLogStore, log, identifier);
}
}
}
}
}
private void addAllmportedEvents(MongoObjectFactory mongoObjectFactory, RaceLogStore mongoRaceLogStore,
private void addAllImportedEvents(MongoObjectFactory mongoObjectFactory, RaceLogStore mongoRaceLogStore,
RaceLog log, RaceLogIdentifier identifier) {
RaceLogEventVisitor storeVisitor = MongoRaceLogStoreFactory.INSTANCE
.getMongoRaceLogStoreVisitor(identifier, mongoObjectFactory);
@@ -51,7 +51,7 @@ public class UpdateLeaderboardMaxPointsReason extends AbstractLeaderboardColumnO
updateStoredLeaderboard(toState, leaderboard);
Entry updatedEntry = leaderboard.getEntry(competitor, raceColumn, timePoint);
boolean isScoreCorrected = leaderboard.getScoreCorrection().isScoreCorrected(competitor, raceColumn, timePoint);
return new Util.Triple<Double, Double, Boolean>(updatedEntry.getNetPoints(), updatedEntry.getTotalPoints(), isScoreCorrected);
return new Util.Triple<Double, Double, Boolean>(updatedEntry.getTotalPoints(), updatedEntry.getNetPoints(), isScoreCorrected);
} else {
throw new IllegalArgumentException("Didn't find competitor with ID "+competitorIdAsString+" in leaderboard "+getLeaderboardName());
}
@@ -41,8 +41,8 @@ public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnO
@Override
public Util.Triple<Double, Double, Boolean> internalApplyTo(RacingEventService toState) throws NoWindException {
Leaderboard leaderboard = toState.getLeaderboardByName(getLeaderboardName());
Double newNetPoints;
Double newTotalPoints;
Double newNetPoints;
boolean isScoreCorrected;
if (leaderboard != null) {
Competitor competitor = leaderboard.getCompetitorByIdAsString(competitorIdAsString);
@@ -50,12 +50,12 @@ public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnO
RaceColumn raceColumn = leaderboard.getRaceColumnByName(getColumnName());
if (correctedScore == null) {
leaderboard.getScoreCorrection().uncorrectScore(competitor, raceColumn);
newNetPoints = leaderboard.getNetPoints(competitor, raceColumn, timePoint);
newTotalPoints = leaderboard.getTotalPoints(competitor, raceColumn, timePoint);
} else {
leaderboard.getScoreCorrection().correctScore(competitor, raceColumn, correctedScore);
newNetPoints = correctedScore;
newTotalPoints = correctedScore;
}
newTotalPoints = leaderboard.getEntry(competitor, raceColumn, timePoint).getTotalPoints();
newNetPoints = leaderboard.getEntry(competitor, raceColumn, timePoint).getNetPoints();
isScoreCorrected = leaderboard.getScoreCorrection().isScoreCorrected(competitor, raceColumn, timePoint);
} else {
throw new IllegalArgumentException("Didn't find competitor with ID "+competitorIdAsString+" in leaderboard "+getLeaderboardName());
@@ -64,7 +64,7 @@ public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnO
throw new IllegalArgumentException("Didn't find leaderboard "+getLeaderboardName());
}
updateStoredLeaderboard(toState, leaderboard);
return new Util.Triple<Double, Double, Boolean>(newNetPoints, newTotalPoints, isScoreCorrected);
return new Util.Triple<Double, Double, Boolean>(newTotalPoints, newNetPoints, isScoreCorrected);
}
}
@@ -176,6 +176,12 @@ public class SimulationServiceImpl implements SimulationService {
// TODO: update leg 1
}
@Override
public void finishedTimeChanged(TimePoint oldFinishedTime, TimePoint newFinishedTime) {
// relevant for simulation? for last leg?
// TODO: update last leg?
}
@Override
public void windSourcesToExcludeChanged(Iterable<? extends WindSource> windSourcesToExclude) {
// relevant for simulation: update all legs when wind changes overall