Class VersionChecker


  • public final class VersionChecker
    extends java.lang.Object
    A class for checking for updated versions of OmegaT.
    • Method Detail

      • isUpToDate

        public boolean isUpToDate​(boolean force)
                           throws java.lang.Exception
        Check if OmegaT is up to date.
        Parameters:
        force - If true, fetch the latest data from the server even if the current data is not stale yet
        Throws:
        java.lang.Exception
      • getRemoteVersion

        public java.lang.String getRemoteVersion()
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • compareVersions

        public static int compareVersions​(java.lang.String version1,
                                          java.lang.String update1,
                                          java.lang.String version2,
                                          java.lang.String update2)
        Compares OmegaT version numbers.
        Parameters:
        version1 - e.g. "5.4.0"
        update1 - e.g. "0"
        version2 - e.g. "3.0.6"
        update2 - "1"
        Returns:
        the value 0 if version1 update1 == version2 update2; a value less than 0 if version1 update1 < version2 update2; and a value greater than 0 if version1 update1 > version2 update2