Class UpdateChecker

java.lang.Object
de.hebkstudents.recipemanager.utils.UpdateChecker

public class UpdateChecker
extends java.lang.Object
Class UpdateChecker Manages App-Updates & Update-Searches
  • Field Summary

    Fields
    Modifier and Type Field Description
    private static java.lang.String cacheVerString
    Temporarily cached latest version string
  • Constructor Summary

    Constructors
    Constructor Description
    UpdateChecker()  
  • Method Summary

    Modifier and Type Method Description
    static void downloadLatestInstaller​(boolean showExecutePane)
    Downloads the latest installer from Update-Server
    static java.lang.String getLatestVersionString​(boolean ignoreCache)
    Gets the latest version string from Update-Server
    static void logUpdateCheck()
    Logs the update check procedure in the logfile
    static void showInformationPane​(boolean showUpToDateMessage)
    Shows Update information panes
    static boolean updateAvailable()
    Checks whether an update is available or not

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cacheVerString

      private static java.lang.String cacheVerString
      Temporarily cached latest version string
  • Constructor Details

    • UpdateChecker

      public UpdateChecker()
  • Method Details

    • getLatestVersionString

      public static java.lang.String getLatestVersionString​(boolean ignoreCache) throws java.io.IOException
      Gets the latest version string from Update-Server
      Returns:
      Latest version String or 'n/A' if error
      Throws:
      java.io.IOException - If its was not possible to establish a connection to the update server
    • updateAvailable

      public static boolean updateAvailable()
      Checks whether an update is available or not
      Returns:
      true if an update is available
    • showInformationPane

      public static void showInformationPane​(boolean showUpToDateMessage)
      Shows Update information panes
      Parameters:
      showUpToDateMessage - If true -> Shows a pane if software is up-to-date
    • logUpdateCheck

      public static void logUpdateCheck()
      Logs the update check procedure in the logfile
    • downloadLatestInstaller

      public static void downloadLatestInstaller​(boolean showExecutePane)
      Downloads the latest installer from Update-Server
      Parameters:
      showExecutePane - Asks if the update should be executed