mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-05 18:42:55 +00:00
Merge branch 'master' into bug4202
# Conflicts: # java/com.sap.sailing.dashboards.gwt/GWT Dashboards DevMode.launch # java/com.sap.sailing.dashboards.gwt/GWT Dashboards SDM.launch # java/com.sap.sse.security.ui/GWT Security SDM.launch
This commit is contained in:
commit
61748f2e10
68 files changed
+677
-363
No files matched your search
+1
@@ -18,6 +18,7 @@ public class BasicRaceDTO extends NamedDTO {
|
||||
|
||||
public Date startOfRace;
|
||||
public Date endOfRace;
|
||||
public Date raceFinishedTime;
|
||||
public TrackedRaceDTO trackedRace;
|
||||
|
||||
public BasicRaceDTO() {} // for GWT serialization only
|
||||
|
||||
-4
@@ -55,10 +55,6 @@ public class RaceStateImpl extends ReadonlyRaceStateImpl implements RaceState {
|
||||
|
||||
private final AbstractLogEventAuthor author;
|
||||
|
||||
public static ReadonlyRaceState create(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
return create(raceLogResolver, raceLog, /* forRaceLogIdentifier */ null, Collections.<SimpleRaceLogIdentifier, ReadonlyRaceState>emptyMap());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link RaceState} with the initial racing procedure type set to a fallback value and an empty configuration.
|
||||
*/
|
||||
|
||||
+32
-2
@@ -44,6 +44,7 @@ import com.sap.sailing.domain.common.racelog.RacingProcedureType;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.TimeRange;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.util.WeakIdentityHashMap;
|
||||
|
||||
/**
|
||||
* Implementation of {@link ReadonlyRaceState}. Use the static factory methods to instantiate your race state.
|
||||
@@ -55,8 +56,37 @@ import com.sap.sse.common.Util;
|
||||
* See {@link ReadonlyRaceStateImpl#update()} for the core of the algorithm.
|
||||
*/
|
||||
public class ReadonlyRaceStateImpl implements ReadonlyRaceState, RaceLogChangedListener {
|
||||
|
||||
public static ReadonlyRaceState create(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
private static final WeakIdentityHashMap<RaceLog, WeakIdentityHashMap<RaceLogResolver, ReadonlyRaceState>> raceStateCache =
|
||||
new WeakIdentityHashMap<>();
|
||||
|
||||
/**
|
||||
* Obtains a race state for the combination of {@code raceLog} and {@code raceLogResolver}. The result is
|
||||
* cache using weak references to the race log and the race log resolver for quick retrieval upon equal
|
||||
* requests, saving memory, saving listeners and thereby avoiding more synchronization issues.
|
||||
*
|
||||
* See also bug4704.
|
||||
*/
|
||||
public static ReadonlyRaceState getOrCreate(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
WeakIdentityHashMap<RaceLogResolver, ReadonlyRaceState> raceStatesForRaceLog;
|
||||
ReadonlyRaceState result = null;
|
||||
synchronized (raceStateCache) {
|
||||
raceStatesForRaceLog = raceStateCache.get(raceLog);
|
||||
if (raceStatesForRaceLog == null) {
|
||||
raceStatesForRaceLog = new WeakIdentityHashMap<>();
|
||||
raceStateCache.put(raceLog, raceStatesForRaceLog);
|
||||
} else {
|
||||
result = raceStatesForRaceLog.get(raceLogResolver);
|
||||
}
|
||||
if (result == null) {
|
||||
result = createInternal(raceLogResolver, raceLog);
|
||||
raceStatesForRaceLog.put(raceLogResolver, result);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static final ReadonlyRaceState createInternal(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
return create(raceLogResolver, raceLog, /* forRaceLogIdentifier */null,
|
||||
Collections.<SimpleRaceLogIdentifier, ReadonlyRaceState> emptyMap());
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@ package com.sap.sailing.domain.swisstimingadapter.persistence.impl;
|
||||
|
||||
public enum FieldNames {
|
||||
// SwissTiming configuration parameters:
|
||||
ST_CONFIG_NAME, ST_CONFIG_HOSTNAME, ST_CONFIG_PORT, ST_CONFIG_JSON_URL, ST_ARCHIVE_JSON_URL,
|
||||
ST_CONFIG_NAME, ST_CONFIG_HOSTNAME, ST_CONFIG_PORT, ST_CONFIG_JSON_URL, ST_CONFIG_UPDATE_URL,
|
||||
ST_CONFIG_UPDATE_USERNAME, ST_CONFIG_UPDATE_PASSWORD, ST_ARCHIVE_JSON_URL,
|
||||
|
||||
// last message count field:
|
||||
LAST_MESSAGE_COUNT,
|
||||
|
||||
+9
-4
@@ -37,8 +37,8 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
DBCollection stConfigs = database.getCollection(CollectionNames.SWISSTIMING_CONFIGURATIONS.name());
|
||||
for (DBObject o : stConfigs.find()) {
|
||||
SwissTimingConfiguration stConfig = loadSwissTimingConfiguration(o);
|
||||
// the old swisstiming config was not based on a json URL -> ignore such configs
|
||||
if(stConfig.getJsonURL() != null) {
|
||||
// the old SwissTiming configuration was not based on a JSON URL -> ignore such configurations
|
||||
if (stConfig.getJsonURL() != null) {
|
||||
result.add(stConfig);
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,10 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
String jsonURL = (String) object.get(FieldNames.ST_CONFIG_JSON_URL.name());
|
||||
String hostname = (String) object.get(FieldNames.ST_CONFIG_HOSTNAME.name());
|
||||
Integer port = (Integer) object.get(FieldNames.ST_CONFIG_PORT.name());
|
||||
|
||||
return swissTimingFactory.createSwissTimingConfiguration(name, jsonURL, hostname, port);
|
||||
String updateURL = (String) object.get(FieldNames.ST_CONFIG_UPDATE_URL.name());
|
||||
String updateUsername = (String) object.get(FieldNames.ST_CONFIG_UPDATE_USERNAME.name());
|
||||
String updatePassword = (String) object.get(FieldNames.ST_CONFIG_UPDATE_PASSWORD.name());
|
||||
return swissTimingFactory.createSwissTimingConfiguration(name, jsonURL, hostname, port, updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,6 +98,9 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
result.put(FieldNames.ST_CONFIG_JSON_URL.name(), swissTimingConfiguration.getJsonURL());
|
||||
result.put(FieldNames.ST_CONFIG_HOSTNAME.name(), swissTimingConfiguration.getHostname());
|
||||
result.put(FieldNames.ST_CONFIG_PORT.name(), swissTimingConfiguration.getPort());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_URL.name(), swissTimingConfiguration.getUpdateURL());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_USERNAME.name(), swissTimingConfiguration.getUpdateUsername());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_PASSWORD.name(), swissTimingConfiguration.getUpdatePassword());
|
||||
|
||||
stConfigCollection.insert(result);
|
||||
}
|
||||
|
||||
+10
-1
@@ -54,6 +54,9 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
private static final String PORT = "port";
|
||||
private static final String BOAT_CLASS_NAME = "boatClassName";
|
||||
private static final String HOSTNAME = "hostname";
|
||||
private static final String UPDATE_URL = "updateURL";
|
||||
private static final String UPDATE_USERNAME = "updateUsername";
|
||||
private static final String UPDATE_PASSWORD = "updatePassword";
|
||||
private final RaceLogStore raceLogStore;
|
||||
private final RegattaLogStore regattaLogStore;
|
||||
private final DomainFactory domainFactory;
|
||||
@@ -78,6 +81,9 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
result.put(START_LIST, createStartListDBObject(stParams));
|
||||
result.put(DELAY_TO_LIVE_IN_MILLIS, stParams.getDelayToLiveInMillis());
|
||||
result.put(USE_INTERNAL_MARK_PASSING_ALGORITHM, stParams.isUseInternalMarkPassingAlgorithm());
|
||||
result.put(UPDATE_URL, stParams.getUpdateURL());
|
||||
result.put(UPDATE_USERNAME, stParams.getUpdateUsername());
|
||||
result.put(UPDATE_PASSWORD, stParams.getUpdatePassword());
|
||||
addWindTrackingParameters(stParams, result);
|
||||
return result;
|
||||
}
|
||||
@@ -175,7 +181,10 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
map.get(START_LIST) == null ? null : createStartListFromDBObject((String) map.get(RACE_ID), (BasicDBList) map.get(START_LIST)),
|
||||
((Number) map.get(DELAY_TO_LIVE_IN_MILLIS)).longValue(),
|
||||
swissTimingFactory, domainFactory, raceLogStore, regattaLogStore,
|
||||
(boolean) map.get(USE_INTERNAL_MARK_PASSING_ALGORITHM), isTrackWind(map), isCorrectWindDirectionByMagneticDeclination(map));
|
||||
(boolean) map.get(USE_INTERNAL_MARK_PASSING_ALGORITHM), isTrackWind(map), isCorrectWindDirectionByMagneticDeclination(map),
|
||||
(String) map.get(UPDATE_URL),
|
||||
(String) map.get(UPDATE_USERNAME),
|
||||
(String) map.get(UPDATE_PASSWORD));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -18,6 +19,7 @@ import com.sap.sailing.domain.common.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.racelog.RaceLogStore;
|
||||
import com.sap.sailing.domain.regattalog.RegattaLogStore;
|
||||
import com.sap.sailing.domain.swisstimingadapter.impl.DomainFactoryImpl;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.RaceTrackingConnectivityParameters;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
@@ -70,10 +72,17 @@ public interface DomainFactory {
|
||||
RaceTrackingConnectivityParameters createTrackingConnectivityParameters(String hostname, int port, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, StartList startList,
|
||||
long delayToLiveInMillis, SwissTimingFactory swissTimingFactory, DomainFactory domainFactory,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination);
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword);
|
||||
|
||||
ControlPoint getOrCreateControlPoint(String description, Iterable<Serializable> deviceIds, MarkType markType);
|
||||
|
||||
RaceDefinition createRaceDefinition(Regatta regatta, String swissTimingRaceID, Map<Competitor, Boat> competitorsAndBoats,
|
||||
List<ControlPoint> courseDefinition, String raceName, String raceIdForRaceDefinition);
|
||||
|
||||
/**
|
||||
* Adds update handlers that forward events about a race, such as start time changes, course changes
|
||||
* or postponents, to an update URL using specific REST requests.
|
||||
*/
|
||||
void addUpdateHandlers(String updateURL, String username, String password, Serializable eventId,
|
||||
RaceDefinition raceDefinition, DynamicTrackedRace trackedRace) throws URISyntaxException;
|
||||
}
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,9 +17,9 @@ public interface SailMasterListener {
|
||||
|
||||
void receivedClockAtMark(String raceID, List<Util.Triple<Integer, TimePoint, String>> markIndicesTimePointsAndBoatIDs);
|
||||
|
||||
void receivedStartList(String raceID, StartList startList);
|
||||
void receivedStartList(String raceID, StartList startList) throws URISyntaxException;
|
||||
|
||||
void receivedCourseConfiguration(String raceID, Course course);
|
||||
void receivedCourseConfiguration(String raceID, Course course) throws URISyntaxException;
|
||||
|
||||
void receivedAvailableRaces(Iterable<Race> races);
|
||||
|
||||
|
||||
+1
-3
@@ -26,12 +26,10 @@ public interface SwissTimingAdapter {
|
||||
* is specified, a regatta lookup is performed with that identifier; if the regatta is found, it is used
|
||||
* to add the races to. Otherwise, a default regatta as described above will be created and used.
|
||||
* @param useInternalMarkPassingAlgorithm use our own instead of the SwissTiming-provided mark passing / split times
|
||||
* @param trackWind TODO
|
||||
* @param correctWindDirectionByMagneticDeclination TODO
|
||||
*/
|
||||
RaceHandle addSwissTimingRace(TrackerManager trackerManager, RegattaIdentifier regattaToAddTo, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, String hostname, int port,
|
||||
StartList startList, RaceLogStore logStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination)
|
||||
StartList startList, RaceLogStore logStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException, Exception;
|
||||
|
||||
StartList readStartListForRace(String raceId, RegattaResults regattaResults);
|
||||
|
||||
+6
@@ -14,4 +14,10 @@ public interface SwissTimingConfiguration {
|
||||
String getHostname();
|
||||
|
||||
Integer getPort();
|
||||
|
||||
String getUpdateURL();
|
||||
|
||||
String getUpdateUsername();
|
||||
|
||||
String getUpdatePassword();
|
||||
}
|
||||
+6
-12
@@ -49,20 +49,14 @@ public interface SwissTimingFactory {
|
||||
|
||||
SailMasterTransceiver createSailMasterTransceiver();
|
||||
|
||||
SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port);
|
||||
SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword);
|
||||
|
||||
SwissTimingRaceTracker createRaceTracker(String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams) throws InterruptedException, UnknownHostException,
|
||||
IOException, ParseException;
|
||||
SwissTimingRaceTracker createRaceTracker(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException;
|
||||
|
||||
RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
RaceTracker createRaceTracker(Regatta regatta, WindStore windStore, DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogResolver raceLogResolver, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException;
|
||||
|
||||
Race createRace(String raceId, String raceName, String description, BoatClass boatClass);
|
||||
|
||||
+29
-2
@@ -1,6 +1,8 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
@@ -50,9 +52,14 @@ import com.sap.sailing.domain.swisstimingadapter.RaceType;
|
||||
import com.sap.sailing.domain.swisstimingadapter.RaceType.OlympicRaceCode;
|
||||
import com.sap.sailing.domain.swisstimingadapter.StartList;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingFactory;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.RaceTrackingConnectivityParameters;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sse.common.Named;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
@@ -402,9 +409,29 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
String raceID, String raceName, String raceDescription, BoatClass boatClass, StartList startList,
|
||||
long delayToLiveInMillis, SwissTimingFactory swissTimingFactory, DomainFactory domainFactory,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm,
|
||||
boolean trackWind, boolean correctWindDirectionByMagneticDeclination) {
|
||||
boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL,
|
||||
String updateUsername, String updatePassword) {
|
||||
return new SwissTimingTrackingConnectivityParameters(hostname, port, raceID, raceName, raceDescription,
|
||||
boatClass, startList, delayToLiveInMillis, swissTimingFactory, domainFactory, raceLogStore,
|
||||
regattaLogStore, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination);
|
||||
regattaLogStore, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination,
|
||||
updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUpdateHandlers(String updateURL, String username, String password, Serializable eventId,
|
||||
RaceDefinition raceDefinition, DynamicTrackedRace trackedRace) throws URISyntaxException {
|
||||
final URI updateURI = new URI(updateURL);
|
||||
CourseDesignUpdateHandler courseDesignHandler = new CourseDesignUpdateHandler(
|
||||
updateURI, username, password, eventId, raceDefinition.getId());
|
||||
StartTimeUpdateHandler startTimeHandler = new StartTimeUpdateHandler(
|
||||
updateURI, username, password, eventId,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
RaceAbortedHandler raceAbortedHandler = new RaceAbortedHandler(
|
||||
updateURI, username, password, eventId,
|
||||
raceDefinition.getId());
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler = new FinishTimeUpdateHandler(updateURI, username, password, eventId,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
baseDomainFactory.addUpdateHandlers(trackedRace, courseDesignHandler, startTimeHandler, raceAbortedHandler,
|
||||
finishTimeUpdateHandler);
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -69,12 +69,13 @@ public class SwissTimingAdapterImpl implements SwissTimingAdapter {
|
||||
public RaceHandle addSwissTimingRace(TrackerManager trackerManager, RegattaIdentifier regattaToAddTo, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, String hostname, int port,
|
||||
StartList startList, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds,
|
||||
boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) throws Exception {
|
||||
boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination,
|
||||
String updateURL, String updateUsername, String updatePassword) throws Exception {
|
||||
return trackerManager.addRace(regattaToAddTo,
|
||||
swissTimingDomainFactory.createTrackingConnectivityParameters(hostname, port, raceID, raceName,
|
||||
raceDescription, boatClass, startList, DEFAULT_SWISSTIMING_LIVE_DELAY_IN_MILLISECONDS,
|
||||
swissTimingFactory, swissTimingDomainFactory, raceLogStore, regattaLogStore,
|
||||
useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination),
|
||||
useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination, updateURL, updateUsername, updatePassword),
|
||||
timeoutInMilliseconds);
|
||||
}
|
||||
|
||||
@@ -118,9 +119,9 @@ public class SwissTimingAdapterImpl implements SwissTimingAdapter {
|
||||
Person person = persons.get(crewMember.getPersonID());
|
||||
crew.add(new CrewMemberImpl(
|
||||
person.getGivenName() + " " + person.getFamilyName(),
|
||||
person.getNOC().name(), crewMember.getPosition().name()));
|
||||
(person.getNOC()==null)?null:(person.getNOC().name()), crewMember.getPosition().name()));
|
||||
}
|
||||
String nationality = team.getNOC().name();
|
||||
String nationality = team.getNOC()==null?null:team.getNOC().name();
|
||||
CompetitorWithID competitor = new CompetitorWithID(team.getTeamID(),
|
||||
boat.getSailNumber(), nationality, team.getTeamName(), crew);
|
||||
competitors.add(competitor);
|
||||
|
||||
+18
-1
@@ -7,13 +7,19 @@ public class SwissTimingConfigurationImpl implements SwissTimingConfiguration {
|
||||
private final String jsonURL;
|
||||
private final String hostname;
|
||||
private final Integer port;
|
||||
private final String updateURL;
|
||||
private final String updateUsername;
|
||||
private final String updatePassword;
|
||||
|
||||
public SwissTimingConfigurationImpl(String name, String jsonURL, String hostname, Integer port) {
|
||||
public SwissTimingConfigurationImpl(String name, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.jsonURL = jsonURL;
|
||||
this.hostname = hostname;
|
||||
this.port = port;
|
||||
this.updateURL = updateURL;
|
||||
this.updateUsername = updateUsername;
|
||||
this.updatePassword = updatePassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,4 +42,15 @@ public class SwissTimingConfigurationImpl implements SwissTimingConfiguration {
|
||||
return port;
|
||||
}
|
||||
|
||||
public String getUpdateURL() {
|
||||
return updateURL;
|
||||
}
|
||||
|
||||
public String getUpdateUsername() {
|
||||
return updateUsername;
|
||||
}
|
||||
|
||||
public String getUpdatePassword() {
|
||||
return updatePassword;
|
||||
}
|
||||
}
|
||||
+11
-17
@@ -17,7 +17,6 @@ import com.sap.sailing.domain.swisstimingadapter.Race;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterConnector;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterMessage;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterTransceiver;
|
||||
import com.sap.sailing.domain.swisstimingadapter.StartList;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingArchiveConfiguration;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingConfiguration;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingFactory;
|
||||
@@ -83,32 +82,27 @@ public class SwissTimingFactoryImpl implements SwissTimingFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port) {
|
||||
return new SwissTimingConfigurationImpl(name, jsonURL, hostname, port);
|
||||
public SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname,
|
||||
Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
return new SwissTimingConfigurationImpl(name, jsonURL, hostname, port, updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwissTimingRaceTracker createRaceTracker(String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
public SwissTimingRaceTracker createRaceTracker(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
WindStore windStore, DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
return new SwissTimingRaceTrackerImpl(raceID, raceName, raceDescription, boatClass, hostname, port, startList,
|
||||
raceLogStore, regattaLogStore, windStore, domainFactory, this,
|
||||
trackedRegattaRegistry, raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
return new SwissTimingRaceTrackerImpl(raceLogStore, regattaLogStore, windStore, domainFactory, this,
|
||||
trackedRegattaRegistry, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
public RaceTracker createRaceTracker(Regatta regatta, WindStore windStore, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException {
|
||||
return new SwissTimingRaceTrackerImpl(regatta, raceID, raceName, raceDescription, boatClass, hostname, port,
|
||||
startList, windStore, domainFactory, this, trackedRegattaRegistry, raceLogStore, regattaLogStore,
|
||||
raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
return new SwissTimingRaceTrackerImpl(regatta, windStore, domainFactory, this, trackedRegattaRegistry,
|
||||
raceLogStore, regattaLogStore, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+52
-28
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.swisstimingadapter.impl;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Collection;
|
||||
@@ -63,6 +64,7 @@ import com.sap.sailing.domain.tracking.TrackingDataLoader;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.domain.tracking.impl.TrackedRaceStatusImpl;
|
||||
import com.sap.sailing.domain.tracking.impl.UpdateHandler;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
@@ -110,23 +112,30 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
private final TMDMessageQueue tmdMessageQueue;
|
||||
|
||||
private final RaceLogResolver raceLogResolver;
|
||||
|
||||
/**
|
||||
* If set to a non-{@code null}, non-{@link String#isEmpty() empty} value, updates about start time changes, course
|
||||
* changes, etc. will be sent as REST requests to this URL, using the {@link #updateUsername} /
|
||||
* {@link #updatePassword} as credentials.
|
||||
*/
|
||||
private final String updateURL;
|
||||
|
||||
private final String updateUsername;
|
||||
|
||||
private final String updatePassword;
|
||||
|
||||
protected SwissTimingRaceTrackerImpl(String raceID, String raceName, String raceDescription, BoatClass boatClass,
|
||||
String hostname, int port, StartList startList, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
protected SwissTimingRaceTrackerImpl(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
WindStore windStore, DomainFactory domainFactory, SwissTimingFactory factory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, long delayToLiveInMillis,
|
||||
boolean useInternalMarkPassingAlgorithm, SwissTimingTrackingConnectivityParameters connectivityParams) throws InterruptedException,
|
||||
UnknownHostException, IOException, ParseException {
|
||||
this(/* regatta */ null, raceID, raceName, raceDescription, boatClass, hostname, port, startList, windStore,
|
||||
domainFactory, factory, trackedRegattaRegistry, raceLogStore, regattaLogStore, raceLogResolver,
|
||||
delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver,
|
||||
SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
this(/* regatta */ null, windStore, domainFactory, factory, trackedRegattaRegistry, raceLogStore, regattaLogStore, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
protected SwissTimingRaceTrackerImpl(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, WindStore windStore,
|
||||
DomainFactory domainFactory, SwissTimingFactory factory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, RaceLogResolver raceLogResolver,
|
||||
long delayToLiveInMillis, boolean useInternalMarkPassingAlgorithm, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
protected SwissTimingRaceTrackerImpl(Regatta regatta, WindStore windStore, DomainFactory domainFactory,
|
||||
SwissTimingFactory factory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, RaceLogResolver raceLogResolver,
|
||||
SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
super(connectivityParams);
|
||||
this.raceLogResolver = raceLogResolver;
|
||||
@@ -134,29 +143,33 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
final Regatta effectiveRegatta;
|
||||
// Try to find a pre-associated event based on the Race ID
|
||||
if (regatta == null) {
|
||||
effectiveRegatta = trackedRegattaRegistry.getRememberedRegattaForRace(raceID);
|
||||
effectiveRegatta = trackedRegattaRegistry.getRememberedRegattaForRace(connectivityParams.getRaceID());
|
||||
} else {
|
||||
effectiveRegatta = regatta;
|
||||
}
|
||||
// if regatta is still null, no previous assignment of any of the races in this TracTrac event to a Regatta was
|
||||
// found; in this case, create a default regatta based on the TracTrac event data
|
||||
this.regatta = effectiveRegatta == null ? domainFactory.getOrCreateDefaultRegatta(raceLogStore, regattaLogStore,
|
||||
raceID, boatClass, trackedRegattaRegistry) : effectiveRegatta;
|
||||
this.connector = factory.getOrCreateSailMasterConnector(hostname, port, raceID, raceName, raceDescription, boatClass);
|
||||
connectivityParams.getRaceID(), connectivityParams.getBoatClass(), trackedRegattaRegistry) : effectiveRegatta;
|
||||
this.connector = factory.getOrCreateSailMasterConnector(connectivityParams.getHostname(), connectivityParams.getPort(),
|
||||
connectivityParams.getRaceID(), connectivityParams.getRaceName(), connectivityParams.getRaceDescription(), connectivityParams.getBoatClass());
|
||||
this.domainFactory = domainFactory;
|
||||
this.raceID = raceID;
|
||||
this.raceName = raceName;
|
||||
this.startList = startList;
|
||||
this.startListFromManage2Sail = startList != null;
|
||||
this.raceDescription = raceDescription;
|
||||
this.boatClass = boatClass;
|
||||
this.raceID = connectivityParams.getRaceID();
|
||||
this.raceName = connectivityParams.getRaceName();
|
||||
this.startList = connectivityParams.getStartList();
|
||||
this.startListFromManage2Sail = connectivityParams.getStartList() != null;
|
||||
this.raceDescription = connectivityParams.getRaceDescription();
|
||||
this.boatClass = connectivityParams.getBoatClass();
|
||||
this.windStore = windStore;
|
||||
this.id = createID(raceID, hostname, port);
|
||||
this.id = createID(connectivityParams.getRaceID(), connectivityParams.getHostname(), connectivityParams.getPort());
|
||||
connector.addSailMasterListener(this);
|
||||
trackedRegatta = trackedRegattaRegistry.getOrCreateTrackedRegatta(this.regatta);
|
||||
this.delayToLiveInMillis = delayToLiveInMillis;
|
||||
this.delayToLiveInMillis = connectivityParams.getDelayToLiveInMillis();
|
||||
this.competitorsByBoatId = new HashMap<String, Competitor>();
|
||||
this.useInternalMarkPassingAlgorithm = useInternalMarkPassingAlgorithm;
|
||||
this.useInternalMarkPassingAlgorithm = connectivityParams.isUseInternalMarkPassingAlgorithm();
|
||||
this.updateURL = connectivityParams.getUpdateURL();
|
||||
this.updateUsername = connectivityParams.getUpdateUsername();
|
||||
this.updatePassword = connectivityParams.getUpdatePassword();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -406,7 +419,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivedStartList(String raceID, StartList startList) {
|
||||
public void receivedStartList(String raceID, StartList startList) throws URISyntaxException {
|
||||
// ignore STL messages if the startlist has been already provided by Manage2Sail
|
||||
if (!startListFromManage2Sail && this.raceID.equals(raceID)) {
|
||||
StartList oldStartList = this.startList;
|
||||
@@ -435,7 +448,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
}
|
||||
|
||||
private void createRaceDefinition(Course course) {
|
||||
private void createRaceDefinition(Course course) throws URISyntaxException {
|
||||
assert this.raceID.equals(raceID);
|
||||
assert startList != null;
|
||||
assert course != null;
|
||||
@@ -465,9 +478,20 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
}, useInternalMarkPassingAlgorithm, raceLogResolver,
|
||||
/* Not needed because the RaceTracker is not active on a replica */ Optional.empty());
|
||||
addUpdateHandlers();
|
||||
notifyRaceCreationListeners();
|
||||
logger.info("Created SwissTiming RaceDefinition and TrackedRace for "+race.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* If a non-{@code null}, non-{@link String#isEmpty() empty} {@link #updateURL} is set, adds {@link UpdateHandler}s
|
||||
* to the race that will forward changes to the race such as start time changes or course changes to the URL as REST
|
||||
* requests.
|
||||
*/
|
||||
private void addUpdateHandlers() throws URISyntaxException {
|
||||
getDomainFactory().addUpdateHandlers(updateURL, updateUsername, updatePassword,
|
||||
/* TODO using the regatta ID as the "eventId" for now... */ regatta.getId(), trackedRace.getRace(), trackedRace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if {@link #getRegatta()} still contains the {@link RaceDefinition} obtained when calling
|
||||
@@ -481,7 +505,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivedCourseConfiguration(String raceID, Course course) {
|
||||
public void receivedCourseConfiguration(String raceID, Course course) throws URISyntaxException {
|
||||
Course oldCourse = this.course;
|
||||
if (trackedRace == null) {
|
||||
if (oldCourse == null && startList != null) {
|
||||
|
||||
+24
-8
@@ -31,11 +31,15 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
private final long delayToLiveInMillis;
|
||||
private final StartList startList;
|
||||
private final boolean useInternalMarkPassingAlgorithm;
|
||||
private final String updateURL;
|
||||
private final String updateUsername;
|
||||
private final String updatePassword;
|
||||
|
||||
public SwissTimingTrackingConnectivityParameters(String hostname, int port, String raceID, String raceName,
|
||||
String raceDescription, BoatClass boatClass, StartList startList, long delayToLiveInMillis,
|
||||
SwissTimingFactory swissTimingFactory, DomainFactory domainFactory, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) {
|
||||
RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind,
|
||||
boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword) {
|
||||
super(trackWind, correctWindDirectionByMagneticDeclination);
|
||||
this.hostname = hostname;
|
||||
this.port = port;
|
||||
@@ -50,6 +54,9 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
this.raceLogStore = raceLogStore;
|
||||
this.regattaLogStore = regattaLogStore;
|
||||
this.useInternalMarkPassingAlgorithm = useInternalMarkPassingAlgorithm;
|
||||
this.updateURL = updateURL;
|
||||
this.updateUsername = updateUsername;
|
||||
this.updatePassword = updatePassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,18 +67,15 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(TrackedRegattaRegistry trackedRegattaRegistry, WindStore windStore,
|
||||
RaceLogResolver raceLogResolver, LeaderboardGroupResolver leaderboardGroupResolver, long timeoutInMilliseconds) throws Exception {
|
||||
return swissTimingFactory.createRaceTracker(raceID, raceName, raceDescription, boatClass, hostname, port,
|
||||
startList, delayToLiveInMillis, raceLogStore, regattaLogStore, windStore,
|
||||
useInternalMarkPassingAlgorithm,
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver, this);
|
||||
return swissTimingFactory.createRaceTracker(raceLogStore, regattaLogStore, windStore, domainFactory, trackedRegattaRegistry, raceLogResolver,
|
||||
this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(Regatta regatta, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
WindStore windStore, RaceLogResolver raceLogResolver, LeaderboardGroupResolver leaderboardGroupResolver, long timeoutInMilliseconds) throws Exception {
|
||||
return swissTimingFactory.createRaceTracker(regatta, raceID, raceName, raceDescription, boatClass, hostname,
|
||||
port, startList, delayToLiveInMillis, windStore, useInternalMarkPassingAlgorithm,
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver, raceLogStore, regattaLogStore, this);
|
||||
return swissTimingFactory.createRaceTracker(regatta, windStore, domainFactory, trackedRegattaRegistry, raceLogResolver, raceLogStore,
|
||||
regattaLogStore, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,6 +96,18 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
return port;
|
||||
}
|
||||
|
||||
public String getUpdateURL() {
|
||||
return updateURL;
|
||||
}
|
||||
|
||||
public String getUpdateUsername() {
|
||||
return updateUsername;
|
||||
}
|
||||
|
||||
public String getUpdatePassword() {
|
||||
return updatePassword;
|
||||
}
|
||||
|
||||
public String getRaceID() {
|
||||
return raceID;
|
||||
}
|
||||
|
||||
+10
-8
@@ -14,8 +14,8 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -73,6 +73,9 @@ import com.sap.sailing.domain.tracking.TrackedRegatta;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.domain.tractracadapter.JSONService;
|
||||
import com.sap.sailing.domain.tractracadapter.MetadataParser;
|
||||
@@ -677,17 +680,16 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
TracTracCourseDesignUpdateHandler courseDesignHandler = new TracTracCourseDesignUpdateHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), tractracRace, this);
|
||||
trackedRace.addCourseDesignChangedListener(courseDesignHandler);
|
||||
TracTracStartTimeUpdateHandler startTimeHandler = new TracTracStartTimeUpdateHandler(
|
||||
StartTimeUpdateHandler startTimeHandler = new StartTimeUpdateHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
trackedRace.addStartTimeChangedListener(startTimeHandler);
|
||||
TracTracRaceAbortedHandler raceAbortedHandler = new TracTracRaceAbortedHandler(
|
||||
RaceAbortedHandler raceAbortedHandler = new RaceAbortedHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId());
|
||||
trackedRace.addRaceAbortedListener(raceAbortedHandler);
|
||||
trackedRace.addListener(new TracTracFinishTimeUpdateHandler(tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta()).getListener());
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler = new FinishTimeUpdateHandler(tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
baseDomainFactory.addUpdateHandlers(trackedRace, courseDesignHandler, startTimeHandler, raceAbortedHandler,
|
||||
finishTimeUpdateHandler);
|
||||
}
|
||||
|
||||
private DynamicTrackedRace createTrackedRace(TrackedRegatta trackedRegatta, RaceDefinition race,
|
||||
|
||||
+9
-7
@@ -251,17 +251,19 @@ public class RaceCourseReceiver extends AbstractReceiverWithQueue<IControlRoute,
|
||||
}
|
||||
}
|
||||
|
||||
private DynamicTrackedRace createTrackedRace(RaceDefinition race, Iterable<Sideline> sidelines, Consumer<DynamicTrackedRace> runAfterCreatingTrackedRace) {
|
||||
DynamicTrackedRace trackedRace = getTrackedRegatta().createTrackedRace(race, sidelines,
|
||||
windStore, delayToLiveInMillis, millisecondsOverWhichToAverageWind,
|
||||
/* time over which to average speed: */ race.getBoatClass().getApproximateManeuverDurationInMilliseconds(),
|
||||
private DynamicTrackedRace createTrackedRace(RaceDefinition race, Iterable<Sideline> sidelines,
|
||||
Consumer<DynamicTrackedRace> runAfterCreatingTrackedRace) {
|
||||
DynamicTrackedRace trackedRace = getTrackedRegatta().createTrackedRace(race, sidelines, windStore,
|
||||
delayToLiveInMillis, millisecondsOverWhichToAverageWind,
|
||||
/* time over which to average speed: */ race.getBoatClass()
|
||||
.getApproximateManeuverDurationInMilliseconds(),
|
||||
raceDefinitionSetToUpdate, useInternalMarkPassingAlgorithm, raceLogResolver,
|
||||
/* Not needed because the RaceTracker is not active on a replica */ Optional.empty());
|
||||
if (runAfterCreatingTrackedRace != null) {
|
||||
runAfterCreatingTrackedRace.accept(trackedRace);
|
||||
runAfterCreatingTrackedRace.accept(trackedRace);
|
||||
}
|
||||
getDomainFactory().addTracTracUpdateHandlers(tracTracUpdateURI, getTracTracEvent().getId(), tracTracUsername, tracTracPassword, race, trackedRace,
|
||||
tractracRace);
|
||||
getDomainFactory().addTracTracUpdateHandlers(tracTracUpdateURI, getTracTracEvent().getId(), tracTracUsername,
|
||||
tracTracPassword, race, trackedRace, tractracRace);
|
||||
return trackedRace;
|
||||
}
|
||||
|
||||
|
||||
+4
-58
@@ -1,86 +1,32 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.ControlPoint;
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.Waypoint;
|
||||
import com.sap.sailing.domain.base.impl.CourseDataImpl;
|
||||
import com.sap.sailing.domain.tracking.CourseDesignChangedListener;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.ControlPointJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseBaseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.GateJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.MarkJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.WaypointJsonSerializer;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.tractrac.model.lib.api.event.IRace;
|
||||
import com.tractrac.model.lib.api.route.IControl;
|
||||
|
||||
public class TracTracCourseDesignUpdateHandler extends UpdateHandler implements CourseDesignChangedListener {
|
||||
|
||||
private final static String ACTION = "update_course";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracCourseDesignUpdateHandler.class.getName());
|
||||
private final JsonSerializer<CourseBase> courseSerializer;
|
||||
public class TracTracCourseDesignUpdateHandler extends CourseDesignUpdateHandler {
|
||||
private final IRace tractracRace;
|
||||
private final DomainFactory domainFactory;
|
||||
|
||||
public TracTracCourseDesignUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId, IRace tractracRace, DomainFactory domainFactory) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
super(updateURI, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
this.domainFactory = domainFactory;
|
||||
this.tractracRace = tractracRace;
|
||||
this.courseSerializer = new CourseJsonSerializer(
|
||||
new CourseBaseJsonSerializer(
|
||||
new WaypointJsonSerializer(
|
||||
new ControlPointJsonSerializer(
|
||||
new MarkJsonSerializer(),
|
||||
new GateJsonSerializer(new MarkJsonSerializer())))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void courseDesignChanged(final CourseBase newCourseDesign) throws MalformedURLException, IOException {
|
||||
if (!isActive()) {
|
||||
logger.info("Not sending course update to TracTrac because no URL has been provided.");
|
||||
return;
|
||||
}
|
||||
final CourseBase newCourseDesignWithExistingControlPoints = replaceControlPointsByMatchingExistingControlPoints(newCourseDesign);
|
||||
JSONObject serializedCourseDesign = courseSerializer.serialize(newCourseDesignWithExistingControlPoints);
|
||||
String payload = serializedCourseDesign.toJSONString();
|
||||
URL currentCourseDesignURL = buildUpdateURL();
|
||||
logger.info("Using " + currentCourseDesignURL.toString() + " for the course update!");
|
||||
logger.info("Payload is " + payload);
|
||||
HttpURLConnection connection = (HttpURLConnection) currentCourseDesignURL.openConnection();
|
||||
try {
|
||||
setConnectionPropertiesAndSendWithPayload(connection, payload);
|
||||
try {
|
||||
checkAndLogUpdateResponse(connection);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
} else {
|
||||
logger.severe("Connection to TracTrac Course Update URL " + currentCourseDesignURL.toString() + " could not be established");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
protected CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
final Iterable<IControl> candidates = domainFactory.getControlsForCourseArea(tractracRace.getEvent(), tractracRace.getCourseArea());
|
||||
final CourseBase result = new CourseDataImpl(courseDesign.getName());
|
||||
int zeroBasedPosition = 0;
|
||||
|
||||
@@ -47,5 +47,12 @@ Require-Bundle: com.googlecode.java-diff-utils;bundle-version="1.3.0",
|
||||
com.sap.sse.shared.android,
|
||||
org.apache.commons.math,
|
||||
com.sap.sailing.declination,
|
||||
com.sap.sailing.server.gateway.serialization.shared.android,
|
||||
com.sap.sse.datamining.annotations
|
||||
Import-Package: org.apache.http,
|
||||
org.apache.http.client;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.client.entity;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.client.methods;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.impl.client;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.message;version="[4.2.5,4.3.0)"
|
||||
Automatic-Module-Name: com.sap.sailing.domain
|
||||
@@ -21,9 +21,14 @@ import com.sap.sailing.domain.common.dto.TrackedRaceStatisticsDTO;
|
||||
import com.sap.sailing.domain.common.media.MediaTrack;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.ScoringScheme;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sse.common.IsManagedByCache;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
@@ -101,4 +106,11 @@ public interface DomainFactory extends SharedDomainFactory {
|
||||
*/
|
||||
void updateRaceDTOWithTrackedRaceData(TrackedRace trackedRace, RaceDTO raceDTO);
|
||||
|
||||
/**
|
||||
* Adds update handlers to a {@link TrackedRace} which can send updates to a REST service about race status
|
||||
* changes such as a start time change, a course change, or a postponement.
|
||||
*/
|
||||
void addUpdateHandlers(DynamicTrackedRace trackedRace, CourseDesignUpdateHandler courseDesignHandler,
|
||||
StartTimeUpdateHandler startTimeHandler, RaceAbortedHandler raceAbortedHandler,
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler);
|
||||
}
|
||||
+22
-24
@@ -11,6 +11,8 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -60,15 +62,15 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
private TrackedRaces trackedRaces;
|
||||
private Map<Fleet, RaceIdentifier> raceIdentifiers;
|
||||
|
||||
private Map<Fleet, RaceLog> raceLogs;
|
||||
|
||||
private ConcurrentMap<Fleet, RaceLog> raceLogs;
|
||||
|
||||
private transient RaceLogStore raceLogStore;
|
||||
private RegattaLikeIdentifier regattaLikeParent;
|
||||
|
||||
public AbstractRaceColumn() {
|
||||
this.trackedRaces = new TrackedRaces();
|
||||
this.raceIdentifiers = new HashMap<Fleet, RaceIdentifier>();
|
||||
this.raceLogs = new HashMap<Fleet, RaceLog>();
|
||||
this.raceLogs = new ConcurrentHashMap<Fleet, RaceLog>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,9 +84,7 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
|
||||
@Override
|
||||
public RaceLog getRaceLog(Fleet fleet) {
|
||||
synchronized (raceLogs) {
|
||||
return raceLogs.get(fleet);
|
||||
}
|
||||
return raceLogs.get(fleet);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -197,25 +197,23 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
|
||||
@Override
|
||||
public void reloadRaceLog(Fleet fleet) {
|
||||
synchronized (raceLogs) {
|
||||
RaceLogIdentifier identifier = getRaceLogIdentifier(fleet);
|
||||
RaceLog newOrLoadedRaceLog = raceLogStore.getRaceLog(identifier, /* ignoreCache */true);
|
||||
RaceLog raceLogAvailable = raceLogs.get(fleet);
|
||||
if (raceLogAvailable == null) {
|
||||
RaceColumnRaceLogReplicator listener = new RaceColumnRaceLogReplicator(this, identifier);
|
||||
// FIXME Wouldn't this skip any listener notifications that a merge below would trigger if the race log already existed?
|
||||
// FIXME For example, how about the race log-provided score corrections that need application to the leaderboard and replication?
|
||||
newOrLoadedRaceLog.addListener(listener);
|
||||
raceLogs.put(fleet, newOrLoadedRaceLog);
|
||||
final TrackedRace trackedRace = getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
// need to attach race log
|
||||
trackedRace.attachRaceLog(newOrLoadedRaceLog);
|
||||
}
|
||||
} else {
|
||||
// now add all race log events from newOrLoadedRaceLog that are not already in raceLogAvailable
|
||||
raceLogAvailable.merge(newOrLoadedRaceLog);
|
||||
RaceLogIdentifier identifier = getRaceLogIdentifier(fleet);
|
||||
RaceLog newOrLoadedRaceLog = raceLogStore.getRaceLog(identifier, /* ignoreCache */true);
|
||||
RaceLog raceLogAvailable = raceLogs.get(fleet);
|
||||
if (raceLogAvailable == null) {
|
||||
RaceColumnRaceLogReplicator listener = new RaceColumnRaceLogReplicator(this, identifier);
|
||||
// FIXME Wouldn't this skip any listener notifications that a merge below would trigger if the race log already existed?
|
||||
// FIXME For example, how about the race log-provided score corrections that need application to the leaderboard and replication?
|
||||
newOrLoadedRaceLog.addListener(listener);
|
||||
raceLogs.put(fleet, newOrLoadedRaceLog);
|
||||
final TrackedRace trackedRace = getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
// need to attach race log
|
||||
trackedRace.attachRaceLog(newOrLoadedRaceLog);
|
||||
}
|
||||
} else {
|
||||
// now add all race log events from newOrLoadedRaceLog that are not already in raceLogAvailable
|
||||
raceLogAvailable.merge(newOrLoadedRaceLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-1
@@ -64,11 +64,16 @@ import com.sap.sailing.domain.leaderboard.impl.LowPointTieBreakBasedOnLastSeries
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWinnerGetsZero;
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWithAutomaticRDG;
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWithEliminationsAndRoundsWinnerGets07;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.MarkPassingImpl;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.TrackedRaceImpl;
|
||||
import com.sap.sailing.geocoding.ReverseGeocoder;
|
||||
import com.sap.sse.common.Distance;
|
||||
@@ -201,11 +206,12 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
assert trackedRace != null;
|
||||
raceDTO.startOfRace = trackedRace.getStartOfRace() == null ? null : trackedRace.getStartOfRace().asDate();
|
||||
raceDTO.endOfRace = trackedRace.getEndOfRace() == null ? null : trackedRace.getEndOfRace().asDate();
|
||||
raceDTO.raceFinishedTime = trackedRace.getFinishedTime() == null ? null : trackedRace.getFinishedTime().asDate();
|
||||
raceDTO.status = new RaceStatusDTO();
|
||||
raceDTO.status.status = trackedRace.getStatus() == null ? null : trackedRace.getStatus().getStatus();
|
||||
raceDTO.status.loadingProgress = trackedRace.getStatus() == null ? 0.0 : trackedRace.getStatus().getLoadingProgress();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TrackedRaceDTO createTrackedRaceDTO(TrackedRace trackedRace) {
|
||||
TrackedRaceDTO trackedRaceDTO = new TrackedRaceDTO();
|
||||
@@ -394,6 +400,7 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitorAndBoatDTO> getCompetitorDTOList(List<Pair<Competitor, Boat>> competitors) {
|
||||
List<CompetitorAndBoatDTO> result = new ArrayList<>();
|
||||
for (Pair<Competitor, Boat> competitorAndBoat : competitors) {
|
||||
@@ -401,4 +408,14 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUpdateHandlers(DynamicTrackedRace trackedRace, CourseDesignUpdateHandler courseDesignHandler,
|
||||
StartTimeUpdateHandler startTimeHandler, RaceAbortedHandler raceAbortedHandler,
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler) {
|
||||
trackedRace.addCourseDesignChangedListener(courseDesignHandler);
|
||||
trackedRace.addStartTimeChangedListener(startTimeHandler);
|
||||
trackedRace.addRaceAbortedListener(raceAbortedHandler);
|
||||
trackedRace.addListener(finishTimeUpdateHandler.getListener());
|
||||
}
|
||||
}
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.tracking.CourseDesignChangedListener;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.ControlPointJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseBaseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.GateJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.MarkJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.WaypointJsonSerializer;
|
||||
|
||||
public class CourseDesignUpdateHandler extends UpdateHandler implements CourseDesignChangedListener {
|
||||
|
||||
private final static String ACTION = "update_course";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(CourseDesignUpdateHandler.class.getName());
|
||||
private final JsonSerializer<CourseBase> courseSerializer;
|
||||
|
||||
public CourseDesignUpdateHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
this.courseSerializer = new CourseJsonSerializer(
|
||||
new CourseBaseJsonSerializer(
|
||||
new WaypointJsonSerializer(
|
||||
new ControlPointJsonSerializer(
|
||||
new MarkJsonSerializer(),
|
||||
new GateJsonSerializer(new MarkJsonSerializer())))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void courseDesignChanged(final CourseBase newCourseDesign) throws MalformedURLException, IOException {
|
||||
if (!isActive()) {
|
||||
logger.info("Not sending course update to TracTrac because no URL has been provided.");
|
||||
return;
|
||||
}
|
||||
final CourseBase newCourseDesignWithExistingControlPoints = replaceControlPointsByMatchingExistingControlPoints(newCourseDesign);
|
||||
JSONObject serializedCourseDesign = courseSerializer.serialize(newCourseDesignWithExistingControlPoints);
|
||||
String payload = serializedCourseDesign.toJSONString();
|
||||
URL currentCourseDesignURL = buildUpdateURL();
|
||||
logger.info("Using " + currentCourseDesignURL.toString() + " for the course update!");
|
||||
logger.info("Payload is " + payload);
|
||||
HttpURLConnection connection = (HttpURLConnection) currentCourseDesignURL.openConnection();
|
||||
try {
|
||||
setConnectionPropertiesAndSendWithPayload(connection, payload);
|
||||
try {
|
||||
checkAndLogUpdateResponse(connection);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
} else {
|
||||
logger.severe("Connection to TracTrac Course Update URL " + currentCourseDesignURL.toString() + " could not be established");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This default implementation returns the {@code courseDesign} unchanged. Subclasses have the possibility to
|
||||
* override this method in order to replace individual course marks provided in a detailed course design,
|
||||
* based on the actual course marks available.
|
||||
*/
|
||||
protected CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
return courseDesign;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class DynamicTrackedRaceLogListener extends BaseRaceLogEventVisitor {
|
||||
logger.severe("Trying to add " + this + " as listener to a null race log for tracked race " + trackedRace.getRace());
|
||||
} else {
|
||||
raceLog.addListener(this);
|
||||
final ReadonlyRaceState raceState = ReadonlyRaceStateImpl.create(trackedRace.getRaceLogResolver(), raceLog);
|
||||
final ReadonlyRaceState raceState = ReadonlyRaceStateImpl.getOrCreate(trackedRace.getRaceLogResolver(), raceLog);
|
||||
raceLogs.put(raceLog, raceState);
|
||||
raceState.addChangedListener(new BaseRaceStateChangedListener() {
|
||||
@Override
|
||||
|
||||
+6
-7
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -20,12 +20,11 @@ import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.Regatta;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.impl.AbstractRaceChangeListener;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.util.LaxRedirectStrategyForAllRedirectResponseCodes;
|
||||
|
||||
public class TracTracFinishTimeUpdateHandler extends UpdateHandler {
|
||||
private final static Logger logger = Logger.getLogger(TracTracFinishTimeUpdateHandler.class.getName());
|
||||
public class FinishTimeUpdateHandler extends UpdateHandler {
|
||||
private final static Logger logger = Logger.getLogger(FinishTimeUpdateHandler.class.getName());
|
||||
|
||||
private final static String ACTION_STOP_TRACKING = "end_tracking";
|
||||
private final static String FIELD_TRACKING_END_TIME = "tracking_end_time";
|
||||
@@ -36,9 +35,9 @@ public class TracTracFinishTimeUpdateHandler extends UpdateHandler {
|
||||
*/
|
||||
private final Regatta regatta;
|
||||
|
||||
public TracTracFinishTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
Serializable tracTracEventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION_STOP_TRACKING, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public FinishTimeUpdateHandler(URI updateURI, String username, String password,
|
||||
Serializable eventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION_STOP_TRACKING, username, password, eventId, raceId);
|
||||
this.regatta = regatta;
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@@ -15,14 +15,14 @@ import org.json.simple.parser.ParseException;
|
||||
import com.sap.sailing.domain.common.racelog.Flags;
|
||||
import com.sap.sailing.domain.tracking.RaceAbortedListener;
|
||||
|
||||
public class TracTracRaceAbortedHandler extends UpdateHandler implements RaceAbortedListener {
|
||||
public class RaceAbortedHandler extends UpdateHandler implements RaceAbortedListener {
|
||||
|
||||
private final static String ACTION = "update_race_status";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracRaceAbortedHandler.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(RaceAbortedHandler.class.getName());
|
||||
|
||||
public TracTracRaceAbortedHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public RaceAbortedHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@@ -13,14 +13,14 @@ import org.json.simple.parser.ParseException;
|
||||
import com.sap.sailing.domain.tracking.StartTimeChangedListener;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
public class TracTracStartTimeResetHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
public class StartTimeResetHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
|
||||
private static final String ACTION = "resetStartTime";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracStartTimeResetHandler.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(StartTimeResetHandler.class.getName());
|
||||
|
||||
public TracTracStartTimeResetHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public StartTimeResetHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -28,8 +28,8 @@ import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.util.LaxRedirectStrategyForAllRedirectResponseCodes;
|
||||
|
||||
public class TracTracStartTimeUpdateHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
private final static Logger logger = Logger.getLogger(TracTracStartTimeUpdateHandler.class.getName());
|
||||
public class StartTimeUpdateHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
private final static Logger logger = Logger.getLogger(StartTimeUpdateHandler.class.getName());
|
||||
|
||||
private final static String ACTION = "update_race_start_time";
|
||||
private final static String ACTION_START_TRACKING = "start_tracking";
|
||||
@@ -42,7 +42,7 @@ public class TracTracStartTimeUpdateHandler extends UpdateHandler implements Sta
|
||||
*/
|
||||
private final Regatta regatta;
|
||||
|
||||
public TracTracStartTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
public StartTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
Serializable tracTracEventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
this.regatta = regatta;
|
||||
+2
-2
@@ -50,7 +50,7 @@ import com.sap.sailing.domain.abstractlog.race.analyzing.impl.TrackingTimesFinde
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogGateLineOpeningTimeEventImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.RaceState;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.ReadonlyRaceState;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.impl.RaceStateImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.impl.ReadonlyRaceStateImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.racingprocedure.ReadonlyRacingProcedure;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.tracking.analyzing.impl.RegattaLogDefinedMarkAnalyzer;
|
||||
@@ -2975,7 +2975,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
|
||||
synchronized (raceStates) {
|
||||
result = raceStates.get(raceLog);
|
||||
if (result == null) {
|
||||
result = RaceStateImpl.create(raceLogResolver, raceLog);
|
||||
result = ReadonlyRaceStateImpl.getOrCreate(raceLogResolver, raceLog);
|
||||
raceStates.put(raceLog, result);
|
||||
}
|
||||
}
|
||||
|
||||
+28
-21
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -25,21 +25,28 @@ import org.json.simple.JSONObject;
|
||||
import org.json.simple.JSONValue;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sse.common.Duration;
|
||||
|
||||
/**
|
||||
* An update handler can be registered as a listener on a {@link TrackedRace} and can then propagate information to
|
||||
* an external service. This can, e.g., be a tracking partner's system that is interested in receiving race status
|
||||
* updates such as new start times or postponements.
|
||||
*
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
public class UpdateHandler {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(UpdateHandler.class.getName());
|
||||
|
||||
private JsonDeserializer<UpdateResponse> updateDeserializer;
|
||||
private final URI baseURI;
|
||||
private final String tracTracUsername;
|
||||
private final String tracTracPassword;
|
||||
private final Serializable tracTracEventId;
|
||||
private final String username;
|
||||
private final String password;
|
||||
private final Serializable eventId;
|
||||
private final Serializable raceId;
|
||||
private final String action;
|
||||
private final boolean active;
|
||||
@@ -53,16 +60,16 @@ public class UpdateHandler {
|
||||
private final static String ResponseCodeForFailure = "FAILURE";
|
||||
private final static String UpdateUrlTemplate = "%s%s?eventid=%s&raceid=%s&username=%s&password=%s";
|
||||
|
||||
public UpdateHandler(URI updateURI, String action, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
public UpdateHandler(URI updateURI, String action, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
this.baseURI = updateURI;
|
||||
this.action = action;
|
||||
this.tracTracUsername = tracTracUsername;
|
||||
this.tracTracPassword = tracTracPassword;
|
||||
this.tracTracEventId = tracTracEventId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.eventId = eventId;
|
||||
this.raceId = raceId;
|
||||
this.updateDeserializer = new UpdateResponseDeserializer();
|
||||
if (updateURI != null && !updateURI.toString().equals("")) {
|
||||
logger.info("Activating TracTrac update handler "+this+" for race with ID "+raceId);
|
||||
logger.info("Activating update handler "+this+" for race with ID "+raceId);
|
||||
this.active = true;
|
||||
} else {
|
||||
this.active = false;
|
||||
@@ -87,10 +94,10 @@ public class UpdateHandler {
|
||||
*/
|
||||
protected List<BasicNameValuePair> getDefaultParametersAsNewList() {
|
||||
final List<BasicNameValuePair> result = new ArrayList<>();
|
||||
result.add(new BasicNameValuePair("eventid", tracTracEventId.toString()));
|
||||
result.add(new BasicNameValuePair("eventid", eventId.toString()));
|
||||
result.add(new BasicNameValuePair("raceid", this.raceId.toString()));
|
||||
result.add(new BasicNameValuePair("username", tracTracUsername));
|
||||
result.add(new BasicNameValuePair("password", tracTracPassword));
|
||||
result.add(new BasicNameValuePair("username", username));
|
||||
result.add(new BasicNameValuePair("password", password));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -103,10 +110,10 @@ public class UpdateHandler {
|
||||
String url = String.format(UpdateUrlTemplate,
|
||||
serverUpdateURI.toString(),
|
||||
this.action,
|
||||
URLEncoder.encode(this.tracTracEventId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(this.eventId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(this.raceId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(tracTracUsername, EncodingUtf8),
|
||||
URLEncoder.encode(tracTracPassword, EncodingUtf8));
|
||||
URLEncoder.encode(username, EncodingUtf8),
|
||||
URLEncoder.encode(password, EncodingUtf8));
|
||||
|
||||
for (Entry<String, String> entry : additionalParameters.entrySet()) {
|
||||
url += String.format("&%s=%s",
|
||||
@@ -123,7 +130,7 @@ public class UpdateHandler {
|
||||
protected void checkAndLogUpdateResponse(HttpURLConnection connection) throws IOException, ParseException {
|
||||
connection.setConnectTimeout(10000/*milliseconds*/);
|
||||
connection.connect();
|
||||
BufferedReader reader = getResponseOnUpdateFromTracTrac(connection);
|
||||
BufferedReader reader = getResponseOnUpdateFromProvider(connection);
|
||||
parseAndLogResponse(reader);
|
||||
}
|
||||
|
||||
@@ -133,13 +140,13 @@ public class UpdateHandler {
|
||||
JSONObject responseObject = Helpers.toJSONObjectSafe(responseBody);
|
||||
UpdateResponse updateResponse = updateDeserializer.deserialize(responseObject);
|
||||
if (updateResponse.getStatus().equals(ResponseCodeForFailure)) {
|
||||
logger.severe("Failed to send data to TracTrac, got following response: " + updateResponse.getMessage());
|
||||
logger.severe("Failed to send data to provider, got following response: " + updateResponse.getMessage());
|
||||
} else {
|
||||
logger.info("Successfully sent data to TracTrac with response: " + updateResponse.getMessage());
|
||||
logger.info("Successfully sent data to provider with response: " + updateResponse.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private BufferedReader getResponseOnUpdateFromTracTrac(HttpURLConnection connection) throws IOException {
|
||||
private BufferedReader getResponseOnUpdateFromProvider(HttpURLConnection connection) throws IOException {
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
return reader;
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
package com.sap.sailing.domain.tractracadapter;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
public interface UpdateResponse {
|
||||
|
||||
String getStatus();
|
||||
|
||||
String getMessage();
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
public class UpdateResponseImpl implements UpdateResponse {
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class SailingServiceImplMock extends SailingServiceImpl {
|
||||
public RaceHandle addSwissTimingRace(TrackerManager trackerManager,
|
||||
RegattaIdentifier regattaToAddTo, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, RaceLogStore logStore,
|
||||
RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) throws InterruptedException,
|
||||
RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword) throws InterruptedException,
|
||||
UnknownHostException, IOException, ParseException, Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
||||
+3
-4
@@ -137,12 +137,11 @@ public class AutoplayHelper {
|
||||
RaceTimesInfoDTO raceTimes = raceTimesInfos.get(raceIdentifier);
|
||||
boolean notNullInRequiredValues = raceTimes != null && raceTimes.startOfTracking != null
|
||||
&& raceTimes.getStartOfRace() != null;
|
||||
|
||||
boolean raceHasNotEndedOrOnlyRecentlyEnded = raceTimes.endOfRace == null
|
||||
Date endTime = raceTimes.getFinishedTime() != null ? raceTimes.getFinishedTime() : raceTimes.getEndOfRace();
|
||||
boolean raceHasNotEndedOrOnlyRecentlyEnded = endTime == null
|
||||
|| serverTimeDuringRequest.getTime()
|
||||
- raceTimes.delayToLiveInMs < raceTimes.endOfRace.getTime()
|
||||
- raceTimes.delayToLiveInMs < endTime.getTime()
|
||||
+ waitTimeAfterRaceEndInMillis;
|
||||
|
||||
if (notNullInRequiredValues && raceHasNotEndedOrOnlyRecentlyEnded) {
|
||||
long startTimeInMs = raceTimes.getStartOfRace().getTime();
|
||||
long startIn = startTimeInMs - serverTimeDuringRequest.getTime() - raceTimes.delayToLiveInMs;
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ public class RaceContext {
|
||||
this.fleet = fleet;
|
||||
trackedRace = raceColumn.getTrackedRace(fleet);
|
||||
raceLog = raceColumn.getRaceLog(fleet);
|
||||
state = (raceLog == null) ? null : ReadonlyRaceStateImpl.create(raceLogResolver, raceLog);
|
||||
state = (raceLog == null) ? null : ReadonlyRaceStateImpl.getOrCreate(raceLogResolver, raceLog);
|
||||
}
|
||||
|
||||
private boolean isShowFleetData() {
|
||||
|
||||
+1
@@ -63,6 +63,7 @@ public class MultiRaceLeaderboardSettings extends LeaderboardSettings {
|
||||
newSettings.showAddedScores.setValue(this.isShowAddedScores());
|
||||
newSettings.showCompetitorShortNameColumn.setValue(this.isShowCompetitorShortNameColumn());
|
||||
newSettings.showCompetitorFullNameColumn.setValue(this.isShowCompetitorFullNameColumn());
|
||||
newSettings.showCompetitorBoatInfoColumn.setValue(this.isShowCompetitorBoatInfoColumn());
|
||||
newSettings.isShowCompetitorNationality.setValue(this.isShowCompetitorNationality());
|
||||
newSettings.namesOfRaceColumnsToShow.setValues(this.getNamesOfRaceColumnsToShow());
|
||||
newSettings.namesOfRaceColumnsToShow.setDefaultValues(namesOfRaceColumns);
|
||||
|
||||
+45
-22
@@ -25,6 +25,7 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.IntegerBox;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.PasswordTextBox;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.view.client.ListDataProvider;
|
||||
@@ -62,6 +63,9 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
private final ListBox previousConfigurationsComboBox;
|
||||
private final TextBox eventIdBox;
|
||||
private final TextBox jsonUrlBox;
|
||||
private final TextBox updateURLBox;
|
||||
private final TextBox updateUsernameBox;
|
||||
private final PasswordTextBox updatePasswordBox;
|
||||
private final TextBox hostnameTextbox;
|
||||
private final IntegerBox portIntegerbox;
|
||||
private final List<SwissTimingRaceRecordDTO> availableSwissTimingRaces = new ArrayList<SwissTimingRaceRecordDTO>();
|
||||
@@ -75,22 +79,16 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
RegattaRefresher regattaRefresher, StringMessages stringConstants) {
|
||||
super(sailingService, regattaRefresher, errorReporter, true, stringConstants);
|
||||
this.errorReporter = errorReporter;
|
||||
|
||||
VerticalPanel mainPanel = new VerticalPanel();
|
||||
this.setWidget(mainPanel);
|
||||
mainPanel.setWidth("100%");
|
||||
|
||||
CaptionPanel captionPanelConnections = new CaptionPanel(stringConstants.connections());
|
||||
mainPanel.add(captionPanelConnections);
|
||||
|
||||
VerticalPanel verticalPanel = new VerticalPanel();
|
||||
|
||||
captionPanelConnections.setContentWidget(verticalPanel);
|
||||
captionPanelConnections.setStyleName("bold");
|
||||
|
||||
Grid connectionsGrid = new Grid(6, 2);
|
||||
Grid connectionsGrid = new Grid(9, 2);
|
||||
verticalPanel.add(connectionsGrid);
|
||||
|
||||
previousConfigurations = new HashMap<String, SwissTimingConfigurationDTO>();
|
||||
previousConfigurationsComboBox = new ListBox();
|
||||
connectionsGrid.setWidget(0, 1, previousConfigurationsComboBox);
|
||||
@@ -107,10 +105,6 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
}
|
||||
});
|
||||
fillConfigurations();
|
||||
|
||||
jsonUrlBox = new TextBox();
|
||||
jsonUrlBox.getElement().getStyle().setWidth(50, Unit.EM);
|
||||
|
||||
connectionsGrid.setWidget(0, 0, new Label(stringMessages.swissTimingEvents() + ":"));
|
||||
connectionsGrid.setWidget(0, 1, previousConfigurationsComboBox);
|
||||
|
||||
@@ -125,6 +119,8 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
}
|
||||
});
|
||||
|
||||
jsonUrlBox = new TextBox();
|
||||
jsonUrlBox.getElement().getStyle().setWidth(50, Unit.EM);
|
||||
connectionsGrid.setWidget(2, 0, new Label(stringMessages.manage2SailEventURLBox() + ":"));
|
||||
connectionsGrid.setWidget(2, 1, jsonUrlBox);
|
||||
jsonUrlBox.addChangeHandler(event -> {
|
||||
@@ -142,8 +138,23 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
connectionsGrid.setWidget(4, 0, new Label(stringMessages.manage2SailPort() + ":"));
|
||||
connectionsGrid.setWidget(4, 1, portIntegerbox);
|
||||
|
||||
updateURLBox = new TextBox();
|
||||
updateURLBox.getElement().getStyle().setWidth(50, Unit.EM);
|
||||
connectionsGrid.setWidget(5, 0, new Label(stringMessages.swissTimingUpdateURL() + ":"));
|
||||
connectionsGrid.setWidget(5, 1, updateURLBox);
|
||||
|
||||
updateUsernameBox = new TextBox();
|
||||
updateUsernameBox.getElement().getStyle().setWidth(50, Unit.EM);
|
||||
connectionsGrid.setWidget(6, 0, new Label(stringMessages.swissTimingUpdateUsername() + ":"));
|
||||
connectionsGrid.setWidget(6, 1, updateUsernameBox);
|
||||
|
||||
updatePasswordBox = new PasswordTextBox();
|
||||
updatePasswordBox.getElement().getStyle().setWidth(50, Unit.EM);
|
||||
connectionsGrid.setWidget(7, 0, new Label(stringMessages.swissTimingUpdatePassword() + ":"));
|
||||
connectionsGrid.setWidget(7, 1, updatePasswordBox);
|
||||
|
||||
Button btnListRaces = new Button(stringConstants.listRaces());
|
||||
connectionsGrid.setWidget(5, 1, btnListRaces);
|
||||
connectionsGrid.setWidget(8, 1, btnListRaces);
|
||||
btnListRaces.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
@@ -459,6 +470,9 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
|
||||
private void fillRaces(final SailingServiceAsync sailingService) {
|
||||
final String jsonUrl = jsonUrlBox.getValue();
|
||||
final String updateURL = updateURLBox.getValue();
|
||||
final String updateUsername = updateUsernameBox.getValue();
|
||||
final String updatePassword = updatePasswordBox.getValue();
|
||||
sailingService.getRacesOfSwissTimingEvent(jsonUrl, new AsyncCallback<SwissTimingEventRecordDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
@@ -469,21 +483,18 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
@Override
|
||||
public void onSuccess(final SwissTimingEventRecordDTO result) {
|
||||
availableSwissTimingRaces.clear();
|
||||
if (result != null)
|
||||
if (result != null) {
|
||||
availableSwissTimingRaces.addAll(result.races);
|
||||
|
||||
}
|
||||
raceList.getList().clear();
|
||||
raceList.getList().addAll(availableSwissTimingRaces);
|
||||
|
||||
filterablePanelEvents.getTextBox().setText(null);
|
||||
filterablePanelEvents.updateAll(result.races);
|
||||
|
||||
// store a successful configuration in the database for later retrieval
|
||||
final String hostname = result.trackingDataHost;
|
||||
final Integer port = result.trackingDataPort;
|
||||
final String configName = result.eventName;
|
||||
|
||||
sailingService.storeSwissTimingConfiguration(configName, jsonUrl, hostname, port,
|
||||
sailingService.storeSwissTimingConfiguration(configName, jsonUrl, hostname, port, updateURL, updateUsername, updatePassword,
|
||||
new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
@@ -495,10 +506,16 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
public void onSuccess(Void voidResult) {
|
||||
// refresh list of previous configurations
|
||||
SwissTimingConfigurationDTO stConfig = new SwissTimingConfigurationDTO(configName, jsonUrl,
|
||||
hostname, port);
|
||||
hostname, port, updateURL, updateUsername, updatePassword);
|
||||
if (previousConfigurations.put(stConfig.getName(), stConfig) == null) {
|
||||
previousConfigurationsComboBox.addItem(stConfig.getName());
|
||||
}
|
||||
for (int i=0; i<previousConfigurationsComboBox.getItemCount(); i++) {
|
||||
if (previousConfigurationsComboBox.getValue(i).equals(stConfig.getName())) {
|
||||
previousConfigurationsComboBox.setSelectedIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
updatePanelFromSelectedStoredConfiguration();
|
||||
}
|
||||
});
|
||||
@@ -507,8 +524,11 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
}
|
||||
|
||||
private void trackSelectedRaces(boolean trackWind, boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm) {
|
||||
String hostname = hostnameTextbox.getValue();
|
||||
Integer port = portIntegerbox.getValue();
|
||||
final String hostname = hostnameTextbox.getValue();
|
||||
final Integer port = portIntegerbox.getValue();
|
||||
final String updateURL = updateURLBox.getValue();
|
||||
final String updateUsername = updateUsernameBox.getValue();
|
||||
final String updatePassword = updatePasswordBox.getValue();
|
||||
final List<SwissTimingRaceRecordDTO> selectedRaces = new ArrayList<SwissTimingRaceRecordDTO>();
|
||||
for (final SwissTimingRaceRecordDTO race : this.raceList.getList()) {
|
||||
if (raceTable.getSelectionModel().isSelected(race)) {
|
||||
@@ -526,7 +546,7 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
sailingService.trackWithSwissTiming(
|
||||
/* regattaToAddTo */ regattaIdentifier,
|
||||
selectedRaces, hostname, port, trackWind, correctWindByDeclination,
|
||||
useInternalMarkPassingAlgorithm, new AsyncCallback<Void>() {
|
||||
useInternalMarkPassingAlgorithm, updateURL, updateUsername, updatePassword, new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
errorReporter.reportError("Error trying to register races " + selectedRaces + " for tracking: "
|
||||
@@ -549,6 +569,9 @@ public class SwissTimingEventManagementPanel extends AbstractEventManagementPane
|
||||
hostnameTextbox.setValue(stConfig.getHostname());
|
||||
portIntegerbox.setValue(stConfig.getPort());
|
||||
jsonUrlBox.setValue(stConfig.getJsonURL());
|
||||
updateURLBox.setValue(stConfig.getUpdateURL());
|
||||
updateUsernameBox.setValue(stConfig.getUpdateUsername());
|
||||
updatePasswordBox.setValue(stConfig.getUpdatePassword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -28,6 +28,7 @@ import com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.PasswordTextBox;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
@@ -79,7 +80,7 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
|
||||
private TextBox jsonURLTextBox;
|
||||
private TextBox tracTracUpdateURITextBox;
|
||||
private TextBox tractracUsernameTextBox;
|
||||
private TextBox tractracPasswordTextBox;
|
||||
private PasswordTextBox tractracPasswordTextBox;
|
||||
private Label loadingMessageLabel;
|
||||
|
||||
private LabeledAbstractFilterablePanel<TracTracRaceRecordDTO> racesFilterablePanel;
|
||||
@@ -199,7 +200,7 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
|
||||
grid.setWidget(6, 1, tractracUsernameTextBox);
|
||||
|
||||
// TracTrac Password
|
||||
tractracPasswordTextBox = new TextBox();
|
||||
tractracPasswordTextBox = new PasswordTextBox();
|
||||
tractracPasswordTextBox.ensureDebugId("TracTracPasswordTextBox");
|
||||
tractracPasswordTextBox.setVisibleLength(40);
|
||||
|
||||
@@ -222,10 +223,8 @@ public class TracTracEventManagementPanel extends AbstractEventManagementPanel {
|
||||
}
|
||||
});
|
||||
grid.setWidget(9, 1, listRacesButton);
|
||||
|
||||
loadingMessageLabel = new Label();
|
||||
grid.setWidget(9, 2, loadingMessageLabel);
|
||||
|
||||
return connectionsPanel;
|
||||
}
|
||||
|
||||
|
||||
+22
-15
@@ -61,15 +61,16 @@ public class TrackedRacesManagementPanel extends AbstractRaceManagementPanel {
|
||||
controlsPanel.add(setStartTimeButton);
|
||||
selectedRaceContentPanel.add(controlsPanel);
|
||||
|
||||
raceDataGrid = new Grid(6,2);
|
||||
raceDataGrid = new Grid(7, 2);
|
||||
this.selectedRaceContentPanel.add(raceDataGrid);
|
||||
|
||||
raceDataGrid.setText(0, 0, stringMessages.startTime()+":");
|
||||
raceDataGrid.setText(1, 0, stringMessages.endTime()+":");
|
||||
raceDataGrid.setText(2, 0, stringMessages.duration()+":");
|
||||
raceDataGrid.setText(3, 0, stringMessages.startOfTracking()+":");
|
||||
raceDataGrid.setText(4, 0, stringMessages.endOfTracking()+":");
|
||||
raceDataGrid.setText(5, 0, stringMessages.delayForLiveMode()+" (ms):");
|
||||
raceDataGrid.setText(2, 0, stringMessages.finishingTime()+":");
|
||||
raceDataGrid.setText(3, 0, stringMessages.duration()+":");
|
||||
raceDataGrid.setText(4, 0, stringMessages.startOfTracking()+":");
|
||||
raceDataGrid.setText(5, 0, stringMessages.endOfTracking()+":");
|
||||
raceDataGrid.setText(6, 0, stringMessages.delayForLiveMode()+" (ms):");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,26 +88,32 @@ public class TrackedRacesManagementPanel extends AbstractRaceManagementPanel {
|
||||
} else {
|
||||
raceDataGrid.setText(1, 1, "");
|
||||
}
|
||||
if(selectedRaceDTO.startOfRace != null && selectedRaceDTO.endOfRace != null) {
|
||||
Date duration = new Date(selectedRaceDTO.endOfRace.getTime() - selectedRaceDTO.startOfRace.getTime());
|
||||
raceDataGrid.setText(2, 1, durationFormatter.render(duration));
|
||||
if (selectedRaceDTO.raceFinishedTime != null) {
|
||||
raceDataGrid.setText(2, 1, dateFormatter.render(selectedRaceDTO.raceFinishedTime) + " "
|
||||
+ timeFormatter.render(selectedRaceDTO.raceFinishedTime));
|
||||
} else {
|
||||
raceDataGrid.setText(2, 1, "");
|
||||
}
|
||||
if (selectedRaceDTO.trackedRace != null && selectedRaceDTO.trackedRace.startOfTracking != null) {
|
||||
raceDataGrid.setText(3, 1, dateFormatter.render(selectedRaceDTO.trackedRace.startOfTracking) + " "
|
||||
+ timeFormatter.render(selectedRaceDTO.trackedRace.startOfTracking));
|
||||
if(selectedRaceDTO.startOfRace != null && selectedRaceDTO.endOfRace != null) {
|
||||
Date duration = new Date(selectedRaceDTO.endOfRace.getTime() - selectedRaceDTO.startOfRace.getTime());
|
||||
raceDataGrid.setText(3, 1, durationFormatter.render(duration));
|
||||
} else {
|
||||
raceDataGrid.setText(3, 1, "");
|
||||
}
|
||||
if (selectedRaceDTO.trackedRace != null && selectedRaceDTO.trackedRace.endOfTracking != null) {
|
||||
raceDataGrid.setText(4, 1, dateFormatter.render(selectedRaceDTO.trackedRace.endOfTracking) + " "
|
||||
+ timeFormatter.render(selectedRaceDTO.trackedRace.endOfTracking));
|
||||
if (selectedRaceDTO.trackedRace != null && selectedRaceDTO.trackedRace.startOfTracking != null) {
|
||||
raceDataGrid.setText(4, 1, dateFormatter.render(selectedRaceDTO.trackedRace.startOfTracking) + " "
|
||||
+ timeFormatter.render(selectedRaceDTO.trackedRace.startOfTracking));
|
||||
} else {
|
||||
raceDataGrid.setText(4, 1, "");
|
||||
}
|
||||
if (selectedRaceDTO.trackedRace != null && selectedRaceDTO.trackedRace.endOfTracking != null) {
|
||||
raceDataGrid.setText(5, 1, dateFormatter.render(selectedRaceDTO.trackedRace.endOfTracking) + " "
|
||||
+ timeFormatter.render(selectedRaceDTO.trackedRace.endOfTracking));
|
||||
} else {
|
||||
raceDataGrid.setText(5, 1, "");
|
||||
}
|
||||
if (selectedRaceDTO.trackedRace != null) {
|
||||
raceDataGrid.setText(5, 1, "" + selectedRaceDTO.trackedRace.delayToLiveInMs);
|
||||
raceDataGrid.setText(6, 1, "" + selectedRaceDTO.trackedRace.delayToLiveInMs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -145,8 +145,9 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
|
||||
String storedURI, String courseDesignUpdateURI, boolean trackWind, boolean correctWindByDeclination,
|
||||
Duration offsetToStartTimeOfSimulatedRace, boolean useInternalMarkPassingAlgorithm, String tracTracUsername, String tracTracPassword) throws Exception;
|
||||
|
||||
void trackWithSwissTiming(RegattaIdentifier regattaToAddTo, Iterable<SwissTimingRaceRecordDTO> rrs, String hostname, int port,
|
||||
boolean trackWind, boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm) throws Exception;
|
||||
void trackWithSwissTiming(RegattaIdentifier regattaToAddTo, Iterable<SwissTimingRaceRecordDTO> rrs, String hostname,
|
||||
int port, boolean trackWind, boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm,
|
||||
String updateURL, String updateUsername, String updatePassword) throws Exception;
|
||||
|
||||
void replaySwissTimingRace(RegattaIdentifier regattaIdentifier, Iterable<SwissTimingReplayRaceDTO> replayRaces,
|
||||
boolean trackWind, boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm);
|
||||
@@ -285,7 +286,7 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
|
||||
|
||||
SwissTimingEventRecordDTO getRacesOfSwissTimingEvent(String eventJsonURL) throws Exception;
|
||||
|
||||
void storeSwissTimingConfiguration(String configName, String jsonURL, String hostname, Integer port);
|
||||
void storeSwissTimingConfiguration(String configName, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword);
|
||||
|
||||
String[] getCountryCodes();
|
||||
|
||||
|
||||
+2
-2
@@ -162,7 +162,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
|
||||
|
||||
void trackWithSwissTiming(RegattaIdentifier regattaToAddTo, Iterable<SwissTimingRaceRecordDTO> rrs,
|
||||
String hostname, int port, boolean trackWind, boolean correctWindByDeclination,
|
||||
boolean useInternalMarkPassingAlgorithm, AsyncCallback<Void> asyncCallback);
|
||||
boolean useInternalMarkPassingAlgorithm, String updateURL, String updateUsername, String updatePassword, AsyncCallback<Void> asyncCallback);
|
||||
|
||||
void replaySwissTimingRace(RegattaIdentifier regattaIdentifier, Iterable<SwissTimingReplayRaceDTO> replayRaces,
|
||||
boolean trackWind, boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm,
|
||||
@@ -333,7 +333,7 @@ public interface SailingServiceAsync extends ServerInfoRetriever, FileStorageMan
|
||||
void getRacesOfSwissTimingEvent(String eventJsonUrl, AsyncCallback<SwissTimingEventRecordDTO> asyncCallback);
|
||||
|
||||
void storeSwissTimingConfiguration(String configName, String jsonURL, String hostname, Integer port,
|
||||
AsyncCallback<Void> asyncCallback);
|
||||
String updateURL, String updateUsername, String updatePassword, AsyncCallback<Void> asyncCallback);
|
||||
|
||||
void getCountryCodes(AsyncCallback<String[]> callback);
|
||||
|
||||
|
||||
+3
@@ -2093,4 +2093,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String manage2SailEventIdBoxTooltip();
|
||||
String manage2SailPort();
|
||||
String windFinderSpotCollectionsList();
|
||||
String swissTimingUpdateURL();
|
||||
String swissTimingUpdateUsername();
|
||||
String swissTimingUpdatePassword();
|
||||
}
|
||||
+4
-1
@@ -2086,4 +2086,7 @@ gender=Gender
|
||||
manage2SailEventIdBox=Manage2Sail Event ID
|
||||
manage2SailEventURLBox=Manage2Sail EventURL (json)
|
||||
manage2SailEventIdBoxTooltip=Event ID or a URL that contains the event ID from Manage2Sail
|
||||
manage2SailPort=Port
|
||||
manage2SailPort=Port
|
||||
swissTimingUpdateURL=Update URL (e.g., for start time and course change feedback)
|
||||
swissTimingUpdateUsername=Username for sending updates
|
||||
swissTimingUpdatePassword=Password for sending updates
|
||||
+4
-1
@@ -2081,4 +2081,7 @@ gender=Geschlecht
|
||||
manage2SailEventId=Manage2Sail Event ID
|
||||
manage2SailEventURL=Manage2Sail Event URL (json)
|
||||
manage2SailEventIdBoxTooltip=Event ID von Manage 2 Sail oder URL die die Event ID beinhaltet
|
||||
manage2SailPort=Port
|
||||
manage2SailPort=Port
|
||||
swissTimingUpdateURL=Update URL (z.B. für Startzeit-Übertragung)
|
||||
swissTimingUpdateUsername=Benutzername zum Versenden der Updates
|
||||
swissTimingUpdatePassword=Passwort zum Versenden der Updates
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=Puntuación alta, el ganador obtien
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Calificación en puntos. El ganador obtiene 12 puntos; el segundo, 11 puntos, etc. Si hay un empate, se resuelve a favor del competidor que tiene la mayor puntuación. Si aún persiste el empate, se resuelve mediante la posición obtenida en la última carrera puntuada.
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=Puntuación alta ESS 2017, el ganador obtiene 12 puntos (u 8)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=Calificación en puntos. El ganador obtiene 12 puntos; el segundo, 11 puntos, etc. Si hay un empate, se resuelve a favor del competidor que tiene la mayor puntuación. Si aún persiste el empate, se resuelve mediante la posición obtenida en la última carrera puntuada.
|
||||
scoringSchemeLowPointSystemFirstTwoWins=Sistema de puntuación baja, primero con dos victorias en medallas es ganador
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=Sistema de puntuación baja. El primero en la serie de medallas que gane dos carreras, gana la serie de medallas. Ser el mejor en la serie premedallas cuenta como una victoria para este.
|
||||
scoringSystem=Sistema de puntuación
|
||||
createFlexibleLeaderboard=Crear tabla de clasificación flexible
|
||||
createRegattaLeaderboard=Crear tabla de clasificación de regata
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=Carga correcta
|
||||
fileUploadResult=Carga de archivos: {0} {1}. En caso de error, compruebe que su servicio de alojamiento de archivos está configurado correctamente.
|
||||
removeUploadedFile=Eliminar archivo
|
||||
showCompetitorBoatColumn=Embarcación del competidor
|
||||
showCompetitorSailIdColumn=ID de vela
|
||||
showCompetitorSailIdColumnTooltip=Muestra el ID de vela más la bandera del país o imagen del competidor. Si está disponible, se prioriza la imagen de competidor a la bandera del país. Se mostrarán ambos iconos si se fija "{0}".
|
||||
showCompetitorShortNameColumn=Denominación breve de competidor
|
||||
showCompetitorShortNameColumnTooltip=Muestra el nombre breve más la bandera del país o imagen del competidor. Si está disponible, se prioriza la imagen de competidor a la bandera del país. Se mostrarán ambos iconos si se fija "{0}".
|
||||
showCompetitorFullNameColumn=Nombre completo del competidor
|
||||
alwaysShowCompetitorNationalityColumn=Siempre mostrar la nacionalidad del competidor
|
||||
alwaysShowCompetitorNationalityColumnTooltip=Muestra ambos, las banderas de país así como las imágenes de competidor, si están disponibles.
|
||||
showCompetitorNationalityColumn=Mostrar adicionalmente la nacionalidad del competidor
|
||||
showCompetitorNationalityColumnTooltip=Mostrar las banderas de nacionalidad junto con las imágenes del competidor si están disponibles
|
||||
loadingDimensionValues=Cargando valores de dimensión
|
||||
inviteBuoyTenders=Invitar a balizadores
|
||||
orMultipleEmails=o varios correos electrónicos separados por una coma
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=Cola de trabajo inactiva
|
||||
multiVideoDoNoAdd=No añadir
|
||||
multiVideoOffsetInput=Offset de vídeo global en milisegundos:
|
||||
multiVideoDescription=El servidor web debe proporcionar una lista de índices (subcarpetas compatibles si están indexadas) para permitir la detección de ficheros. Tras un análisis inicial de los metadatos contenidos en los ficheros mp4, los vídeos que deben añadirse, deben seleccionarse mediante la columna de la casilla de selección a la izquierda. El botón "Añadir audio/vídeo" creará pistas multimedia para todos los ficheros seleccionados y los añadirá a todas las carreras seleccionadas en la columna de la derecha.
|
||||
jibeAngle=Ángulo de trasluchada
|
||||
tackAngle=Ángulo de bordo
|
||||
maneuverAngle=Ángulo de maniobra
|
||||
multiUrlChangeMediaTrack=Ajustar URLs de rastreo múltiple de medios
|
||||
multiUrlChangeReplace=Reemplazar por
|
||||
multiUrlChangeFind=Buscar
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=Este diálogo reemplazará en masa las partes comunes al i
|
||||
resetZoom=Reinicializar zoom
|
||||
lastEvent=Último evento: {0}
|
||||
teaserOverallLinkToolTip=Para visualizar las series generales, haga clic en la esquina amarilla
|
||||
middleManeuverAngle=Ángulo medio de maniobra
|
||||
extrapolatedManeuverStartPosition=Posición de inicio de maniobra extrapolada
|
||||
projectedExtrapolatedManeuverStartPosition=Proyección de posición de inicio de maniobra extrapolada en línea de ángulo medio de maniobra
|
||||
projectedManeuverEndPosition=Proyección de posición de fin de maniobra en línea de ángulo medio de maniobra
|
||||
bearingAtManeuverEndPosition=Rumbo en posición de fin de maniobra
|
||||
gender=Sexo
|
||||
manage2SailEventIdBox=ID de evento Manage2Sail
|
||||
manage2SailEventURLBox=URL de evento Manage2Sail (json)
|
||||
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=Système de points avec bonus, le v
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Score en points. Le vainqueur totalise 12 points, le deuxième 11, etc. En cas d''égalité, la victoire est accordée au concurrent qui a totalisé le plus de points. Si l''égalité persiste, la victoire est accordée en fonction du classement dans la dernière course.
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=Système de points avec bonus - ESS 2017, le vainqueur obtient 12 points (ou 8)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=Score en points. Le vainqueur totalise 12 points, le deuxième 11, etc. En cas d''égalité, la victoire est accordée au concurrent qui a totalisé le plus de points. Si l''égalité persiste, la victoire est accordée en fonction du classement dans la dernière course.
|
||||
scoringSchemeLowPointSystemFirstTwoWins=Système de points a minima. Le premier ayant gagné deux médailles gagne la compétition.
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=Système de points a minima. Le premier ayant gagné deux courses gagne la série médaillée. Si un concurrent a été le meilleur dans la série pré-médailles, cela compte comme une victoire pour la série médaillée.
|
||||
scoringSystem=Système d''attribution des points
|
||||
createFlexibleLeaderboard=Créer palmarès flexible
|
||||
createRegattaLeaderboard=Créer palmarès régate
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=Chargement réussi
|
||||
fileUploadResult=Chargement du fichier : {0} {1}.\nEn cas d''erreur, vérifiez que votre service de stockage de fichier est correctement configuré.
|
||||
removeUploadedFile=Supprimer fichier chargé
|
||||
showCompetitorBoatColumn=Bateau du concurrent
|
||||
showCompetitorSailIdColumn=ID de voile
|
||||
showCompetitorSailIdColumnTooltip=Affiche l''ID de voile ainsi que le drapeau national ou l''image du concurrent. Si les deux sont disponibles, l''image du concurrent aura la priorité sur le drapeau national. Si le code "{0}" est activé, les deux icônes seront affichées.
|
||||
showCompetitorShortNameColumn=Nom court du concurrent
|
||||
showCompetitorShortNameColumnTooltip=Affiche le nom court ainsi que le drapeau national ou l''image du concurrent. Si les deux sont disponibles, l''image du concurrent aura la priorité sur le drapeau national. Si le code "{0}" est activé, les deux icônes seront affichées.
|
||||
showCompetitorFullNameColumn=Nom complet du concurrent
|
||||
alwaysShowCompetitorNationalityColumn=Afficher toujours la nationalité du concurrent
|
||||
alwaysShowCompetitorNationalityColumnTooltip=Si disponibles, afficher les deux : le drapeau national ainsi que l''image du concurrent
|
||||
showCompetitorNationalityColumn=Afficher en plus la nationalité du concurrent
|
||||
showCompetitorNationalityColumnTooltip=Si disponible, afficher le drapeau national en plus de l''image du concurrent.
|
||||
loadingDimensionValues=Chargement des valeurs de dimension
|
||||
inviteBuoyTenders=Inviter navire baliseur
|
||||
orMultipleEmails=ou plusieurs adresses e-mails séparées par des virgules
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=La réserve de travail est inactive.
|
||||
multiVideoDoNoAdd=Ne pas ajouter
|
||||
multiVideoOffsetInput=Décalage vidéo global en millisecondes :
|
||||
multiVideoDescription=Le serveur Web doit fournir une liste des index (les sous-dossiers sont pris en charge s''ils sont répertoriés) pour permettre la détection de fichier. Après une analyse initiale des métadonnées contenues dans les fichiers MP4, les vidéos à ajouter doivent être sélectionnées en cochant les cases correspondantes dans la colonne de gauche. Le bouton "Ajouter audio/vidéo" va créer des pistes médias pour tous les fichiers sélectionnés, et ajouter ces fichiers à toutes les courses sélectionnées dans la colonne de droite.
|
||||
jibeAngle=Angle d''amure
|
||||
tackAngle=Angle de virement de bord
|
||||
maneuverAngle=Angle de manœuvre
|
||||
multiUrlChangeMediaTrack=Ajuster plusieurs URL de piste média
|
||||
multiUrlChangeReplace=Remplacer par
|
||||
multiUrlChangeFind=Rechercher
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=Cette boîte de dialogue remplacera en masse les élément
|
||||
resetZoom=Réinitialiser le zoom
|
||||
lastEvent=Dernière manifestation : {0}
|
||||
teaserOverallLinkToolTip=Pour afficher l''ensemble des séries, cliquez sur le coin jaune.
|
||||
middleManeuverAngle=Angle de manœuvre (milieu)
|
||||
extrapolatedManeuverStartPosition=Position extrapolée du début de la manœuvre
|
||||
projectedExtrapolatedManeuverStartPosition=Projection de la position extrapolée du début de la manœuvre sur la ligne de l''angle de manœuvre (milieu)
|
||||
projectedManeuverEndPosition=Projection de la position extrapolée de fin de la manœuvre sur la ligne de l''angle de manœuvre (milieu)
|
||||
bearingAtManeuverEndPosition=Direction à la position de fin de la manœuvre
|
||||
gender=Sexe
|
||||
manage2SailEventIdBox=ID de manifestation Manage2Sail
|
||||
manage2SailEventURLBox=URL de la manifestation Manage2Sail (json)
|
||||
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=高得点方式、1 位が 12 点 (
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=得点数によるスコアです。1 位が 12 点、2 位が 11 点などと得点します。同点となった場合は、(各競技者のレース得点を高い方から比較して) 最多得点の競技者を上位とします。それでも同順位となる場合には、最終レースでの得点でのランクで順位を決定します。
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=高得点方式 ESS 2017、1 位が 12 点 (または 8 点)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=得点数によるスコアです。1 位が 12 点、2 位が 11 点などと得点します。同点となった場合は、(各競技者のレース得点を高い方から比較して) 最多得点の競技者を上位とします。それでも同順位となる場合には、最終レースでの得点でのランクで順位を決定します。
|
||||
scoringSchemeLowPointSystemFirstTwoWins=低得点方式、メダルシリーズで最初に 2 勝した者が勝者
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=低得点方式。メダルシリーズで最初に 2 レースに勝利した者をメダルシリーズの勝者とします。プレメダルシリーズでの最上位をメダルシリーズの 1 勝としてカウントします。
|
||||
scoringSystem=得点方式
|
||||
createFlexibleLeaderboard=フレキシブルリーダーボード登録
|
||||
createRegattaLeaderboard=レガッタリーダーボード登録
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=正常にアップロード済
|
||||
fileUploadResult=ファイルアップロード: {0} {1}\nエラー発生の場合は、ファイルストレージサービスが適切に設定されていることを確認してください。
|
||||
removeUploadedFile=アップロード済ファイルの削除
|
||||
showCompetitorBoatColumn=競技者の艇
|
||||
showCompetitorSailIdColumn=セール ID
|
||||
showCompetitorSailIdColumnTooltip=セール ID に加えて国旗または競技者画像を表示します。競技者画像が利用可能な場合はそれを国旗よりも優先させます。"{0}" が設定されている場合、両方のアイコンが表示されます。
|
||||
showCompetitorShortNameColumn=競技者の名前 (短)
|
||||
showCompetitorShortNameColumnTooltip=名前 (短) に加えて国旗または競技者画像を表示します。競技者画像が利用可能な場合はそれを国旗よりも優先させます。"{0}" が設定されている場合、両方のアイコンが表示されます。
|
||||
showCompetitorFullNameColumn=競技者氏名
|
||||
alwaysShowCompetitorNationalityColumn=競技者国籍を常に表示
|
||||
alwaysShowCompetitorNationalityColumnTooltip=国旗と競技者画像 (利用可能な場合) の両方を表示
|
||||
showCompetitorNationalityColumn=競技者国籍を追加的に表示
|
||||
showCompetitorNationalityColumnTooltip=競技者画像に加え国旗を表示 (利用可能な場合)
|
||||
loadingDimensionValues=次元値ロード中
|
||||
inviteBuoyTenders=ブイ入札の招待
|
||||
orMultipleEmails=または複数の電子メールをカンマで区切り
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=ワークキューが無効です
|
||||
multiVideoDoNoAdd=追加しないでください
|
||||
multiVideoOffsetInput=グローバル動画オフセット (msec):
|
||||
multiVideoDescription=Web サーバは、ファイルディスカバリを可能にするため、インデックスリスト (インデックスが作成されている場合はサブフォルダがサポート済) を用意していることが必要です。MP4 ファイルに含まれているメタデータの初期解析後に、追加する動画を左側のチェックボックス列で選択する必要があります。"音声/動画追加" ボタンにより、選択されているすべてのファイルに対してメディアトラックが作成され、右側の列で選択されているすべてのレースに対してそれらのファイルが追加されます。
|
||||
jibeAngle=ジャイブ角
|
||||
tackAngle=タック角
|
||||
maneuverAngle=マニューバー角
|
||||
multiUrlChangeMediaTrack=複数メディアトラック URL の調整
|
||||
multiUrlChangeReplace=置換後の文字列
|
||||
multiUrlChangeFind=検索
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=このダイアログはメディアトラック URL 先
|
||||
resetZoom=拡大/縮小のリセット
|
||||
lastEvent=最終イベント: {0}
|
||||
teaserOverallLinkToolTip=シリーズ全体を参照するには、黄色になっている隅の部分をクリックしてください
|
||||
middleManeuverAngle=マニューバー角の中心
|
||||
extrapolatedManeuverStartPosition=推定マニューバー開始位置
|
||||
projectedExtrapolatedManeuverStartPosition=マニューバー角の中心線上に推定マニューバー開始位置を投影
|
||||
projectedManeuverEndPosition=マニューバー角の中心線上にマニューバー終了位置を投影
|
||||
bearingAtManeuverEndPosition=マニューバー終了位置での方位
|
||||
gender=性別
|
||||
manage2SailEventIdBox=Manage2Sail イベント ID
|
||||
manage2SailEventURLBox=Manage2Sail イベント URL (JSON)
|
||||
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=Sistema de bônus, o vencedor receb
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Pontuação em pontos. O vencedor pontua 12 pontos, o 2º - 11 pontos, .... Um desempate é efetuado a favor do competidor com a pontuação mais alta, se o empate continuar, então o desempate é efetuado pela posição na última corrida pontuada.
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=Sistema de bônus ESS 2017, o vencedor recebe 12 pontos (ou 8)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=Pontuação em pontos. O vencedor pontua 12 pontos, o 2º - 11 pontos, .... Um desempate é efetuado a favor do competidor com a pontuação mais alta, se o empate continuar, então o desempate é efetuado pela posição na última corrida pontuada.
|
||||
scoringSchemeLowPointSystemFirstTwoWins=Sistema linear, o primeiro com duas vitórias com medalhas é o vencedor.
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=Sistema linear. O primeiro na série para medalha a vencer duas corridas vence a série para medalha. Ser o melhor na série prévia para medalha conta como uma vitória para este efeito.
|
||||
scoringSystem=Sistema de pontuação
|
||||
createFlexibleLeaderboard=Criar painel de classificação flexível
|
||||
createRegattaLeaderboard=Criar painel de classificação de regata
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=Carregamento efetuado com êxito
|
||||
fileUploadResult=Carregamento de arquivo: {0} {1}.\nEm caso de erro, verifique se seu serviço de armazenamento de arquivos está configurado de modo apropriado.
|
||||
removeUploadedFile=Remover arquivo carregado
|
||||
showCompetitorBoatColumn=Barco do competidor
|
||||
showCompetitorSailIdColumn=ID da vela
|
||||
showCompetitorSailIdColumnTooltip=Exibe o ID da vela mais a bandeira de nacionalidade ou a imagem do competidor. Se disponível, é priorizada uma imagem do competidor em relação a uma bandeira da nacionalidade. Se "{0}" estiver definido, ambos os ícones serão exibidos.
|
||||
showCompetitorShortNameColumn=Nome abreviado do competidor
|
||||
showCompetitorShortNameColumnTooltip=Exibe o nome abreviado mais a bandeira de nacionalidade ou a imagem do competidor. Se disponível, é priorizada uma imagem do competidor em relação a uma bandeira da nacionalidade. Se "{0}" estiver definido, ambos os ícones serão exibidos.
|
||||
showCompetitorFullNameColumn=Nome completo do competidor
|
||||
alwaysShowCompetitorNationalityColumn=Exibir sempre a nacionalidade do competidor
|
||||
alwaysShowCompetitorNationalityColumnTooltip=Exibir ambos, bandeiras de nacionalidade e imagens do competidor, se disponíveis
|
||||
showCompetitorNationalityColumn=Exibir adicionalmente a nacionalidade do competidor
|
||||
showCompetitorNationalityColumnTooltip=Exibir bandeiras de nacionalidade além das imagens do competidor, caso estejam disponíveis
|
||||
loadingDimensionValues=Carregando valores de dimensão
|
||||
inviteBuoyTenders=Convidar navios-balizadores
|
||||
orMultipleEmails=ou vários e-mails separados por vírgula
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=A lista de trabalho está inativa
|
||||
multiVideoDoNoAdd=Não adicionar
|
||||
multiVideoOffsetInput=Deslocamento de vídeo global em milissegundos:
|
||||
multiVideoDescription=O servidor da web é necessário para fornecer a lista de índices (subpastas suportadas se indexadas) de modo a permitir a descoberta de arquivos. Após uma análise inicial dos metadados contidos nos arquivos mp4, os vídeos que deviam ser adicionados precisam ser selecionados mediante a coluna do campo de seleção à esquerda. O botão "Adicionar áudio/vídeo" irá criar faixas de mídia para todos os arquivos selecionados e adicionar esses arquivos a todas as corridas selecionadas na coluna à direita.
|
||||
jibeAngle=Ângulo de jaibe
|
||||
tackAngle=Ângulo de cambada
|
||||
maneuverAngle=Ângulo de manobra
|
||||
multiUrlChangeMediaTrack=Ajustar vários URLs de faixa de mídia
|
||||
multiUrlChangeReplace=Substituir por
|
||||
multiUrlChangeFind=Procurar
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=Este diálogo irá substituir em massa as partes comuns no
|
||||
resetZoom=Reinicializar zoom
|
||||
lastEvent=Último evento: {0}
|
||||
teaserOverallLinkToolTip=Para ver a série completa, clique no canto amarelo
|
||||
middleManeuverAngle=Ângulo médio de manobra
|
||||
extrapolatedManeuverStartPosition=Posição inicial de manobra extrapolada
|
||||
projectedExtrapolatedManeuverStartPosition=Projeção da posição inicial de manobra extrapolada na linha de ângulo médio de manobra
|
||||
projectedManeuverEndPosition=Projeção da posição final de manobra na linha de ângulo médio de manobra
|
||||
bearingAtManeuverEndPosition=Rumo na posição final de manobra
|
||||
gender=Sexo
|
||||
manage2SailEventIdBox=ID de evento Manage2Sail
|
||||
manage2SailEventURLBox=URL de evento Manage2Sail (json)
|
||||
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=Высокий балл, побед
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Оценка в баллах. Победитель получает 12 баллов, 2-й — 11 баллов, .... Равенство разрешается в пользу участника с наивысшей оценкой. Если равенство сохраняется, оно разрешается по рангу в последней гонке.
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=Высокий балл ESS 2017, победитель получает 12 баллов (или 8)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=Оценка в баллах. Победитель получает 12 баллов, 2-й — 11 баллов, .... Равенство разрешается в пользу участника с наивысшей оценкой. Если равенство сохраняется, оно разрешается по рангу в последней гонке.
|
||||
scoringSchemeLowPointSystemFirstTwoWins=Система низких баллов, первый с двумя победами в гонках на медали является победителем
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=Система низких баллов. Первый в серии на медали, кто выиграл две гонки, выигрывает серию на медали. Получение статуса "Лучший" в серии, предшествующей медальной, считается одной победой.
|
||||
scoringSystem=Система оценок
|
||||
createFlexibleLeaderboard=Создать гибкую таблицу лидеров
|
||||
createRegattaLeaderboard=Создать таблицу лидеров регаты
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=Отправлено успешно
|
||||
fileUploadResult=Отправка файла: {0} {1}.\nВ случае ошибки проверьте правильность конфигурации службы хранилища файлов.
|
||||
removeUploadedFile=Удалить отправленный файл
|
||||
showCompetitorBoatColumn=Лодка участника
|
||||
showCompetitorSailIdColumn=Ид. паруса
|
||||
showCompetitorSailIdColumnTooltip=Показывает ид. паруса плюс государственный флаг или изображение участника. Изображение участника, при наличии, имеет приоритет над государственным флагом. Если установлен параметр "{0}", будут отображены оба значка.
|
||||
showCompetitorShortNameColumn=Краткое имя участника
|
||||
showCompetitorShortNameColumnTooltip=Показывает краткое имя плюс государственный флаг или изображение участника. Изображение участника, при наличии, имеет приоритет над государственным флагом. Если установлен параметр "{0}", будут отображены оба значка.
|
||||
showCompetitorFullNameColumn=Полное имя участника
|
||||
alwaysShowCompetitorNationalityColumn=Всегда показывать государственную принадлежность участника
|
||||
alwaysShowCompetitorNationalityColumnTooltip=Показывать и флаги государств, и изображения участников (при наличии)
|
||||
showCompetitorNationalityColumn=Дополнительно показывать государственную принадлежность участника
|
||||
showCompetitorNationalityColumnTooltip=Показывать государственные флаги (если есть) дополнительно к фотографии участника
|
||||
loadingDimensionValues=Загрузка значений измерения
|
||||
inviteBuoyTenders=Пригласить лоцманов
|
||||
orMultipleEmails=или несколько адресов эл. почты через запятую
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=Рабочий список неактивен
|
||||
multiVideoDoNoAdd=Не добавлять
|
||||
multiVideoOffsetInput=Смещение глобального видео в мс:
|
||||
multiVideoDescription=Веб-сервер необходим для предоставления списка индекса (подпапки поддерживаются, если проиндексированы) для поиска файлов. После первичного анализа метаданных, содержащихся в файлах mp4, видео, которые должны быть добавлены, необходимо выбрать в столбце с флажками слева. При нажатии кнопки "Добавить аудио/видео" будут созданы медиаканалы для всех выбранных файлов, а файлы будут добавлены ко всем гонкам, выбранным в правом столбце.
|
||||
jibeAngle=Поворот фордевинд
|
||||
tackAngle=Галсовый угол
|
||||
maneuverAngle=Угол маневра
|
||||
multiUrlChangeMediaTrack=Адаптировать URL объектов мультимедиа
|
||||
multiUrlChangeReplace=Заменить на
|
||||
multiUrlChangeFind=Найти
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=В этом диалоговом окне можно вы
|
||||
resetZoom=Сбросить увеличение
|
||||
lastEvent=Последнее событие: {0}
|
||||
teaserOverallLinkToolTip=Чтобы увидеть все серии, нажмите желтый треугольник
|
||||
middleManeuverAngle=Угол в середине маневра
|
||||
extrapolatedManeuverStartPosition=Расширенная начальная позиция маневра
|
||||
projectedExtrapolatedManeuverStartPosition=Проекция расширенной начальной позиции маневра на линии угла в середине маневра
|
||||
projectedManeuverEndPosition=Проекция конечной позиции маневра на линии угла в середине маневра
|
||||
bearingAtManeuverEndPosition=Направление в конечной позиции маневра
|
||||
gender=Пол
|
||||
manage2SailEventIdBox=Ид. события Manage2Sail
|
||||
manage2SailEventURLBox=URL события Manage2Sail (json)
|
||||
|
||||
+12
-4
@@ -480,6 +480,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=高分,获胜者得 12 分(或
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=得分。获胜者得 12 分、第 2 名 11 分、.... 得分最高的参赛队取得胜利,如果仍有平局,则以最后一个比赛轮次的名次打破平局。
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017=2017 年极限帆船系列赛高分,获胜者得 12 分(或 8 分)
|
||||
scoringSchemeHighPointFirstGetsTwelveOrEight2017Description=得分。获胜者得 12 分、第 2 名 11 分、.... 得分最高的参赛队取得胜利,如果仍有平局,则以最后一个比赛轮次的名次打破平局。
|
||||
scoringSchemeLowPointSystemFirstTwoWins=低分系统,奖牌轮中取得两场胜利的第一名为获胜者
|
||||
scoringSchemeLowPointSystemFirstTwoWinsDescription=低分系统。在奖牌轮系列中,在两个比赛轮次中获胜的第一名在奖牌轮系列中获胜。奖牌轮系列预赛中的佼佼者记为获胜。
|
||||
scoringSystem=记分系统
|
||||
createFlexibleLeaderboard=创建灵活的积分榜
|
||||
createRegattaLeaderboard=创建比赛积分榜
|
||||
@@ -1276,13 +1278,11 @@ uploadSuccessful=上传成功
|
||||
fileUploadResult=文件上传: {0} {1}。\n如果出错,请检查文件存储服务配置是否正确。
|
||||
removeUploadedFile=移除上传的文件
|
||||
showCompetitorBoatColumn=参赛队的船只
|
||||
showCompetitorSailIdColumn=帆号
|
||||
showCompetitorSailIdColumnTooltip=显示帆号和国籍旗帜或参赛队图像。如果可用,参赛队图像优先于国籍旗帜。如果设置 "{0}",将显示这两种图标。
|
||||
showCompetitorShortNameColumn=参赛队短名称
|
||||
showCompetitorShortNameColumnTooltip=显示短名称和国籍旗帜或参赛队图像。如果可用,参赛队图像优先于国籍旗帜。如果设置 "{0}",将显示这两种图标。
|
||||
showCompetitorFullNameColumn=参赛队全名
|
||||
alwaysShowCompetitorNationalityColumn=始终显示参赛队国籍
|
||||
alwaysShowCompetitorNationalityColumnTooltip=如果可用,显示两者:国籍旗帜和参赛队图像
|
||||
showCompetitorNationalityColumn=另外显示参赛队国籍
|
||||
showCompetitorNationalityColumnTooltip=除参赛队图像外还显示国籍旗帜(如果有)
|
||||
loadingDimensionValues=正在加载尺寸值
|
||||
inviteBuoyTenders=邀请浮标供应船
|
||||
orMultipleEmails=或使用逗号隔开的多个电子邮件
|
||||
@@ -2059,6 +2059,9 @@ multiVideoIdle=工作队列空闲
|
||||
multiVideoDoNoAdd=请勿添加
|
||||
multiVideoOffsetInput=全球视频偏移量(毫秒):
|
||||
multiVideoDescription=需要 Web 服务器提供索引清单(如果已编入索引,则支持的子文件夹),以允许发现文件。初始分析 mp4 文件中包含的元数据后,需要通过左侧的复选框列选择应添加的视频。“添加音频/视频”按钮将为所有选择的文件创建媒体轨道,并将这些文件添加到右列中选择的所有比赛轮次中。
|
||||
jibeAngle=顺风转向角度
|
||||
tackAngle=迎风转向角度
|
||||
maneuverAngle=操作角度
|
||||
multiUrlChangeMediaTrack=调整多个媒体轨道 URL
|
||||
multiUrlChangeReplace=替换为
|
||||
multiUrlChangeFind=查找
|
||||
@@ -2070,6 +2073,11 @@ multiUrlChangeExplain=此对话框将在媒体轨道 URL 的起始处批量替
|
||||
resetZoom=重置缩放
|
||||
lastEvent=上次活动:{0}
|
||||
teaserOverallLinkToolTip=请查看整体系列赛,请点击黄色角落
|
||||
middleManeuverAngle=中间操作角度
|
||||
extrapolatedManeuverStartPosition=推断的操作开始位置
|
||||
projectedExtrapolatedManeuverStartPosition=推断的操作开始位置在中间操作角度线上的投影
|
||||
projectedManeuverEndPosition=操作结束位置在中间操作角度线上的投影
|
||||
bearingAtManeuverEndPosition=操作结束位置的航向角
|
||||
gender=性别
|
||||
manage2SailEventIdBox=Manage2Sail 活动编号
|
||||
manage2SailEventURLBox=Manage2Sail 活动 URL (json)
|
||||
|
||||
+11
-6
@@ -1047,7 +1047,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
final TrackedRace trackedRace = raceColumn.getTrackedRace(fleet);
|
||||
raceInfoDTO.isTracked = trackedRace != null ? true : false;
|
||||
if (raceLog != null) {
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.create(getService(), raceLog);
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.getOrCreate(getService(), raceLog);
|
||||
TimePoint startTime = state.getStartTime();
|
||||
if (startTime != null) {
|
||||
raceInfoDTO.startTime = startTime.asDate();
|
||||
@@ -2075,6 +2075,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
raceTimesInfo.newestTrackingEvent = trackedRace.getTimePointOfNewestEvent() == null ? null : trackedRace.getTimePointOfNewestEvent().asDate();
|
||||
raceTimesInfo.endOfTracking = trackedRace.getEndOfTracking() == null ? null : trackedRace.getEndOfTracking().asDate();
|
||||
raceTimesInfo.endOfRace = trackedRace.getEndOfRace() == null ? null : trackedRace.getEndOfRace().asDate();
|
||||
raceTimesInfo.raceFinishedTime = trackedRace.getFinishedTime() == null ? null : trackedRace.getFinishedTime().asDate();
|
||||
raceTimesInfo.delayToLiveInMs = trackedRace.getDelayToLiveInMillis();
|
||||
|
||||
Iterable<com.sap.sse.common.Util.Pair<Waypoint, com.sap.sse.common.Util.Pair<TimePoint, TimePoint>>> markPassingsTimes = trackedRace.getMarkPassingsTimes();
|
||||
@@ -2829,7 +2830,9 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
Iterable<SwissTimingConfiguration> configs = swissTimingAdapterPersistence.getSwissTimingConfigurations();
|
||||
List<SwissTimingConfigurationDTO> result = new ArrayList<SwissTimingConfigurationDTO>();
|
||||
for (SwissTimingConfiguration stConfig : configs) {
|
||||
result.add(new SwissTimingConfigurationDTO(stConfig.getName(), stConfig.getJsonURL(), stConfig.getHostname(), stConfig.getPort()));
|
||||
result.add(new SwissTimingConfigurationDTO(stConfig.getName(), stConfig.getJsonURL(),
|
||||
stConfig.getHostname(), stConfig.getPort(), stConfig.getUpdateURL(), stConfig.getUpdateUsername(),
|
||||
stConfig.getUpdatePassword()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -2867,9 +2870,9 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSwissTimingConfiguration(String configName, String jsonURL, String hostname, Integer port) {
|
||||
public void storeSwissTimingConfiguration(String configName, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
if (!jsonURL.equalsIgnoreCase("test")) {
|
||||
swissTimingAdapterPersistence.storeSwissTimingConfiguration(swissTimingFactory.createSwissTimingConfiguration(configName, jsonURL, hostname, port));
|
||||
swissTimingAdapterPersistence.storeSwissTimingConfiguration(swissTimingFactory.createSwissTimingConfiguration(configName, jsonURL, hostname, port, updateURL, updateUsername, updatePassword));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2885,7 +2888,8 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
|
||||
@Override
|
||||
public void trackWithSwissTiming(RegattaIdentifier regattaToAddTo, Iterable<SwissTimingRaceRecordDTO> rrs, String hostname, int port,
|
||||
boolean trackWind, final boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm) throws Exception {
|
||||
boolean trackWind, final boolean correctWindByDeclination, boolean useInternalMarkPassingAlgorithm,
|
||||
String updateURL, String updateUsername, String updatePassword) throws InterruptedException, ParseException, Exception {
|
||||
logger.info("tracWithSwissTiming for regatta " + regattaToAddTo + " for race records " + rrs
|
||||
+ " with hostname " + hostname + " and port " + port);
|
||||
Map<String, RegattaResults> cachedRegattaEntriesLists = new HashMap<String, RegattaResults>();
|
||||
@@ -2910,7 +2914,8 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
getSwissTimingAdapter().addSwissTimingRace(getService(), regattaToAddTo,
|
||||
rr.raceId, rr.getName(), raceDescription, boatClass, hostname, port, startList,
|
||||
getRaceLogStore(), getRegattaLogStore(),
|
||||
RaceTracker.TIMEOUT_FOR_RECEIVING_RACE_DEFINITION_IN_MILLISECONDS, useInternalMarkPassingAlgorithm, trackWind, correctWindByDeclination);
|
||||
RaceTracker.TIMEOUT_FOR_RECEIVING_RACE_DEFINITION_IN_MILLISECONDS, useInternalMarkPassingAlgorithm, trackWind,
|
||||
correctWindByDeclination, updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -19,6 +19,7 @@ public class RaceTimesInfoDTO implements IsSerializable {
|
||||
public Date startOfTracking;
|
||||
public Date endOfTracking;
|
||||
public Date endOfRace;
|
||||
public Date raceFinishedTime;
|
||||
public Date newestTrackingEvent;
|
||||
|
||||
/**
|
||||
@@ -83,6 +84,10 @@ public class RaceTimesInfoDTO implements IsSerializable {
|
||||
public Date getEndOfRace() {
|
||||
return endOfRace;
|
||||
}
|
||||
|
||||
public Date getFinishedTime() {
|
||||
return raceFinishedTime;
|
||||
}
|
||||
|
||||
public void setEndOfRace(Date endOfRace) {
|
||||
this.endOfRace = endOfRace;
|
||||
@@ -118,7 +123,7 @@ public class RaceTimesInfoDTO implements IsSerializable {
|
||||
+ ", legInfos=" + legInfos + ", markPassingTimes="
|
||||
+ markPassingTimes + ", startOfRace=" + startOfRace
|
||||
+ ", startOfTracking=" + startOfTracking + ", endOfTracking="
|
||||
+ endOfTracking + ", endOfRace=" + endOfRace
|
||||
+ endOfTracking + ", endOfRace=" + endOfRace + ", finishedTime=" + raceFinishedTime
|
||||
+ ", newestTrackingEvent=" + newestTrackingEvent
|
||||
+ ", currentServerTime=" + currentServerTime
|
||||
+ ", delayToLiveInMs=" + delayToLiveInMs + "]";
|
||||
|
||||
+32
-2
@@ -8,14 +8,33 @@ public class SwissTimingConfigurationDTO implements IsSerializable {
|
||||
private String hostname;
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* The URL to use for updates fed back to the SwissTiming server, such as changes of race timings
|
||||
* or course updates.
|
||||
*/
|
||||
private String updateURL;
|
||||
|
||||
/**
|
||||
* The username to use as part of the credentials for requests to the {@link #updateURL}.
|
||||
*/
|
||||
private String updateUsername;
|
||||
|
||||
/**
|
||||
* The password to use as part of the credentials for requests to the {@link #updateURL}.
|
||||
*/
|
||||
private String updatePassword;
|
||||
|
||||
public SwissTimingConfigurationDTO() {}
|
||||
|
||||
public SwissTimingConfigurationDTO(String name, String jsonURL, String hostname, Integer port) {
|
||||
public SwissTimingConfigurationDTO(String name, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.jsonURL = jsonURL;
|
||||
this.hostname = hostname;
|
||||
this.port = port;
|
||||
this.updateURL = updateURL;
|
||||
this.updateUsername = updateUsername;
|
||||
this.updatePassword = updatePassword;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -33,5 +52,16 @@ public class SwissTimingConfigurationDTO implements IsSerializable {
|
||||
public Integer getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
|
||||
public String getUpdateURL() {
|
||||
return updateURL;
|
||||
}
|
||||
|
||||
public String getUpdateUsername() {
|
||||
return updateUsername;
|
||||
}
|
||||
|
||||
public String getUpdatePassword() {
|
||||
return updatePassword;
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -53,7 +53,8 @@ public class SwissTimingConnectivityParamsLoadAndStoreTest extends AbstractConne
|
||||
final SwissTimingTrackingConnectivityParameters stParams = new SwissTimingTrackingConnectivityParameters(
|
||||
hostname, port, raceID, raceName, raceDescription, boatClass, startList, delayToLiveInMillis,
|
||||
SwissTimingFactory.INSTANCE, new SwissTimingAdapterFactoryImpl().getOrCreateSwissTimingAdapter(domainObjectFactory.getBaseDomainFactory()).getSwissTimingDomainFactory(),
|
||||
/* raceLogStore */ null, /* regattaLogStore */ null, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination);
|
||||
/* raceLogStore */ null, /* regattaLogStore */ null, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination,
|
||||
/* updateURL */ null, /* updateUsername */ null, /* updatePassword */ null);
|
||||
// store
|
||||
mongoObjectFactory.addConnectivityParametersForRaceToRestore(stParams);
|
||||
// load
|
||||
@@ -103,7 +104,8 @@ public class SwissTimingConnectivityParamsLoadAndStoreTest extends AbstractConne
|
||||
final SwissTimingTrackingConnectivityParameters stParams = new SwissTimingTrackingConnectivityParameters(
|
||||
hostname, port, raceID, raceName, raceDescription, boatClass, startList, delayToLiveInMillis,
|
||||
SwissTimingFactory.INSTANCE, new SwissTimingAdapterFactoryImpl().getOrCreateSwissTimingAdapter(domainObjectFactory.getBaseDomainFactory()).getSwissTimingDomainFactory(),
|
||||
/* raceLogStore */ null, /* regattaLogStore */ null, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination);
|
||||
/* raceLogStore */ null, /* regattaLogStore */ null, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination,
|
||||
/* updateURL */ null, /* updateUsername */ null, /* updatePassword */ null);
|
||||
// store
|
||||
mongoObjectFactory.addConnectivityParametersForRaceToRestore(stParams);
|
||||
// load
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class RaceStateSerializer implements JsonSerializer<Pair<RaceColumn, Flee
|
||||
result.put("trackedRaceId", raceIdentifier != null ? raceIdentifier.toString() : null);
|
||||
RaceLog raceLog = raceColumn.getRaceLog(fleet);
|
||||
if (raceLog != null && !raceLog.isEmpty()) {
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.create(raceLogResolver, raceLog);
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.getOrCreate(raceLogResolver, raceLog);
|
||||
RaceLogRaceStatus status = state.getStatus();
|
||||
TimePoint startTime = state.getStartTime();
|
||||
TimePoint finishedTime = state.getFinishedTime();
|
||||
|
||||
+2
-2
@@ -3636,7 +3636,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
Leaderboard leaderboard = getLeaderboardByName(leaderboardName);
|
||||
final Triple<TimePoint, Integer, RacingProcedureType> result;
|
||||
if (leaderboard instanceof HasRegattaLike && raceLog != null) {
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.create(/* race log resolver */ this, raceLog);
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.getOrCreate(/* race log resolver */ this, raceLog);
|
||||
result = new com.sap.sse.common.Util.Triple<TimePoint, Integer, RacingProcedureType>(state.getStartTime(),
|
||||
raceLog.getCurrentPassId(), state.getRacingProcedure().getType());
|
||||
} else {
|
||||
@@ -3652,7 +3652,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
Leaderboard leaderboard = getLeaderboardByName(leaderboardName);
|
||||
final Triple<TimePoint, TimePoint, Integer> result;
|
||||
if (leaderboard instanceof HasRegattaLike && raceLog != null) {
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.create(/* race log resolver */ this, raceLog);
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.getOrCreate(/* race log resolver */ this, raceLog);
|
||||
result = new com.sap.sse.common.Util.Triple<>(state.getFinishingTime(), state.getFinishedTime(),
|
||||
raceLog.getCurrentPassId());
|
||||
} else {
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<h2 class="articleSubheadline">July 2018</h2>
|
||||
<ul class="bulletList">
|
||||
<li>The mark passing editor now uses a full date/time format for the mark passing time points.</li>
|
||||
<li>The TracTrac connector panel no longer shows a password visibly but uses a password text field.</li>
|
||||
<li>The SwissTiming connector can now handle an "Update URL" together with username/password access
|
||||
credentials which are used, if present, to send feedback requests about start times, race status
|
||||
and course changes to that URL.</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="articleSubheadline">July 2018</h2>
|
||||
|
||||
+3
-27
@@ -64,7 +64,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
public FileStoragePanel(FileStorageManagementGwtServiceAsync sailingService, ErrorReporter errorReporter) {
|
||||
this.sailingService = sailingService;
|
||||
this.errorReporter = errorReporter;
|
||||
|
||||
Button refreshButton = new Button(stringMessages.refresh());
|
||||
refreshButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
@@ -73,12 +72,10 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
});
|
||||
add(refreshButton);
|
||||
|
||||
CaptionPanel activeServicePanel = new CaptionPanel(stringMessages.active());
|
||||
activeServiceLabel = new Label();
|
||||
activeServicePanel.add(activeServiceLabel);
|
||||
add(activeServicePanel);
|
||||
|
||||
CaptionPanel editServicePanel = new CaptionPanel(stringMessages.edit());
|
||||
VerticalPanel editServicePanelContent = new VerticalPanel();
|
||||
editServicePanel.add(editServicePanelContent);
|
||||
@@ -90,16 +87,13 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
});
|
||||
editServicePanelContent.add(servicesListBox);
|
||||
|
||||
serviceDescriptionLabel = new Label();
|
||||
editServicePanelContent.add(serviceDescriptionLabel);
|
||||
|
||||
propertiesTable = new BaseCelltable<>();
|
||||
propertiesTable.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED); //allow for default tabbing behaviour
|
||||
propertiesListDataProvider = new ListDataProvider<>(new ArrayList<FileStorageServicePropertyDTO>());
|
||||
properties = propertiesListDataProvider.getList();
|
||||
propertiesListDataProvider.addDataDisplay(propertiesTable);
|
||||
|
||||
TextColumn<FileStorageServicePropertyDTO> nameColumn = new TextColumn<FileStorageServicePropertyDTO>() {
|
||||
@Override
|
||||
public String getValue(FileStorageServicePropertyDTO p) {
|
||||
@@ -107,7 +101,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
};
|
||||
propertiesTable.addColumn(nameColumn, stringMessages.name());
|
||||
|
||||
Column<FileStorageServicePropertyDTO, String> inputColumn = new Column<FileStorageServicePropertyDTO, String>(
|
||||
new TabbingTextInputCell()) {
|
||||
@Override
|
||||
@@ -122,7 +115,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
});
|
||||
propertiesTable.addColumn(inputColumn, stringMessages.value());
|
||||
|
||||
TextColumn<FileStorageServicePropertyDTO> descriptionColumn = new TextColumn<FileStorageServicePropertyDTO>() {
|
||||
@Override
|
||||
public String getValue(FileStorageServicePropertyDTO p) {
|
||||
@@ -130,7 +122,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
};
|
||||
propertiesTable.addColumn(descriptionColumn, stringMessages.description());
|
||||
|
||||
TextColumn<FileStorageServicePropertyDTO> errorColumn = new TextColumn<FileStorageServicePropertyDTO>() {
|
||||
@Override
|
||||
public String getValue(FileStorageServicePropertyDTO p) {
|
||||
@@ -140,15 +131,11 @@ public class FileStoragePanel extends FlowPanel {
|
||||
};
|
||||
errorColumn.setCellStyleNames("errorLabel");
|
||||
propertiesTable.addColumn(errorColumn, stringMessages.error());
|
||||
|
||||
editServicePanelContent.add(propertiesTable);
|
||||
|
||||
propertiesErrorLabel = new Label();
|
||||
propertiesErrorLabel.setStyleName("errorLabel");
|
||||
editServicePanelContent.add(propertiesErrorLabel);
|
||||
|
||||
HorizontalPanel buttonsPanel = new HorizontalPanel();
|
||||
|
||||
Button saveAndTestPropertiesButton = new Button(stringMessages.save());
|
||||
saveAndTestPropertiesButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
@@ -157,7 +144,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
});
|
||||
buttonsPanel.add(saveAndTestPropertiesButton);
|
||||
|
||||
Button setAsActiveServiceButton = new Button(stringMessages.setAsActive());
|
||||
setAsActiveServiceButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
@@ -166,11 +152,8 @@ public class FileStoragePanel extends FlowPanel {
|
||||
}
|
||||
});
|
||||
buttonsPanel.add(setAsActiveServiceButton);
|
||||
|
||||
editServicePanelContent.add(buttonsPanel);
|
||||
|
||||
add(editServicePanel);
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
@@ -273,12 +256,10 @@ public class FileStoragePanel extends FlowPanel {
|
||||
perPropertyErrors.clear();
|
||||
serviceDescriptionLabel.setText("");
|
||||
FileStorageServiceDTO selected = availableServices.get(getSelectedServiceName());
|
||||
if (selected == null) {
|
||||
return;
|
||||
if (selected != null) {
|
||||
serviceDescriptionLabel.setText(selected.description);
|
||||
properties.addAll(Arrays.asList(selected.properties));
|
||||
}
|
||||
|
||||
serviceDescriptionLabel.setText(selected.description);
|
||||
properties.addAll(Arrays.asList(selected.properties));
|
||||
}
|
||||
|
||||
private String getLocaleInfo() {
|
||||
@@ -287,14 +268,12 @@ public class FileStoragePanel extends FlowPanel {
|
||||
|
||||
private void refresh() {
|
||||
String oldSelectedService = getSelectedServiceName();
|
||||
|
||||
servicesListBox.clear();
|
||||
servicesListBox.addItem("");
|
||||
availableServices.clear();
|
||||
propertiesErrorLabel.setText("");
|
||||
perPropertyErrors.clear();
|
||||
onServiceSelectionChanged();
|
||||
|
||||
sailingService.getActiveFileStorageServiceName(new AsyncCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
@@ -306,7 +285,6 @@ public class FileStoragePanel extends FlowPanel {
|
||||
errorReporter.reportError(stringMessages.couldNotLoadActiveService() + ": " + caught.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
sailingService.getAvailableFileStorageServices(getLocaleInfo(), new AsyncCallback<FileStorageServiceDTO[]>() {
|
||||
@Override
|
||||
public void onSuccess(FileStorageServiceDTO[] result) {
|
||||
@@ -321,14 +299,12 @@ public class FileStoragePanel extends FlowPanel {
|
||||
errorReporter.reportError(stringMessages.couldNotLoadAvailableServices() + ": " + caught.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < servicesListBox.getItemCount(); i++) {
|
||||
if (servicesListBox.getItemText(i).equals(oldSelectedService)) {
|
||||
servicesListBox.setSelectedIndex(i);
|
||||
}
|
||||
}
|
||||
onServiceSelectionChanged();
|
||||
|
||||
testProperties(null);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
<listAttribute key="com.gwtplugins.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sse.security.ui.Login"/>
|
||||
<listEntry value="com.sap.sse.security.ui.Register"/>
|
||||
<listEntry value="com.sap.sse.security.ui.UserManagement"/>
|
||||
<listEntry value="com.sap.sse.security.ui.UserManagementEntryPoint"/>
|
||||
<listEntry value="com.sap.sse.security.ui.OAuthLogin"/>
|
||||
<listEntry value="com.sap.sse.security.ui.EmailValidation"/>
|
||||
<listEntry value="com.sap.sse.security.ui.EditProfile"/>
|
||||
@@ -105,7 +105,7 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.gwtplugins.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -workDir "${project_loc:com.sap.sse.security.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sse.security.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9877 -startupUrl /security/ui/Login.html -startupUrl /security/ui/EditProfile.html -startupUrl /security/ui/EmailValidation.html -startupUrl /security/ui/UserManagement.html -startupUrl /security/ui/Register.html -startupUrl /security/ui/Login.html com.sap.sse.security.ui.EditProfile com.sap.sse.security.ui.EmailValidation com.sap.sse.security.ui.OAuthLogin com.sap.sse.security.ui.UserManagement com.sap.sse.security.ui.Register com.sap.sse.security.ui.Login"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -workDir "${project_loc:com.sap.sse.security.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sse.security.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9877 -startupUrl /security/ui/Login.html -startupUrl /security/ui/EditProfile.html -startupUrl /security/ui/EmailValidation.html -startupUrl /security/ui/UserManagement.html -startupUrl /security/ui/Register.html -startupUrl /security/ui/Login.html com.sap.sse.security.ui.EditProfile com.sap.sse.security.ui.EmailValidation com.sap.sse.security.ui.OAuthLogin com.sap.sse.security.ui.UserManagementEntryPoint com.sap.sse.security.ui.Register com.sap.sse.security.ui.Login"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sse.security.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+UseG1GC -XX:+UseStringDeduplication -Dgwt.watchFileChanges=false -Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work"/>
|
||||
|
||||
@@ -6,8 +6,7 @@ Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.sap.sse.security.impl.Activator
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Import-Package: com.sap.sse.util,
|
||||
javax.mail;version="1.4.0",
|
||||
Import-Package: javax.mail;version="1.4.0",
|
||||
javax.mail.internet;version="1.4.0",
|
||||
javax.ws.rs;version="1.1.1",
|
||||
javax.ws.rs.core;version="1.1.1",
|
||||
@@ -26,6 +25,7 @@ Require-Bundle: javax.servlet;bundle-version="3.1.0",
|
||||
org.apache.shiro.web;bundle-version="1.2.2",
|
||||
org.apache.servicemix.bundles.ehcache;bundle-version="2.6.9",
|
||||
org.apache.servicemix.bundles.scribe;bundle-version="1.3.3",
|
||||
com.sap.sse,
|
||||
com.sap.sse.common,
|
||||
com.sap.sse.replication,
|
||||
com.sap.sse.operationaltransformation,
|
||||
|
||||
@@ -11,6 +11,7 @@ Export-Package: com.sap.sse.concurrent,
|
||||
com.sap.sse.shared.media,
|
||||
com.sap.sse.shared.media.impl,
|
||||
com.sap.sse.shared.settings,
|
||||
com.sap.sse.util,
|
||||
com.sap.sse.util.impl
|
||||
Import-Package: com.sap.sse.common.settings,
|
||||
com.sap.sse.common.settings.generic,
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -13,6 +13,17 @@ To build the software, just call `make build`. Make sure that all dependencies a
|
||||
To test the software, just call `make test` and to check the tests, call `make checktest`. There are also make steps for `fmt` and others. Just check out the Makefile in the project root.
|
||||
The verbose output of the test logs is written to a folder called `testlogs` (which initially needs to be created).
|
||||
|
||||
### Develop
|
||||
As the only Plugin for Eclipse is not really maintained anymore, we do not recommend to use it (goclipse). There is actually also no reason for it, as we are using Go and not Java or any OSGI features.
|
||||
As go is pretty simple and straight forward, you can use any Go supported IDE as stated on https://golang.org/doc/editors.html.
|
||||
|
||||
Anyways, we recommend either using Goland (from IntelliJ), VS Code or Atom with respective go-plus Plugin.
|
||||
All you need to do after [installing go](https://golang.org/doc/install) and the IDE, is to make sure to set the above mentioned environment variable `PREFIX` to the code directory inside your IDE, so that tests can be successfully executed. Furthermore make sure to set the `GOPATH` correctly, create a directory (outside of the git workspace) and point the `GOPATH` to it. Then, add the code directory from git also to the `GOPATH`. This will result in the fact, that go will download all external dependencies with e.g. `make dep` or `go get` to the first folder and not put everything into the code directories. You will find all dependencies needed for the project inside the top lines for the `makefile`.
|
||||
|
||||
An example for a correct `GOPATH` could be: `GOPATH=/home/steffen/.godep:/home/steffen/sailing-automation/`
|
||||
|
||||
Happy Coding!
|
||||
|
||||
## Get and prepare the software
|
||||
You can get the current release of the orchestration software currently from [here](http://static.sapsailing.com/orchestration-0.0.1_7f7e4e40d30f21ffeb8495a370a540c23c496745.tgz) until a release model is decided. The releases of each build can be downloaded directly on hudson via archived artifacts. The currently set up hudson job is called `orchestration-master` and can be started manually (runs on the archive failover, where go is installed).
|
||||
|
||||
|
||||
Reference in new issue
Block a user