mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 02:52:22 +00:00
Merge branch 'master' into bug5153
This commit is contained in:
commit
38abb207b8
16 files changed
+200
-72
No files matched your search
@@ -22,11 +22,11 @@
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
|
||||
AllowEncodedSlashes On
|
||||
AllowEncodedSlashes NoDecode
|
||||
</Macro>
|
||||
|
||||
<Macro Rewrite $IP $PORT>
|
||||
RewriteRule ^/(.*)$ http://$IP:$PORT/$1 [P,L]
|
||||
ProxyPass "/" "http://$IP:$PORT/" nocanon
|
||||
ProxyPassReverse / http://$IP:$PORT/
|
||||
ProxyPreserveHost On
|
||||
</Macro>
|
||||
|
||||
@@ -14,7 +14,7 @@ export JAVA_HOME=/opt/sapjvm_8
|
||||
export JAVA_1_7_HOME=/opt/jdk1.7.0_75
|
||||
export ANDROID_HOME=/opt/android-sdk-linux
|
||||
|
||||
export PATH=$PATH:$JAVA_HOME/bin:/opt/amazon/ec2-api-tools-1.6.8.0/bin:/opt/amazon/bin:/opt/apache-maven-3.2.1/bin
|
||||
export PATH=$PATH:$JAVA_HOME/bin:/opt/amazon/ec2-api-tools-1.6.8.0/bin:/opt/amazon/bin:/opt/apache-maven-3.6.3/bin
|
||||
|
||||
export DISPLAY=:2.0
|
||||
|
||||
|
||||
-3
@@ -41,13 +41,10 @@ public class DependentStartTimeFinderTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
author = new LogEventAuthorImpl("Test", 1);
|
||||
|
||||
raceLogA = new RaceLogImpl("raceLogA");
|
||||
raceLogB = new RaceLogImpl("raceLogB");
|
||||
raceLogC = new RaceLogImpl("raceLogC");
|
||||
|
||||
nowMock = mock(TimePoint.class);
|
||||
|
||||
raceLogResolver = new RaceLogResolver() {
|
||||
@Override
|
||||
public RaceLog resolve(SimpleRaceLogIdentifier identifier) {
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.sap.sailing.domain.regattalog.tracking.analyzing.test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceMarkMappingEventImpl;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.impl.OpenEndedDeviceMappingFinder;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.impl.MarkImpl;
|
||||
import com.sap.sailing.domain.racelogtracking.impl.SmartphoneUUIDIdentifierImpl;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
public class OpenEndedDeviceMappingFinderTest extends AbstractRegattaLogTrackingTest {
|
||||
private OpenEndedDeviceMappingFinder finder;
|
||||
private Mark mappedToMark;
|
||||
private UUID deviceUuid;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
mappedToMark = new MarkImpl(UUID.randomUUID(), "Random Mark");
|
||||
deviceUuid = UUID.randomUUID();
|
||||
finder = new OpenEndedDeviceMappingFinder(log, mappedToMark, deviceUuid.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findNoOpenEndedMappingBecauseNoMappingExistsAtAll() {
|
||||
assertNull(finder.analyze()); // no event in the log, so result is expected to be null
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findNoOpenEndedMappingBecauseAllMappingsAreClosed() {
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent1 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now(), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), MillisecondsTimePoint.now().plus(Duration.ONE_HOUR));
|
||||
log.add(mappingEvent1);
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent2 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now().plus(Duration.ONE_YEAR), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), MillisecondsTimePoint.now().plus(Duration.ONE_YEAR).plus(Duration.ONE_HOUR));
|
||||
log.add(mappingEvent2);
|
||||
assertNull(finder.analyze()); // both events are closed; expect result to be null
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findOpenEndedMappingWhenItsLastOfSeveral() {
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent1 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now(), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), MillisecondsTimePoint.now().plus(Duration.ONE_HOUR));
|
||||
log.add(mappingEvent1);
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent2 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now().plus(Duration.ONE_YEAR), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), /* open end */ null);
|
||||
log.add(mappingEvent2);
|
||||
assertEquals(mappingEvent2.getId(), finder.analyze());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findOpenEndedMappingWhenItsFirstOfSeveral() {
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent1 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now(), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), /* open end */ null);
|
||||
log.add(mappingEvent1);
|
||||
final RegattaLogDeviceMarkMappingEventImpl mappingEvent2 = new RegattaLogDeviceMarkMappingEventImpl(MillisecondsTimePoint.now().plus(Duration.ONE_YEAR), author, mappedToMark,
|
||||
new SmartphoneUUIDIdentifierImpl(deviceUuid), MillisecondsTimePoint.now(), MillisecondsTimePoint.now().plus(Duration.ONE_YEAR).plus(Duration.ONE_HOUR));
|
||||
log.add(mappingEvent2);
|
||||
assertEquals(mappingEvent1.getId(), finder.analyze());
|
||||
}
|
||||
|
||||
}
|
||||
+29
-14
@@ -1,44 +1,59 @@
|
||||
package com.sap.sailing.domain.abstractlog.regatta.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sap.sailing.domain.abstractlog.BaseLogAnalyzer;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEvent;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEventVisitor;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMappingEvent;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogCloseOpenEndedDeviceMappingEvent;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.tracking.analyzing.impl.RegattaLogDeviceMappingFinder;
|
||||
import com.sap.sailing.domain.racelogtracking.DeviceMappingWithRegattaLogEvent;
|
||||
import com.sap.sse.common.WithID;
|
||||
|
||||
|
||||
/**
|
||||
* {@link BaseLogAnalyzer} used for finding the ID of an open ended {@link DeviceMappingEvent} to a corresponding
|
||||
* {@link RegattaLogCloseOpenEndedDeviceMappingEvent}
|
||||
* {@link RegattaLogCloseOpenEndedDeviceMappingEvent}.<p>
|
||||
*
|
||||
* If no corresponding event has been found, null is returned
|
||||
* If no corresponding event has been found, {@code null} is returned.
|
||||
*/
|
||||
public class OpenEndedDeviceMappingFinder extends BaseLogAnalyzer<RegattaLog, RegattaLogEvent, RegattaLogEventVisitor, Serializable> {
|
||||
|
||||
private final WithID mappedTo;
|
||||
private final Serializable deviceUuid;
|
||||
private final Serializable deviceUuidAsString;
|
||||
|
||||
public OpenEndedDeviceMappingFinder(RegattaLog log, WithID mappedTo, Serializable deviceUuid) {
|
||||
/**
|
||||
* Combines revocations, range closing events and regular mapping events
|
||||
*/
|
||||
private final RegattaLogDeviceMappingFinder<WithID> mappingFinder;
|
||||
|
||||
public OpenEndedDeviceMappingFinder(RegattaLog log, WithID mappedTo, String deviceUuidAsString) {
|
||||
super(log);
|
||||
this.mappingFinder = new RegattaLogDeviceMappingFinder<>(log);
|
||||
this.mappedTo = mappedTo;
|
||||
this.deviceUuid = deviceUuid;
|
||||
this.deviceUuidAsString = deviceUuidAsString;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable performAnalysis() {
|
||||
for (RegattaLogEvent regattaLogEvent : log.getUnrevokedEvents()) {
|
||||
if (regattaLogEvent instanceof RegattaLogDeviceMappingEvent<?>) {
|
||||
RegattaLogDeviceMappingEvent<?> deviceMappingEvent = (RegattaLogDeviceMappingEvent<?>) regattaLogEvent;
|
||||
if (deviceMappingEvent.getMappedTo().equals(mappedTo) &&
|
||||
deviceMappingEvent.getDevice().getStringRepresentation().equals(deviceUuid)) {
|
||||
return deviceMappingEvent.getId();
|
||||
final Map<WithID, List<DeviceMappingWithRegattaLogEvent<WithID>>> mappings = mappingFinder.analyze();
|
||||
final List<DeviceMappingWithRegattaLogEvent<WithID>> mappingsForObject = mappings.get(mappedTo);
|
||||
Serializable result;
|
||||
if (mappingsForObject != null) {
|
||||
result = null;
|
||||
for (final DeviceMappingWithRegattaLogEvent<WithID> mappingEvent : mappingsForObject) {
|
||||
if (mappingEvent.getDevice().getStringRepresentation().equals(deviceUuidAsString) &&
|
||||
mappingEvent.getTimeRange().hasOpenEnd()) {
|
||||
result = mappingEvent.getRegattaLogEvent().getId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-2
@@ -42,8 +42,7 @@ public class RegattaLogOpenEndedDeviceMappingCloser extends
|
||||
|
||||
@Override
|
||||
protected List<RegattaLogCloseOpenEndedDeviceMappingEvent> performAnalysis() {
|
||||
List<RegattaLogCloseOpenEndedDeviceMappingEvent> result = new ArrayList<RegattaLogCloseOpenEndedDeviceMappingEvent>();
|
||||
|
||||
final List<RegattaLogCloseOpenEndedDeviceMappingEvent> result = new ArrayList<>();
|
||||
for (Serializable eventId : mapping.getOriginalRaceLogEventIds()) {
|
||||
RegattaLogDeviceMappingEvent<?> event = (RegattaLogDeviceMappingEvent<?>) getLog().getEventById(eventId);
|
||||
if (event.getFrom() == null || event.getToInclusive() == null) {
|
||||
|
||||
-1
@@ -15,6 +15,5 @@ import com.sap.sse.common.WithID;
|
||||
*
|
||||
*/
|
||||
public interface DeviceMappingWithRegattaLogEvent<ItemType extends WithID> extends DeviceMapping<ItemType> {
|
||||
|
||||
RegattaLogDeviceMappingEvent<ItemType> getRegattaLogEvent();
|
||||
}
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 232 KiB |
+2
-11
@@ -26,8 +26,6 @@ import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.maps.client.LoadApi;
|
||||
import com.google.gwt.maps.client.LoadApi.LoadLibrary;
|
||||
import com.google.gwt.maps.client.MapOptions;
|
||||
import com.google.gwt.maps.client.MapTypeId;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
@@ -131,8 +129,8 @@ import com.sap.sailing.gwt.ui.shared.WindInfoForRaceDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindTrackInfoDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.CanvasOverlayV3;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.DetailTypeMetricOverlay;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapAPIKey;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapStyleHelper;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapsLoader;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.RaceSimulationOverlay;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.WindStreamletsRaceboardOverlay;
|
||||
import com.sap.sse.common.Bearing;
|
||||
@@ -753,11 +751,6 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
|
||||
private void loadMapsAPIV3(final boolean showMapControls, final boolean showHeaderPanel,
|
||||
final boolean showSatelliteLayer) {
|
||||
// load all the libs for use in the maps
|
||||
ArrayList<LoadLibrary> loadLibraries = new ArrayList<LoadApi.LoadLibrary>();
|
||||
loadLibraries.add(LoadLibrary.DRAWING);
|
||||
loadLibraries.add(LoadLibrary.GEOMETRY);
|
||||
|
||||
Runnable onLoad = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -931,9 +924,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
RaceMap.this.managedInfoWindow = new ManagedInfoWindow(map);
|
||||
}
|
||||
};
|
||||
// Emergency patch: problems with gme-sapglobalmarketing key?
|
||||
// LoadApi.go(onLoad, loadLibraries, GoogleMapAPIKey.V3_PARAMS);
|
||||
LoadApi.go(onLoad, loadLibraries, "key="+GoogleMapAPIKey.V3_APIKey);
|
||||
GoogleMapsLoader.load(onLoad);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.sap.sailing.gwt.ui.shared.racemap;
|
||||
|
||||
import com.google.gwt.maps.client.LoadApi;
|
||||
|
||||
public class GoogleMapAPIKey {
|
||||
// Emergency patch: problems with gme-sapglobalmarketing key?
|
||||
public static final String V3_APIKey = "AIzaSyD1Se4tIkt-wglccbco3S7twaHiG20hR9E";
|
||||
|
||||
/**
|
||||
* These are the additional parameters to give to a
|
||||
* {@link LoadApi#go(Runnable, java.util.ArrayList, boolean, String)} call for our Google Maps API usage.
|
||||
*/
|
||||
public static final String V3_PARAMS = "client=gme-sapglobalmarketing&channel=sapsailing.com";
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.sap.sailing.gwt.ui.shared.racemap;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.ScriptElement;
|
||||
|
||||
/**
|
||||
* The {@link #load(Runnable)} method can be used by clients to request the loading of the Google Maps API.
|
||||
* The callback passed will be invoked immediately if the API has already been loaded (e.g., by another
|
||||
* client call to the {@link #load(Runnable)} method within the same frame / document); it will be queued
|
||||
* for invocation by a Google Maps API callback function registered otherwise. This callback function
|
||||
* is injected at most once when the {@link #load(Runnable)} method is invoked for the first time and
|
||||
* will trigger all callbacks registered through the {@link #load(Runnable)} method until the maps API
|
||||
* invokes the callback registered.
|
||||
*/
|
||||
public class GoogleMapsLoader {
|
||||
/**
|
||||
* These params define the required information to authenticate with the Google Maps API.
|
||||
*/
|
||||
public static final String AUTHENTICATION_PARAMS = "client=gme-sapglobalmarketing&channel=sapsailing.com";
|
||||
|
||||
/**
|
||||
* Note: If you use 3, it will take the newest stable available. We want that, although we didn't test with that yet!
|
||||
* Google Release notes: https://developers.google.com/maps/documentation/javascript/releases.
|
||||
* Subscribe to https://groups.google.com/forum/#!forum/google-maps-js-api-v3-notify for change notifications.
|
||||
*/
|
||||
public final static String API_VERSION = "3";
|
||||
|
||||
/**
|
||||
* The required Google Maps libraries; a comma-separated list. See https://developers.google.com/maps/documentation/javascript/libraries
|
||||
* for more details. Examples: <tt>drawing,geometry,places,visualization</tt>
|
||||
*/
|
||||
public final static String LIBRARIES = "drawing,geometry";
|
||||
|
||||
private static boolean loading = false;
|
||||
private static boolean loaded = false;
|
||||
private static final Set<Runnable> callbacks = new HashSet<>();
|
||||
|
||||
private GoogleMapsLoader() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param callback must not be {@code null}.
|
||||
*/
|
||||
public static void load(Runnable callback) {
|
||||
if (loaded) {
|
||||
callback.run();
|
||||
} else {
|
||||
callbacks.add(callback);
|
||||
if (!loading) {
|
||||
loading = true;
|
||||
installCallback();
|
||||
final ScriptElement scriptElement = Document.get().createScriptElement();
|
||||
scriptElement.setSrc("https://maps.googleapis.com/maps/api/js?v="+API_VERSION+"&" + AUTHENTICATION_PARAMS
|
||||
+ "&libraries="+LIBRARIES+"&callback=googleMapsLoadedCallback");
|
||||
Document.get().getHead().appendChild(scriptElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void callback() {
|
||||
loaded = true;
|
||||
loading = false;
|
||||
callbacks.forEach(Runnable::run);
|
||||
callbacks.clear();
|
||||
clearCallback();
|
||||
}
|
||||
|
||||
private static native void installCallback() /*-{
|
||||
$wnd.googleMapsLoadedCallback = $entry(function() {
|
||||
@com.sap.sailing.gwt.ui.shared.racemap.GoogleMapsLoader::callback()();
|
||||
});
|
||||
}-*/;
|
||||
|
||||
private static native void clearCallback() /*-{
|
||||
$wnd.googleMapsLoadedCallback = null;
|
||||
}-*/;
|
||||
}
|
||||
+2
-10
@@ -10,8 +10,6 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.maps.client.LoadApi;
|
||||
import com.google.gwt.maps.client.LoadApi.LoadLibrary;
|
||||
import com.google.gwt.maps.client.MapOptions;
|
||||
import com.google.gwt.maps.client.MapWidget;
|
||||
import com.google.gwt.maps.client.base.LatLng;
|
||||
@@ -48,8 +46,8 @@ import com.sap.sailing.gwt.ui.shared.SimulatorResultsDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.SimulatorUISelectionDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.WindFieldGenParamsDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapAPIKey;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapStyleHelper;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.GoogleMapsLoader;
|
||||
import com.sap.sailing.gwt.ui.shared.racemap.PathNameFormatter;
|
||||
import com.sap.sailing.gwt.ui.simulator.util.ColorPalette;
|
||||
import com.sap.sailing.gwt.ui.simulator.util.ColorPaletteGenerator;
|
||||
@@ -370,11 +368,6 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
|
||||
private void loadMapsAPIV3() {
|
||||
// load all the libs for use in the maps
|
||||
ArrayList<LoadLibrary> loadLibraries = new ArrayList<LoadApi.LoadLibrary>();
|
||||
loadLibraries.add(LoadLibrary.DRAWING);
|
||||
loadLibraries.add(LoadLibrary.GEOMETRY);
|
||||
|
||||
Runnable onLoad = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -557,8 +550,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
LoadApi.go(onLoad, loadLibraries, GoogleMapAPIKey.V3_PARAMS);
|
||||
GoogleMapsLoader.load(onLoad);
|
||||
}
|
||||
|
||||
private void initializeOverlays() {
|
||||
|
||||
+3
-3
@@ -472,13 +472,13 @@ public class LeaderboardsResource extends AbstractLeaderboardsResource {
|
||||
String competitorId = (String) requestObject.get(DeviceMappingConstants.JSON_COMPETITOR_ID_AS_STRING);
|
||||
String boatId = (String) requestObject.get(DeviceMappingConstants.JSON_BOAT_ID_AS_STRING);
|
||||
String markId = (String) requestObject.get(DeviceMappingConstants.JSON_MARK_ID_AS_STRING);
|
||||
String deviceUuid = (String) requestObject.get(DeviceMappingConstants.JSON_DEVICE_UUID);
|
||||
String deviceUuidAsString = (String) requestObject.get(DeviceMappingConstants.JSON_DEVICE_UUID);
|
||||
String regattaSecret = (String) requestObject.get(DeviceMappingConstants.JSON_REGISTER_SECRET);
|
||||
TimePoint closingTimePointInclusive = new MillisecondsTimePoint(toMillis);
|
||||
boolean allowedViaPermission = getSecurityService().hasCurrentUserUpdatePermission(leaderboard);
|
||||
boolean allowedViaSecret = getService().skipChecksDueToCorrectSecret(leaderboardName, regattaSecret);
|
||||
if (allowedViaPermission || allowedViaSecret) {
|
||||
if (toMillis == null || deviceUuid == null || closingTimePointInclusive == null
|
||||
if (toMillis == null || deviceUuidAsString == null || closingTimePointInclusive == null
|
||||
|| (competitorId == null && boatId == null && markId == null)) {
|
||||
logger.warning("Invalid JSON body in request");
|
||||
return Response.status(Status.BAD_REQUEST).entity("Invalid JSON body in request").type(MediaType.TEXT_PLAIN)
|
||||
@@ -521,7 +521,7 @@ public class LeaderboardsResource extends AbstractLeaderboardsResource {
|
||||
mappedToTypeString = (markId != null) ? "mark" : "boat";
|
||||
}
|
||||
OpenEndedDeviceMappingFinder finder = new OpenEndedDeviceMappingFinder(isRegattaLike.getRegattaLog(), mappedTo,
|
||||
deviceUuid);
|
||||
deviceUuidAsString);
|
||||
Serializable deviceMappingEventId = finder.analyze();
|
||||
if (deviceMappingEventId == null) {
|
||||
logger.warning("No corresponding open " + mappedToTypeString + " to device mapping has been found");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="javax.ws.rs" version="1.1.1.v20130318-1750"/>
|
||||
<unit id="javax.ws.rs.source" version="1.1.1.v20130318-1750"/>
|
||||
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20160221192158/repository/"/>
|
||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20160221192158/repository/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
|
||||
@@ -59,11 +59,11 @@
|
||||
<unit id="org.jdom.source" version="1.1.1.v201101151400"/>
|
||||
<unit id="org.objectweb.asm" version="5.0.1.v201404251740"/>
|
||||
<unit id="org.objectweb.asm.source" version="5.0.1.v201404251740"/>
|
||||
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/repository/"/>
|
||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/repository/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.jetty.bundles.f.feature.group" version="9.4.8.201802270002"/>
|
||||
<repository location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/"/>
|
||||
<repository location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.apache.felix.gogo.command" version="0.10.0.v201209301215"/>
|
||||
@@ -110,7 +110,7 @@
|
||||
<unit id="org.eclipse.osgi" version="3.12.100.v20180210-1608"/>
|
||||
<unit id="org.eclipse.osgi.services" version="3.6.0.v20170228-1906"/>
|
||||
<unit id="org.eclipse.osgi.util" version="3.4.0.v20170111-1608"/>
|
||||
<repository location="http://download.eclipse.org/releases/oxygen/"/>
|
||||
<repository location="https://download.eclipse.org/releases/oxygen/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="com.sap.sailing.target.base.feature.group" version="1.0.0"/>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<project xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
@@ -91,7 +91,7 @@
|
||||
<repository>
|
||||
<id>equinox-sdk-3.9</id>
|
||||
<layout>p2</layout>
|
||||
<url>http://download.eclipse.org/releases/luna/</url>
|
||||
<url>https://download.eclipse.org/releases/luna/</url>
|
||||
</repository>
|
||||
<!--
|
||||
<repository>
|
||||
@@ -106,12 +106,12 @@
|
||||
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<url>http://repo1.maven.org/maven2</url>
|
||||
<url>https://repo1.maven.org/maven2</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>uni-luebeck</id>
|
||||
<url>http://www.itm.uni-luebeck.de/projects/maven/releases</url>
|
||||
<url>https://www.itm.uni-luebeck.de/projects/maven/releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
|
||||
Reference in new issue
Block a user