Merge branch 'master' into ubilabs--tracking_app--develop
No files matched your search
@@ -95,7 +95,7 @@ parallelexecution=0
|
||||
p2local=0
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "buildAndUpdateProduct [-b -u -g -t -a -r -o -c -p -v -m <config> -n <package> -l <port> -x <gwt-workers>] [build|install|all|hot-deploy|remote-deploy|local-deploy|release]"
|
||||
echo "buildAndUpdateProduct [-b -u -g -t -a -r -o -c -p -v -m <config> -n <package> -l <port> -x <gwt-workers> -j <test-package>] [build|install|all|hot-deploy|remote-deploy|local-deploy|release]"
|
||||
echo ""
|
||||
echo "-g Disable GWT compile, no gwt files will be generated, old ones will be preserved."
|
||||
echo "-b Build GWT permutation only for one browser and English language."
|
||||
@@ -115,6 +115,7 @@ if [ $# -eq 0 ]; then
|
||||
echo "-u Run without confirmation messages. Use with extreme care."
|
||||
echo "-v Build local p2 respository, and use this instead of p2.sapsailing.com"
|
||||
echo "-x <number-of-workers> use this many worker threads for building GWT permutations (default: 2)."
|
||||
echo "-j <test-package> only execute the provided test package during tests"
|
||||
echo ""
|
||||
echo "build: builds the server code using Maven to $PROJECT_HOME (log to $START_DIR/build.log)"
|
||||
echo ""
|
||||
@@ -133,7 +134,7 @@ if [ $# -eq 0 ]; then
|
||||
echo "local-deploy: performs deployment of one or more bundles into a local directory"
|
||||
echo "Example: $0 -n com.sap.sailing.www -s /home/user/myserver local-deploy"
|
||||
echo ""
|
||||
echo "remote-deploy: performs hot deployment of the java code to a remote server"
|
||||
echo "remote-deploy: deploys the last build results to a remote server and optionally re-starts it"
|
||||
echo "Example: $0 -s dev -w trac@sapsailing.com remote-deploy"
|
||||
echo ""
|
||||
echo "clean: cleans all code and GWT files"
|
||||
@@ -151,7 +152,7 @@ echo SERVERS_HOME is $SERVERS_HOME
|
||||
echo BRANCH is $active_branch
|
||||
echo VERSION is $VERSION_INFO
|
||||
|
||||
options=':bgtocparvm:n:l:s:w:x:u'
|
||||
options=':bgtocparvm:n:l:s:w:x:j:u'
|
||||
while getopts $options option
|
||||
do
|
||||
case $option in
|
||||
@@ -172,6 +173,7 @@ do
|
||||
u) suppress_confirmation=1;;
|
||||
v) p2local=1;;
|
||||
x) GWT_WORKERS=$OPTARG;;
|
||||
j) TESTCASE_TO_EXECUTE=$OPTARG;;
|
||||
\?) echo "Invalid option"
|
||||
exit 4;;
|
||||
esac
|
||||
@@ -263,7 +265,7 @@ if [[ "$@" == "release" ]]; then
|
||||
cp -v $PROJECT_HOME/java/target/configuration/jetty/etc/jetty-deployer.xml configuration/jetty/etc
|
||||
cp -v $PROJECT_HOME/java/target/configuration/jetty/etc/realm.properties configuration/jetty/etc
|
||||
cp -v $PROJECT_HOME/java/target/configuration/monitoring.properties configuration/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/security.properties configuration/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/mail.properties configuration/
|
||||
cp -v $PROJECT_HOME/configuration/mongodb.cfg $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/udpmirror $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/http2udpmirror $ACDIR
|
||||
@@ -539,7 +541,7 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
fi
|
||||
|
||||
cd $PROJECT_HOME/java
|
||||
if [ $gwtcompile -eq 1 ]; then
|
||||
if [ $gwtcompile -eq 1 ] && [[ "$clean" == "clean" ]]; then
|
||||
echo "INFO: Compiling GWT (rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.*)"
|
||||
rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.*
|
||||
GWT_XML_FILES=`find com.sap.$PROJECT_TYPE.gwt.ui/src/main/resources -name '*.gwt.xml'`
|
||||
@@ -591,6 +593,11 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
else
|
||||
extra="$extra -DskipTests=false"
|
||||
# TODO: Think about http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html
|
||||
if [[ "$TESTCASE_TO_EXECUTE" != "" ]]; then
|
||||
# http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
|
||||
echo "Running only testcase $TESTCASE_TO_EXECUTE"
|
||||
extra="$extra -Dtest=$TESTCASE_TO_EXECUTE"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $android -eq 0 ] && [ $gwtcompile -eq 0 ] && [ $testing -eq 0 ]; then
|
||||
@@ -765,7 +772,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
|
||||
if [ ! -f "$ACDIR/env.sh" ]; then
|
||||
cp -v $PROJECT_HOME/java/target/env.sh $ACDIR/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/monitoring.properties $ACDIR/configuration/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/security.properties $ACDIR/configuration/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/mail.properties $ACDIR/configuration/
|
||||
cp -v $PROJECT_HOME/java/target/configuration/logging.properties $ACDIR/configuration/
|
||||
fi
|
||||
|
||||
@@ -846,7 +853,7 @@ if [[ "$@" == "remote-deploy" ]]; then
|
||||
$SCP_CMD $PROJECT_HOME/java/target/configuration/jetty/etc/jetty-deployer.xml $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/jetty/etc
|
||||
$SCP_CMD $PROJECT_HOME/java/target/configuration/jetty/etc/realm.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/jetty/etc
|
||||
$SCP_CMD $PROJECT_HOME/java/target/configuration/monitoring.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
|
||||
$SCP_CMD $PROJECT_HOME/java/target/configuration/security.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
|
||||
$SCP_CMD $PROJECT_HOME/java/target/configuration/mail.properties $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/configuration/
|
||||
|
||||
$SCP_CMD $PROJECT_HOME/java/target/env.sh $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
|
||||
$SCP_CMD $PROJECT_HOME/java/target/start $REMOTE_SERVER_LOGIN:$REMOTE_SERVER/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/gwt-dev.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.google.gwt.dev</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,523 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Dev
|
||||
Bundle-SymbolicName: com.google.gwt.dev
|
||||
Bundle-Version: 2.7.0
|
||||
Bundle-Vendor: GOOGLE
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ClassPath: lib/gwt-dev.jar,
|
||||
.
|
||||
Export-Package: com.gargoylesoftware.htmlunit,
|
||||
com.gargoylesoftware.htmlunit.attachment,
|
||||
com.gargoylesoftware.htmlunit.gae,
|
||||
com.gargoylesoftware.htmlunit.html,
|
||||
com.gargoylesoftware.htmlunit.html.applets,
|
||||
com.gargoylesoftware.htmlunit.html.impl,
|
||||
com.gargoylesoftware.htmlunit.html.xpath,
|
||||
com.gargoylesoftware.htmlunit.javascript,
|
||||
com.gargoylesoftware.htmlunit.javascript.background,
|
||||
com.gargoylesoftware.htmlunit.javascript.configuration,
|
||||
com.gargoylesoftware.htmlunit.javascript.host,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.arrays,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.canvas,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.css,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.dom,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.geo,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.html,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.svg,
|
||||
com.gargoylesoftware.htmlunit.javascript.host.xml,
|
||||
com.gargoylesoftware.htmlunit.javascript.regexp,
|
||||
com.gargoylesoftware.htmlunit.protocol.about,
|
||||
com.gargoylesoftware.htmlunit.protocol.data,
|
||||
com.gargoylesoftware.htmlunit.protocol.javascript,
|
||||
com.gargoylesoftware.htmlunit.svg,
|
||||
com.gargoylesoftware.htmlunit.util,
|
||||
com.gargoylesoftware.htmlunit.xml,
|
||||
com.google.gwt.core.client,
|
||||
com.google.gwt.core.client.impl,
|
||||
com.google.gwt.core.ext,
|
||||
com.google.gwt.core.ext.debug,
|
||||
com.google.gwt.core.ext.impl,
|
||||
com.google.gwt.core.ext.linker,
|
||||
com.google.gwt.core.ext.linker.impl,
|
||||
com.google.gwt.core.ext.soyc,
|
||||
com.google.gwt.core.ext.soyc.coderef,
|
||||
com.google.gwt.core.ext.soyc.impl,
|
||||
com.google.gwt.core.ext.typeinfo,
|
||||
com.google.gwt.core.linker,
|
||||
com.google.gwt.core.shared,
|
||||
com.google.gwt.dev,
|
||||
com.google.gwt.dev.cfg,
|
||||
com.google.gwt.dev.codeserver,
|
||||
com.google.gwt.dev.generator,
|
||||
com.google.gwt.dev.generator.ast,
|
||||
com.google.gwt.dev.javac,
|
||||
com.google.gwt.dev.javac.asm,
|
||||
com.google.gwt.dev.javac.asmbridge,
|
||||
com.google.gwt.dev.javac.testing,
|
||||
com.google.gwt.dev.javac.testing.impl,
|
||||
com.google.gwt.dev.javac.typemodel,
|
||||
com.google.gwt.dev.jdt,
|
||||
com.google.gwt.dev.jjs,
|
||||
com.google.gwt.dev.jjs.ast,
|
||||
com.google.gwt.dev.jjs.ast.js,
|
||||
com.google.gwt.dev.jjs.impl,
|
||||
com.google.gwt.dev.jjs.impl.codesplitter,
|
||||
com.google.gwt.dev.jjs.impl.gflow,
|
||||
com.google.gwt.dev.jjs.impl.gflow.cfg,
|
||||
com.google.gwt.dev.jjs.impl.gflow.constants,
|
||||
com.google.gwt.dev.jjs.impl.gflow.copy,
|
||||
com.google.gwt.dev.jjs.impl.gflow.liveness,
|
||||
com.google.gwt.dev.jjs.impl.gflow.unreachable,
|
||||
com.google.gwt.dev.js,
|
||||
com.google.gwt.dev.js.ast,
|
||||
com.google.gwt.dev.js.rhino,
|
||||
com.google.gwt.dev.json,
|
||||
com.google.gwt.dev.protobuf,
|
||||
com.google.gwt.dev.resource,
|
||||
com.google.gwt.dev.resource.impl,
|
||||
com.google.gwt.dev.shell,
|
||||
com.google.gwt.dev.shell.ie,
|
||||
com.google.gwt.dev.shell.jetty,
|
||||
com.google.gwt.dev.shell.log,
|
||||
com.google.gwt.dev.shell.remoteui,
|
||||
com.google.gwt.dev.shell.rewrite,
|
||||
com.google.gwt.dev.ui,
|
||||
com.google.gwt.dev.url,
|
||||
com.google.gwt.dev.util,
|
||||
com.google.gwt.dev.util.arg,
|
||||
com.google.gwt.dev.util.collect,
|
||||
com.google.gwt.dev.util.editdistance,
|
||||
com.google.gwt.dev.util.log,
|
||||
com.google.gwt.dev.util.log.dashboard,
|
||||
com.google.gwt.dev.util.log.speedtracer,
|
||||
com.google.gwt.dev.util.msg,
|
||||
com.google.gwt.dev.util.transitiveclosure,
|
||||
com.google.gwt.dev.util.xml,
|
||||
com.google.gwt.lang,
|
||||
com.google.gwt.soyc,
|
||||
com.google.gwt.soyc.io,
|
||||
com.google.gwt.thirdparty.debugging.sourcemap,
|
||||
com.google.gwt.thirdparty.debugging.sourcemap.proto,
|
||||
com.google.gwt.thirdparty.guava.common.annotations,
|
||||
com.google.gwt.thirdparty.guava.common.base,
|
||||
com.google.gwt.thirdparty.guava.common.base.internal,
|
||||
com.google.gwt.thirdparty.guava.common.cache,
|
||||
com.google.gwt.thirdparty.guava.common.collect,
|
||||
com.google.gwt.thirdparty.guava.common.escape,
|
||||
com.google.gwt.thirdparty.guava.common.eventbus,
|
||||
com.google.gwt.thirdparty.guava.common.hash,
|
||||
com.google.gwt.thirdparty.guava.common.html,
|
||||
com.google.gwt.thirdparty.guava.common.io,
|
||||
com.google.gwt.thirdparty.guava.common.math,
|
||||
com.google.gwt.thirdparty.guava.common.net,
|
||||
com.google.gwt.thirdparty.guava.common.primitives,
|
||||
com.google.gwt.thirdparty.guava.common.reflect,
|
||||
com.google.gwt.thirdparty.guava.common.util.concurrent,
|
||||
com.google.gwt.thirdparty.guava.common.xml,
|
||||
com.google.gwt.thirdparty.javascript.jscomp,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.ant,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.deps,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.fuzzing,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.graph,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing.parser,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing.parser.codegeneration,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing.parser.trees,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing.parser.util,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.parsing.parser.util.format,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.regex,
|
||||
com.google.gwt.thirdparty.javascript.jscomp.type,
|
||||
com.google.gwt.thirdparty.javascript.rhino,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.annotations,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.ast,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.commonjs.module,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.commonjs.module.provider,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.debug,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.jdk13,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.jdk15,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.json,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.optimizer,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.regexp,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.serialize,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools.debugger,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools.debugger.treetable,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools.idswitch,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools.jsc,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.tools.shell,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.v8dtoa,
|
||||
com.google.gwt.thirdparty.javascript.rhino.head.xml,
|
||||
com.google.gwt.thirdparty.javascript.rhino.jstype,
|
||||
com.google.gwt.thirdparty.json,
|
||||
com.google.gwt.util,
|
||||
com.google.gwt.util.tools,
|
||||
com.google.gwt.util.tools.shared,
|
||||
com.ibm.icu.impl,
|
||||
com.ibm.icu.impl.data,
|
||||
com.ibm.icu.impl.duration,
|
||||
com.ibm.icu.impl.duration.impl,
|
||||
com.ibm.icu.impl.locale,
|
||||
com.ibm.icu.lang,
|
||||
com.ibm.icu.math,
|
||||
com.ibm.icu.text,
|
||||
com.ibm.icu.util,
|
||||
com.steadystate.css.dom,
|
||||
com.steadystate.css.parser,
|
||||
com.steadystate.css.parser.selectors,
|
||||
com.steadystate.css.sac,
|
||||
com.steadystate.css.userdata,
|
||||
com.steadystate.css.util,
|
||||
java_cup,
|
||||
java_cup.anttask,
|
||||
java_cup.runtime,
|
||||
javax.annotation,
|
||||
javax.annotation.concurrent,
|
||||
javax.annotation.meta,
|
||||
javax.servlet,
|
||||
javax.servlet.annotation,
|
||||
javax.servlet.descriptor,
|
||||
javax.servlet.http,
|
||||
javax.servlet.jsp,
|
||||
javax.servlet.jsp.el,
|
||||
javax.servlet.jsp.tagext,
|
||||
javax.xml,
|
||||
javax.xml.datatype,
|
||||
javax.xml.namespace,
|
||||
javax.xml.parsers,
|
||||
javax.xml.stream,
|
||||
javax.xml.stream.events,
|
||||
javax.xml.stream.util,
|
||||
javax.xml.transform,
|
||||
javax.xml.transform.dom,
|
||||
javax.xml.transform.sax,
|
||||
javax.xml.transform.stax,
|
||||
javax.xml.transform.stream,
|
||||
javax.xml.validation,
|
||||
javax.xml.xpath,
|
||||
net.sourceforge.htmlunit.corejs.classfile,
|
||||
net.sourceforge.htmlunit.corejs.javascript,
|
||||
net.sourceforge.htmlunit.corejs.javascript.annotations,
|
||||
net.sourceforge.htmlunit.corejs.javascript.ast,
|
||||
net.sourceforge.htmlunit.corejs.javascript.commonjs.module,
|
||||
net.sourceforge.htmlunit.corejs.javascript.commonjs.module.provider,
|
||||
net.sourceforge.htmlunit.corejs.javascript.debug,
|
||||
net.sourceforge.htmlunit.corejs.javascript.jdk13,
|
||||
net.sourceforge.htmlunit.corejs.javascript.jdk15,
|
||||
net.sourceforge.htmlunit.corejs.javascript.json,
|
||||
net.sourceforge.htmlunit.corejs.javascript.optimizer,
|
||||
net.sourceforge.htmlunit.corejs.javascript.regexp,
|
||||
net.sourceforge.htmlunit.corejs.javascript.serialize,
|
||||
net.sourceforge.htmlunit.corejs.javascript.tools,
|
||||
net.sourceforge.htmlunit.corejs.javascript.tools.debugger,
|
||||
net.sourceforge.htmlunit.corejs.javascript.tools.debugger.treetable,
|
||||
net.sourceforge.htmlunit.corejs.javascript.tools.shell,
|
||||
net.sourceforge.htmlunit.corejs.javascript.v8dtoa,
|
||||
net.sourceforge.htmlunit.corejs.javascript.xml,
|
||||
netscape.javascript,
|
||||
org.apache.bcel,
|
||||
org.apache.bcel.classfile,
|
||||
org.apache.bcel.generic,
|
||||
org.apache.bcel.util,
|
||||
org.apache.bcel.verifier,
|
||||
org.apache.bcel.verifier.exc,
|
||||
org.apache.bcel.verifier.statics,
|
||||
org.apache.bcel.verifier.structurals,
|
||||
org.apache.commons.codec,
|
||||
org.apache.commons.codec.binary,
|
||||
org.apache.commons.codec.digest,
|
||||
org.apache.commons.codec.language,
|
||||
org.apache.commons.codec.language.bm,
|
||||
org.apache.commons.codec.net,
|
||||
org.apache.commons.collections,
|
||||
org.apache.commons.collections.bag,
|
||||
org.apache.commons.collections.bidimap,
|
||||
org.apache.commons.collections.buffer,
|
||||
org.apache.commons.collections.collection,
|
||||
org.apache.commons.collections.comparators,
|
||||
org.apache.commons.collections.functors,
|
||||
org.apache.commons.collections.iterators,
|
||||
org.apache.commons.collections.keyvalue,
|
||||
org.apache.commons.collections.list,
|
||||
org.apache.commons.collections.map,
|
||||
org.apache.commons.collections.set,
|
||||
org.apache.commons.el,
|
||||
org.apache.commons.el.parser,
|
||||
org.apache.commons.io,
|
||||
org.apache.commons.io.comparator,
|
||||
org.apache.commons.io.filefilter,
|
||||
org.apache.commons.io.input,
|
||||
org.apache.commons.io.monitor,
|
||||
org.apache.commons.io.output,
|
||||
org.apache.commons.lang3,
|
||||
org.apache.commons.lang3.builder,
|
||||
org.apache.commons.lang3.concurrent,
|
||||
org.apache.commons.lang3.event,
|
||||
org.apache.commons.lang3.exception,
|
||||
org.apache.commons.lang3.math,
|
||||
org.apache.commons.lang3.mutable,
|
||||
org.apache.commons.lang3.reflect,
|
||||
org.apache.commons.lang3.text,
|
||||
org.apache.commons.lang3.text.translate,
|
||||
org.apache.commons.lang3.time,
|
||||
org.apache.commons.lang3.tuple,
|
||||
org.apache.commons.logging,
|
||||
org.apache.commons.logging.impl,
|
||||
org.apache.html.dom,
|
||||
org.apache.http,
|
||||
org.apache.http.annotation,
|
||||
org.apache.http.auth,
|
||||
org.apache.http.auth.params,
|
||||
org.apache.http.client,
|
||||
org.apache.http.client.config,
|
||||
org.apache.http.client.entity,
|
||||
org.apache.http.client.methods,
|
||||
org.apache.http.client.params,
|
||||
org.apache.http.client.protocol,
|
||||
org.apache.http.client.utils,
|
||||
org.apache.http.concurrent,
|
||||
org.apache.http.config,
|
||||
org.apache.http.conn,
|
||||
org.apache.http.conn.params,
|
||||
org.apache.http.conn.routing,
|
||||
org.apache.http.conn.scheme,
|
||||
org.apache.http.conn.socket,
|
||||
org.apache.http.conn.ssl,
|
||||
org.apache.http.conn.util,
|
||||
org.apache.http.cookie,
|
||||
org.apache.http.cookie.params,
|
||||
org.apache.http.entity,
|
||||
org.apache.http.entity.mime,
|
||||
org.apache.http.entity.mime.content,
|
||||
org.apache.http.impl,
|
||||
org.apache.http.impl.auth,
|
||||
org.apache.http.impl.client,
|
||||
org.apache.http.impl.conn,
|
||||
org.apache.http.impl.conn.tsccm,
|
||||
org.apache.http.impl.cookie,
|
||||
org.apache.http.impl.entity,
|
||||
org.apache.http.impl.execchain,
|
||||
org.apache.http.impl.io,
|
||||
org.apache.http.impl.pool,
|
||||
org.apache.http.io,
|
||||
org.apache.http.message,
|
||||
org.apache.http.params,
|
||||
org.apache.http.pool,
|
||||
org.apache.http.protocol,
|
||||
org.apache.http.util,
|
||||
org.apache.james.mime4j,
|
||||
org.apache.james.mime4j.codec,
|
||||
org.apache.james.mime4j.descriptor,
|
||||
org.apache.james.mime4j.field,
|
||||
org.apache.james.mime4j.field.address,
|
||||
org.apache.james.mime4j.field.address.parser,
|
||||
org.apache.james.mime4j.field.contentdisposition.parser,
|
||||
org.apache.james.mime4j.field.contenttype.parser,
|
||||
org.apache.james.mime4j.field.datetime,
|
||||
org.apache.james.mime4j.field.datetime.parser,
|
||||
org.apache.james.mime4j.field.language.parser,
|
||||
org.apache.james.mime4j.field.mimeversion.parser,
|
||||
org.apache.james.mime4j.field.structured.parser,
|
||||
org.apache.james.mime4j.io,
|
||||
org.apache.james.mime4j.message,
|
||||
org.apache.james.mime4j.parser,
|
||||
org.apache.james.mime4j.storage,
|
||||
org.apache.james.mime4j.util,
|
||||
org.apache.jasper,
|
||||
org.apache.jasper.compiler,
|
||||
org.apache.jasper.compiler.tagplugin,
|
||||
org.apache.jasper.runtime,
|
||||
org.apache.jasper.security,
|
||||
org.apache.jasper.servlet,
|
||||
org.apache.jasper.tagplugins.jstl,
|
||||
org.apache.jasper.util,
|
||||
org.apache.jasper.xmlparser,
|
||||
org.apache.regexp,
|
||||
org.apache.tapestry.util.text,
|
||||
org.apache.tools.ant,
|
||||
org.apache.tools.ant.filters,
|
||||
org.apache.tools.ant.filters.util,
|
||||
org.apache.tools.ant.helper,
|
||||
org.apache.tools.ant.input,
|
||||
org.apache.tools.ant.listener,
|
||||
org.apache.tools.ant.loader,
|
||||
org.apache.tools.ant.taskdefs,
|
||||
org.apache.tools.ant.taskdefs.compilers,
|
||||
org.apache.tools.ant.taskdefs.condition,
|
||||
org.apache.tools.ant.taskdefs.cvslib,
|
||||
org.apache.tools.ant.taskdefs.email,
|
||||
org.apache.tools.ant.taskdefs.rmic,
|
||||
org.apache.tools.ant.types,
|
||||
org.apache.tools.ant.types.mappers,
|
||||
org.apache.tools.ant.types.resolver,
|
||||
org.apache.tools.ant.types.selectors,
|
||||
org.apache.tools.ant.types.selectors.modifiedselector,
|
||||
org.apache.tools.ant.util,
|
||||
org.apache.tools.ant.util.facade,
|
||||
org.apache.tools.ant.util.regexp,
|
||||
org.apache.tools.bzip2,
|
||||
org.apache.tools.mail,
|
||||
org.apache.tools.tar,
|
||||
org.apache.tools.zip,
|
||||
org.apache.wml,
|
||||
org.apache.wml.dom,
|
||||
org.apache.xalan,
|
||||
org.apache.xalan.client,
|
||||
org.apache.xalan.extensions,
|
||||
org.apache.xalan.lib,
|
||||
org.apache.xalan.lib.sql,
|
||||
org.apache.xalan.processor,
|
||||
org.apache.xalan.res,
|
||||
org.apache.xalan.serialize,
|
||||
org.apache.xalan.templates,
|
||||
org.apache.xalan.trace,
|
||||
org.apache.xalan.transformer,
|
||||
org.apache.xalan.xslt,
|
||||
org.apache.xalan.xsltc,
|
||||
org.apache.xalan.xsltc.cmdline,
|
||||
org.apache.xalan.xsltc.cmdline.getopt,
|
||||
org.apache.xalan.xsltc.compiler,
|
||||
org.apache.xalan.xsltc.compiler.util,
|
||||
org.apache.xalan.xsltc.dom,
|
||||
org.apache.xalan.xsltc.runtime,
|
||||
org.apache.xalan.xsltc.runtime.output,
|
||||
org.apache.xalan.xsltc.trax,
|
||||
org.apache.xalan.xsltc.util,
|
||||
org.apache.xerces.dom,
|
||||
org.apache.xerces.dom.events,
|
||||
org.apache.xerces.dom3.as,
|
||||
org.apache.xerces.impl,
|
||||
org.apache.xerces.impl.dtd,
|
||||
org.apache.xerces.impl.dtd.models,
|
||||
org.apache.xerces.impl.dv,
|
||||
org.apache.xerces.impl.dv.dtd,
|
||||
org.apache.xerces.impl.dv.util,
|
||||
org.apache.xerces.impl.dv.xs,
|
||||
org.apache.xerces.impl.io,
|
||||
org.apache.xerces.impl.msg,
|
||||
org.apache.xerces.impl.validation,
|
||||
org.apache.xerces.impl.xpath,
|
||||
org.apache.xerces.impl.xpath.regex,
|
||||
org.apache.xerces.impl.xs,
|
||||
org.apache.xerces.impl.xs.identity,
|
||||
org.apache.xerces.impl.xs.models,
|
||||
org.apache.xerces.impl.xs.opti,
|
||||
org.apache.xerces.impl.xs.traversers,
|
||||
org.apache.xerces.impl.xs.util,
|
||||
org.apache.xerces.jaxp,
|
||||
org.apache.xerces.jaxp.datatype,
|
||||
org.apache.xerces.jaxp.validation,
|
||||
org.apache.xerces.parsers,
|
||||
org.apache.xerces.stax,
|
||||
org.apache.xerces.stax.events,
|
||||
org.apache.xerces.util,
|
||||
org.apache.xerces.xinclude,
|
||||
org.apache.xerces.xni,
|
||||
org.apache.xerces.xni.grammars,
|
||||
org.apache.xerces.xni.parser,
|
||||
org.apache.xerces.xpointer,
|
||||
org.apache.xerces.xs,
|
||||
org.apache.xerces.xs.datatypes,
|
||||
org.apache.xml.dtm,
|
||||
org.apache.xml.dtm.ref,
|
||||
org.apache.xml.dtm.ref.dom2dtm,
|
||||
org.apache.xml.dtm.ref.sax2dtm,
|
||||
org.apache.xml.res,
|
||||
org.apache.xml.serialize,
|
||||
org.apache.xml.serializer,
|
||||
org.apache.xml.serializer.dom3,
|
||||
org.apache.xml.serializer.utils,
|
||||
org.apache.xml.utils,
|
||||
org.apache.xml.utils.res,
|
||||
org.apache.xmlcommons,
|
||||
org.apache.xpath,
|
||||
org.apache.xpath.axes,
|
||||
org.apache.xpath.compiler,
|
||||
org.apache.xpath.domapi,
|
||||
org.apache.xpath.functions,
|
||||
org.apache.xpath.jaxp,
|
||||
org.apache.xpath.objects,
|
||||
org.apache.xpath.operations,
|
||||
org.apache.xpath.patterns,
|
||||
org.apache.xpath.res,
|
||||
org.cyberneko.html,
|
||||
org.cyberneko.html.filters,
|
||||
org.cyberneko.html.parsers,
|
||||
org.cyberneko.html.xercesbridge,
|
||||
org.eclipse.jdt.core,
|
||||
org.eclipse.jdt.core.compiler,
|
||||
org.eclipse.jdt.core.compiler.batch,
|
||||
org.eclipse.jdt.internal.antadapter,
|
||||
org.eclipse.jdt.internal.compiler,
|
||||
org.eclipse.jdt.internal.compiler.ast,
|
||||
org.eclipse.jdt.internal.compiler.batch,
|
||||
org.eclipse.jdt.internal.compiler.classfmt,
|
||||
org.eclipse.jdt.internal.compiler.codegen,
|
||||
org.eclipse.jdt.internal.compiler.env,
|
||||
org.eclipse.jdt.internal.compiler.flow,
|
||||
org.eclipse.jdt.internal.compiler.impl,
|
||||
org.eclipse.jdt.internal.compiler.lookup,
|
||||
org.eclipse.jdt.internal.compiler.parser,
|
||||
org.eclipse.jdt.internal.compiler.parser.diagnose,
|
||||
org.eclipse.jdt.internal.compiler.problem,
|
||||
org.eclipse.jdt.internal.compiler.util,
|
||||
org.eclipse.jdt.internal.core.util,
|
||||
org.eclipse.jetty.continuation,
|
||||
org.eclipse.jetty.http,
|
||||
org.eclipse.jetty.http.gzip,
|
||||
org.eclipse.jetty.http.ssl,
|
||||
org.eclipse.jetty.io,
|
||||
org.eclipse.jetty.io.bio,
|
||||
org.eclipse.jetty.io.nio,
|
||||
org.eclipse.jetty.security,
|
||||
org.eclipse.jetty.security.authentication,
|
||||
org.eclipse.jetty.server,
|
||||
org.eclipse.jetty.server.bio,
|
||||
org.eclipse.jetty.server.handler,
|
||||
org.eclipse.jetty.server.handler.jmx,
|
||||
org.eclipse.jetty.server.jmx,
|
||||
org.eclipse.jetty.server.nio,
|
||||
org.eclipse.jetty.server.session,
|
||||
org.eclipse.jetty.server.session.jmx,
|
||||
org.eclipse.jetty.server.ssl,
|
||||
org.eclipse.jetty.servlet,
|
||||
org.eclipse.jetty.servlet.jmx,
|
||||
org.eclipse.jetty.servlet.listener,
|
||||
org.eclipse.jetty.servlets,
|
||||
org.eclipse.jetty.util,
|
||||
org.eclipse.jetty.util.ajax,
|
||||
org.eclipse.jetty.util.component,
|
||||
org.eclipse.jetty.util.log,
|
||||
org.eclipse.jetty.util.preventers,
|
||||
org.eclipse.jetty.util.resource,
|
||||
org.eclipse.jetty.util.security,
|
||||
org.eclipse.jetty.util.ssl,
|
||||
org.eclipse.jetty.util.statistic,
|
||||
org.eclipse.jetty.util.thread,
|
||||
org.eclipse.jetty.webapp,
|
||||
org.eclipse.jetty.websocket,
|
||||
org.eclipse.jetty.xml,
|
||||
org.objectweb.asm,
|
||||
org.objectweb.asm.commons,
|
||||
org.objectweb.asm.signature,
|
||||
org.objectweb.asm.tree,
|
||||
org.objectweb.asm.tree.analysis,
|
||||
org.objectweb.asm.util,
|
||||
org.objectweb.asm.xml,
|
||||
org.w3c.css.sac,
|
||||
org.w3c.css.sac.helpers,
|
||||
org.w3c.dom,
|
||||
org.w3c.dom.bootstrap,
|
||||
org.w3c.dom.css,
|
||||
org.w3c.dom.events,
|
||||
org.w3c.dom.html,
|
||||
org.w3c.dom.ls,
|
||||
org.w3c.dom.ranges,
|
||||
org.w3c.dom.stylesheets,
|
||||
org.w3c.dom.traversal,
|
||||
org.w3c.dom.views,
|
||||
org.w3c.dom.xpath,
|
||||
org.xml.sax,
|
||||
org.xml.sax.ext,
|
||||
org.xml.sax.helpers
|
||||
@@ -0,0 +1,3 @@
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/gwt-dev.jar
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.google.gwt.dev</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
@@ -172,6 +172,22 @@ Export-Package: com.google.gwt.activity.shared,
|
||||
com.google.web.bindery.requestfactory.vm.testing,
|
||||
org.hibernate.validator,
|
||||
org.hibernate.validator.engine
|
||||
Require-Bundle: javax.validation;bundle-version="1.0.0"
|
||||
Import-Package: javax.servlet;version="2.6.0",
|
||||
javax.servlet.http;version="2.6.0"
|
||||
Require-Bundle: javax.validation;bundle-version="1.0.0";resolution:=optional,
|
||||
org.junit4;bundle-version="4.8.2";resolution:=optional
|
||||
Import-Package: com.gargoylesoftware.htmlunit;resolution:=optional,
|
||||
com.google.gwt.core.ext;resolution:=optional,
|
||||
com.google.gwt.core.ext.typeinfo;resolution:=optional,
|
||||
com.google.gwt.dev;resolution:=optional,
|
||||
com.google.gwt.dev.cfg;resolution:=optional,
|
||||
com.google.gwt.dev.javac.typemodel;resolution:=optional,
|
||||
com.google.gwt.dev.shell;resolution:=optional,
|
||||
com.google.gwt.dev.shell.jetty;resolution:=optional,
|
||||
com.google.gwt.dev.util.arg;resolution:=optional,
|
||||
com.google.gwt.dev.util.collect;resolution:=optional,
|
||||
com.google.gwt.junit;resolution:=optional,
|
||||
com.google.gwt.thirdparty.guava.common.collect;resolution:=optional,
|
||||
com.google.gwt.util.tools;resolution:=optional,
|
||||
javax.servlet;version="2.6.0";resolution:=optional,
|
||||
javax.servlet.http;version="2.6.0";resolution:=optional,
|
||||
org.eclipse.jetty.server;resolution:=optional,
|
||||
org.eclipse.jetty.webapp;resolution:=optional
|
||||
@@ -21,7 +21,8 @@ Require-Bundle: com.sap.sailing.domain,
|
||||
com.sap.sailing.declination,
|
||||
org.json.simple;bundle-version="1.1.0",
|
||||
com.sap.sailing.udpconnector,
|
||||
com.googlecode.mgwt;bundle-version="2.0.0"
|
||||
com.googlecode.mgwt;bundle-version="2.0.0",
|
||||
com.sap.sse.gwt.adminconsole
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: org.osgi.framework;version="1.5.0",
|
||||
org.osgi.util.tracker
|
||||
|
||||
@@ -1,40 +1,41 @@
|
||||
<?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="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT" value="9998"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/dashboards/RibDashboard.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.dashboards.gwt"/>
|
||||
</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>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-servlet.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
</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.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -startupUrl /dashboards/RibDashboard.html -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9998 com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m"/>
|
||||
</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="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT" value="9998"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/dashboards/RibDashboard.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.dashboards.gwt"/>
|
||||
</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>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-servlet.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
</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.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -startupUrl /dashboards/RibDashboard.html -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XstartOnFirstThread -Xmx2048m"/>
|
||||
</launchConfiguration>
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -15,6 +15,7 @@ import com.sap.sailing.datamining.Activator;
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegOfCompetitorContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedRaceContext;
|
||||
import com.sap.sailing.datamining.test.util.OpenFunctionManager;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.Moving;
|
||||
import com.sap.sailing.domain.base.Nationality;
|
||||
@@ -23,18 +24,16 @@ import com.sap.sailing.domain.common.Speed;
|
||||
import com.sap.sse.common.Named;
|
||||
import com.sap.sse.datamining.factories.FunctionFactory;
|
||||
import com.sap.sse.datamining.functions.Function;
|
||||
import com.sap.sse.datamining.functions.FunctionRegistry;
|
||||
import com.sap.sse.datamining.impl.functions.SimpleFunctionRegistry;
|
||||
|
||||
public class TestSailingFunctionsRegistration {
|
||||
|
||||
private static FunctionFactory functionFactory = new FunctionFactory();
|
||||
|
||||
private FunctionRegistry functionRegistry;
|
||||
private OpenFunctionManager functionRegistry;
|
||||
|
||||
@Before
|
||||
public void setUpFunctionRegistryAndProvider() {
|
||||
functionRegistry = new SimpleFunctionRegistry();
|
||||
functionRegistry = new OpenFunctionManager();
|
||||
functionRegistry.registerAllWithInternalFunctionPolicy(Activator.getDefault().getInternalClassesWithMarkedMethods());
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ public class TestSailingFunctionsRegistration {
|
||||
@Test
|
||||
public void testImportantRegisteredStatistics() throws NoSuchMethodException, SecurityException {
|
||||
Collection<Function<?>> expectedStatistics = createExpectedImportantRegisteredStatistics();
|
||||
Collection<Function<?>> providedStatistics = functionRegistry.getStatistics();
|
||||
Collection<Function<?>> providedStatistics = functionRegistry.getAllStatistics();
|
||||
for (Function<?> statistic : expectedStatistics) {
|
||||
assertThat("The expected statistic '" + statistic + "' wasn't provided.",
|
||||
providedStatistics.contains(statistic), is(true));
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.sap.sailing.datamining.test.util;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sse.datamining.functions.Function;
|
||||
import com.sap.sse.datamining.impl.functions.FunctionManager;
|
||||
|
||||
public class OpenFunctionManager extends FunctionManager {
|
||||
|
||||
public Collection<Function<?>> getDimensions() {
|
||||
return asSet(dimensions);
|
||||
}
|
||||
|
||||
public Collection<Function<?>> getExternalFunctions() {
|
||||
return asSet(externalFunctions);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,8 @@ DistanceTraveled=zur
|
||||
Boat=Boot
|
||||
Team=Team
|
||||
Name=Name
|
||||
NationalityAcronym=Nationalität
|
||||
Nationality=Nationalitäts
|
||||
Acronym=Abkürzung
|
||||
SailID=Segelnummer
|
||||
LegNumber=Nummer des Schenkels
|
||||
LegType=Art des Schenkels
|
||||
@@ -13,12 +14,30 @@ CourseArea=Regattabahn
|
||||
BoatClass=Bootsklasse
|
||||
Fleet=Flotte
|
||||
Race=Rennen
|
||||
SailingDomainRetrieverChain=Segel-Domänen Datenbeschaffer
|
||||
LegSailingDomainRetrieverChain=Segel-Domänen Leg-Beschaffer
|
||||
GPSFixSailingDomainRetrieverChain=Segel-Domänen GPS-Fix-Beschaffer
|
||||
MarkPassingSailingDomainRetrieverChain=Segel-Domänen Tonnenrundungs-Beschaffer
|
||||
LeaderboardGroup=Ranglisten Gruppe
|
||||
RegattaLeaderboard=Regatta Rangliste
|
||||
Leg=Schenkel
|
||||
MarkPassing=Tonnenrundung
|
||||
LegOfCompetitor=Schenkel eines Teilnehmers
|
||||
GpsFix=GPS-Fix
|
||||
Speed=Geschwindigkeit
|
||||
SpeedTenSecondsBefore=Geschwindigkeit 10s vorher
|
||||
InKnots=in Knoten
|
||||
WindStrength=Windstärke
|
||||
WindStrengthInBeaufort=Windstärke in Beaufort
|
||||
BftClusterGroup=Windstärke in Beaufort
|
||||
Bft0=Windstille
|
||||
Bft1=leiser Zug
|
||||
Bft2=leichte Brise
|
||||
Bft3=schwacher Wind
|
||||
Bft4=mäßiger Wind
|
||||
Bft5=frischer Wind
|
||||
Bft6=starker Wind
|
||||
Bft7=steifer Wind
|
||||
Bft8=stürmischer Wind
|
||||
Bft9=Sturm
|
||||
Bft10=schwerer Sturm
|
||||
Bft11=orkanartiger Sturm
|
||||
Bft12=Orkan
|
||||
@@ -1,4 +1,5 @@
|
||||
Speed=Speed
|
||||
SpeedTenSecondsBefore=Speed 10s before
|
||||
InKnots=in knots
|
||||
DistanceTraveled=Distance Traveled
|
||||
Name=Name
|
||||
@@ -6,7 +7,8 @@ LegType=Leg Type
|
||||
SailID=Sail Number
|
||||
Year=Year
|
||||
LegNumber=Leg Number
|
||||
NationalityAcronym=Nationality
|
||||
Nationality=Nationality
|
||||
Acronym=Acronym
|
||||
Regatta=Regatta
|
||||
CourseArea=Course Area
|
||||
BoatClass=Boat Class
|
||||
@@ -15,10 +17,27 @@ Race=Race
|
||||
Competitor=Competitor
|
||||
Boat=Boat
|
||||
Team=Team
|
||||
SailingDomainRetrieverChain=Sailing Domain Retriever
|
||||
LegSailingDomainRetrieverChain=Sailing Domain Leg Retriever
|
||||
GPSFixSailingDomainRetrieverChain=Sailing Domain GPS Fix Retriever
|
||||
MarkPassingSailingDomainRetrieverChain=Sailing Domain Mark Passing Retriever
|
||||
LeaderboardGroup=Leaderboard Group
|
||||
RegattaLeaderboard=Regatta Leaderboard
|
||||
Leg=Leg
|
||||
MarkPassing=Mark Passing
|
||||
LegOfCompetitor=Leg of competitor
|
||||
GpsFix=GPS-Fix
|
||||
WindStrength=Wind Strength
|
||||
WindStrengthInBeaufort=Wind Strength in Beaufort
|
||||
BftClusterGroup=Wind Strength in Beaufort
|
||||
Bft0=Calm
|
||||
Bft1=Light air
|
||||
Bft2=Light breeze
|
||||
Bft3=Gentle breeze
|
||||
Bft4=Moderate breeze
|
||||
Bft5=Fresh breeze
|
||||
Bft6=Strong breeze
|
||||
Bft7=High wind
|
||||
Bft8=Gale
|
||||
Bft9=Strong gale
|
||||
Bft10=Storm
|
||||
Bft11=Violent storm
|
||||
Bft12=Hurricane
|
||||
@@ -9,6 +9,7 @@ import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
import com.sap.sailing.datamining.data.HasMarkPassingContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegOfCompetitorContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedRaceContext;
|
||||
@@ -31,7 +32,7 @@ public class Activator implements BundleActivator, DataMiningBundleService {
|
||||
|
||||
public Activator() {
|
||||
dataRetrieverChainDefinitions = new SailingDataRetrieverChainDefinitions();
|
||||
sailingServerStringMessages = new ResourceBundleStringMessagesImpl(STRING_MESSAGES_BASE_NAME, Activator.class.getClassLoader());
|
||||
sailingServerStringMessages = new ResourceBundleStringMessagesImpl(STRING_MESSAGES_BASE_NAME, getClass().getClassLoader());
|
||||
clusterGroups = new SailingClusterGroups();
|
||||
}
|
||||
|
||||
@@ -59,6 +60,7 @@ public class Activator implements BundleActivator, DataMiningBundleService {
|
||||
internalClasses.add(HasTrackedLegContext.class);
|
||||
internalClasses.add(HasTrackedLegOfCompetitorContext.class);
|
||||
internalClasses.add(HasGPSFixContext.class);
|
||||
internalClasses.add(HasMarkPassingContext.class);
|
||||
return internalClasses;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,79 +28,79 @@ public class SailingClusterGroups {
|
||||
ClusterBoundary<Speed> lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
Speed upperBoundWindSpeed = new KnotSpeedImpl(1.0);
|
||||
ClusterBoundary<Speed> upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Calm", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft0", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(1.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(4.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Light air", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft1", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(4.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(7.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Light breeze", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft2", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(7.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(11.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Gentle breeze", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft3", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(11.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(16.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Moderate breeze", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft4", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(16.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(22.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Fresh breeze", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft5", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(22.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(28.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Strong breeze", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft6", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(28.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(34.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("High wind", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft7", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(34.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(41.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Gale", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft8", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(41.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(48.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Strong gale", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft9", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(48.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(56.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Storm", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft10", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(56.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
upperBoundWindSpeed = new KnotSpeedImpl(64.0);
|
||||
upperBound = new ComparatorClusterBoundary<Speed>(comparableComparator, upperBoundWindSpeed, ComparisonStrategy.LOWER_THAN);
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Violent Storm", lowerBound, upperBound));
|
||||
clusters.add(new ClusterWithLowerAndUpperBoundaries<Speed>("Bft11", lowerBound, upperBound));
|
||||
|
||||
lowerBoundWindSpeed = new KnotSpeedImpl(64.0);
|
||||
lowerBound = new ComparatorClusterBoundary<Speed>(comparableComparator, lowerBoundWindSpeed, ComparisonStrategy.GREATER_EQUALS_THAN);
|
||||
clusters.add(new ClusterWithSingleBoundary<Speed>("Hurricane", lowerBound));
|
||||
clusters.add(new ClusterWithSingleBoundary<Speed>("Bft12", lowerBound));
|
||||
|
||||
windStrengthInBeaufortCluster = new FixClusterGroup<Speed>("Wind Strength", clusters);
|
||||
windStrengthInBeaufortCluster = new FixClusterGroup<Speed>("BftClusterGroup", clusters);
|
||||
}
|
||||
|
||||
public ClusterGroup<Speed> getWindStrengthInBeaufortCluster() {
|
||||
|
||||
@@ -4,20 +4,21 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
import com.sap.sailing.datamining.data.HasMarkPassingContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegOfCompetitorContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedRaceContext;
|
||||
import com.sap.sailing.datamining.impl.components.GPSFixRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.LeaderboardGroupRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.RegattaLeaderboardFilteringRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedLegFilteringRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedLegOfCompetitorFilteringRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedRaceFilteringRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.MarkPassingRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.RegattaLeaderboardRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedLegOfCompetitorRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedLegRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedRaceRetrievalProcessor;
|
||||
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
|
||||
import com.sap.sailing.domain.leaderboard.RegattaLeaderboard;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sse.datamining.DataRetrieverChainDefinition;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.SimpleDataRetrieverChainDefinition;
|
||||
|
||||
public class SailingDataRetrieverChainDefinitions {
|
||||
@@ -27,33 +28,29 @@ public class SailingDataRetrieverChainDefinitions {
|
||||
public SailingDataRetrieverChainDefinitions() {
|
||||
dataRetrieverChainDefinitions = new ArrayList<>();
|
||||
|
||||
DataRetrieverChainDefinition<RacingEventService, HasTrackedLegOfCompetitorContext> legOfCompetitorRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
RacingEventService.class, HasTrackedLegOfCompetitorContext.class, "SailingDomainRetrieverChain");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<RacingEventService, LeaderboardGroup>> leaderboardGroupRetrieverType = (Class<Processor<RacingEventService, LeaderboardGroup>>) (Class<?>) LeaderboardGroupRetrievalProcessor.class;
|
||||
legOfCompetitorRetrieverChainDefinition.startWith(leaderboardGroupRetrieverType, LeaderboardGroup.class, "LeaderboardGroup");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<LeaderboardGroup, RegattaLeaderboard>> regattaLeaderboardRetrieverType = (Class<Processor<LeaderboardGroup, RegattaLeaderboard>>) (Class<?>) RegattaLeaderboardFilteringRetrievalProcessor.class;
|
||||
legOfCompetitorRetrieverChainDefinition.addAfter(leaderboardGroupRetrieverType, regattaLeaderboardRetrieverType,
|
||||
final DataRetrieverChainDefinition<RacingEventService, HasTrackedLegOfCompetitorContext> trackedRaceRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
RacingEventService.class, HasTrackedLegOfCompetitorContext.class, "RaceSailingDomainRetrieverChain");
|
||||
trackedRaceRetrieverChainDefinition.startWith(LeaderboardGroupRetrievalProcessor.class, LeaderboardGroup.class, "LeaderboardGroup");
|
||||
trackedRaceRetrieverChainDefinition.addAfter(LeaderboardGroupRetrievalProcessor.class, RegattaLeaderboardRetrievalProcessor.class,
|
||||
RegattaLeaderboard.class, "RegattaLeaderboard");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<RegattaLeaderboard, HasTrackedRaceContext>> raceRetrieverType = (Class<Processor<RegattaLeaderboard, HasTrackedRaceContext>>) (Class<?>) TrackedRaceFilteringRetrievalProcessor.class;
|
||||
legOfCompetitorRetrieverChainDefinition.addAfter(regattaLeaderboardRetrieverType, raceRetrieverType,
|
||||
trackedRaceRetrieverChainDefinition.addAfter(RegattaLeaderboardRetrievalProcessor.class, TrackedRaceRetrievalProcessor.class,
|
||||
HasTrackedRaceContext.class, "Race");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<HasTrackedRaceContext, HasTrackedLegContext>> legRetrieverType = (Class<Processor<HasTrackedRaceContext, HasTrackedLegContext>>) (Class<?>) TrackedLegFilteringRetrievalProcessor.class;
|
||||
legOfCompetitorRetrieverChainDefinition.addAfter(raceRetrieverType, legRetrieverType, HasTrackedLegContext.class, "Leg");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<HasTrackedLegContext, HasTrackedLegOfCompetitorContext>> legOfCompetitorRetrieverType = (Class<Processor<HasTrackedLegContext, HasTrackedLegOfCompetitorContext>>) (Class<?>) TrackedLegOfCompetitorFilteringRetrievalProcessor.class;
|
||||
legOfCompetitorRetrieverChainDefinition.endWith(legRetrieverType, legOfCompetitorRetrieverType,
|
||||
|
||||
final DataRetrieverChainDefinition<RacingEventService, HasMarkPassingContext> markPassingRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
trackedRaceRetrieverChainDefinition, HasMarkPassingContext.class, "MarkPassingSailingDomainRetrieverChain");
|
||||
markPassingRetrieverChainDefinition.endWith(TrackedRaceRetrievalProcessor.class, MarkPassingRetrievalProcessor.class, HasMarkPassingContext.class, "MarkPassing");
|
||||
dataRetrieverChainDefinitions.add(markPassingRetrieverChainDefinition);
|
||||
|
||||
final DataRetrieverChainDefinition<RacingEventService, HasTrackedLegOfCompetitorContext> legOfCompetitorRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
trackedRaceRetrieverChainDefinition, HasTrackedLegOfCompetitorContext.class, "LegSailingDomainRetrieverChain");
|
||||
legOfCompetitorRetrieverChainDefinition.addAfter(TrackedRaceRetrievalProcessor.class, TrackedLegRetrievalProcessor.class, HasTrackedLegContext.class, "Leg");
|
||||
legOfCompetitorRetrieverChainDefinition.endWith(TrackedLegRetrievalProcessor.class, TrackedLegOfCompetitorRetrievalProcessor.class,
|
||||
HasTrackedLegOfCompetitorContext.class, "LegOfCompetitor");
|
||||
dataRetrieverChainDefinitions.add(legOfCompetitorRetrieverChainDefinition);
|
||||
|
||||
DataRetrieverChainDefinition<RacingEventService, HasGPSFixContext> gpsFixRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
legOfCompetitorRetrieverChainDefinition, HasGPSFixContext.class, "SailingDomainRetrieverChain");
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<Processor<HasTrackedLegOfCompetitorContext, HasGPSFixContext>> gpsFixRetrieverType = (Class<Processor<HasTrackedLegOfCompetitorContext, HasGPSFixContext>>) (Class<?>) GPSFixRetrievalProcessor.class;
|
||||
gpsFixRetrieverChainDefinition.endWith(legOfCompetitorRetrieverType, gpsFixRetrieverType,
|
||||
final DataRetrieverChainDefinition<RacingEventService, HasGPSFixContext> gpsFixRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
legOfCompetitorRetrieverChainDefinition, HasGPSFixContext.class, "GPSFixSailingDomainRetrieverChain");
|
||||
gpsFixRetrieverChainDefinition.endWith(TrackedLegOfCompetitorRetrievalProcessor.class, GPSFixRetrievalProcessor.class,
|
||||
HasGPSFixContext.class, "GpsFix");
|
||||
dataRetrieverChainDefinitions.add(gpsFixRetrieverChainDefinition);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
package com.sap.sailing.datamining.data;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.sap.sailing.domain.tracking.GPSFixMoving;
|
||||
import com.sap.sse.datamining.shared.annotations.Connector;
|
||||
import com.sap.sse.datamining.shared.annotations.Dimension;
|
||||
import com.sap.sse.datamining.shared.impl.dto.ClusterDTO;
|
||||
import com.sap.sse.i18n.ResourceBundleStringMessages;
|
||||
|
||||
public interface HasGPSFixContext {
|
||||
|
||||
@Connector
|
||||
public HasTrackedLegOfCompetitorContext getTrackedLegOfCompetitorContext();
|
||||
|
||||
@Connector
|
||||
@Connector(ordinal=1)
|
||||
public GPSFixMoving getGPSFix();
|
||||
|
||||
@Dimension(messageKey="WindStrength", ordinal=10)
|
||||
public ClusterDTO getWindStrength();
|
||||
@Dimension(messageKey="WindStrengthInBeaufort", ordinal=11)
|
||||
public ClusterDTO getWindStrengthAsBeaufortCluster(Locale locale, ResourceBundleStringMessages stringMessages);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.sap.sailing.datamining.data;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.NoWindException;
|
||||
import com.sap.sailing.domain.common.Speed;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sse.datamining.shared.annotations.Connector;
|
||||
import com.sap.sse.datamining.shared.annotations.Dimension;
|
||||
|
||||
public interface HasMarkPassingContext {
|
||||
|
||||
@Connector
|
||||
HasTrackedRaceContext getTrackedRaceContext();
|
||||
|
||||
@Connector
|
||||
MarkPassing getMarkPassing();
|
||||
|
||||
@Connector(messageKey="Competitor")
|
||||
Competitor getCompetitor();
|
||||
|
||||
@Connector(messageKey="Speed", ordinal=1)
|
||||
Speed getSpeed();
|
||||
|
||||
@Connector(messageKey="SpeedTenSecondsBefore", ordinal=2)
|
||||
Speed getSpeedTenSecondsBefore();
|
||||
|
||||
@Dimension(messageKey="LegType", ordinal=6)
|
||||
String getPreviousLegTypeSignifier() throws NoWindException;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.sap.sailing.datamining.impl.components;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.NavigableSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import java.util.HashSet;
|
||||
import com.sap.sailing.datamining.data.HasMarkPassingContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedRaceContext;
|
||||
import com.sap.sailing.datamining.impl.data.MarkPassingWithContext;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractSimpleRetrievalProcessor;
|
||||
|
||||
public class MarkPassingRetrievalProcessor extends
|
||||
AbstractSimpleRetrievalProcessor<HasTrackedRaceContext, HasMarkPassingContext> {
|
||||
|
||||
public MarkPassingRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<HasMarkPassingContext, ?>> resultReceivers) {
|
||||
super(HasTrackedRaceContext.class, HasMarkPassingContext.class, executor, resultReceivers);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<HasMarkPassingContext> retrieveData(HasTrackedRaceContext element) {
|
||||
TrackedRace trackedRace = element.getTrackedRace();
|
||||
Set<HasMarkPassingContext> result = new HashSet<>();
|
||||
trackedRace.getRace().getCourse().lockForRead();
|
||||
try {
|
||||
for (Competitor competitor : trackedRace.getRace().getCompetitors()) {
|
||||
NavigableSet<MarkPassing> markPassingsForCompetitor = trackedRace.getMarkPassings(competitor);
|
||||
trackedRace.lockForRead(markPassingsForCompetitor);
|
||||
try {
|
||||
markPassingsForCompetitor.stream().forEach(mp->result.add(new MarkPassingWithContext(element, mp)));
|
||||
} finally {
|
||||
trackedRace.unlockAfterRead(markPassingsForCompetitor);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
trackedRace.getRace().getCourse().unlockAfterRead();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,10 +10,10 @@ import com.sap.sailing.domain.leaderboard.RegattaLeaderboard;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractSimpleRetrievalProcessor;
|
||||
|
||||
public class RegattaLeaderboardFilteringRetrievalProcessor extends
|
||||
public class RegattaLeaderboardRetrievalProcessor extends
|
||||
AbstractSimpleRetrievalProcessor<LeaderboardGroup, RegattaLeaderboard> {
|
||||
|
||||
public RegattaLeaderboardFilteringRetrievalProcessor(ExecutorService executor,
|
||||
public RegattaLeaderboardRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<RegattaLeaderboard, ?>> resultReceivers) {
|
||||
super(LeaderboardGroup.class, RegattaLeaderboard.class, executor, resultReceivers);
|
||||
}
|
||||
@@ -11,10 +11,10 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractSimpleRetrievalProcessor;
|
||||
|
||||
public class TrackedLegOfCompetitorFilteringRetrievalProcessor extends
|
||||
public class TrackedLegOfCompetitorRetrievalProcessor extends
|
||||
AbstractSimpleRetrievalProcessor<HasTrackedLegContext, HasTrackedLegOfCompetitorContext> {
|
||||
|
||||
public TrackedLegOfCompetitorFilteringRetrievalProcessor(ExecutorService executor,
|
||||
public TrackedLegOfCompetitorRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<HasTrackedLegOfCompetitorContext, ?>> resultReceivers) {
|
||||
super(HasTrackedLegContext.class, HasTrackedLegOfCompetitorContext.class, executor, resultReceivers);
|
||||
}
|
||||
@@ -11,10 +11,10 @@ import com.sap.sailing.domain.tracking.TrackedLeg;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractSimpleRetrievalProcessor;
|
||||
|
||||
public class TrackedLegFilteringRetrievalProcessor extends
|
||||
public class TrackedLegRetrievalProcessor extends
|
||||
AbstractSimpleRetrievalProcessor<HasTrackedRaceContext, HasTrackedLegContext> {
|
||||
|
||||
public TrackedLegFilteringRetrievalProcessor(ExecutorService executor,
|
||||
public TrackedLegRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<HasTrackedLegContext, ?>> resultReceivers) {
|
||||
super(HasTrackedRaceContext.class, HasTrackedLegContext.class, executor, resultReceivers);
|
||||
}
|
||||
@@ -14,10 +14,10 @@ import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractSimpleRetrievalProcessor;
|
||||
|
||||
public class TrackedRaceFilteringRetrievalProcessor extends
|
||||
public class TrackedRaceRetrievalProcessor extends
|
||||
AbstractSimpleRetrievalProcessor<Leaderboard, HasTrackedRaceContext> {
|
||||
|
||||
public TrackedRaceFilteringRetrievalProcessor(ExecutorService executor,
|
||||
public TrackedRaceRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<HasTrackedRaceContext, ?>> resultReceivers) {
|
||||
super(Leaderboard.class, HasTrackedRaceContext.class, executor, resultReceivers);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.datamining.impl.data;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.sap.sailing.datamining.Activator;
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedLegOfCompetitorContext;
|
||||
@@ -7,6 +9,7 @@ import com.sap.sailing.domain.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.tracking.Wind;
|
||||
import com.sap.sse.datamining.data.Cluster;
|
||||
import com.sap.sse.datamining.shared.impl.dto.ClusterDTO;
|
||||
import com.sap.sse.i18n.ResourceBundleStringMessages;
|
||||
|
||||
public class GPSFixWithContext implements HasGPSFixContext {
|
||||
|
||||
@@ -31,10 +34,10 @@ public class GPSFixWithContext implements HasGPSFixContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterDTO getWindStrength() {
|
||||
public ClusterDTO getWindStrengthAsBeaufortCluster(Locale locale, ResourceBundleStringMessages stringMessages) {
|
||||
Wind wind = getWind();
|
||||
Cluster<?> cluster = Activator.getDefault().getClusterGroups().getWindStrengthInBeaufortCluster().getClusterFor(wind);
|
||||
return new ClusterDTO(cluster.toString());
|
||||
return new ClusterDTO(cluster.getAsLocalizedString(locale, stringMessages));
|
||||
}
|
||||
|
||||
private Wind getWind() {
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.sap.sailing.datamining.impl.data;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasMarkPassingContext;
|
||||
import com.sap.sailing.datamining.data.HasTrackedRaceContext;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.Waypoint;
|
||||
import com.sap.sailing.domain.common.NoWindException;
|
||||
import com.sap.sailing.domain.common.Speed;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedLeg;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
|
||||
public class MarkPassingWithContext implements HasMarkPassingContext {
|
||||
private final HasTrackedRaceContext trackedRaceContext;
|
||||
private final MarkPassing markPassing;
|
||||
|
||||
public MarkPassingWithContext(HasTrackedRaceContext trackedRaceContext, MarkPassing markPassing) {
|
||||
super();
|
||||
this.trackedRaceContext = trackedRaceContext;
|
||||
this.markPassing = markPassing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HasTrackedRaceContext getTrackedRaceContext() {
|
||||
return trackedRaceContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarkPassing getMarkPassing() {
|
||||
return markPassing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor getCompetitor() {
|
||||
return markPassing.getCompetitor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Speed getSpeed() {
|
||||
return getTrackedRace().getTrack(getCompetitor()).getEstimatedSpeed(getMarkPassing().getTimePoint());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Speed getSpeedTenSecondsBefore() {
|
||||
return getTrackedRace().getTrack(getCompetitor()).getEstimatedSpeed(getMarkPassing().getTimePoint().minus(10000 /* ms */));
|
||||
}
|
||||
|
||||
private TrackedRace getTrackedRace() {
|
||||
return trackedRaceContext.getTrackedRace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousLegTypeSignifier() throws NoWindException {
|
||||
final String result;
|
||||
TrackedLeg previousLeg = getPreviousLeg();
|
||||
if (previousLeg == null) {
|
||||
result = "Start";
|
||||
} else {
|
||||
result = previousLeg.getLegType(getMarkPassing().getTimePoint()).toString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private TrackedLeg getPreviousLeg() {
|
||||
final TrackedLeg result;
|
||||
Waypoint waypoint = markPassing.getWaypoint();
|
||||
if (waypoint == getTrackedRace().getRace().getCourse().getFirstWaypoint()) {
|
||||
result = null;
|
||||
} else {
|
||||
result = getTrackedRace().getTrackedLegFinishingAt(waypoint);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,8 @@ Export-Package: com.sap.sailing.domain.common,
|
||||
com.sap.sailing.domain.common.racelog.tracking,
|
||||
com.sap.sailing.domain.common.racelog.utils,
|
||||
com.sap.sailing.domain.common.scalablevalue.impl,
|
||||
com.sap.sailing.domain.common.security,
|
||||
com.sap.sailing.domain.common.trackfiles
|
||||
Require-Bundle: com.sap.sse.datamining.shared,
|
||||
com.sap.sse.common
|
||||
com.sap.sse.common,
|
||||
com.sap.sse.security.common
|
||||
@@ -32,4 +32,6 @@ public interface PolarSheetGenerationSettings extends Serializable {
|
||||
|
||||
boolean areDefault();
|
||||
|
||||
int getNumberOfLeadingCompetitorsToInclude();
|
||||
|
||||
}
|
||||
@@ -11,4 +11,6 @@ public interface PolarSheetsXYDiagramData extends Serializable {
|
||||
|
||||
List<Pair<Double, Double>> getPointsForAverageConfidence(Tack tack, LegType legType);
|
||||
|
||||
List<Pair<Double, Double>> getPointsForAverageSpeedRegression(Tack tack, LegType legType);
|
||||
|
||||
}
|
||||
@@ -22,11 +22,17 @@ public interface CompetitorDTO extends Serializable, MappableToDevice {
|
||||
String getName();
|
||||
|
||||
Color getColor();
|
||||
|
||||
String getEmail();
|
||||
|
||||
boolean hasEmail();
|
||||
|
||||
/**
|
||||
* A regular instance will simply return this object. A compacted version may compute the result by looking it up
|
||||
* from the previous version of the enclosing leaderboard.
|
||||
*/
|
||||
CompetitorDTO getCompetitorFromPrevious(LeaderboardDTO previousVersion);
|
||||
|
||||
String getImageURL();
|
||||
|
||||
}
|
||||
@@ -19,22 +19,26 @@ public class CompetitorDTOImpl extends NamedDTO implements CompetitorDTO, Serial
|
||||
private String twoLetterIsoCountryCode;
|
||||
private String threeLetterIocCountryCode;
|
||||
private Color color;
|
||||
private String email;
|
||||
private String sailID;
|
||||
private String idAsString;
|
||||
private BoatClassDTO boatClass;
|
||||
private String imageURL;
|
||||
|
||||
public CompetitorDTOImpl() {}
|
||||
|
||||
public CompetitorDTOImpl(String name, Color color, String twoLetterIsoCountryCode, String threeLetterIocCountryCode,
|
||||
String countryName, String sailID, String idAsString, BoatClassDTO boatClass) {
|
||||
public CompetitorDTOImpl(String name, Color color, String email, String twoLetterIsoCountryCode, String threeLetterIocCountryCode,
|
||||
String countryName, String sailID, String idAsString, String imageURL, BoatClassDTO boatClass) {
|
||||
super(name);
|
||||
this.color = color;
|
||||
this.email = email;
|
||||
this.twoLetterIsoCountryCode = twoLetterIsoCountryCode;
|
||||
this.threeLetterIocCountryCode = threeLetterIocCountryCode;
|
||||
this.countryName = countryName;
|
||||
this.sailID = sailID;
|
||||
this.idAsString = idAsString;
|
||||
this.boatClass = boatClass;
|
||||
this.imageURL = imageURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,7 +49,9 @@ public class CompetitorDTOImpl extends NamedDTO implements CompetitorDTO, Serial
|
||||
result = prime * result + ((idAsString == null) ? 0 : idAsString.hashCode());
|
||||
result = prime * result + ((sailID == null) ? 0 : sailID.hashCode());
|
||||
result = prime * result + ((color == null) ? 0 : color.hashCode());
|
||||
result = prime * result + ((email == null) ? 0 : email.hashCode());
|
||||
result = prime * result + ((threeLetterIocCountryCode == null) ? 0 : threeLetterIocCountryCode.hashCode());
|
||||
result = prime * result + ((imageURL == null) ? 0 : imageURL.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -83,6 +89,16 @@ public class CompetitorDTOImpl extends NamedDTO implements CompetitorDTO, Serial
|
||||
return false;
|
||||
} else if (!color.equals(other.color))
|
||||
return false;
|
||||
if (email == null) {
|
||||
if (other.email != null)
|
||||
return false;
|
||||
} else if (!email.equals(other.email))
|
||||
return false;
|
||||
if (imageURL == null) {
|
||||
if (other.imageURL != null)
|
||||
return false;
|
||||
} else if (!imageURL.equals(other.imageURL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -105,6 +121,11 @@ public class CompetitorDTOImpl extends NamedDTO implements CompetitorDTO, Serial
|
||||
public String getSailID() {
|
||||
return sailID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getImageURL() {
|
||||
return imageURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdAsString() {
|
||||
@@ -124,4 +145,17 @@ public class CompetitorDTOImpl extends NamedDTO implements CompetitorDTO, Serial
|
||||
public Color getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public String email(){
|
||||
return email;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEmail() {
|
||||
return email != null && !email.isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -92,9 +92,26 @@ public class PreviousCompetitorDTOImpl implements CompetitorDTO {
|
||||
throw new RuntimeException("Internal error. Objects of type "+PreviousCompetitorDTOImpl.class.getName()+
|
||||
" need to be replaced by an object of "+CompetitorDTOImpl.class.getName()+" after deserialization");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEmail() {
|
||||
throw new RuntimeException("Internal error. Objects of type "+PreviousCompetitorDTOImpl.class.getName()+
|
||||
" need to be replaced by an object of "+CompetitorDTOImpl.class.getName()+" after deserialization");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getImageURL() {
|
||||
throw new RuntimeException("Internal error. Objects of type "+PreviousCompetitorDTOImpl.class.getName()+
|
||||
" need to be replaced by an object of "+CompetitorDTOImpl.class.getName()+" after deserialization");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompetitorDTO getCompetitorFromPrevious(LeaderboardDTO previousVersion) {
|
||||
return previousVersion.competitors.get(indexInPreviousCompetitorList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEmail() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,4 @@ public class PreviousSuppressedCompetitorDTOImpl extends PreviousCompetitorDTOIm
|
||||
public CompetitorDTO getCompetitorFromPrevious(LeaderboardDTO previousVersion) {
|
||||
return Util.get(previousVersion.getSuppressedCompetitors(), getIndexInPreviousCompetitorList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,7 +25,9 @@ public class NaturalComparator implements Comparator<String> {
|
||||
* Compare the passed strings in natural order.
|
||||
*/
|
||||
@Override
|
||||
public int compare(String a, String b) {
|
||||
public int compare(final String aOrNull, final String bOrNull) {
|
||||
String a = aOrNull == null ? "" : aOrNull;
|
||||
String b = bOrNull == null ? "" : bOrNull;
|
||||
if (!caseSensitive){
|
||||
a = a.toLowerCase();
|
||||
b = b.toLowerCase();
|
||||
|
||||
@@ -11,7 +11,7 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
double[] levels = { 4., 6., 8., 10., 12., 14., 16., 20., 25., 30. };
|
||||
WindSpeedSteppingWithMaxDistance windStepping = new WindSpeedSteppingWithMaxDistance(levels, 2.5);
|
||||
return new PolarSheetGenerationSettingsImpl(50, 0.1, 20, 20, 0.1, true, true, 2, 0.05, true, windStepping,
|
||||
false);
|
||||
false, 0);
|
||||
}
|
||||
|
||||
public static PolarSheetGenerationSettings createBackendPolarSettings() {
|
||||
@@ -26,7 +26,7 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
}
|
||||
WindSpeedSteppingWithMaxDistance windStepping = new WindSpeedSteppingWithMaxDistance(levels, 0.5);
|
||||
return new PolarSheetGenerationSettingsImpl(50, 0.1, 20, 20, 0.1, true, true, 2, 0.05, true, windStepping,
|
||||
false);
|
||||
false, 1);
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 2731616509404813790L;
|
||||
@@ -42,6 +42,7 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
private boolean useOnlyEstimationForWindDirection;
|
||||
private WindSpeedSteppingWithMaxDistance windStepping;
|
||||
private boolean splitByWindGauges;
|
||||
private int numberOfLeadingCompetitorsToInclude;
|
||||
|
||||
//GWT
|
||||
PolarSheetGenerationSettingsImpl() {};
|
||||
@@ -51,7 +52,7 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
boolean useOnlyWindGaugesForWindSpeed, boolean shouldRemoveOutliers,
|
||||
double outlierDetectionNeighboorhoodRadius, double outlierMinimumNeighboorhoodPct,
|
||||
boolean useOnlyEstimationForWindDirection, WindSpeedSteppingWithMaxDistance windStepping,
|
||||
boolean splitByWindGauges) {
|
||||
boolean splitByWindGauges, int numberOfLeadingCompetitorsToInclude) {
|
||||
this.minimumDataCountPerGraph = minimumDataCountPerGraph;
|
||||
this.minimumWindConfidence = minimumWindConfidence;
|
||||
this.minimumDataCountPerAngle = minimumDataCountPerAngle;
|
||||
@@ -64,6 +65,7 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
this.useOnlyEstimationForWindDirection = useOnlyEstimationForWindDirection;
|
||||
this.windStepping = windStepping;
|
||||
this.splitByWindGauges = splitByWindGauges;
|
||||
this.numberOfLeadingCompetitorsToInclude = numberOfLeadingCompetitorsToInclude;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -206,5 +208,10 @@ public class PolarSheetGenerationSettingsImpl implements PolarSheetGenerationSet
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfLeadingCompetitorsToInclude() {
|
||||
return numberOfLeadingCompetitorsToInclude;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.sap.sailing.domain.common.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -17,35 +16,18 @@ public class PolarSheetsXYDiagramDataImpl implements PolarSheetsXYDiagramData {
|
||||
}
|
||||
|
||||
private Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> pointsForAverageSpeedMovingAverage;
|
||||
|
||||
private Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> pointsForAverageSpeedRegression;
|
||||
|
||||
private Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> pointsForAverageConfidence;
|
||||
|
||||
public PolarSheetsXYDiagramDataImpl(List<Pair<Double, Double>> pointsForUpwindStarboardAverageSpeedMovingAverage,
|
||||
List<Pair<Double, Double>> pointsForUpwindStarboardAverageConfidence,
|
||||
List<Pair<Double, Double>> pointsForUpwindPortAverageSpeedMovingAverage,
|
||||
List<Pair<Double, Double>> pointsForUpwindPortAverageConfidence,
|
||||
List<Pair<Double, Double>> pointsForDownwindStarboardAverageSpeedMovingAverage,
|
||||
List<Pair<Double, Double>> pointsForDownwindStarboardAverageConfidence,
|
||||
List<Pair<Double, Double>> pointsForDownwindPortAverageSpeedMovingAverage,
|
||||
List<Pair<Double, Double>> pointsForDownwindPortAverageConfidence) {
|
||||
pointsForAverageSpeedMovingAverage = new HashMap<Pair<LegType, Tack>, List<Pair<Double, Double>>>();
|
||||
pointsForAverageConfidence = new HashMap<Pair<LegType, Tack>, List<Pair<Double, Double>>>();
|
||||
pointsForAverageSpeedMovingAverage.put(new Pair<LegType, Tack>(LegType.UPWIND, Tack.STARBOARD),
|
||||
pointsForUpwindStarboardAverageSpeedMovingAverage);
|
||||
pointsForAverageConfidence.put(new Pair<LegType, Tack>(LegType.UPWIND, Tack.STARBOARD),
|
||||
pointsForUpwindStarboardAverageConfidence);
|
||||
pointsForAverageSpeedMovingAverage.put(new Pair<LegType, Tack>(LegType.UPWIND, Tack.PORT),
|
||||
pointsForUpwindPortAverageSpeedMovingAverage);
|
||||
pointsForAverageConfidence.put(new Pair<LegType, Tack>(LegType.UPWIND, Tack.PORT),
|
||||
pointsForUpwindPortAverageConfidence);
|
||||
pointsForAverageSpeedMovingAverage.put(new Pair<LegType, Tack>(LegType.DOWNWIND, Tack.STARBOARD),
|
||||
pointsForDownwindStarboardAverageSpeedMovingAverage);
|
||||
pointsForAverageConfidence.put(new Pair<LegType, Tack>(LegType.DOWNWIND, Tack.STARBOARD),
|
||||
pointsForDownwindStarboardAverageConfidence);
|
||||
pointsForAverageSpeedMovingAverage.put(new Pair<LegType, Tack>(LegType.DOWNWIND, Tack.PORT),
|
||||
pointsForDownwindPortAverageSpeedMovingAverage);
|
||||
pointsForAverageConfidence.put(new Pair<LegType, Tack>(LegType.DOWNWIND, Tack.PORT),
|
||||
pointsForDownwindPortAverageConfidence);
|
||||
public PolarSheetsXYDiagramDataImpl(
|
||||
Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> movingAverageSpeedDataLists,
|
||||
Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> regressionSpeedDataLists,
|
||||
Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> averageConfidenceDataLists) {
|
||||
pointsForAverageSpeedMovingAverage = movingAverageSpeedDataLists;
|
||||
pointsForAverageSpeedRegression = regressionSpeedDataLists;
|
||||
pointsForAverageConfidence = averageConfidenceDataLists;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,4 +40,8 @@ public class PolarSheetsXYDiagramDataImpl implements PolarSheetsXYDiagramData {
|
||||
return pointsForAverageConfidence.get(new Pair<LegType, Tack>(legType, tack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Double, Double>> getPointsForAverageSpeedRegression(Tack tack, LegType legType) {
|
||||
return pointsForAverageSpeedRegression.get(new Pair<LegType, Tack>(legType, tack));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.sap.sailing.domain.common.racelog.tracking;
|
||||
|
||||
import com.sap.sailing.domain.common.racelog.RaceLogServletConstants;
|
||||
import com.sap.sse.common.util.UrlHelper;
|
||||
|
||||
/**
|
||||
* Shared between GWT and Android. Used for creating and deciphering the URL encoded by the QRCode, which gives the
|
||||
* tracking app all necessary information for creating the device mapping of either the race or leaderboard/regatta.
|
||||
@@ -13,28 +16,50 @@ package com.sap.sailing.domain.common.racelog.tracking;
|
||||
*
|
||||
* @author Fredrik Teschke
|
||||
*/
|
||||
public interface DeviceMappingConstants {
|
||||
public class DeviceMappingConstants {
|
||||
// According to the HTTP protocol definition (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.3), only
|
||||
// schema and host are case insensitive.
|
||||
// But to adhere to best practices, and due to the deficiencies of some web servers and clients,
|
||||
// all URL components should be treated as case insensitive, preferring _underscores_ to CamelCase.
|
||||
static final String URL_BASE = "/tracking/checkin";
|
||||
static final String URL_EVENT_ID = "event_id";
|
||||
static final String URL_LEADERBOARD_NAME = "leaderboard_name";
|
||||
static final String URL_COMPETITOR_ID_AS_STRING = "competitor_id";
|
||||
static final String URL_MARK_ID_AS_STRING = "mark_id";
|
||||
static final String URL_FROM_MILLIS = "from_millis";
|
||||
static final String URL_TO_MILLIS = "to_millis";
|
||||
public static final String URL_BASE = "/tracking/checkin";
|
||||
public static final String URL_EVENT_ID = "event_id";
|
||||
public static final String URL_LEADERBOARD_NAME = "leaderboard_name";
|
||||
public static final String URL_COMPETITOR_ID_AS_STRING = "competitor_id";
|
||||
public static final String URL_MARK_ID_AS_STRING = "mark_id";
|
||||
public static final String URL_FROM_MILLIS = "from_millis";
|
||||
public static final String URL_TO_MILLIS = "to_millis";
|
||||
|
||||
static final String JSON_COMPETITOR_ID_AS_STRING = "competitorId";
|
||||
static final String JSON_MARK_ID_AS_STRING = "markId";
|
||||
static final String JSON_DEVICE_UUID = "deviceUuid";
|
||||
static final String JSON_DEVICE_TYPE = "deviceType";
|
||||
static final String JSON_PUSH_DEVICE_ID = "pushDeviceId";
|
||||
static final String JSON_FROM_MILLIS = "fromMillis";
|
||||
static final String JSON_TO_MILLIS = "toMillis";
|
||||
static final String JSON_TEAM_IMAGE_URI = "teamImageUri";
|
||||
public static final String JSON_COMPETITOR_ID_AS_STRING = "competitorId";
|
||||
public static final String JSON_MARK_ID_AS_STRING = "markId";
|
||||
public static final String JSON_DEVICE_UUID = "deviceUuid";
|
||||
public static final String JSON_DEVICE_TYPE = "deviceType";
|
||||
public static final String JSON_PUSH_DEVICE_ID = "pushDeviceId";
|
||||
public static final String JSON_FROM_MILLIS = "fromMillis";
|
||||
public static final String JSON_TO_MILLIS = "toMillis";
|
||||
public static final String JSON_TEAM_IMAGE_URI = "teamImageUri";
|
||||
|
||||
@Deprecated
|
||||
static final String APK_PATH = "/apps/com.sap.sailing.android.tracking.app.apk";
|
||||
|
||||
public static String getDeviceMappingForRegattaLogUrl(String serverUrlWithoutTrailingSlash, String eventId,
|
||||
String leaderboardName, String mappedItemType, String mappedItemId, UrlHelper helper) {
|
||||
return helper.encodeUrl(serverUrlWithoutTrailingSlash + URL_BASE + "?" + URL_EVENT_ID + "=" + eventId + "&"
|
||||
+ URL_LEADERBOARD_NAME + "=" + leaderboardName + "&" + mappedItemType + "="
|
||||
+ mappedItemId);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String getDeviceMappingForRaceLogUrl(String serverUrlWithoutTrailingSlash, String leaderboardName,
|
||||
String raceColumnName, String fleetName, String mappedItemType, String mappedItemId, long fromMillis,
|
||||
long toMillis, UrlHelper helper) throws QRCodeURLCreationException {
|
||||
if (fromMillis > toMillis) {
|
||||
throw new QRCodeURLCreationException("from can't lie after to");
|
||||
}
|
||||
return helper.encodeUrl(serverUrlWithoutTrailingSlash + DeviceMappingConstants.APK_PATH + "?"
|
||||
+ RaceLogServletConstants.PARAMS_LEADERBOARD_NAME + "=" + leaderboardName + "&"
|
||||
+ RaceLogServletConstants.PARAMS_RACE_COLUMN_NAME + "=" + raceColumnName + "&"
|
||||
+ RaceLogServletConstants.PARAMS_RACE_FLEET_NAME + "=" + fleetName + "&" + mappedItemType + "="
|
||||
+ mappedItemId + "&" + DeviceMappingConstants.URL_FROM_MILLIS + "=" + fromMillis + "&"
|
||||
+ DeviceMappingConstants.URL_TO_MILLIS + "=" + toMillis);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.domain.common.racelog.tracking;
|
||||
|
||||
public class QRCodeURLCreationException extends Exception {
|
||||
private static final long serialVersionUID = -8243995470804772458L;
|
||||
|
||||
public QRCodeURLCreationException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.sap.sailing.domain.common.security;
|
||||
|
||||
public enum Permission implements com.sap.sse.security.shared.Permission {
|
||||
MANAGE_EVENTS,
|
||||
MANAGE_REGATTAS,
|
||||
MANAGE_TRACKED_RACES,
|
||||
SHOW_TRACKED_RACES,
|
||||
MANAGE_RACELOG_TRACKING,
|
||||
MANAGE_ALL_COMPETITORS,
|
||||
MANAGE_COURSE_LAYOUT,
|
||||
MANAGE_WIND,
|
||||
MANAGE_IGTIMI_ACCOUNTS,
|
||||
MANAGE_LEADERBOARDS,
|
||||
MANAGE_LEADERBOARD_GROUPS,
|
||||
MANAGE_RESULT_IMPORT_URLS,
|
||||
MANAGE_STRUCTURE_IMPORT_URLS,
|
||||
MANAGE_MEDIA,
|
||||
MANAGE_SAILING_SERVER_INSTANCES,
|
||||
MANAGE_REPLICATION,
|
||||
MANAGE_MASTERDATA_IMPORT,
|
||||
MANAGE_DEVICE_CONFIGURATION,
|
||||
MANAGE_USERS,
|
||||
MANAGE_FILE_STORAGE;
|
||||
|
||||
@Override
|
||||
public String getStringPermission() {
|
||||
return name()+":";
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.sap.sailing.gwt.ui.usermanagement;
|
||||
package com.sap.sailing.domain.common.security;
|
||||
|
||||
import com.sap.sse.security.shared.DefaultRoles;
|
||||
import com.sap.sse.security.shared.Role;
|
||||
|
||||
public enum UserRoles {
|
||||
administrator(DefaultRoles.ADMIN.getRolename()),
|
||||
public enum Roles implements Role {
|
||||
spectator("spectator"),
|
||||
moderator("moderator"),
|
||||
sailor("sailor"),
|
||||
@@ -11,7 +10,7 @@ public enum UserRoles {
|
||||
eventmanager("eventmanager"),
|
||||
mediaeditor("mediaeditor");
|
||||
|
||||
private UserRoles(String rolename) {
|
||||
private Roles(String rolename) {
|
||||
this.rolename = rolename;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.sap.sailing.domain.common.security;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import com.sap.sse.security.shared.DefaultRoles;
|
||||
import com.sap.sse.security.shared.PermissionsForRoleProvider;
|
||||
|
||||
public class SailingPermissionsForRoleProvider implements PermissionsForRoleProvider {
|
||||
public static final SailingPermissionsForRoleProvider INSTANCE = new SailingPermissionsForRoleProvider();
|
||||
|
||||
@Override
|
||||
public Iterable<String> getPermissions(String role) {
|
||||
final Iterable<String> result;
|
||||
if (DefaultRoles.ADMIN.getRolename().equals(role)) {
|
||||
return Collections.<String>singletonList("*");
|
||||
} else {
|
||||
result = Collections.emptyList();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class AbstractGPSFixStoreTest {
|
||||
protected final DeviceIdentifier device = new SmartphoneImeiIdentifier("a");
|
||||
protected RaceLog raceLog;
|
||||
protected GPSFixStore store;
|
||||
protected final Competitor comp = DomainFactory.INSTANCE.getOrCreateCompetitor("comp", "comp", null, null, null);
|
||||
protected final Competitor comp = DomainFactory.INSTANCE.getOrCreateCompetitor("comp", "comp", null, null, null, null);
|
||||
protected final Mark mark = DomainFactory.INSTANCE.getOrCreateMark("mark");
|
||||
|
||||
private final AbstractLogEventAuthor author = new LogEventAuthorImpl("author", 0);
|
||||
|
||||
@@ -168,7 +168,7 @@ public class CreateAndTrackWithRaceLogTest {
|
||||
assertFalse(raceLog.isEmpty());
|
||||
|
||||
// add a mapping and one fix in, one out of mapping
|
||||
Competitor comp1 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp1", "comp1", null, null, null);
|
||||
Competitor comp1 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp1", "comp1", null, null, null, null);
|
||||
DeviceIdentifier dev1 = new SmartphoneImeiIdentifier("dev1");
|
||||
raceLog.add(factory.createDeviceCompetitorMappingEvent(t(), author, dev1, comp1, 0, t(0), t(10)));
|
||||
addFixes0(dev1);
|
||||
@@ -202,7 +202,7 @@ public class CreateAndTrackWithRaceLogTest {
|
||||
adapter.denoteRaceForRaceLogTracking(service, leaderboard, column, fleet, "race");
|
||||
|
||||
// add a mapping and one fix in, one out of mapping
|
||||
Competitor comp1 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp1", "comp1", null, null, null);
|
||||
Competitor comp1 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp1", "comp1", null, null, null, null);
|
||||
DeviceIdentifier dev1 = new SmartphoneImeiIdentifier("dev1");
|
||||
regattaLog.add(new RegattaLogDeviceCompetitorMappingEventImpl(t(), author, t(), UUID.randomUUID(), comp1, dev1,
|
||||
t(0), t(10)));
|
||||
|
||||
@@ -49,7 +49,7 @@ public class TrackedRaceLoadsFixesTest extends AbstractGPSFixStoreTest {
|
||||
@Test
|
||||
public void areFixesStoredInDb() throws TransformationException, NoCorrespondingServiceRegisteredException,
|
||||
InterruptedException {
|
||||
Competitor comp2 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp2", "comp2", null, null, null);
|
||||
Competitor comp2 = DomainFactory.INSTANCE.getOrCreateCompetitor("comp2", "comp2", null, null, null, null);
|
||||
Mark mark2 = DomainFactory.INSTANCE.getOrCreateMark("mark2");
|
||||
DeviceIdentifier device2 = new SmartphoneImeiIdentifier("imei2");
|
||||
DeviceIdentifier device3 = new SmartphoneImeiIdentifier("imei3");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//resources/stringmessages/TrackingStringMessages_de.properties=UTF-8
|
||||
@@ -17,8 +17,13 @@ Require-Bundle: com.sap.sailing.domain,
|
||||
com.sap.sse.common,
|
||||
com.sap.sse.replication,
|
||||
com.sap.sse,
|
||||
com.sap.sailing.server.gateway.serialization.shared.android
|
||||
Import-Package: com.mongodb,
|
||||
com.sap.sailing.server.gateway.serialization.shared.android,
|
||||
com.sap.sse.mail
|
||||
Import-Package: com.google.zxing;version="3.1.0",
|
||||
com.mongodb,
|
||||
javax.mail;version="1.4.0",
|
||||
javax.mail.internet;version="1.4.0",
|
||||
javax.mail.util;version="1.4.0",
|
||||
javax.servlet;version="2.6.0",
|
||||
org.json.simple,
|
||||
org.json.simple.parser,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
source.. = src/
|
||||
source.. = src/,\
|
||||
resources/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
@@ -0,0 +1,4 @@
|
||||
trackingInvitationFor=Einladung zum Tracken für
|
||||
scanQRCodeOrVisitUrlToRegisterAs=Scanne den QRCode oder klicke den Link mit deinem Smartphone an um dich zu registrieren als
|
||||
welcomeTo=Willkommen zu
|
||||
alternativelyVisitThisLink=Alternativ kannst du diesen Link anklicken
|
||||
@@ -0,0 +1,4 @@
|
||||
trackingInvitationFor=Tracking Invitation for
|
||||
scanQRCodeOrVisitUrlToRegisterAs=Scan the following QRCode or click the link using your smartphone to register as
|
||||
welcomeTo=Welcome to
|
||||
alternativelyVisitThisLink=Alternatively, you can click this Link
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.racelogtracking;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.sap.sailing.domain.abstractlog.race.RaceLog;
|
||||
@@ -10,6 +11,7 @@ import com.sap.sailing.domain.abstractlog.race.tracking.RaceLogStartTrackingEven
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.ControlPoint;
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.RaceColumn;
|
||||
@@ -24,12 +26,14 @@ import com.sap.sailing.domain.racelogtracking.impl.RaceLogRaceTracker;
|
||||
import com.sap.sailing.domain.tracking.GPSFix;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sse.common.mail.MailException;
|
||||
|
||||
public interface RaceLogTrackingAdapter {
|
||||
public interface RaceLogTrackingAdapter {
|
||||
/**
|
||||
* Performs the necessary steps to ensure that the race is tracked (aka that a {@link TrackedRace}
|
||||
* is created from the data in this {@code RaceLog}).<p>
|
||||
* The following steps are performed to achieve this:
|
||||
* Performs the necessary steps to ensure that the race is tracked (aka that a {@link TrackedRace} is created from
|
||||
* the data in this {@code RaceLog}).
|
||||
* <p>
|
||||
* The following steps are performed to achieve this:
|
||||
* <ul>
|
||||
* <li>Is the racelog denoted for tracking? If not, throw exception.</li>
|
||||
* <li>Is a {@link RaceLogRaceTracker} already listening for this racelog? If not, add one.</li>
|
||||
@@ -38,7 +42,7 @@ public interface RaceLogTrackingAdapter {
|
||||
*/
|
||||
void startTracking(RacingEventService service, Leaderboard leaderboard, RaceColumn raceColumn, Fleet fleet)
|
||||
throws NotDenotedForRaceLogTrackingException, Exception;
|
||||
|
||||
|
||||
RaceLogTrackingState getRaceLogTrackingState(RacingEventService service, RaceColumn raceColumn, Fleet fleet);
|
||||
|
||||
/**
|
||||
@@ -51,16 +55,15 @@ public interface RaceLogTrackingAdapter {
|
||||
*
|
||||
* @throws NotDenotableForRaceLogTrackingException
|
||||
* Fails, if no {@link RaceLog}, or a non-empty {@link RaceLog}, or one with attached
|
||||
* {@link TrackedRace} is found already in place.
|
||||
* Also fails, if the {@code leaderboard} is not a {@link RegattaLeaderboard}.
|
||||
* {@link TrackedRace} is found already in place. Also fails, if the {@code leaderboard} is not a
|
||||
* {@link RegattaLeaderboard}.
|
||||
*/
|
||||
void denoteRaceForRaceLogTracking(RacingEventService service, Leaderboard leaderboard, RaceColumn raceColumn,
|
||||
Fleet fleet, String raceName) throws NotDenotableForRaceLogTrackingException;
|
||||
|
||||
|
||||
/**
|
||||
* Revoke the {@link RaceLogDenoteForTrackingEvent}, and if it exists the {@link RaceLogStartTrackingEvent}.
|
||||
* This does not affect existing an {@link RaceLogRaceTracker}
|
||||
* or {@link TrackedRace} for this {@code RaceLog}.
|
||||
* Revoke the {@link RaceLogDenoteForTrackingEvent}, and if it exists the {@link RaceLogStartTrackingEvent}. This
|
||||
* does not affect existing an {@link RaceLogRaceTracker} or {@link TrackedRace} for this {@code RaceLog}.
|
||||
*/
|
||||
void removeDenotationForRaceLogTracking(RacingEventService service, RaceLog raceLog);
|
||||
|
||||
@@ -71,30 +74,35 @@ public interface RaceLogTrackingAdapter {
|
||||
*/
|
||||
void denoteAllRacesForRaceLogTracking(RacingEventService service, Leaderboard leaderboard)
|
||||
throws NotDenotableForRaceLogTrackingException;
|
||||
|
||||
|
||||
/**
|
||||
* Add a fix to the {@link GPSFixStore}, and create a mapping with a virtual device for exactly that timepoint.
|
||||
*/
|
||||
void pingMark(RaceLog raceLogToAddTo, Mark mark, GPSFix gpsFix, RacingEventService service);
|
||||
|
||||
|
||||
/**
|
||||
* Duplicate the course and competitor registrations in the newest {@link RaceLogCourseDesignChangedEvent}
|
||||
* in {@code from} race log to the {@code to} race logs.
|
||||
* The {@link Mark}s and {@link ControlPoint}s are duplicated and not reused. This also inserts the necessary
|
||||
* {@link RaceLogDefineMarkEvent}s into the {@code to} race logs.
|
||||
* Duplicate the course and competitor registrations in the newest {@link RaceLogCourseDesignChangedEvent} in
|
||||
* {@code from} race log to the {@code to} race logs. The {@link Mark}s and {@link ControlPoint}s are duplicated and
|
||||
* not reused. This also inserts the necessary {@link RaceLogDefineMarkEvent}s into the {@code to} race logs.
|
||||
*/
|
||||
void copyCourseAndCompetitors(RaceLog from, Set<RaceLog> to, SharedDomainFactory baseDomainFactory,
|
||||
RacingEventService service);
|
||||
|
||||
|
||||
/**
|
||||
* If not yet registered, register the competitors in {@code competitors},
|
||||
* and unregister all already registered competitors not in {@code competitors}.
|
||||
* If not yet registered, register the competitors in {@code competitors}, and unregister all already registered
|
||||
* competitors not in {@code competitors}.
|
||||
*/
|
||||
void registerCompetitors(RacingEventService service, RaceLog raceLog, Set<Competitor> competitors);
|
||||
|
||||
|
||||
/**
|
||||
* If not yet registered, register the competitors in {@code competitors},
|
||||
* and unregister all already registered competitors not in {@code competitors}.
|
||||
* If not yet registered, register the competitors in {@code competitors}, and unregister all already registered
|
||||
* competitors not in {@code competitors}.
|
||||
*/
|
||||
void registerCompetitors(RacingEventService service, RegattaLog regattaLog, Set<Competitor> competitors);
|
||||
|
||||
/**
|
||||
* Invite competitors for tracking via the Tracking App by sending out emails.
|
||||
*/
|
||||
void inviteCompetitorsForTrackingViaEmail(Event event, Leaderboard leaderboard,
|
||||
String serverUrlWithoutTrailingSlash, Set<Competitor> competitors, Locale locale) throws MailException;
|
||||
}
|
||||
@@ -36,6 +36,12 @@ import com.sap.sse.common.TypeBasedServiceFinder;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
private static final Logger logger = Logger.getLogger(Activator.class.getName());
|
||||
|
||||
private static BundleContext context;
|
||||
|
||||
public static BundleContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
private Set<ServiceRegistration<?>> registrations = new HashSet<>();
|
||||
|
||||
@@ -53,6 +59,8 @@ public class Activator implements BundleActivator {
|
||||
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
Activator.context = context;
|
||||
|
||||
registrations.add(context.registerService(DeviceIdentifierMongoHandler.class, new SmartphoneUUIDMongoHandler(), getDict(SmartphoneUUIDIdentifier.TYPE)));
|
||||
registrations.add(context.registerService(DeviceIdentifierJsonHandler.class, new SmartphoneUUIDJsonHandler(), getDict(SmartphoneUUIDIdentifier.TYPE)));
|
||||
registrations.add(context.registerService(DeviceIdentifierStringSerializationHandler.class, new SmartphoneUUIDStringSerializationHandler(), getDict(SmartphoneUUIDIdentifier.TYPE)));
|
||||
@@ -75,6 +83,8 @@ public class Activator implements BundleActivator {
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
Activator.context = null;
|
||||
|
||||
for (ServiceRegistration<?> reg : registrations) {
|
||||
reg.unregister();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.sap.sailing.domain.racelogtracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -10,6 +13,17 @@ import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.activation.DataHandler;
|
||||
import javax.activation.DataSource;
|
||||
import javax.mail.BodyPart;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.MimeBodyPart;
|
||||
import javax.mail.internet.MimeMultipart;
|
||||
import javax.mail.util.ByteArrayDataSource;
|
||||
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
||||
import com.google.zxing.WriterException;
|
||||
import com.sap.sailing.domain.abstractlog.AbstractLog;
|
||||
import com.sap.sailing.domain.abstractlog.AbstractLogEvent;
|
||||
import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor;
|
||||
@@ -32,6 +46,7 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.ControlPoint;
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.base.DomainFactory;
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.RaceColumn;
|
||||
@@ -42,6 +57,7 @@ import com.sap.sailing.domain.base.impl.CourseDataImpl;
|
||||
import com.sap.sailing.domain.common.PassingInstruction;
|
||||
import com.sap.sailing.domain.common.RegattaIdentifier;
|
||||
import com.sap.sailing.domain.common.abstractlog.NotRevokableException;
|
||||
import com.sap.sailing.domain.common.racelog.tracking.DeviceMappingConstants;
|
||||
import com.sap.sailing.domain.common.racelog.tracking.NotDenotableForRaceLogTrackingException;
|
||||
import com.sap.sailing.domain.common.racelog.tracking.NotDenotedForRaceLogTrackingException;
|
||||
import com.sap.sailing.domain.common.racelog.tracking.RaceLogRaceTrackerExistsException;
|
||||
@@ -61,6 +77,10 @@ import com.sap.sse.common.NoCorrespondingServiceRegisteredException;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
import com.sap.sse.common.mail.MailException;
|
||||
import com.sap.sse.mail.MailService;
|
||||
import com.sap.sse.qrcode.QRCodeGenerationUtil;
|
||||
import com.sap.sse.util.impl.NonGwtUrlHelper;
|
||||
|
||||
public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
|
||||
private static final Logger logger = Logger.getLogger(RaceLogTrackingAdapterImpl.class.getName());
|
||||
@@ -325,4 +345,66 @@ public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
|
||||
c -> new RegattaLogRegisterCompetitorEventImpl(MillisecondsTimePoint.now(), service.getServerAuthor(),
|
||||
MillisecondsTimePoint.now(), UUID.randomUUID(), c));
|
||||
}
|
||||
|
||||
private MailService getMailService() {
|
||||
ServiceReference<MailService> ref = Activator.getContext()
|
||||
.getServiceReference(MailService.class);
|
||||
if (ref == null) {
|
||||
logger.warning("No file storage management service registered");
|
||||
return null;
|
||||
}
|
||||
return Activator.getContext().getService(ref);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inviteCompetitorsForTrackingViaEmail(Event event, Leaderboard leaderboard,
|
||||
String serverUrlWithoutTrailingSlash, Set<Competitor> competitors, Locale locale) throws MailException {
|
||||
StringBuilder occuredExceptions = new StringBuilder();
|
||||
|
||||
for (Competitor competitor : competitors){
|
||||
final String toAddress = competitor.getEmail();
|
||||
if (toAddress != null) {
|
||||
String leaderboardName = leaderboard.getName();
|
||||
String competitorName = competitor.getName();
|
||||
|
||||
String url = DeviceMappingConstants.getDeviceMappingForRegattaLogUrl(serverUrlWithoutTrailingSlash,
|
||||
event.getId().toString(), leaderboardName, DeviceMappingConstants.URL_COMPETITOR_ID_AS_STRING,
|
||||
competitor.getId().toString(), NonGwtUrlHelper.INSTANCE);
|
||||
String subject = String.format("%s %s",
|
||||
RaceLogTrackingI18n.STRING_MESSAGES.get(locale, "trackingInvitationFor"), competitorName);
|
||||
|
||||
// taken from http://www.tutorialspoint.com/javamail_api/javamail_api_send_inlineimage_in_email.htm
|
||||
BodyPart messageTextPart = new MimeBodyPart();
|
||||
String htmlText = String.format("<h1>%s %s</h1>" + "<p>%s <b>%s</b></p>"
|
||||
+ "<img src=\"cid:image\" title=\"%s\"><br/>"
|
||||
+ "<a href=\"%s\">%s</a>",
|
||||
RaceLogTrackingI18n.STRING_MESSAGES.get(locale, "welcomeTo"), leaderboardName,
|
||||
RaceLogTrackingI18n.STRING_MESSAGES.get(locale, "scanQRCodeOrVisitUrlToRegisterAs"), competitorName,
|
||||
url, url, RaceLogTrackingI18n.STRING_MESSAGES.get(locale, "alternativelyVisitThisLink"));
|
||||
|
||||
try {
|
||||
messageTextPart.setContent(htmlText, "text/html");
|
||||
|
||||
BodyPart messageImagePart = new MimeBodyPart();
|
||||
InputStream imageIs = QRCodeGenerationUtil.create(url, 250);
|
||||
DataSource imageDs = new ByteArrayDataSource(imageIs, "image/png");
|
||||
messageImagePart.setDataHandler(new DataHandler(imageDs));
|
||||
messageImagePart.setHeader("Content-ID", "<image>");
|
||||
|
||||
MimeMultipart multipart = new MimeMultipart();
|
||||
multipart.addBodyPart(messageTextPart);
|
||||
multipart.addBodyPart(messageImagePart);
|
||||
|
||||
getMailService().sendMail(toAddress, subject, multipart);
|
||||
} catch (MessagingException | MailException | WriterException | IOException e) {
|
||||
logger.log(Level.SEVERE, "Error trying to send mail to " + competitor.getName()
|
||||
+ " with e-mail address " + toAddress, e);
|
||||
occuredExceptions.append(e.getMessage()+"\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(occuredExceptions.length() == 0)){
|
||||
throw new MailException(occuredExceptions.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.sap.sailing.domain.racelogtracking.impl;
|
||||
|
||||
import com.sap.sse.i18n.ResourceBundleStringMessages;
|
||||
import com.sap.sse.i18n.impl.ResourceBundleStringMessagesImpl;
|
||||
|
||||
public class RaceLogTrackingI18n {
|
||||
private static final String RESOURCE_BASE_NAME = "stringmessages/TrackingStringMessages";
|
||||
|
||||
public static final ResourceBundleStringMessages STRING_MESSAGES = new ResourceBundleStringMessagesImpl(
|
||||
RESOURCE_BASE_NAME, RaceLogTrackingI18n.class.getClassLoader());
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class MultiLogAnalyzerTest {
|
||||
private AbstractLogEventAuthor author;
|
||||
|
||||
private static Competitor createCompetitor(int n) {
|
||||
return new CompetitorImpl(n, n + "", null, null, null);
|
||||
return new CompetitorImpl(n, n + "", null, null, null, null);
|
||||
}
|
||||
|
||||
private static DeviceIdentifier createDevice() {
|
||||
|
||||
@@ -22,8 +22,8 @@ import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
public class DeviceMappingFinderTest extends AbstractRaceLogTrackingTest {
|
||||
private final Competitor competitor = new CompetitorImpl("comp", "Comp", null, null, null);
|
||||
private final Competitor competitor2 = new CompetitorImpl("comp2", "Comp2", null, null, null);
|
||||
private final Competitor competitor = new CompetitorImpl("comp", "Comp", null, null, null, null);
|
||||
private final Competitor competitor2 = new CompetitorImpl("comp2", "Comp2", null, null, null, null);
|
||||
private final DeviceIdentifier device = new SmartphoneImeiIdentifier("imei");
|
||||
|
||||
private int time = 0;
|
||||
|
||||
@@ -15,6 +15,10 @@ public interface Competitor extends Named, WithID, IsManagedByCache<SharedDomain
|
||||
|
||||
Color getColor();
|
||||
|
||||
String getEmail();
|
||||
|
||||
boolean hasEmail();
|
||||
|
||||
/**
|
||||
* Adds a listener to this competitor. The listener is also added to the boat and the team for changes.
|
||||
* Adding a listener that is already part of this competitor's listeners set remains without effect.
|
||||
|
||||
@@ -6,4 +6,6 @@ public interface CompetitorChangeListener extends BoatChangeListener, Nationalit
|
||||
void colorChanged(Color oldColor, Color newColor);
|
||||
|
||||
void nameChanged(String oldName, String newName);
|
||||
|
||||
void emailChanged(String oldEmail, String newEmail);
|
||||
}
|
||||
@@ -26,5 +26,5 @@ public interface CompetitorFactory {
|
||||
*/
|
||||
boolean isCompetitorToUpdateDuringGetOrCreate(Competitor result);
|
||||
|
||||
Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, DynamicTeam team, DynamicBoat boat);
|
||||
Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, String email, DynamicTeam team, DynamicBoat boat);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public interface CompetitorStore extends CompetitorFactory {
|
||||
*
|
||||
* If no competitor with the ID requested is found, the call is a no-op, doing nothing, not even throwing an exception.
|
||||
*/
|
||||
Competitor updateCompetitor(String idAsString, String newName, Color newDisplayColor, String newSailId,
|
||||
Competitor updateCompetitor(String idAsString, String newName, Color newDisplayColor, String newEmail, String newSailId,
|
||||
Nationality newNationality, URI newTeamImageUri);
|
||||
|
||||
CompetitorDTO convertToCompetitorDTO(Competitor c);
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.sap.sse.common.Named;
|
||||
import com.sap.sse.datamining.shared.annotations.Dimension;
|
||||
|
||||
public interface Nationality extends Named, IsManagedByCache<SharedDomainFactory> {
|
||||
@Dimension(messageKey="NationalityAcronym")
|
||||
@Dimension(messageKey="Acronym")
|
||||
String getThreeLetterIOCAcronym();
|
||||
|
||||
CountryCode getCountryCode();
|
||||
|
||||
@@ -3,6 +3,6 @@ package com.sap.sailing.domain.base;
|
||||
import com.sap.sse.datamining.shared.annotations.Connector;
|
||||
|
||||
public interface WithNationality {
|
||||
@Connector(ordinal=7)
|
||||
@Connector(messageKey="Nationality", ordinal=8)
|
||||
Nationality getNationality();
|
||||
}
|
||||
@@ -20,13 +20,15 @@ public class CompetitorImpl implements DynamicCompetitor {
|
||||
private String name;
|
||||
private Color color;
|
||||
private transient Set<CompetitorChangeListener> listeners;
|
||||
private String email;
|
||||
|
||||
public CompetitorImpl(Serializable id, String name, Color color, DynamicTeam team, DynamicBoat boat) {
|
||||
public CompetitorImpl(Serializable id, String name, Color color, String email, DynamicTeam team, DynamicBoat boat) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.team = team;
|
||||
this.boat = boat;
|
||||
this.color = color;
|
||||
this.email = email;
|
||||
this.listeners = new HashSet<CompetitorChangeListener>();
|
||||
}
|
||||
|
||||
@@ -73,7 +75,7 @@ public class CompetitorImpl implements DynamicCompetitor {
|
||||
|
||||
@Override
|
||||
public Competitor resolve(SharedDomainFactory domainFactory) {
|
||||
Competitor result = domainFactory.getOrCreateCompetitor(getId(), getName(), getColor(), getTeam(), getBoat());
|
||||
Competitor result = domainFactory.getOrCreateCompetitor(getId(), getName(), getColor(), getEmail(), getTeam(), getBoat());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -114,4 +116,22 @@ public class CompetitorImpl implements DynamicCompetitor {
|
||||
return new HashSet<CompetitorChangeListener>(listeners);
|
||||
}
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String newEmail) {
|
||||
final String oldEmail = this.email;
|
||||
if (!Util.equalsWithNull(oldEmail, newEmail)) {
|
||||
this.email = newEmail;
|
||||
for (CompetitorChangeListener listener : getListeners()) {
|
||||
listener.emailChanged(oldEmail, newEmail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasEmail(){
|
||||
return email != null && !email.isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,10 @@ import com.sap.sse.common.Color;
|
||||
|
||||
public interface DynamicCompetitor extends Competitor, Renamable {
|
||||
DynamicBoat getBoat();
|
||||
|
||||
DynamicTeam getTeam();
|
||||
|
||||
|
||||
void setColor(Color displayColor);
|
||||
|
||||
void setEmail(String email);
|
||||
}
|
||||
@@ -332,11 +332,11 @@ public class SharedDomainFactoryImpl implements SharedDomainFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, DynamicTeam team, DynamicBoat boat) {
|
||||
public Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, String email, DynamicTeam team, DynamicBoat boat) {
|
||||
if (logger.isLoggable(Level.FINEST)) {
|
||||
logger.log(Level.FINEST, "getting or creating competitor "+name+" with ID "+competitorId+" in domain factory "+this);
|
||||
}
|
||||
return getCompetitorStore().getOrCreateCompetitor(competitorId, name, displayColor, team, boat);
|
||||
return getCompetitorStore().getOrCreateCompetitor(competitorId, name, displayColor, email, team, boat);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,8 +68,8 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
private Competitor createCompetitor(Serializable id, String name, Color displayColor, DynamicTeam team, DynamicBoat boat) {
|
||||
Competitor result = new CompetitorImpl(id, name, displayColor, team, boat);
|
||||
private Competitor createCompetitor(Serializable id, String name, Color displayColor, String email, DynamicTeam team, DynamicBoat boat) {
|
||||
Competitor result = new CompetitorImpl(id, name, displayColor, email, team, boat);
|
||||
addNewCompetitor(id, result);
|
||||
if (logger.isLoggable(Level.FINEST)) {
|
||||
logger.log(Level.FINEST, "Created competitor "+name+" with ID "+id, new Exception("Here is where it happened"));
|
||||
@@ -93,20 +93,20 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, DynamicTeam team, DynamicBoat boat) {
|
||||
public Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, String email, DynamicTeam team, DynamicBoat boat) {
|
||||
Competitor result = getExistingCompetitorById(competitorId); // avoid synchronization for successful read access
|
||||
if (result == null) {
|
||||
LockUtil.lockForWrite(lock);
|
||||
try {
|
||||
result = getExistingCompetitorById(competitorId); // try again, now while holding the write lock
|
||||
if (result == null) {
|
||||
result = createCompetitor(competitorId, name, displayColor, team, boat);
|
||||
result = createCompetitor(competitorId, name, displayColor, email, team, boat);
|
||||
}
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(lock);
|
||||
}
|
||||
} else if (isCompetitorToUpdateDuringGetOrCreate(result)) {
|
||||
updateCompetitor(result.getId().toString(), name, displayColor, boat.getSailID(), team.getNationality(),
|
||||
updateCompetitor(result.getId().toString(), name, displayColor, email, boat.getSailID(), team.getNationality(),
|
||||
team.getImage());
|
||||
competitorNoLongerToUpdateDuringGetOrCreate(result);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor updateCompetitor(String idAsString, String newName, Color newDisplayColor, String newSailId,
|
||||
public Competitor updateCompetitor(String idAsString, String newName, Color newDisplayColor, String newEmail, String newSailId,
|
||||
Nationality newNationality, URI newTeamImageUri) {
|
||||
DynamicCompetitor competitor = (DynamicCompetitor) getExistingCompetitorByIdAsString(idAsString);
|
||||
if (competitor != null) {
|
||||
@@ -199,6 +199,7 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
try {
|
||||
competitor.setName(newName);
|
||||
competitor.setColor(newDisplayColor);
|
||||
competitor.setEmail(newEmail);
|
||||
competitor.getBoat().setSailId(newSailId);
|
||||
competitor.getTeam().setNationality(newNationality);
|
||||
competitor.getTeam().setImage(newTeamImageUri);
|
||||
@@ -229,10 +230,11 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
if (competitorDTO == null) {
|
||||
final Nationality nationality = c.getTeam().getNationality();
|
||||
CountryCode countryCode = nationality == null ? null : nationality.getCountryCode();
|
||||
competitorDTO = new CompetitorDTOImpl(c.getName(), c.getColor(), countryCode == null ? ""
|
||||
competitorDTO = new CompetitorDTOImpl(c.getName(), c.getColor(), c.getEmail(), countryCode == null ? ""
|
||||
: countryCode.getTwoLetterISOCode(), countryCode == null ? ""
|
||||
: countryCode.getThreeLetterIOCCode(), countryCode == null ? "" : countryCode.getName(), c
|
||||
.getBoat().getSailID(), c.getId().toString(), new BoatClassDTO(c.getBoat().getBoatClass()
|
||||
: countryCode.getThreeLetterIOCCode(), countryCode == null ? "" : countryCode.getName(),
|
||||
c.getBoat().getSailID(), c.getId().toString(), c.getTeam().getImage() == null ? null : c.getTeam().getImage().toString(),
|
||||
new BoatClassDTO(c.getBoat().getBoatClass()
|
||||
.getName(), c.getBoat().getBoatClass().getDisplayName(), c.getBoat().getBoatClass().getHullLength().getMeters()));
|
||||
weakCompetitorDTOCache.put(c, competitorDTO);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
teamMembers.add(person);
|
||||
}
|
||||
DynamicTeam team = new TeamImpl(competitor.getName(), teamMembers, /* coach */ null);
|
||||
result = competitorStore.getOrCreateCompetitor(competitor.getID(), competitor.getName(), null /*displayColor*/, team, boat);
|
||||
result = competitorStore.getOrCreateCompetitor(competitor.getID(), competitor.getName(), null /*displayColor*/, null /*email*/, team, boat);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
}
|
||||
DynamicTeam team = new TeamImpl(competitor.getName(), teamMembers, /* coach */ null);
|
||||
result = baseDomainFactory.getCompetitorStore().getOrCreateCompetitor(getCompetitorID(competitor.getBoatID(), raceId, boatClass),
|
||||
competitor.getName(), null /*displayColor*/, team, boat);
|
||||
competitor.getName(), null /*displayColor*/, null /*email*/, team, boat);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,8 +232,8 @@ public class LeaderboardDTODiffingTest {
|
||||
@Test
|
||||
public void testCompetitorListChange() {
|
||||
newVersion.competitors = new ArrayList<CompetitorDTO>(newVersion.competitors); // clone competitor list so it's not identical to that of previous version
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
new BoatClassDTO("505", 5.05));
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "someone@nobody.de", "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
/* imageURL */ null, new BoatClassDTO("505", 5.05));
|
||||
newVersion.competitors.add(13, somebodyNew); // insert a competitor; this should mess up all others' indexes; check if this works
|
||||
CompetitorDTO wolfgang = getPreviousCompetitorByName("HUNGER +JESS");
|
||||
newVersion.competitors.remove(wolfgang);
|
||||
@@ -252,8 +252,8 @@ public class LeaderboardDTODiffingTest {
|
||||
Util.addAll(newVersion.getSuppressedCompetitors(), newSuppressedCompetitors);
|
||||
newVersion.setSuppressedCompetitors(newSuppressedCompetitors);
|
||||
newVersion.competitors = new ArrayList<CompetitorDTO>(newVersion.competitors); // clone competitor list so it's not identical to that of previous version
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
new BoatClassDTO("505", 5.05));
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "someone@nobody.de", "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
/* imageURL */ null, new BoatClassDTO("505", 5.05));
|
||||
newVersion.setSuppressed(newVersion.competitors.get(13), true); // suppress an existing competitor; compaction should reduce this to a single number only
|
||||
newVersion.setSuppressed(somebodyNew, true); // check that mixed mode with existing and new competitors works as well
|
||||
List<CompetitorDTO> newSuppressedCompetitorsBeforeStripping = new ArrayList<CompetitorDTO>();
|
||||
@@ -274,8 +274,8 @@ public class LeaderboardDTODiffingTest {
|
||||
@Test
|
||||
public void testDisplayNameChange() {
|
||||
newVersion.competitors = new ArrayList<CompetitorDTO>(newVersion.competitors); // clone competitor list so it's not identical to that of previous version
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
new BoatClassDTO("505", 5.05));
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "someone@nobody.de", "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
/* imageURL */ null, new BoatClassDTO("505", 5.05));
|
||||
newVersion.competitors.add(somebodyNew);
|
||||
newVersion.competitorDisplayNames = new HashMap<CompetitorDTO, String>(newVersion.competitorDisplayNames);
|
||||
newVersion.competitorDisplayNames.put(newVersion.competitors.get(13), "Humba");
|
||||
@@ -303,8 +303,8 @@ public class LeaderboardDTODiffingTest {
|
||||
List<CompetitorDTO> newOrdering = new ArrayList<CompetitorDTO>(newVersion.getCompetitorsFromBestToWorst(r9));
|
||||
newVersion.setCompetitorsFromBestToWorst(r9, newOrdering);
|
||||
newVersion.competitors = new ArrayList<CompetitorDTO>(newVersion.competitors); // clone competitor list so it's not identical to that of previous version
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
new BoatClassDTO("505", 5.05));
|
||||
CompetitorDTO somebodyNew = new CompetitorDTOImpl("Someone New", Color.RED, "someone@nobody.de", "DE", "GER", "Germany", "GER 1234", "912p09871203987",
|
||||
/* imageURL */ null, new BoatClassDTO("505", 5.05));
|
||||
newVersion.competitors.add(somebodyNew);
|
||||
newOrdering.add(somebodyNew);
|
||||
CompetitorDTO formerRank13 = newOrdering.remove(13);
|
||||
|
||||
@@ -15,16 +15,16 @@ import com.sap.sse.common.Color;
|
||||
|
||||
public abstract class AbstractLeaderboardTest {
|
||||
public static CompetitorImpl createCompetitor(String competitorName) {
|
||||
return new CompetitorImpl(competitorName, competitorName, Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
return new CompetitorImpl(competitorName, competitorName, Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */ true), /* sailID */ null));
|
||||
}
|
||||
|
||||
public static Competitor createCompetitor(String competitorName, CompetitorFactory competitorFactory) {
|
||||
return competitorFactory.getOrCreateCompetitor(competitorName, competitorName, Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
return competitorFactory.getOrCreateCompetitor(competitorName, competitorName, Color.RED, "someone@nobody.de", new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", new NationalityImpl("NED"),
|
||||
@@ -33,11 +33,11 @@ public abstract class AbstractLeaderboardTest {
|
||||
}
|
||||
|
||||
public static CompetitorImpl createCompetitor(String competitorName, Serializable id) {
|
||||
return new CompetitorImpl(id, competitorName, Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
return new CompetitorImpl(id, competitorName, Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */ true), /* sailID */ null));
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,11 @@ public class CompetitorListenerTest extends AbstractSerializationTest {
|
||||
CompetitorListenerTest.this.oldColor = oldColor;
|
||||
CompetitorListenerTest.this.newColor = newColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emailChanged(String oldEmail, String newEmail) {
|
||||
//TODO
|
||||
}
|
||||
};
|
||||
competitor.addCompetitorChangeListener(listener);
|
||||
}
|
||||
|
||||
@@ -157,8 +157,8 @@ public class LeaderboardCourseChangeTest {
|
||||
Set<Competitor> competitors = new HashSet<>();
|
||||
DynamicBoat mockedBoat = mock(DynamicBoat.class);
|
||||
when(mockedBoat.getBoatClass()).thenReturn(boatClass);
|
||||
competitors.add(new CompetitorImpl(UUID.randomUUID(), "TestCompetitor", Color.BLACK, mock(DynamicTeam.class),
|
||||
mockedBoat));
|
||||
competitors.add(new CompetitorImpl(UUID.randomUUID(), "TestCompetitor", Color.BLACK, null,
|
||||
mock(DynamicTeam.class), mockedBoat));
|
||||
return competitors;
|
||||
}
|
||||
|
||||
|
||||
@@ -188,11 +188,11 @@ public class OfflineSerializationTest extends AbstractSerializationTest {
|
||||
DomainFactory senderDomainFactory = new DomainFactoryImpl();
|
||||
DomainFactory receiverDomainFactory = new DomainFactoryImpl();
|
||||
String competitorName = "Tina Maximiliane Lutz";
|
||||
Competitor sendersCompetitor1 = new CompetitorImpl(123, competitorName, Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, senderDomainFactory.getOrCreateNationality("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", senderDomainFactory.getOrCreateNationality("GER"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
Competitor sendersCompetitor1 = new CompetitorImpl(123, competitorName, Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, senderDomainFactory.getOrCreateNationality("GER"),
|
||||
/* dateOfBirth */ null, "This is famous "+competitorName)),
|
||||
new PersonImpl("Rigo van Maas", senderDomainFactory.getOrCreateNationality("GER"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
senderDomainFactory.getOrCreateBoatClass("470", /* typicallyStartsUpwind */ true), "GER 61"));
|
||||
Competitor receiversCompetitor1 = cloneBySerialization(sendersCompetitor1, receiverDomainFactory);
|
||||
Competitor receiversSecondCopyOfCompetitor1 = cloneBySerialization(sendersCompetitor1, receiverDomainFactory);
|
||||
|
||||
@@ -117,7 +117,7 @@ public abstract class StoredTrackBasedTest extends TrackBasedTest {
|
||||
for (String competitorName : getCompetitorNamesOfStoredTracks(KIELER_WOCHE)) {
|
||||
DynamicPerson p = new PersonImpl(competitorName, /* nationality */ null, /* dateOfBirth */ null, /* description */ null);
|
||||
DynamicTeam t = new TeamImpl(competitorName, Collections.singleton(p), /* coach */ null);
|
||||
Competitor c = new CompetitorImpl(competitorName, competitorName, Color.RED, t, new BoatImpl(competitorName,
|
||||
Competitor c = new CompetitorImpl(competitorName, competitorName, Color.RED, null, t, new BoatImpl(competitorName,
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */ true), null));
|
||||
DynamicGPSFixTrack<Competitor, GPSFixMoving> track = readTrack(c, KIELER_WOCHE);
|
||||
if (track != null) {
|
||||
|
||||
@@ -34,11 +34,11 @@ public class TackTest extends StoredTrackBasedTestWithTrackedRace {
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() {
|
||||
competitor = new CompetitorImpl(123, "Wolfgang Hunger", Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl("Wolfgang Hunger", new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous Wolfgang Hunger")), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl("Wolfgang Hunger's boat",
|
||||
competitor = new CompetitorImpl(123, "Wolfgang Hunger", Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl("Wolfgang Hunger", new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous Wolfgang Hunger")), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl("Wolfgang Hunger's boat",
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */ true), null));
|
||||
setTrackedRace(createTestTrackedRace("Kieler Woche", "505 Race 2", "505", Collections.singleton(competitor),
|
||||
new MillisecondsTimePoint(new GregorianCalendar(2011, 05, 23).getTime())));
|
||||
|
||||
@@ -60,11 +60,11 @@ public abstract class TrackBasedTest {
|
||||
}
|
||||
|
||||
public static CompetitorImpl createCompetitor(String competitorName) {
|
||||
return new CompetitorImpl(UUID.randomUUID(), competitorName, Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous " + competitorName)), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
return new CompetitorImpl(UUID.randomUUID(), competitorName, Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous " + competitorName)), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl(competitorName + "'s boat",
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */true), null));
|
||||
}
|
||||
|
||||
|
||||
@@ -270,11 +270,11 @@ public class WindTest {
|
||||
Waypoint w1 = domainFactory.createWaypoint(startFinish, /*passingInstruction*/ null);
|
||||
Waypoint w2 = domainFactory.createWaypoint(top, /*passingInstruction*/ null);
|
||||
Waypoint w3 = domainFactory.createWaypoint(startFinish, /*passingInstruction*/ null);
|
||||
Competitor competitor = new CompetitorImpl(123, "Test Competitor", Color.RED, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl("Test Competitor", new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous " + "Test Competitor")), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl("Test Competitor" + "'s boat",
|
||||
Competitor competitor = new CompetitorImpl(123, "Test Competitor", Color.RED, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl("Test Competitor", new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous " + "Test Competitor")), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")), new BoatImpl("Test Competitor" + "'s boat",
|
||||
new BoatClassImpl("505", /* typicallyStartsUpwind */true), null));
|
||||
final BoatClass boatClass = domainFactory.getOrCreateBoatClass("ESS40");
|
||||
DynamicTrackedRace trackedRace = new DynamicTrackedRaceImpl(new DynamicTrackedRegattaImpl(
|
||||
|
||||
@@ -45,9 +45,9 @@ import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
public class AbstractMockedRaceMarkPassingTest {
|
||||
protected Competitor bob = new CompetitorImpl("Bob", "Bob", null, null, null);
|
||||
protected Competitor joe = new CompetitorImpl("Joe", "Joe", null, null, null);
|
||||
protected Competitor mike = new CompetitorImpl("Mike", "Mike", null, null, null);
|
||||
protected Competitor bob = new CompetitorImpl("Bob", "Bob", null, null, null, null);
|
||||
protected Competitor joe = new CompetitorImpl("Joe", "Joe", null, null, null, null);
|
||||
protected Competitor mike = new CompetitorImpl("Mike", "Mike", null, null, null, null);
|
||||
|
||||
protected Mark m = new MarkImpl("black");
|
||||
protected Mark m2 = new MarkImpl("white 1");
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.base.EventFetcher;
|
||||
import com.sap.sailing.domain.base.Leg;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.RaceColumnListener;
|
||||
@@ -290,7 +291,7 @@ public class MockedTrackedRace implements DynamicTrackedRace {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Competitor> getCompetitors() {
|
||||
public Iterable<Competitor> getAllCompetitors() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -430,6 +431,10 @@ public class MockedTrackedRace implements DynamicTrackedRace {
|
||||
@Override
|
||||
public void removeListener(RegattaLikeListener listener) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustEventToRegattaAssociation(EventFetcher eventFetcher) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
}
|
||||
DynamicTeam team = getOrCreateTeam(name, nationality, competitorId);
|
||||
DynamicBoat boat = new BoatImpl(shortName, boatClass, shortName);
|
||||
result = competitorStore.getOrCreateCompetitor(competitorId, name, null /*displayColor*/, team, boat);
|
||||
result = competitorStore.getOrCreateCompetitor(competitorId, name, null /*displayColor*/, null /*email*/, team, boat);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
public interface EventFetcher {
|
||||
Iterable<Event> getAllEvents();
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public interface Regatta extends Named, WithID, IsRegattaLike {
|
||||
|
||||
BoatClass getBoatClass();
|
||||
|
||||
Iterable<Competitor> getCompetitors();
|
||||
Iterable<Competitor> getAllCompetitors();
|
||||
|
||||
/**
|
||||
* Will remove the series from this regatta. Will also call {@link RaceColumn#removeRaceIdentifier(Fleet)} to make
|
||||
@@ -168,4 +168,12 @@ public interface Regatta extends Named, WithID, IsRegattaLike {
|
||||
* Updates the flag deciding whether to use start time inference. See {@link #useStartTimeInference()}.
|
||||
*/
|
||||
void setUseStartTimeInference(boolean useStartTimeInference);
|
||||
|
||||
/**
|
||||
* {@link Event} manages an association to its {@link Event#getRegattas() regattas}. When something on the
|
||||
* regatta changes (in particular, the implicit link to an event through an event's {@link CourseArea} that
|
||||
* is assigned as this regatta's {@link #setDefaultCourseArea(CourseArea) default course area}), the
|
||||
* opposite end of the association needs to be maintained on the event's side.
|
||||
*/
|
||||
void adjustEventToRegattaAssociation(EventFetcher eventFetcher);
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public interface DynamicCompetitorStore extends CompetitorStore {
|
||||
DynamicCompetitor getExistingCompetitorById(Serializable competitorId);
|
||||
|
||||
@Override
|
||||
DynamicCompetitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, DynamicTeam team, DynamicBoat boat);
|
||||
DynamicCompetitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, String email, DynamicTeam team, DynamicBoat boat);
|
||||
|
||||
@Override
|
||||
Iterable<? extends DynamicCompetitor> getCompetitors();
|
||||
|
||||
@@ -12,9 +12,12 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
|
||||
import com.sap.sailing.domain.abstractlog.shared.analyzing.RegisteredCompetitorsAnalyzer;
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.CourseArea;
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
import com.sap.sailing.domain.base.EventFetcher;
|
||||
import com.sap.sailing.domain.base.Fleet;
|
||||
import com.sap.sailing.domain.base.RaceColumn;
|
||||
import com.sap.sailing.domain.base.RaceColumnInSeries;
|
||||
@@ -297,13 +300,26 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Competitor> getCompetitors() {
|
||||
public Iterable<Competitor> getAllCompetitors() {
|
||||
Set<Competitor> result = new HashSet<Competitor>();
|
||||
for (RaceDefinition race : getAllRaces()) {
|
||||
for (Competitor c : race.getCompetitors()) {
|
||||
result.add(c);
|
||||
}
|
||||
}
|
||||
for (Series series : getSeries()) {
|
||||
for (RaceColumn rc : series.getRaceColumns()) {
|
||||
for (Fleet fleet : rc.getFleets()) {
|
||||
TrackedRace trackedRace = rc.getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
Util.addAll(trackedRace.getRace().getCompetitors(), result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//consider {@link RegattaLog}
|
||||
Set<Competitor> viaLog = new RegisteredCompetitorsAnalyzer<>(regattaLikeHelper.getRegattaLog()).analyze();
|
||||
result.addAll(viaLog);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -551,4 +567,17 @@ public class RegattaImpl extends NamedImpl implements Regatta, RaceColumnListene
|
||||
public void removeListener(RegattaLikeListener listener) {
|
||||
regattaLikeHelper.removeListener(listener);
|
||||
}
|
||||
|
||||
public void adjustEventToRegattaAssociation(EventFetcher eventFetcher) {
|
||||
CourseArea defaultCourseArea = getDefaultCourseArea();
|
||||
for (Event event : eventFetcher.getAllEvents()) {
|
||||
event.removeRegatta(this);
|
||||
for (CourseArea courseArea : event.getVenue().getCourseAreas()) {
|
||||
if (defaultCourseArea != null && courseArea.getId().equals(defaultCourseArea)) {
|
||||
event.addRegatta(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,9 @@ public interface Leaderboard extends LeaderboardBase {
|
||||
* in a regular view of the leaderboard. Editors for leaderboards shall, though, also display the suppressed competitors
|
||||
* together with a visual indication showing which competitors are currently suppressed. The "suppressed-state" of a
|
||||
* competitor can change over the life cycle of a leaderboard. A typical use case for suppressing a competitor is
|
||||
* removing one-time entries from a series (meta-)leaderboard or suppressing a camera boat in scoring.
|
||||
* removing one-time entries from a series (meta-)leaderboard or suppressing a camera boat in scoring.<p>
|
||||
*
|
||||
* @return all competitors in this leaderboard, including the suppressed ones.
|
||||
*/
|
||||
Iterable<Competitor> getAllCompetitors();
|
||||
|
||||
|
||||
@@ -116,6 +116,11 @@ public class LeaderboardCacheManager {
|
||||
competitor.removeCompetitorChangeListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emailChanged(String oldEmail, String newEmail) {
|
||||
//ignore (email not shown in leaderboard)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||