Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Binding OSGi Service to model
Binding OSGi Service to model [message #720809] Wed, 31 August 2011 09:30 Go to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Next "is-it-possible" question:

My model configures OSGi services. Can I bind existing OSGi services, so I can see, e.g. default properties in my editor?

cheers,
Muki
Re: Binding OSGi Service to model [message #720946 is a reply to message #720809] Wed, 31 August 2011 14:20 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I don't quite understand your question, but...

If you are trying to feed default values to your model from an arbitrary source, see DefaultValueService. Attach your implementation using @Service annotation.

If you are trying to edit an OSGi service (as opposed to editing say an XML file), see Resource API which sits at a level beneath model element and provides property read/write into underlying data storage. You could build a resource that wraps around your OSGi service. See XmlResource for an implementation example.

Hope this helps.

- Konstantin
Re: Binding OSGi Service to model [message #721135 is a reply to message #720946] Thu, 01 September 2011 00:05 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi,

Yeah, I think that helps. Still trying to get around Sapphire Wink

I explained intentions too short. My model, persisted in an XML file, stores properties which configure an OSGi service.
However to get default values, the editor has to query the OSGi service.

thx,
Muki
Re: Binding OSGi Service to model [message #721422 is a reply to message #721135] Thu, 01 September 2011 18:00 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
You could try writing an custom PossibleValueService and add it to your model property @Service annotation so that you can browse for the possible values, please see the Sapphire samples for implementation and samples for PossibleValueService,mind that your possible value service need to achieve the Querying and other stuff you need for your OSGI services.

Hope this helps.

~Kamesh
Previous Topic:SapphireWizardPage -> Missing Page ID
Next Topic:XMLAttribute binding
Goto Forum:
  


Current Time: Fri Apr 26 03:47:55 GMT 2024

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

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

Back to the top