mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 06:17:27 +00:00
Merge branch 'design2015' into design2015-races
Conflicts: java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties
This commit is contained in:
commit
65ffb79543
67 files changed
+588
-419
No files matched your search
@@ -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]]
|
||||
|
||||
+11
-2
@@ -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"),
|
||||
@@ -17,6 +18,7 @@ public enum BoatClassMasterdata {
|
||||
ALBIN_EXPRESS ("Albin Express", true, 7.77, 2.50, BoatHullType.MONOHULL, false),
|
||||
ALBIN_BALLAD ("Albin Ballad", true, 9.12, 2.95, BoatHullType.MONOHULL, false),
|
||||
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 +27,20 @@ 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"),
|
||||
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 +49,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
|
||||
|
||||
+4
-1
@@ -11,7 +11,10 @@ public enum FleetColors {
|
||||
BLUE (39, 140, 194, 0),
|
||||
YELLOW (251,186,0, 0),
|
||||
GREEN (138, 181, 78, 0),
|
||||
RED (232, 74, 26, 0);
|
||||
RED (232, 74, 26, 0),
|
||||
PURPLE (212, 28, 175, 0),
|
||||
NEON_GREEN (118, 255, 33, 0),
|
||||
ORANGE (255, 174, 23, 0);
|
||||
|
||||
private Color color;
|
||||
|
||||
|
||||
+8
@@ -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) {
|
||||
|
||||
+1
@@ -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,
|
||||
|
||||
+1
@@ -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());
|
||||
|
||||
+16
-1
@@ -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);
|
||||
|
||||
+6
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -10,6 +10,7 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
public class RaceLogEndOfTrackingEventImpl extends RaceLogEventImpl implements RaceLogEndOfTrackingEvent {
|
||||
private static final long serialVersionUID = 3130293807404190473L;
|
||||
|
||||
public RaceLogEndOfTrackingEventImpl(TimePoint createdAt, AbstractLogEventAuthor author,
|
||||
TimePoint endOfTracking, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
@@ -22,5 +23,4 @@ public class RaceLogEndOfTrackingEventImpl extends RaceLogEventImpl implements R
|
||||
visitor.visit(this);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -10,6 +10,7 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
public class RaceLogStartOfTrackingEventImpl extends RaceLogEventImpl implements RaceLogStartOfTrackingEvent {
|
||||
private static final long serialVersionUID = -4134608549471817247L;
|
||||
|
||||
public RaceLogStartOfTrackingEventImpl(TimePoint createdAt, AbstractLogEventAuthor author,
|
||||
TimePoint startOfTracking, Serializable pId, List<Competitor> pInvolvedBoats, int pPassId) {
|
||||
@@ -21,5 +22,4 @@ public class RaceLogStartOfTrackingEventImpl extends RaceLogEventImpl implements
|
||||
public void accept(RaceLogEventVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
+10
-1
@@ -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 <em>not</em> 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<RaceLogChangedListener> listenerRef;
|
||||
private final RaceLog removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced;
|
||||
|
||||
/**
|
||||
* Remembers from which {@link RaceLog} to {@link RaceLog#removeListener(Object) remove} this visitor as a listener
|
||||
* when the <code>listener</code> is no longer strongly referenced. This constructor does <em>not</em> 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<RaceLogChangedListener>(listener, queue);
|
||||
|
||||
+2
-3
@@ -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}
|
||||
|
||||
+8
@@ -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 <code>null</code> if such a site does not exist or its URL is not known.
|
||||
*/
|
||||
URL getSailorsInfoWebsiteURL();
|
||||
|
||||
void setSailorsInfoWebsiteURL(URL sailorsInfoWebsiteURL);
|
||||
|
||||
Iterable<? extends LeaderboardGroupBase> getLeaderboardGroups();
|
||||
|
||||
/**
|
||||
|
||||
+11
@@ -36,6 +36,7 @@ public abstract class EventBaseImpl implements EventBase {
|
||||
private TimePoint startDate;
|
||||
private TimePoint endDate;
|
||||
private URL officialWebsiteURL;
|
||||
private URL sailorsInfoWebsiteURL;
|
||||
private ConcurrentLinkedQueue<ImageDescriptor> images;
|
||||
private ConcurrentLinkedQueue<VideoDescriptor> 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<ImageDescriptor> getImages() {
|
||||
return Collections.unmodifiableCollection(images);
|
||||
|
||||
+28
-33
@@ -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
|
||||
|
||||
+5
@@ -39,6 +39,7 @@ public class BoatClassImageResolver {
|
||||
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());
|
||||
@@ -53,6 +54,8 @@ public class BoatClassImageResolver {
|
||||
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 +64,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 +75,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());
|
||||
|
||||
+15
@@ -91,6 +91,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 +160,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();
|
||||
|
||||
}
|
||||
+1
-1
@@ -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", "<br />"));
|
||||
|
||||
+7
-5
@@ -26,10 +26,8 @@ public class MinileaderboardBox extends Composite implements RefreshableWidget<G
|
||||
interface MyUiBinder extends UiBinder<Widget, MinileaderboardBox> {
|
||||
}
|
||||
|
||||
@UiField
|
||||
MobileSection itemContainerUi;
|
||||
@UiField
|
||||
SectionHeaderContent headerUi;
|
||||
@UiField MobileSection itemContainerUi;
|
||||
@UiField SectionHeaderContent headerUi;
|
||||
|
||||
public MinileaderboardBox() {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
@@ -62,8 +60,12 @@ public class MinileaderboardBox extends Composite implements RefreshableWidget<G
|
||||
itemContainerUi.addContent(getScoreInformation(data));
|
||||
}
|
||||
|
||||
boolean showRaceCounts = data.hasDifferentRaceCounts();
|
||||
for (MiniLeaderboardItemDTO item : data.getItems()) {
|
||||
itemContainerUi.addContent(new MinileaderboardBoxItem(item));
|
||||
itemContainerUi.addContent(new MinileaderboardBoxItem(item, showRaceCounts));
|
||||
}
|
||||
if (showRaceCounts) {
|
||||
itemContainerUi.addContent(new MinileaderboardBoxItemLegend());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-11
@@ -18,23 +18,22 @@ public class MinileaderboardBoxItem extends Widget {
|
||||
interface MyUiBinder extends UiBinder<Element, MinileaderboardBoxItem> {
|
||||
}
|
||||
|
||||
@UiField
|
||||
Element competitorNameUi;
|
||||
@UiField
|
||||
Element competitorRankUi;
|
||||
@UiField
|
||||
Element competitorPointsUi;
|
||||
@UiField
|
||||
Element competitorCountryNameUi;
|
||||
@UiField
|
||||
ImageElement competitorFlagUi;
|
||||
@UiField Element competitorNameUi;
|
||||
@UiField Element competitorRankUi;
|
||||
@UiField Element competitorPointsUi;
|
||||
@UiField Element competitorRacesUi;
|
||||
@UiField Element competitorCountryNameUi;
|
||||
@UiField ImageElement competitorFlagUi;
|
||||
|
||||
public MinileaderboardBoxItem(MiniLeaderboardItemDTO entry) {
|
||||
public MinileaderboardBoxItem(MiniLeaderboardItemDTO entry, boolean showRaceCount) {
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
competitorNameUi.setInnerText(entry.getCompetitor().getName());
|
||||
competitorCountryNameUi.setInnerText(String.valueOf(entry.getCompetitor().getSailID()));
|
||||
competitorRankUi.setInnerText(String.valueOf(entry.getRank()) + ".");
|
||||
competitorPointsUi.setInnerText(StringMessages.INSTANCE.pointsValue(entry.getPoints()));
|
||||
if (showRaceCount) {
|
||||
competitorRacesUi.setInnerText("(" + entry.getRaceCount() + ")");
|
||||
}
|
||||
|
||||
SimpleCompetitorDTO competitor = entry.getCompetitor();
|
||||
String flagImageURL = competitor.getFlagImageURL();
|
||||
|
||||
+13
-5
@@ -11,7 +11,7 @@
|
||||
font-size: 0.866666666666667em;
|
||||
min-height: 4.5em;
|
||||
}
|
||||
.minileaderboard_item_rank, .minileaderboard_item_flag, .minileaderboard_item_name, .minileaderboard_item_points {
|
||||
.minileaderboard_item_rank, .minileaderboard_item_flag, .minileaderboard_item_name, .minileaderboard_item_score {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
-webkit-transform: translateY(-50%);
|
||||
@@ -31,19 +31,24 @@
|
||||
.minileaderboard_item_name {
|
||||
margin: 0 5em;
|
||||
}
|
||||
.minileaderboard_item_name > span:FIRST-CHILD{
|
||||
.minileaderboard_item_name > span:FIRST-CHILD {
|
||||
font-weight: bold;
|
||||
}
|
||||
.minileaderboard_item_points {
|
||||
.minileaderboard_item_score {
|
||||
right: 1em;
|
||||
width: 3.75em;
|
||||
text-align: center;
|
||||
padding: 0.230769230769231em 0;
|
||||
background: #ebebeb;
|
||||
border: 1px solid #dedede;
|
||||
font-weight: bold;
|
||||
border-radius: 0.384615384615385em;
|
||||
}
|
||||
.minileaderboard_item_points {
|
||||
font-weight: bold;
|
||||
}
|
||||
.minileaderboard_item_racecount {
|
||||
font-size: 0.866666666666667em;
|
||||
}
|
||||
</ui:style>
|
||||
|
||||
<div class="{res.mediaCss.grid} {style.minileaderboard_item}">
|
||||
@@ -53,7 +58,10 @@
|
||||
<span ui:field="competitorCountryNameUi" />
|
||||
<span ui:field="competitorNameUi" />
|
||||
</div>
|
||||
<div class="{style.minileaderboard_item_points}" ui:field="competitorPointsUi" />
|
||||
<div class="{style.minileaderboard_item_score}">
|
||||
<div class="{style.minileaderboard_item_points}" ui:field="competitorPointsUi" />
|
||||
<div class="{style.minileaderboard_item_racecount}" ui:field="competitorRacesUi" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ui:UiBinder>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.sap.sailing.gwt.home.mobile.partials.minileaderboard;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class MinileaderboardBoxItemLegend extends Widget {
|
||||
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
|
||||
|
||||
interface MyUiBinder extends UiBinder<Element, MinileaderboardBoxItemLegend> {
|
||||
}
|
||||
|
||||
public MinileaderboardBoxItemLegend() {
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.home.mobile.resources.SharedResources" />
|
||||
|
||||
<ui:style>
|
||||
.minileaderboard_item_legend {
|
||||
margin: 0 !important;
|
||||
position: relative;
|
||||
padding: 1em 0.75em;
|
||||
font-size: 0.866666666666667em;
|
||||
min-height: 4.5em;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.minileaderboard_item_legend_description, .minileaderboard_item_legend_score {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-moz-transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.minileaderboard_item_legend_description {
|
||||
margin: 0 6.25em 0 0.5em;
|
||||
font-style: italic;
|
||||
}
|
||||
.minileaderboard_item_legend_score {
|
||||
right: 1em;
|
||||
width: 5em;
|
||||
text-align: center;
|
||||
padding: 0.230769230769231em 0;
|
||||
background: #ebebeb;
|
||||
border: 1px solid #dedede;
|
||||
border-radius: 0.384615384615385em;
|
||||
}
|
||||
.minileaderboard_item_legend_points {
|
||||
font-weight: bold;
|
||||
}
|
||||
.minileaderboard_item_legend_racecount {
|
||||
font-size: 0.866666666666667em;
|
||||
}
|
||||
</ui:style>
|
||||
|
||||
<div class="{res.mediaCss.grid} {style.minileaderboard_item_legend}">
|
||||
<div class="{style.minileaderboard_item_legend_description}" ui:field="competitorNameUi">
|
||||
<ui:text from="{i18n.miniLeeaderboardLegendText}"/>:
|
||||
</div>
|
||||
<div class="{style.minileaderboard_item_legend_score}">
|
||||
<div class="{style.minileaderboard_item_legend_points}" ui:field="competitorPointsUi">
|
||||
<ui:text from="{i18n.points}"/>
|
||||
</div>
|
||||
<div class="{style.minileaderboard_item_legend_racecount}" ui:field="competitorRacesUi">
|
||||
(<ui:text from="{i18n.numberOfRacesShort}"/>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ui:UiBinder>
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class EventActivity extends AbstractActivity implements Presenter {
|
||||
final EventView view = new EventViewImpl(this);
|
||||
panel.setWidget(view.asWidget());
|
||||
EventViewDTO event = getCtx().getEventDTO();
|
||||
String sailorInfoUrl = event.getSailorsInfoURL();
|
||||
String sailorInfoUrl = event.getSailorsInfoWebsiteURL();
|
||||
if (sailorInfoUrl != null && !sailorInfoUrl.isEmpty()) {
|
||||
view.setSailorInfos(StringMessages.INSTANCE.sailorInfoLongText(), StringMessages.INSTANCE.sailorInfo(), sailorInfoUrl);
|
||||
} else if (event.getType() == EventType.SERIES_EVENT) {
|
||||
|
||||
+2
@@ -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.<ImageDTO>emptyList());
|
||||
|
||||
+5
-1
@@ -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<String, String> regattaOverviewURLParameters = new HashMap<String, String>();
|
||||
regattaOverviewURLParameters.put("event", event.id.toString());
|
||||
String regattaOverviewLink = EntryPointLinkFactory.createRegattaOverviewLink(regattaOverviewURLParameters);
|
||||
|
||||
+5
-1
@@ -42,6 +42,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
|
||||
protected CheckBox isPublicCheckBox;
|
||||
protected UUID id;
|
||||
protected TextBox officialWebsiteURLEntryField;
|
||||
protected TextBox sailorsInfoWebsiteURLEntryField;
|
||||
protected StringListInlineEditorComposite courseAreaNameList;
|
||||
protected StringConstantsListEditorComposite leaderboardGroupList;
|
||||
protected List<LeaderboardGroupDTO> availableLeaderboardGroups;
|
||||
@@ -157,6 +158,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
|
||||
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<EventDTO>
|
||||
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<EventDTO>
|
||||
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");
|
||||
|
||||
+2
@@ -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<String> leaderboardGroupNames = new ArrayList<>();
|
||||
for(LeaderboardGroupDTO leaderboardGroupDTO: event.getLeaderboardGroups()) {
|
||||
|
||||
+3
-2
@@ -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<EventDTO>() {
|
||||
@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<EventDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
|
||||
-107
@@ -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<String>{
|
||||
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<String> validator,
|
||||
com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback<String> 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<CourseAreaDTO> courseAreas = new ArrayList<CourseAreaDTO>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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<EventDTO>() {
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -295,11 +295,11 @@ public interface SailingService extends RemoteService, FileStorageManagementGwtS
|
||||
void updateRacesDelayToLive(List<RegattaAndRaceIdentifier> regattaAndRaceIdentifiers, long delayToLiveInMs);
|
||||
|
||||
EventDTO updateEvent(UUID eventId, String eventName, String eventDescription, Date startDate, Date endDate,
|
||||
VenueDTO venue, boolean isPublic, Iterable<UUID> leaderboardGroupIds, String officialWebsiteURL,
|
||||
VenueDTO venue, boolean isPublic, Iterable<UUID> leaderboardGroupIds, String officialWebsiteURL, String sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDTO> images, Iterable<VideoDTO> videos) throws Exception;
|
||||
|
||||
EventDTO createEvent(String eventName, String eventDescription, Date startDate, Date endDate, String venue,
|
||||
boolean isPublic, List<String> courseAreaNames, String officialWebsiteURL, Iterable<ImageDTO> images, Iterable<VideoDTO> videos) throws Exception;
|
||||
boolean isPublic, List<String> courseAreaNames, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable<ImageDTO> images, Iterable<VideoDTO> videos) throws Exception;
|
||||
|
||||
void removeEvent(UUID eventId);
|
||||
|
||||
|
||||
+2
-2
@@ -367,11 +367,11 @@ public interface SailingServiceAsync extends BuildVersionRetriever, FileStorageM
|
||||
void removeEvents(Collection<UUID> eventIds, AsyncCallback<Void> asyncCallback);
|
||||
|
||||
void createEvent(String eventName, String eventDescription, Date startDate, Date endDate, String venue, boolean isPublic,
|
||||
List<String> courseAreaNames, String officialWebsiteURL, Iterable<ImageDTO> images, Iterable<VideoDTO> videos,
|
||||
List<String> courseAreaNames, String officialWebsiteURL, String sailorsInfoWebsiteURL, Iterable<ImageDTO> images, Iterable<VideoDTO> videos,
|
||||
AsyncCallback<EventDTO> callback);
|
||||
|
||||
void updateEvent(UUID eventId, String eventName, String eventDescription, Date startDate, Date endDate,
|
||||
VenueDTO venue, boolean isPublic, Iterable<UUID> leaderboardGroupIds, String officialWebsiteURL,
|
||||
VenueDTO venue, boolean isPublic, Iterable<UUID> leaderboardGroupIds, String officialWebsiteURL, String sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDTO> images, Iterable<VideoDTO> videos, AsyncCallback<EventDTO> callback);
|
||||
|
||||
void createCourseArea(UUID eventId, String courseAreaName, AsyncCallback<Void> callback);
|
||||
|
||||
+4
@@ -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();
|
||||
@@ -1341,4 +1342,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c
|
||||
String finishedRaces();
|
||||
String selectCompetitor();
|
||||
String allBoatClasses();
|
||||
String points();
|
||||
String numberOfRacesShort();
|
||||
String miniLeeaderboardLegendText();
|
||||
}
|
||||
+6
-2
@@ -92,7 +92,7 @@ velocityMadeGoodInKnots=VMG
|
||||
velocityMadeGoodInKnotsTooltip=The velocity made good, which is the windward/leeward speed for upwind/downwind legs, respectively, or the along-track speed for reaching legs.
|
||||
windwardDistanceToGoInMeters=Windward distance to go
|
||||
windwardDistanceToGoInMetersTooltip=Windward/leeward distance from the competitor''s current position to the end of the leg for upwind/downwind legs, respectively, or the along-track distance for reaching legs.
|
||||
windwardDistanceToCompetitorFarthestAheadInMeters=Windward Distance To Competitor Farthest Ahead
|
||||
windwardDistanceToCompetitorFarthestAheadInMeters=Gap
|
||||
windwardDistanceToCompetitorFarthestAheadInMetersTooltip=Windward/leeward distance of the competitor to the competitor farthest ahead in the race for upwind/downwind legs, respectively, or the along-track distance for reaching legs.\nNote that the competitor that is farthest ahead is not necessarily leading the race if handicap ranking is in place.
|
||||
name=Name
|
||||
leaveEmptyForDefault=Leave empty for default
|
||||
@@ -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
|
||||
@@ -1309,4 +1310,7 @@ winner=Winner
|
||||
durationPlain=Duration
|
||||
finishedRaces=Finished Races
|
||||
selectCompetitor=Please select one competitor
|
||||
allBoatClasses=All Boat Classes
|
||||
allBoatClasses=All Boat Classes
|
||||
points=Points
|
||||
numberOfRacesShort=# Races
|
||||
miniLeeaderboardLegendText=Shows the points along with the number of races per competitor
|
||||
+9
-5
@@ -92,7 +92,7 @@ velocityMadeGoodInKnots=VMG
|
||||
velocityMadeGoodInKnotsTooltip=Die effektive Geschwindigkeit zum Ziel; auf der Kreuz die windwärtige Geschwindigkeit; auf der Vorwindstrecke die leewärtige Geschwindigkeit
|
||||
windwardDistanceToGoInMeters=Abstand in Windrichtung zur nächsten Bahnmarke
|
||||
windwardDistanceToGoInMetersTooltip=Windwärtige / leewärtige Distanz des Teilnehmerns bis zum Ende des Schenkels auf Kreuz bzw. Vorwindstrecke; Strecke entlang des Schenkels bei Holeschlägen
|
||||
windwardDistanceToCompetitorFarthestAheadInMeters=Windwärtiger Abstand zum schnellsten Boot
|
||||
windwardDistanceToCompetitorFarthestAheadInMeters=Rückstand
|
||||
windwardDistanceToCompetitorFarthestAheadInMetersTooltip=Windwärtiger Abstand zum Boot, das bisher am weitesten windwärts gesegelt ist.\nFür Handicap-Wertungen ist das nicht notwendigerweise der nach Verrechnung in Führung liegende Teilnehmer.
|
||||
name=Name
|
||||
leaveEmptyForDefault=Leer für Standardeinstellung
|
||||
@@ -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
|
||||
@@ -1299,4 +1300,7 @@ winner=Sieger
|
||||
durationPlain=Dauer
|
||||
finishedRaces=Beendete Wettfahrten
|
||||
selectCompetitor=Bitte einen Teilnehmer auswählen
|
||||
allBoatClasses=Alle Bootsklassen
|
||||
allBoatClasses=Alle Bootsklassen
|
||||
points=Punkte
|
||||
numberOfRacesShort=# Rennen
|
||||
miniLeeaderboardLegendText=Es werden die Punkte und die Anzahl Rennen je Team angezeigt
|
||||
+5
-1
@@ -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
|
||||
@@ -1246,4 +1247,7 @@ winner=победитель
|
||||
durationPlain=Продолжительность
|
||||
finishedRaces=Finished Races
|
||||
selectCompetitor=Please select one competitor
|
||||
allBoatClasses=All Boat Classes
|
||||
allBoatClasses=All Boat Classes
|
||||
points=Points
|
||||
numberOfRacesShort=# Races
|
||||
miniLeeaderboardLegendText=Shows points along with the number of races per competitor
|
||||
+5
-1
@@ -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
|
||||
@@ -1295,4 +1296,7 @@ pointsValue={0,number,#0.00}
|
||||
openLeaderboard=Open Leaderboard
|
||||
resultsStandings=Results/Standings
|
||||
selectCompetitor=Please select one competitor
|
||||
allBoatClasses=All Boat Classes
|
||||
allBoatClasses=All Boat Classes
|
||||
points=Points
|
||||
numberOfRacesShort=# Races
|
||||
miniLeeaderboardLegendText=Shows points along with the number of races per competitor
|
||||
+9
-5
@@ -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}) {
|
||||
|
||||
+2
@@ -48,6 +48,8 @@ public abstract class AbstractLeaderboardViewer extends SimplePanel {
|
||||
this.stringMessages = stringMessages;
|
||||
this.timer = timer;
|
||||
this.hideToolbar = hideToolbar;
|
||||
|
||||
RES.css().ensureInjected();
|
||||
}
|
||||
|
||||
public LeaderboardPanel getLeaderboardPanel() {
|
||||
|
||||
+181
-176
@@ -1,176 +1,181 @@
|
||||
.cellTableWidget {
|
||||
border-left: 1px solid #c9caca;
|
||||
border-top: 1px solid #c9caca;
|
||||
}
|
||||
|
||||
/** v-align images in the table header
|
||||
* grey background for table header
|
||||
*/
|
||||
.cellTableHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 3px 5px;
|
||||
padding-bottom: 5px;
|
||||
text-align: center;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.cellTableFirstColumnHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-left: none !important;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableLastColumnHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableHeader > span > img:first-child {
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableEvenRow {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.cellTableEvenRowCell {
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-left: none;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 7px 7px 7px;
|
||||
white-space: nowrap;
|
||||
font-size: 12px !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.cellTableCheckboxColumnCell {
|
||||
padding: 1px 1px 1px !important;
|
||||
vertical-align: middle !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableCheckboxSelected {
|
||||
margin-left: 0px; /* account for the selection border that pushes a selected checkbox to the side */
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 2px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
border: solid 1px #fcbb22;
|
||||
background-color: #fcbb22;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableCheckboxDeselected {
|
||||
margin-left: 2px; /* account for the selection border that pushes a selected checkbox to the side */
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 2px;
|
||||
border: solid 1px #acacac;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableOddRow {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: rgba(242,242,242,0.5);
|
||||
}
|
||||
|
||||
.cellTableOddRowCell {
|
||||
border-left: none !important;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 7px 7px 7px;
|
||||
white-space: nowrap;
|
||||
font-size: 12px !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.cellTableHoveredRow {
|
||||
background-color: rgba(229,242,249,0.5);
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow {
|
||||
color: #000000;
|
||||
background-color: rgba(229,242,249,0.5);
|
||||
border-right: 2px solid #21a0e4 !important;
|
||||
border-left: 2px solid #21a0e4 !important;
|
||||
border: 2px solid #21a0e4;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow > td:FIRST-CHILD {
|
||||
border-left: 2px solid rgba(33,160,228,0.5) !important;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow > td:LAST-CHILD {
|
||||
border-right: 2px solid rgba(33,160,228,0.5) !important;
|
||||
}
|
||||
|
||||
.cellTableSelectedRowCell {
|
||||
border-left: none;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
border-top: 2px solid #21a0e4 !important;
|
||||
border-bottom: 2px solid #21a0e4 !important;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span:first-child{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span input, .cellTableRaceColumnHeader span img{
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.cellTableLegColumnHeader {
|
||||
background-color: #efefef;
|
||||
|
||||
}
|
||||
|
||||
.cellTableLegDetailColumnHeader {
|
||||
background-color: #f4f5f6;
|
||||
}
|
||||
|
||||
.cellTableRaceColumn {
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
.cellTableLegColumn {
|
||||
background-color: #efefef !important;
|
||||
}
|
||||
|
||||
.cellTableLegDetailColumn {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.cellTableTotalColumn {
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
.cellTableWidget {
|
||||
border-left: 1px solid #c9caca;
|
||||
border-top: 1px solid #c9caca;
|
||||
}
|
||||
|
||||
/** v-align images in the table header
|
||||
* grey background for table header
|
||||
*/
|
||||
.cellTableHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 3px 5px;
|
||||
padding-bottom: 5px;
|
||||
text-align: center;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.cellTableFirstColumnHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-left: none !important;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableLastColumnHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
background-color: #e5e5e5;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableHeader > span > img:first-child {
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableEvenRow {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.cellTableEvenRowCell {
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-left: none;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 7px 7px 7px;
|
||||
white-space: nowrap;
|
||||
font-size: 12px !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.cellTableCheckboxColumnCell {
|
||||
padding: 1px 1px 1px !important;
|
||||
vertical-align: middle !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cellTableCheckboxSelected {
|
||||
margin-left: 0px; /* account for the selection border that pushes a selected checkbox to the side */
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 2px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
border: solid 1px #fcbb22;
|
||||
background-color: #fcbb22;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableCheckboxDeselected {
|
||||
margin-left: 2px; /* account for the selection border that pushes a selected checkbox to the side */
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 2px;
|
||||
border: solid 1px #acacac;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cellTableOddRow {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: rgba(242,242,242,0.5);
|
||||
}
|
||||
|
||||
.cellTableOddRowCell {
|
||||
border-left: none !important;
|
||||
border-right: 1px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
border-bottom: 1px solid #c9caca !important;
|
||||
padding: 7px 7px 7px;
|
||||
white-space: nowrap;
|
||||
font-size: 12px !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.cellTableHoveredRow {
|
||||
background-color: rgba(229,242,249,0.5);
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow {
|
||||
color: #000000;
|
||||
background-color: rgba(229,242,249,0.5);
|
||||
border-right: 2px solid #21a0e4 !important;
|
||||
border-left: 2px solid #21a0e4 !important;
|
||||
border: 2px solid #21a0e4;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow > td:FIRST-CHILD {
|
||||
border-left: 2px solid rgba(33,160,228,0.5) !important;
|
||||
}
|
||||
|
||||
.cellTableSelectedRow > td:LAST-CHILD {
|
||||
border-right: 2px solid rgba(33,160,228,0.5) !important;
|
||||
}
|
||||
|
||||
.cellTableSelectedRowCell {
|
||||
border-left: none;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
border-top: 2px solid #21a0e4 !important;
|
||||
border-bottom: 2px solid #21a0e4 !important;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span:first-child{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span input, .cellTableRaceColumnHeader span img{
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.cellTableLegColumnHeader {
|
||||
background-color: #efefef;
|
||||
|
||||
}
|
||||
|
||||
.cellTableLegDetailColumnHeader {
|
||||
background-color: #f4f5f6;
|
||||
}
|
||||
|
||||
.cellTableRaceColumnHeader span > div, .cellTableLegColumnHeader span > div {
|
||||
width: 19px !important;
|
||||
height: 19px !important;
|
||||
}
|
||||
|
||||
.cellTableRaceColumn {
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
.cellTableLegColumn {
|
||||
background-color: #efefef !important;
|
||||
}
|
||||
|
||||
.cellTableLegDetailColumn {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.cellTableTotalColumn {
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class LeaderboardEditPage extends AbstractSailingEntryPoint {
|
||||
header.getElement().getStyle().setPosition(Position.FIXED);
|
||||
header.getElement().getStyle().setTop(0, Unit.PX);
|
||||
header.getElement().getStyle().setWidth(100, Unit.PCT);
|
||||
header.getElement().getStyle().setZIndex(1337);
|
||||
header.getElement().getStyle().setZIndex(19);
|
||||
return header;
|
||||
}
|
||||
}
|
||||
+9
-6
@@ -909,7 +909,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
if (raceInfoDTO.lastStatus.equals(RaceLogRaceStatus.FINISHED)) {
|
||||
TimePoint protestStartTime = state.getProtestTime();
|
||||
if (protestStartTime != null) {
|
||||
long protestDuration = 90 * 60 * 1000; // 90 min protest duration
|
||||
final Duration protestDuration = Duration.ONE_MINUTE.times(90); // 90 min protest duration; see bug 3089 (make protest time variable)
|
||||
raceInfoDTO.protestFinishTime = protestStartTime.plus(protestDuration).asDate();
|
||||
raceInfoDTO.lastUpperFlag = Flags.BRAVO;
|
||||
raceInfoDTO.lastLowerFlag = Flags.NONE;
|
||||
@@ -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<UUID> leaderboardGroupIds, String officialWebsiteURLString,
|
||||
VenueDTO venue, boolean isPublic, Iterable<UUID> leaderboardGroupIds, String officialWebsiteURLString, String sailorsInfoWebsiteURLString,
|
||||
Iterable<ImageDTO> images, Iterable<VideoDTO> 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<ImageDescriptor> eventImages = convertToImages(images);
|
||||
List<VideoDescriptor> 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<String> courseAreaNames, String officialWebsiteURLAsString, Iterable<ImageDTO> images, Iterable<VideoDTO> videos)
|
||||
boolean isPublic, List<String> courseAreaNames, String officialWebsiteURLAsString, String sailorsInfoWebsiteURLAsString,
|
||||
Iterable<ImageDTO> images, Iterable<VideoDTO> 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<VideoDescriptor> 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());
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -26,6 +26,7 @@ public class EventBaseDTO extends NamedDTO implements IsSerializable {
|
||||
private String description;
|
||||
private List<? extends LeaderboardGroupBaseDTO> leaderboardGroups;
|
||||
private String officialWebsiteURL;
|
||||
private String sailorsInfoWebsiteURL;
|
||||
private List<ImageDTO> images = new ArrayList<>();
|
||||
private List<VideoDTO> 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 <code>http://sapsailing.com</code>. Meant to describe the
|
||||
* base URL that maps to the server instance at which this event can be found, such as
|
||||
|
||||
+9
-3
@@ -49,6 +49,7 @@ public class GetEventViewAction implements Action<EventViewDTO> {
|
||||
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));
|
||||
@@ -101,9 +102,14 @@ public class GetEventViewAction implements Action<EventViewDTO> {
|
||||
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;
|
||||
|
||||
+9
@@ -2,6 +2,7 @@ package com.sap.sailing.gwt.ui.shared.dispatch.event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.sap.sailing.gwt.ui.shared.dispatch.DTO;
|
||||
|
||||
@@ -45,4 +46,12 @@ public class GetMiniLeaderboardDTO implements DTO {
|
||||
public void setLive(boolean live) {
|
||||
this.live = live;
|
||||
}
|
||||
|
||||
public boolean hasDifferentRaceCounts() {
|
||||
HashSet<Integer> uniqueRaceCounts = new HashSet<>();
|
||||
for (MiniLeaderboardItemDTO item : items) {
|
||||
uniqueRaceCounts.add(item.getRaceCount());
|
||||
}
|
||||
return uniqueRaceCounts.size() > 1;
|
||||
}
|
||||
}
|
||||
+9
-1
@@ -9,6 +9,7 @@ import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.RaceColumn;
|
||||
import com.sap.sailing.domain.common.dto.CompetitorDTO;
|
||||
import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
||||
import com.sap.sailing.domain.common.dto.LeaderboardEntryDTO;
|
||||
import com.sap.sailing.domain.common.dto.LeaderboardRowDTO;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
|
||||
@@ -66,7 +67,14 @@ public class LeaderboardContext {
|
||||
for (CompetitorDTO competitor : leaderboardDTO.competitors) {
|
||||
rank++;
|
||||
LeaderboardRowDTO row = leaderboardDTO.rows.get(competitor);
|
||||
int raceCount = row.fieldsByRaceColumnName == null ? 0 : row.fieldsByRaceColumnName.size();
|
||||
int raceCount = 0;
|
||||
if(row.fieldsByRaceColumnName != null) {
|
||||
for(LeaderboardEntryDTO lbEntry : row.fieldsByRaceColumnName.values()) {
|
||||
if(lbEntry.totalPoints != null) {
|
||||
raceCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
result.addItem(new MiniLeaderboardItemDTO(new SimpleCompetitorDTO(competitor), rank, row.totalPoints, raceCount));
|
||||
if (limit > 0 && rank >= limit) break;
|
||||
}
|
||||
|
||||
+5
-5
@@ -26,7 +26,7 @@ public class EventViewDTO extends EventMetadataDTO implements Result, HasLogo {
|
||||
private String seriesName;
|
||||
private ImageDTO logoImage;
|
||||
private String officialWebsiteURL;
|
||||
private String sailorsInfoURL;
|
||||
private String sailorsInfoWebsiteURL;
|
||||
|
||||
public EventViewDTO() {
|
||||
}
|
||||
@@ -108,12 +108,12 @@ public class EventViewDTO extends EventMetadataDTO implements Result, HasLogo {
|
||||
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;
|
||||
}
|
||||
|
||||
public String getLocationAndVenueAndCountry() {
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
+5
-1
@@ -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<LeaderboardGroup> lgIter = loadedEvent.getLeaderboardGroups().iterator();
|
||||
assertSame(lg1, lgIter.next());
|
||||
|
||||
+11
-6
@@ -25,6 +25,7 @@ import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogCourseAr
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogCourseDesignChangedEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogDefineMarkEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogDenoteForTrackingEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogDependentStartTimeEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogDeviceCompetitorMappingEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogDeviceMarkMappingEventSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.racelog.impl.RaceLogEndOfTrackingEventSerializer;
|
||||
@@ -61,6 +62,7 @@ public class RaceLogEventDeserializer implements JsonDeserializer<RaceLogEvent>
|
||||
return new RaceLogEventDeserializer(
|
||||
new RaceLogFlagEventDeserializer(competitorDeserializer),
|
||||
new RaceLogStartTimeEventDeserializer(competitorDeserializer),
|
||||
new RaceLogDependentStartTimeEventDeserializer(competitorDeserializer),
|
||||
new RaceLogRaceStatusEventDeserializer(competitorDeserializer),
|
||||
new RaceLogCourseAreaChangedEventDeserializer(competitorDeserializer),
|
||||
new RaceLogCourseDesignChangedEventDeserializer(competitorDeserializer,
|
||||
@@ -89,12 +91,12 @@ public class RaceLogEventDeserializer implements JsonDeserializer<RaceLogEvent>
|
||||
new RaceLogAdditionalScoringInformationEventDeserializer(competitorDeserializer),
|
||||
new RaceLogFixedMarkPassingEventDeserializer(competitorDeserializer),
|
||||
new RaceLogSuppressedMarkPassingsEventDeserializer(competitorDeserializer),
|
||||
new RaceLogStartOfTrackingEventDeserializer(competitorDeserializer),
|
||||
new RaceLogEndOfTrackingEventDeserializer(competitorDeserializer));
|
||||
new RaceLogStartOfTrackingEventDeserializer(competitorDeserializer), new RaceLogEndOfTrackingEventDeserializer(competitorDeserializer));
|
||||
}
|
||||
|
||||
protected final JsonDeserializer<RaceLogEvent> flagEventDeserializer;
|
||||
protected final JsonDeserializer<RaceLogEvent> startTimeEventDeserializer;
|
||||
protected final JsonDeserializer<RaceLogEvent> dependentStartTimeEventDeserializer;
|
||||
protected final JsonDeserializer<RaceLogEvent> raceStatusEventDeserializer;
|
||||
protected final JsonDeserializer<RaceLogEvent> courseAreaChangedEventDeserializer;
|
||||
protected final JsonDeserializer<RaceLogEvent> courseDesignChangedEventDeserializer;
|
||||
@@ -122,6 +124,7 @@ public class RaceLogEventDeserializer implements JsonDeserializer<RaceLogEvent>
|
||||
|
||||
public RaceLogEventDeserializer(JsonDeserializer<RaceLogEvent> flagEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> startTimeEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> dependentStartTimeEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> raceStatusEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> courseAreaChangedEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> courseDesignChangedEventDeserializer,
|
||||
@@ -140,14 +143,14 @@ public class RaceLogEventDeserializer implements JsonDeserializer<RaceLogEvent>
|
||||
JsonDeserializer<RaceLogEvent> revokeEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> registerCompetitorEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> defineMarkEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> closeOpenEndedDeviceMappingEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> additionalScoringInformationEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> closeOpenEndedDeviceMappingEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> additionalScoringInformationEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> fixedMarkPassingEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> suppressedMarkPassingsEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> startOfTrackingEventDeserializer,
|
||||
JsonDeserializer<RaceLogEvent> endOfTrackingEventDeserializer) {
|
||||
JsonDeserializer<RaceLogEvent> startOfTrackingEventDeserializer, JsonDeserializer<RaceLogEvent> endOfTrackingEventDeserializer) {
|
||||
this.flagEventDeserializer = flagEventDeserializer;
|
||||
this.startTimeEventDeserializer = startTimeEventDeserializer;
|
||||
this.dependentStartTimeEventDeserializer = dependentStartTimeEventDeserializer;
|
||||
this.raceStatusEventDeserializer = raceStatusEventDeserializer;
|
||||
this.courseAreaChangedEventDeserializer = courseAreaChangedEventDeserializer;
|
||||
this.courseDesignChangedEventDeserializer = courseDesignChangedEventDeserializer;
|
||||
@@ -181,6 +184,8 @@ public class RaceLogEventDeserializer implements JsonDeserializer<RaceLogEvent>
|
||||
return flagEventDeserializer;
|
||||
} else if (type.equals(RaceLogStartTimeEventSerializer.VALUE_CLASS)) {
|
||||
return startTimeEventDeserializer;
|
||||
} else if (type.equals(RaceLogDependentStartTimeEventSerializer.VALUE_CLASS)) {
|
||||
return dependentStartTimeEventDeserializer;
|
||||
} else if (type.equals(RaceLogRaceStatusEventSerializer.VALUE_CLASS)) {
|
||||
return raceStatusEventDeserializer;
|
||||
} else if (type.equals(RaceLogPassChangeEventSerializer.VALUE_CLASS)) {
|
||||
|
||||
+2
@@ -29,6 +29,7 @@ public class EventBaseJsonSerializer implements JsonSerializer<EventBase> {
|
||||
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<EventBase> {
|
||||
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()));
|
||||
|
||||
+3
-1
@@ -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<RaceLogEvent> {
|
||||
public class RaceLogDependentStartTimeEventSerializer extends RaceLogRaceStatusEventSerializer implements JsonSerializer<RaceLogEvent> {
|
||||
|
||||
public RaceLogDependentStartTimeEventSerializer(JsonSerializer<Competitor> 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;
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -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);
|
||||
|
||||
+4
-4
@@ -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.<ImageDescriptor> emptyList(),
|
||||
/* videos */Collections.<VideoDescriptor> emptyList());
|
||||
/* officialWebsiteURL */ null, /* sailorsInfoWebsiteURL */ null,
|
||||
/* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> 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.<ImageDescriptor> emptyList(),
|
||||
/* videos */Collections.<VideoDescriptor> emptyList());
|
||||
/* officialWebsiteURL */ null, /* sailorsInfoWebsiteURL */ null,
|
||||
/* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> emptyList());
|
||||
CourseArea defaultCourseArea = sourceService.addCourseArea(event.getId(), "ECHO", UUID.randomUUID());
|
||||
|
||||
List<String> raceColumnNames = new ArrayList<String>();
|
||||
|
||||
+3
-2
@@ -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.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> emptyList()));
|
||||
"Kiel", true, UUID.randomUUID(), /* officialWebsiteURLAsString */ null, /* sailorsInfoWebsiteURLAsString */ null,
|
||||
/* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> 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.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> emptyList()));
|
||||
flensburg = aalEvent.getVenue();
|
||||
final CourseAreaImpl flensburgStandard = new CourseAreaImpl("Standard", UUID.randomUUID());
|
||||
|
||||
@@ -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<UUID> leaderboardGroupIds, URL officialWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos);
|
||||
|
||||
/**
|
||||
@@ -467,7 +467,7 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
ConcurrentHashMap<String, Regatta> getPersistentRegattasForRaceIDs();
|
||||
|
||||
Event createEventWithoutReplication(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate, String venue,
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, Iterable<ImageDescriptor> images,
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable<ImageDescriptor> images,
|
||||
Iterable<VideoDescriptor> videos);
|
||||
|
||||
void setRegattaForRace(Regatta regatta, String raceIdAsString);
|
||||
|
||||
+8
-6
@@ -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.<ImageDescriptor> emptyList(),
|
||||
/* videos */Collections.<VideoDescriptor> emptyList());
|
||||
id, /* officialWebsiteURL */null, /* sailorsInfoWebsiteURLAsString */null,
|
||||
/* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> emptyList());
|
||||
replicate(new CreateEvent(eventName, eventDescription, startDate, endDate, venue, isPublic, id,
|
||||
/* officialWebsiteURLAsString */null, /* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> emptyList()));
|
||||
/* officialWebsiteURLAsString */null, /* sailorsInfoWebsiteURLAsString */null,
|
||||
/* images */Collections.<ImageDescriptor> emptyList(), /* videos */Collections.<VideoDescriptor> 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<ImageDescriptor> images,
|
||||
Iterable<VideoDescriptor> videos) {
|
||||
TimePoint endDate, String venue, boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> 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<UUID> leaderboardGroupIds, URL officialWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> 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
|
||||
|
||||
+4
-2
@@ -28,9 +28,10 @@ public class CreateEvent extends AbstractEventOperation<Event> {
|
||||
private final Iterable<ImageDescriptor> images;
|
||||
private final Iterable<VideoDescriptor> 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<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
boolean isPublic, UUID id, URL officialWebsiteURL, URL sailorsInfoWebsiteURL, Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
super(id);
|
||||
this.eventName = eventName;
|
||||
this.eventDescription = eventDescription;
|
||||
@@ -39,6 +40,7 @@ public class CreateEvent extends AbstractEventOperation<Event> {
|
||||
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<Event> {
|
||||
@Override
|
||||
public Event internalApplyTo(RacingEventService toState) {
|
||||
return toState.createEventWithoutReplication(getEventName(), eventDescription, startDate, endDate, venue, isPublic,
|
||||
getId(), officialWebsiteURL, images, videos);
|
||||
getId(), officialWebsiteURL, sailorsInfoWebsiteURL, images, videos);
|
||||
}
|
||||
|
||||
}
|
||||
+4
-2
@@ -19,11 +19,12 @@ public class UpdateEvent extends AbstractEventOperation<Void> {
|
||||
private final String eventName;
|
||||
private final String eventDescription;
|
||||
private final URL officialWebsiteURL;
|
||||
private final URL sailorsInfoWebsiteURL;
|
||||
private final Iterable<ImageDescriptor> images;
|
||||
private final Iterable<VideoDescriptor> videos;
|
||||
|
||||
public UpdateEvent(UUID id, String eventName, String eventDescription, TimePoint startDate, TimePoint endDate,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL,
|
||||
String venueName, boolean isPublic, Iterable<UUID> leaderboardGroupIds, URL officialWebsiteURL, URL sailorsInfoWebsiteURL,
|
||||
Iterable<ImageDescriptor> images, Iterable<VideoDescriptor> videos) {
|
||||
super(id);
|
||||
this.eventName = eventName;
|
||||
@@ -34,6 +35,7 @@ public class UpdateEvent extends AbstractEventOperation<Void> {
|
||||
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<Void> {
|
||||
@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;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user