Commit 0073a3f5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Refactoring work to reduce queries to jivesoftware.org and keep privacy of...

Refactoring work to reduce queries to jivesoftware.org and keep privacy of installed plugins. JM-715

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3998 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1fedf585
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.update;
/**
* Information about an available plugin (i.e. not installed). The information was obtained
* from jivesoftware.org after executing
* {@link org.jivesoftware.wildfire.update.UpdateManager#getAvailablePlugins()}.
* Plugin available at jivesoftware.org. The plugin may or may not be locally installed.
*
* @author Gaston Dombiak
*/
......
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.update;
/**
......@@ -77,16 +88,6 @@ public class Update {
return url;
}
/**
* Returns true if this update means that the server needs to be updated. When false
* then it means that a plugin needs to be updated.
*
* @return true if this update means that the server needs to be updated.
*/
public boolean isServer() {
return "Wildfire".equals(componentName);
}
/**
* Returns true if the plugin was downloaded. Once a plugin has been downloaded
* it may take a couple of seconds to be installed. This flag only makes sense for
......
......@@ -8,8 +8,10 @@
<%@ page import="org.jivesoftware.wildfire.XMPPServer,
org.jivesoftware.wildfire.update.AvailablePlugin,
org.jivesoftware.wildfire.update.UpdateManager,
java.util.List"
java.util.Collections"
%>
<%@ page import="java.util.Comparator"%>
<%@ page import="java.util.List"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
......@@ -21,7 +23,14 @@
String url = request.getParameter("url");
UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
List<AvailablePlugin> plugins = updateManager.getAvailablePlugins();
List<AvailablePlugin> plugins = updateManager.getNotInstalledPlugins();
// Sort plugins alphabetically
Collections.sort(plugins, new Comparator() {
public int compare(Object o1, Object o2) {
return ((AvailablePlugin) o1).getName().compareTo(((AvailablePlugin) o2).getName());
}
});
if (downloadRequested) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment