mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
moved Util from com.sap.sailing.common to com.sap.sse.common
This commit is contained in:
1 parent
f9bdd96d55
commit
cb9354b1a0
355 files changed
+1804
-1804
No files matched your search
@@ -65,8 +65,8 @@ import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.TrackerManager;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.server.masterdata.DataImportLockWithProgress;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.Util.Triple;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
import com.sap.sse.common.UtilNew.Triple;
|
||||
|
||||
/**
|
||||
* An OSGi service that can be used to track boat races using a TracTrac connector that pushes
|
||||
@@ -157,7 +157,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
* comment where a wind tracker may provide information such as its type name or, if applicable,
|
||||
* connectivity information such as the network port on which it receives wind information.
|
||||
*/
|
||||
Iterable<Util.Triple<Regatta, RaceDefinition, String>> getWindTrackedRaces();
|
||||
Iterable<UtilNew.Triple<Regatta, RaceDefinition, String>> getWindTrackedRaces();
|
||||
|
||||
/**
|
||||
* Creates a new leaderboard with the <code>name</code> specified.
|
||||
@@ -384,11 +384,11 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
|
||||
/**
|
||||
* @return a thread-safe copy of the events (or the exception that occurred trying to obtain the events; arranged in
|
||||
* a {@link Util.Pair}) of from all sailing server instances currently known by the service; it's safe for
|
||||
* a {@link UtilNew.Pair}) of from all sailing server instances currently known by the service; it's safe for
|
||||
* callers to iterate over the iterable returned, and no risk of a {@link ConcurrentModificationException}
|
||||
* exists
|
||||
*/
|
||||
Map<RemoteSailingServerReference, Util.Pair<Iterable<EventBase>, Exception>> getPublicEventsOfAllSailingServers();
|
||||
Map<RemoteSailingServerReference, UtilNew.Pair<Iterable<EventBase>, Exception>> getPublicEventsOfAllSailingServers();
|
||||
|
||||
RemoteSailingServerReference addRemoteSailingServerReference(String name, URL url);
|
||||
|
||||
@@ -446,7 +446,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
* @return a pair with the found or created regatta, and a boolean that tells whether the regatta was created during
|
||||
* the call
|
||||
*/
|
||||
Util.Pair<Regatta, Boolean> getOrCreateRegattaWithoutReplication(String baseRegattaName, String boatClassName, Serializable id,
|
||||
UtilNew.Pair<Regatta, Boolean> getOrCreateRegattaWithoutReplication(String baseRegattaName, String boatClassName, Serializable id,
|
||||
Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme,
|
||||
Serializable defaultCourseAreaId);
|
||||
|
||||
@@ -507,7 +507,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
/**
|
||||
* Gets the start time, pass identifier and racing procedure for the queried race. Start time might be <code>null</code>.
|
||||
*/
|
||||
Util.Triple<TimePoint, Integer, RacingProcedureType> getStartTimeAndProcedure(String leaderboardName, String raceColumnName, String fleetName);
|
||||
UtilNew.Triple<TimePoint, Integer, RacingProcedureType> getStartTimeAndProcedure(String leaderboardName, String raceColumnName, String fleetName);
|
||||
|
||||
MongoObjectFactory getMongoObjectFactory();
|
||||
|
||||
@@ -551,5 +551,5 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
* For the reference to a remote sailing server, updates its events cache and returns the event list
|
||||
* or, if fetching the event list from the remote server did fail, the exception for which it failed.
|
||||
*/
|
||||
Util.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref);
|
||||
UtilNew.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import com.sap.sailing.domain.tracking.impl.GPSFixMovingImpl;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.racelog.tracking.CachedOsgiTypeBasedServiceFinderFactory;
|
||||
import com.sap.sailing.server.test.support.RacingEventServiceWithTestSupport;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
private static final Logger logger = Logger.getLogger(Activator.class.getName());
|
||||
@@ -85,7 +85,7 @@ public class Activator implements BundleActivator {
|
||||
serviceFinderFactory.close();
|
||||
}
|
||||
// stop the tracking of the wind and all races
|
||||
for (Util.Triple<Regatta, RaceDefinition, String> windTracker : racingEventService.getWindTrackedRaces()) {
|
||||
for (UtilNew.Triple<Regatta, RaceDefinition, String> windTracker : racingEventService.getWindTrackedRaces()) {
|
||||
racingEventService.stopTrackingWind(windTracker.getA(), windTracker.getB());
|
||||
}
|
||||
for (Regatta regatta : racingEventService.getAllRegattas()) {
|
||||
|
||||
+5
-5
@@ -11,7 +11,6 @@ import com.sap.sailing.domain.base.RaceColumnListener;
|
||||
import com.sap.sailing.domain.common.MaxPointsReason;
|
||||
import com.sap.sailing.domain.common.NoWindException;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.common.impl.Util;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.ResultDiscardingRule;
|
||||
import com.sap.sailing.domain.racelog.RaceLog;
|
||||
@@ -26,6 +25,7 @@ import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
import com.sap.sailing.server.operationaltransformation.UpdateLeaderboardMaxPointsReason;
|
||||
import com.sap.sailing.server.operationaltransformation.UpdateLeaderboardScoreCorrection;
|
||||
import com.sap.sailing.server.operationaltransformation.UpdateLeaderboardScoreCorrectionMetadata;
|
||||
import com.sap.sse.common.Util;
|
||||
|
||||
public class RaceLogScoringReplicator implements RaceColumnListener {
|
||||
|
||||
@@ -126,7 +126,7 @@ public class RaceLogScoringReplicator implements RaceColumnListener {
|
||||
|
||||
int numberOfCompetitorsInLeaderboard = Util.size(leaderboard.getCompetitors());
|
||||
int numberOfCompetitorsInRace;
|
||||
List<com.sap.sse.common.Util.Triple<Serializable, String, MaxPointsReason>> positioningList;
|
||||
List<com.sap.sse.common.UtilNew.Triple<Serializable, String, MaxPointsReason>> positioningList;
|
||||
|
||||
numberOfCompetitorsInRace = getNumberOfCompetitorsInRace(raceColumn, fleet, numberOfCompetitorsInLeaderboard);
|
||||
|
||||
@@ -141,7 +141,7 @@ public class RaceLogScoringReplicator implements RaceColumnListener {
|
||||
}
|
||||
|
||||
if (positioningList != null) {
|
||||
for (com.sap.sse.common.Util.Triple<Serializable, String, MaxPointsReason> positionedCompetitor : positioningList) {
|
||||
for (com.sap.sse.common.UtilNew.Triple<Serializable, String, MaxPointsReason> positionedCompetitor : positioningList) {
|
||||
Competitor competitor = service.getBaseDomainFactory().getExistingCompetitorById(positionedCompetitor.getA());
|
||||
|
||||
if (positionedCompetitor.getC().equals(MaxPointsReason.NONE)) {
|
||||
@@ -165,7 +165,7 @@ public class RaceLogScoringReplicator implements RaceColumnListener {
|
||||
}
|
||||
|
||||
private boolean setMaxPointsReasonInLeaderboardIfNecessary(Leaderboard leaderboard, RaceColumn raceColumn,
|
||||
TimePoint timePoint, com.sap.sse.common.Util.Triple<Serializable, String, MaxPointsReason> positionedCompetitor, Competitor competitor) {
|
||||
TimePoint timePoint, com.sap.sse.common.UtilNew.Triple<Serializable, String, MaxPointsReason> positionedCompetitor, Competitor competitor) {
|
||||
boolean scoreHasBeenCorrected = false;
|
||||
|
||||
MaxPointsReason trackedMaxPointsReason = leaderboard.getMaxPointsReason(competitor, raceColumn, timePoint);
|
||||
@@ -226,7 +226,7 @@ public class RaceLogScoringReplicator implements RaceColumnListener {
|
||||
* @param positionedCompetitor the competitor whose rank shall be determined
|
||||
* @return the rank of the given positionedCompetitor
|
||||
*/
|
||||
private int getRankInPositioningListByRaceCommittee(List<com.sap.sse.common.Util.Triple<Serializable, String, MaxPointsReason>> positioningList, com.sap.sse.common.Util.Triple<Serializable, String, MaxPointsReason> positionedCompetitor) {
|
||||
private int getRankInPositioningListByRaceCommittee(List<com.sap.sse.common.UtilNew.Triple<Serializable, String, MaxPointsReason>> positioningList, com.sap.sse.common.UtilNew.Triple<Serializable, String, MaxPointsReason> positionedCompetitor) {
|
||||
return positioningList.indexOf(positionedCompetitor) + 1; // indexOf gives the zero-based position requested competitor in the list, + 1 gives the one-based rank
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -71,7 +71,6 @@ import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.domain.common.dto.RegattaCreationParametersDTO;
|
||||
import com.sap.sailing.domain.common.dto.SeriesCreationParametersDTO;
|
||||
import com.sap.sailing.domain.common.impl.DataImportProgressImpl;
|
||||
import com.sap.sailing.domain.common.impl.Util;
|
||||
import com.sap.sailing.domain.common.media.MediaTrack;
|
||||
import com.sap.sailing.domain.common.media.MediaTrack.MimeType;
|
||||
import com.sap.sailing.domain.common.racelog.RacingProcedureType;
|
||||
@@ -171,6 +170,7 @@ import com.sap.sailing.server.test.support.RacingEventServiceWithTestSupport;
|
||||
import com.sap.sailing.util.BuildVersion;
|
||||
import com.sap.sailing.util.impl.LockUtil;
|
||||
import com.sap.sailing.util.impl.NamedReentrantReadWriteLock;
|
||||
import com.sap.sse.common.Util;
|
||||
|
||||
public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport, RegattaListener, LeaderboardRegistry, Replicator {
|
||||
private static final Logger logger = Logger.getLogger(RacingEventServiceImpl.class.getName());
|
||||
@@ -867,7 +867,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<RemoteSailingServerReference, com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception>> getPublicEventsOfAllSailingServers() {
|
||||
public Map<RemoteSailingServerReference, com.sap.sse.common.UtilNew.Pair<Iterable<EventBase>, Exception>> getPublicEventsOfAllSailingServers() {
|
||||
return remoteSailingServerSet.getCachedEventsForRemoteSailingServers(); // FIXME should probably add our own stuff here... Is it enough to pass on the remote reference URL to the client for leaderboard group URL construction?
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref) {
|
||||
public com.sap.sse.common.UtilNew.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref) {
|
||||
return remoteSailingServerSet.getEventsOrException(ref);
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
public Regatta createRegatta(String baseRegattaName, String boatClassName, Serializable id,
|
||||
Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme,
|
||||
Serializable defaultCourseAreaId) {
|
||||
com.sap.sse.common.Util.Pair<Regatta, Boolean> regattaWithCreatedFlag = getOrCreateRegattaWithoutReplication(baseRegattaName,
|
||||
com.sap.sse.common.UtilNew.Pair<Regatta, Boolean> regattaWithCreatedFlag = getOrCreateRegattaWithoutReplication(baseRegattaName,
|
||||
boatClassName, id, series, persistent, scoringScheme, defaultCourseAreaId);
|
||||
Regatta regatta = regattaWithCreatedFlag.getA();
|
||||
if (regattaWithCreatedFlag.getB()) {
|
||||
@@ -958,7 +958,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.sap.sse.common.Util.Pair<Regatta, Boolean> getOrCreateRegattaWithoutReplication(String baseRegattaName, String boatClassName,
|
||||
public com.sap.sse.common.UtilNew.Pair<Regatta, Boolean> getOrCreateRegattaWithoutReplication(String baseRegattaName, String boatClassName,
|
||||
Serializable id, Iterable<? extends Series> series, boolean persistent, ScoringScheme scoringScheme,
|
||||
Serializable defaultCourseAreaId) {
|
||||
RaceLogStore raceLogStore = MongoRaceLogStoreFactory.INSTANCE.getMongoRaceLogStore(mongoObjectFactory,
|
||||
@@ -996,7 +996,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
}
|
||||
}
|
||||
return new com.sap.sse.common.Util.Pair<Regatta, Boolean>(regatta, wasCreated);
|
||||
return new com.sap.sse.common.UtilNew.Pair<Regatta, Boolean>(regatta, wasCreated);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1682,14 +1682,14 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<com.sap.sse.common.Util.Triple<Regatta, RaceDefinition, String>> getWindTrackedRaces() {
|
||||
List<com.sap.sse.common.Util.Triple<Regatta, RaceDefinition, String>> result = new ArrayList<com.sap.sse.common.Util.Triple<Regatta, RaceDefinition, String>>();
|
||||
public Iterable<com.sap.sse.common.UtilNew.Triple<Regatta, RaceDefinition, String>> getWindTrackedRaces() {
|
||||
List<com.sap.sse.common.UtilNew.Triple<Regatta, RaceDefinition, String>> result = new ArrayList<com.sap.sse.common.UtilNew.Triple<Regatta, RaceDefinition, String>>();
|
||||
for (Regatta regatta : getAllRegattas()) {
|
||||
for (RaceDefinition race : regatta.getAllRaces()) {
|
||||
for (WindTrackerFactory windTrackerFactory : getWindTrackerFactories()) {
|
||||
WindTracker windTracker = windTrackerFactory.getExistingWindTracker(race);
|
||||
if (windTracker != null) {
|
||||
result.add(new com.sap.sse.common.Util.Triple<Regatta, RaceDefinition, String>(regatta, race, windTracker.toString()));
|
||||
result.add(new com.sap.sse.common.UtilNew.Triple<Regatta, RaceDefinition, String>(regatta, race, windTracker.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2478,11 +2478,11 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.sap.sse.common.Util.Triple<TimePoint, Integer, RacingProcedureType> getStartTimeAndProcedure(String leaderboardName, String raceColumnName, String fleetName) {
|
||||
public com.sap.sse.common.UtilNew.Triple<TimePoint, Integer, RacingProcedureType> getStartTimeAndProcedure(String leaderboardName, String raceColumnName, String fleetName) {
|
||||
RaceLog raceLog = getRaceLog(leaderboardName, raceColumnName, fleetName);
|
||||
if (raceLog != null) {
|
||||
ReadonlyRaceState state = ReadonlyRaceStateImpl.create(raceLog);
|
||||
return new com.sap.sse.common.Util.Triple<TimePoint, Integer, RacingProcedureType>(state.getStartTime(), raceLog.getCurrentPassId(), state.getRacingProcedure().getType());
|
||||
return new com.sap.sse.common.UtilNew.Triple<TimePoint, Integer, RacingProcedureType>(state.getStartTime(), raceLog.getCurrentPassId(), state.getRacingProcedure().getType());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+8
-8
@@ -29,7 +29,7 @@ import com.sap.sailing.server.gateway.deserialization.impl.CourseAreaJsonDeseria
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.EventBaseJsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.LeaderboardGroupBaseJsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.VenueJsonDeserializer;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
|
||||
/**
|
||||
* A set of {@link RemoteSailingServerReference}s including a cache of their {@link EventBase events} that is
|
||||
@@ -48,7 +48,7 @@ public class RemoteSailingServerSet {
|
||||
*/
|
||||
private final ConcurrentHashMap<String, RemoteSailingServerReference> remoteSailingServers;
|
||||
|
||||
private final ConcurrentHashMap<RemoteSailingServerReference, Util.Pair<Iterable<EventBase>, Exception>> cachedEventsForRemoteSailingServers;
|
||||
private final ConcurrentHashMap<RemoteSailingServerReference, UtilNew.Pair<Iterable<EventBase>, Exception>> cachedEventsForRemoteSailingServers;
|
||||
|
||||
/**
|
||||
* @param scheduler
|
||||
@@ -83,9 +83,9 @@ public class RemoteSailingServerSet {
|
||||
}.start();
|
||||
}
|
||||
|
||||
private Util.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref) {
|
||||
private UtilNew.Pair<Iterable<EventBase>, Exception> updateRemoteServerEventCacheSynchronously(RemoteSailingServerReference ref) {
|
||||
BufferedReader bufferedReader = null;
|
||||
Util.Pair<Iterable<EventBase>, Exception> result;
|
||||
UtilNew.Pair<Iterable<EventBase>, Exception> result;
|
||||
try {
|
||||
try {
|
||||
final URL eventsURL = getEventsURL(ref.getURL());
|
||||
@@ -104,7 +104,7 @@ public class RemoteSailingServerSet {
|
||||
EventBase event = deserializer.deserialize(eventAsJson);
|
||||
events.add(event);
|
||||
}
|
||||
result = new Util.Pair<Iterable<EventBase>, Exception>(events, /* exception */ null);
|
||||
result = new UtilNew.Pair<Iterable<EventBase>, Exception>(events, /* exception */ null);
|
||||
} finally {
|
||||
if (bufferedReader != null) {
|
||||
bufferedReader.close();
|
||||
@@ -112,7 +112,7 @@ public class RemoteSailingServerSet {
|
||||
}
|
||||
} catch (IOException | ParseException e) {
|
||||
logger.log(Level.INFO, "Exception trying to fetch events from remote server "+ref+": "+e.getMessage(), e);
|
||||
result = new Util.Pair<Iterable<EventBase>, Exception>(/* events */ null, e);
|
||||
result = new UtilNew.Pair<Iterable<EventBase>, Exception>(/* events */ null, e);
|
||||
}
|
||||
cachedEventsForRemoteSailingServers.put(ref, result);
|
||||
return result;
|
||||
@@ -127,7 +127,7 @@ public class RemoteSailingServerSet {
|
||||
return new URL(getEventsUrl);
|
||||
}
|
||||
|
||||
public Map<RemoteSailingServerReference, Util.Pair<Iterable<EventBase>, Exception>> getCachedEventsForRemoteSailingServers() {
|
||||
public Map<RemoteSailingServerReference, UtilNew.Pair<Iterable<EventBase>, Exception>> getCachedEventsForRemoteSailingServers() {
|
||||
return Collections.unmodifiableMap(cachedEventsForRemoteSailingServers);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class RemoteSailingServerSet {
|
||||
* result is cached. If <code>ref</code> was not yet part of this remote sailing server reference set,
|
||||
* it is automatically added.
|
||||
*/
|
||||
public Util.Pair<Iterable<EventBase>, Exception> getEventsOrException(RemoteSailingServerReference ref) {
|
||||
public UtilNew.Pair<Iterable<EventBase>, Exception> getEventsOrException(RemoteSailingServerReference ref) {
|
||||
if (!remoteSailingServers.containsKey(ref.getName())) {
|
||||
remoteSailingServers.put(ref.getName(), ref);
|
||||
}
|
||||
|
||||
+4
-4
@@ -43,7 +43,7 @@ import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindWithConfidence;
|
||||
import com.sap.sailing.domain.tracking.impl.EmptyWindStore;
|
||||
import com.sap.sailing.domain.tracking.impl.TrackedRegattaImpl;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
|
||||
public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
|
||||
private static final long serialVersionUID = -11522605089325440L;
|
||||
@@ -85,7 +85,7 @@ public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Util.Pair<Waypoint, Util.Pair<TimePoint, TimePoint>>> getMarkPassingsTimes() {
|
||||
public Iterable<UtilNew.Pair<Waypoint, UtilNew.Pair<TimePoint, TimePoint>>> getMarkPassingsTimes() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at) {
|
||||
public WindWithConfidence<UtilNew.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ public class DummyTrackedRace extends TrackedRaceWithWindEssentials {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
|
||||
public WindWithConfidence<UtilNew.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
|
||||
Iterable<WindSource> windSourcesToExclude) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
||||
+1
-1
@@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.CompetitorStore;
|
||||
import com.sap.sailing.domain.common.impl.Util;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
import com.sap.sse.common.Util;
|
||||
|
||||
public class AllowCompetitorResetToDefaults extends AbstractRacingEventServiceOperation<Void> {
|
||||
private static final long serialVersionUID = 5133140671156755328L;
|
||||
|
||||
+3
-3
@@ -26,7 +26,6 @@ import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.ScoringSchemeType;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.common.impl.MasterDataImportObjectCreationCountImpl;
|
||||
import com.sap.sailing.domain.common.impl.Util;
|
||||
import com.sap.sailing.domain.leaderboard.FlexibleLeaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
|
||||
@@ -49,6 +48,7 @@ import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
import com.sap.sailing.server.masterdata.DummyTrackedRace;
|
||||
import com.sap.sse.common.Util;
|
||||
|
||||
public class ImportMasterDataOperation extends
|
||||
AbstractRacingEventServiceOperation<MasterDataImportObjectCreationCountImpl> {
|
||||
@@ -302,7 +302,7 @@ public class ImportMasterDataOperation extends
|
||||
* @param leaderboard
|
||||
* @return the race column and fleet the dummy was attached to
|
||||
*/
|
||||
public com.sap.sse.common.Util.Pair<RaceColumn, Fleet> addDummyTrackedRace(Leaderboard leaderboard,
|
||||
public com.sap.sse.common.UtilNew.Pair<RaceColumn, Fleet> addDummyTrackedRace(Leaderboard leaderboard,
|
||||
Regatta regatta) {
|
||||
RaceColumn raceColumn = null;
|
||||
Fleet fleet = null;
|
||||
@@ -318,7 +318,7 @@ public class ImportMasterDataOperation extends
|
||||
raceColumn.setTrackedRace(fleet, dummy);
|
||||
}
|
||||
}
|
||||
return new com.sap.sse.common.Util.Pair<RaceColumn, Fleet>(raceColumn, fleet);
|
||||
return new com.sap.sse.common.UtilNew.Pair<RaceColumn, Fleet>(raceColumn, fleet);
|
||||
}
|
||||
|
||||
private void createWindTracks(RacingEventService toState) {
|
||||
|
||||
+4
-4
@@ -9,9 +9,9 @@ import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard.Entry;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
|
||||
public class UpdateLeaderboardMaxPointsReason extends AbstractLeaderboardColumnOperation<Util.Triple<Double, Double, Boolean>> {
|
||||
public class UpdateLeaderboardMaxPointsReason extends AbstractLeaderboardColumnOperation<UtilNew.Triple<Double, Double, Boolean>> {
|
||||
private static final long serialVersionUID = -492130952256848047L;
|
||||
private final String competitorIdAsString;
|
||||
private final MaxPointsReason newMaxPointsReason;
|
||||
@@ -38,7 +38,7 @@ public class UpdateLeaderboardMaxPointsReason extends AbstractLeaderboardColumnO
|
||||
}
|
||||
|
||||
@Override
|
||||
public Util.Triple<Double, Double, Boolean> internalApplyTo(RacingEventService toState) throws NoWindException {
|
||||
public UtilNew.Triple<Double, Double, Boolean> internalApplyTo(RacingEventService toState) throws NoWindException {
|
||||
Leaderboard leaderboard = toState.getLeaderboardByName(getLeaderboardName());
|
||||
if (leaderboard != null) {
|
||||
Competitor competitor = leaderboard.getCompetitorByIdAsString(competitorIdAsString);
|
||||
@@ -51,7 +51,7 @@ public class UpdateLeaderboardMaxPointsReason extends AbstractLeaderboardColumnO
|
||||
updateStoredLeaderboard(toState, leaderboard);
|
||||
Entry updatedEntry = leaderboard.getEntry(competitor, raceColumn, timePoint);
|
||||
boolean isScoreCorrected = leaderboard.getScoreCorrection().isScoreCorrected(competitor, raceColumn, timePoint);
|
||||
return new Util.Triple<Double, Double, Boolean>(updatedEntry.getNetPoints(), updatedEntry.getTotalPoints(), isScoreCorrected);
|
||||
return new UtilNew.Triple<Double, Double, Boolean>(updatedEntry.getNetPoints(), updatedEntry.getTotalPoints(), isScoreCorrected);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Didn't find competitor with ID "+competitorIdAsString+" in leaderboard "+getLeaderboardName());
|
||||
}
|
||||
|
||||
+4
-4
@@ -7,9 +7,9 @@ import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.UtilNew;
|
||||
|
||||
public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnOperation<Util.Triple<Double, Double, Boolean>> {
|
||||
public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnOperation<UtilNew.Triple<Double, Double, Boolean>> {
|
||||
private static final long serialVersionUID = -977025759476022993L;
|
||||
private final String competitorIdAsString;
|
||||
private final Double correctedScore;
|
||||
@@ -39,7 +39,7 @@ public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnO
|
||||
}
|
||||
|
||||
@Override
|
||||
public Util.Triple<Double, Double, Boolean> internalApplyTo(RacingEventService toState) throws NoWindException {
|
||||
public UtilNew.Triple<Double, Double, Boolean> internalApplyTo(RacingEventService toState) throws NoWindException {
|
||||
Leaderboard leaderboard = toState.getLeaderboardByName(getLeaderboardName());
|
||||
Double newNetPoints;
|
||||
Double newTotalPoints;
|
||||
@@ -64,7 +64,7 @@ public class UpdateLeaderboardScoreCorrection extends AbstractLeaderboardColumnO
|
||||
throw new IllegalArgumentException("Didn't find leaderboard "+getLeaderboardName());
|
||||
}
|
||||
updateStoredLeaderboard(toState, leaderboard);
|
||||
return new Util.Triple<Double, Double, Boolean>(newNetPoints, newTotalPoints, isScoreCorrected);
|
||||
return new UtilNew.Triple<Double, Double, Boolean>(newNetPoints, newTotalPoints, isScoreCorrected);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user