diff --git a/home.md b/home.md index f6fca6bdba8..cfcf36ddcb7 100644 --- a/home.md +++ b/home.md @@ -17,7 +17,7 @@ SAP is at the center of today’s technology revolution, developing innovations * [[Big Data - Numbers|wiki/big-data-numbers]] * [[Sailing Domain Algorithms|wiki/sailing-domain-algorithms]] * [[Inventory|wiki/inventar-liste]] - * [[RaceLog tracking|wiki/racelog-tracking]] + * [[RaceLog / Smartphone tracking|wiki/racelog-tracking]] * [[Racecommittee App|wiki/racecommittee-app]] * [[Tracking App|wiki/tracking-app]] * [[Web Services API|wiki/sailing-webservices]] diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/BoatClassMasterdata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/BoatClassMasterdata.java index e95c3198a40..7c42ded1317 100644 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/BoatClassMasterdata.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/BoatClassMasterdata.java @@ -4,6 +4,7 @@ import com.sap.sailing.domain.common.impl.MeterDistance; public enum BoatClassMasterdata { + _18Footer ("18Footer", true, 8.90, 2.00, BoatHullType.MONOHULL, true, "18.Footer", "18ft", "18ft Skiff"), _2_4M ("2.4 Meter", true, 4.11, 0.81, BoatHullType.MONOHULL, false, "2.4M", "2.4mR", "2.4 Metre", "2.4-metre"), _5O5 ("5O5", true, 5.03, 1.88, BoatHullType.MONOHULL, true, "505", "5o5", "505er", "5o5er"), _12M ("12 Meter", true, 5.97, 1.43, BoatHullType.MONOHULL, true, "12M", "12mR", "12SQM", "12-metre", "12 metre"), @@ -16,7 +17,10 @@ public enum BoatClassMasterdata { A_CAT ("A-Catamaran", true, 5.49, 2.30, BoatHullType.CATAMARAN, false, "A-Cat", "ACat", "A-Class Catamaran"), ALBIN_EXPRESS ("Albin Express", true, 7.77, 2.50, BoatHullType.MONOHULL, false), ALBIN_BALLAD ("Albin Ballad", true, 9.12, 2.95, BoatHullType.MONOHULL, false), + CANOE_IC ("International Canoe", true, 5.20, 1.01, BoatHullType.MONOHULL, true, "Canoe IC", "Canoe-IC", "IC", "Kanu IC", "International Canoe", "International 10 Sq.m. Sailing Canoe"), + CANOE_TAIFUN ("Canoe Taifun", true, 5.20, 1.32, BoatHullType.MONOHULL, false, "Taifun", "Taifun Kanu", "Kanu Taifun"), B_ONE ("B/ONE", true, 7.80, 2.49, BoatHullType.MONOHULL, true, "B-ONE"), + D_ONE ("D-One", true, 4.23, 2.31, BoatHullType.MONOHULL, true, "Devoti D-One", "DOne", "D_One"), DRAGON_INT ("Dragon Int.", true, 8.89, 1.96, BoatHullType.MONOHULL, true, "Drachen", "Dragon"), EXTREME_40 ("Extreme 40", false, 12.2, 6.60, BoatHullType.CATAMARAN, true, "Extreme-40", "Extreme40", "ESS40"), D_35 ("D35", false, 10.81, 6.89, BoatHullType.CATAMARAN, false), @@ -25,16 +29,21 @@ public enum BoatClassMasterdata { F_18 ("Formula 18", true, 6.85, 2.25, BoatHullType.CATAMARAN, true, "F18", "F-18"), FARR_30 ("Farr 30", true, 9.42, 3.08, BoatHullType.MONOHULL, true, "F30", "F-30", "Farr-30"), FINN ("Finn", true, 4.50, 1.51, BoatHullType.MONOHULL, false), + FLYING_PHANTOM ("Flying Phantom", true, 5.52, 3.00, BoatHullType.CATAMARAN, true), FOLKBOAT ("Folkboat", true, 7.68, 2.20, BoatHullType.MONOHULL, false, "Folke", "Folkeboot"), + FUN ("FUN", true, 7.20, 2.45, BoatHullType.MONOHULL, true, "FUN O.D.", "FUN OD"), F_16 ("Formula 16", true, 5.00, 2.50, BoatHullType.CATAMARAN, true, "F16", "F-16"), HOBIE_16 ("Hobie 16", true, 5.05, 2.41, BoatHullType.CATAMARAN, false, "H16"), H_BOAT ("H-Boat", true, 8.28, 2.18, BoatHullType.MONOHULL, true, "HB"), HOBIE_TIGER ("Hobie Tiger", true, 5.51, 2.60, BoatHullType.CATAMARAN, true), HOBIE_WILD_CAT ("Hobie Wild Cat", true, 5.49, 2.59, BoatHullType.CATAMARAN, true, "Hobie Wild Cat F18"), + J22 ("J/22", true, 6.86, 2.44, BoatHullType.MONOHULL, true, "J22", "J-22"), + J24 ("J/24", true, 7.32, 2.67, BoatHullType.MONOHULL, true, "J24", "J-24"), J70 ("J/70", true, 6.93, 2.25, BoatHullType.MONOHULL, true, "J70", "J-70"), J80 ("J/80", true, 8.0, 2.51, BoatHullType.MONOHULL, true, "J80", "J-80"), - J24 ("J/24", true, 7.32, 2.67, BoatHullType.MONOHULL, true, "J24", "J-24"), + KIELZUGVOGEL ("Kielzugvogel", true, 5.80, 1.88, BoatHullType.MONOHULL, false), KITE ("Kite", true, 3.35, 1.52, BoatHullType.MONOHULL, false), + LASER_2 ("Laser 2", true, 4.39, 1.42, BoatHullType.MONOHULL, false, "Laser II", "Laser2", "Laser-2", "Laser-II"), LASER_4_7 ("Laser 4.7", true, 4.20, 1.39, BoatHullType.MONOHULL, false, "L4.7"), LASER_RADIAL ("Laser Radial", true, 4.19, 1.41, BoatHullType.MONOHULL, false, "LAR", "Laser RAD", "RAD", "Radial"), LASER_INT ("Laser Int.", true, 4.19, 1.39, BoatHullType.MONOHULL, false, "Laser", "LSR"), @@ -43,22 +52,25 @@ public enum BoatClassMasterdata { MINI_TRANSAT ("Mini Transat 6.50", true, 6.50, 3.00, BoatHullType.MONOHULL, true, "Mini Transat"), MUSTO_SKIFF ("Musto Skiff", true, 4.55, 1.35, BoatHullType.MONOHULL, true, "Musto Performance Skiff", "MPS", "Musto"), NACRA_17 ("Nacra 17", true, 5.25, 2.59, BoatHullType.CATAMARAN, true, "N17", "Nacra-17"), + O_JOLLE ("O-Jolle", true, 5.00, 1.66, BoatHullType.MONOHULL, false, "O Jolle", "OJolle", "Olympiajolle"), OK ("OK Dinghy", true, 5.25, 2.59, BoatHullType.MONOHULL, false, "OK-Dinghy", "OK-Jolle", "OK"), OPTIMIST ("Optimist", true, 2.34, 1.07, BoatHullType.MONOHULL, false, "Opti", "Optimist Dinghy"), PIRATE ("Pirate", true, 5.00, 1.61, BoatHullType.MONOHULL, false, "Pirat", "Piraten"), PLATU_25 ("Platu 25", true, 7.53, 2.62, BoatHullType.MONOHULL, true, "Platu", "Platu-25", "PLA", "B25"), RS_X ("RS:X", true, 2.86, 0.93, BoatHullType.SURFERBOARD, false, "RS-X", "RSX", "RS:X"), + RS_FEVA ("RS Feva", true, 3.64, 1.42, BoatHullType.MONOHULL, true, "RSFeva"), SONAR ("Sonar", true, 7.01, 2.39, BoatHullType.MONOHULL, true), STAR ("Star", true, 6.92, 1.74, BoatHullType.MONOHULL, false, "STR"), STREAMLINE ("Streamline", true, 7.15, 2.55, BoatHullType.MONOHULL, true), SWAN_45 ("Swan 45", true, 13.83, 3.91, BoatHullType.MONOHULL, true, "Swan", "Swan-45"), TORNADO ("Tornado Catamaran", true, 6.10, 3.02, BoatHullType.CATAMARAN, true, "Tornado", "Tornado Cat"), + TRIAS ("Trias", true, 9.20, 2.12, BoatHullType.MONOHULL, true), X_99 ("X-99", true, 9.96, 2.95, BoatHullType.MONOHULL, true, "X99"), CONTENDER ("Contender", true, 4.88, 1.42, BoatHullType.MONOHULL, false), RC44 ("RC44", true, 13.35, 2.75, BoatHullType.MONOHULL, true), FLYING_DUTCHMAN ("Flying Dutchman", true, 6.10, 1.80, BoatHullType.MONOHULL, true), DYAS("Dyas", true, 7.15, 1.95, BoatHullType.MONOHULL, true), - INTERNATIONAL_14("International 14", true, 4.27, 1.83, BoatHullType.MONOHULL, true, "I14"), + INTERNATIONAL_14("International 14", true, 4.27, 1.83, BoatHullType.MONOHULL, true, "I14", "Int.14", "Int14"), OPEN_BIC("O'pen BIC", true, 2.75, 1.14, BoatHullType.MONOHULL, false, "OpenBIC"), // multi-class "boat classes"; to be replaced at some later point in time by something like a RegattaClass diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java index 390785e6859..f77fb9b316f 100644 --- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java +++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java @@ -1047,6 +1047,14 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { logger.severe("Error parsing official website URL "+officialWebSiteURLAsString+" for event "+name+". Ignoring this URL."); } } + String sailorsInfoWebSiteURLAsString = (String) eventDBObject.get(FieldNames.EVENT_SAILORS_INFO_WEBSITE_URL.name()); + if (sailorsInfoWebSiteURLAsString != null) { + try { + result.setSailorsInfoWebsiteURL(new URL(sailorsInfoWebSiteURLAsString)); + } catch (MalformedURLException e) { + logger.severe("Error parsing sailors info website URL "+sailorsInfoWebSiteURLAsString+" for event "+name+". Ignoring this URL."); + } + } BasicDBList images = (BasicDBList) eventDBObject.get(FieldNames.EVENT_IMAGES.name()); if (images != null) { for (Object imageObject : images) { diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/FieldNames.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/FieldNames.java index 32c758d91f8..fc4fd028e43 100755 --- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/FieldNames.java +++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/FieldNames.java @@ -22,6 +22,7 @@ public enum FieldNames { EVENT_IMAGES, EVENT_VIDEOS, EVENT_OFFICIAL_WEBSITE_URL, + EVENT_SAILORS_INFO_WEBSITE_URL, EVENT_LOGO_IMAGE_URL, REGATTA_NAME, diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/MongoObjectFactoryImpl.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/MongoObjectFactoryImpl.java index 11aceda0302..2b7e479bcba 100644 --- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/MongoObjectFactoryImpl.java +++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/MongoObjectFactoryImpl.java @@ -536,6 +536,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory { eventDBObject.put(FieldNames.EVENT_ID.name(), event.getId()); eventDBObject.put(FieldNames.EVENT_LOGO_IMAGE_URL.name(), event.getLogoImageURL() != null ? event.getLogoImageURL().toString() : null); eventDBObject.put(FieldNames.EVENT_OFFICIAL_WEBSITE_URL.name(), event.getOfficialWebsiteURL() != null ? event.getOfficialWebsiteURL().toString() : null); + eventDBObject.put(FieldNames.EVENT_SAILORS_INFO_WEBSITE_URL.name(), event.getSailorsInfoWebsiteURL() != null ? event.getSailorsInfoWebsiteURL().toString() : null); storeTimePoint(event.getStartDate(), eventDBObject, FieldNames.EVENT_START_DATE); storeTimePoint(event.getEndDate(), eventDBObject, FieldNames.EVENT_END_DATE); eventDBObject.put(FieldNames.EVENT_IS_PUBLIC.name(), event.isPublic()); diff --git a/java/com.sap.sailing.domain.shared.android.test/src/com/sap/sailing/domain/racelog/state/test/RaceStateTest.java b/java/com.sap.sailing.domain.shared.android.test/src/com/sap/sailing/domain/racelog/state/test/RaceStateTest.java index ab2ae82adff..99937e4f81a 100644 --- a/java/com.sap.sailing.domain.shared.android.test/src/com/sap/sailing/domain/racelog/state/test/RaceStateTest.java +++ b/java/com.sap.sailing.domain.shared.android.test/src/com/sap/sailing/domain/racelog/state/test/RaceStateTest.java @@ -4,12 +4,15 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; +import java.util.UUID; + import org.junit.Before; import org.junit.Test; @@ -18,6 +21,7 @@ import com.sap.sailing.domain.abstractlog.impl.LogEventAuthorImpl; import com.sap.sailing.domain.abstractlog.race.RaceLog; import com.sap.sailing.domain.abstractlog.race.RaceLogEventFactory; import com.sap.sailing.domain.abstractlog.race.analyzing.impl.RaceLogResolver; +import com.sap.sailing.domain.abstractlog.race.impl.RaceLogFlagEventImpl; import com.sap.sailing.domain.abstractlog.race.impl.RaceLogImpl; import com.sap.sailing.domain.abstractlog.race.impl.RaceLogStartProcedureChangedEventImpl; import com.sap.sailing.domain.abstractlog.race.state.RaceState; @@ -125,7 +129,18 @@ public class RaceStateTest { verify(listener).onStatusChanged(state); verifyNoMoreInteractions(listener); } - + + /** + * See bug 3086: make sure that race log change events cause an update of the RacingProcedure + */ + @Test + public void testSetIndividualRecall() { + assertFalse(state.getRacingProcedure().isIndividualRecallDisplayed()); + raceLog.add(new RaceLogFlagEventImpl(MillisecondsTimePoint.now(), author, MillisecondsTimePoint.now(), UUID + .randomUUID(), null, /* pass */0, Flags.XRAY, Flags.NONE, /* pIsDisplayed */true)); + assertTrue(state.getRacingProcedure().isIndividualRecallDisplayed()); + } + @Test public void testAdvancePass() { state.addChangedListener(listener); diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/RaceLogChangedVisitor.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/RaceLogChangedVisitor.java index 42d6b95525e..20be43cded1 100644 --- a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/RaceLogChangedVisitor.java +++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/RaceLogChangedVisitor.java @@ -3,6 +3,12 @@ package com.sap.sailing.domain.abstractlog.race.impl; import com.sap.sailing.domain.abstractlog.race.RaceLogChangedListener; import com.sap.sailing.domain.abstractlog.race.RaceLogEvent; +/** + * Forwards events received by this visitor to the listener passed to the constructor. + * + * @author Axel Uhl (D043530) + * + */ public class RaceLogChangedVisitor extends AbstractRaceLogChangedVisitor { private final RaceLogChangedListener listener; diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/WeakRaceLogChangedVisitor.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/WeakRaceLogChangedVisitor.java index 6f58d58ad42..a056688314a 100755 --- a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/WeakRaceLogChangedVisitor.java +++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/impl/WeakRaceLogChangedVisitor.java @@ -14,7 +14,10 @@ import com.sap.sailing.domain.abstractlog.race.RaceLogEvent; /** * A listener that unregisters itself from the race log's listeners if its notification target is no longer strongly - * referenced. + * referenced. Note that the visitor is not automatically registered by the constructor although the + * {@link RaceLog} object is passed in. + * {@link RaceLog#addListener(com.sap.sailing.domain.abstractlog.race.RaceLogEventVisitor) registration} of this visitor + * as a listener on the {@link RaceLog} has to happen explicitly by the client. * * @author Axel Uhl (d043530) * @@ -45,6 +48,12 @@ public class WeakRaceLogChangedVisitor extends AbstractRaceLogChangedVisitor { private final WeakReference listenerRef; private final RaceLog removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced; + /** + * Remembers from which {@link RaceLog} to {@link RaceLog#removeListener(Object) remove} this visitor as a listener + * when the listener is no longer strongly referenced. This constructor does not register this + * visitor as a listener on the {@link RaceLog}. This has to happen explicitly by the caller after this constructor + * has returned. + */ public WeakRaceLogChangedVisitor(RaceLog removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced, RaceLogChangedListener listener) { this.removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced = removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced; listenerRef = new WeakReference(listener, queue); diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/state/racingprocedure/impl/BaseRacingProcedure.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/state/racingprocedure/impl/BaseRacingProcedure.java index 8555ec40595..bfef08ff52a 100644 --- a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/state/racingprocedure/impl/BaseRacingProcedure.java +++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/race/state/racingprocedure/impl/BaseRacingProcedure.java @@ -91,6 +91,7 @@ public abstract class BaseRacingProcedure extends BaseRaceStateChangedListener i this.finishedTimeFinder = new FinishedTimeFinder(raceLog); this.startTimeFinder = new StartTimeFinder(raceLogResolver, raceLog); this.raceLogListener = new WeakRaceLogChangedVisitor(this.raceLog, this); + this.raceLog.addListener(this.raceLogListener); this.cachedIsIndividualRecallDisplayed = false; } @@ -223,7 +224,6 @@ public abstract class BaseRacingProcedure extends BaseRaceStateChangedListener i protected void update() { boolean isRecallDisplayed = isRecallDisplayedAnalyzer.analyze(); - if (cachedIsIndividualRecallDisplayed != isRecallDisplayed) { cachedIsIndividualRecallDisplayed = isRecallDisplayed; if (cachedIsIndividualRecallDisplayed) { @@ -233,8 +233,7 @@ public abstract class BaseRacingProcedure extends BaseRaceStateChangedListener i changedListeners.onIndividualRecallRemoved(this); unscheduleStateEvent(RaceStateEvents.INDIVIDUAL_RECALL_TIMEOUT); } - } - + } // always call listeners for changed flag, as this does not only affect recall, but also // changes start procedure, for which some text elements need to be updated // ({@link BaseRaceInfoFragmen#renderFlagChangesCountdown} diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/EventBase.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/EventBase.java index 36830a08816..f642b939199 100644 --- a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/EventBase.java +++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/EventBase.java @@ -81,6 +81,14 @@ public interface EventBase extends Named, WithDescription, Renamable, WithID, Wi void setOfficialWebsiteURL(URL officialWebsiteURL); + /** + * @return the URL of an external web site containing sailor related information like protests, official results, etc. + * or null if such a site does not exist or its URL is not known. + */ + URL getSailorsInfoWebsiteURL(); + + void setSailorsInfoWebsiteURL(URL sailorsInfoWebsiteURL); + Iterable getLeaderboardGroups(); /** diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/impl/EventBaseImpl.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/impl/EventBaseImpl.java index 2ab810449d4..566fce6e2c9 100644 --- a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/impl/EventBaseImpl.java +++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/base/impl/EventBaseImpl.java @@ -36,6 +36,7 @@ public abstract class EventBaseImpl implements EventBase { private TimePoint startDate; private TimePoint endDate; private URL officialWebsiteURL; + private URL sailorsInfoWebsiteURL; private ConcurrentLinkedQueue images; private ConcurrentLinkedQueue videos; @@ -182,6 +183,16 @@ public abstract class EventBaseImpl implements EventBase { this.officialWebsiteURL = officialWebsiteURL; } + @Override + public URL getSailorsInfoWebsiteURL() { + return sailorsInfoWebsiteURL; + } + + @Override + public void setSailorsInfoWebsiteURL(URL sailorsInfoWebsiteURL) { + this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL; + } + @Override public Iterable getImages() { return Collections.unmodifiableCollection(images); diff --git a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/DirectGapCalculationVersusOneDesignRankingMetricTest.java b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/DirectGapCalculationVersusOneDesignRankingMetricTest.java index c3e6b4adfab..1dce9263770 100755 --- a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/DirectGapCalculationVersusOneDesignRankingMetricTest.java +++ b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/DirectGapCalculationVersusOneDesignRankingMetricTest.java @@ -60,7 +60,7 @@ public class DirectGapCalculationVersusOneDesignRankingMetricTest extends Abstra ReceiverType.MARKPOSITIONS, ReceiverType.RACECOURSE, ReceiverType.RAWPOSITIONS }); getTrackedRace().recordWind( new WindImpl(/* position */null, new MillisecondsTimePoint(dateFormat.parse("06/21/2014-13:03:35")), - new KnotSpeedWithBearingImpl(18, new DegreeBearingImpl(296))), + new KnotSpeedWithBearingImpl(18, new DegreeBearingImpl(90))), new WindSourceImpl(WindSourceType.WEB)); } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRegattaImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRegattaImpl.java index 52464121ae4..3b92f7ced2d 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRegattaImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRegattaImpl.java @@ -105,13 +105,13 @@ public class TrackedRegattaImpl implements TrackedRegatta { @Override public void addTrackedRace(TrackedRace trackedRace) { final TrackedRace oldTrackedRace; - LockUtil.lockForWrite(trackedRacesLock); + lockTrackedRacesForWrite(); try { logger.info("adding tracked race for "+trackedRace.getRace()+" to tracked regatta "+getRegatta().getName()+ " with regatta hash code "+getRegatta().hashCode()); oldTrackedRace = trackedRaces.put(trackedRace.getRace(), trackedRace); } finally { - LockUtil.unlockAfterWrite(trackedRacesLock); + unlockTrackedRacesAfterWrite(); } if (oldTrackedRace != trackedRace) { for (RaceListener listener : raceListeners.keySet()) { @@ -159,43 +159,38 @@ public class TrackedRegattaImpl implements TrackedRegatta { @Override public TrackedRace getTrackedRace(RaceDefinition race) { boolean interrupted = false; - lockTrackedRacesForRead(); - try { - TrackedRace result = trackedRaces.get(race); - if (!interrupted && result == null) { - final Object mutex = new Object(); - final RaceListener listener = new RaceListener() { - @Override - public void raceRemoved(TrackedRace trackedRace) {} - - @Override - public void raceAdded(TrackedRace trackedRace) { - synchronized (mutex) { - mutex.notifyAll(); - } - } - }; - addRaceListener(listener); - try { + TrackedRace result = getExistingTrackedRace(race); + if (!interrupted && result == null) { + final Object mutex = new Object(); + final RaceListener listener = new RaceListener() { + @Override + public void raceRemoved(TrackedRace trackedRace) {} + + @Override + public void raceAdded(TrackedRace trackedRace) { synchronized (mutex) { - result = trackedRaces.get(race); - while (!interrupted && result == null) { - try { - mutex.wait(); - result = trackedRaces.get(race); - } catch (InterruptedException e) { - interrupted = true; - } + mutex.notifyAll(); + } + } + }; + addRaceListener(listener); + try { + synchronized (mutex) { + result = getExistingTrackedRace(race); + while (!interrupted && result == null) { + try { + mutex.wait(); + result = getExistingTrackedRace(race); + } catch (InterruptedException e) { + interrupted = true; } } - } finally { - removeRaceListener(listener); } + } finally { + removeRaceListener(listener); } - return result; - } finally { - unlockTrackedRacesAfterRead(); } + return result; } @Override diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java index 0933c567da3..9978d1a6bb3 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java @@ -25,6 +25,7 @@ public class BoatClassImageResolver { boatClassIconsMap.put(BoatClassMasterdata.ORC_INTERNATIONAL.getDisplayName(), imageResources.ORCIcon()); boatClassIconsMap.put(BoatClassMasterdata._12M.getDisplayName(), imageResources._12mRIcon()); + boatClassIconsMap.put(BoatClassMasterdata._18Footer.getDisplayName(), imageResources._18FooterIcon()); boatClassIconsMap.put(BoatClassMasterdata._2_4M.getDisplayName(), imageResources._2_4mIcon()); boatClassIconsMap.put(BoatClassMasterdata._29ER.getDisplayName(), imageResources._29erIcon()); boatClassIconsMap.put(BoatClassMasterdata._420.getDisplayName(), imageResources._420Icon()); @@ -35,10 +36,13 @@ public class BoatClassImageResolver { boatClassIconsMap.put(BoatClassMasterdata.A_CAT.getDisplayName(), imageResources.A_CatIcon()); boatClassIconsMap.put(BoatClassMasterdata.ALBIN_EXPRESS.getDisplayName(), imageResources.AlbinExpressIcon()); boatClassIconsMap.put(BoatClassMasterdata.B_ONE.getDisplayName(), imageResources.BOne()); + boatClassIconsMap.put(BoatClassMasterdata.CANOE_IC.getDisplayName(), imageResources.CanoeICIcon()); + boatClassIconsMap.put(BoatClassMasterdata.CANOE_TAIFUN.getDisplayName(), imageResources.CanoeTaifunIcon()); boatClassIconsMap.put(BoatClassMasterdata.CONTENDER.getDisplayName(), imageResources.ContenderIcon()); boatClassIconsMap.put(BoatClassMasterdata.DRAGON_INT.getDisplayName(), imageResources.DragonIcon()); boatClassIconsMap.put(BoatClassMasterdata.EUROPE_INT.getDisplayName(), imageResources.EuropeIcon()); boatClassIconsMap.put(BoatClassMasterdata.EXTREME_40.getDisplayName(), imageResources.Extreme40Icon()); + boatClassIconsMap.put(BoatClassMasterdata.D_ONE.getDisplayName(), imageResources.DOneIcon()); boatClassIconsMap.put(BoatClassMasterdata.D_35.getDisplayName(), imageResources.D35Icon()); boatClassIconsMap.put(BoatClassMasterdata.F_16.getDisplayName(), imageResources.F16Icon()); boatClassIconsMap.put(BoatClassMasterdata.F_18.getDisplayName(), imageResources.F18Icon()); @@ -46,13 +50,17 @@ public class BoatClassImageResolver { boatClassIconsMap.put(BoatClassMasterdata.FINN.getDisplayName(), imageResources.FinnIcon()); boatClassIconsMap.put(BoatClassMasterdata.FLYING_DUTCHMAN.getDisplayName(), imageResources.FlyingDutchmanIcon()); boatClassIconsMap.put(BoatClassMasterdata.FOLKBOAT.getDisplayName(), imageResources.FolkBoatIcon()); + boatClassIconsMap.put(BoatClassMasterdata.FUN.getDisplayName(), imageResources.FUNIcon()); boatClassIconsMap.put(BoatClassMasterdata.H_BOAT.getDisplayName(), imageResources.H_BoatIcon()); boatClassIconsMap.put(BoatClassMasterdata.HOBIE_16.getDisplayName(), imageResources.HobieIcon()); boatClassIconsMap.put(BoatClassMasterdata.HOBIE_TIGER.getDisplayName(), imageResources.HobieIcon()); boatClassIconsMap.put(BoatClassMasterdata.HOBIE_WILD_CAT.getDisplayName(), imageResources.HobieIcon()); + boatClassIconsMap.put(BoatClassMasterdata.J22.getDisplayName(), imageResources.J22Icon()); boatClassIconsMap.put(BoatClassMasterdata.J24.getDisplayName(), imageResources.J24Icon()); boatClassIconsMap.put(BoatClassMasterdata.J70.getDisplayName(), imageResources.J70Icon()); boatClassIconsMap.put(BoatClassMasterdata.J80.getDisplayName(), imageResources.J80Icon()); + boatClassIconsMap.put(BoatClassMasterdata.KIELZUGVOGEL.getDisplayName(), imageResources.KielzugvogelIcon()); + boatClassIconsMap.put(BoatClassMasterdata.LASER_2.getDisplayName(), imageResources.Laser2Icon()); boatClassIconsMap.put(BoatClassMasterdata.LASER_SB3.getDisplayName(), imageResources.LaserSB3Icon()); boatClassIconsMap.put(BoatClassMasterdata.LASER_INT.getDisplayName(), imageResources.LaserIcon()); boatClassIconsMap.put(BoatClassMasterdata.LASER_4_7.getDisplayName(), imageResources.LaserIcon()); @@ -61,6 +69,7 @@ public class BoatClassImageResolver { boatClassIconsMap.put(BoatClassMasterdata.MINI_TRANSAT.getDisplayName(), imageResources.MiniTransatIcon()); boatClassIconsMap.put(BoatClassMasterdata.MUSTO_SKIFF.getDisplayName(), imageResources.MustoSkiffIcon()); boatClassIconsMap.put(BoatClassMasterdata.NACRA_17.getDisplayName(), imageResources.Nacra17Icon()); + boatClassIconsMap.put(BoatClassMasterdata.O_JOLLE.getDisplayName(), imageResources.OJolleIcon()); boatClassIconsMap.put(BoatClassMasterdata.OK.getDisplayName(), imageResources.OKIcon()); boatClassIconsMap.put(BoatClassMasterdata.OPTIMIST.getDisplayName(), imageResources.OptimistIcon()); boatClassIconsMap.put(BoatClassMasterdata.PIRATE.getDisplayName(), imageResources.PiratIcon()); @@ -71,6 +80,7 @@ public class BoatClassImageResolver { boatClassIconsMap.put(BoatClassMasterdata.STREAMLINE.getDisplayName(), imageResources.StreamlineIcon()); boatClassIconsMap.put(BoatClassMasterdata.SWAN_45.getDisplayName(), imageResources.Swan45Icon()); boatClassIconsMap.put(BoatClassMasterdata.TORNADO.getDisplayName(), imageResources.TornadoIcon()); + boatClassIconsMap.put(BoatClassMasterdata.TRIAS.getDisplayName(), imageResources.TriasIcon()); boatClassIconsMap.put(BoatClassMasterdata.X_99.getDisplayName(), imageResources.X99Icon()); boatClassIconsMap.put(BoatClassMasterdata.INTERNATIONAL_14.getDisplayName(), imageResources.International14Icon()); boatClassIconsMap.put(BoatClassMasterdata.DYAS.getDisplayName(), imageResources.DyasIcon()); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResources.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResources.java index 404e1f7ae09..957869366ab 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResources.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResources.java @@ -13,6 +13,9 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/12MR.png") ImageResource _12mRIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/18Footer.png") + ImageResource _18FooterIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/2_4M.png") ImageResource _2_4mIcon(); @@ -25,7 +28,7 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/470.png") ImageResource _470Icon(); - @Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.jpg") + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.png") ImageResource _49erFXIcon(); @Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER.png") @@ -43,6 +46,12 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/B_ONE.png") ImageResource BOne(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_IC.png") + ImageResource CanoeICIcon(); + + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_TAIFUN.png") + ImageResource CanoeTaifunIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/CONTENDER.png") ImageResource ContenderIcon(); @@ -76,12 +85,18 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/FOLKBOAT.png") ImageResource FolkBoatIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/FUN.png") + ImageResource FUNIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/H_BOAT.png") ImageResource H_BoatIcon(); @Source("com/sap/sailing/gwt/ui/client/images/boatclass/HOBIE.png") ImageResource HobieIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/J22.png") + ImageResource J22Icon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/J24.png") ImageResource J24Icon(); @@ -91,6 +106,9 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/J80.png") ImageResource J80Icon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/LASER2.png") + ImageResource Laser2Icon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/LASER_SB3.png") ImageResource LaserSB3Icon(); @@ -157,4 +175,16 @@ public interface BoatClassImageResources extends ClientBundle { @Source("com/sap/sailing/gwt/ui/client/images/boatclass/ORC.png") ImageResource ORCIcon(); + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/KIELZUGVOGEL.png") + ImageResource KielzugvogelIcon(); + + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/TRIAS.png") + ImageResource TriasIcon(); + + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/O_JOLLE.png") + ImageResource OJolleIcon(); + + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/D_ONE.png") + ImageResource DOneIcon(); + } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/client/place/event/multiregatta/TabletAndDesktopEventView.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/client/place/event/multiregatta/TabletAndDesktopEventView.java index be596b168e5..73ced3c5df9 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/client/place/event/multiregatta/TabletAndDesktopEventView.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/client/place/event/multiregatta/TabletAndDesktopEventView.java @@ -58,7 +58,7 @@ public class TabletAndDesktopEventView extends Composite implements EventMultire initBreadCrumbs(); - String sailorsInfoURL = currentPresenter.getCtx().getEventDTO().getSailorsInfoURL(); + String sailorsInfoURL = currentPresenter.getCtx().getEventDTO().getSailorsInfoWebsiteURL(); if(sailorsInfoURL != null && ! sailorsInfoURL.isEmpty()) { Label label = new Label(); label.getElement().setInnerHTML(i18n.sailorInfoLongText().replace("\n", "
")); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventCreateDialog.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventCreateDialog.java index 3945c293834..81558f67666 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventCreateDialog.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventCreateDialog.java @@ -31,6 +31,8 @@ public class EventCreateDialog extends EventDialog { endDateBox.setFormat("dd/mm/yyyy hh:ii"); officialWebsiteURLEntryField = createTextBox(null); officialWebsiteURLEntryField.setVisibleLength(50); + sailorsInfoWebsiteURLEntryField = createTextBox(null); + sailorsInfoWebsiteURLEntryField.setVisibleLength(50); isPublicCheckBox = createCheckbox(""); isPublicCheckBox.setValue(false); imagesListComposite.fillImages(Collections.emptyList()); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDetailsComposite.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDetailsComposite.java index d6f5334575c..5b44f253063 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDetailsComposite.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDetailsComposite.java @@ -38,6 +38,7 @@ public class EventDetailsComposite extends Composite { private final Label endDate; private final Label isPublic; private final Anchor officialWebsiteURL; + private final Anchor sailorsInfoWebsiteURL; private final Anchor eventOverviewURL; private final SimpleStringListComposite courseAreaNamesList; private final SimpleStringListComposite imageURLList; @@ -55,7 +56,7 @@ public class EventDetailsComposite extends Composite { VerticalPanel vPanel = new VerticalPanel(); mainPanel.add(vPanel); - int rows = 15; + int rows = 16; Grid grid = new Grid(rows, 2); vPanel.add(grid); @@ -68,6 +69,7 @@ public class EventDetailsComposite extends Composite { endDate = createLabelAndValueWidget(grid, currentRow++, stringMessages.endDate(), "EndDateLabel"); isPublic = createLabelAndValueWidget(grid, currentRow++, stringMessages.isPublic(), "IsPublicLabel"); officialWebsiteURL = createAnchorAndValueWidget(grid, currentRow++, stringMessages.eventOfficialWebsiteURL(), "OfficialWebsiteURLLabel"); + sailorsInfoWebsiteURL = createAnchorAndValueWidget(grid, currentRow++, stringMessages.eventSailorsInfoWebsiteURL(), "SailorsInfoWebsiteURLLabel"); eventOverviewURL = createAnchorAndValueWidget(grid, currentRow++, stringMessages.eventOverviewURL(), "EventOverviewURLLabel"); courseAreaNamesList = createLableAndValueListWidget(grid, currentRow++, stringMessages.courseAreas(), "CourseAreaValueList"); imageURLList = createLableAndValueListWidget(grid, currentRow++, stringMessages.images(), "ImageURLValueList"); @@ -128,6 +130,8 @@ public class EventDetailsComposite extends Composite { isPublic.setText(String.valueOf(event.isPublic)); officialWebsiteURL.setText(event.getOfficialWebsiteURL()); officialWebsiteURL.setHref(event.getOfficialWebsiteURL()); + sailorsInfoWebsiteURL.setText(event.getSailorsInfoWebsiteURL()); + sailorsInfoWebsiteURL.setHref(event.getSailorsInfoWebsiteURL()); Map regattaOverviewURLParameters = new HashMap(); regattaOverviewURLParameters.put("event", event.id.toString()); String regattaOverviewLink = EntryPointLinkFactory.createRegattaOverviewLink(regattaOverviewURLParameters); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDialog.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDialog.java index 428762287a4..a65a62484f5 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDialog.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventDialog.java @@ -42,6 +42,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap protected CheckBox isPublicCheckBox; protected UUID id; protected TextBox officialWebsiteURLEntryField; + protected TextBox sailorsInfoWebsiteURLEntryField; protected StringListInlineEditorComposite courseAreaNameList; protected StringConstantsListEditorComposite leaderboardGroupList; protected List availableLeaderboardGroups; @@ -157,6 +158,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap result.setName(nameEntryField.getText()); result.setDescription(descriptionEntryField.getText()); result.setOfficialWebsiteURL(officialWebsiteURLEntryField.getText().trim().isEmpty() ? null : officialWebsiteURLEntryField.getText().trim()); + result.setSailorsInfoWebsiteURL(sailorsInfoWebsiteURLEntryField.getText().trim().isEmpty() ? null : sailorsInfoWebsiteURLEntryField.getText().trim()); result.startDate = startDateBox.getValue(); result.endDate = endDateBox.getValue(); result.isPublic = isPublicCheckBox.getValue(); @@ -187,7 +189,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap panel.add(additionalWidget); } - Grid formGrid = new Grid(7, 2); + Grid formGrid = new Grid(8, 2); panel.add(formGrid); formGrid.setWidget(0, 0, new Label(stringMessages.name() + ":")); @@ -204,6 +206,8 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap formGrid.setWidget(5, 1, isPublicCheckBox); formGrid.setWidget(6, 0, new Label(stringMessages.eventOfficialWebsiteURL() + ":")); formGrid.setWidget(6, 1, officialWebsiteURLEntryField); + formGrid.setWidget(7, 0, new Label(stringMessages.eventSailorsInfoWebsiteURL() + ":")); + formGrid.setWidget(7, 1, sailorsInfoWebsiteURLEntryField); TabLayoutPanel tabPanel = new TabLayoutPanel(30, Unit.PX); tabPanel.setHeight("250px"); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventEditDialog.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventEditDialog.java index ec9b7a269ed..a440f8c9f40 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventEditDialog.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventEditDialog.java @@ -36,6 +36,8 @@ public class EventEditDialog extends EventDialog { } officialWebsiteURLEntryField = createTextBox(event.getOfficialWebsiteURL()); officialWebsiteURLEntryField.setVisibleLength(50); + sailorsInfoWebsiteURLEntryField = createTextBox(event.getSailorsInfoWebsiteURL()); + sailorsInfoWebsiteURLEntryField.setVisibleLength(50); courseAreaNameList.setValue(courseAreaNames); List leaderboardGroupNames = new ArrayList<>(); for(LeaderboardGroupDTO leaderboardGroupDTO: event.getLeaderboardGroups()) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java index 082ea76cc48..6c0a556290e 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/EventListComposite.java @@ -491,7 +491,8 @@ public class EventListComposite extends Composite implements EventsRefresher, Le sailingService.updateEvent(oldEvent.id, oldEvent.getName(), updatedEvent.getDescription(), updatedEvent.startDate, updatedEvent.endDate, updatedEvent.venue, updatedEvent.isPublic, updatedEventLeaderboardGroupIds, - updatedEvent.getOfficialWebsiteURL(), updatedEvent.getImages(), updatedEvent.getVideos(), + updatedEvent.getOfficialWebsiteURL(), updatedEvent.getSailorsInfoWebsiteURL(), + updatedEvent.getImages(), updatedEvent.getVideos(), new AsyncCallback() { @Override public void onFailure(Throwable t) { @@ -562,7 +563,7 @@ public class EventListComposite extends Composite implements EventsRefresher, Le courseAreaNames.add(courseAreaDTO.getName()); } sailingService.createEvent(newEvent.getName(), newEvent.getDescription(), newEvent.startDate, newEvent.endDate, - newEvent.venue.getName(), newEvent.isPublic, courseAreaNames, newEvent.getOfficialWebsiteURL(), + newEvent.venue.getName(), newEvent.isPublic, courseAreaNames, newEvent.getOfficialWebsiteURL(), newEvent.getSailorsInfoWebsiteURL(), newEvent.getImages(), newEvent.getVideos(), new AsyncCallback() { @Override public void onFailure(Throwable t) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/RegattaImportDialog.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/RegattaImportDialog.java deleted file mode 100644 index 8a5c64fdc6a..00000000000 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/RegattaImportDialog.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.sap.sailing.gwt.ui.adminconsole; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import com.google.gwt.user.client.ui.CheckBox; -import com.google.gwt.user.client.ui.Grid; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.TextArea; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; -import com.sap.sailing.gwt.ui.client.StringMessages; -import com.sap.sailing.gwt.ui.shared.BetterDateTimeBox; -import com.sap.sailing.gwt.ui.shared.CourseAreaDTO; -import com.sap.sailing.gwt.ui.shared.EventDTO; -import com.sap.sailing.gwt.ui.shared.VenueDTO; -import com.sap.sse.gwt.client.controls.listedit.StringListInlineEditorComposite; -import com.sap.sse.gwt.client.dialog.DataEntryDialog; - - -public class RegattaImportDialog extends DataEntryDialog{ - protected StringMessages stringMessages; - protected TextBox nameEntryField; - protected TextArea descriptionEntryField; - protected TextBox venueEntryField; - protected BetterDateTimeBox startDateBox; - protected BetterDateTimeBox endDateBox; - protected CheckBox isPublicCheckBox; - protected UUID id; - protected TextBox officialWebsiteURLEntryField; - protected StringListInlineEditorComposite courseAreaNameList; - protected StringListInlineEditorComposite imageURLList; - protected StringListInlineEditorComposite videoURLList; - protected StringListInlineEditorComposite sponsorImageURLList; - - public RegattaImportDialog(StringMessages stringMessages, String message, - com.sap.sse.gwt.client.dialog.DataEntryDialog.Validator validator, - com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback callback) { - super("Regattas"/*title*/, null/*message*/, stringMessages.ok(), stringMessages.cancel(), validator, false/*animationEnables; raus?*/, callback); - this.stringMessages = stringMessages; - } - - @Override - protected Widget getAdditionalWidget() { - final VerticalPanel panel = new VerticalPanel(); - Widget additionalWidget = super.getAdditionalWidget(); - if (additionalWidget != null) { - panel.add(additionalWidget); - } - - Grid formGrid = new Grid(7, 2); - panel.add(formGrid); - - formGrid.setWidget(0, 0, new Label(stringMessages.name() + ":")); - formGrid.setWidget(0, 1, nameEntryField); - formGrid.setWidget(1, 0, new Label(stringMessages.description() + ":")); - formGrid.setWidget(1, 1, descriptionEntryField); - formGrid.setWidget(2, 0, new Label(stringMessages.venue() + ":")); - formGrid.setWidget(2, 1, venueEntryField); - formGrid.setWidget(3, 0, new Label(stringMessages.startDate() + ":")); - formGrid.setWidget(3, 1, startDateBox); - formGrid.setWidget(4, 0, new Label(stringMessages.endDate() + ":")); - formGrid.setWidget(4, 1, endDateBox); - formGrid.setWidget(5, 0, new Label(stringMessages.isPublic() + ":")); - formGrid.setWidget(5, 1, isPublicCheckBox); - formGrid.setWidget(6, 0, new Label(stringMessages.eventOfficialWebsiteURL() + ":")); - formGrid.setWidget(6, 1, officialWebsiteURLEntryField); - - panel.add(createHeadlineLabel(stringMessages.courseAreas())); - panel.add(courseAreaNameList); - panel.add(createHeadlineLabel(stringMessages.imageURLs())); - panel.add(imageURLList); - panel.add(createHeadlineLabel(stringMessages.videoURLs())); - panel.add(videoURLList); - panel.add(createHeadlineLabel(stringMessages.sponsorImageURLs())); - panel.add(sponsorImageURLList); - return panel; - } - - protected String getResult() { - EventDTO result = new EventDTO(); - result.setName(nameEntryField.getText()); - result.setDescription(descriptionEntryField.getText()); - result.setOfficialWebsiteURL(officialWebsiteURLEntryField.getText().trim().isEmpty() ? null : officialWebsiteURLEntryField.getText().trim()); - result.startDate = startDateBox.getValue(); - result.endDate = endDateBox.getValue(); - result.isPublic = isPublicCheckBox.getValue(); - result.id = id; - - List courseAreas = new ArrayList(); - for (String courseAreaName : courseAreaNameList.getValue()) { - CourseAreaDTO courseAreaDTO = new CourseAreaDTO(); - courseAreaDTO.setName(courseAreaName); - courseAreas.add(courseAreaDTO); - } - result.venue = new VenueDTO(venueEntryField.getText(), courseAreas); - return "OK"; - } - - @Override - public void show() { - super.show(); - nameEntryField.setFocus(true); - } -} diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/StructureImportManagementPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/StructureImportManagementPanel.java index 7bcb7107698..0dfa4c0f209 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/StructureImportManagementPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/StructureImportManagementPanel.java @@ -257,7 +257,7 @@ public class StructureImportManagementPanel extends SimplePanel implements Regat courseAreaNames.add(courseAreaDTO.getName()); } sailingService.createEvent(newEvent.getName(), newEvent.getDescription(), newEvent.startDate, newEvent.endDate, - newEvent.venue.getName(), newEvent.isPublic, courseAreaNames, newEvent.getOfficialWebsiteURL(), + newEvent.venue.getName(), newEvent.isPublic, courseAreaNames, newEvent.getOfficialWebsiteURL(), newEvent.getSailorsInfoWebsiteURL(), newEvent.getImages(), newEvent.getVideos(), new AsyncCallback() { @Override diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java index 4963289df96..f208910de19 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingService.java @@ -295,11 +295,11 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS void updateRacesDelayToLive(List regattaAndRaceIdentifiers, long delayToLiveInMs); EventDTO updateEvent(UUID eventId, String eventName, String eventDescription, Date startDate, Date endDate, - VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURL, + VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable images, Iterable videos) throws Exception; EventDTO createEvent(String eventName, String eventDescription, Date startDate, Date endDate, String venue, - boolean isPublic, List courseAreaNames, String officialWebsiteURL, Iterable images, Iterable videos) throws Exception; + boolean isPublic, List courseAreaNames, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable images, Iterable videos) throws Exception; void removeEvent(UUID eventId); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java index 3048991ff99..f9be82f07e1 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/SailingServiceAsync.java @@ -367,11 +367,11 @@ public interface SailingServiceAsync extends BuildVersionRetriever, FileStorageM void removeEvents(Collection eventIds, AsyncCallback asyncCallback); void createEvent(String eventName, String eventDescription, Date startDate, Date endDate, String venue, boolean isPublic, - List courseAreaNames, String officialWebsiteURL, Iterable images, Iterable videos, + List courseAreaNames, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable images, Iterable videos, AsyncCallback callback); void updateEvent(UUID eventId, String eventName, String eventDescription, Date startDate, Date endDate, - VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURL, + VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable images, Iterable videos, AsyncCallback callback); void createCourseArea(UUID eventId, String courseAreaName, AsyncCallback callback); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java index 2e8238d6d5d..e9d7bf902a1 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java @@ -1093,6 +1093,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c String advancePassId(); String pleaseSelectAScoringResult(); String eventOfficialWebsiteURL(); + String eventSailorsInfoWebsiteURL(); String eventOverviewURL(); String eventLogoImageURL(); String showPingMarkMappings(); diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties index 23ed9b0c971..0ae2174ff8e 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties @@ -1067,6 +1067,7 @@ invalidSelection=The current selection isn''t valid. advancePassId=Advance Pass ID pleaseSelectAScoringResult=Please select a scoring result... eventOfficialWebsiteURL=Official Website URL +eventSailorsInfoWebsiteURL=Sailors Info Website URL eventOverviewURL=Event Overview URL eventLogoImageURL=Logo Image URL showPingMarkMappings=Show Mappings for pinged Marks diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties index f10cd3240ce..476739c9c1a 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties @@ -1060,9 +1060,10 @@ sponsorImageURLs=Sponsorenlogo-URLs invalidSelection=Die aktuelle Selektion ist nicht gültig. advancePassId=Pass ID erhöhen pleaseSelectAScoringResult=Bitte ein Ergebnis auswählen... -eventOfficialWebsiteURL=URL der offiziellen Veranstaltungs-Website -eventOverviewURL=URL der Eventübersicht -eventLogoImageURL=URL des Veranstaltungs-Logos +eventOfficialWebsiteURL=URL der offiziellen Veranstaltungswebseite +eventSailorsInfoWebsiteURL=URL zur Webseite mit Seglerinfos +eventOverviewURL=URL der Veranstaltungsübersicht +eventLogoImageURL=URL des Veranstaltungslogos showPingMarkMappings=Mappings für gepingte Marks zeigen errorFetchingWindStreamletData=Fehler beim Empfang der Streamlet-Winddaten: {0} showWindStreamletOverlay=Wind als Streamlets überlagern diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties index 5a74afbb70f..f90d3e7c6e5 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties @@ -1019,6 +1019,7 @@ videoURLs=Video URLs sponsorImageURLs=Sponsor Image URLs pleaseSelectAScoringResult=Please select a scoring result... eventOfficialWebsiteURL=Official Website URL +eventSailorsInfoWebsiteURL=Sailors Info Website URL eventOverviewURL=Event Overview URL eventLogoImageURL=Logo Image URL showPingMarkMappings=Show Mappings for pinged Marks diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties index 44d63c98635..ca6b50c2fcc 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties @@ -8,6 +8,7 @@ pleaseSelectARace=Please select a race columnMoveUp=Up enterCarryValueFor=Enter carried points for competitor {0} eventOfficialWebsiteURL=Official Website URL +eventSailorsInfoWebsiteURL=Sailors Info Website URL polarSheetOutlierDetectionMinimumPercTooltip=The percentage of neighborhood datapoints / overall datapoints\nneeds to be at less than the given value for the point to be considered an outlier. errorTryingToCreateNewEvent=Error trying to create new event {0}: {1} xyDiagram=x-y-Diagram diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/racemap/BoatClassVectorGraphicsResolver.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/racemap/BoatClassVectorGraphicsResolver.java index 34e1754c35e..50c57d7bc62 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/racemap/BoatClassVectorGraphicsResolver.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/racemap/BoatClassVectorGraphicsResolver.java @@ -24,24 +24,28 @@ public class BoatClassVectorGraphicsResolver { compatibleBoatVectorGraphicsMap = new HashMap<>(); BoatClassVectorGraphics laser = new LaserVectorGraphics(BoatClassMasterdata.LASER_INT, - BoatClassMasterdata.LASER_RADIAL, BoatClassMasterdata.LASER_4_7, BoatClassMasterdata.CONTENDER, + BoatClassMasterdata.LASER_RADIAL, BoatClassMasterdata.LASER_4_7, BoatClassMasterdata.LASER_2, + BoatClassMasterdata.CONTENDER, BoatClassMasterdata.FINN, BoatClassMasterdata.MUSTO_SKIFF, BoatClassMasterdata.OPEN_BIC, BoatClassMasterdata.OPTIMIST, BoatClassMasterdata.RS_X, BoatClassMasterdata.STAR); BoatClassVectorGraphics _49er = new _49erVectorGraphics(BoatClassMasterdata._49ER, BoatClassMasterdata._49ERFX, - BoatClassMasterdata._29ER); + BoatClassMasterdata._29ER, BoatClassMasterdata._18Footer); BoatClassVectorGraphics extreme40 = new Extreme40VectorGraphics(BoatClassMasterdata.EXTREME_40, BoatClassMasterdata.D_35); BoatClassVectorGraphics smallMultihull = new SmallMultihullVectorGraphics(BoatClassMasterdata.NACRA_17, BoatClassMasterdata.F_16, BoatClassMasterdata.F_18, BoatClassMasterdata.HOBIE_WILD_CAT, - BoatClassMasterdata.HOBIE_TIGER, BoatClassMasterdata.A_CAT, BoatClassMasterdata.TORNADO); + BoatClassMasterdata.HOBIE_TIGER, BoatClassMasterdata.A_CAT, BoatClassMasterdata.TORNADO, + BoatClassMasterdata.FLYING_PHANTOM); BoatClassVectorGraphics keelBoatWithGennaker = new KeelBoatWithGennakerVectorGraphics(BoatClassMasterdata.J70, - BoatClassMasterdata.B_ONE, BoatClassMasterdata.J80, BoatClassMasterdata.LASER_SB3); + BoatClassMasterdata.B_ONE, BoatClassMasterdata.J80, BoatClassMasterdata.LASER_SB3, + BoatClassMasterdata.RS_FEVA); BoatClassVectorGraphics dinghyWithSpinnaker = new DinghyWithSpinnakerVectorGraphics(BoatClassMasterdata._420, BoatClassMasterdata._470, BoatClassMasterdata._5O5, BoatClassMasterdata.FLYING_DUTCHMAN, BoatClassMasterdata.FOLKBOAT, BoatClassMasterdata.DYAS, BoatClassMasterdata.DRAGON_INT, BoatClassMasterdata.ELLIOTT_6M, BoatClassMasterdata.H_BOAT, BoatClassMasterdata.ALBIN_EXPRESS, BoatClassMasterdata.FARR_30, BoatClassMasterdata.J24, BoatClassMasterdata.PLATU_25, - BoatClassMasterdata.STREAMLINE, BoatClassMasterdata.SWAN_45, BoatClassMasterdata.X_99); + BoatClassMasterdata.STREAMLINE, BoatClassMasterdata.SWAN_45, BoatClassMasterdata.X_99, + BoatClassMasterdata.TRIAS); defaultBoatVectorGraphics = dinghyWithSpinnaker; // TODO see bug 2571; this should be a slup-rigged icon working for 470, 505, J/70 etc. for (BoatClassVectorGraphics g : new BoatClassVectorGraphics[] { laser, _49er, extreme40, smallMultihull, keelBoatWithGennaker, dinghyWithSpinnaker}) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java index 436ea1c4cdb..f8bc459c6bf 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java @@ -3300,22 +3300,24 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S @Override public EventDTO updateEvent(UUID eventId, String eventName, String eventDescription, Date startDate, Date endDate, - VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURLString, + VenueDTO venue, boolean isPublic, Iterable leaderboardGroupIds, String officialWebsiteURLString, String sailorsInfoWebsiteURLString, Iterable images, Iterable videos) throws MalformedURLException { TimePoint startTimePoint = startDate != null ? new MillisecondsTimePoint(startDate) : null; TimePoint endTimePoint = endDate != null ? new MillisecondsTimePoint(endDate) : null; URL officialWebsiteURL = officialWebsiteURLString != null ? new URL(officialWebsiteURLString) : null; + URL sailorsInfoWebsiteURL = sailorsInfoWebsiteURLString != null ? new URL(sailorsInfoWebsiteURLString) : null; List eventImages = convertToImages(images); List eventVideos = convertToVideos(videos); getService().apply( new UpdateEvent(eventId, eventName, eventDescription, startTimePoint, endTimePoint, venue.getName(), - isPublic, leaderboardGroupIds, officialWebsiteURL, eventImages, eventVideos)); + isPublic, leaderboardGroupIds, officialWebsiteURL, sailorsInfoWebsiteURL, eventImages, eventVideos)); return getEventById(eventId, false); } @Override public EventDTO createEvent(String eventName, String eventDescription, Date startDate, Date endDate, String venue, - boolean isPublic, List courseAreaNames, String officialWebsiteURLAsString, Iterable images, Iterable videos) + boolean isPublic, List courseAreaNames, String officialWebsiteURLAsString, String sailorsInfoWebsiteURLAsString, + Iterable images, Iterable videos) throws MalformedURLException { UUID eventUuid = UUID.randomUUID(); TimePoint startTimePoint = startDate != null ? new MillisecondsTimePoint(startDate) : null; @@ -3324,7 +3326,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S List eventVideos = convertToVideos(videos); getService().apply( new CreateEvent(eventName, eventDescription, startTimePoint, endTimePoint, venue, isPublic, eventUuid, - officialWebsiteURLAsString == null ? null : new URL(officialWebsiteURLAsString), eventImages, eventVideos)); + officialWebsiteURLAsString == null ? null : new URL(officialWebsiteURLAsString), new URL(sailorsInfoWebsiteURLAsString), eventImages, eventVideos)); for (String courseAreaName : courseAreaNames) { createCourseArea(eventUuid, courseAreaName); } @@ -3403,6 +3405,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S eventDTO.id = (UUID) event.getId(); eventDTO.setDescription(event.getDescription()); eventDTO.setOfficialWebsiteURL(event.getOfficialWebsiteURL() != null ? event.getOfficialWebsiteURL().toString() : null); + eventDTO.setSailorsInfoWebsiteURL(event.getSailorsInfoWebsiteURL() != null ? event.getSailorsInfoWebsiteURL().toString() : null); for(ImageDescriptor image: event.getImages()) { eventDTO.addImage(convertToImageDTO(image)); } @@ -4143,7 +4146,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S eventLeaderboardGroupUUIDs.add(lg.getId()); } updateEvent(newEvent.id, newEvent.getName(), description, newEvent.startDate, newEvent.endDate, newEvent.venue, - newEvent.isPublic, eventLeaderboardGroupUUIDs, newEvent.getOfficialWebsiteURL(), + newEvent.isPublic, eventLeaderboardGroupUUIDs, newEvent.getOfficialWebsiteURL(), newEvent.getSailorsInfoWebsiteURL(), newEvent.getImages(), newEvent.getVideos()); } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventBaseDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventBaseDTO.java index 940c015ac8d..6e4982e230b 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventBaseDTO.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/EventBaseDTO.java @@ -26,6 +26,7 @@ public class EventBaseDTO extends NamedDTO implements IsSerializable { private String description; private List leaderboardGroups; private String officialWebsiteURL; + private String sailorsInfoWebsiteURL; private List images = new ArrayList<>(); private List videos = new ArrayList<>(); @@ -98,6 +99,14 @@ public class EventBaseDTO extends NamedDTO implements IsSerializable { this.officialWebsiteURL = officialWebsiteURL; } + public String getSailorsInfoWebsiteURL() { + return sailorsInfoWebsiteURL; + } + + public void setSailorsInfoWebsiteURL(String sailorsInfoWebsiteURL) { + this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL; + } + /** * If not {@link #setBaseURL(String) set}, defaults to http://sapsailing.com. Meant to describe the * base URL that maps to the server instance at which this event can be found, such as diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/dispatch/event/GetEventViewAction.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/dispatch/event/GetEventViewAction.java index 831bb9dc61a..fdad171006a 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/dispatch/event/GetEventViewAction.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/dispatch/event/GetEventViewAction.java @@ -52,6 +52,7 @@ public class GetEventViewAction implements Action { ImageDescriptor logoImage = event.findImageWithTag(MediaTagConstants.LOGO); dto.setLogoImage(logoImage != null ? HomeServiceUtil.convertToImageDTO(logoImage) : null); dto.setOfficialWebsiteURL(event.getOfficialWebsiteURL() == null ? null : event.getOfficialWebsiteURL().toString()); + dto.setSailorsInfoWebsiteURL(event.getSailorsInfoWebsiteURL() == null ? null : event.getSailorsInfoWebsiteURL().toString()); dto.setHasMedia(HomeServiceUtil.hasMedia(event)); dto.setState(HomeServiceUtil.calculateEventState(event)); @@ -118,9 +119,14 @@ public class GetEventViewAction implements Action { dto.setType(dto.getRegattas().size() == 1 ? EventType.SINGLE_REGATTA: EventType.MULTI_REGATTA); } - // Special solution for Kieler Woche 2015 - if("a9d6c5d5-cac3-47f2-9b5c-506e441819a1".equals(event.getId().toString())) { - dto.setSailorsInfoURL(Locale.GERMAN.equals(context.getClientLocale()) ? "http://sailorsinfo.kieler-woche.de/" : "http://sailorsinfo.kieler-woche.de/en"); + // Special solution for localization of SailorsInfo URL + if(dto.getSailorsInfoWebsiteURL() != null && !Locale.GERMAN.equals(context.getClientLocale())) { + String localizedURL = dto.getSailorsInfoWebsiteURL(); + if(!localizedURL.endsWith("/")) { + localizedURL += "/"; + } + localizedURL += "en"; + dto.setSailorsInfoWebsiteURL(localizedURL); } return dto; diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/eventview/EventViewDTO.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/eventview/EventViewDTO.java index 78279dc1f0c..c5dff9b70c7 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/eventview/EventViewDTO.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/shared/eventview/EventViewDTO.java @@ -23,7 +23,7 @@ public class EventViewDTO extends EventMetadataDTO implements Result { private String seriesName; private ImageDTO logoImage; private String officialWebsiteURL; - private String sailorsInfoURL; + private String sailorsInfoWebsiteURL; public EventViewDTO() { } @@ -105,11 +105,11 @@ public class EventViewDTO extends EventMetadataDTO implements Result { return officialWebsiteURL; } - public String getSailorsInfoURL() { - return sailorsInfoURL; + public String getSailorsInfoWebsiteURL() { + return sailorsInfoWebsiteURL; } - public void setSailorsInfoURL(String sailorsInfoURL) { - this.sailorsInfoURL = sailorsInfoURL; + public void setSailorsInfoWebsiteURL(String sailorsInfoWebsiteURL) { + this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL; } } diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/18FOOTER.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/18FOOTER.png new file mode 100644 index 00000000000..0d2e10766e2 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/18FOOTER.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.jpg b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.jpg deleted file mode 100644 index 01705790b96..00000000000 Binary files a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.jpg and /dev/null differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.png new file mode 100644 index 00000000000..00a97b18dc9 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_IC.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_IC.png new file mode 100644 index 00000000000..fe85092dc3b Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_IC.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_TAIFUN.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_TAIFUN.png new file mode 100644 index 00000000000..44535cc1794 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_TAIFUN.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/D_ONE.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/D_ONE.png new file mode 100644 index 00000000000..b28e0564498 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/D_ONE.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/FUN.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/FUN.png new file mode 100644 index 00000000000..418ec5649ca Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/FUN.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/J22.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/J22.png new file mode 100644 index 00000000000..2f4b36f55ef Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/J22.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/KIELZUGVOGEL.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/KIELZUGVOGEL.png new file mode 100644 index 00000000000..12423eb7b6d Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/KIELZUGVOGEL.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/LASER2.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/LASER2.png new file mode 100644 index 00000000000..1d41c06468e Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/LASER2.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/O_JOLLE.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/O_JOLLE.png new file mode 100644 index 00000000000..8ed84e51ce3 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/O_JOLLE.png differ diff --git a/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/TRIAS.png b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/TRIAS.png new file mode 100644 index 00000000000..d81c399fad0 Binary files /dev/null and b/java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass/TRIAS.png differ diff --git a/java/com.sap.sailing.mongodb.test/src/com/sap/sailing/mongodb/test/TestStoringAndLoadingEventsAndRegattas.java b/java/com.sap.sailing.mongodb.test/src/com/sap/sailing/mongodb/test/TestStoringAndLoadingEventsAndRegattas.java index 1b3b874b812..9db1f518d68 100755 --- a/java/com.sap.sailing.mongodb.test/src/com/sap/sailing/mongodb/test/TestStoringAndLoadingEventsAndRegattas.java +++ b/java/com.sap.sailing.mongodb.test/src/com/sap/sailing/mongodb/test/TestStoringAndLoadingEventsAndRegattas.java @@ -131,6 +131,8 @@ public class TestStoringAndLoadingEventsAndRegattas extends AbstractMongoDBTest final String eventDescription = "Event Description"; final String venueName = "Venue Name"; final String[] courseAreaNames = new String[] { "Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrott" }; + final URL officialWebsiteURL = new URL("http://official.website.com"); + final URL sailorsInfoWebsiteURL = new URL("http://sailorsinfo.website.com"); final Venue venue = new VenueImpl(venueName); for (String courseAreaName : courseAreaNames) { @@ -144,7 +146,8 @@ public class TestStoringAndLoadingEventsAndRegattas extends AbstractMongoDBTest event.addLeaderboardGroup(lg1); event.addLeaderboardGroup(lg2); event.setDescription(eventDescription); - event.setOfficialWebsiteURL(new URL("http://official.website.com")); + event.setOfficialWebsiteURL(officialWebsiteURL); + event.setSailorsInfoWebsiteURL(sailorsInfoWebsiteURL); mof.storeEvent(event); DomainObjectFactory dof = PersistenceFactory.INSTANCE.getDomainObjectFactory(getMongoService(), DomainFactory.INSTANCE); @@ -169,6 +172,7 @@ public class TestStoringAndLoadingEventsAndRegattas extends AbstractMongoDBTest assertEquals(eventName, loadedEvent.getName()); assertEquals(eventDescription, loadedEvent.getDescription()); assertEquals(event.getOfficialWebsiteURL(), loadedEvent.getOfficialWebsiteURL()); + assertEquals(event.getSailorsInfoWebsiteURL(), loadedEvent.getSailorsInfoWebsiteURL()); assertEquals(2, Util.size(loadedEvent.getLeaderboardGroups())); Iterator lgIter = loadedEvent.getLeaderboardGroups().iterator(); assertSame(lg1, lgIter.next()); diff --git a/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/impl/EventBaseJsonSerializer.java b/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/impl/EventBaseJsonSerializer.java index 633f83bbbff..de6573793fc 100644 --- a/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/impl/EventBaseJsonSerializer.java +++ b/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/impl/EventBaseJsonSerializer.java @@ -29,6 +29,7 @@ public class EventBaseJsonSerializer implements JsonSerializer { public static final String FIELD_IMAGE_HEIGHT = "imageHeight"; public static final String FIELD_VIDEO_URL = "videoURL"; public static final String FIELD_OFFICIAL_WEBSITE_URL = "officialWebsiteURL"; + public static final String FIELD_SAILORS_INFO_WEBSITE_URL = "sailorsInfoWebsiteURL"; public static final String FIELDS_LEADERBOARD_GROUPS = "leaderboardGroups"; public static final String FIELD_SOURCE_URL = "sourceURL"; @@ -63,6 +64,7 @@ public class EventBaseJsonSerializer implements JsonSerializer { result.put(FIELD_NAME, event.getName()); result.put(FIELD_DESCRIPTION, event.getDescription()); result.put(FIELD_OFFICIAL_WEBSITE_URL, event.getOfficialWebsiteURL() != null ? event.getOfficialWebsiteURL().toString() : null); + result.put(FIELD_SAILORS_INFO_WEBSITE_URL, event.getSailorsInfoWebsiteURL() != null ? event.getSailorsInfoWebsiteURL().toString() : null); result.put(FIELD_START_DATE, event.getStartDate() != null ? event.getStartDate().asMillis() : null); result.put(FIELD_END_DATE, event.getStartDate() != null ? event.getEndDate().asMillis() : null); result.put(FIELD_VENUE, venueSerializer.serialize(event.getVenue())); diff --git a/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/racelog/impl/RaceLogDependentStartTimeEventSerializer.java b/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/racelog/impl/RaceLogDependentStartTimeEventSerializer.java index b7d1ccea812..ccc94024c3c 100644 --- a/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/racelog/impl/RaceLogDependentStartTimeEventSerializer.java +++ b/java/com.sap.sailing.server.gateway.serialization.shared.android/src/com/sap/sailing/server/gateway/serialization/racelog/impl/RaceLogDependentStartTimeEventSerializer.java @@ -7,7 +7,7 @@ import com.sap.sailing.domain.abstractlog.race.RaceLogEvent; import com.sap.sailing.domain.base.Competitor; import com.sap.sailing.server.gateway.serialization.JsonSerializer; -public class RaceLogDependentStartTimeEventSerializer extends BaseRaceLogEventSerializer implements JsonSerializer { +public class RaceLogDependentStartTimeEventSerializer extends RaceLogRaceStatusEventSerializer implements JsonSerializer { public RaceLogDependentStartTimeEventSerializer(JsonSerializer competitorSerializer) { super(competitorSerializer); @@ -34,6 +34,8 @@ public class RaceLogDependentStartTimeEventSerializer extends BaseRaceLogEventSe result.put(FIELD_DEPDENDENT_ON_RACECOLUMN, event.getDependentOnRaceIdentifier().getRaceColumnName()); result.put(FIELD_DEPDENDENT_ON_REGATTALIKE, event.getDependentOnRaceIdentifier().getRegattaLikeParentName()); result.put(FIELD_START_TIME_DIFFERENCE, event.getStartTimeDifference().asMillis()); + result.put(FIELD_NEXT_STATUS, event.getNextStatus().toString()); + return result; } diff --git a/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/RegattasResource.java b/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/RegattasResource.java index a8efcff988e..b8772300255 100644 --- a/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/RegattasResource.java +++ b/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/RegattasResource.java @@ -651,7 +651,9 @@ public class RegattasResource extends AbstractSailingServerResource { return Response.status(Status.INTERNAL_SERVER_ERROR).entity("Could not parse the 'to' time.") .type(MediaType.TEXT_PLAIN).build(); } - + // Crop request interval to startOfTracking / [endOfTracking|timePointOfLastEvent] + from = Util.getLatestOfTimePoints(from, trackedRace.getStartOfTracking()); + to = Util.getEarliestOfTimePoints(to, Util.getEarliestOfTimePoints(trackedRace.getEndOfTracking(), trackedRace.getTimePointOfNewestEvent())); TrackedRaceJsonSerializer serializer = new TrackedRaceJsonSerializer( new DefaultWindTrackJsonSerializer()); serializer.setWindSource(windSource); diff --git a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java index cd6423286a8..35940fb21b6 100755 --- a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java +++ b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/MasterDataImportTest.java @@ -1329,8 +1329,8 @@ public class MasterDataImportTest { Event event = sourceService.createEventWithoutReplication("Test Event", /* eventDescription */ null, new MillisecondsTimePoint(0), new MillisecondsTimePoint(10), "testvenue", false, UUID.randomUUID(), - /* officialWebsiteURL */ null, /* images */Collections. emptyList(), - /* videos */Collections. emptyList()); + /* officialWebsiteURL */ null, /* sailorsInfoWebsiteURL */ null, + /* images */Collections. emptyList(), /* videos */Collections. emptyList()); CourseArea defaultCourseArea = sourceService.addCourseArea(event.getId(), "ECHO", UUID.randomUUID()); Regatta regatta = sourceService.createRegatta( @@ -1394,8 +1394,8 @@ public class MasterDataImportTest { Event event = sourceService.createEventWithoutReplication("Test Event", /* eventDescription */ null, new MillisecondsTimePoint(0), new MillisecondsTimePoint(10), "testvenue", false, UUID.randomUUID(), - /* officialWebsiteURL */ null, /* images */Collections. emptyList(), - /* videos */Collections. emptyList()); + /* officialWebsiteURL */ null, /* sailorsInfoWebsiteURL */ null, + /* images */Collections. emptyList(), /* videos */Collections. emptyList()); CourseArea defaultCourseArea = sourceService.addCourseArea(event.getId(), "ECHO", UUID.randomUUID()); List raceColumnNames = new ArrayList(); diff --git a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/SearchServiceTest.java b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/SearchServiceTest.java index 0933a8d1256..1e325949fc2 100755 --- a/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/SearchServiceTest.java +++ b/java/com.sap.sailing.server.test/src/com/sap/sailing/server/test/SearchServiceTest.java @@ -120,7 +120,8 @@ public class SearchServiceTest { cal.set(2014, 5, 8, 16, 00); final TimePoint pfingstbuschEndDate = new MillisecondsTimePoint(cal.getTime()); pfingstbusch = server.apply(new CreateEvent("Pfingsbusch", /* eventDescription */ null, pfingstbuschStartDate, pfingstbuschEndDate, /* isPublic */ - "Kiel", true, UUID.randomUUID(), /* officialWebsiteURLAsString */ null, /* images */Collections. emptyList(), /* videos */Collections. emptyList())); + "Kiel", true, UUID.randomUUID(), /* officialWebsiteURLAsString */ null, /* sailorsInfoWebsiteURLAsString */ null, + /* images */Collections. emptyList(), /* videos */Collections. emptyList())); kiel = pfingstbusch.getVenue(); final CourseAreaImpl kielAlpha = new CourseAreaImpl("Alpha", UUID.randomUUID()); kiel.addCourseArea(kielAlpha); @@ -153,7 +154,7 @@ public class SearchServiceTest { cal.set(2014, 5, 8, 18, 00); final TimePoint aalEndDate = new MillisecondsTimePoint(cal.getTime()); aalEvent = server.apply(new CreateEvent("Aalregatta", /* eventDescription */ null, aalStartDate, aalEndDate, /* isPublic */ - "Flensburg", true, UUID.randomUUID(), /* officialWebsiteURLAsString */ null, + "Flensburg", true, UUID.randomUUID(), /* officialWebsiteURLAsString */ null, /*sailorsInfoWebsiteURLAsString */ null, /* images */Collections. emptyList(), /* videos */Collections. emptyList())); flensburg = aalEvent.getVenue(); final CourseAreaImpl flensburgStandard = new CourseAreaImpl("Standard", UUID.randomUUID()); diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/RacingEventService.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/RacingEventService.java index 635dd8e93f2..aaec169b747 100755 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/RacingEventService.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/RacingEventService.java @@ -371,7 +371,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch * @return The new event */ void updateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, - String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, + String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable images, Iterable videos); /** @@ -467,7 +467,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch ConcurrentHashMap getPersistentRegattasForRaceIDs(); Event createEventWithoutReplication(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue, - boolean isPublic, UUID id, URL officialWebsiteURL, Iterable images, + boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable images, Iterable videos); void setRegattaForRace(Regatta regatta, String raceIdAsString); diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java index 1aaa6907589..9da4f310d54 100644 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java @@ -2607,10 +2607,11 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes public Event addEvent(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue, boolean isPublic, UUID id) { Event result = createEventWithoutReplication(eventName, eventDescription, startDate, endDate, venue, isPublic, - id, /* officialWebsiteURL */null, /* images */Collections. emptyList(), - /* videos */Collections. emptyList()); + id, /* officialWebsiteURL */null, /* sailorsInfoWebsiteURLAsString */null, + /* images */Collections. emptyList(), /* videos */Collections. emptyList()); replicate(new CreateEvent(eventName, eventDescription, startDate, endDate, venue, isPublic, id, - /* officialWebsiteURLAsString */null, /* images */Collections. emptyList(), /* videos */Collections. emptyList())); + /* officialWebsiteURLAsString */null, /* sailorsInfoWebsiteURLAsString */null, + /* images */Collections. emptyList(), /* videos */Collections. emptyList())); return result; } @@ -2621,8 +2622,8 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes @Override public Event createEventWithoutReplication(String eventName, String eventDescription, TimePoint startDate, - TimePoint endDate, String venue, boolean isPublic, UUID id, URL officialWebsiteURL, Iterable images, - Iterable videos) { + TimePoint endDate, String venue, boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, + Iterable images, Iterable videos) { Event result = new EventImpl(eventName, startDate, endDate, venue, isPublic, id); addEvent(result); result.setDescription(eventDescription); @@ -2643,7 +2644,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes @Override public void updateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, - String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, + String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable images, Iterable videos) { final Event event = eventsById.get(id); if (event == null) { @@ -2667,6 +2668,7 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes } event.setLeaderboardGroups(leaderboardGroups); event.setOfficialWebsiteURL(officialWebsiteURL); + event.setSailorsInfoWebsiteURL(sailorsInfoWebsiteURL); event.setImages(images); event.setVideos(videos); // TODO consider use diffutils to compute diff between old and new leaderboard groups list and apply the patch diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/CreateEvent.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/CreateEvent.java index 6f3e88beb25..3d1dc7a37ec 100755 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/CreateEvent.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/CreateEvent.java @@ -28,9 +28,10 @@ public class CreateEvent extends AbstractEventOperation { private final Iterable images; private final Iterable videos; private final URL officialWebsiteURL; + private final URL sailorsInfoWebsiteURL; public CreateEvent(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue, - boolean isPublic, UUID id, URL officialWebsiteURL, Iterable images, Iterable videos) { + boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable images, Iterable videos) { super(id); this.eventName = eventName; this.eventDescription = eventDescription; @@ -39,6 +40,7 @@ public class CreateEvent extends AbstractEventOperation { this.venue = venue; this.isPublic = isPublic; this.officialWebsiteURL = officialWebsiteURL; + this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL; this.images = images; this.videos = videos; } @@ -62,7 +64,7 @@ public class CreateEvent extends AbstractEventOperation { @Override public Event internalApplyTo(RacingEventService toState) { return toState.createEventWithoutReplication(getEventName(), eventDescription, startDate, endDate, venue, isPublic, - getId(), officialWebsiteURL, images, videos); + getId(), officialWebsiteURL, sailorsInfoWebsiteURL, images, videos); } } diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/UpdateEvent.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/UpdateEvent.java index 3f40e452ace..bc3d64901a6 100755 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/UpdateEvent.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/operationaltransformation/UpdateEvent.java @@ -19,11 +19,12 @@ public class UpdateEvent extends AbstractEventOperation { private final String eventName; private final String eventDescription; private final URL officialWebsiteURL; + private final URL sailorsInfoWebsiteURL; private final Iterable images; private final Iterable videos; public UpdateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, - String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, + String venueName, boolean isPublic, Iterable leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable images, Iterable videos) { super(id); this.eventName = eventName; @@ -34,6 +35,7 @@ public class UpdateEvent extends AbstractEventOperation { this.isPublic = isPublic; this.leaderboardGroupIds = leaderboardGroupIds; this.officialWebsiteURL = officialWebsiteURL; + this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL; this.images = images; this.videos = videos; } @@ -53,7 +55,7 @@ public class UpdateEvent extends AbstractEventOperation { @Override public Void internalApplyTo(RacingEventService toState) { toState.updateEvent(getId(), eventName, eventDescription, startDate, endDate, venueName, isPublic, - leaderboardGroupIds, officialWebsiteURL, images, videos); + leaderboardGroupIds, officialWebsiteURL, sailorsInfoWebsiteURL, images, videos); return null; } } diff --git a/wiki/amazon-ec2.md b/wiki/amazon-ec2.md index 173a8c2a7fa..bc34153061a 100644 --- a/wiki/amazon-ec2.md +++ b/wiki/amazon-ec2.md @@ -72,7 +72,7 @@ INSTALL_FROM_RELEASE=(name-of-release) USE_ENVIRONMENT=live-replica-server REPLICATE_MASTER_SERVLET_HOST=(IP of your master server) REPLICATE_MASTER_EXCHANGE_NAME=myspecificevent -REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl +REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl SERVER_NAME=MYSPECIFICEVENT MONGODB_NAME=myspecificevent-replica EVENT_ID=<some-uuid-of-an-event-you-want-to-feature> diff --git a/wiki/racelog-tracking.md b/wiki/racelog-tracking.md index ab29382a610..6212fb5d7c3 100644 --- a/wiki/racelog-tracking.md +++ b/wiki/racelog-tracking.md @@ -6,6 +6,9 @@ The term itself should be revised at some point, and currently refers to the tec ## Server Architecture [Server Architecture](racelog-tracking/server) +## Setting Up +[Smartphone Tracking](wiki/smartphone-tracking) + ## App Architecture - [current Tracking App](tracking-app) - [old prototype](racelog-tracking/app) \ No newline at end of file diff --git a/wiki/smartphone-tracking.md b/wiki/smartphone-tracking.md index b2b53f09123..ffc12eb985e 100644 --- a/wiki/smartphone-tracking.md +++ b/wiki/smartphone-tracking.md @@ -8,12 +8,14 @@ With the development of [RaceLogTracking](racelog-tracking) and the [Tracking Ap 3. Register (or create) the competitors for the leaderboard using the symbol also in the Actions bar. It is also possible denote for RaceLog Tracking or register competitors to each race individually, but since this is usually the same for an entire event it is easier to do it for the whole leaderboard. -4. Click the "Define Course Layout" symbol (Two flags/marks) on the Actions tab of the first race of the leaderboard. Create a course by defining first marks and than waypoints. Use the copy symbol (Two pieces of paper) to copy the course to other races. +4. Click the "Define Course Layout" symbol (Two flags/marks) on the Actions tab of the first race of the leaderboard. Create a course by defining first marks and then waypoints. Use the copy symbol (Two pieces of paper) to copy the course to other races. Note: In the future it should be possible to do this for the entire leaderboard too, as the course does not change for many events. 5. If not using the Buoy-Positioning App, it is possible to set the mark locations in the course layout panel, using the "Set Mark Location" symbol on the right of the mark list. If using the Race Committee App, make sure to only use the ByMarks Course Designer, as ByName can overwrite a manually created course with an empty one. -6. Map the smartphones the the competitors using the "Map Devices to Competitors and Mark" tab of the Leaderboard Actions bar (or for each race, but going over the leaderboard is usually easier, as above). Select each Competitor and scan the QR-Code with the Tracking-App. Do not forget to press (or remind the sailors to press) start tracking before the races start. Mappings can be viewed (and deleted) in the "Map Devices to Competitors and Marks" window of each race. +6a. Map the smartphones to the competitors using the "Map Devices to Competitors and Mark" tab of the Leaderboard Actions bar (or for each race, but going over the leaderboard is usually easier, as above). Select each Competitor and scan the QR-Code with the Tracking-App. Do not forget to press (or remind the sailors to press) start tracking before the races start. Mappings can be viewed (and deleted) in the "Map Devices to Competitors and Marks" window of each race. + +6b. Alternatively, go to the Leaderboards/Leaderboard Configuration tab, select your leaderboard and click on the people/competitor action bar button (tooltip is "Edit Competitors"). Make sure that the competitors you want to invite have valid e-mail addresses, select them, then click the "Invite competitors" button at the top of the list. The competitors will receive an e-mail with the QR code and a link that they can use to bind their device. 7. To use the Buoy Positioning App click the "Invite Buoy Tenders" symbol in the Leaderboard Actions tab and send a QR-Code by email to be scanned using the App.