public class UpdateUtils
extends java.lang.Object
| Constructor and Description |
|---|
UpdateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static UpdateDescriptionDocument |
checkForUpdate(java.lang.String href,
java.lang.String version)
Gets an update description document for a widget using the specified href and version.
|
static UpdateDescriptionDocument |
checkForUpdate(W3CWidget widget)
Gets an update description document for a widget
Returns null if there is no update available, or the Update Description Document is not valid
|
static W3CWidget |
getUpdate(W3CWidgetFactory factory,
java.lang.String identifier,
java.lang.String href,
java.lang.String version,
boolean onlyUseHttps)
Gets the latest version of a widget
|
static W3CWidget |
getUpdate(W3CWidgetFactory factory,
W3CWidget widget)
Gets an updated widget of a widget.
|
public static UpdateDescriptionDocument checkForUpdate(W3CWidget widget)
widget - the widget to check for updatespublic static UpdateDescriptionDocument checkForUpdate(java.lang.String href, java.lang.String version)
href - the URL to use to obtain update information for the widgetversion - the current version of the widgetpublic static W3CWidget getUpdate(W3CWidgetFactory factory, W3CWidget widget)
factory - widget - the widget to updatepublic static W3CWidget getUpdate(W3CWidgetFactory factory, java.lang.String identifier, java.lang.String href, java.lang.String version, boolean onlyUseHttps) throws InvalidContentTypeException, BadWidgetZipFileException, BadManifestException, java.io.IOException, java.lang.Exception
factory - href - the location of the widget Update Description Documentversion - the version of the currently installed widgetonlyUseHttps - only get updates using HTTPS, ignore plain HTTP updatesjava.lang.Exceptionjava.io.IOExceptionBadManifestExceptionBadWidgetZipFileExceptionInvalidContentTypeException2012 Apache Software Foundation.