org.jivesoftware.sparkimpl.updater
Class CheckUpdates

java.lang.Object
  extended by org.jivesoftware.sparkimpl.updater.CheckUpdates

public class CheckUpdates
extends java.lang.Object


Field Summary
static boolean UPDATING
           
 
Constructor Summary
CheckUpdates()
           
 
Method Summary
 void checkForUpdate(boolean explicit)
          Checks Spark Manager and/or Jive Software for the latest version of Spark.
 void downloadUpdate(java.io.File downloadedFile, SparkVersion version)
           
static SparkVersion getLatestVersion(org.jivesoftware.smack.XMPPConnection connection)
          Returns the latest version of Spark available via Spark Manager or Jive Software.
 boolean isGreater(java.lang.String version1, java.lang.String version2)
          Returns true if the first version number is greater than the second.
 SparkVersion isNewBuildAvailableFromJivesoftware()
          Returns true if there is a new build available for download.
static boolean isSparkPluginInstalled(org.jivesoftware.smack.XMPPConnection con)
          Does a service discvery on the server to see if a Spark Manager is enabled.
 SparkVersion newBuildAvailable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPDATING

public static boolean UPDATING
Constructor Detail

CheckUpdates

public CheckUpdates()
Method Detail

newBuildAvailable

public SparkVersion newBuildAvailable()

isNewBuildAvailableFromJivesoftware

public SparkVersion isNewBuildAvailableFromJivesoftware()
Returns true if there is a new build available for download.

Returns:
true if there is a new build available for download.

downloadUpdate

public void downloadUpdate(java.io.File downloadedFile,
                           SparkVersion version)

checkForUpdate

public void checkForUpdate(boolean explicit)
                    throws java.lang.Exception
Checks Spark Manager and/or Jive Software for the latest version of Spark.

Parameters:
explicit - true if the user explicitly asks for the latest version.
Throws:
java.lang.Exception

isGreater

public boolean isGreater(java.lang.String version1,
                         java.lang.String version2)
Returns true if the first version number is greater than the second.

Parameters:
version1 - the first version number.
version2 - the second version number.
Returns:
returns true if the first version is greater than the second.

getLatestVersion

public static SparkVersion getLatestVersion(org.jivesoftware.smack.XMPPConnection connection)
                                     throws org.jivesoftware.smack.XMPPException
Returns the latest version of Spark available via Spark Manager or Jive Software.

Parameters:
connection - the XMPPConnection to use.
Returns:
the information for about the latest Spark Client.
Throws:
org.jivesoftware.smack.XMPPException

isSparkPluginInstalled

public static boolean isSparkPluginInstalled(org.jivesoftware.smack.XMPPConnection con)
Does a service discvery on the server to see if a Spark Manager is enabled.

Parameters:
con - the XMPPConnection to use.
Returns:
true if Spark Manager is available.