mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
Merge branch 'master' into bug4319
This commit is contained in:
commit
f774a1f644
3 files changed
+29
-32
No files matched your search
+17
-26
@@ -1,7 +1,6 @@
|
||||
package com.sap.sailing.server.impl.preferences.model;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sse.common.Util;
|
||||
@@ -27,38 +26,30 @@ public class TrackedEventPreference extends AbstractGenericSerializableSettings
|
||||
|
||||
/** copy constructor */
|
||||
public TrackedEventPreference(TrackedEventPreference other) {
|
||||
this();
|
||||
eventId.setValue(other.getEventId());
|
||||
leaderboardName.setValue(other.getLeaderboardName());
|
||||
trackedElements.setValues(other.getTrackedElements());
|
||||
baseUrl.setValue(other.getBaseUrl());
|
||||
isArchived.setValue(other.getIsArchived());
|
||||
this.regattaSecret.setValue(other.getRegattaSecret());
|
||||
this(other.getEventId(), other.getLeaderboardName(),
|
||||
other.getTrackedElements(), other.getBaseUrl(),
|
||||
other.getIsArchived(), other.getRegattaSecret());
|
||||
}
|
||||
|
||||
/** copy constructor with new archived state */
|
||||
public TrackedEventPreference(TrackedEventPreference other, boolean isArchived) {
|
||||
this();
|
||||
eventId.setValue(other.getEventId());
|
||||
leaderboardName.setValue(other.getLeaderboardName());
|
||||
trackedElements.setValues(other.getTrackedElements());
|
||||
baseUrl.setValue(other.getBaseUrl());
|
||||
this.isArchived.setValue(isArchived);
|
||||
this.regattaSecret.setValue(other.getRegattaSecret());
|
||||
this(other.getEventId(), other.getLeaderboardName(),
|
||||
other.getTrackedElements(), other.getBaseUrl(),
|
||||
isArchived, other.getRegattaSecret());
|
||||
}
|
||||
|
||||
/** copy constructor with additional tracked event */
|
||||
public TrackedEventPreference(TrackedEventPreference other, TrackedElementWithDeviceId trackedElement) {
|
||||
this();
|
||||
eventId.setValue(other.getEventId());
|
||||
leaderboardName.setValue(other.getLeaderboardName());
|
||||
final Collection<TrackedElementWithDeviceId> trackedElements = new HashSet<>();
|
||||
Util.addAll(other.getTrackedElements(), trackedElements);
|
||||
trackedElements.add(trackedElement);
|
||||
this.trackedElements.setValues(trackedElements);
|
||||
baseUrl.setValue(other.getBaseUrl());
|
||||
this.isArchived.setValue(other.getIsArchived());
|
||||
this.regattaSecret.setValue(other.getRegattaSecret());
|
||||
this(other.getEventId(), other.getLeaderboardName(),
|
||||
addTrackedElement(other.getTrackedElements(), trackedElement), other.getBaseUrl(),
|
||||
other.getIsArchived(), other.getRegattaSecret());
|
||||
}
|
||||
|
||||
private static Iterable<TrackedElementWithDeviceId> addTrackedElement(
|
||||
Iterable<TrackedElementWithDeviceId> trackedElements, TrackedElementWithDeviceId trackedElement) {
|
||||
final Set<TrackedElementWithDeviceId> result = Util.asSet(trackedElements);
|
||||
result.add(trackedElement);
|
||||
return result;
|
||||
}
|
||||
|
||||
public TrackedEventPreference(UUID eventId, String leaderboardName,
|
||||
|
||||
@@ -757,11 +757,17 @@ public class Util {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> List<T> asList(Iterable<T> visibleCourseAreas) {
|
||||
ArrayList<T> list = new ArrayList<T>();
|
||||
addAll(visibleCourseAreas, list);
|
||||
public static <T> List<T> asList(Iterable<T> iterable) {
|
||||
final List<T> list = new ArrayList<>();
|
||||
addAll(iterable, list);
|
||||
return list;
|
||||
}
|
||||
|
||||
public static <T> Set<T> asSet(Iterable<T> iterable) {
|
||||
final Set<T> result = new HashSet<>();
|
||||
addAll(iterable, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> List<T> cloneListOrNull(List<T> list) {
|
||||
final List<T> result;
|
||||
|
||||
@@ -26,9 +26,9 @@ To run Selenium Integration UI Tests please do the following:
|
||||
|
||||
* in local-test-environment.xml file adjust the properties according to which browser and driver you'll be using (chromedriver, geckodriver) and what their file system locations are;
|
||||
* make sure no "Sailing Server ..." launch configuration is currently running;
|
||||
* start the "Sailing Server (No Proxy, winddbTest).launch" config, it will use a test database in MongoDB so as to not overwrite anything in your local "production" ("winddb") database; it furthermore includes a bundle in the OSGi configuration that enables massive "clear" operations that we don't want to deploy to our production landscape otherwise but which is used by the tests to ensure a clean fresh state when tests start to execute;
|
||||
* start the "GWT Sailing SDM.launch";
|
||||
* start the "Sailing Domain Test (No Proxy" JUnit test launch configuration;
|
||||
* start the "Sailing Server (No Proxy, winddbTest)" config, it will use a test database in MongoDB so as to not overwrite anything in your local "production" ("winddb") database; it furthermore includes a bundle in the OSGi configuration that enables massive "clear" operations that we don't want to deploy to our production landscape otherwise but which is used by the tests to ensure a clean fresh state when tests start to execute;
|
||||
* start the "GWT Sailing SDM" launch configuration;
|
||||
* start the "Sailing Domain Test (No Proxy)" JUnit test launch configuration;
|
||||
|
||||
## Tracking and Wind Sensor Connectors
|
||||
To receive GPS and wind data in near real time, some network programming becomes necessary. Depending on the technology and provider used, a combination of HTTP, TCP and UDP connections is required to obtain live data. Particularly the UDP connectivity was the reason why deploying our solution to SAP NetWeaver Cloud was and still is difficult.
|
||||
|
||||
Reference in new issue
Block a user