Initial implementation of plugin DB upgrade support

This commit is contained in:
Ziver Koc 2021-07-11 23:00:47 +02:00
parent aea0d9bab1
commit 6a81f5de16
11 changed files with 295 additions and 106 deletions

View file

@ -0,0 +1,22 @@
package se.hal.plugin.zigbee;
import se.hal.intf.HalDatabaseUpgrade;
import zutil.db.DBConnection;
import zutil.log.LogUtil;
import java.sql.SQLException;
import java.util.logging.Logger;
/**
* The DB upgrade class for Hal-Core
*/
public class ZigbeeHalDatabaseUpgrade extends HalDatabaseUpgrade {
private static final int REFERENCE_DB_VERSION = 1;
private static final String REFERENCE_DB_PATH = "resource/hal-zigbee-reference.db";
public ZigbeeHalDatabaseUpgrade() {
super(REFERENCE_DB_VERSION, REFERENCE_DB_PATH);
}
}

View file

@ -1,8 +1,10 @@
{
"version": 0.1,
"name": "Hal-Zigbee",
"description": "A Zigbee plugin for directly connecting to a CC2531 device over serial port.",
"description": "A Zigbee plugin for directly connecting to a controller device over serial port.",
"interfaces": [
{"se.hal.intf.HalDatabaseUpgrade": "se.hal.plugin.zigbee.ZigbeeHalDatabaseUpgrade"},
{"se.hal.intf.HalEventConfig": "se.hal.plugin.zigbee.device.ZigbeeOnOffConfig"},
{"se.hal.intf.HalSensorConfig": "se.hal.plugin.zigbee.device.ZigbeeHumidityConfig"},
{"se.hal.intf.HalSensorConfig": "se.hal.plugin.zigbee.device.ZigbeePressureConfig"},