org.opensha.nshmp.util
Class Versioner

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

public class Versioner
extends java.lang.Object


Constructor Summary
Versioner()
          Constructor: Sets the values of version, updates, and connection
 
Method Summary
 boolean check()
          Returns the value of connection
 java.lang.String getAllUpdates()
          Returns the HTML formatted list of all updates
 java.lang.String getClientVersion()
          Returns the full client version string.
 java.lang.String getClientVersionNumber()
          Return the client version string without the 'Version: ' prepended to the number
 java.lang.String getServerVersion()
          Returns the full server version string.
 java.lang.String getServerVersionNumber()
          Return the server version string without the 'Version: ' prepended to the number
 java.lang.String getUpdateMessage()
          Creates the message to give the user when their client is out of date
 java.lang.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 java.lang.String getUpdates()
Returns the HTML formatted list of recent updates

Returns:
updates String An HTML formatted list of recent updates

getAllUpdates

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

Returns:
allUpdates String An HTML formatted list of all updates

getClientVersion

public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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