org.browsecode.helpers
Class ProgramInfo

java.lang.Object
  extended by org.browsecode.helpers.ProgramInfo

public abstract class ProgramInfo
extends java.lang.Object

Information about a program, for debugging and sending error messages. Also for getting the current program's homepage and other info.


Field Summary
protected  java.util.Date latestVersionDate
           
protected  java.lang.String latestVersionString
          Checks a website for the latest known version.
static java.text.SimpleDateFormat VersionDateFormat
           
 
Constructor Summary
ProgramInfo()
           
 
Method Summary
abstract  java.lang.String getHomepage()
           
abstract  java.lang.String getHomepageCurrentVersion()
           
abstract  java.lang.String getHomepageDownloadPage()
           
 java.lang.String getLatestVersion()
           
 java.util.Date getLatestVersionDate()
           
static ProgramInfo getProgramInfo()
          Get the current active ProgramInfo.
static java.text.SimpleDateFormat getVersionDateFormat()
           
static void setProgramInfo(ProgramInfo theProgramInfo)
          Register the current instantiation of ProgramInfo with this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

latestVersionString

protected java.lang.String latestVersionString
Checks a website for the latest known version. Will return null if the latest version is unknown (i.e. if network is unavailable, etc.).


latestVersionDate

protected java.util.Date latestVersionDate

VersionDateFormat

public static java.text.SimpleDateFormat VersionDateFormat
Constructor Detail

ProgramInfo

public ProgramInfo()
Method Detail

getProgramInfo

public static ProgramInfo getProgramInfo()
Get the current active ProgramInfo. This could be null, but it is highly recommended to assume it's non-null, and to fix all those locations that refer to it where it's null -- the point is to create a new one on startup, and use that for the life of the program.


setProgramInfo

public static void setProgramInfo(ProgramInfo theProgramInfo)
Register the current instantiation of ProgramInfo with this class.

Parameters:
programInfo -

getHomepage

public abstract java.lang.String getHomepage()

getHomepageCurrentVersion

public abstract java.lang.String getHomepageCurrentVersion()

getHomepageDownloadPage

public abstract java.lang.String getHomepageDownloadPage()

getLatestVersion

public java.lang.String getLatestVersion()

getLatestVersionDate

public java.util.Date getLatestVersionDate()

getVersionDateFormat

public static java.text.SimpleDateFormat getVersionDateFormat()