Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » [Solved]Reading the version number of the binding
[Solved]Reading the version number of the binding [message #1763990] Tue, 23 May 2017 16:51 Go to next message
Juergen Baginski is currently offline Juergen BaginskiFriend
Messages: 7
Registered: March 2017
Junior Member
How is it possible to read the version number of the actual binding (the number that gets displayed on Karaf by "bundle:list", for example "2.1.0.201705141755" ).

[Updated on: Wed, 24 May 2017 19:53]

Report message to a moderator

Re: Reading the version number of the binding [message #1764041 is a reply to message #1763990] Wed, 24 May 2017 09:04 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Something like this should do the trick:

FrameworkUtil.getBundle(this.getClass()).getVersion()


Still, may I ask for the use-case you need it for?
Re: Reading the version number of the binding [message #1764045 is a reply to message #1764041] Wed, 24 May 2017 09:51 Go to previous messageGo to next message
Juergen Baginski is currently offline Juergen BaginskiFriend
Messages: 7
Registered: March 2017
Junior Member
Thanks for the reply :-)

In the binding an API-call is used to get data from a web-service. The provider of the API asked for an special UserAgentString in the API-call containing, amongst other information, the binding version.
Re: Reading the version number of the binding [message #1764059 is a reply to message #1764045] Wed, 24 May 2017 13:16 Go to previous message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Sure! And thanks for your explanation!
I think it makes sense then to do it in this way.
Previous Topic:Thing configuration does not show boolean thing parameter in paperUI
Next Topic:Authentication Rest API
Goto Forum:
  


Current Time: Thu Dec 26 09:52:18 GMT 2024

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

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

Back to the top