Class PayaraVersion


  • public class PayaraVersion
    extends Object
    A utility class to store the Payara Version and check if it's more recent than another version.
    • Constructor Detail

      • PayaraVersion

        public PayaraVersion​(String versionString)
    • Method Detail

      • buildVersionFromBrandingProperties

        public static PayaraVersion buildVersionFromBrandingProperties​(String major,
                                                                       String minor,
                                                                       String update,
                                                                       String payaraMinor,
                                                                       String payaraUpdate)
                                                                throws IllegalArgumentException
        This Method takes in properties from a glassfish-version.properties file and constructs a new PayaraVersion object from this data. It is assumed that there will always be a major and minor version but update, payaraMajor and payaraMinor may be null.
        Parameters:
        major - - Major version of the server
        minor - - Minor version of the server
        update - - Stability/Feature patch version of the server
        payaraMinor - - Minor version of Payara 4 versions
        payaraUpdate - - Stability/Feat patch version of Payara 4 versions
        Returns:
        Throws:
        IllegalArgumentException
      • isMoreRecentThan

        public boolean isMoreRecentThan​(String versionString)
      • isMoreRecentThan

        public boolean isMoreRecentThan​(PayaraVersion minimum)
        A Utility method used for comparing PayaraVersion objects When the parsed PayaraVersion is equal to the version it's being compared to, the method will return true
        Parameters:
        minimum - - the version you wish to compare to
        Returns:
        true if minimum is equal to or greater than the version to compare