TV-Browser 3.3.3 API

tvbrowser.ui.update
Class SoftwareUpdateItem

java.lang.Object
  extended by tvbrowser.ui.update.SoftwareUpdateItem
Direct Known Subclasses:
PluginsSoftwareUpdateItem, TvbrowserSoftwareUpdateItem

public abstract class SoftwareUpdateItem
extends java.lang.Object

Contains informations about a software update.


Constructor Summary
SoftwareUpdateItem(java.lang.String className)
          Creates an instances of this class.
 
Method Summary
 void addProperty(java.lang.String key, java.lang.String value)
          Adds a property to this item.
 boolean download(java.lang.String downloadUrl)
          Downloads the file for this software update item.
protected abstract  boolean downloadFrom(java.lang.String url)
           
 java.lang.String getCategory()
          Gets the category of this update item.
 java.lang.String getClassName()
          Gets the class name of this update item.
 java.lang.String getDescription()
          Gets the description of this update item.
 Version getEssentialTvbVersion()
          Gets the version for which this software update is essential.
 Version getInstalledVersion()
          Gets the currently installed version of this software.
 Version getMaximumVersion()
          Gets the maximum supported TV-Browser version.
 java.lang.String getName()
          Gets the name of this update item.
 java.lang.String getProperty(java.lang.String key)
          Gets a property for the given key.
 Version getRequiredVersion()
          Gets the TV-Browser version that is required to support this update item.
 Version getVersion()
          Gets the version of this update item
 java.lang.String getWebsite()
          Gets the website of this update item.
 boolean isAlreadyInstalled()
          check whether this item is already installed or not
 boolean isOnlyUpdate()
          Gets if this is an only update item.
 boolean isStable()
          Gets if this update item is a stable version.
 boolean isSupportingCurrentOs()
          Gets if the plugin supports the current OS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftwareUpdateItem

public SoftwareUpdateItem(java.lang.String className)
Creates an instances of this class.

Parameters:
className - The class name of the software to update.
Method Detail

addProperty

public void addProperty(java.lang.String key,
                        java.lang.String value)
Adds a property to this item.

Parameters:
key - The key of the property.
value - The value for the key.

getProperty

public java.lang.String getProperty(java.lang.String key)
Gets a property for the given key.

Parameters:
key - The key to get the property for.
Returns:
The property for the key, or null if the key was not found.

getVersion

public Version getVersion()
Gets the version of this update item

Returns:
The version of this update item.

isStable

public boolean isStable()
Gets if this update item is a stable version.

Returns:
True if this update item is a stable version, false otherwise.

isOnlyUpdate

public boolean isOnlyUpdate()
Gets if this is an only update item.

Returns:
True if this is an only update item, false otherwise.

isSupportingCurrentOs

public boolean isSupportingCurrentOs()
Gets if the plugin supports the current OS.

Returns:
True if the current OS is supported by the plugin, false otherwise.
Since:
2.2.4/2.6

getRequiredVersion

public Version getRequiredVersion()
Gets the TV-Browser version that is required to support this update item.

Returns:
The required TV-Browser version.

getMaximumVersion

public Version getMaximumVersion()
Gets the maximum supported TV-Browser version.

Returns:
The maximum supported TV-Browser version.

getEssentialTvbVersion

public Version getEssentialTvbVersion()
Gets the version for which this software update is essential.

Returns:
The TV-Browser version this software update is essential for or null if there is no essential version.
Since:
3.3

getName

public java.lang.String getName()
Gets the name of this update item.

Returns:
The name of this update item.

getDescription

public java.lang.String getDescription()
Gets the description of this update item.

Returns:
The description of this update item.

getWebsite

public java.lang.String getWebsite()
Gets the website of this update item.

Returns:
The website of this update item.

getClassName

public java.lang.String getClassName()
Gets the class name of this update item.

Returns:
The class name of this update item.

download

public boolean download(java.lang.String downloadUrl)
                 throws TvBrowserException
Downloads the file for this software update item.

Parameters:
downloadUrl - A donwload URL to use, or null if the default url should be used.
Returns:
True if the download was successfull, false otherwise.
Throws:
TvBrowserException

downloadFrom

protected abstract boolean downloadFrom(java.lang.String url)
                                 throws TvBrowserException
Throws:
TvBrowserException

getInstalledVersion

public Version getInstalledVersion()
Gets the currently installed version of this software.

Returns:
The installed version of this software or null if the software represented by this update item is not installed.

isAlreadyInstalled

public boolean isAlreadyInstalled()
check whether this item is already installed or not

Returns:
true if item is already installed

getCategory

public java.lang.String getCategory()
Gets the category of this update item.

Returns:
The category of this update item.
Since:
2.7

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)