Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
[sallegra] Added Sallegra binding (replaces #3520)
Browse files Browse the repository at this point in the history
  • Loading branch information
watou committed Jan 2, 2016
1 parent 23d72a9 commit 859d5ba
Show file tree
Hide file tree
Showing 18 changed files with 891 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/.classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/.project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.binding.sallegra</name>
<comment>This is the Sallegra binding of the open Home Automation Bus (openHAB)</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.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
30 changes: 30 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
Manifest-Version: 1.0
Private-Package: org.openhab.binding.sallegra.internal
Ignore-Package: org.openhab.binding.sallegra.internal
Bundle-License: http://www.eclipse.org/legal/epl-v10.html
Bundle-Name: openHAB Sallegra Binding
Bundle-SymbolicName: org.openhab.binding.sallegra
Bundle-Vendor: openHAB.org
Bundle-Version: 1.8.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Description: This is the Sallegra binding of the open Home Aut
omation Bus (openHAB)
Import-Package: org.apache.commons.lang,
org.openhab.core.binding,
org.openhab.core.events,
org.openhab.core.items,
org.openhab.core.library.items,
org.openhab.core.library.types,
org.openhab.core.types,
org.openhab.io.net.http,
org.openhab.model.item.binding,
org.osgi.framework,
org.osgi.service.cm,
org.osgi.service.component,
org.osgi.service.event,
org.slf4j
Export-Package: org.openhab.binding.sallegra
Bundle-DocURL: http://www.openhab.org
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Service-Component: OSGI-INF/binding.xml, OSGI-INF/genericbindingprovider.xml
Bundle-ClassPath: .
30 changes: 30 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/OSGI-INF/binding.xml
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2015, openHAB.org 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" activate="activate" deactivate="deactivate" name="org.openhab.binding.sallegra.binding">
<implementation class="org.openhab.binding.sallegra.internal.SallegraBinding" />

<service>
<provide interface="org.osgi.service.event.EventHandler" />
<provide interface="org.osgi.service.cm.ManagedService" />
</service>

<property name="event.topics" type="String" value="openhab/command/*" />
<property name="service.pid" type="String" value="org.openhab.sallegra" />

<reference bind="setEventPublisher" cardinality="1..1"
interface="org.openhab.core.events.EventPublisher" name="EventPublisher"
policy="dynamic" unbind="unsetEventPublisher" />
<reference bind="addBindingProvider" cardinality="1..n"
interface="org.openhab.binding.sallegra.SallegraBindingProvider" name="SallegraBindingProvider"
policy="dynamic" unbind="removeBindingProvider" />

</scr:component>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2015, openHAB.org 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" name="org.openhab.binding.sallegra.genericbindingprovider">
<implementation class="org.openhab.binding.sallegra.internal.SallegraGenericBindingProvider"/>

<service>
<provide interface="org.openhab.model.item.binding.BindingConfigReader"/>
<provide interface="org.openhab.binding.sallegra.SallegraBindingProvider"/>
</service>

</scr:component>
6 changes: 6 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/build.properties
@@ -0,0 +1,6 @@
source.. = src/main/java/,\
src/main/resources/
bin.includes = META-INF/,\
.,\
OSGI-INF/
output.. = target/classes/
35 changes: 35 additions & 0 deletions bundles/binding/org.openhab.binding.sallegra/pom.xml
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>org.openhab.bundles</groupId>
<artifactId>binding</artifactId>
<version>1.8.0-SNAPSHOT</version>
</parent>

<properties>
<bundle.symbolicName>org.openhab.binding.sallegra</bundle.symbolicName>
<bundle.namespace>org.openhab.binding.sallegra</bundle.namespace>
<deb.name>openhab-addon-binding-sallegra</deb.name>
<deb.description>${project.name}</deb.description>
</properties>

<modelVersion>4.0.0</modelVersion>
<groupId>org.openhab.binding</groupId>
<artifactId>org.openhab.binding.sallegra</artifactId>

<name>openHAB Sallegra Binding</name>

<packaging>eclipse-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
</plugin>
</plugins>
</build>

</project>
@@ -0,0 +1,37 @@
/**
* Copyright (c) 2010-2015, openHAB.org 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
*/
package org.openhab.binding.sallegra;

import org.openhab.binding.sallegra.internal.SallegraBindingConfig;
import org.openhab.core.binding.BindingProvider;
import org.openhab.core.items.Item;

/**
* @author Benjamin Marty (Developed on behalf of Satelco.ch)
* @since 1.8.0
*/
public interface SallegraBindingProvider extends BindingProvider {
/**
* Lookup method for binding configs
*
* @param itemName
* name of the item
* @return the binding config for the item with the name itemName
*/
public SallegraBindingConfig getBindingConfigFor(String itemName);

/**
* Returns the class for the item
*
* @param name
* name of the item
* @return the class of the item with the name itemName
*/
public Class<? extends Item> getItemType(String name);
}

0 comments on commit 859d5ba

Please sign in to comment.