Plugins that are already installed shouldn't show up in the "available" list.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10019 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-06-11 16:23:16 +00:00
1 parent e04266ab86
commit c8b26e6af0
2 files changed
+16 -1

No files matched your search

@@ -135,6 +135,21 @@ public class UpdateCenter implements ModelObject {
}
}
/**
* Returns a list of plugins that should be shown in the "available" tab.
* These are "all plugins - installed plugins".
*/
public List<Plugin> getAvailables() {
List<Plugin> r = new ArrayList<Plugin>();
Data data = getData();
if(data ==null) return Collections.emptyList();
for (Plugin p : data.plugins.values()) {
if(p.getInstalled()==null)
r.add(p);
}
return r;
}
/**
* Gets the information about a specific plugin.
*