Re: Changing Update Center URL at runtime
arsi <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
And what about this...
List<UpdateUnitProvider> updateUnitProviders =
UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true);
for (int i = 0; i < updateUnitProviders.size(); i++) {
UpdateUnitProvider pr = updateUnitProviders.get(i);
String name = pr.getDisplayName();
if("MyUpdateCenter".equals(name)){
pr.setProviderURL(new
URL("http://example.com/updateCenter"));
pr.refresh(ProgressHandle.createHandle("UpdateCenter refresh"), true);
break;
}
}
Arsi
------------------------------------------------------------------------
*From:* Asterix45
*Sent:* Saturday, February 27, 2016 9:11AM
*To:* Dev
*Subject:* [platform-dev] Changing Update Center URL at runtime
> Hi RamiS, hi Peter,
>
> thanks for your replies.
>
>
> @RamiS, I'm sorry but I can use your solution, in my situation its not possible to have a smart enough client to perform such installation or to change the module every time I needed.
> Your solution works but there are a lot of work to do and that's not my idea.
>
> I've found some discussions about the update center, in particular this faq:
>
> http://wiki.netbeans.org/DevFaqCustomUpdateCenter
>
> in which it says that I can remove the bundle.properties file and specify the url directly in the layer.xml file.
> Also it's possible to specify a method to return a value of a property in the layer.xml, and that's what I should use to create a dynamic url with client's params.
>
> In this way the client completely ignore all the dynamics of the update process and, as Peter says, now I can respond an XML from my server with all the modules that my client have to update/install.
>
>
> @Peter, thanks for your suggest to read "The Definitive Guide to the Netbeans Platform 7"; I just had the one for Platform 6.5.
> I found the Platform 7 book and I have to say that it's more complete and has more examples than the other.
> I read the two chapter, in particular the 25th is very interesting for my purpose.
>
> Now I have to work to force installation and dis-installation of modules according to clients settings in my server, and I think I'll ask for more help about this, but we can consider this topic solved.
>
>
> Thanks for your time,
> Regards,
> Asterix
>
>
>
>
>