|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.container.BasicModule org.jivesoftware.openfire.update.UpdateManager
public class UpdateManager
Service that frequently checks for new server or plugins releases. By default the service will check every 48 hours for updates. Use the system property update.frequency to set new values.
New versions of plugins can be downloaded and installed. However, new server releases should be manually installed.
Field Summary | |
---|---|
protected static org.dom4j.DocumentFactory |
docFactory
|
Constructor Summary | |
---|---|
UpdateManager()
|
Method Summary | |
---|---|
void |
checkForPluginsUpdates(boolean notificationsEnabled)
|
void |
checkForServerUpdate(boolean notificationsEnabled)
Queries the igniterealtime.org server for new server and plugin updates. |
boolean |
downloadPlugin(String url)
Download and install latest version of plugin. |
int |
getCheckFrequency()
Returns the frequency to check for updates. |
String |
getNotificationMessage()
Returns the message to send to admins when new updates are available. |
List<AvailablePlugin> |
getNotInstalledPlugins()
Returns the list of available plugins to install as reported by igniterealtime.org. |
Update |
getPluginUpdate(String pluginName,
String currentVersion)
Returns the plugin update or null if the plugin is up to date. |
Collection<Update> |
getPluginUpdates()
Returns a previously fetched list of updates. |
String |
getProxyHost()
Returns the host of the proxy to use to connect to igniterealtime.org or null if no proxy is used. |
int |
getProxyPort()
Returns the port of the proxy to use to connect to igniterealtime.org or -1 if no proxy is being used. |
Update |
getServerUpdate()
Returns the server update or null if the server is up to date. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
boolean |
isNotificationEnabled()
Returns true if admins should be notified by IM when new updates are available. |
boolean |
isPluginDownloaded(String url)
Returns true if the plugin downloaded from the specified URL has been downloaded. |
boolean |
isServiceEnabled()
Returns true if the check for updates service is enabled. |
boolean |
isUsingProxy()
Returns true if a proxy is being used to connect to igniterealtime.org or false if a direct connection should be attempted. |
void |
setCheckFrequency(int checkFrequency)
Sets the frequency to check for updates. |
void |
setNotificationEnabled(boolean enabled)
Sets if admins should be notified by IM when new updates are available. |
void |
setProxyHost(String host)
Sets the host of the proxy to use to connect to igniterealtime.org or null if no proxy is used. |
void |
setProxyPort(int port)
Sets the port of the proxy to use to connect to igniterealtime.org or -1 if no proxy is being used. |
void |
setServiceEnabled(boolean enabled)
Sets if the check for updates service is enabled. |
void |
start()
Starts the basic module. |
Methods inherited from class org.jivesoftware.openfire.container.BasicModule |
---|
destroy, getName, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.dom4j.DocumentFactory docFactory
Constructor Detail |
---|
public UpdateManager()
Method Detail |
---|
public void start() throws IllegalStateException
BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start
in interface Module
start
in class BasicModule
IllegalStateException
- If start is called before initialize
successfully returnspublic void initialize(XMPPServer server)
BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize
in interface Module
initialize
in class BasicModule
server
- the server hosting this module.public void checkForServerUpdate(boolean notificationsEnabled) throws Exception
notificationsEnabled
- true if admins will be notified when new updates are found.
Exception
- if some error happens during the query.public void checkForPluginsUpdates(boolean notificationsEnabled) throws Exception
Exception
public boolean downloadPlugin(String url)
url
- the URL of the latest version of the plugin.
public boolean isPluginDownloaded(String url)
url
- the URL of the latest version of the plugin.
public List<AvailablePlugin> getNotInstalledPlugins()
public String getNotificationMessage()
public boolean isServiceEnabled()
public void setServiceEnabled(boolean enabled)
enabled
- true if the check for updates service is enabled.public boolean isNotificationEnabled()
public void setNotificationEnabled(boolean enabled)
enabled
- true if admins should be notified by IM when new updates are available.public int getCheckFrequency()
public void setCheckFrequency(int checkFrequency)
checkFrequency
- the frequency to check for updates.public boolean isUsingProxy()
public String getProxyHost()
public void setProxyHost(String host)
host
- the host of the proxy or null if no proxy is used.public int getProxyPort()
public void setProxyPort(int port)
port
- the port of the proxy to use to connect to igniterealtime.org or -1 if no
proxy is being used.public Update getServerUpdate()
public Update getPluginUpdate(String pluginName, String currentVersion)
pluginName
- the name of the plugin (as described in the meta-data).currentVersion
- current version of the plugin that is installed.
public Collection<Update> getPluginUpdates()
|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |