org.opensha.nshmp.util
Class Versioner

java.lang.Object
  extended by org.opensha.nshmp.util.Versioner

public class Versioner
extends Object


Constructor Summary
Versioner()
          Constructor: Sets the values of version, updates, and connection
 
Method Summary
 boolean check()
          Returns the value of connection
 String getAllUpdates()
          Returns the HTML formatted list of all updates
 String getClientVersion()
          Returns the full client version string.
 String getClientVersionNumber()
          Return the client version string without the 'Version: ' prepended to the number
 String getServerVersion()
          Returns the full server version string.
 String getServerVersionNumber()
          Return the server version string without the 'Version: ' prepended to the number
 String getUpdateMessage()
          Creates the message to give the user when their client is out of date
 String getUpdates()
          Returns the HTML formatted list of recent updates
 boolean versionCheck()
          Checks the version of the client the user is running against what the server knows to be the most recent version and returns as appropriate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Versioner

public Versioner()
Constructor: Sets the values of version, updates, and connection

Method Detail

check

public boolean check()
Returns the value of connection

Returns:
connection boolean true if successfully connected to server, false otherwise

getUpdates

public String getUpdates()
Returns the HTML formatted list of recent updates

Returns:
updates String An HTML formatted list of recent updates

getAllUpdates

public String getAllUpdates()
Returns the HTML formatted list of all updates

Returns:
allUpdates String An HTML formatted list of all updates

getClientVersion

public String getClientVersion()
Returns the full client version string. This is something like 'Version: 5.X.X - mm/dd/yyyy'

Returns:
CLIENT_VERSION String The current version the user is running

getServerVersion

public String getServerVersion()
Returns the full server version string. This is something like 'Version: 5.X.X - mm/dd/yyyy'

Returns:
version String The current version known to the server

getClientVersionNumber

public String getClientVersionNumber()
Return the client version string without the 'Version: ' prepended to the number

Returns:
versionNumber String The version number and release date of the current version the user is running

getServerVersionNumber

public String getServerVersionNumber()
Return the server version string without the 'Version: ' prepended to the number

Returns:
versionNumber String The version number and release date of the current version known to the server

versionCheck

public boolean versionCheck()
Checks the version of the client the user is running against what the server knows to be the most recent version and returns as appropriate

Returns:
isCurrent boolean True if the client and server version match, false otherwise

getUpdateMessage

public String getUpdateMessage()
Creates the message to give the user when their client is out of date

Returns:
infoMessage String An HTML formatted message informing the user of the need to update their client