Merge branch 'master' into ubilabs--tracking_app--bug_2678_create_leaderboard_servlet_constants
@@ -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]]
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.sap.sailing.domain.common.impl.MeterDistance;
|
||||
|
||||
|
||||
public enum BoatClassMasterdata {
|
||||
_18Footer ("18Footer", true, 8.90, 2.00, BoatHullType.MONOHULL, true, "18.Footer", "18ft", "18ft Skiff"),
|
||||
_2_4M ("2.4 Meter", true, 4.11, 0.81, BoatHullType.MONOHULL, false, "2.4M", "2.4mR", "2.4 Metre", "2.4-metre"),
|
||||
_5O5 ("5O5", true, 5.03, 1.88, BoatHullType.MONOHULL, true, "505", "5o5", "505er", "5o5er"),
|
||||
_12M ("12 Meter", true, 5.97, 1.43, BoatHullType.MONOHULL, true, "12M", "12mR", "12SQM", "12-metre", "12 metre"),
|
||||
@@ -16,7 +17,10 @@ public enum BoatClassMasterdata {
|
||||
A_CAT ("A-Catamaran", true, 5.49, 2.30, BoatHullType.CATAMARAN, false, "A-Cat", "ACat", "A-Class Catamaran"),
|
||||
ALBIN_EXPRESS ("Albin Express", true, 7.77, 2.50, BoatHullType.MONOHULL, false),
|
||||
ALBIN_BALLAD ("Albin Ballad", true, 9.12, 2.95, BoatHullType.MONOHULL, false),
|
||||
CANOE_IC ("International Canoe", true, 5.20, 1.01, BoatHullType.MONOHULL, true, "Canoe IC", "Canoe-IC", "IC", "Kanu IC", "International Canoe", "International 10 Sq.m. Sailing Canoe"),
|
||||
CANOE_TAIFUN ("Canoe Taifun", true, 5.20, 1.32, BoatHullType.MONOHULL, false, "Taifun", "Taifun Kanu", "Kanu Taifun"),
|
||||
B_ONE ("B/ONE", true, 7.80, 2.49, BoatHullType.MONOHULL, true, "B-ONE"),
|
||||
D_ONE ("D-One", true, 4.23, 2.31, BoatHullType.MONOHULL, true, "Devoti D-One", "DOne", "D_One"),
|
||||
DRAGON_INT ("Dragon Int.", true, 8.89, 1.96, BoatHullType.MONOHULL, true, "Drachen", "Dragon"),
|
||||
EXTREME_40 ("Extreme 40", false, 12.2, 6.60, BoatHullType.CATAMARAN, true, "Extreme-40", "Extreme40", "ESS40"),
|
||||
D_35 ("D35", false, 10.81, 6.89, BoatHullType.CATAMARAN, false),
|
||||
@@ -25,16 +29,21 @@ public enum BoatClassMasterdata {
|
||||
F_18 ("Formula 18", true, 6.85, 2.25, BoatHullType.CATAMARAN, true, "F18", "F-18"),
|
||||
FARR_30 ("Farr 30", true, 9.42, 3.08, BoatHullType.MONOHULL, true, "F30", "F-30", "Farr-30"),
|
||||
FINN ("Finn", true, 4.50, 1.51, BoatHullType.MONOHULL, false),
|
||||
FLYING_PHANTOM ("Flying Phantom", true, 5.52, 3.00, BoatHullType.CATAMARAN, true),
|
||||
FOLKBOAT ("Folkboat", true, 7.68, 2.20, BoatHullType.MONOHULL, false, "Folke", "Folkeboot"),
|
||||
FUN ("FUN", true, 7.20, 2.45, BoatHullType.MONOHULL, true, "FUN O.D.", "FUN OD"),
|
||||
F_16 ("Formula 16", true, 5.00, 2.50, BoatHullType.CATAMARAN, true, "F16", "F-16"),
|
||||
HOBIE_16 ("Hobie 16", true, 5.05, 2.41, BoatHullType.CATAMARAN, false, "H16"),
|
||||
H_BOAT ("H-Boat", true, 8.28, 2.18, BoatHullType.MONOHULL, true, "HB"),
|
||||
HOBIE_TIGER ("Hobie Tiger", true, 5.51, 2.60, BoatHullType.CATAMARAN, true),
|
||||
HOBIE_WILD_CAT ("Hobie Wild Cat", true, 5.49, 2.59, BoatHullType.CATAMARAN, true, "Hobie Wild Cat F18"),
|
||||
J22 ("J/22", true, 6.86, 2.44, BoatHullType.MONOHULL, true, "J22", "J-22"),
|
||||
J24 ("J/24", true, 7.32, 2.67, BoatHullType.MONOHULL, true, "J24", "J-24"),
|
||||
J70 ("J/70", true, 6.93, 2.25, BoatHullType.MONOHULL, true, "J70", "J-70"),
|
||||
J80 ("J/80", true, 8.0, 2.51, BoatHullType.MONOHULL, true, "J80", "J-80"),
|
||||
J24 ("J/24", true, 7.32, 2.67, BoatHullType.MONOHULL, true, "J24", "J-24"),
|
||||
KIELZUGVOGEL ("Kielzugvogel", true, 5.80, 1.88, BoatHullType.MONOHULL, false),
|
||||
KITE ("Kite", true, 3.35, 1.52, BoatHullType.MONOHULL, false),
|
||||
LASER_2 ("Laser 2", true, 4.39, 1.42, BoatHullType.MONOHULL, false, "Laser II", "Laser2", "Laser-2", "Laser-II"),
|
||||
LASER_4_7 ("Laser 4.7", true, 4.20, 1.39, BoatHullType.MONOHULL, false, "L4.7"),
|
||||
LASER_RADIAL ("Laser Radial", true, 4.19, 1.41, BoatHullType.MONOHULL, false, "LAR", "Laser RAD", "RAD", "Radial"),
|
||||
LASER_INT ("Laser Int.", true, 4.19, 1.39, BoatHullType.MONOHULL, false, "Laser", "LSR"),
|
||||
@@ -43,22 +52,25 @@ public enum BoatClassMasterdata {
|
||||
MINI_TRANSAT ("Mini Transat 6.50", true, 6.50, 3.00, BoatHullType.MONOHULL, true, "Mini Transat"),
|
||||
MUSTO_SKIFF ("Musto Skiff", true, 4.55, 1.35, BoatHullType.MONOHULL, true, "Musto Performance Skiff", "MPS", "Musto"),
|
||||
NACRA_17 ("Nacra 17", true, 5.25, 2.59, BoatHullType.CATAMARAN, true, "N17", "Nacra-17"),
|
||||
O_JOLLE ("O-Jolle", true, 5.00, 1.66, BoatHullType.MONOHULL, false, "O Jolle", "OJolle", "Olympiajolle"),
|
||||
OK ("OK Dinghy", true, 5.25, 2.59, BoatHullType.MONOHULL, false, "OK-Dinghy", "OK-Jolle", "OK"),
|
||||
OPTIMIST ("Optimist", true, 2.34, 1.07, BoatHullType.MONOHULL, false, "Opti", "Optimist Dinghy"),
|
||||
PIRATE ("Pirate", true, 5.00, 1.61, BoatHullType.MONOHULL, false, "Pirat", "Piraten"),
|
||||
PLATU_25 ("Platu 25", true, 7.53, 2.62, BoatHullType.MONOHULL, true, "Platu", "Platu-25", "PLA", "B25"),
|
||||
RS_X ("RS:X", true, 2.86, 0.93, BoatHullType.SURFERBOARD, false, "RS-X", "RSX", "RS:X"),
|
||||
RS_FEVA ("RS Feva", true, 3.64, 1.42, BoatHullType.MONOHULL, true, "RSFeva"),
|
||||
SONAR ("Sonar", true, 7.01, 2.39, BoatHullType.MONOHULL, true),
|
||||
STAR ("Star", true, 6.92, 1.74, BoatHullType.MONOHULL, false, "STR"),
|
||||
STREAMLINE ("Streamline", true, 7.15, 2.55, BoatHullType.MONOHULL, true),
|
||||
SWAN_45 ("Swan 45", true, 13.83, 3.91, BoatHullType.MONOHULL, true, "Swan", "Swan-45"),
|
||||
TORNADO ("Tornado Catamaran", true, 6.10, 3.02, BoatHullType.CATAMARAN, true, "Tornado", "Tornado Cat"),
|
||||
TRIAS ("Trias", true, 9.20, 2.12, BoatHullType.MONOHULL, true),
|
||||
X_99 ("X-99", true, 9.96, 2.95, BoatHullType.MONOHULL, true, "X99"),
|
||||
CONTENDER ("Contender", true, 4.88, 1.42, BoatHullType.MONOHULL, false),
|
||||
RC44 ("RC44", true, 13.35, 2.75, BoatHullType.MONOHULL, true),
|
||||
FLYING_DUTCHMAN ("Flying Dutchman", true, 6.10, 1.80, BoatHullType.MONOHULL, true),
|
||||
DYAS("Dyas", true, 7.15, 1.95, BoatHullType.MONOHULL, true),
|
||||
INTERNATIONAL_14("International 14", true, 4.27, 1.83, BoatHullType.MONOHULL, true, "I14"),
|
||||
INTERNATIONAL_14("International 14", true, 4.27, 1.83, BoatHullType.MONOHULL, true, "I14", "Int.14", "Int14"),
|
||||
OPEN_BIC("O'pen BIC", true, 2.75, 1.14, BoatHullType.MONOHULL, false, "OpenBIC"),
|
||||
|
||||
// multi-class "boat classes"; to be replaced at some later point in time by something like a RegattaClass
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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();
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class DirectGapCalculationVersusOneDesignRankingMetricTest extends Abstra
|
||||
ReceiverType.MARKPOSITIONS, ReceiverType.RACECOURSE, ReceiverType.RAWPOSITIONS });
|
||||
getTrackedRace().recordWind(
|
||||
new WindImpl(/* position */null, new MillisecondsTimePoint(dateFormat.parse("06/21/2014-13:03:35")),
|
||||
new KnotSpeedWithBearingImpl(18, new DegreeBearingImpl(296))),
|
||||
new KnotSpeedWithBearingImpl(18, new DegreeBearingImpl(90))),
|
||||
new WindSourceImpl(WindSourceType.WEB));
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,6 +25,7 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.ORC_INTERNATIONAL.getDisplayName(), imageResources.ORCIcon());
|
||||
|
||||
boatClassIconsMap.put(BoatClassMasterdata._12M.getDisplayName(), imageResources._12mRIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._18Footer.getDisplayName(), imageResources._18FooterIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._2_4M.getDisplayName(), imageResources._2_4mIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._29ER.getDisplayName(), imageResources._29erIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._420.getDisplayName(), imageResources._420Icon());
|
||||
@@ -35,10 +36,13 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.A_CAT.getDisplayName(), imageResources.A_CatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.ALBIN_EXPRESS.getDisplayName(), imageResources.AlbinExpressIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.B_ONE.getDisplayName(), imageResources.BOne());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.CANOE_IC.getDisplayName(), imageResources.CanoeICIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.CANOE_TAIFUN.getDisplayName(), imageResources.CanoeTaifunIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.CONTENDER.getDisplayName(), imageResources.ContenderIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.DRAGON_INT.getDisplayName(), imageResources.DragonIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.EUROPE_INT.getDisplayName(), imageResources.EuropeIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.EXTREME_40.getDisplayName(), imageResources.Extreme40Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.D_ONE.getDisplayName(), imageResources.DOneIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.D_35.getDisplayName(), imageResources.D35Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.F_16.getDisplayName(), imageResources.F16Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.F_18.getDisplayName(), imageResources.F18Icon());
|
||||
@@ -46,13 +50,17 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.FINN.getDisplayName(), imageResources.FinnIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.FLYING_DUTCHMAN.getDisplayName(), imageResources.FlyingDutchmanIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.FOLKBOAT.getDisplayName(), imageResources.FolkBoatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.FUN.getDisplayName(), imageResources.FUNIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.H_BOAT.getDisplayName(), imageResources.H_BoatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.HOBIE_16.getDisplayName(), imageResources.HobieIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.HOBIE_TIGER.getDisplayName(), imageResources.HobieIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.HOBIE_WILD_CAT.getDisplayName(), imageResources.HobieIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.J22.getDisplayName(), imageResources.J22Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.J24.getDisplayName(), imageResources.J24Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.J70.getDisplayName(), imageResources.J70Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.J80.getDisplayName(), imageResources.J80Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.KIELZUGVOGEL.getDisplayName(), imageResources.KielzugvogelIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.LASER_2.getDisplayName(), imageResources.Laser2Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.LASER_SB3.getDisplayName(), imageResources.LaserSB3Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.LASER_INT.getDisplayName(), imageResources.LaserIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.LASER_4_7.getDisplayName(), imageResources.LaserIcon());
|
||||
@@ -61,6 +69,7 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.MINI_TRANSAT.getDisplayName(), imageResources.MiniTransatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.MUSTO_SKIFF.getDisplayName(), imageResources.MustoSkiffIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.NACRA_17.getDisplayName(), imageResources.Nacra17Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.O_JOLLE.getDisplayName(), imageResources.OJolleIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.OK.getDisplayName(), imageResources.OKIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.OPTIMIST.getDisplayName(), imageResources.OptimistIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.PIRATE.getDisplayName(), imageResources.PiratIcon());
|
||||
@@ -71,6 +80,7 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.STREAMLINE.getDisplayName(), imageResources.StreamlineIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SWAN_45.getDisplayName(), imageResources.Swan45Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.TORNADO.getDisplayName(), imageResources.TornadoIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.TRIAS.getDisplayName(), imageResources.TriasIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.X_99.getDisplayName(), imageResources.X99Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.INTERNATIONAL_14.getDisplayName(), imageResources.International14Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.DYAS.getDisplayName(), imageResources.DyasIcon());
|
||||
|
||||
@@ -13,6 +13,9 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/12MR.png")
|
||||
ImageResource _12mRIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/18Footer.png")
|
||||
ImageResource _18FooterIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/2_4M.png")
|
||||
ImageResource _2_4mIcon();
|
||||
|
||||
@@ -25,7 +28,7 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/470.png")
|
||||
ImageResource _470Icon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.jpg")
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER_FX.png")
|
||||
ImageResource _49erFXIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/49ER.png")
|
||||
@@ -43,6 +46,12 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/B_ONE.png")
|
||||
ImageResource BOne();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_IC.png")
|
||||
ImageResource CanoeICIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/CANOE_TAIFUN.png")
|
||||
ImageResource CanoeTaifunIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/CONTENDER.png")
|
||||
ImageResource ContenderIcon();
|
||||
|
||||
@@ -76,12 +85,18 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/FOLKBOAT.png")
|
||||
ImageResource FolkBoatIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/FUN.png")
|
||||
ImageResource FUNIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/H_BOAT.png")
|
||||
ImageResource H_BoatIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/HOBIE.png")
|
||||
ImageResource HobieIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/J22.png")
|
||||
ImageResource J22Icon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/J24.png")
|
||||
ImageResource J24Icon();
|
||||
|
||||
@@ -91,6 +106,9 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/J80.png")
|
||||
ImageResource J80Icon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/LASER2.png")
|
||||
ImageResource Laser2Icon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/LASER_SB3.png")
|
||||
ImageResource LaserSB3Icon();
|
||||
|
||||
@@ -157,4 +175,16 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/ORC.png")
|
||||
ImageResource ORCIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/KIELZUGVOGEL.png")
|
||||
ImageResource KielzugvogelIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/TRIAS.png")
|
||||
ImageResource TriasIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/O_JOLLE.png")
|
||||
ImageResource OJolleIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/D_ONE.png")
|
||||
ImageResource DOneIcon();
|
||||
|
||||
}
|
||||
|
||||
@@ -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 />"));
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}) {
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,6 +52,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));
|
||||
@@ -118,9 +119,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;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class EventViewDTO extends EventMetadataDTO implements Result {
|
||||
private String seriesName;
|
||||
private ImageDTO logoImage;
|
||||
private String officialWebsiteURL;
|
||||
private String sailorsInfoURL;
|
||||
private String sailorsInfoWebsiteURL;
|
||||
|
||||
public EventViewDTO() {
|
||||
}
|
||||
@@ -105,11 +105,11 @@ public class EventViewDTO extends EventMetadataDTO implements Result {
|
||||
return officialWebsiteURL;
|
||||
}
|
||||
|
||||
public String getSailorsInfoURL() {
|
||||
return sailorsInfoURL;
|
||||
public String getSailorsInfoWebsiteURL() {
|
||||
return sailorsInfoWebsiteURL;
|
||||
}
|
||||
|
||||
public void setSailorsInfoURL(String sailorsInfoURL) {
|
||||
this.sailorsInfoURL = sailorsInfoURL;
|
||||
public void setSailorsInfoWebsiteURL(String sailorsInfoWebsiteURL) {
|
||||
this.sailorsInfoWebsiteURL = sailorsInfoWebsiteURL;
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
@@ -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());
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||