Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Reading/Updating data from/to a database instead of a Configuration XML file.(Reading/Updating data from/to a database instead of a Configuration XML file.)
Reading/Updating data from/to a database instead of a Configuration XML file. [message #1709367] Mon, 28 September 2015 04:14 Go to next message
Lich Bui is currently offline Lich BuiFriend
Messages: 2
Registered: September 2015
Junior Member
Hi All,

I am new to KuraAPI.

I would like to create an UI form and save my data into a database when I make any changes on that form.
And then, I will read from DB and display them on the Kura WebUI instead of reading from a configuration XML file.

I read all the documentation here:
/kura/doc/configurable_component.html

But I don't want to read my data from a XML configuration file through "Map<String, Object> properties " for the persistent reason.
(I want to save my configuration data for a long time even if my Raspberry Pi was shutdown).

So, can I read/update data from/to a database? Does Kura API support this?
If so, How can I do this?
Could you please help me?

Thank you in advance.
Re: Reading/Updating data from/to a database instead of a Configuration XML file. [message #1709467 is a reply to message #1709367] Mon, 28 September 2015 16:33 Go to previous messageGo to next message
Amit Kumar Mondal is currently offline Amit Kumar MondalFriend
Messages: 108
Registered: March 2015
Location: Munich, Germany
Senior Member

Hi Lich,

First of all, welcome to Kura Support Form. As you have asked for the configuration retrieval from external DB Source, I would like to tell you that the current Kura Web Console Configurations are basically OSGi Metatype Configurations. And for your concern, you can achieve your goal using two different methods.

1. You have to modify the existing Kura Web Console (org.eclipse.kura.web bundle) to write your own configuration section which can use Kura's existing HyperSQL Accessor OSGi Service (DBService) to write the configurations to the database and retrieve the same later on.

Reference Link: https://github.com/eclipse/kura/tree/develop/kura/org.eclipse.kura.web

2. You have to write your own Metatype Provider Adapter Factory which would retrieve the configurations from an external source like DB, File etc.

Reference Link: https://osgi.org/javadoc/r4v42/org/osgi/service/metatype/MetaTypeProvider.html

It's your own discretion to choose one of these according to your comfortability and ease of these methods.

I hope it helps.

Thanks and Regards,


Amit Kumar Mondal
Email: admin@amitinside.com
Skype: arsenalnerk Blog: blog.amitinside.com
Re: Reading/Updating data from/to a database instead of a Configuration XML file. [message #1709507 is a reply to message #1709467] Tue, 29 September 2015 01:55 Go to previous message
Lich Bui is currently offline Lich BuiFriend
Messages: 2
Registered: September 2015
Junior Member
Hi Amit,

Thank you very much for taking your time to support me.
I will follow your instructions and do in-depth research.
Previous Topic:Problems installing Kura
Next Topic:Issue on BluetoothGattImpl
Goto Forum:
  


Current Time: Mon Sep 23 17:46:33 GMT 2024

Powered by FUDForum. Page generated in 0.04817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top