mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 02:52:22 +00:00
factored xcelsius-adapter into a separate bundle so it can easily be restarted
This commit is contained in:
1 parent
0117162828
commit
233bac2a02
21 files changed
+153
-32
No files matched your search
@@ -3,7 +3,6 @@ source.. = src/main/resources,\
|
||||
output.. = bin
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml,\
|
||||
lib/gwt-visualization.jar,\
|
||||
lib/gwt-maps.jar,\
|
||||
lib/gwt-servlet.jar,\
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jdom.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/"/>
|
||||
|
||||
@@ -20,6 +20,5 @@ Require-Bundle: org.eclipse.equinox.http.registry;bundle-version="1.1.1",
|
||||
com.mongodb.driver;bundle-version="2.6.2",
|
||||
org.eclipse.osgi.services;bundle-version="3.3.0",
|
||||
com.sap.sailing.httpservicetracker
|
||||
Bundle-ClassPath: .,
|
||||
lib/jdom.jar
|
||||
Bundle-ClassPath: .
|
||||
Export-Package: com.sap.sailing.server
|
||||
@@ -1,7 +1,5 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml,\
|
||||
lib/jdom.jar
|
||||
.
|
||||
src.includes = configuration/
|
||||
@@ -41,7 +41,6 @@ public class Activator implements BundleActivator, ServiceListener {
|
||||
Map<String, Class<? extends javax.servlet.Servlet>> pathMap = new HashMap<String, Class<? extends javax.servlet.Servlet>>();
|
||||
pathMap.put("/admin", AdminApp.class);
|
||||
pathMap.put("/moderator", ModeratorApp.class);
|
||||
pathMap.put("/xcelsius", XcelsiusApp.class);
|
||||
httpServiceTracker = new HttpServiceTracker(context, pathMap, null);
|
||||
httpServiceTracker.open();
|
||||
logger.log(Level.INFO, "Started "+context.getBundle().getSymbolicName()+". Character encoding: "+
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jdom.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.xcelsiusadapter</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,8 @@
|
||||
#Wed Oct 05 23:23:07 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
@@ -0,0 +1,4 @@
|
||||
#Wed Oct 05 23:23:07 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,19 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Xcelsiusadapter
|
||||
Bundle-SymbolicName: com.sap.sailing.xcelsiusadapter
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.sap.sailing.xcelsiusadapter.Activator
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Import-Package: org.osgi.framework;version="1.3.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: org.eclipse.osgi.services,
|
||||
org.eclipse.osgi,
|
||||
javax.servlet,
|
||||
com.sap.sailing.httpservicetracker,
|
||||
com.sap.sailing.server,
|
||||
com.sap.sailing.domain,
|
||||
com.sap.sailing.domain.tractracadapter
|
||||
Bundle-ClassPath: lib/jdom.jar,
|
||||
.
|
||||
@@ -0,0 +1,5 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/jdom.jar
|
||||
File renamed without changes.
@@ -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>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.xcelsiusadapter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
+12
-14
@@ -1,4 +1,15 @@
|
||||
package com.sap.sailing.server.xcelsius;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.output.Format;
|
||||
import org.jdom.output.XMLOutputter;
|
||||
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
import com.sap.sailing.domain.base.RaceDefinition;
|
||||
@@ -9,19 +20,6 @@ import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.util.InvalidDateException;
|
||||
|
||||
import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
|
||||
import org.jdom.output.Format;
|
||||
import org.jdom.output.XMLOutputter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class Action {
|
||||
private HttpServletRequest req;
|
||||
private HttpServletResponse res;
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.httpservicetracker.HttpServiceTracker;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
|
||||
private static BundleContext context;
|
||||
|
||||
static BundleContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
private HttpServiceTracker httpServiceTracker;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = bundleContext;
|
||||
// now track the HTTP service:
|
||||
Map<String, Class<? extends javax.servlet.Servlet>> pathMap = new HashMap<String, Class<? extends javax.servlet.Servlet>>();
|
||||
pathMap.put("/xcelsius", XcelsiusApp.class);
|
||||
httpServiceTracker = new HttpServiceTracker(context, pathMap, null);
|
||||
httpServiceTracker.open();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = null;
|
||||
// stop tracking the HTTP service:
|
||||
httpServiceTracker.close();
|
||||
httpServiceTracker = null;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.server.xcelsius;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DateFormat;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.server.xcelsius;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.server.xcelsius;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashSet;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.server.xcelsius;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+2
-6
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.server;
|
||||
package com.sap.sailing.xcelsiusadapter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -6,11 +6,7 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sap.sailing.server.xcelsius.Action;
|
||||
import com.sap.sailing.server.xcelsius.ListEvents;
|
||||
import com.sap.sailing.server.xcelsius.RankPerLeg;
|
||||
import com.sap.sailing.server.xcelsius.RankPerRace;
|
||||
|
||||
import com.sap.sailing.server.Servlet;
|
||||
|
||||
public class XcelsiusApp extends Servlet {
|
||||
private static final long serialVersionUID = -6849138354941569249L;
|
||||
@@ -25,6 +25,7 @@
|
||||
<module>com.sap.sailing.expeditionconnector</module>
|
||||
<module>com.sap.sailing.expeditionconnector.test</module>
|
||||
<module>com.sap.sailing.server</module>
|
||||
<module>com.sap.sailing.xcelsiusadapter</module>
|
||||
<module>com.sap.sailing.httpservicetracker</module>
|
||||
<module>com.sap.sailing.gwt.ui</module>
|
||||
<module>com.google.gwt.osgi</module>
|
||||
|
||||
Reference in new issue
Block a user