mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
bug5867: allow for passing through tailLengthInMilliseconds setting from URL;
default to 1ms for "wind map" so that in case competitors are shown there they will be shown without a tail
This commit is contained in:
+15
@@ -2,6 +2,8 @@ package com.sap.sailing.domain.base;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.IsManagedByCache;
|
||||
import com.sap.sse.common.NamedWithID;
|
||||
|
||||
@@ -14,4 +16,17 @@ import com.sap.sse.common.NamedWithID;
|
||||
*/
|
||||
public interface CourseArea extends NamedWithID, IsManagedByCache<SharedDomainFactory<?>> {
|
||||
UUID getId();
|
||||
|
||||
/**
|
||||
* An optional position specifying the center of a course area assumed to be of circular shape.
|
||||
* If {@code null}, the position is not known.
|
||||
*/
|
||||
Position getCenterPosition();
|
||||
|
||||
/**
|
||||
* If {@link #getCenterPosition()} delivers a non-{@code null} result, asking the radius of this course area, which
|
||||
* is assumed to be of circulare shape, can make sense. If may, however, not be defined in which case {@code null}
|
||||
* is returned.
|
||||
*/
|
||||
Distance getRadius();
|
||||
}
|
||||
|
||||
+14
@@ -4,12 +4,16 @@ import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.SharedDomainFactory;
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.impl.NamedImpl;
|
||||
|
||||
public class CourseAreaImpl extends NamedImpl implements CourseArea {
|
||||
private static final long serialVersionUID = 5912385360170509150L;
|
||||
|
||||
private final UUID id;
|
||||
private Position centerPosition; // no setter yet; TODO bug5867; clarify replication etc.
|
||||
private Distance radius; // no setter yet; TODO bug5867; clarify replication etc.
|
||||
|
||||
public CourseAreaImpl(String name, UUID id) {
|
||||
super(name);
|
||||
@@ -21,6 +25,16 @@ public class CourseAreaImpl extends NamedImpl implements CourseArea {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Position getCenterPosition() {
|
||||
return centerPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Distance getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourseArea resolve(SharedDomainFactory<?> domainFactory) {
|
||||
return domainFactory.getOrCreateCourseArea(id, getName());
|
||||
|
||||
Reference in New Issue
Block a user