OnlineLicenseManager

The Online license manager is a class on the Product licensing repository that serves as a communication point between the Licensing API and the license manager.

Responsabilities

The main responsability from the Online license manager class is the license validation for:

  • Expiration date.

  • Invalid period.

  • Usage of license on an older date.

  • Accumulated units according to a code descriptor unit value.

  • Execution mode according toa requested execution mode.

  • Fingerprint validation (under construction).

Basic structure

In order to avoid the code repetition on classes like "LicenseManagerValidator" and "OnlineLicenseManager", a new class called "LicenseManagerBasicDataValidator" has been generated to contains the basics validations executed by both classes, these validations are:

  • Dates validation.

  • Units validation.

  • Execution mode validation.

  • Fingerprint validation.

Both classes inherit from this new class in order to allow the validation methods execution, also the validation methods have been configured as virtual, so the classes can overwrite his implementation when it's needed. So, the diagram for this implementation is as follows:

The OnlineLicenseManager implements the ILicenseManagerValidator interface directly, so the methods CheckExecutionRestrictions and CheckActivationRestrictions are available to use. The public method TryValidateActiveLicense returns a bool that indicates if the given license is valid or not, if the method returns false, an error message will be included on the iError output parameter.

Last updated