mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
support removing positioning information from a MarkProperties object in AdminConsole
This commit is contained in:
1 parent
f08f747d4f
commit
6456d71ae1
10 files changed
+71
-7
No files matched your search
+14
@@ -78,8 +78,18 @@ public interface SharedSailingData extends ReplicableWithObjectInputStream<Repli
|
||||
*/
|
||||
MarkProperties updateMarkProperties(UUID uuid, CommonMarkProperties properties, Positioning positioningInformation, Iterable<String> tags);
|
||||
|
||||
/**
|
||||
* Removes any positioning information from the {@code markProperties} object, regardless of what the positioning was before
|
||||
* (device-based or fixed position or empty);
|
||||
*/
|
||||
void clearPositioningForMarkProperties(MarkProperties markProperties);
|
||||
|
||||
/**
|
||||
* This overrides a previously set fixed position or associated tracking device.
|
||||
*
|
||||
* @param position
|
||||
* must not be {@code null}; use {@link #clearPositioningForMarkProperties} if you'd like to remove any
|
||||
* positioning assignment from the {@link MarkProperties} object altogether.
|
||||
*/
|
||||
void setFixedPositionForMarkProperties(MarkProperties markProperties, Position position);
|
||||
|
||||
@@ -87,6 +97,10 @@ public interface SharedSailingData extends ReplicableWithObjectInputStream<Repli
|
||||
|
||||
/**
|
||||
* This overrides a previously set fixed position or associated tracking device.
|
||||
*
|
||||
* @param deviceIdentifier
|
||||
* must not be {@code null}; use {@link #clearPositioningForMarkProperties} if you'd like to remove any
|
||||
* positioning assignment from the {@link MarkProperties} object altogether.
|
||||
*/
|
||||
void setTrackingDeviceIdentifierForMarkProperties(MarkProperties markProperties, DeviceIdentifier deviceIdentifier);
|
||||
|
||||
|
||||
+6
@@ -291,6 +291,12 @@ public class SharedSailingDataImpl implements ReplicatingSharedSailingData, Clea
|
||||
markPropertiesById.put(markProperties.getId(), markProperties);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPositioningForMarkProperties(final MarkProperties markProperties) {
|
||||
final UUID markPropertiesUUID = markProperties.getId();
|
||||
apply(s -> s.internalSetPositioningInformationForMarkProperties(markPropertiesUUID, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFixedPositionForMarkProperties(final MarkProperties markProperties, final Position position) {
|
||||
|
||||
Reference in new issue
Block a user