public class

LicensingSupport

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.licensing.LicensingSupport

Class Overview

This class serves as an entrypoint into the com.microstrategy.utils.licensing package. It exposes properties and methods related to the license associated with the installation on the local machine.

Summary

Public Methods
int getActivationGracePeriod()
This method is deprecated. Use getGracePeriodDays() instead. This method simply returns a hard-coded value.
String getActivationURL()
Returns the URL that will be used for activation.
static LicensingSupport getInstance()
Get an instance of this class.
ProductLicenseInfo getProductLicenseInfo(int product)
Returns a ProductLicenseInfo instance that contains cached license information for the specified product.
ProductLicenseInfo getProductLicenseInfo(int product, boolean refreshCache)
Returns a ProductLicenseInfo instance that contains license information for the specified product.
WebLicenseInfo getWebLicenseInfo(boolean refreshCache)
This method is deprecated. Use getProductLicenseInfo(int, boolean) instead.
WebLicenseInfo getWebLicenseInfo()
This method is deprecated. Use getProductLicenseInfo(int) instead.
boolean isRequiredSupportAvailable()
Tells the caller whether the support required for retrieving license information is available.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int getActivationGracePeriod ()

This method is deprecated.
Use getGracePeriodDays() instead. This method simply returns a hard-coded value.

Returns the grace period for a product that needs to be activated.

Returns
  • The grace period, in days, for a product that needs to be activated.

public String getActivationURL ()

Returns the URL that will be used for activation.

Returns
  • The URL that will be used for activation, or null if the URL cannot be obtained.

public static LicensingSupport getInstance ()

Get an instance of this class.

Returns

public ProductLicenseInfo getProductLicenseInfo (int product)

Returns a ProductLicenseInfo instance that contains cached license information for the specified product. This cache is refreshed every 24 hours by default.

Parameters
product The desired product, from EnumProducts.
Returns
  • A ProductLicenseInfo instance with information about the installation on the local machine.
Throws
LicensingException if the support required to retrieve license information is not available.

public ProductLicenseInfo getProductLicenseInfo (int product, boolean refreshCache)

Returns a ProductLicenseInfo instance that contains license information for the specified product. If refreshCache is true, the most recent information is returned; otherwise, cached information is returned. The cache is refreshed every 24 hours by default.

Parameters
product The desired product, from EnumProducts.
refreshCache Indicates whether to refresh the cache or return cached information.
Returns
  • A ProductLicenseInfo instance with information about the installation on the local machine.
Throws
LicensingException if the support required to retrieve license information is not available.

public WebLicenseInfo getWebLicenseInfo (boolean refreshCache)

This method is deprecated.
Use getProductLicenseInfo(int, boolean) instead.

Returns a WebLicenseInfo instance that contains license information pertaining to Web. If refreshCache is true, the most recent information is returned; otherwise, cached information is returned. The cache is refreshed every 24 hours by default.

Parameters
refreshCache Indicates whether to refresh the cache or return cached information.
Returns
  • A WebLicenseInfo instance corresponding to the Web installation on the local machine.
Throws
LicensingException if the support required to retrieve license information is not available.

public WebLicenseInfo getWebLicenseInfo ()

This method is deprecated.
Use getProductLicenseInfo(int) instead.

Returns a WebLicenseInfo instance that contains cached license information pertaining to Web. This cache is refreshed every 24 hours by default.

Returns
  • A WebLicenseInfo instance corresponding to the Web installation on the local machine.
Throws
LicensingException if the support required to retrieve license information is not available.

public boolean isRequiredSupportAvailable ()

Tells the caller whether the support required for retrieving license information is available. This method will return false if, for example, any native resources used for retrieving license information cannot be found on a supported platform, such as MicroStrategy ASPx Web on Windows. If this method returns false, it is an error condition (i.e. we should be able to retrieve license information but for some reason we cannot) and methods like getWebLicenseInfo will throw an exception.

Returns
  • true if the support required for retrieving license information is available; false otherwise.