mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-23 22:19:13 +00:00
copy the course name of a RaceLogCourseDesignChangedEvent onto the course which is now Renamable
Change-Id: Id9422dd742a7ec58811fc86c1f045593f50f681f
This commit is contained in:
+5
-1
@@ -252,7 +252,11 @@ public class RaceLogRaceTracker extends AbstractRaceTrackerBaseImpl {
|
||||
update.add(new Util.Pair<>(waypoint.getControlPoint(), waypoint.getPassingInstructions()));
|
||||
}
|
||||
try {
|
||||
trackedRace.getRace().getCourse().update(update, params.getDomainFactory());
|
||||
final Course course = trackedRace.getRace().getCourse();
|
||||
course.update(update, params.getDomainFactory());
|
||||
if (base.getName() != null) {
|
||||
course.setName(base.getName());
|
||||
}
|
||||
} catch (PatchFailedException e) {
|
||||
logger.log(Level.WARNING, "Could not update course for race " + trackedRace.getRace().getName());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.base;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import com.sap.sailing.domain.common.PassingInstruction;
|
||||
import com.sap.sse.common.Renamable;
|
||||
import com.sap.sse.common.Util;
|
||||
|
||||
import difflib.PatchFailedException;
|
||||
@@ -25,7 +26,7 @@ import difflib.PatchFailedException;
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
public interface Course extends CourseBase {
|
||||
public interface Course extends CourseBase, Renamable {
|
||||
void lockForRead();
|
||||
|
||||
void unlockAfterRead();
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.sap.sailing.domain.base.Waypoint;
|
||||
import com.sap.sailing.domain.common.PassingInstruction;
|
||||
import com.sap.sailing.util.CourseAsWaypointList;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.impl.NamedImpl;
|
||||
import com.sap.sse.common.impl.RenamableImpl;
|
||||
import com.sap.sse.concurrent.LockUtil;
|
||||
import com.sap.sse.concurrent.NamedReentrantReadWriteLock;
|
||||
|
||||
@@ -32,7 +32,7 @@ import difflib.DiffUtils;
|
||||
import difflib.Patch;
|
||||
import difflib.PatchFailedException;
|
||||
|
||||
public class CourseImpl extends NamedImpl implements Course {
|
||||
public class CourseImpl extends RenamableImpl implements Course {
|
||||
|
||||
private static final long serialVersionUID = -4280487649617132403L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user