Package com.seeq.utilities.process
Class RuntimeVersion
java.lang.Object
com.seeq.utilities.process.RuntimeVersion
This class is used for the discovery of the presently running software's version and buildTime. It leverages the
existing Manifest file or the existing Properties file (specified in the constructor).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead the Manifest file or Properties file and extract the version build time information.Get a reference to the Manifest file.Read the Manifest file or Properties file and extract the version information.Read the Manifest file or Properties file and extract the version information.
-
Constructor Details
-
RuntimeVersion
Constructor.- Parameters:
callingClass
- The calling class.
-
-
Method Details
-
getVersion
Read the Manifest file or Properties file and extract the version information. The logic behind this method is to use the Build Properties file in the supervisor directory to pull the Seeq non-marketing version number. If the file isn't available, then this will throw anIllegalStateException
.- Returns:
- Version of the running application.
-
getMarketingVersion
Read the Manifest file or Properties file and extract the version information. The logic behind this method is to use the Build Properties file in the supervisor directory to pull the Seeq marketing version number. If the file isn't available, then this will throw anIllegalStateException
.- Returns:
- Marketing version of the running application.
-
getBuildTime
Read the Manifest file or Properties file and extract the version build time information. The logic behind this method is that if the Manifest file is not available (probably because we are running from within an IDE), then attempt to get it from the Properties file. If that is not available, then this will throw anIllegalStateException
.- Returns:
- Version build time of the running application.
-
getCommit
-
getManifest
Get a reference to the Manifest file.- Returns:
- A
Manifest
instance of the Manifest file. - Throws:
IOException
- If the manifest information isn't found
-