Merge remote-tracking branch 'origin/master' into bug2346

This commit is contained in:
Tim Hessenmüller
2020-12-20 18:47:22 +01:00
572 changed files with 22111 additions and 7288 deletions
@@ -11,6 +11,14 @@ public class BranchIOConstants {
public static final String OPEN_REGATTA_2_APP_BRANCHIO_PATH = "checkinUrl";
public static final String OPEN_REGATTA_3_APP_BRANCHIO = "https://sailinsight30-app.sapsailing.com/publicInvite";
public static final String OPEN_REGATTA_3_APP_BRANCHIO_PATH = "checkinUrl";
public static final String RACEMANAGER_APP_BRANCH_QUICK_LINK = "https://racemanager-app.sapsailing.com/invite";
public static final String RACEMANAGER_APP_BRANCH_PARAM_SERVER_URL = "server_url";
public static final String RACEMANAGER_APP_BRANCH_PARAM_DEVICE_CONFIG_IDENTIFIER = "device_config_identifier";
public static final String RACEMANAGER_APP_BRANCH_PARAM_DEVICE_CONFIG_UUID = "device_config_uuid";
public static final String RACEMANAGER_APP_BRANCH_PARAM_TOKEN = "token";
public static final String RACEMANAGER_APP_BRANCH_PARAM_EVENT_ID = "event_id";
public static final String RACEMANAGER_APP_BRANCH_PARAM_COURSE_AREA_UUID = "course_area_uuid";
public static final String RACEMANAGER_APP_BRANCH_PARAM_PRIORITY = "priority";
private BranchIOConstants() {
}
@@ -13,35 +13,40 @@ public class DeviceConfigurationQRCodeUtils {
public static final String deviceIdentifierKey = "identifier";
public static final String accessTokenKey = "token";
public static final String deviceUuidKey = "uuid";
public static class DeviceConfigurationDetails {
private final String apkUrl;
private final String url;
private final String deviceIdentifier;
private final UUID uuid;
private final String accessToken;
public DeviceConfigurationDetails(String apkUrl, UUID uuid, String deviceConfigurationName, String accessToken) {
public DeviceConfigurationDetails(String url, UUID uuid, String deviceConfigurationName, String accessToken) {
super();
this.apkUrl = apkUrl;
this.url = url;
this.uuid = uuid;
this.deviceIdentifier = deviceConfigurationName;
this.accessToken = accessToken;
}
public String getApkUrl() {
return apkUrl;
public String getUrl() {
return url;
}
public UUID getUuid() { return uuid; }
public String getDeviceIdentifier() { return deviceIdentifier; }
public String getAccessToken() {
return accessToken;
}
}
public static interface URLDecoder {
String decode(String encodedURL);
}
public static String composeQRContent(String urlEncodedDeviceConfigName, String apkUrl, String accessToken, String urlEncodedDeviceIdAsString) {
return apkUrl + "#" + deviceIdentifierKey + "=" + urlEncodedDeviceConfigName + "&" + deviceUuidKey + "="
public static String composeQRContent(String urlEncodedDeviceConfigName, String url, String accessToken, String urlEncodedDeviceIdAsString) {
return url + "#" + deviceIdentifierKey + "=" + urlEncodedDeviceConfigName + "&" + deviceUuidKey + "="
+ urlEncodedDeviceIdAsString + "&" + accessTokenKey + "=" + accessToken;
}
@@ -50,7 +55,7 @@ public class DeviceConfigurationQRCodeUtils {
if (fragmentIndex == -1 || fragmentIndex == 0 || qrCodeContent.length() == fragmentIndex + 1) {
throw new IllegalArgumentException("There is no server or identifier.");
}
String fragment = qrCodeContent.substring(fragmentIndex + 1, qrCodeContent.length());
String fragment = qrCodeContent.substring(fragmentIndex + 1);
final String[] params = fragment.split("&");
final Map<String, String> paramMap = new HashMap<>();
for (String param : params) {
@@ -0,0 +1,26 @@
package com.sap.sailing.domain.common.racelog;
/**
* Generally, any {@code AbstractLogEvent} has an author of type {@code AbstractLogEventAuthor} which has a numerical
* non-negative priority. Lesser numerical values represent higher priority/precedence. This enumeration captures
* the default priorities the Race Manager App is expected to handle.
*
* @author Axel Uhl (D043530)
*
*/
public enum AuthorPriority {
ADMIN(0),
OFFICER_ON_VESSEL(1),
SHORE_CONTROL(2),
DEMO_MODE(3);
private final int priority;
private AuthorPriority(int priority) {
this.priority = priority;
}
public int getPriority() {
return priority;
}
}
@@ -0,0 +1,25 @@
package com.sap.sailing.domain.common.racelog.tracking;
import java.io.Serializable;
public class MarkAlreadyUsedInRaceException extends Exception implements Serializable {
private static final long serialVersionUID = 2040461905745135256L;
public MarkAlreadyUsedInRaceException() {
super();
this.raceNames = "";
}
public MarkAlreadyUsedInRaceException(String message, String raceNames) {
super(message);
this.raceNames = raceNames;
}
private String raceNames;
public String getRaceNames() {
return raceNames;
}
}