public class CheckUpdates
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
UPDATING |
Constructor and Description |
---|
CheckUpdates() |
Modifier and Type | Method and Description |
---|---|
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.
|
static java.lang.String |
getVersion(java.lang.String version) |
static boolean |
isGreater(java.lang.String firstVersion,
java.lang.String secondVersion)
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() |
public SparkVersion newBuildAvailable()
public SparkVersion isNewBuildAvailableFromJivesoftware()
public void downloadUpdate(java.io.File downloadedFile, SparkVersion version)
public void checkForUpdate(boolean explicit) throws java.lang.Exception
explicit
- true if the user explicitly asks for the latest version.java.lang.Exception
- if there is an error during checkpublic static boolean isGreater(java.lang.String firstVersion, java.lang.String secondVersion)
firstVersion
- the first version number.secondVersion
- the second version number.public static java.lang.String getVersion(java.lang.String version)
public static SparkVersion getLatestVersion(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException, org.jivesoftware.smack.XMPPException.XMPPErrorException
connection
- the XMPPConnection to use.org.jivesoftware.smack.XMPPException
- If unable to retrieve latest version.org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPException.XMPPErrorException
public static boolean isSparkPluginInstalled(org.jivesoftware.smack.XMPPConnection con)
con
- the XMPPConnection to use.