Skip to content

Commit

Permalink
initial contribution of an SSE based CometVisu backend
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Bräutigam <[email protected]>
  • Loading branch information
peuter authored and Tobias Bräutigam committed Sep 26, 2015
1 parent dc52b6e commit a971de0
Show file tree
Hide file tree
Showing 121 changed files with 21,984 additions and 5 deletions.
Empty file added .gitmodules
Empty file.
5 changes: 5 additions & 0 deletions addons/binding/org.openhab.binding.network/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.5.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.5.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-core-2.5.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/quercus.jar" sourcepath="C:/Users/tobiasb/Downloads/quercus-4.0.39-src.jar"/>
<classpathentry exported="true" kind="lib" path="lib/rrd4j-2.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
Expand Down
10 changes: 10 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/sqlite-jdbc-3.8.7.jar"/>
<classpathentry exported="true" kind="lib" path="lib/quercus.jar"/>
<classpathentry exported="true" kind="lib" path="lib/rrd4j-2.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.ui.cometvisu</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>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
59 changes: 59 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CometVisu backend
Bundle-SymbolicName: org.openhab.ui.cometvisu
Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: openHAB
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Activator: org.openhab.ui.cometvisu.internal.CvActivator
Import-Package:
com.google.gson,
javax.inject,
javax.servlet,
javax.servlet.annotation,
javax.servlet.http,
javax.ws.rs,
javax.ws.rs.container,
javax.ws.rs.core,
javax.ws.rs.ext,
org.apache.commons.io,
org.apache.commons.lang,
org.eclipse.emf.common.util,
org.eclipse.emf.ecore,
org.eclipse.smarthome.config.core,
org.eclipse.smarthome.config.discovery,
org.eclipse.smarthome.config.discovery.inbox,
org.eclipse.smarthome.core.common.registry,
org.eclipse.smarthome.core.events,
org.eclipse.smarthome.core.items,
org.eclipse.smarthome.core.items.events,
org.eclipse.smarthome.core.library.items,
org.eclipse.smarthome.core.library.types,
org.eclipse.smarthome.core.persistence,
org.eclipse.smarthome.core.thing,
org.eclipse.smarthome.core.thing.link,
org.eclipse.smarthome.core.types,
org.eclipse.smarthome.io.rest,
org.eclipse.smarthome.model.items,
org.eclipse.smarthome.model.sitemap,
org.eclipse.smarthome.ui.icon,
org.eclipse.smarthome.ui.items,
org.glassfish.hk2.utilities.binding,
org.glassfish.jersey.internal.inject,
org.glassfish.jersey.media.sse,
org.glassfish.jersey.server,
org.glassfish.jersey.servlet.spi,
org.openhab.core.types,
org.openhab.ui.dashboard,
org.osgi.framework,
org.osgi.service.cm,
org.osgi.service.component,
org.osgi.service.event,
org.osgi.service.http,
org.slf4j
Service-Component: OSGI-INF/*.xml
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/rrd4j-2.2.jar,
lib/quercus.jar,
lib/sqlite-jdbc-3.8.7.jar
19 changes: 19 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-charts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.backend.ChartResource">
<implementation class="org.openhab.ui.cometvisu.backend.ChartResource"/>
<service>
<provide interface="org.openhab.ui.cometvisu.backend.ChartResource"/>
<provide interface="org.eclipse.smarthome.io.rest.RESTResource"/>
</service>
<reference bind="setItemRegistry" cardinality="1..1" interface="org.eclipse.smarthome.core.items.ItemRegistry" name="ItemRegistry" policy="static" unbind="unsetItemRegistry"/>
<reference bind="addPersistenceService" cardinality="0..n" interface="org.eclipse.smarthome.core.persistence.PersistenceService" name="PersistenceService" policy="dynamic" unbind="removePersistenceService"/>
</scr:component>
17 changes: 17 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.backend.LoginResource">
<implementation class="org.openhab.ui.cometvisu.backend.LoginResource"/>
<service>
<provide interface="org.openhab.ui.cometvisu.backend.LoginResource"/>
<provide interface="org.eclipse.smarthome.io.rest.RESTResource"/>
</service>
</scr:component>
18 changes: 18 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-read.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.backend.ReadResource">
<implementation class="org.openhab.ui.cometvisu.backend.ReadResource"/>
<service>
<provide interface="org.openhab.ui.cometvisu.backend.EventBroadcaster"/>
<provide interface="org.eclipse.smarthome.io.rest.RESTResource"/>
</service>
<reference bind="setItemRegistry" cardinality="1..1" interface="org.eclipse.smarthome.core.items.ItemRegistry" name="ItemRegistry" policy="static" unbind="unsetItemRegistry"/>
</scr:component>
19 changes: 19 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-write.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.backend.WriteResource">
<implementation class="org.openhab.ui.cometvisu.backend.WriteResource"/>
<service>
<provide interface="org.openhab.ui.cometvisu.backend.WriteResource"/>
<provide interface="org.eclipse.smarthome.io.rest.RESTResource"/>
</service>
<reference bind="setItemRegistry" cardinality="1..1" interface="org.eclipse.smarthome.core.items.ItemRegistry" name="ItemRegistry" policy="static" unbind="unsetItemRegistry"/>
<reference bind="setEventPublisher" cardinality="1..1" interface="org.eclipse.smarthome.core.events.EventPublisher" name="EventPublisher" policy="static" unbind="unsetEventPublisher"/>
</scr:component>
24 changes: 24 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-frontend-app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" configuration-policy="optional" name="org.openhab.cometvisu">
<implementation class="org.openhab.ui.cometvisu.servlet.CometVisuApp"/>
<service>
<provide interface="org.openhab.ui.cometvisu.servlet.CometVisuApp"/>
</service>
<reference bind="setHttpService" cardinality="1..1" interface="org.osgi.service.http.HttpService" name="HttpService" policy="static" unbind="unsetHttpService"/>
<reference bind="setItemUIRegistry" cardinality="1..1" interface="org.eclipse.smarthome.ui.items.ItemUIRegistry" name="ItemUIRegistry" policy="static" unbind="unsetItemUIRegistry"/>
<reference bind="setItemRegistry" cardinality="1..1" interface="org.eclipse.smarthome.core.items.ItemRegistry" name="ItemRegistry" policy="static" unbind="unsetItemRegistry"/>
<reference bind="addSitemapProvider" cardinality="0..n" interface="org.eclipse.smarthome.model.sitemap.SitemapProvider" name="SitemapProvider" policy="dynamic" unbind="removeSitemapProvider"/>
<reference bind="addIconProvider" cardinality="1..n" interface="org.eclipse.smarthome.ui.icon.IconProvider" name="IconProvider" policy="dynamic" unbind="removeIconProvider"/>
<reference bind="addPersistenceService" cardinality="0..n" interface="org.eclipse.smarthome.core.persistence.PersistenceService" name="PersistenceService" policy="dynamic" unbind="removePersistenceService"/>
<reference bind="setEventPublisher" cardinality="1..1" interface="org.eclipse.smarthome.core.events.EventPublisher" name="EventPublisher" policy="static" unbind="unsetEventPublisher"/>
<property name="service.pid" type="String" value="org.openhab.cometvisu"/>
</scr:component>
14 changes: 14 additions & 0 deletions addons/ui/org.openhab.ui.cometvisu/OSGI-INF/dashboardtile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.dashboardtile">
<implementation class="org.openhab.ui.cometvisu.internal.CometVisuDashboardTile"/>
<service>
<provide interface="org.openhab.ui.dashboard.DashboardTile"/>
</service>
</scr:component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.ui.cometvisu.listeners.item">
<implementation class="org.openhab.ui.cometvisu.internal.listeners.ItemRegistryEventListener"/>
<reference bind="setItemRegistry" cardinality="1..1" interface="org.eclipse.smarthome.core.items.ItemRegistry" name="ItemRegistry" policy="static" unbind="unsetItemRegistry"/>
<reference bind="setEventBroadcaster" cardinality="1..1" interface="org.openhab.ui.cometvisu.backend.EventBroadcaster" name="SseResource" policy="static" unbind="unsetEventBroadcaster"/>
</scr:component>
Loading

0 comments on commit a971de0

Please sign in to comment.