pf4j / pf4j-update

Update mechanism for PF4J
Apache License 2.0
69 stars 39 forks source link

Change name of the getLocation method to a simple getUrl #18

Closed janhoy closed 7 years ago

janhoy commented 7 years ago

This method is not yet released in any releases, so it should be safe to rename it. The new name better reflects what it returns, and users will know that it is always a URL being returned.

janhoy commented 7 years ago

Ok, changed to URL most places PluginRelease still uses String though...

janhoy commented 7 years ago

Pushed a fix to a related bug. The DefaultUpdateRepository accessed its private url member directly instead of through getter in initPlugins(). This caused problems for my GitHubUpdateRepository which overrides getUrl but not initPlugins.

decebals commented 7 years ago

Thanks!

decebals commented 7 years ago

I have the same question from my last comment, if we should change the signature of UpdateManager.updatePlugin (similar with installPlugin method - without URL parameter).

janhoy commented 7 years ago

I don't understand the question regarding UpdateManager.updatePlugin. Do you mean that udpatePlugin only needs to take id as param? Or that it could take id, version instead of id, url and find the url from that?

decebals commented 7 years ago

My idea is to have the same signature for the method updatePlugin like installPlugin, with id and version as parameter and to use the same downloadPlugin(id, version) method for download. I don't know yet if it's possible but I feel that it's more clear/natural.