com.universaldevices.autoupdate
Class UDAutoUpdate

java.lang.Object
  extended by com.universaldevices.autoupdate.UDAutoUpdate

public class UDAutoUpdate
extends java.lang.Object

UDAutoUpdate class is an interface to Universal Devices AutoUpdate website. It enables the clients to be notified of available firmware updates as well as help them install the updates on ISY.

Author:
UD Architect

Nested Class Summary
 class UDAutoUpdate.UDPlatform
          Class UDAutoUpdate.UDPlatform is an abstraction of ISY platform for which an update is being investigated
protected  class UDAutoUpdate.UDProduct
          UDAutoUpdate.UDProduct is an abstraction of the product for which an upgrade is necessary.
protected  class UDAutoUpdate.UDVersion
          UDAutoUpdate.UDVersion is an abstraction of the platform version as described by UDI DIML/XML
static class UDAutoUpdate.UDVersionNum
          This class implements version numbers as defined by UDI
 
Field Summary
 java.util.Hashtable<java.lang.String,UDAutoUpdate.UDProduct> products
          A Hashtable of all the UDAutoUpdate.UDProducts on the UDI AutoUpdate website
 
Constructor Summary
UDAutoUpdate()
           
 
Method Summary
static int compareVersionNums(java.lang.String v1, java.lang.String v2)
          Compares two version numbers
 boolean GetUpdates()
          Fills up the products attribute with update information from UD AutoUpdate website.
 UDAutoUpdate.UDPlatform isUpgradeNecessary(java.lang.String appName, java.lang.String platform, java.lang.String version)
          Given an application name, platform name, and version, it returns whether or not an upgrade is necessary at this point
 boolean requiresReset(java.lang.Object p)
          Whether or not a UDAutoUpdate.UDProduct instance requires the ISY to be reset to factory defaults before upgrade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

products

public java.util.Hashtable<java.lang.String,UDAutoUpdate.UDProduct> products
A Hashtable of all the UDAutoUpdate.UDProducts on the UDI AutoUpdate website

Constructor Detail

UDAutoUpdate

public UDAutoUpdate()
Method Detail

compareVersionNums

public static int compareVersionNums(java.lang.String v1,
                                     java.lang.String v2)
Compares two version numbers

Parameters:
v1 -
v2 -
Returns:
- 0 if equal, negative if v2>v1, and positive if v2

GetUpdates

public boolean GetUpdates()
Fills up the products attribute with update information from UD AutoUpdate website.

Returns:
- true if successful, false otherwise

requiresReset

public boolean requiresReset(java.lang.Object p)
Whether or not a UDAutoUpdate.UDProduct instance requires the ISY to be reset to factory defaults before upgrade

Parameters:
p - - an object of type UDAutoUpdate.UDProduct
Returns:
- true if a reset is required, false otherwise

isUpgradeNecessary

public UDAutoUpdate.UDPlatform isUpgradeNecessary(java.lang.String appName,
                                                  java.lang.String platform,
                                                  java.lang.String version)
Given an application name, platform name, and version, it returns whether or not an upgrade is necessary at this point

Parameters:
appName - - application name
platform - - the platform name
version - - the current version of the application
Returns:
- true if upgrade is necessary, false otherwise