Re: Autoupdate URL with parameters
Peter Hansson <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <CAC55jYP33BKOJQ57Xz8Jxsr6J2De2KSz3SkYZ+e9YH_xd78-Wg@mail.gmail.com> |
I had the exact same issue. I first looked if there was a simple way I could overwrite NB's default logic in this area. What you want to do essentially is register an UC with not only an URL but also some query parameters that are always passed along with URL. Unfortunately I couldn't figure out how I could easily implement my own UpdateUnitProvider without replicating too much code. So I skipped that idea. Instead I'm using a method where the information I need to pass along is embedded in the Update Center URL itself, something like http://myserver/updatecenter/xxxx, where xxxx is some chars inside which I embed information. In reality - in my case - xxxx is a base64 encoded string of 40 chars which I can then decode on the server side. This is enough for me to convey the information needed. What happens is this: 1. When an application instance starts up it figures out which URL (or rather only the xxxx's) it must use to register the UC. It then registers' the UC. This is all done behind the scenes as in my case the user never sees the Update Center URL. It is all handled for him. He cannot add or remove UCs himself. 2. The application contacts the server (the Update Center) with an URL where only the first part is common between application instances. There's however only one servlet on the server side that handles all processing for these URL. The servlet 'decodes' the URL and then returns different results to the applications depending on the information it has decoded from the URL. Clearly this is a workaround. I believe this is not an uncommon request, i.e. the idea that some information should be passed along to the UC with every GET request and the right method to do that would of course be through parameters. So perhaps you should launch an RFE ? Peter On Sunday, November 1, 2015 9:08 PM, Radim Kubacki <[email protected]> wrote: > > >Hello, > > >is there any way how to use some parameters in AutoUpdate URL. I'd like to have one URL for all NBAndroid users like >http://nbandroid.org/release/{netbeans.version}/update.xml > > >This would be simpler for users when they upgrade their IDE. I want to have an older version of the plugin available even if I switch the development focus to a newer one. That forces me to have several AU centers and creates usability problem how to switch between them. > > >-Radim > >