Handling Product Versions
Product versioning empowers vendors to introduce fresh iterations of their licensed products, fostering increased customization.
This article serves to educate readers on a range of topics, including defining and retrieving application versions, implementing conditional update checks within maintenance windows, validating product versions during license checks, and other relevant insights.
- Completed the Getting Started tutorials, specifically:
- Initialized LicenseManager (or LicenseHandler) with your configuration using the appropriate settings.
- Activated a license.
Setting application version is completed within the Configuration constructor, as shown below:
The fifth parameter passed, appVersion, is where the version is set for the application.
From here, current app version can be accessed with:
To access a list of all available product versions, we can use getVersionList() from the LicenseManager object. Acquiring a vector of strings containing all versions is done with:
To confirm the latest product version during a license check, we'll construct an InstallationFile object and assign it the value obtained from license->check().
As license->check() furnishes the most recent InstallationFile associated with the license, we can subsequently access the version information by executing:
Developers can also retrieve the latest InstallationFile releases through the LicenseManager object through use of the licenseID as follows:
Note:
The C++ getInstallationFile() method has two additional, optional parameters. The second parameter is to declare a desired product version, if not provided then the last available version will be assumed. The third parameter is a InstallFileFilter object that can be used to filter install files by environment and channel.
The .NET SDK has one additional parameter, an InstallationFileOptions object that can be used to filter install files by channel or environment, as well as the needed version.
Exceptions called if an installation file is not found for requested app version:
C++: ProductVersionException
.NET: AppVersionNotFoundException
Java: LicenseSpringException
The InstallationFile class holds crucial information about a product's installation file.
It captures details about the product installer or setup file uploaded via the LicenseSpring platform or Management API, facilitating efficient product versioning and management.
Installation files can be used to regulate intermediate updates through accessing the required app version to complete the update
An intermediate update denotes an update that mandates a specific version of the predictor to be presently installed.
You can verify the necessary version by utilizing InstallationFile as follows: