public interface

WebLicenseInfo

com.microstrategy.utils.licensing.WebLicenseInfo

This interface is deprecated.
Use ProductLicenseInfo instead.

Class Overview

NOTE: THIS INTERFACE IS FOR INTERNAL USE ONLY AND SHOULD NOT BE USED IN CUSTOMIZATIONS. This interface provides MicroStrategy Web-related license information for the installation on the local machine. It can be used to determine a license status message to show the user. The logic for this is as follows:

 if (isWebLicensed()) {
     // at least one Web component (Web Reporter, Analyst, etc.) is licensed
     if (isWebEnabled() {
         // the Web license is not expired, so Web is allowed to run
         if (showExpirationWarning(isAdminUser) {
             // the Web license is due to expire and a warning should be shown
         } else {
             // the Web license is fully active or no warning needs to be
             // shown at this time
         }
     } else {
         // the Web license has expired, so Web should not be allowed to run
     }
 } else {
     // no Web components (Web Reporter, Analyst, etc.) are licensed
 }
 

Summary

Public Methods
abstract int getDaysLeft()
In the case where the license is due to expire or has expired, returns the number of days left until the license expires (0 if the license has already expired).
abstract int getGracePeriodDays()
In the case that the license is due to expire or has expired, returns the total number of days in the grace period.
abstract boolean isEvaluation()
Returns whether the current status of the license is related to time- bound license expiration.
abstract boolean isWebEnabled()
Returns whether Web is allowed to run (i.e.
abstract boolean isWebLicensed()
Returns whether a valid Web license exists for this server--i.e.
abstract boolean showExpirationWarning(boolean forAdminUser)
In the case where the Web license is due to expire, or has already expired, this method returns whether an expiration-related warning needs to be shown to the user.

Public Methods

public abstract int getDaysLeft ()

In the case where the license is due to expire or has expired, returns the number of days left until the license expires (0 if the license has already expired). Returns -1 if this is not applicable (i.e. the installation is fully active or not licensed).

Returns
  • The number of remaining days until the license expires, or 0 if the license has expired, or –1 if this is not applicable.
Throws
LicensingException If an error occurred while retrieving license information.

public abstract int getGracePeriodDays ()

In the case that the license is due to expire or has expired, returns the total number of days in the grace period. Returns -1 if this is not applicable (i.e. the installation is fully active or not licensed).

Returns
  • The total number of days in the grace period, or -1 if this is not applicable.
Throws
LicensingException If an error occurred while retrieving license information.

public abstract boolean isEvaluation ()

Returns whether the current status of the license is related to time- bound license expiration. This method is only relevant when isWebLicensed() returns true.

Returns
  • true if the current status of the license is related to time- bound license expiration; false othwerwise.
Throws
LicensingException If an error occurred while retrieving license information.

public abstract boolean isWebEnabled ()

Returns whether Web is allowed to run (i.e. at least one Web component is fully active or not expired). If isWebLicensed() returns true, but this method returns false, the caller can assume that the license to run Web has expired.

Returns
  • true if Web is allowed run; false otherwise.
Throws
LicensingException If an error occurred while retrieving license information.

public abstract boolean isWebLicensed ()

Returns whether a valid Web license exists for this server--i.e. at least one Web component (Web Reporter, Web Analyst, etc.) has been installed using a valid license key. This method does not indicate whether Web can actually run (the license may be expired, for example); use isWebEnabled for this.

Returns
  • true if a valid Web license exists for this server; false otherwise.
Throws
LicensingException If an error occurred while retrieving license information.

public abstract boolean showExpirationWarning (boolean forAdminUser)

In the case where the Web license is due to expire, or has already expired, this method returns whether an expiration-related warning needs to be shown to the user. This method is only relevant when isWebLicensed() returns true.

Parameters
forAdminUser Indicates whether the user to whom we might show a warning is an administrator.
Returns
  • true if an expiration-related warning needs to be shown to the user; false otherwise.
Throws
LicensingException If an error occurred while retrieving license information.