Re: Changing Update Center URL at runtime
Peter Hansson <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAC55jYPUgaO0RRGSfkxmhmXPj+-sGxUzs87s7VBqu+O=O_uAmA@mail.gmail.com> |
I'll say this again: For information about how the NetBeans Platform "Auto Update Services API" works I've found no better place than in "The Definitive Guide to the Netbeans Platform 7" (a book by Heiko Boeck, try a bit of google). You'll want to read chapters 25 and 36. There's for example a very good explanation of how to use the API silently i.e. in the background and without the default Plugin Manager GUI (which isn't really appropriate for many platform apps, IMHO). If there are other tutorials on the topic than said book then I'm not aware of them, but I could be wrong. As for passing parameters in the Update Center URL: I remember this has been asked before and I'm afraid there's no support for it in the API. But there's a workaround. You can embed information in the URL string itself, something like http://your-update-center/data1/data2/data3. Then you'll need an Update Center that can parse the requesting URL path and make sense of it. I use this technique and I pass a base64 string as part of the URL path. My Update Center is a very simple home-brewed Servlet. My servlet generate the update_center.xml file on-the-fly depending on the information it receives in the URL. So yes, you can do all sorts of tricks. Takes time though. Peter On Sat, Feb 20, 2016 at 11:17 AM, Asterix45 <[email protected]> wrote: > Hi all, > > I'm trying to add an Update Center module to my application. > My users set in my application some information about their account in an > Option Panel and I would like to have this information on update request. > > What I'm trying to do is: > > 1. Users set their account info in the Option Panel > 2. The Update Center uses a link to a .php file in the update server with > this info as parameters > 3. The server provide an xml response according to the parameters it > received > > > To obtain this I need to modify the url for the update center every time > that my users change their account info. > > I found that when an Update center is added to a module the platform write > in the layer.xml the position of a bundle.properties file, where the update > server url is located. > I was thinking about changing this information but NbBundle don't allow > modification of such file so it's not possible. > > I've tried to work with the Update Center classes found in some post to > perform the silent update of modules but with no results. > > Does anyone knows how to perform this task? > > Thanks in advance! > > > > >