mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 20:15:22 +00:00
Merged revisions 23183,23185,23245,23256,23266,23279-23284,23286 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/multiple-update-sources ........ r23183 | abayer | 2009-10-25 11:53:17 -0700 (Sun, 25 Oct 2009) | 1 line First chunk of work towards supporting multiple update centers - infrastructure in place for it, and default update center treated as only one of multiple - have to use slightly modified update-center.json though ........ r23185 | abayer | 2009-10-25 12:25:49 -0700 (Sun, 25 Oct 2009) | 1 line a number of tweaks - among other things, now works properly with additional update centers defined in hudson.model.UpdateCenter.xml - try using http://andrewbayer.com/images/hello-world/helloWorld-update-center.json as second update center ........ r23245 | abayer | 2009-10-27 13:45:25 -0700 (Tue, 27 Oct 2009) | 1 line Modified to support existing default update-center.json ........ r23256 | kohsuke | 2009-10-27 18:30:15 -0700 (Tue, 27 Oct 2009) | 7 lines - moved data binding of update-center.json to UpdateSource. - moved some of the UpdateSource property into JSON, to improve the user experience when adding an update source. the user should just type in one URL, and everything else should happen automatically. - it doesn't make sense for UpdateSource to rely on UpdateCenterConfiguration, since behaviors cannot be modified per UpdateSource basis. Instead, leaving it in UpdateCenter allows us to maintain backward compatible behaviors with the existing custom UpdateCenterConfiguration implementation. ........ r23266 | kohsuke | 2009-10-27 19:29:24 -0700 (Tue, 27 Oct 2009) | 1 line serve id inside JSON. ........ r23279 | kohsuke | 2009-10-28 10:44:00 -0700 (Wed, 28 Oct 2009) | 1 line Do not special-case "default" ID. Receive hudson.war updates from wherever that provides one. ........ r23280 | kohsuke | 2009-10-28 10:50:57 -0700 (Wed, 28 Oct 2009) | 1 line formatting change. ........ r23281 | kohsuke | 2009-10-28 11:30:40 -0700 (Wed, 28 Oct 2009) | 1 line typo ........ r23282 | kohsuke | 2009-10-28 11:45:06 -0700 (Wed, 28 Oct 2009) | 2 lines - added the UI to remove sites. - persistence of UpdateSource happens more automatically now. ........ r23283 | kohsuke | 2009-10-28 11:50:04 -0700 (Wed, 28 Oct 2009) | 1 line UpdateSource -> UpdateSite to align terminology with Eclipse. ........ r23284 | kohsuke | 2009-10-28 11:55:03 -0700 (Wed, 28 Oct 2009) | 5 lines Actually, for now, just having a programmatic modification to UpdateSite would satisfy the primary use case. And I'd like to upgrade YUI to a more recent version so that we can use its DataTable for UI. Plus the single update center model encourages the community to bring the code into the Hudson project, which is something we'd like to keep. So all in all, I'm postponing the UI work. ........ r23286 | kohsuke | 2009-10-28 13:07:19 -0700 (Wed, 28 Oct 2009) | 1 line Renaming and bug fixes. ........ git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23326 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
938cb6ba23
commit
720be7d7a1
18 files changed
+1158
-663
No files matched your search
@@ -25,6 +25,7 @@ package hudson;
|
||||
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.UpdateCenter;
|
||||
import hudson.model.UpdateSite;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -252,7 +253,7 @@ public final class PluginWrapper {
|
||||
if(url!=null) return url;
|
||||
|
||||
// fallback to update center metadata
|
||||
UpdateCenter.Plugin ui = getInfo();
|
||||
UpdateSite.Plugin ui = getInfo();
|
||||
if(ui!=null) return ui.wiki;
|
||||
|
||||
return null;
|
||||
@@ -360,23 +361,23 @@ public final class PluginWrapper {
|
||||
|
||||
/**
|
||||
* If the plugin has {@link #getUpdateInfo() an update},
|
||||
* returns the {@link UpdateCenter.Plugin} object.
|
||||
* returns the {@link UpdateSite.Plugin} object.
|
||||
*
|
||||
* @return
|
||||
* This method may return null — for example,
|
||||
* the user may have installed a plugin locally developed.
|
||||
*/
|
||||
public UpdateCenter.Plugin getUpdateInfo() {
|
||||
public UpdateSite.Plugin getUpdateInfo() {
|
||||
UpdateCenter uc = Hudson.getInstance().getUpdateCenter();
|
||||
UpdateCenter.Plugin p = uc.getPlugin(getShortName());
|
||||
UpdateSite.Plugin p = uc.getPlugin(getShortName());
|
||||
if(p!=null && p.isNewerThan(getVersion())) return p;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the {@link UpdateCenter.Plugin} object, or null.
|
||||
* returns the {@link UpdateSite.Plugin} object, or null.
|
||||
*/
|
||||
public UpdateCenter.Plugin getInfo() {
|
||||
public UpdateSite.Plugin getInfo() {
|
||||
UpdateCenter uc = Hudson.getInstance().getUpdateCenter();
|
||||
return uc.getPlugin(getShortName());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user