Class ProductInfo


  • public class ProductInfo
    extends java.lang.Object
    Information about this release of the JT Harness test harness.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProductInfo()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Date getBuildDate()
      The date this product was built.
      static java.lang.String getBuildJavaVersion()
      The version of Java used to build this product.
      static java.lang.String getBuildNumber()
      The build number for this product.
      static java.lang.String getDetailedVersion()
      Returns detailed version string of this product.
      static java.lang.String getHarnessVariety()
      What sort of subset (if any) of the full harness is this.
      static java.io.File getJavaTestClassDir()
      Get the entry on the class path which contains the JT Harness harness.
      static java.lang.String getMilestone()
      The milestone of this product.
      static java.lang.String getName()
      The name of this product.
      static java.lang.String getPackagingType()
      Determine the type of package the harness was loaded from.
      static java.lang.String getSourceCommitID()
      Source repository commit ID that is used for building this product.
      static java.lang.String getVersion()
      The version of this product.
      static boolean isSameVersionOrNewer​(java.lang.String ver)
      Checks if the version of this product returned by getVersion() method is not older than passed one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProductInfo

        public ProductInfo()
    • Method Detail

      • getName

        public static java.lang.String getName()
        The name of this product.
        Returns:
        a string identifying the name of this product.
      • getVersion

        public static java.lang.String getVersion()
        The version of this product.
        Returns:
        a string identifying the version of this product.
      • getDetailedVersion

        public static java.lang.String getDetailedVersion()
        Returns detailed version string of this product. Format of the returned string is the following: $VNUM-$MLSTN+$BUILDNUM(-$BLDDATE)?-$COMMIT where $VNUM value is provided by ProductInfo.getVersion(), $MLSTN value is provided by ProductInfo.getMilestone(), $BLDNUM value is provided by ProductInfo.getBuildNumber(). $BLDDATE is optional and is provided by ProductInfo.getBuildDate() in 'yyyy-MM-dd' format if returned date is not null. $COMMIT value is provided by ProductInfo.getSourceCommitID().
        Returns:
        a string identifying detailed version of this product including milestone, build number and (optionally) product build date.
      • isSameVersionOrNewer

        public static boolean isSameVersionOrNewer​(java.lang.String ver)
        Checks if the version of this product returned by getVersion() method is not older than passed one.
        Parameters:
        ver - version to be compared with the current product version
        Returns:
        true, if ver is exactly the same or newer than product version
        Throws:
        java.lang.IllegalArgumentException - if version cannot be parsed
      • getMilestone

        public static java.lang.String getMilestone()
        The milestone of this product.
        Returns:
        a string identifying the milestone of this product.
      • getBuildNumber

        public static java.lang.String getBuildNumber()
        The build number for this product.
        Returns:
        a string identifying the build number of this product.
      • getSourceCommitID

        public static java.lang.String getSourceCommitID()
        Source repository commit ID that is used for building this product.
        Returns:
        a string identifying source repository commit ID.
      • getBuildJavaVersion

        public static java.lang.String getBuildJavaVersion()
        The version of Java used to build this product.
        Returns:
        a string identifying a version of Java used to build this product.
      • getBuildDate

        public static java.util.Date getBuildDate()
        The date this product was built.
        Returns:
        A string identifying the date on which this product was built. Null will be returned if no build data is available.
      • getJavaTestClassDir

        public static java.io.File getJavaTestClassDir()
        Get the entry on the class path which contains the JT Harness harness. This may be a classes directory or javatest.jar.
        Returns:
        the entry on the class path which contains the JT Harness harness.
      • getPackagingType

        public static java.lang.String getPackagingType()
        Determine the type of package the harness was loaded from. This value is for informational purposes only, the possible values isn't defined.
        Returns:
        Empty string if the information isn't available.
      • getHarnessVariety

        public static java.lang.String getHarnessVariety()
        What sort of subset (if any) of the full harness is this.
        Returns:
        A short descriptor describing this variety of the harness, empty string if unset, never returns null.