Class BuildVersion

    • Method Detail

      • binaryVersion

        public static BuildVersion binaryVersion()
        Returns the build version as specified by the dynamic constants.
        Returns:
        The build version as specified by the dynamic constants.
      • instanceVersion

        public static BuildVersion instanceVersion()
                                            throws InitializationException
        Reads the instance version from config/buildinfo.
        Returns:
        The instance version from config/buildinfo.
        Throws:
        InitializationException - If an error occurred while reading or parsing the version.
      • checkVersionMismatch

        public static void checkVersionMismatch()
                                         throws InitializationException
        Checks if the binary version is the same than the instance version.
        Throws:
        InitializationException - Sends an exception if the version mismatch.
      • valueOf

        public static BuildVersion valueOf​(String s)
                                    throws IllegalArgumentException
        Parses the string argument as a build version. The string must be of the form:
         major.minor.point[.rev]
         
        Parameters:
        s - The string to be parsed as a build version.
        Returns:
        The parsed build version.
        Throws:
        IllegalArgumentException - If the string does not contain a parsable build version.
      • getMajorVersion

        public int getMajorVersion()
        Returns the major release version number.
        Returns:
        The major release version number.
      • getMinorVersion

        public int getMinorVersion()
        Returns the minor release version number.
        Returns:
        The minor release version number.
      • getPointVersion

        public int getPointVersion()
        Returns the point release version number.
        Returns:
        The point release version number.
      • getRevision

        public String getRevision()
        Returns the VCS revision.
        Returns:
        The VCS revision.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toStringNoRevision

        public String toStringNoRevision()
        Returns a string representation of the BuildVersion including the major, minor and point versions, but excluding the revision number.
        Returns:
        a string representation excluding the revision number
      • isNewerThan

        public boolean isNewerThan​(BuildVersion version)
        Returns true if the version is newer than the provided version.
        Parameters:
        version - The version to be compared
        Returns:
        true if the version is newer than the provided version.
      • isOlderThan

        public boolean isOlderThan​(BuildVersion version)
        Returns true if the version is older than the provided version.
        Parameters:
        version - The version to be compared
        Returns:
        true if the version is older than the provided version.