Merge remote-tracking branch 'origin/master' into bug2200

Conflicts:
	java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/client/app/AbstractApplicationClientFactory.java
This commit is contained in:
fmittag committed 2014-11-02 14:36:17 +01:00
commit 2c90379334
373 files changed
+12368 -1115

No files matched your search

+1
View File
@@ -2,3 +2,4 @@ build.log
gwt-unitCache
bin/
log
**/*.orig
@@ -9,12 +9,12 @@ Bundle-ActivationPolicy: lazy
Export-Package: com.sap.sailing.autoload
Import-Package: org.json.simple,
org.json.simple.parser,
org.osgi.framework;version="1.7.0"
org.osgi.framework;version="1.7.0",
org.osgi.util.tracker;version="1.5.1"
Require-Bundle: com.sap.sailing.gwt.ui;bundle-version="1.0.0",
com.sap.sse.common;bundle-version="1.0.0",
com.sap.sailing.domain.shared.android;bundle-version="1.0.0",
com.sap.sailing.domain.tractracadapter,
org.eclipse.osgi,
com.sap.sailing.server,
com.sap.sailing.domain;bundle-version="1.0.0",
com.sap.sailing.domain.common,
@@ -1 +1,3 @@
/bin
/bin
/bin/
/bin/
@@ -1 +1,2 @@
/bin
/bin
/bin/
+3 -1
View File
@@ -1 +1,3 @@
/bin
/bin
/bin/
/bin/
@@ -0,0 +1 @@
/bin/
@@ -0,0 +1 @@
/bin/
@@ -8,8 +8,9 @@ import com.sap.sailing.mongodb.MongoDBService;
public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
for (CollectionNames name : CollectionNames.values())
for (CollectionNames name : CollectionNames.values()) {
MongoDBService.INSTANCE.registerExclusively(CollectionNames.class, name.name());
}
}
@Override
@@ -15,6 +15,8 @@ import com.sap.sailing.domain.igtimiadapter.impl.Activator;
public class AbstractTestWithIgtimiConnection {
protected IgtimiConnection connection;
@Rule public Timeout AbstractTestWithIgtimiConnectionTimeout = new Timeout(2 * 60 * 1000);
@Rule public Timeout AbstractTracTracLiveTestTimeout = new Timeout(2 * 60 * 1000);
@Before
@@ -8,8 +8,9 @@ import com.sap.sailing.mongodb.MongoDBService;
public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
for (CollectionNames name : CollectionNames.values())
for (CollectionNames name : CollectionNames.values()) {
MongoDBService.INSTANCE.registerExclusively(CollectionNames.class, name.name());
}
}
@Override
@@ -1408,7 +1408,11 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
Serializable id, Integer passId, List<Competitor> competitors, DBObject dbObject) {
Serializable revokedEventId = Helpers.tryUuidConversion(
(Serializable) dbObject.get(FieldNames.RACE_LOG_REVOKED_EVENT_ID.name()));
return raceLogEventFactory.createRevokeEvent(createdAt, author, logicalTimePoint, id, passId, revokedEventId);
String revokedEventType = (String) dbObject.get(FieldNames.RACE_LOG_REVOKED_EVENT_TYPE.name());
String revokedEventShortInfo = (String) dbObject.get(FieldNames.RACE_LOG_REVOKED_EVENT_SHORT_INFO.name());
String reason = (String) dbObject.get(FieldNames.RACE_LOG_REVOKED_REASON.name());
return raceLogEventFactory.createRevokeEvent(createdAt, author, logicalTimePoint, id, passId,
revokedEventId, revokedEventType, revokedEventShortInfo, reason);
}
private RaceLogEvent loadRaceLogRegisterCompetitorEvent(TimePoint createdAt, RaceLogEventAuthor author, TimePoint logicalTimePoint,
@@ -85,7 +85,8 @@ public enum FieldNames {
WAYPOINT_PASSINGINSTRUCTIONS, CONTROLPOINT, CONTROLPOINT_CLASS, MARK_ID, MARK_COLOR, MARK_NAME, MARK_PATTERN, MARK_SHAPE, MARK_TYPE,
CONTROLPOINT_VALUE, CONTROLPOINTWITHTWOMARKS_ID, CONTROLPOINTWITHTWOMARKS_NAME, CONTROLPOINTWITHTWOMARKS_LEFT, CONTROLPOINTWITHTWOMARKS_RIGHT,
RACE_LOG_POSITIONED_COMPETITORS, RACE_LOG_PATHFINDER_ID, RACE_LOG_GATE_LINE_OPENING_TIME, RACE_LOG_GOLF_DOWN_TIME, RACE_LOG_START_PROCEDURE_TYPE,
RACE_LOG_PROTEST_START_TIME, RACE_LOG_COURSE_DESIGN_NAME, RACE_LOG_REVOKED_EVENT_ID, RACE_LOG_FROM, RACE_LOG_TO, RACE_LOG_MARK, RACE_LOG_DEVICE_MAPPING_EVENT_ID,
RACE_LOG_PROTEST_START_TIME, RACE_LOG_COURSE_DESIGN_NAME, RACE_LOG_REVOKED_EVENT_ID, RACE_LOG_REVOKED_EVENT_TYPE, RACE_LOG_REVOKED_EVENT_SHORT_INFO,
RACE_LOG_REVOKED_REASON, RACE_LOG_FROM, RACE_LOG_TO, RACE_LOG_MARK, RACE_LOG_DEVICE_MAPPING_EVENT_ID,
RACE_LOG_CLOSING_TIMEPOINT, MARK,
/** @deprecated Replaced by WAYPOINT_PASSINGINSTRUCTIONS, still used to migrate old races*/ @Deprecated WAYPOINT_PASSINGSIDE,
/** @deprecated Replaced by CONTROLPOINTWITHTWOMARKS_ID, still used to migrate old races*/ @Deprecated GATE_ID,
@@ -947,7 +947,10 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
DBObject result = new BasicDBObject();
storeRaceLogEventProperties(event, result);
result.put(FieldNames.RACE_LOG_EVENT_CLASS.name(), RevokeEvent.class.getSimpleName());
result.put(FieldNames.RACE_LOG_REVOKED_EVENT_ID.name(), event.getRevokedEventId());
result.put(FieldNames.RACE_LOG_REVOKED_EVENT_ID.name(), event.getRevokedEventId());
result.put(FieldNames.RACE_LOG_REVOKED_EVENT_TYPE.name(), event.getRevokedEventType());
result.put(FieldNames.RACE_LOG_REVOKED_EVENT_SHORT_INFO.name(), event.getRevokedEventShortInfo());
result.put(FieldNames.RACE_LOG_REVOKED_REASON.name(), event.getReason());
return result;
}
@@ -1 +1,2 @@
bin
/bin/
@@ -0,0 +1,2 @@
/bin/
/bin/
@@ -1 +1,4 @@
bin
/bin/
/bin/
/bin/
@@ -14,7 +14,8 @@ public class RevokeEventTest extends AbstractRaceLogTrackingTest {
@Test
public void revokedEventIsExcluded() {
RaceLogEvent event = factory.createDeviceCompetitorMappingEvent(now, author, now, UUID.randomUUID(), null, null, 0, null, null);
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author, now.plus(1), UUID.randomUUID(), 0, event.getId());
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author, now.plus(1), UUID.randomUUID(), 0, event.getId(),
null, null, null);
log.add(event);
log.add(revokeEvent);
@@ -27,7 +28,8 @@ public class RevokeEventTest extends AbstractRaceLogTrackingTest {
@Test
public void eventRevokedByAuthorWithLowerPrioIsNotExcluded() {
RaceLogEvent event = factory.createDeviceCompetitorMappingEvent(now, author, now, UUID.randomUUID(), null, null, 0, null, null);
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author1, now.plus(1), UUID.randomUUID(), 0, event.getId());
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author1, now.plus(1), UUID.randomUUID(), 0, event.getId(),
null, null, null);
log.add(event);
log.add(revokeEvent);
@@ -40,8 +42,10 @@ public class RevokeEventTest extends AbstractRaceLogTrackingTest {
@Test
public void revokingRevokeEventIsNotHarmful() {
RaceLogEvent event = factory.createDeviceCompetitorMappingEvent(now, author, now, UUID.randomUUID(), null, null, 0, null, null);
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author, now.plus(1), UUID.randomUUID(), 0, event.getId());
RevokeEvent revokeEvent2 = factory.createRevokeEvent(now.plus(2), author, now.plus(2), UUID.randomUUID(), 2, revokeEvent.getId());
RevokeEvent revokeEvent = factory.createRevokeEvent(now.plus(1), author, now.plus(1), UUID.randomUUID(), 0, event.getId(),
null, null, null);
RevokeEvent revokeEvent2 = factory.createRevokeEvent(now.plus(2), author, now.plus(2), UUID.randomUUID(), 2, revokeEvent.getId(),
null, null, null);
log.add(event);
log.add(revokeEvent);
@@ -128,6 +128,7 @@ public interface RaceLog extends Track<RaceLogEvent>, WithID {
*
* @param author The author for the {@code RevokeEvent}.
*/
RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke, String reason) throws NotRevokableException;
RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke) throws NotRevokableException;
/**
@@ -111,7 +111,8 @@ public interface RaceLogEventFactory {
StartTrackingEvent createStartTrackingEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId);
RevokeEvent createRevokeEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId, Serializable revokedEventId);
RevokeEvent createRevokeEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId, Serializable revokedEventId,
String revokedEventType, String revokedEventShortInfo, String reason);
RegisterCompetitorEvent createRegisterCompetitorEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId, Competitor competitor);
@@ -82,7 +82,8 @@ public interface RaceLogEventRestoreFactory extends RaceLogEventFactory {
TimePoint logicalTimePoint, Serializable pId, int passId);
RevokeEvent createRevokeEvent(TimePoint createdAt, RaceLogEventAuthor author,
TimePoint logicalTimePoint, Serializable pId, int passId, Serializable revokedEventId);
TimePoint logicalTimePoint, Serializable pId, int passId, Serializable revokedEventId,
String revokedEventType, String revokedEventShortInfo, String reason);
RegisterCompetitorEvent createRegisterCompetitorEvent(TimePoint createdAt, RaceLogEventAuthor author,
TimePoint logicalTimePoint, Serializable pId, int passId, Competitor competitor);
@@ -11,4 +11,19 @@ import java.io.Serializable;
*/
public interface RevokeEvent extends RaceLogEvent {
Serializable getRevokedEventId();
/**
* Short info of the revoked event, automatically added by {@link RaceLog#revokeEvent}.
*/
String getRevokedEventShortInfo();
/**
* Optional reason for revocation of event.
*/
String getReason();
/**
* {@link Class#getSimpleName() Simple class name} of the revoked event.
*/
String getRevokedEventType();
}
@@ -238,4 +238,10 @@ public class NoAddingRaceLogWrapper implements RaceLog {
public RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke) throws NotRevokableException {
return innerRaceLog.revokeEvent(author, toRevoke);
}
@Override
public RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke, String reason)
throws NotRevokableException {
return innerRaceLog.revokeEvent(author, toRevoke, reason);
}
}
@@ -250,8 +250,10 @@ public class RaceLogEventFactoryImpl implements RaceLogEventFactory {
}
@Override
public RevokeEvent createRevokeEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId, Serializable revokedEventId) {
return new RevokeEventImpl(MillisecondsTimePoint.now(), author, logicalTimePoint, UUID.randomUUID(), passId, revokedEventId);
public RevokeEvent createRevokeEvent(TimePoint logicalTimePoint, RaceLogEventAuthor author, int passId, Serializable revokedEventId,
String revokedEventType, String revokedEventShortInfo, String reason) {
return new RevokeEventImpl(MillisecondsTimePoint.now(), author, logicalTimePoint, UUID.randomUUID(),
passId, revokedEventId, revokedEventType, revokedEventShortInfo, reason);
}
@Override
@@ -158,8 +158,8 @@ public class RaceLogEventRestoreFactoryImpl extends RaceLogEventFactoryImpl impl
@Override
public RevokeEvent createRevokeEvent(TimePoint createdAt, RaceLogEventAuthor author, TimePoint logicalTimePoint,
Serializable pId, int passId, Serializable revokedEventId) {
return new RevokeEventImpl(createdAt, author, logicalTimePoint, pId, passId, revokedEventId);
Serializable pId, int passId, Serializable revokedEventId, String revokedEventType, String revokedEventShortInfo, String reason) {
return new RevokeEventImpl(createdAt, author, logicalTimePoint, pId, passId, revokedEventId, revokedEventType, revokedEventShortInfo, reason);
}
@Override
@@ -414,11 +414,17 @@ public class RaceLogImpl extends TrackImpl<RaceLogEvent> implements RaceLog {
@Override
public RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke) throws NotRevokableException {
return revokeEvent(author, toRevoke, null);
}
@Override
public RevokeEvent revokeEvent(RaceLogEventAuthor author, RaceLogEvent toRevoke, String reason) throws NotRevokableException {
if (toRevoke == null) {
throw new NotRevokableException("Received null as event to revoke");
}
RevokeEvent revokeEvent = RaceLogEventFactory.INSTANCE.createRevokeEvent(MillisecondsTimePoint.now(), author,
getCurrentPassId(), toRevoke.getId());
RevokeEvent revokeEvent = RaceLogEventFactory.INSTANCE.createRevokeEvent(
MillisecondsTimePoint.now(), author, getCurrentPassId(), toRevoke.getId(),
toRevoke.getClass().getSimpleName(), toRevoke.getShortInfo(), reason);
checkIfSuccessfullyRevokes(revokeEvent);
add(revokeEvent);
return revokeEvent;
@@ -27,4 +27,9 @@ public class RegisterCompetitorEventImpl extends RaceLogEventImpl implements Reg
public Competitor getCompetitor() {
return getInvolvedBoats().get(0);
}
@Override
public String getShortInfo() {
return "competitor: " + getCompetitor().toString();
}
}
@@ -14,11 +14,18 @@ public class RevokeEventImpl extends RaceLogEventImpl implements RevokeEvent {
private static final long serialVersionUID = -30864810737555657L;
private final Serializable revokedEventId;
private final String reason;
private final String revokedEventType;
private final String revokedEventShortInfo;
public RevokeEventImpl(TimePoint createdAt, RaceLogEventAuthor author, TimePoint logicalTimePoint,
Serializable pId, int pPassId, Serializable revokedEventId) {
Serializable pId, int pPassId, Serializable revokedEventId, String revokedEventType,
String revokedEventShortInfo, String reason) {
super(createdAt, author, logicalTimePoint, pId, Collections.<Competitor>emptyList(), pPassId);
this.revokedEventId = revokedEventId;
this.reason = reason;
this.revokedEventType = revokedEventType;
this.revokedEventShortInfo = revokedEventShortInfo;
}
@Override
@@ -33,6 +40,26 @@ public class RevokeEventImpl extends RaceLogEventImpl implements RevokeEvent {
@Override
public String getShortInfo() {
return super.getShortInfo() + "Revoked: " + revokedEventId;
if (revokedEventShortInfo == null) {
return "No event revoked";
} else {
return "Revoked " + revokedEventType + "(" + revokedEventShortInfo + ")"
+ reason == null ? "" : (" due to " + reason);
}
}
@Override
public String getRevokedEventType() {
return revokedEventType;
}
@Override
public String getRevokedEventShortInfo() {
return revokedEventShortInfo;
}
@Override
public String getReason() {
return reason;
}
}
@@ -8,8 +8,9 @@ import com.sap.sailing.mongodb.MongoDBService;
public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
for (CollectionNames name : CollectionNames.values())
for (CollectionNames name : CollectionNames.values()) {
MongoDBService.INSTANCE.registerExclusively(CollectionNames.class, name.name());
}
}
@Override
@@ -6,6 +6,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NavigableSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.Executor;
@@ -216,7 +217,7 @@ public class PolarSheetGenerationTest {
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
return getWind(p, at);
}
@@ -229,7 +230,7 @@ public class PolarSheetGenerationTest {
@Override
public WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
return getWindWithConfidence(p, at);
}
@@ -263,8 +264,8 @@ public class PolarSheetGenerationTest {
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
List<WindSource> sources = new ArrayList<WindSource>();
public Set<WindSource> getWindSources(WindSourceType type) {
Set<WindSource> sources = new HashSet<>();
sources.add(new WindSourceImpl(type));
return sources;
}
@@ -0,0 +1,58 @@
package com.sap.sailing.domain.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.Test;
/**
* Demonstrates how unmodifiable collections' hashCode and equals is useless because it's based on identity and not on
* content.
*
* @author Axel Uhl (D043530)
*
*/
public class UnmodifiableCollectionsEqualsHashCodeTest {
@Test
public void testInequalityOfUnmodifiableCollection() {
List<String> l1 = Arrays.asList(new String[] { "abc", "def" });
List<String> l2 = new ArrayList<>(l1);
Iterable<String> u1_1 = Collections.unmodifiableCollection(l1);
Iterable<String> u1_2 = Collections.unmodifiableCollection(l1);
Iterable<String> u2_1 = Collections.unmodifiableCollection(l2);
assertEquals(l1, l2);
assertFalse(u1_1.equals(u1_2));
assertFalse(u1_1.equals(u2_1));
}
@Test
public void testInequalityOfUnmodifiableList() {
List<String> l1 = Arrays.asList(new String[] { "abc", "def" });
List<String> l2 = new ArrayList<>(l1);
Iterable<String> u1_1 = Collections.unmodifiableList(l1);
Iterable<String> u1_2 = Collections.unmodifiableList(l1);
Iterable<String> u2_1 = Collections.unmodifiableList(l2);
assertEquals(l1, l2);
assertEquals(u1_1, u1_2);
assertEquals(u1_1, u2_1);
}
@Test
public void testInequalityOfUnmodifiableSet() {
Set<String> s1 = new HashSet<>(Arrays.asList(new String[] { "abc", "def" }));
Set<String> s2 = new HashSet<>(s1);
Iterable<String> u1_1 = Collections.unmodifiableSet(s1);
Iterable<String> u1_2 = Collections.unmodifiableSet(s1);
Iterable<String> u2_1 = Collections.unmodifiableSet(s2);
assertEquals(s1, s2);
assertEquals(u1_1, u1_2);
assertEquals(u1_1, u2_1);
}
}
@@ -7,6 +7,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.junit.Test;
@@ -15,6 +16,7 @@ import com.sap.sailing.domain.base.Mark;
import com.sap.sailing.domain.common.NoWindException;
import com.sap.sailing.domain.common.Position;
import com.sap.sailing.domain.common.TimePoint;
import com.sap.sailing.domain.common.WindSource;
import com.sap.sailing.domain.common.WindSourceType;
import com.sap.sailing.domain.common.impl.DegreeBearingImpl;
import com.sap.sailing.domain.common.impl.DegreePosition;
@@ -65,4 +67,17 @@ public class WindEstimationOnStoredTracksTest extends StoredTrackBasedTestWithTr
assertNotNull(estimatedWindDirection);
}
@Test
public void testWindSourcesAreEqualAcrossCalls() {
Set<WindSource> ws1 = getTrackedRace().getWindSources();
Set<WindSource> ws2 = getTrackedRace().getWindSources();
assertEquals(ws1, ws2);
}
@Test
public void testExcludedWindSourcesAreEqualAcrossCalls() {
Set<WindSource> ews1 = getTrackedRace().getWindSourcesToExclude();
Set<WindSource> ews2 = getTrackedRace().getWindSourcesToExclude();
assertEquals(ews1, ews2);
}
}
@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import java.util.NavigableSet;
import java.util.Set;
import java.util.TreeSet;
import com.sap.sailing.domain.base.BoatClass;
@@ -611,24 +612,24 @@ public class MockedTrackedRace implements DynamicTrackedRace {
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
return Collections.emptyList();
public Set<WindSource> getWindSources(WindSourceType type) {
return Collections.emptySet();
}
@Override
public Iterable<WindSource> getWindSources() {
return Collections.emptyList();
public Set<WindSource> getWindSources() {
return Collections.emptySet();
}
@Override
public WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@@ -646,7 +647,7 @@ public class MockedTrackedRace implements DynamicTrackedRace {
}
@Override
public Iterable<WindSource> getWindSourcesToExclude() {
public Set<WindSource> getWindSourcesToExclude() {
// TODO Auto-generated method stub
return null;
}
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.NavigableSet;
import java.util.Set;
import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.base.Leg;
@@ -226,19 +227,19 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
return Collections.emptyList();
public Set<WindSource> getWindSources(WindSourceType type) {
return Collections.emptySet();
}
@Override
public Iterable<WindSource> getWindSources() {
return Collections.emptyList();
public Set<WindSource> getWindSources() {
return Collections.emptySet();
}
@Override
@@ -399,14 +400,14 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
}
@Override
public Iterable<WindSource> getWindSourcesToExclude() {
public Set<WindSource> getWindSourcesToExclude() {
// TODO Auto-generated method stub
return null;
}
@Override
public WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@@ -8,8 +8,9 @@ import com.sap.sailing.mongodb.MongoDBService;
public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
for (CollectionNames name : CollectionNames.values())
for (CollectionNames name : CollectionNames.values()) {
MongoDBService.INSTANCE.registerExclusively(CollectionNames.class, name.name());
}
}
@Override
@@ -172,7 +172,7 @@ public class PerRaceAndCompetitorPolarSheetGenerationWorker implements Runnable
= new ArrayList<Util.Pair<String, WindWithConfidence<Util.Pair<Position, TimePoint>>>>();
for (WindSource windGaugeSource : windGaugeSources) {
Iterable<WindSource> allSources = race.getWindSources();
List<WindSource> allSourcesButTheSingleWindGaugeSource = new ArrayList<WindSource>();
Set<WindSource> allSourcesButTheSingleWindGaugeSource = new HashSet<WindSource>();
for (WindSource windSource : allSources) {
if (windSource != windGaugeSource) {
allSourcesButTheSingleWindGaugeSource.add(windSource);
@@ -202,7 +202,7 @@ public class PerRaceAndCompetitorPolarSheetGenerationWorker implements Runnable
return done;
}
private Iterable<WindSource> collectWindSourcesToIgnoreForSpeed() {
private Set<WindSource> collectWindSourcesToIgnoreForSpeed() {
Set<WindSource> windSourcesToExclude = new HashSet<WindSource>();
Iterable<WindSource> combinedSources = race.getWindSources(WindSourceType.COMBINED);
for (WindSource combinedSource : combinedSources) {
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.tracking;
import java.io.Serializable;
import java.util.List;
import java.util.NavigableSet;
import java.util.Set;
import java.util.SortedSet;
import com.sap.sailing.domain.base.Competitor;
@@ -238,7 +239,7 @@ public interface TrackedRace extends Serializable {
Position getApproximatePosition(Waypoint waypoint, TimePoint timePoint);
/**
* Same as {@link #getWind(Position, TimePoint, Iterable) getWind(p, at, Collections.emptyList())}
* Same as {@link #getWind(Position, TimePoint, Set) getWind(p, at, Collections.emptyList())}
*/
Wind getWind(Position p, TimePoint at);
@@ -247,7 +248,7 @@ public interface TrackedRace extends Serializable {
* from all wind sources available except for those listed in <code>windSourcesToExclude</code>, using the
* confidences of the wind values provided by the various sources during averaging.
*/
Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude);
Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude);
/**
* Retrieves the wind sources used so far by this race that have the specified <code>type</code> as their
@@ -255,13 +256,13 @@ public interface TrackedRace extends Serializable {
* race does not use any wind source of the specified type (yet). Additional sources may be returned after
*
*/
Iterable<WindSource> getWindSources(WindSourceType type);
Set<WindSource> getWindSources(WindSourceType type);
/**
* Retrieves all wind sources known to this race, including those {@link #getWindSourcesToExclude() to exclude}.
* Callers can freely iterate because a copied collection is returned.
*/
Iterable<WindSource> getWindSources();
Set<WindSource> getWindSources();
/**
* Same as {@link #getOrCreateWindTrack(WindSource, long) getOrCreateWindTrack(windSource,
@@ -484,7 +485,7 @@ public interface TrackedRace extends Serializable {
* Lists those wind sources which by default are not considered in {@link #getWind(Position, TimePoint)} and
* {@link #getWindWithConfidence(Position, TimePoint)}.
*/
Iterable<WindSource> getWindSourcesToExclude();
Set<WindSource> getWindSourcesToExclude();
/**
* Loops over this tracked race's wind sources and from each asks its averaged wind for the position <code>p</code>
@@ -493,7 +494,7 @@ public interface TrackedRace extends Serializable {
* averaged confidence attached.
*/
WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude);
Set<WindSource> windSourcesToExclude);
/**
* Same as {@link #getEstimatedWindDirection(TimePoint)}, but propagates the confidence of the wind
@@ -122,7 +122,7 @@ public abstract class TrackedRaceWithWindEssentials implements TrackedRace {
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
public Set<WindSource> getWindSources(WindSourceType type) {
Set<WindSource> result = new HashSet<WindSource>();
for (WindSource windSource : getWindSources()) {
if (windSource.getType() == type) {
@@ -133,7 +133,7 @@ public abstract class TrackedRaceWithWindEssentials implements TrackedRace {
}
@Override
public Iterable<WindSource> getWindSources() {
public Set<WindSource> getWindSources() {
while (true) {
try {
return new HashSet<WindSource>(windTracks.keySet());
@@ -1,5 +1,6 @@
package com.sap.sailing.domain.tracking.impl;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
@@ -24,13 +25,13 @@ import com.sap.sse.common.Util.Triple;
*/
public class ShortTimeWindCache {
private static final Logger logger = Logger.getLogger(ShortTimeWindCache.class.getName());
private final ConcurrentHashMap<Triple<Position, TimePoint, Iterable<WindSource>>,
private final ConcurrentHashMap<Triple<Position, TimePoint, Set<WindSource>>,
WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>>> cache;
/**
* The keys of {@link #cache} in the order in which to invalidate them, keyed by the time they were entered into the cache.
*/
private final ConcurrentLinkedDeque<Pair<Long, Triple<Position, TimePoint, Iterable<WindSource>>>> order;
private final ConcurrentLinkedDeque<Pair<Long, Triple<Position, TimePoint, Set<WindSource>>>> order;
/**
* Creation and removal / cancellation of the timer is synchronized using {@link #order}.
@@ -47,7 +48,7 @@ public class ShortTimeWindCache {
@Override
public void run() {
long oldestToKeep = System.currentTimeMillis() - preserveHowManyMilliseconds;
Pair<Long, Triple<Position, TimePoint, Iterable<WindSource>>> next;
Pair<Long, Triple<Position, TimePoint, Set<WindSource>>> next;
while ((next = order.pollFirst()) != null && next.getA() < oldestToKeep) {
cache.remove(next.getB());
}
@@ -68,11 +69,11 @@ public class ShortTimeWindCache {
order = new ConcurrentLinkedDeque<>();
}
public void add(Triple<Position, TimePoint, Iterable<WindSource>> key, WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> wind) {
public void add(Triple<Position, TimePoint, Set<WindSource>> key, WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> wind) {
cache.put(key, wind);
boolean orderEmpty = order.isEmpty();
synchronized (order) {
order.add(new Pair<Long, Triple<Position, TimePoint, Iterable<WindSource>>>(System.currentTimeMillis(), key));
order.add(new Pair<Long, Triple<Position, TimePoint, Set<WindSource>>>(System.currentTimeMillis(), key));
if (orderEmpty) {
ensureTimerIsRunning();
}
@@ -80,15 +81,12 @@ public class ShortTimeWindCache {
}
WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p,
TimePoint at, Iterable<WindSource> windSourcesToExclude) {
TimePoint at, Set<WindSource> windSourcesToExclude) {
WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> wind;
final Triple<Position, TimePoint, Iterable<WindSource>> key = new Triple<>(p, at, windSourcesToExclude);
final Triple<Position, TimePoint, Set<WindSource>> key = new Triple<Position, TimePoint, Set<WindSource>>(p, at, windSourcesToExclude);
wind = cache.get(key);
if (wind == null) {
misses++;
if (misses % 100000l == 0 && logger.isLoggable(Level.FINE)) {
logger.fine("hits: " + hits + ", misses: " + misses);
}
wind = trackedRace.getWindWithConfidenceUncached(p, at, windSourcesToExclude);
if (wind != null) {
add(key, wind);
@@ -96,6 +94,9 @@ public class ShortTimeWindCache {
} else {
hits++;
}
if ((hits+misses) % 100000l == 0 && logger.isLoggable(Level.FINE)) {
logger.fine("hits: " + hits + ", misses: " + misses);
}
return wind;
}
@@ -8,6 +8,7 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.logging.Logger;
@@ -245,7 +246,7 @@ public class TrackedLegImpl implements TrackedLeg, RaceChangeListener {
return effectivePosition;
}
private Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
private Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
return getTrackedRace().getWind(p, at, windSourcesToExclude);
}
@@ -5,6 +5,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NavigableSet;
import java.util.Set;
import java.util.concurrent.Callable;
import com.sap.sailing.domain.base.Competitor;
@@ -227,7 +228,7 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
* Projects <code>speed</code> onto the wind direction for upwind/downwind legs to see how fast a boat travels
* "along the wind's direction." For reaching legs (neither upwind nor downwind), the speed is projected onto
* the leg's direction.
* @param windPositionMode see {@link #getWind(Position, TimePoint, WindPositionMode)}
* @param windPositionMode see {@link #getWind(Position, TimePoint, Set)}
*
* @throws NoWindException in case the wind direction is not known
*/
@@ -1323,7 +1323,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
final WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> windWithConfidence = getWindWithConfidence(p, at,
windSourcesToExclude);
return windWithConfidence == null ? null : windWithConfidence.getObject();
@@ -1335,9 +1335,9 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
}
@Override
public Iterable<WindSource> getWindSourcesToExclude() {
public Set<WindSource> getWindSourcesToExclude() {
synchronized (windSourcesToExclude) {
return Collections.unmodifiableCollection(windSourcesToExclude);
return Collections.unmodifiableSet(windSourcesToExclude);
}
}
@@ -1363,7 +1363,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
@Override
public WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
return shortTimeWindCache.getWindWithConfidence(p, at, windSourcesToExclude);
}
@@ -7,7 +7,8 @@
</configIni>
<launcherArgs>
<programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean</programArgs>
<programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean
</programArgs>
</launcherArgs>
<windowImages/>
@@ -56,6 +57,8 @@
<plugin id="com.sap.sailing.www.events" autoStart="true" startLevel="4" />
<plugin id="com.sap.sailing.xmlexport" autoStart="true" startLevel="4" />
<plugin id="com.sap.sailing.xrr.resultimport" autoStart="true" startLevel="3" />
<plugin id="com.sap.sse.security.ui" autoStart="true" startLevel="5" />
<plugin id="com.sap.sse.security.userstore.mongodb" autoStart="true" startLevel="3" />
<plugin id="org.apache.felix.shell" autoStart="true" startLevel="0" />
<plugin id="org.apache.felix.shell.remote" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+21
View File
@@ -159,6 +159,27 @@ Computes leaderboard information for sailing races and offers RESTful APIs to al
version="0.0.0"
unpack="false"/>
<plugin
id="com.sap.sse.security"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.sap.sse.security.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.sap.sse.security.userstore.mongodb"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.sap.sailing.gwt.ui"
download-size="0"
@@ -3,6 +3,7 @@ package com.sap.sailing.gwt.ui.test;
import java.io.Serializable;
import java.util.List;
import java.util.NavigableSet;
import java.util.Set;
import com.sap.sailing.domain.base.BoatClass;
import com.sap.sailing.domain.base.Competitor;
@@ -611,26 +612,26 @@ public class MockedTrackedRace implements DynamicTrackedRace {
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
public Set<WindSource> getWindSources(WindSourceType type) {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterable<WindSource> getWindSources() {
public Set<WindSource> getWindSources() {
// TODO Auto-generated method stub
return null;
}
@Override
public WindWithConfidence<Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
// TODO Auto-generated method stub
return null;
}
@@ -648,7 +649,7 @@ public class MockedTrackedRace implements DynamicTrackedRace {
}
@Override
public Iterable<WindSource> getWindSourcesToExclude() {
public Set<WindSource> getWindSourcesToExclude() {
// TODO Auto-generated method stub
return null;
}
@@ -1,8 +1,10 @@
package com.sap.sailing.gwt.ui.test;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.NavigableSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListSet;
@@ -133,7 +135,7 @@ public class PolarSheetGenerationServiceTest {
}
@Override
public Wind getWind(Position p, TimePoint at, Iterable<WindSource> windSourcesToExclude) {
public Wind getWind(Position p, TimePoint at, Set<WindSource> windSourcesToExclude) {
return getWind(p, at);
}
@@ -146,7 +148,7 @@ public class PolarSheetGenerationServiceTest {
@Override
public WindWithConfidence<com.sap.sse.common.Util.Pair<Position, TimePoint>> getWindWithConfidence(Position p, TimePoint at,
Iterable<WindSource> windSourcesToExclude) {
Set<WindSource> windSourcesToExclude) {
return getWindWithConfidence(p, at);
}
@@ -184,8 +186,8 @@ public class PolarSheetGenerationServiceTest {
}
@Override
public Iterable<WindSource> getWindSources(WindSourceType type) {
List<WindSource> sources = new ArrayList<WindSource>();
public Set<WindSource> getWindSources(WindSourceType type) {
Set<WindSource> sources = new HashSet<WindSource>();
sources.add(new WindSourceImpl(type));
return sources;
}
+1
View File
@@ -4,3 +4,4 @@
/gwt-unitCache
/extras
/com.sap.sailing.gwt.*
/com.sap.sse.security.ui.*
@@ -34,7 +34,9 @@ Require-Bundle: com.sap.sailing.domain,
com.sap.sailing.manage2sail;bundle-version="1.0.0",
com.sap.sse.common;bundle-version="1.0.0",
com.sap.sse.datamining.shared;bundle-version="1.0.0",
com.sap.sse.datamining;bundle-version="1.0.0"
com.sap.sse.datamining;bundle-version="1.0.0",
com.sap.sse.security;bundle-version="1.0.0",
com.sap.sse.security.ui;bundle-version="1.0.0"
Bundle-Activator: com.sap.sailing.gwt.ui.server.Activator
Bundle-ActivationPolicy: lazy
Import-Package: javax.jms;version="1.1.0",
@@ -1,60 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
</listAttribute>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.sap.sailing.gwt.ui"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;com.sap.sailing.gwt.ui&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.googlecode.java-diff-utils/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.json.simple/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.expeditionconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.udpconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.mongodb/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.operationaltransformation/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.moxieapps.gwt.highcharts/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.geocoding/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server.replication/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.google.gwt.osgi/lib/gwt-user.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;com.sap.sailing.gwt.ui&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sapjvm7"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war &quot;${project_loc:com.sap.sailing.gwt.ui}&quot; -noserver -remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/Home.html com.sap.sailing.gwt.ui.Search -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.VideoPopup"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -XX:MaxPermSize=512m -Xdebug -Xrunjdwp:transport=dt_socket,address=7999,server=y"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
</listAttribute>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.sap.sailing.gwt.ui"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;com.sap.sailing.gwt.ui&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.googlecode.java-diff-utils/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.json.simple/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.expeditionconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.udpconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.mongodb/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.operationaltransformation/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.moxieapps.gwt.highcharts/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.geocoding/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server.replication/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.google.gwt.osgi/lib/gwt-user.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;com.sap.sailing.gwt.ui&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sapjvm7"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war &quot;${project_loc:com.sap.sailing.gwt.ui}&quot; -noserver -remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/Home.html com.sap.sailing.gwt.ui.Search -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.VideoPopup"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -XX:MaxPermSize=512m -Xdebug -Xrunjdwp:transport=dt_socket,address=7999,server=y"/>
</launchConfiguration>
+56 -54
View File
@@ -1,54 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/AdminConsole.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.sap.sailing.gwt.ui"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;com.sap.sailing.gwt.ui&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.googlecode.java-diff-utils/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.json.simple/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.expeditionconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.udpconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.mongodb/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.operationaltransformation/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.moxieapps.gwt.highcharts/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.geocoding/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server.replication/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.google.gwt.osgi/lib/gwt-user.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;com.sap.sailing.gwt.ui&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war &quot;${project_loc:com.sap.sailing.gwt.ui}&quot; -noserver -remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/Search.html com.sap.sailing.gwt.ui.Search com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.TvView com.sap.sailing.gwt.ui.UserManagement com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -XX:MaxPermSize=512m"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/AdminConsole.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.sap.sailing.gwt.ui"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;com.sap.sailing.gwt.ui&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.gwt.ui/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.googlecode.java-diff-utils/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.json.simple/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.expeditionconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.declination/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.udpconnector/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.mongodb/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.swisstimingadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.operationaltransformation/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.domain.tractracadapter.persistence/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/org.moxieapps.gwt.highcharts/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.geocoding/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.server.replication/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sailing.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.common/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.datamining.shared/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.gwt/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.google.gwt.osgi/lib/gwt-user.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;com.sap.sailing.gwt.ui&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.security/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/com.sap.sse.security.ui/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war &quot;${project_loc:com.sap.sailing.gwt.ui}&quot; -noserver -remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/UserManagement.html com.sap.sailing.gwt.ui.UserManagement -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/TvView.html com.sap.sailing.gwt.ui.TvView -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/Search.html com.sap.sailing.gwt.ui.Search -startupUrl /security/ui/Login.html com.sap.sse.security.ui.Login -startupUrl /security/ui/EditProfile.html com.sap.sse.security.ui.EditProfile -startupUrl /security/ui/EmailValidation.html com.sap.sse.security.ui.EmailValidation"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m"/>
</launchConfiguration>
+36 -48
View File
@@ -15,6 +15,30 @@
</init-param>
</servlet>
<!-- Apache Shiro -->
<context-param>
<param-name>shiroEnvironmentClass</param-name>
<param-value>org.apache.shiro.web.env.IniWebEnvironment</param-value>
</context-param>
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<!-- Make sure any request you want accessible to Shiro is filtered. "/*"
catches all requests. Usually this filter mapping is defined first (before all
others) to ensure that Shiro works in subsequent filters in the filter chain: -->
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<filter>
<filter-name>GWTCacheControlServletFilter</filter-name>
<filter-class>com.sap.sse.gwt.server.GWTCacheControlServletFilter</filter-class>
@@ -25,7 +49,7 @@
</filter-mapping>
<servlet>
<display-name>Sailing Service</display-name>
<display-name>Sailing Service</display-name>
<servlet-name>SailingService</servlet-name>
<servlet-class>com.sap.sailing.gwt.ui.server.SailingServiceImpl</servlet-class>
</servlet>
@@ -54,16 +78,6 @@
<url-pattern>/service/simulator</url-pattern>
</servlet-mapping>
<servlet>
<display-name>User Management Service</display-name>
<servlet-name>UserManagementService</servlet-name>
<servlet-class>com.sap.sailing.gwt.ui.server.UserManagementServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserManagementService</servlet-name>
<url-pattern>/service/usermanagement</url-pattern>
</servlet-mapping>
<servlet>
<display-name>Data Mining Service</display-name>
<servlet-name>DataMiningService</servlet-name>
@@ -73,6 +87,16 @@
<servlet-name>DataMiningService</servlet-name>
<url-pattern>/service/datamining</url-pattern>
</servlet-mapping>
<servlet>
<display-name>User Management Service</display-name>
<servlet-name>UserManagementService</servlet-name>
<servlet-class>com.sap.sse.security.ui.server.UserManagementServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserManagementService</servlet-name>
<url-pattern>/service/usermanagement</url-pattern>
</servlet-mapping>
<!-- enabling remote logging -->
<servlet>
@@ -84,42 +108,6 @@
<servlet-name>remoteLoggingServlet</servlet-name>
<url-pattern>/com.sap.sailing.gwt.ui.AdminConsole/remote_logging</url-pattern>
<url-pattern>/com.sap.sailing.gwt.ui.Simulator/remote_logging</url-pattern>
<url-pattern>/com.sap.sailing.gwt.ui.RaceBoard/remote_logging</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>Administration pages</web-resource-name>
<url-pattern>/AdminConsole.html</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>administrator</role-name>
<role-name>eventmanager</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Leaderboard editing pages</web-resource-name>
<url-pattern>/LeaderboardEditing.html</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>administrator</role-name>
<role-name>eventmanager</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>user management pages</web-resource-name>
<url-pattern>/UserManagement.html</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>administrator</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>SailingServerRealm</realm-name>
</login-config>
</web-app>
+2 -1
View File
@@ -59,5 +59,6 @@ bin.includes = META-INF/,\
AutoPlay.html,\
Home.css,\
Home.html,\
base.css
base.css,\
com.sap.sailing.gwt.ui.Search/
output.. = WEB-INF/classes/
+13
View File
@@ -72,6 +72,18 @@
<version>2.3.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>com.sap.sse.security.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
<build>
@@ -102,6 +114,7 @@
<module>com.sap.sailing.gwt.ui.UserManagement</module>
<module>com.sap.sailing.gwt.ui.VideoPopup</module>
<module>com.sap.sailing.gwt.ui.YoutubePopup</module>
<module>com.sap.sailing.gwt.ui.Search</module>
<module>com.sap.sailing.gwt.ui.Simulator</module>
<module>com.sap.sailing.gwt.ui.RegattaOverview</module>
<module>com.sap.sailing.gwt.ui.PolarSheets</module>
@@ -10,11 +10,16 @@ import com.sap.sailing.gwt.ui.client.MediaServiceAsync;
import com.sap.sailing.gwt.ui.client.SailingService;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sse.gwt.client.mvp.ClientFactoryImpl;
import com.sap.sse.security.ui.client.UserService;
import com.sap.sse.security.ui.shared.UserManagementService;
import com.sap.sse.security.ui.shared.UserManagementServiceAsync;
public abstract class AbstractApplicationClientFactory extends ClientFactoryImpl implements AutoPlayAppClientFactory {
private final SailingServiceAsync sailingService;
private final MediaServiceAsync mediaService;
private final UserManagementServiceAsync userManagementService;
private final UserService userService;
private final PlaceNavigator navigator;
public AbstractApplicationClientFactory(ApplicationTopLevelView root, EventBus eventBus, PlaceController placeController) {
@@ -22,6 +27,8 @@ public abstract class AbstractApplicationClientFactory extends ClientFactoryImpl
navigator = new PlaceNavigatorImpl(placeController);
sailingService = GWT.create(SailingService.class);
mediaService = GWT.create(MediaService.class);
userManagementService = GWT.create(UserManagementService.class);
userService = new UserService(userManagementService);
}
@Override
@@ -43,4 +50,15 @@ public abstract class AbstractApplicationClientFactory extends ClientFactoryImpl
public PlaceNavigator getPlaceNavigator() {
return navigator;
}
@Override
public UserManagementServiceAsync getUserManagementService() {
return userManagementService;
}
@Override
public UserService getUserService() {
return userService;
}
}
@@ -42,12 +42,14 @@ import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
import com.sap.sse.gwt.client.player.Timer;
import com.sap.sse.gwt.client.player.Timer.PlayModes;
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
import com.sap.sse.security.ui.client.UserService;
public class AutoPlayController implements RaceTimesInfoProviderListener {
private static final int REFRESH_INTERVAL_IN_MILLIS_LEADERBOARD = 10000;
private static final long REFRESH_INTERVAL_IN_MILLIS_RACEBOARD = 1000;
private final SailingServiceAsync sailingService;
private final MediaServiceAsync mediaService;
private final UserService userService;
private final ErrorReporter errorReporter;
private final UserAgentDetails userAgent;
private final AsyncActionsExecutor asyncActionsExecutor;
@@ -80,12 +82,15 @@ public class AutoPlayController implements RaceTimesInfoProviderListener {
private static int SAP_HEADER_HEIGHT = 70;
public AutoPlayController(SailingServiceAsync sailingService, MediaServiceAsync mediaService, ErrorReporter errorReporter,
boolean isfullscreenMode, String leaderboardGroupName, String leaderboardName, final String leaderboardZoom,
UserAgentDetails userAgent, long delayToLiveInMillis, boolean showRaceDetails, RaceBoardViewConfiguration raceboardViewConfig, PlayerView playerView) {
public AutoPlayController(SailingServiceAsync sailingService, MediaServiceAsync mediaService,
UserService userService, ErrorReporter errorReporter, boolean isfullscreenMode,
String leaderboardGroupName, String leaderboardName, final String leaderboardZoom,
UserAgentDetails userAgent, long delayToLiveInMillis, boolean showRaceDetails,
RaceBoardViewConfiguration raceboardViewConfig, PlayerView playerView) {
this.raceboardViewConfig = raceboardViewConfig;
this.sailingService = sailingService;
this.mediaService = mediaService;
this.userService = userService;
this.isfullscreenMode = isfullscreenMode;
this.errorReporter = errorReporter;
this.leaderboardName = leaderboardName;
@@ -161,7 +166,7 @@ public class AutoPlayController implements RaceTimesInfoProviderListener {
RaceSelectionModel raceSelectionModel = new RaceSelectionModel();
List<RegattaAndRaceIdentifier> singletonList = Collections.singletonList(raceToShow);
raceSelectionModel.setSelection(singletonList);
RaceBoardPanel raceBoardPanel = new RaceBoardPanel(sailingService, mediaService, asyncActionsExecutor, null,
RaceBoardPanel raceBoardPanel = new RaceBoardPanel(sailingService, mediaService, userService, asyncActionsExecutor,
raceboardTimer, raceSelectionModel, leaderboardName, null, /* event */null, raceboardViewConfig,
errorReporter, StringMessages.INSTANCE, userAgent, raceTimesInfoProvider, /* showMapControls */false);
return raceBoardPanel;
@@ -46,9 +46,11 @@ public class PlayerActivity extends AbstractActivity implements ErrorReporter {
panel.setWidget(view.asWidget());
RootLayoutPanel.get().add(view.asWidget());
autoPlayController = new AutoPlayController(clientFactory.getSailingService(), clientFactory.getMediaService(),
PlayerActivity.this, playerPlace.isFullscreen(), /*leaderboardGroupName*/ "" , playerPlace.getLeaderboardIdAsNameString(),
playerPlace.getLeaderboardZoom(), userAgent, delayToLiveMillis, showRaceDetails, readRaceboardConfiguration, view);
autoPlayController = new AutoPlayController(clientFactory.getSailingService(), clientFactory
.getMediaService(), clientFactory.getUserService(), PlayerActivity.this, playerPlace
.isFullscreen(), /* leaderboardGroupName */"", playerPlace.getLeaderboardIdAsNameString(),
playerPlace.getLeaderboardZoom(), userAgent, delayToLiveMillis, showRaceDetails,
readRaceboardConfiguration, view);
autoPlayController.updatePlayMode(AutoPlayModes.Leaderboard);
}
@@ -7,7 +7,7 @@ import java.util.Map;
import java.util.logging.Logger;
import com.google.gwt.place.shared.Place;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sse.gwt.client.URLEncoder;
/**
* An abstract Place which is able to manage and parse place parameters.
@@ -10,18 +10,25 @@ import com.sap.sailing.gwt.ui.client.MediaServiceAsync;
import com.sap.sailing.gwt.ui.client.SailingService;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sse.gwt.client.mvp.ClientFactoryImpl;
import com.sap.sse.security.ui.client.UserService;
import com.sap.sse.security.ui.shared.UserManagementService;
import com.sap.sse.security.ui.shared.UserManagementServiceAsync;
public abstract class AbstractApplicationClientFactory extends ClientFactoryImpl implements ApplicationClientFactory {
private final SailingServiceAsync sailingService;
private final MediaServiceAsync mediaService;
private final HomePlacesNavigator navigator;
private final UserManagementServiceAsync userManagementService;
private final UserService userService;
public AbstractApplicationClientFactory(ApplicationTopLevelView root, EventBus eventBus, PlaceController placeController) {
super(root, eventBus, placeController);
navigator = new HomePlacesNavigator(placeController);
sailingService = GWT.create(SailingService.class);
mediaService = GWT.create(MediaService.class);
userManagementService = GWT.create(UserManagementService.class);
userService = new UserService(userManagementService);
}
@Override
@@ -43,4 +50,14 @@ public abstract class AbstractApplicationClientFactory extends ClientFactoryImpl
public HomePlacesNavigator getHomePlacesNavigator() {
return navigator;
}
@Override
public UserManagementServiceAsync getUserManagementService() {
return userManagementService;
}
@Override
public UserService getUserService() {
return userService;
}
}
@@ -91,7 +91,7 @@ public class OldLeaderboard extends Composite {
public void updatedLeaderboard(LeaderboardDTO leaderboard, boolean hasLiveRace) {
if(leaderboard != null) {
lastScoringCommentDiv.setInnerText(leaderboard.getComment() != null ? leaderboard.getComment() : "");
scoringSchemeDiv.setInnerText(leaderboard.scoringScheme != null ? ScoringSchemeTypeFormatter.format(leaderboard.scoringScheme, StringMessages.INSTANCE) : "");
scoringSchemeDiv.setInnerText(leaderboard.scoringScheme != null ? ScoringSchemeTypeFormatter.getDescription(leaderboard.scoringScheme, StringMessages.INSTANCE) : "");
if (leaderboard.getTimePointOfLastCorrectionsValidity() != null) {
Date lastCorrectionDate = leaderboard.getTimePointOfLastCorrectionsValidity();
String lastUpdate = DateAndTimeFormatterUtil.defaultDateFormatter.render(lastCorrectionDate) + ", "
@@ -1,7 +1,9 @@
package com.sap.sailing.gwt.ui.adminconsole;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.gwt.core.client.GWT;
@@ -15,7 +17,6 @@ import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.TabLayoutPanel;
@@ -32,21 +33,22 @@ import com.sap.sailing.gwt.ui.client.RegattasDisplayer;
import com.sap.sailing.gwt.ui.client.RemoteServiceMappingConstants;
import com.sap.sailing.gwt.ui.client.SailingService;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.UserManagementService;
import com.sap.sailing.gwt.ui.client.UserManagementServiceAsync;
import com.sap.sailing.gwt.ui.client.shared.panels.SystemInformationPanel;
import com.sap.sailing.gwt.ui.client.shared.panels.UserStatusPanel;
import com.sap.sailing.gwt.ui.masterdataimport.MasterDataImportPanel;
import com.sap.sailing.gwt.ui.shared.BetterDateTimeBox;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.SecurityStylesheetResources;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sailing.gwt.ui.usermanagement.UserRoles;
import com.sap.sse.common.Util.Triple;
import com.sap.sse.gwt.client.EntryPointHelper;
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.panels.VerticalTabLayoutPanel;
import com.sap.sse.security.ui.client.UserStatusEventHandler;
import com.sap.sse.security.ui.loginpanel.LoginPanel;
import com.sap.sse.security.ui.shared.UserDTO;
public class AdminConsoleEntryPoint extends AbstractEntryPoint implements RegattaRefresher, LeaderboardsRefresher, LeaderboardGroupsRefresher {
private Set<RegattasDisplayer> regattasDisplayers;
@@ -55,30 +57,29 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
private final SailingServiceAsync sailingService = GWT.create(SailingService.class);
private final MediaServiceAsync mediaService = GWT.create(MediaService.class);
private final UserManagementServiceAsync userManagementService = GWT.create(UserManagementService.class);
/**
* The administration console's UI depends on the user's roles. When the roles change then so shall the display of tabs.
* {@link AdminConsoleFeatures} list the roles to which they are made available. This map keeps track of the dependencies
* and allows the UI to adjust to role changes.
*/
private final LinkedHashMap<Triple<VerticalOrHorizontalTabLayoutPanel, Widget, String>, AdminConsoleFeatures> roleSpecificTabs = new LinkedHashMap<>();
@Override
protected void doOnModuleLoad() {
super.doOnModuleLoad();
EntryPointHelper.registerASyncService((ServiceDefTarget) userManagementService, RemoteServiceMappingConstants.userManagementServiceRemotePath);
EntryPointHelper.registerASyncService((ServiceDefTarget) sailingService, RemoteServiceMappingConstants.sailingServiceRemotePath);
EntryPointHelper.registerASyncService((ServiceDefTarget) mediaService, RemoteServiceMappingConstants.mediaServiceRemotePath);
userManagementService.getUser(new AsyncCallback<UserDTO>() {
getUserService().addUserStatusEventHandler(new UserStatusEventHandler() {
@Override
public void onFailure(Throwable caught) {
reportError("Could not read user: " + caught.getMessage());
}
@Override
public void onSuccess(UserDTO result) {
createUI(result);
public void onUserStatusChange(UserDTO user) {
updateTabDisplayForCurrentUser(user);
}
});
EntryPointHelper.registerASyncService((ServiceDefTarget) sailingService, RemoteServiceMappingConstants.sailingServiceRemotePath);
EntryPointHelper.registerASyncService((ServiceDefTarget) mediaService, RemoteServiceMappingConstants.mediaServiceRemotePath);
createUI();
}
private void createUI(UserDTO user) {
private void createUI() {
/* Generic selection handler that forwards selected tabs to a refresher that ensures
* that data gets reloaded. If you add a new tab then make sure to have a look at
* #refreshDataFor(Widget widget) to ensure that upon selection your tab gets the
@@ -119,33 +120,34 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
leaderboardGroupsDisplayers = new HashSet<>();
final EventManagementPanel eventManagementPanel = new EventManagementPanel(sailingService, this, stringMessages);
addToTabPanel(tabPanel, user, eventManagementPanel, stringMessages.events(), AdminConsoleFeatures.MANAGE_EVENTS);
addToTabPanel(tabPanel, eventManagementPanel, stringMessages.events(), AdminConsoleFeatures.MANAGE_EVENTS);
leaderboardGroupsDisplayers.add(eventManagementPanel);
RegattaStructureManagementPanel regattaManagementPanel = new RegattaStructureManagementPanel(
sailingService, this, stringMessages, this);
regattaManagementPanel.ensureDebugId("RegattaStructureManagement");
addToTabPanel(tabPanel, user, regattaManagementPanel, stringMessages.regattas(), AdminConsoleFeatures.MANAGE_REGATTAS);
addToTabPanel(tabPanel, regattaManagementPanel, stringMessages.regattas(), AdminConsoleFeatures.MANAGE_REGATTAS);
regattasDisplayers.add(regattaManagementPanel);
/* LEADERBOARDS */
final TabLayoutPanel leaderboardTabPanel = new TabLayoutPanel(2.5, Unit.EM);
setTabPanelSize(leaderboardTabPanel, "100%", "100%");
leaderboardTabPanel.addSelectionHandler(tabSelectionHandler);
leaderboardTabPanel.ensureDebugId("LeaderboardPanel");
tabPanel.add(leaderboardTabPanel, stringMessages.leaderboards());
addToTabPanel(tabPanel, leaderboardTabPanel, stringMessages.leaderboards(), AdminConsoleFeatures.MANAGE_LEADERBOARDS);
final LeaderboardConfigPanel leaderboardConfigPanel = new LeaderboardConfigPanel(sailingService, this, this,
stringMessages, /* showRaceDetails */true, this);
leaderboardConfigPanel.ensureDebugId("LeaderboardConfiguration");
addToTabPanel(leaderboardTabPanel, user, leaderboardConfigPanel, stringMessages.leaderboardConfiguration(), AdminConsoleFeatures.MANAGE_LEADERBOARDS);
addToTabPanel(leaderboardTabPanel, leaderboardConfigPanel, stringMessages.leaderboardConfiguration(), AdminConsoleFeatures.MANAGE_LEADERBOARDS);
regattasDisplayers.add(leaderboardConfigPanel);
leaderboardsDisplayers.add(leaderboardConfigPanel);
final LeaderboardGroupConfigPanel leaderboardGroupConfigPanel = new LeaderboardGroupConfigPanel(sailingService,
this, this, this, this, stringMessages);
leaderboardGroupConfigPanel.ensureDebugId("LeaderboardGroupConfiguration");
addToTabPanel(leaderboardTabPanel, user, leaderboardGroupConfigPanel, stringMessages.leaderboardGroups(), AdminConsoleFeatures.MANAGE_LEADERBOARD_GROUPS);
addToTabPanel(leaderboardTabPanel, leaderboardGroupConfigPanel, stringMessages.leaderboardGroups(), AdminConsoleFeatures.MANAGE_LEADERBOARD_GROUPS);
regattasDisplayers.add(leaderboardGroupConfigPanel);
leaderboardGroupsDisplayers.add(leaderboardGroupConfigPanel);
leaderboardsDisplayers.add(leaderboardGroupConfigPanel);
@@ -153,101 +155,103 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
/* RACES */
final TabLayoutPanel racesTabPanel = new TabLayoutPanel(2.5, Unit.EM);
setTabPanelSize(racesTabPanel, "100%", "100%");
racesTabPanel.addSelectionHandler(tabSelectionHandler);
racesTabPanel.ensureDebugId("RacesPanel");
tabPanel.add(racesTabPanel, stringMessages.races());
addToTabPanel(tabPanel, racesTabPanel, stringMessages.races(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
TrackedRacesManagementPanel trackedRacesManagementPanel = new TrackedRacesManagementPanel(sailingService, this,
this, stringMessages);
trackedRacesManagementPanel.ensureDebugId("TrackedRacesManagement");
addToTabPanel(racesTabPanel, user, trackedRacesManagementPanel, stringMessages.trackedRaces(), AdminConsoleFeatures.SHOW_TRACKED_RACES);
addToTabPanel(racesTabPanel, trackedRacesManagementPanel, stringMessages.trackedRaces(), AdminConsoleFeatures.SHOW_TRACKED_RACES);
regattasDisplayers.add(trackedRacesManagementPanel);
final CompetitorPanel competitorPanel = new CompetitorPanel(sailingService, stringMessages, this);
addToTabPanel(racesTabPanel, user, competitorPanel, stringMessages.competitors(), AdminConsoleFeatures.MANAGE_ALL_COMPETITORS);
addToTabPanel(racesTabPanel, competitorPanel, stringMessages.competitors(), AdminConsoleFeatures.MANAGE_ALL_COMPETITORS);
RaceCourseManagementPanel raceCourseManagementPanel = new RaceCourseManagementPanel(sailingService, this, this, stringMessages);
addToTabPanel(racesTabPanel, user, raceCourseManagementPanel, stringMessages.courseLayout(), AdminConsoleFeatures.MANAGE_COURSE_LAYOUT);
addToTabPanel(racesTabPanel, raceCourseManagementPanel, stringMessages.courseLayout(), AdminConsoleFeatures.MANAGE_COURSE_LAYOUT);
regattasDisplayers.add(raceCourseManagementPanel);
final AsyncActionsExecutor asyncActionsExecutor = new AsyncActionsExecutor();
WindPanel windPanel = new WindPanel(sailingService, asyncActionsExecutor, this, this, stringMessages);
regattasDisplayers.add(windPanel);
addToTabPanel(racesTabPanel, user, windPanel, stringMessages.wind(), AdminConsoleFeatures.MANAGE_WIND);
addToTabPanel(racesTabPanel, windPanel, stringMessages.wind(), AdminConsoleFeatures.MANAGE_WIND);
final MediaPanel mediaPanel = new MediaPanel(regattasDisplayers, sailingService, this, mediaService, this, stringMessages);
addToTabPanel(racesTabPanel, user, mediaPanel, stringMessages.mediaPanel(), AdminConsoleFeatures.MANAGE_MEDIA);
addToTabPanel(racesTabPanel, mediaPanel, stringMessages.mediaPanel(), AdminConsoleFeatures.MANAGE_MEDIA);
/* CONNECTORS */
final TabLayoutPanel connectorsTabPanel = new TabLayoutPanel(2.5, Unit.EM);
setTabPanelSize(connectorsTabPanel, "100%", "100%");
connectorsTabPanel.addSelectionHandler(tabSelectionHandler);
connectorsTabPanel.ensureDebugId("TrackingProviderPanel");
tabPanel.add(connectorsTabPanel, stringMessages.connectors());
addToTabPanel(tabPanel, connectorsTabPanel, stringMessages.connectors(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
AbstractEventManagementPanel tractracEventManagementPanel = new TracTracEventManagementPanel(sailingService,
this, this, stringMessages);
tractracEventManagementPanel.ensureDebugId("TracTracEventManagement");
addToTabPanel(connectorsTabPanel, user, tractracEventManagementPanel, stringMessages.tracTracEvents(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
addToTabPanel(connectorsTabPanel, tractracEventManagementPanel, stringMessages.tracTracEvents(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
regattasDisplayers.add(tractracEventManagementPanel);
SwissTimingReplayConnectorPanel swissTimingReplayConnectorPanel = new SwissTimingReplayConnectorPanel(
sailingService, this, this, stringMessages);
addToTabPanel(connectorsTabPanel, user, swissTimingReplayConnectorPanel, stringMessages.swissTimingArchiveConnector(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
addToTabPanel(connectorsTabPanel, swissTimingReplayConnectorPanel, stringMessages.swissTimingArchiveConnector(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
regattasDisplayers.add(swissTimingReplayConnectorPanel);
SwissTimingEventManagementPanel swisstimingEventManagementPanel = new SwissTimingEventManagementPanel(
sailingService, this, this, stringMessages);
addToTabPanel(connectorsTabPanel, user, swisstimingEventManagementPanel, stringMessages.swissTimingEvents(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
addToTabPanel(connectorsTabPanel, swisstimingEventManagementPanel, stringMessages.swissTimingEvents(), AdminConsoleFeatures.MANAGE_TRACKED_RACES);
regattasDisplayers.add(swisstimingEventManagementPanel);
final RaceLogTrackingEventManagementPanel raceLogTrackingEventManagementPanel = new RaceLogTrackingEventManagementPanel(
sailingService, this, this, this, stringMessages);
addToTabPanel(connectorsTabPanel, user, raceLogTrackingEventManagementPanel, stringMessages.raceLogTracking(), AdminConsoleFeatures.MANAGE_RACELOG_TRACKING);
addToTabPanel(connectorsTabPanel, raceLogTrackingEventManagementPanel, stringMessages.raceLogTracking(), AdminConsoleFeatures.MANAGE_RACELOG_TRACKING);
regattasDisplayers.add(raceLogTrackingEventManagementPanel);
leaderboardsDisplayers.add(raceLogTrackingEventManagementPanel);
IgtimiAccountsPanel igtimiAccountsPanel = new IgtimiAccountsPanel(sailingService, this, stringMessages);
igtimiAccountsPanel.ensureDebugId("IgtimiAccounts");
addToTabPanel(connectorsTabPanel, user, igtimiAccountsPanel, stringMessages.igtimiAccounts(), AdminConsoleFeatures.MANAGE_IGTIMI_ACCOUNTS);
addToTabPanel(connectorsTabPanel, igtimiAccountsPanel, stringMessages.igtimiAccounts(), AdminConsoleFeatures.MANAGE_IGTIMI_ACCOUNTS);
ResultImportUrlsManagementPanel resultImportUrlsManagementPanel = new ResultImportUrlsManagementPanel(sailingService, this, stringMessages);
addToTabPanel(connectorsTabPanel, user, resultImportUrlsManagementPanel, stringMessages.resultImportUrls(), AdminConsoleFeatures.MANAGE_RESULT_IMPORT_URLS);
addToTabPanel(connectorsTabPanel, resultImportUrlsManagementPanel, stringMessages.resultImportUrls(), AdminConsoleFeatures.MANAGE_RESULT_IMPORT_URLS);
/* ADVANCED */
final TabLayoutPanel advancedTabPanel = new TabLayoutPanel(2.5, Unit.EM);
setTabPanelSize(advancedTabPanel, "100%", "100%");
advancedTabPanel.addSelectionHandler(tabSelectionHandler);
advancedTabPanel.ensureDebugId("AdvancedPanel");
tabPanel.add(advancedTabPanel, "Advanced");
addToTabPanel(tabPanel, advancedTabPanel, stringMessages.advanced(), AdminConsoleFeatures.MANAGE_REPLICATION);
final ReplicationPanel replicationPanel = new ReplicationPanel(sailingService, this, stringMessages);
addToTabPanel(advancedTabPanel, user, replicationPanel, stringMessages.replication(), AdminConsoleFeatures.MANAGE_REPLICATION);
addToTabPanel(advancedTabPanel, replicationPanel, stringMessages.replication(), AdminConsoleFeatures.MANAGE_REPLICATION);
final MasterDataImportPanel masterDataImportPanel = new MasterDataImportPanel(stringMessages, sailingService,
this, eventManagementPanel, this, this);
addToTabPanel(advancedTabPanel, user, masterDataImportPanel, stringMessages.masterDataImportPanel(), AdminConsoleFeatures.MANAGE_MASTERDATA_IMPORT);
addToTabPanel(advancedTabPanel, masterDataImportPanel, stringMessages.masterDataImportPanel(), AdminConsoleFeatures.MANAGE_MASTERDATA_IMPORT);
RemoteSailingServerInstancesManagementPanel sailingServerInstancesManagementPanel = new RemoteSailingServerInstancesManagementPanel(sailingService, this, stringMessages);
addToTabPanel(advancedTabPanel, user, sailingServerInstancesManagementPanel, stringMessages.sailingServers(), AdminConsoleFeatures.MANAGE_SAILING_SERVER_INSTANCES);
addToTabPanel(advancedTabPanel, sailingServerInstancesManagementPanel, stringMessages.sailingServers(), AdminConsoleFeatures.MANAGE_SAILING_SERVER_INSTANCES);
final DeviceConfigurationPanel deviceConfigurationUserPanel = new DeviceConfigurationUserPanel(sailingService,
stringMessages, this);
addToTabPanel(advancedTabPanel, user, deviceConfigurationUserPanel, stringMessages.deviceConfiguration(), AdminConsoleFeatures.MANAGE_DEVICE_CONFIGURATION);
tabPanel.selectTab(0);
addToTabPanel(advancedTabPanel, deviceConfigurationUserPanel, stringMessages.deviceConfiguration(), AdminConsoleFeatures.MANAGE_DEVICE_CONFIGURATION);
updateTabDisplayForCurrentUser(getUserService().getCurrentUser());
if (tabPanel.getWidgetCount() > 0) {
tabPanel.selectTab(0);
}
fillRegattas();
fillLeaderboardGroups();
fillLeaderboards();
DockPanel informationPanel = new DockPanel();
final DockPanel informationPanel = new DockPanel();
informationPanel.setSize("100%", "95%");
informationPanel.setSpacing(10);
UserStatusPanel userStatusPanel = new UserStatusPanel(user);
userStatusPanel.ensureDebugId("UserStatus");
informationPanel.add(userStatusPanel, DockPanel.WEST);
informationPanel.add(new LoginPanel(SecurityStylesheetResources.INSTANCE.css(), getUserService()), DockPanel.WEST);
informationPanel.add(persistentAlertLabel, DockPanel.CENTER);
SystemInformationPanel sysinfoPanel = new SystemInformationPanel(sailingService, this);
@@ -257,7 +261,7 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
sysinfoPanel.add(releaseNotesLink);
informationPanel.add(sysinfoPanel, DockPanel.EAST);
informationPanel.setCellHorizontalAlignment(sysinfoPanel, HasHorizontalAlignment.ALIGN_RIGHT);
RootLayoutPanel rootPanel = RootLayoutPanel.get();
DockLayoutPanel dockPanel = new DockLayoutPanel(Unit.EM);
@@ -265,7 +269,7 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
dockPanel.add(tabPanel);
rootPanel.add(dockPanel);
}
private void refreshDataFor(Widget widget) {
Widget target = widget;
if (widget != null) {
@@ -291,29 +295,74 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
}
}
}
private static interface VerticalOrHorizontalTabLayoutPanel {
void add(Widget child, String text, boolean asHtml);
void remove(Widget child);
}
private void addToTabPanel(VerticalTabLayoutPanel tabPanel, UserDTO user, Panel panelToAdd, String tabTitle, AdminConsoleFeatures feature) {
if(user != null && isUserInRole(user, feature.getEnabledRoles())) {
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.add(panelToAdd);
panelToAdd.setSize("100%", "100%");
tabPanel.add(scrollPanel, tabTitle, false);
private void addToTabPanel(final VerticalTabLayoutPanel tabPanel, Widget panelToAdd, String tabTitle, AdminConsoleFeatures feature) {
VerticalOrHorizontalTabLayoutPanel wrapper = new VerticalOrHorizontalTabLayoutPanel() {
@Override
public void add(Widget child, String text, boolean asHtml) {
tabPanel.add(child, text, asHtml);
tabPanel.forceLayout();
}
@Override
public void remove(Widget child) {
tabPanel.remove(child);
}
};
addToTabPanel(wrapper, panelToAdd, tabTitle, feature);
}
private ScrollPanel wrapInScrollPanel(Widget panelToAdd) {
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.add(panelToAdd);
panelToAdd.setSize("100%", "100%");
return scrollPanel;
}
private void addToTabPanel(final TabLayoutPanel tabPanel, Widget panelToAdd, String tabTitle, AdminConsoleFeatures feature) {
VerticalOrHorizontalTabLayoutPanel wrapper = new VerticalOrHorizontalTabLayoutPanel() {
@Override
public void add(Widget child, String text, boolean asHtml) {
tabPanel.add(child, text, asHtml);
tabPanel.forceLayout();
}
@Override
public void remove(Widget child) {
tabPanel.remove(child);
}
};
addToTabPanel(wrapper, panelToAdd, tabTitle, feature);
}
private void addToTabPanel(VerticalOrHorizontalTabLayoutPanel tabPanel, Widget panelToAdd, String tabTitle,
AdminConsoleFeatures feature) {
roleSpecificTabs.put(new Triple<VerticalOrHorizontalTabLayoutPanel, Widget, String>(tabPanel, wrapInScrollPanel(panelToAdd), tabTitle), feature);
}
/**
* After initialization or whenever the user changes, the tab display is adjusted based on which roles are required
* to see which tabs. See {@link #roleSpecificTabs}.
*/
private void updateTabDisplayForCurrentUser(UserDTO user) {
for (Map.Entry<Triple<VerticalOrHorizontalTabLayoutPanel, Widget, String>, AdminConsoleFeatures> e : roleSpecificTabs.entrySet()) {
final Widget panelToAdd = e.getKey().getB();
if (user != null && isUserInRole(e.getValue().getEnabledRoles())) {
e.getKey().getA().add(panelToAdd, e.getKey().getC(), /* asHtml */ false);
} else {
e.getKey().getA().remove(panelToAdd);
}
}
}
private void addToTabPanel(TabLayoutPanel tabPanel, UserDTO user, Panel panelToAdd, String tabTitle, AdminConsoleFeatures feature) {
if(user != null && isUserInRole(user, feature.getEnabledRoles())) {
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.add(panelToAdd);
panelToAdd.setSize("100%", "100%");
tabPanel.add(scrollPanel, tabTitle, false);
}
}
private boolean isUserInRole(UserDTO user, UserRoles[] roles) {
private boolean isUserInRole(UserRoles[] roles) {
boolean result = false;
for(UserRoles enabledRole: roles) {
if (user.roles.contains(enabledRole.name())) {
UserDTO user = getUserService().getCurrentUser();
for (UserRoles enabledRole : roles) {
if (user.hasRole(enabledRole.getRolename())) {
result = true;
break;
}
@@ -11,7 +11,7 @@ interface AdminConsoleResources extends ClientBundle {
@Source("com/sap/sailing/gwt/ui/client/images/settingsActionIcon.png")
ImageResource settingsActionIcon();
@Source("com/sap/sailing/gwt/ui/client/images/remove.png")
@Source("com/sap/sse/gwt/client/images/remove.png")
ImageResource removeIcon();
@Source("com/sap/sailing/gwt/ui/client/images/edit.png")
@@ -26,11 +26,11 @@ import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sailing.gwt.ui.client.ErrorReporter;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.StringListEditorComposite;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO.RegattaConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationMatcherDTO;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
import com.sap.sse.gwt.client.controls.listedit.StringListEditorComposite;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
public class DeviceConfigurationDetailComposite extends Composite {
@@ -207,7 +207,7 @@ public class DeviceConfigurationDetailComposite extends Composite {
.<String> emptyList() : originalConfiguration.allowedCourseAreaNames;
allowedCourseAreasList = new StringListEditorComposite(initialValues, stringMessages, stringMessages.courseAreas(), resources.removeIcon(),
SuggestedCourseAreaNames.suggestedCourseAreaNames);
SuggestedCourseAreaNames.suggestedCourseAreaNames, stringMessages.enterCourseAreaName());
allowedCourseAreasList.setWidth("80%");
allowedCourseAreasList.addValueChangeHandler(dirtyValueMarker);
@@ -219,7 +219,8 @@ public class DeviceConfigurationDetailComposite extends Composite {
List<String> initialValues = originalConfiguration.byNameDesignerCourseNames == null ? Collections
.<String> emptyList() : originalConfiguration.byNameDesignerCourseNames;
courseNamesList = new StringListEditorComposite(initialValues, stringMessages, stringMessages.courseNames(), resources.removeIcon(), suggestedCourseNames);
courseNamesList = new StringListEditorComposite(initialValues, stringMessages, stringMessages.courseNames(), resources.removeIcon(), suggestedCourseNames,
stringMessages.enterCourseName());
courseNamesList.setWidth("80%");
courseNamesList.addValueChangeHandler(dirtyValueMarker);
grid.setWidget(gridRow, 0, new Label(stringMessages.courseNames()));
@@ -300,9 +301,9 @@ public class DeviceConfigurationDetailComposite extends Composite {
}
};
private ValueChangeHandler<List<String>> dirtyValueMarker = new ValueChangeHandler<List<String>>() {
private ValueChangeHandler<Iterable<String>> dirtyValueMarker = new ValueChangeHandler<Iterable<String>>() {
@Override
public void onValueChange(ValueChangeEvent<List<String>> event) {
public void onValueChange(ValueChangeEvent<Iterable<String>> event) {
markAsDirty(true);
}
};
@@ -20,12 +20,12 @@ import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.client.DataEntryDialogWithBootstrap;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.StringListInlineEditorComposite;
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.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.VenueDTO;
import com.sap.sse.gwt.client.controls.listedit.StringListInlineEditorComposite;
public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO> {
private final AdminConsoleResources resources = GWT.create(AdminConsoleResources.class);
@@ -122,30 +122,30 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
callback);
this.leaderboardGroups = leaderboardGroups;
this.stringMessages = stringMessages;
final ValueChangeHandler<List<String>> valueChangeHandler = new ValueChangeHandler<List<String>>() {
final ValueChangeHandler<Iterable<String>> valueChangeHandler = new ValueChangeHandler<Iterable<String>>() {
@Override
public void onValueChange(ValueChangeEvent<List<String>> event) {
public void onValueChange(ValueChangeEvent<Iterable<String>> event) {
validate();
}
};
courseAreaNameList = new StringListInlineEditorComposite(Collections.<String> emptyList(),
new StringListInlineEditorComposite.ExpandedUi(stringMessages, resources.removeIcon(), /* suggestValues */
SuggestedCourseAreaNames.suggestedCourseAreaNames, 50));
SuggestedCourseAreaNames.suggestedCourseAreaNames, stringMessages.enterCourseAreaName(), 50));
courseAreaNameList.addValueChangeHandler(valueChangeHandler);
final List<String> imageSuggestionURLs = Arrays.asList(new String[] { "http://", "https://", "http://www.", "https://www" });
imageURLList = new StringListInlineEditorComposite(Collections.<String> emptyList(),
new StringListInlineEditorComposite.ExpandedUi(stringMessages, resources.removeIcon(),
/* suggestValues */ imageSuggestionURLs, 80));
/* suggestValues */ imageSuggestionURLs, stringMessages.enterImageURL(), 80));
imageURLList.addValueChangeHandler(valueChangeHandler);
List<String> videoURLSuggestions = new ArrayList<>(imageSuggestionURLs);
videoURLSuggestions.add("http://www.youtube.com/watch?v=");
videoURLList = new StringListInlineEditorComposite(Collections.<String> emptyList(),
new StringListInlineEditorComposite.ExpandedUi(stringMessages, resources.removeIcon(),
/* suggestValues */ videoURLSuggestions, 80));
/* suggestValues */ videoURLSuggestions, stringMessages.enterVideoURL(), 80));
videoURLList.addValueChangeHandler(valueChangeHandler);
sponsorImageURLList = new StringListInlineEditorComposite(Collections.<String> emptyList(),
new StringListInlineEditorComposite.ExpandedUi(stringMessages, resources.removeIcon(),
/* suggestValues */ imageSuggestionURLs, 80));
/* suggestValues */ imageSuggestionURLs, stringMessages.enterSponsorImageURL(), 80));
sponsorImageURLList.addValueChangeHandler(valueChangeHandler);
}
@@ -40,7 +40,6 @@ import com.sap.sailing.gwt.ui.client.EventsRefresher;
import com.sap.sailing.gwt.ui.client.LeaderboardGroupsDisplayer;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO;
@@ -49,6 +48,7 @@ import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sse.common.Util;
import com.sap.sse.common.Util.Pair;
import com.sap.sse.gwt.client.URLEncoder;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
import com.sap.sse.gwt.client.panels.LabeledAbstractFilterablePanel;
@@ -1,7 +1,5 @@
package com.sap.sailing.gwt.ui.adminconsole;
import java.util.List;
import com.google.gwt.dom.client.Style.FontWeight;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
@@ -19,11 +17,11 @@ import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.domain.common.Color;
import com.sap.sailing.domain.common.dto.FleetDTO;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ExpandedListEditorUi;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sse.gwt.client.controls.listedit.ExpandedListEditorUi;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
public FleetListEditorComposite(List<FleetDTO> initialValues, StringMessages stringMessages, ImageResource removeImage) {
public FleetListEditorComposite(Iterable<FleetDTO> initialValues, StringMessages stringMessages, ImageResource removeImage) {
super(initialValues, new ExpandedUi(stringMessages, removeImage));
}
@@ -33,6 +31,12 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
super(stringMessages, removeImage, /*canRemoveItems*/true);
}
@Override
protected StringMessages getStringMessages() {
return (StringMessages) super.getStringMessages();
}
@Override
protected Widget createAddWidget() {
HorizontalPanel hPanel = new HorizontalPanel();
@@ -48,7 +52,7 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
final ListBox colorListBox = createColorListBox(nameBox, orderNoBox);
colorListBox.ensureDebugId("ColorListBox");
final Button addButton = new Button(stringMessages.add());
final Button addButton = new Button(getStringMessages().add());
addButton.ensureDebugId("AddButton");
addButton.addClickHandler(new ClickHandler() {
@Override
@@ -57,11 +61,11 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
}
});
hPanel.add(new Label(stringMessages.color() + ":"));
hPanel.add(new Label(getStringMessages().color() + ":"));
hPanel.add(colorListBox);
hPanel.add(new Label(stringMessages.name() + ":"));
hPanel.add(new Label(getStringMessages().name() + ":"));
hPanel.add(nameBox);
hPanel.add(new Label(stringMessages.rank() + ":"));
hPanel.add(new Label(getStringMessages().rank() + ":"));
hPanel.add(orderNoBox);
hPanel.add(addButton);
return hPanel;
@@ -71,17 +75,17 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
protected Widget createValueWidget(int rowIndex, FleetDTO fleet) {
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.setSpacing(4);
Label fleetLabel = new Label(stringMessages.fleet() + " '" + fleet.getName() + "' :");
Label fleetLabel = new Label(getStringMessages().fleet() + " '" + fleet.getName() + "' :");
fleetLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
hPanel.add(fleetLabel);
String valueText = "";
if(fleet.getColor() != null) {
valueText += stringMessages.color() + " '" + fleet.getColor().toString() + "'";
valueText += getStringMessages().color() + " '" + fleet.getColor().toString() + "'";
} else {
valueText += stringMessages.noColor();
valueText += getStringMessages().noColor();
}
valueText += ", " + stringMessages.rank() + " " + fleet.getOrderNo();
valueText += ", " + getStringMessages().rank() + " " + fleet.getOrderNo();
hPanel.add(new Label(valueText));
@@ -121,7 +125,7 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
}
}
});
colorListBox.addItem(stringMessages.noColor());
colorListBox.addItem(getStringMessages().noColor());
for (FleetColors value : FleetColors.values()) {
colorListBox.addItem(value.name());
}
@@ -147,7 +151,7 @@ public class FleetListEditorComposite extends ListEditorComposite<FleetDTO> {
private String getColorText(FleetColors color) {
if (color == null) {
return stringMessages.noColor();
return getStringMessages().noColor();
}
return color.name().charAt(0) + color.name().toLowerCase().substring(1);
}
@@ -47,7 +47,6 @@ import com.sap.sailing.gwt.ui.client.RegattaRefresher;
import com.sap.sailing.gwt.ui.client.RegattasDisplayer;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sailing.gwt.ui.client.shared.controls.SelectionCheckboxColumn;
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardEntryPoint;
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
@@ -56,6 +55,7 @@ import com.sap.sailing.gwt.ui.shared.RaceLogDTO;
import com.sap.sailing.gwt.ui.shared.RaceLogSetStartTimeAndProcedureDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sse.common.Util;
import com.sap.sse.gwt.client.URLEncoder;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
@@ -45,13 +45,13 @@ import com.sap.sailing.gwt.ui.client.LeaderboardsRefresher;
import com.sap.sailing.gwt.ui.client.RegattaRefresher;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
import com.sap.sailing.gwt.ui.raceboard.RaceBoardViewConfiguration;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sse.common.Util;
import com.sap.sse.gwt.client.URLEncoder;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
import com.sap.sse.gwt.client.panels.LabeledAbstractFilterablePanel;
@@ -10,10 +10,10 @@ import com.google.gwt.core.shared.GWT;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
public class RegattaWithSeriesAndFleetsCreateDialog extends RegattaWithSeriesAndFleetsDialog {
@@ -95,9 +95,9 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends RegattaWithSeriesAnd
}
public RegattaWithSeriesAndFleetsCreateDialog(Collection<RegattaDTO> existingRegattas,
List<EventDTO> existingEvents, StringMessages stringConstants, DialogCallback<RegattaDTO> callback) {
super(new RegattaDTO(), existingEvents, stringConstants.addRegatta(), stringConstants.ok(), stringConstants,
new RegattaParameterValidator(stringConstants, existingRegattas), callback);
List<EventDTO> existingEvents, StringMessages stringMessages, DialogCallback<RegattaDTO> callback) {
super(new RegattaDTO(), existingEvents, stringMessages.addRegatta(), stringMessages.ok(), stringMessages,
new RegattaParameterValidator(stringMessages, existingRegattas), callback);
this.seriesEditor = new SeriesWithFleetsListEditor(Collections.<SeriesDTO>emptyList(), stringMessages, resources.removeIcon(), /*enableFleetRemoval*/true);
}
@@ -14,12 +14,12 @@ import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO.RegattaConfigurationDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
public class RegattaWithSeriesAndFleetsEditDialog extends RegattaWithSeriesAndFleetsDialog {
@@ -29,10 +29,10 @@ import com.sap.sailing.domain.common.LeaderboardNameConstants;
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
import com.sap.sailing.domain.common.dto.RaceColumnInSeriesDTO;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.StringListEditorComposite;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.StringListInlineEditorComposite;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sse.gwt.client.controls.listedit.StringListEditorComposite;
import com.sap.sse.gwt.client.controls.listedit.StringListInlineEditorComposite;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
@@ -206,9 +206,9 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
raceNamesEditor = new StringListInlineEditorComposite(getExistingRacesOfSeries(), new RaceNamesEditorUi(regatta, stringMessages, resources.removeIcon(), seriesName));
raceNamesEditor.ensureDebugId("RaceNamesStringListEditorComposite");
raceNamesEditor.addValueChangeHandler(new ValueChangeHandler<List<String>>() {
raceNamesEditor.addValueChangeHandler(new ValueChangeHandler<Iterable<String>>() {
@Override
public void onValueChange(ValueChangeEvent<List<String>> event) {
public void onValueChange(ValueChangeEvent<Iterable<String>> event) {
validate();
}
});
@@ -249,7 +249,7 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
private final Label addRacesHintLabel;
public RaceNamesEditorUi(RegattaDTO regatta, StringMessages stringMessages, ImageResource removeImage, String seriesName) {
super(stringMessages, removeImage, /* suggest values */ Collections.<String>emptyList(), 40);
super(stringMessages, removeImage, /* suggest values */ Collections.<String>emptyList(), stringMessages.enterRaceName(), 40);
this.seriesName = seriesName;
this.regatta = regatta;
@@ -269,6 +269,11 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
this.addRacesHintLabel = new Label("");
}
@Override
protected StringMessages getStringMessages() {
return (StringMessages) super.getStringMessages();
}
private List<String> resolveRaceNamesToAdd() {
List<String> result = new ArrayList<String>();
String racePrefix = raceNamePrefixTextBox.getText();
@@ -346,7 +351,7 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
HorizontalPanel addRacesPanel = new HorizontalPanel();
addRacesPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
addRacesPanel.setSpacing(5);
addRacesPanel.add(new Label(stringMessages.addRaces()));
addRacesPanel.add(new Label(getStringMessages().addRaces()));
for(int i = 1; i <= 50; i++) {
addRacesFromListBox.addItem("" + i);
@@ -368,9 +373,9 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
});
addRacesPanel.add(addRacesFromListBox);
addRacesPanel.add(new Label(stringMessages.to()));
addRacesPanel.add(new Label(getStringMessages().to()));
addRacesPanel.add(addRacesToListBox);
addRacesPanel.add(new Label(stringMessages.withNamePrefix()));
addRacesPanel.add(new Label(getStringMessages().withNamePrefix()));
raceNamePrefixTextBox.setWidth("20px");
if (LeaderboardNameConstants.DEFAULT_SERIES_NAME.equals(seriesName)) {
@@ -399,7 +404,7 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
}
validate();
} else {
Window.alert(stringMessages.pleaseSelectASeriesFirst());
Window.alert(getStringMessages().pleaseSelectASeriesFirst());
}
}
});
@@ -19,8 +19,8 @@ import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.domain.common.LeaderboardNameConstants;
import com.sap.sailing.domain.common.dto.FleetDTO;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
@@ -136,10 +136,9 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
fleetListComposite = new FleetListEditorComposite(Arrays.asList(new FleetDTO(LeaderboardNameConstants.DEFAULT_FLEET_NAME, 0, null)), stringMessages, resources.removeIcon());
fleetListComposite.ensureDebugId("FleetListEditorComposite");
fleetListComposite.addValueChangeHandler(new ValueChangeHandler<List<FleetDTO>>() {
fleetListComposite.addValueChangeHandler(new ValueChangeHandler<Iterable<FleetDTO>>() {
@Override
public void onValueChange(ValueChangeEvent<List<FleetDTO>> event) {
public void onValueChange(ValueChangeEvent<Iterable<FleetDTO>> event) {
validate();
}
});
@@ -1,7 +1,6 @@
package com.sap.sailing.gwt.ui.adminconsole;
import java.util.Collections;
import java.util.List;
import com.google.gwt.dom.client.Style.FontWeight;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -12,14 +11,14 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ExpandedListEditorUi;
import com.sap.sailing.gwt.ui.client.shared.controls.listedit.ListEditorComposite;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sse.gwt.client.controls.listedit.ExpandedListEditorUi;
import com.sap.sse.gwt.client.controls.listedit.ListEditorComposite;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
public class SeriesWithFleetsListEditor extends ListEditorComposite<SeriesDTO> {
public SeriesWithFleetsListEditor(List<SeriesDTO> initialValues, StringMessages stringMessages, ImageResource removeImage, boolean enableFleetRemoval) {
public SeriesWithFleetsListEditor(Iterable<SeriesDTO> initialValues, StringMessages stringMessages, ImageResource removeImage, boolean enableFleetRemoval) {
super(initialValues, new ExpandedUi(stringMessages, removeImage, enableFleetRemoval));
}
@@ -28,15 +27,20 @@ public class SeriesWithFleetsListEditor extends ListEditorComposite<SeriesDTO> {
super(stringMessages, removeImage, canRemoveItems);
}
@Override
protected StringMessages getStringMessages() {
return (StringMessages) super.getStringMessages();
}
@Override
protected Widget createAddWidget() {
Button addSeriesButton = new Button(stringMessages.addSeries());
Button addSeriesButton = new Button(getStringMessages().addSeries());
addSeriesButton.ensureDebugId("AddSeriesButton");
addSeriesButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SeriesWithFleetsCreateDialog dialog = new SeriesWithFleetsCreateDialog(Collections
.unmodifiableCollection(context.getValue()), stringMessages, new DialogCallback<SeriesDTO>() {
.unmodifiableCollection(context.getValue()), getStringMessages(), new DialogCallback<SeriesDTO>() {
@Override
public void cancel() {
}
@@ -57,7 +61,7 @@ public class SeriesWithFleetsListEditor extends ListEditorComposite<SeriesDTO> {
protected Widget createValueWidget(int rowIndex, SeriesDTO seriesDTO) {
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.setSpacing(5);
Label seriesLabel = new Label(stringMessages.series() + " '" + seriesDTO.getName() + "' :");
Label seriesLabel = new Label(getStringMessages().series() + " '" + seriesDTO.getName() + "' :");
seriesLabel.setWordWrap(false);
seriesLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
hPanel.add(seriesLabel);
@@ -66,9 +70,9 @@ public class SeriesWithFleetsListEditor extends ListEditorComposite<SeriesDTO> {
if (seriesDTO.getFleets() != null && seriesDTO.getFleets().size() > 0) {
if(seriesDTO.getFleets().size() == 1) {
fleetText = "1 " + stringMessages.fleet();
fleetText = "1 " + getStringMessages().fleet();
} else {
fleetText = seriesDTO.getFleets().size() + " " + stringMessages.fleets();
fleetText = seriesDTO.getFleets().size() + " " + getStringMessages().fleets();
}
fleetText += ": " + seriesDTO.getFleets().toString();
} else {
@@ -1,31 +1,30 @@
package com.sap.sailing.gwt.ui.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.debug.client.DebugInfo;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.resources.client.TextResource;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.async.PendingAjaxCallMarker;
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
import com.sap.sse.gwt.shared.DebugConstants;
import com.sap.sse.gwt.client.EntryPointHelper;
import com.sap.sse.security.ui.client.UserService;
import com.sap.sse.security.ui.shared.UserManagementService;
import com.sap.sse.security.ui.shared.UserManagementServiceAsync;
public abstract class AbstractEntryPoint implements EntryPoint, ErrorReporter, WindowSizeDetector {
public abstract class AbstractEntryPoint extends com.sap.sse.gwt.client.AbstractEntryPoint implements ErrorReporter, WindowSizeDetector {
private DialogBox errorDialogBox;
private HTML serverResponseLabel;
private Button dialogCloseButton;
protected StringMessages stringMessages;
protected UserAgentDetails userAgent;
protected Label persistentAlertLabel;
private UserService userService;
private UserManagementServiceAsync userManagementService;
/**
* The message displayed to the user when the server cannot be reached or
* returns an error.
@@ -33,29 +32,24 @@ public abstract class AbstractEntryPoint implements EntryPoint, ErrorReporter, W
private static final String SERVER_ERROR = "An error occurred while " //$NON-NLS-1$
+ "attempting to contact the server. Please check your network " + "connection and try again."; //$NON-NLS-1$ //$NON-NLS-2$
@Override
public final void onModuleLoad() {
if (DebugInfo.isDebugIdEnabled()) {
PendingAjaxCallBundle bundle = GWT.create(PendingAjaxCallBundle.class);
TextResource script = bundle.ajaxSemaphoreJS();
JavaScriptInjector.inject(script.getText());
DebugInfo.setDebugIdAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, false);
DebugInfo.setDebugIdPrefix(DebugConstants.DEBUG_ID_PREFIX);
}
doOnModuleLoad();
if (DebugInfo.isDebugIdEnabled()) {
PendingAjaxCallMarker.decrementPendingAjaxCalls(MarkedAsyncCallback.CATEGORY_GLOBAL);
}
}
protected void doOnModuleLoad() {
super.doOnModuleLoad();
userManagementService = GWT.create(UserManagementService.class);
EntryPointHelper.registerASyncService((ServiceDefTarget) userManagementService, com.sap.sse.security.ui.client.RemoteServiceMappingConstants.userManagementServiceRemotePath);
userService = new UserService(userManagementService);
stringMessages = GWT.create(StringMessages.class);
errorDialogBox = createErrorDialog(); /* TODO: Make this more generic (e.g. make it support all kinds of messages) */
userAgent = new UserAgentDetails(Window.Navigator.getUserAgent());
persistentAlertLabel = new Label("");
persistentAlertLabel.setStyleName("global-alert-message");
}
protected UserManagementServiceAsync getUserManagementService() {
return userManagementService;
}
protected UserService getUserService() {
return userService;
}
@Override
public void reportError(String message) {
@@ -87,7 +81,7 @@ public abstract class AbstractEntryPoint implements EntryPoint, ErrorReporter, W
}
public void createErrorPage(String message) {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages, this);
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages, this, getUserService());
logoAndTitlePanel.addStyleName("LogoAndTitlePanel");
RootPanel.get().add(logoAndTitlePanel);
RootPanel.get().add(new Label(message));
@@ -1,11 +1,10 @@
package com.sap.sailing.gwt.ui.client;
import java.util.Map;
import java.util.Map.Entry;
import com.google.gwt.user.client.Window;
import com.sap.sse.gwt.client.AbstractEntryPointLinkFactory;
public class EntryPointLinkFactory {
public class EntryPointLinkFactory extends AbstractEntryPointLinkFactory {
public static String createRaceBoardLink(Map<String, String> parameters) {
return createEntryPointLink("/gwt/RaceBoard.html", parameters);
}
@@ -21,34 +20,4 @@ public class EntryPointLinkFactory {
public static String createEventLink(Map<String, String> parameters, String eventId) {
return createEntryPointLink("/gwt/Home.html#EventPlace:eventId="+eventId, parameters);
}
private static String createEntryPointLink(String baseLink, Map<String, String> parameters) {
String debugParam = Window.Location.getParameter("gwt.codesvr");
String localeParam = Window.Location.getParameter("locale");
String[] documentAndFragment = baseLink.split("#", 2);
StringBuilder link = new StringBuilder(documentAndFragment[0]);
int i = 1;
for (Entry<String, String> entry: parameters.entrySet()) {
link.append(i == 1 ? "?" : "&");
link.append(entry.getKey() + "=" + replaceAmpersand(URLEncoder.encode(entry.getValue())));
i++;
}
if (debugParam != null && !debugParam.isEmpty()) {
link.append(i == 1 ? "?" : "&");
link.append("gwt.codesvr=" + debugParam);
}
if (localeParam != null && !localeParam.isEmpty()) {
link.append(i == 1 ? "?" : "&");
link.append("locale=" + localeParam);
}
if (documentAndFragment.length > 1) {
link.append('#');
link.append(URLEncoder.encode(documentAndFragment[1])); // append the fragment following the "#" again
}
return link.toString();
}
private static String replaceAmpersand(String param) {
return param.replaceAll("&", "%26");
}
}
@@ -61,7 +61,8 @@ public class GlobalNavigationPanel extends FlowPanel {
}
String leaderBoardLink = EntryPointLinkFactory.createLeaderboardLink(leaderboardLinkParameters);
addNavigationLink(leaderboardName, leaderBoardLink, "leaderBoard", stringMessages.goToOverviewAndSeeLeaderboard());
}
}
addLoginPanel();
}
private void addNavigationLink(String linkName, String linkUrl, String styleNameExtension, String htmlTitle) {
@@ -72,4 +73,8 @@ public class GlobalNavigationPanel extends FlowPanel {
linkHtml.setTitle(setHtmlTitle);
add(linkHtml);
}
private void addLoginPanel(){
}
}
@@ -5,6 +5,7 @@ import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RequiresResize;
import com.sap.sse.security.ui.client.UserService;
public class LogoAndTitlePanel extends FlowPanel implements RequiresResize {
private final String title;
@@ -15,16 +16,20 @@ public class LogoAndTitlePanel extends FlowPanel implements RequiresResize {
private boolean lastIsSmallWidth;
private final WindowSizeDetector windowSizeDetector;
private final StringMessages stringMessages;
@SuppressWarnings("unused") // preparing this panel for user management support; need proper styling for the panel, see also renderUI()
private final UserService userService;
public LogoAndTitlePanel(StringMessages stringConstants, WindowSizeDetector windowSizeDetector) {
this(null, null, stringConstants, windowSizeDetector);
public LogoAndTitlePanel(StringMessages stringConstants, WindowSizeDetector windowSizeDetector, UserService userService) {
this(null, null, stringConstants, windowSizeDetector, userService);
}
public LogoAndTitlePanel(String title, StringMessages stringConstants, WindowSizeDetector windowSizeDetector) {
this(title, null, stringConstants, windowSizeDetector);
public LogoAndTitlePanel(String title, StringMessages stringConstants, WindowSizeDetector windowSizeDetector, UserService userService) {
this(title, null, stringConstants, windowSizeDetector, userService);
}
public LogoAndTitlePanel(String title, String subtitle, StringMessages stringMessages, WindowSizeDetector windowSizeDetector) {
public LogoAndTitlePanel(String title, String subtitle, StringMessages stringMessages, WindowSizeDetector windowSizeDetector, UserService userService) {
this.userService = userService;
this.title = title;
this.subtitle = subtitle;
this.stringMessages = stringMessages;
@@ -73,6 +78,8 @@ public class LogoAndTitlePanel extends FlowPanel implements RequiresResize {
subTitleLabelWrapper.add(subTitleLabel);
this.add(subTitleLabelWrapper);
}
// When we want to add a login panel to the logo and title panel, it may look like this:
// this.add(new LoginPanel(SecurityStylesheetResources.INSTANCE.css(), userService));
}
public String getTitle() {
@@ -2,16 +2,20 @@ package com.sap.sailing.gwt.ui.client;
/**
* Constants for remote services
* The path value must fit with the corresponding path of the service in the web.xml
* The @RemoteServiceRelativePath annotation can't be used to automatically resolve the right path because
* it uses GWT.getModuleBaseURL() to calculate the path which is different of each EntryPoint.
* Constants for remote services. The path value must fit with the corresponding path of the service in the web.xml The
* <code>@RemoteServiceRelativePath</code> annotation can't be used to automatically resolve the right path because it
* uses <code>GWT.getModuleBaseURL()</code> to calculate the path which is different for each EntryPoint.
*
* @author Frank
*
*/
public interface RemoteServiceMappingConstants {
public static final String userManagementServiceRemotePath = "service/usermanagement";
/**
* The hosting bundle's web context path from the OSGi manifest. This is the URL prefix under which all services are
* registered based on their relative path specification in the <code>web.xml</code> descriptor.
*/
public static final String WEB_CONTEXT_PATH = "gwt";
public static final String mediaServiceRemotePath = "service/media";
public static final String sailingServiceRemotePath = "service/sailing";
@@ -2,6 +2,8 @@ package com.sap.sailing.gwt.ui.client;
import com.sap.sse.gwt.client.mvp.ClientFactory;
import com.sap.sse.gwt.client.mvp.ErrorView;
import com.sap.sse.security.ui.client.UserService;
import com.sap.sse.security.ui.shared.UserManagementServiceAsync;
/**
* A client factory that can deliver the sailing-specific services.
@@ -14,5 +16,9 @@ public interface SailingClientFactory extends ClientFactory {
MediaServiceAsync getMediaService();
UserManagementServiceAsync getUserManagementService();
UserService getUserService();
ErrorView createErrorView(String errorMessage, Throwable errorReason);
}
@@ -1,20 +0,0 @@
package com.sap.sailing.gwt.ui.client;
import com.google.gwt.core.client.GWT;
import com.sap.sse.gwt.client.mvp.ClientFactoryImpl;
import com.sap.sse.gwt.client.mvp.TopLevelView;
public abstract class SailingClientFactoryImpl extends ClientFactoryImpl implements SailingClientFactory {
private final SailingServiceAsync sailingService;
public SailingClientFactoryImpl(TopLevelView root) {
super(root);
sailingService = GWT.create(SailingServiceAsync.class);
}
@Override
public SailingServiceAsync getSailingService() {
return sailingService;
}
}
@@ -1,14 +1,10 @@
package com.sap.sailing.gwt.ui.client;
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.Messages;
public interface StringMessages extends Messages {
public interface StringMessages extends com.sap.sse.gwt.client.StringMessages {
public static final StringMessages INSTANCE = GWT.create(StringMessages.class);
String helloWorld();
String kielWeel2011();
String stgAccount();
String tracTracEvents();
String swissTimingEvents();
String trackedBefore();
@@ -1097,9 +1093,17 @@ public interface StringMessages extends Messages {
String showAll();
String raceVisibilityColumn();
String enterCarryValueFor(String competitorName);
String advanced();
String basedOn();
String retrieveWith();
String mappingDetails();
String deviceMappingQrCodeExplanation();
String qrCode();
String enterCourseAreaName();
String enterImageURL();
String enterVideoURL();
String enterSponsorImageURL();
String enterRaceName();
String enterCourseName();
String scoringSchemeHighPointFirstGetsTenOrEightDescription();
}
@@ -1,6 +1,3 @@
helloWorld=Hello World
kielWeel2011=Kiel Week 2011
stgAccount=STG Account
tracTracEvents=TracTrac Events
swissTimingEvents=SwissTiming Events
trackedBefore=History of tracked events
@@ -1078,8 +1075,16 @@ mediaManageMediaTooltip=Configure audio and video clips, synchronize times
showAll=Show all
raceVisibilityColumn=Visibility
enterCarryValueFor=Enter carried points for competitor {0}
advanced=Advanced
basedOn=based on
retrieveWith=Retrieve with
mappingDetails=Mapping Details
deviceMappingQrCodeExplanation=If you are using the Tracking App, you can add the device mapping also by selecting a competitor/mark, setting the from and to times, and then scanning this QRCode.
qrCode=QRCode
enterCourseAreaName=Enter course area name...
enterCourseName=Enter course name...
enterImageURL=Enter image URL...
enterVideoURL=Enter video URL...
enterSponsorImageURL=Enter sponsor image URL...
enterRaceName=Enter race name...
scoringSchemeHighPointFirstGetsTenOrEightDescription=Score in points. Winner scores 10 points, 2nd - 9 points, ..., boats coming 10th and after score 1 point each. A tie is broken in favour of the competitor having won most races, if tie remains then tie is broken by the rank in the last race scored.
@@ -1,6 +1,3 @@
helloWorld=Hello World
kielWeel2011=Kiel Week 2011
stgAccount=STG Account
tracTracEvents=TracTrac Events
swissTimingEvents=SwissTiming Events
trackedBefore=Historie verfolgter Events
@@ -1073,8 +1070,15 @@ mediaManageMediaTooltip=Audio- und Video-Clips verwalten, Zeiten synchronisieren
showAll=Alle zeigen
raceVisibilityColumn=Sichtbarkeit
enterCarryValueFor=Punkteübertrag für Teilnehmer {0} erfassen
basedOn=basierend auf
advanced=Erweitert
retrieveWith=Beschaffe mit
mappingDetails=Zuordnungsdetails
deviceMappingQrCodeExplanation=Wenn die Tracking App verwendet wird, kann die Zuordnung auch wie folgt geschehen: Wettbewerber/Tonne auswaehlen, von und bis Zeiten setzen und dann den QRCode abscannen.
qrCode=QRCode
enterCourseAreaName=Regattabahn-Namen eingeben...
enterCourseName=Regattakurs-Namen eingeben...
enterImageURL=Bild-URL eingeben...
enterVideoURL=Video-URL eingeben...
enterSponsorImageURL=Sponsorbild-URL eingeben...
enterRaceName=Wettfahrtnamen eingeben...
scoringSchemeHighPointFirstGetsTenOrEightDescription=High Point System, der Gewinner erhält 10 Punkte, der Zweite 8 und so weiter. Die Plätze 10 und tiefer erhalten einen Punkt.
@@ -1,7 +1,4 @@
# If you want new properties translated then sent this over GMR (Mark Angell <mangell@gmr.com>)
helloWorld=Привет Мир
kielWeel2011=Кильская Неделя 2011
stgAccount=Счет STG
tracTracEvents=События Трак Трак
swissTimingEvents=События Swiss Timing
trackedBefore=Ранее Отслеженные
@@ -1026,5 +1023,11 @@ mediaManageMediaTooltip=Configure audio and video clips, synchronize times
showAll=Show all
raceVisibilityColumn=Visibility
enterCarryValueFor=Enter carried points for competitor {0}
basedOn=based on
retrieveWith=Retrieve with
advanced=Advanced
enterCourseAreaName=Enter course area name...
enterCourseName=Enter course name...
enterImageURL=Enter image URL...
enterVideoURL=Enter video URL...
enterSponsorImageURL=Enter sponsor image URL...
enterRaceName=Enter race name...
scoringSchemeHighPointFirstGetsTenOrEightDescription=Score in points. Winner scores 10 points, 2nd - 9 points, ..., boats coming 10th and after score 1 point each. A tie is broken in favour of the competitor having won most races, if tie remains then tie is broken by the rank in the last race scored.
@@ -1,13 +0,0 @@
package com.sap.sailing.gwt.ui.client;
import com.google.gwt.user.client.rpc.RemoteService;
import com.sap.sailing.gwt.ui.shared.UserDTO;
public interface UserManagementService extends RemoteService {
public boolean isUserInRole(String userRole);
public void logoutUser();
public UserDTO getUser();
}
@@ -1,14 +0,0 @@
package com.sap.sailing.gwt.ui.client;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sap.sailing.gwt.ui.shared.UserDTO;
public interface UserManagementServiceAsync {
void isUserInRole(String userRole, AsyncCallback<Boolean> callback);
void getUser(AsyncCallback<UserDTO> callback);
void logoutUser(AsyncCallback<Void> callback);
}
@@ -40,7 +40,7 @@ import com.sap.sailing.gwt.ui.client.media.shared.VideoPlayer;
import com.sap.sailing.gwt.ui.client.media.shared.VideoSynchPlayer;
import com.sap.sailing.gwt.ui.client.shared.components.Component;
import com.sap.sailing.gwt.ui.client.shared.components.SettingsDialogComponent;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sailing.gwt.ui.usermanagement.UserRoles;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
import com.sap.sse.gwt.client.player.PlayStateListener;
import com.sap.sse.gwt.client.player.TimeListener;
@@ -49,6 +49,8 @@ import com.sap.sse.gwt.client.player.Timer.PlayModes;
import com.sap.sse.gwt.client.player.Timer.PlayStates;
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
import com.sap.sse.gwt.client.useragent.UserAgentDetails.AgentTypes;
import com.sap.sse.security.ui.client.UserService;
import com.sap.sse.security.ui.shared.UserDTO;
public class MediaPlayerManagerComponent implements Component<Void>, PlayStateListener, TimeListener,
MediaPlayerManager, CloseHandler<Window>, ClosingHandler {
@@ -59,6 +61,7 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
}
private final SimplePanel rootPanel = new SimplePanel();
private final UserService userService;
private MediaPlayer activeAudioPlayer;
private VideoPlayer dockedVideoPlayer;
@@ -73,7 +76,6 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
private final StringMessages stringMessages;
private final ErrorReporter errorReporter;
private final UserAgentDetails userAgent;
private final UserDTO user;
private final PopupPositionProvider popupPositionProvider;
private boolean autoSelectMedia;
@@ -81,8 +83,9 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
public MediaPlayerManagerComponent(RegattaAndRaceIdentifier selectedRaceIdentifier,
RaceTimesInfoProvider raceTimesInfoProvider, Timer raceTimer, MediaServiceAsync mediaService,
StringMessages stringMessages, ErrorReporter errorReporter, UserAgentDetails userAgent, UserDTO user,
PopupPositionProvider popupPositionProvider, boolean autoSelectMedia) {
UserService userService, StringMessages stringMessages, ErrorReporter errorReporter,
UserAgentDetails userAgent, PopupPositionProvider popupPositionProvider, boolean autoSelectMedia) {
this.userService = userService;
this.raceIdentifier = selectedRaceIdentifier;
this.raceTimesInfoProvider = raceTimesInfoProvider;
this.raceTimer = raceTimer;
@@ -97,7 +100,6 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
this.stringMessages = stringMessages;
this.errorReporter = errorReporter;
this.userAgent = userAgent;
this.user = user;
this.popupPositionProvider = popupPositionProvider;
this.autoSelectMedia = autoSelectMedia;
@@ -440,12 +442,10 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
} else {
// nothing changed
}
}
private <T> T createAndWrapVideoPlayer(final MediaTrack videoTrack, VideoContainerFactory<T> videoContainerFactory) {
final PopoutWindowPlayer.PlayerCloseListener playerCloseListener = new PopoutWindowPlayer.PlayerCloseListener() {
private VideoContainer videoContainer;
@Override
@@ -464,7 +464,6 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
}
};
PopoutListener popoutListener = new PopoutListener() {
@Override
public void popoutVideo(MediaTrack videoTrack) {
VideoContainer videoContainer;
@@ -477,10 +476,10 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
closeFloatingVideo(videoTrack);
}
};
final VideoSynchPlayer videoPlayer;
boolean showSynchControls = this.user != null;
final UserDTO currentUser = userService.getCurrentUser();
boolean showSynchControls = currentUser != null && (currentUser.hasRole(UserRoles.administrator.getRolename()) ||
currentUser.hasRole(UserRoles.eventmanager.getRolename()) || currentUser.hasRole(UserRoles.mediaeditor.getRolename()));
if (videoTrack.isYoutube()) {
videoPlayer = new VideoYoutubePlayer(videoTrack, getRaceStartTime(), showSynchControls, raceTimer);
} else {
@@ -662,7 +661,7 @@ public class MediaPlayerManagerComponent implements Component<Void>, PlayStateLi
@Override
public boolean allowsEditing() {
return this.user != null;
return userService.getCurrentUser() != null;
}
@Override
@@ -4,29 +4,23 @@ import com.google.gwt.dom.client.Style;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.shared.UserDTO;
public class UserStatusPanel extends FlowPanel {
private final UserDTO user;
private final Label userNameLabel;
private final Label userNameText;
private final Label userRolesText;
public UserStatusPanel(UserDTO user) {
public UserStatusPanel() {
super();
this.user = user;
userNameLabel = new Label("User:");
userNameText = new Label("");
userRolesText = new Label("");
addFloatingWidget(userNameLabel);
addFloatingWidget(userNameText);
addFloatingWidget(userRolesText);
updateUser();
}
@@ -37,12 +31,13 @@ public class UserStatusPanel extends FlowPanel {
}
private void updateUser() {
if(user != null) {
userNameText.setText(user.principalName);
userRolesText.setText(user.roles.toString());
} else {
userNameText.setText("Unknown");
userRolesText.setText("Unknown");
}
// if(user != null) {
// userNameText.setText(user.principalName);
// userRolesText.setText(user.roles.toString());
// } else {
// userNameText.setText("Unknown");
// userRolesText.setText("Unknown");
// }
// }
}
}
@@ -71,7 +71,7 @@ public class DataMiningEntryPoint extends AbstractEntryPoint {
}
private LogoAndTitlePanel createLogoAndTitlePanel() {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.dataMining(), stringMessages, this);
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.dataMining(), stringMessages, this, getUserService());
logoAndTitlePanel.addStyleName("LogoAndTitlePanel");
FlowPanel globalNavigationPanel = new GlobalNavigationPanel(stringMessages, true, null, null, /* event */ null, null);
logoAndTitlePanel.add(globalNavigationPanel);
@@ -57,9 +57,7 @@ public class LeaderboardEntryPoint extends AbstractEntryPoint {
@Override
protected void doOnModuleLoad() {
super.doOnModuleLoad();
EntryPointHelper.registerASyncService((ServiceDefTarget) sailingService, RemoteServiceMappingConstants.sailingServiceRemotePath);
final boolean showRaceDetails = GwtHttpRequestUtils.getBooleanParameter(LeaderboardUrlSettings.PARAM_SHOW_RACE_DETAILS, false /* default*/);
final boolean embedded = GwtHttpRequestUtils.getBooleanParameter(LeaderboardUrlSettings.PARAM_EMBEDDED, false /* default*/);
final boolean hideToolbar = GwtHttpRequestUtils.getBooleanParameter(LeaderboardUrlSettings.PARAM_HIDE_TOOLBAR, false /* default*/);
@@ -118,7 +116,12 @@ public class LeaderboardEntryPoint extends AbstractEntryPoint {
}
final String zoomTo = Window.Location.getParameter(LeaderboardUrlSettings.PARAM_ZOOM_TO);
if (zoomTo != null) {
RootPanel.getBodyElement().setAttribute("style", "zoom: "+zoomTo+";-moz-transform: scale("+zoomTo+");-moz-transform-origin: 0 0;-o-transform: scale("+zoomTo+");-o-transform-origin: 0 0;-webkit-transform: scale("+zoomTo+");-webkit-transform-origin: 0 0;");
RootPanel.getBodyElement().setAttribute(
"style",
"zoom: " + zoomTo + ";-moz-transform: scale(" + zoomTo
+ ");-moz-transform-origin: 0 0;-o-transform: scale(" + zoomTo
+ ");-o-transform-origin: 0 0;-webkit-transform: scale(" + zoomTo
+ ");-webkit-transform-origin: 0 0;");
}
}
@@ -133,7 +136,7 @@ public class LeaderboardEntryPoint extends AbstractEntryPoint {
leaderboardDisplayName = leaderboardName;
}
globalNavigationPanel = new GlobalNavigationPanel(stringMessages, true, null, leaderboardGroupName, event, null);
logoAndTitlePanel = new LogoAndTitlePanel(leaderboardGroupName, leaderboardDisplayName, stringMessages, this) {
logoAndTitlePanel = new LogoAndTitlePanel(leaderboardGroupName, leaderboardDisplayName, stringMessages, this, getUserService()) {
@Override
public void onResize() {
super.onResize();
@@ -164,7 +167,7 @@ public class LeaderboardEntryPoint extends AbstractEntryPoint {
boolean showOverallLeaderboard = GwtHttpRequestUtils.getBooleanParameter(LeaderboardUrlSettings.PARAM_SHOW_OVERALL_LEADERBOARD, false);
boolean showSeriesLeaderboards = GwtHttpRequestUtils.getBooleanParameter(LeaderboardUrlSettings.PARAM_SHOW_SERIES_LEADERBOARDS, false);
String chartDetailParam = GwtHttpRequestUtils.getStringParameter(LeaderboardUrlSettings.PARAM_CHART_DETAIL, null);
DetailType chartDetailType;
final DetailType chartDetailType;
if (chartDetailParam != null && (DetailType.REGATTA_RANK.name().equals(chartDetailParam) || DetailType.OVERALL_RANK.name().equals(chartDetailParam) ||
DetailType.REGATTA_TOTAL_POINTS_SUM.name().equals(chartDetailParam))) {
chartDetailType = DetailType.valueOf(chartDetailParam);
@@ -240,7 +243,7 @@ public class LeaderboardEntryPoint extends AbstractEntryPoint {
namesOfRacesToShow.get(0) : null,
/* ascending */ true, /* updateUponPlayStateChange */ raceDetails.isEmpty() && legDetails.isEmpty(),
raceColumnSelectionStrategy, showAddedScores, showOverallColumnWithNumberOfRacesSailedPerCompetitor);
} else {
final List<DetailType> overallDetails = Collections.singletonList(DetailType.REGATTA_RANK);
result = LeaderboardSettingsFactory.getInstance().createNewDefaultSettings(null, null,
@@ -2,7 +2,7 @@ package com.sap.sailing.gwt.ui.leaderboard;
import com.google.gwt.user.client.Window;
import com.sap.sailing.domain.common.DetailType;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sse.gwt.client.URLEncoder;
public class LeaderboardUrlSettings {
public static final String PARAM_LEADERBOARD_GROUP_NAME = "leaderboardGroupName";
@@ -33,4 +33,13 @@ public class ScoringSchemeTypeFormatter {
}
return null;
}
public static String getDescription(ScoringSchemeType scoringSchemeType, StringMessages stringMessages) {
switch(scoringSchemeType) {
case HIGH_POINT_FIRST_GETS_TEN_OR_EIGHT:
return stringMessages.scoringSchemeHighPointFirstGetsTenOrEightDescription();
default:
return format(scoringSchemeType, stringMessages);
}
}
}
@@ -32,7 +32,7 @@ public class LeaderboardEditPage extends AbstractEntryPoint {
public void onSuccess(List<String> leaderboardNames) {
String leaderboardName = Window.Location.getParameter("name");
if (leaderboardNames.contains(leaderboardName)) {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.editScores(), stringMessages, LeaderboardEditPage.this);
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.editScores(), stringMessages, LeaderboardEditPage.this, getUserService());
logoAndTitlePanel.addStyleName("LogoAndTitlePanel");
EditableLeaderboardPanel leaderboardPanel = new EditableLeaderboardPanel(sailingService, new AsyncActionsExecutor(), leaderboardName, null,
LeaderboardEditPage.this, stringMessages, userAgent);
@@ -28,13 +28,10 @@ import com.sap.sailing.gwt.ui.client.RaceTimesInfoProvider;
import com.sap.sailing.gwt.ui.client.RemoteServiceMappingConstants;
import com.sap.sailing.gwt.ui.client.SailingService;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.UserManagementService;
import com.sap.sailing.gwt.ui.client.UserManagementServiceAsync;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sse.gwt.client.EntryPointHelper;
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
import com.sap.sse.gwt.client.player.Timer;
@@ -59,13 +56,11 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
private final SailingServiceAsync sailingService = GWT.create(SailingService.class);
private final MediaServiceAsync mediaService = GWT.create(MediaService.class);
private final UserManagementServiceAsync userManagementService = GWT.create(UserManagementService.class);
@Override
protected void doOnModuleLoad() {
super.doOnModuleLoad();
EntryPointHelper.registerASyncService((ServiceDefTarget) userManagementService, RemoteServiceMappingConstants.userManagementServiceRemotePath);
EntryPointHelper.registerASyncService((ServiceDefTarget) sailingService, RemoteServiceMappingConstants.sailingServiceRemotePath);
EntryPointHelper.registerASyncService((ServiceDefTarget) mediaService, RemoteServiceMappingConstants.mediaServiceRemotePath);
@@ -111,11 +106,9 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
final ParallelExecutionCallback<List<RegattaDTO>> getRegattasCallback = new ParallelExecutionCallback<List<RegattaDTO>>();
final ParallelExecutionCallback<LeaderboardGroupDTO> getLeaderboardGroupByNameCallback = new ParallelExecutionCallback<LeaderboardGroupDTO>();
final ParallelExecutionCallback<EventDTO> getEventByIdCallback = new ParallelExecutionCallback<EventDTO>();
final ParallelExecutionCallback<UserDTO> getUserCallback = new ParallelExecutionCallback<UserDTO>();
List<ParallelExecutionCallback<?>> callbacks = new ArrayList<>();
callbacks.add(getLeaderboardNamesCallback);
callbacks.add(getRegattasCallback);
callbacks.add(getUserCallback);
if (leaderboardGroupName != null) {
callbacks.add(getLeaderboardGroupByNameCallback);
}
@@ -129,7 +122,7 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
checkUrlParameters(getLeaderboardNamesCallback.getData(),
leaderboardGroupName == null ? null : getLeaderboardGroupByNameCallback.getData(),
canReplayWhileLiveIsPossible, getRegattasCallback.getData(), eventId == null ? null : getEventByIdCallback.getData(),
getUserCallback.getData(), showMapControls);
showMapControls);
}
@Override
@@ -145,11 +138,10 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
if (leaderboardGroupName != null) {
sailingService.getLeaderboardGroupByName(leaderboardGroupNameParamValue, false /*withGeoLocationData*/, getLeaderboardGroupByNameCallback);
}
userManagementService.getUser(getUserCallback);
}
private void checkUrlParameters(List<String> leaderboardNames, LeaderboardGroupDTO leaderboardGroup,
boolean canReplayWhileLiveIsPossible, List<RegattaDTO> regattas, EventDTO event, UserDTO user,
boolean canReplayWhileLiveIsPossible, List<RegattaDTO> regattas, EventDTO event,
boolean showMapControls) {
if (!leaderboardNames.contains(leaderboardName)) {
createErrorPage(stringMessages.noSuchLeaderboard());
@@ -196,8 +188,8 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
Timer timer = new Timer(PlayModes.Replay, 1000l);
AsyncActionsExecutor asyncActionsExecutor = new AsyncActionsExecutor();
RaceTimesInfoProvider raceTimesInfoProvider = new RaceTimesInfoProvider(sailingService, asyncActionsExecutor, this, singletonList, 5000l /* requestInterval*/);
RaceBoardPanel raceBoardPanel = new RaceBoardPanel(sailingService, mediaService, asyncActionsExecutor, user, timer, raceSelectionModel, leaderboardName,
leaderboardGroupName, event, raceboardViewConfig, RaceBoardEntryPoint.this, stringMessages, userAgent, raceTimesInfoProvider, showMapControls);
RaceBoardPanel raceBoardPanel = new RaceBoardPanel(sailingService, mediaService, getUserService(), asyncActionsExecutor, timer, raceSelectionModel,
leaderboardName, leaderboardGroupName, event, raceboardViewConfig, RaceBoardEntryPoint.this, stringMessages, userAgent, raceTimesInfoProvider, showMapControls);
raceBoardPanel.fillRegattas(regattas);
createRaceBoardInOneScreenMode(raceBoardPanel, raceboardViewConfig);
}
@@ -54,12 +54,12 @@ import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSettings;
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSettingsFactory;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sse.common.filter.FilterSet;
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
import com.sap.sse.gwt.client.player.TimeRangeWithZoomModel;
import com.sap.sse.gwt.client.player.Timer;
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
import com.sap.sse.security.ui.client.UserService;
/**
* A view showing a list of components visualizing a race from the regattas announced by calls to {@link #fillRegattas(List)}.
@@ -73,7 +73,6 @@ import com.sap.sse.gwt.client.useragent.UserAgentDetails;
public class RaceBoardPanel extends SimplePanel implements RegattasDisplayer, RaceSelectionChangeListener, LeaderboardUpdateListener, PopupPositionProvider {
private final SailingServiceAsync sailingService;
private final MediaServiceAsync mediaService;
private final UserDTO user;
private final EventDTO event;
private final StringMessages stringMessages;
private final ErrorReporter errorReporter;
@@ -119,14 +118,13 @@ public class RaceBoardPanel extends SimplePanel implements RegattasDisplayer, Ra
* context of an event; may be <code>null</code>.
*/
public RaceBoardPanel(SailingServiceAsync sailingService, MediaServiceAsync mediaService,
AsyncActionsExecutor asyncActionsExecutor, UserDTO theUser, Timer timer,
RaceSelectionProvider theRaceSelectionProvider, String leaderboardName, String leaderboardGroupName,
EventDTO event, RaceBoardViewConfiguration raceboardViewConfiguration, ErrorReporter errorReporter,
final StringMessages stringMessages, UserAgentDetails userAgent,
RaceTimesInfoProvider raceTimesInfoProvider, boolean showMapControls) {
UserService userService, AsyncActionsExecutor asyncActionsExecutor,
Timer timer, RaceSelectionProvider theRaceSelectionProvider, String leaderboardName,
String leaderboardGroupName, EventDTO event, RaceBoardViewConfiguration raceboardViewConfiguration,
ErrorReporter errorReporter, final StringMessages stringMessages,
UserAgentDetails userAgent, RaceTimesInfoProvider raceTimesInfoProvider, boolean showMapControls) {
this.sailingService = sailingService;
this.mediaService = mediaService;
this.user = theUser;
this.stringMessages = stringMessages;
this.raceboardViewConfiguration = raceboardViewConfiguration;
this.raceSelectionProvider = theRaceSelectionProvider;
@@ -169,7 +167,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattasDisplayer, Ra
leaderboardPanel.setTitle(stringMessages.leaderboard());
leaderboardPanel.getElement().getStyle().setMarginLeft(6, Unit.PX);
leaderboardPanel.getElement().getStyle().setMarginTop(4, Unit.PX);
createOneScreenView(leaderboardName, leaderboardGroupName, event, mainPanel, showMapControls, raceMap); // initializes the raceMap field
createOneScreenView(leaderboardName, leaderboardGroupName, event, mainPanel, showMapControls, raceMap, userService); // initializes the raceMap field
leaderboardPanel.addLeaderboardUpdateListener(this);
// in case the URL configuration contains the name of a competitors filter set we try to activate it
// FIXME the competitorsFilterSets has now moved to CompetitorSearchTextBox (which should probably be renamed); pass on the parameters to the LeaderboardPanel and see what it does with it
@@ -195,7 +193,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattasDisplayer, Ra
* the {@link GlobalNavigationPanel}.
*/
private void createOneScreenView(String leaderboardName, String leaderboardGroupName, EventDTO event, FlowPanel mainPanel,
boolean showMapControls, RaceMap raceMap) {
boolean showMapControls, RaceMap raceMap, UserService userService) {
// create the default leaderboard and select the right race
raceTimesInfoProvider.addRaceTimesInfoProviderListener(raceMap);
raceMap.onRaceSelectionChange(Collections.singletonList(selectedRaceIdentifier));
@@ -213,9 +211,10 @@ public class RaceBoardPanel extends SimplePanel implements RegattasDisplayer, Ra
windChart.getEntryWidget().setTitle(stringMessages.windChart());
components.add(windChart);
boolean autoSelectMedia = getConfiguration().isAutoSelectMedia();
MediaPlayerManagerComponent mediaPlayerManagerComponent = new MediaPlayerManagerComponent(selectedRaceIdentifier, raceTimesInfoProvider,
timer, mediaService, stringMessages, errorReporter, userAgent, user, this, autoSelectMedia);
leaderboardAndMapViewer = new SideBySideComponentViewer(leaderboardPanel, raceMap, mediaPlayerManagerComponent, components, stringMessages, this.user);
MediaPlayerManagerComponent mediaPlayerManagerComponent = new MediaPlayerManagerComponent(
selectedRaceIdentifier, raceTimesInfoProvider, timer, mediaService, userService, stringMessages,
errorReporter, userAgent, this, autoSelectMedia);
leaderboardAndMapViewer = new SideBySideComponentViewer(leaderboardPanel, raceMap, mediaPlayerManagerComponent, components, stringMessages);
componentViewers.add(leaderboardAndMapViewer);
for (ComponentViewer componentViewer : componentViewers) {
mainPanel.add(componentViewer.getViewerWidget());
@@ -26,7 +26,6 @@ import com.sap.sailing.gwt.ui.client.shared.components.Component;
import com.sap.sailing.gwt.ui.client.shared.components.ComponentViewer;
import com.sap.sailing.gwt.ui.client.shared.components.SettingsDialog;
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sse.common.Util.Pair;
/**
@@ -70,7 +69,7 @@ public class SideBySideComponentViewer implements ComponentViewer {
public SideBySideComponentViewer(final LeaderboardPanel leftComponentP, final Component<?> rightComponentP,
final MediaPlayerManagerComponent mediaPlayerManagerComponent, List<Component<?>> components,
final StringMessages stringMessages, UserDTO user) {
final StringMessages stringMessages) {
this.stringMessages = stringMessages;
this.leftComponent = leftComponentP;
this.rightComponent = rightComponentP;
@@ -79,7 +78,7 @@ public class SideBySideComponentViewer implements ComponentViewer {
this.mediaManagementButton = createMediaManagementButton(mediaPlayerManagerComponent);
mediaPlayerManagerComponent.setPlayerChangeListener(new PlayerChangeListener() {
public void notifyStateChange(){
String caption;
String tooltip;
@@ -143,7 +142,7 @@ public class SideBySideComponentViewer implements ComponentViewer {
List<Pair<Button, Component<?>>> additionalVerticalButtons = new ArrayList<Pair<Button, Component<?>>>();
additionalVerticalButtons.add(new Pair<Button, Component<?>>(mediaSelectionButton,
mediaPlayerManagerComponent));
if (user != null) {
if (/* TODO check for correct role; was: user != null */ true) {
additionalVerticalButtons.add(new Pair<Button, Component<?>>(mediaManagementButton,
mediaPlayerManagerComponent));
}
@@ -21,10 +21,10 @@ import com.sap.sailing.gwt.ui.client.LogoAndTitlePanel;
import com.sap.sailing.gwt.ui.client.RemoteServiceMappingConstants;
import com.sap.sailing.gwt.ui.client.SailingService;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.URLEncoder;
import com.sap.sailing.gwt.ui.regattaoverview.RegattaRaceStatesComponent.EntryHandler;
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
import com.sap.sse.gwt.client.EntryPointHelper;
import com.sap.sse.gwt.client.URLEncoder;
public class RegattaOverviewEntryPoint extends AbstractEntryPoint {
@@ -53,7 +53,7 @@ public class RegattaOverviewEntryPoint extends AbstractEntryPoint {
boolean embedded = Window.Location.getParameter("embedded") != null
&& Window.Location.getParameter("embedded").equalsIgnoreCase("true");
if (!embedded) {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.eventOverview(), stringMessages, this);
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(stringMessages.eventOverview(), stringMessages, this, getUserService());
logoAndTitlePanel.addStyleName("LogoAndTitlePanel");
containerPanel.addNorth(logoAndTitlePanel, 68);
} else {
@@ -1,63 +0,0 @@
package com.sap.sailing.gwt.ui.server;
import java.security.Principal;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import com.sap.sailing.gwt.ui.client.UserManagementService;
import com.sap.sailing.gwt.ui.shared.UserDTO;
import com.sap.sailing.gwt.ui.usermanagement.UserRoles;
/*
* This is a extremly simple implementation of a user management service.
*/
public class UserManagementServiceImpl extends ProxiedRemoteServiceServlet implements UserManagementService {
private static final long serialVersionUID = -6360444730702283475L;
// private static final Logger logger = Logger.getLogger(UserManagementServiceImpl.class.getName());
@Override
public boolean isUserInRole(String userRole) {
return getThreadLocalRequest().isUserInRole(userRole);
}
@Override
public void logoutUser() {
HttpSession session = getThreadLocalRequest().getSession();
if(session != null) {
session.invalidate();
session = null;
}
}
@Override
public UserDTO getUser() {
HttpServletRequest threadLocalRequest = getThreadLocalRequest();
Principal userPrincipal = threadLocalRequest.getUserPrincipal();
List<String> roles = new ArrayList<String>();
if (userPrincipal != null) {
UserDTO userDTO = new UserDTO(userPrincipal.getName());
for(UserRoles role: UserRoles.values()) {
if (threadLocalRequest.isUserInRole(role.name())) {
roles.add(role.name());
}
}
userDTO.roles = roles;
return userDTO;
}
return null;
}
@Override
/**
* Override of function to prevent exception "Blocked request without GWT permutation header (XSRF attack?)" when testing the GWT sites
*/
protected void checkPermutationStrongName() throws SecurityException {
}
}
@@ -0,0 +1,22 @@
.loginPanel {
}
.loginPanel-welcomeMessage {
padding-left: 5px;
padding-right: 5px;
}
.loginPanel-link {
padding-left: 5px;
padding-right: 5px;
}
.loginPanel-userIcon {
padding-left: 5px;
padding-right: 5px;
}
.loginPanel-providerIcon {
padding-left: 2px;
padding-right: 2px;
}
@@ -0,0 +1,12 @@
package com.sap.sailing.gwt.ui.shared;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.sap.sse.security.ui.loginpanel.Css;
public interface SecurityStylesheetResources extends ClientBundle {
public static final SecurityStylesheetResources INSTANCE = GWT.create(SecurityStylesheetResources.class);
@Source("LoginPanel.css")
public Css css();
}
@@ -1,23 +0,0 @@
package com.sap.sailing.gwt.ui.shared;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
public class UserDTO implements IsSerializable {
public String principalName;
public String firstname;
public String lastname;
public List<String> roles;
public UserDTO() {
}
public UserDTO(String principalName) {
super();
this.principalName = principalName;
}
}
@@ -182,7 +182,7 @@ public class SimulatorEntryPoint extends AbstractEntryPoint {
}
private FlowPanel createLogoAndTitlePanel(SimulatorMainPanel simulatorPanel) {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(titleName, null, stringMessages, this);
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(titleName, null, stringMessages, this, getUserService());
/*{
@Override
public void onResize() {
Loaded 100 of 373 files, more files were not shown because too many files have changed in this diff. Show more