Class LicensingSupport
- java.lang.Object
 - 
- com.microstrategy.utils.licensing.LicensingSupport
 
 
- 
public class LicensingSupport extends java.lang.ObjectThis class serves as an entrypoint into thecom.microstrategy.utils.licensingpackage. It exposes properties and methods related to the license associated with the installation on the local machine.- Since:
 - MicroStrategy Web 8.0.1
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetActivationGracePeriod()Deprecated.UseProductLicenseInfo.getGracePeriodDays()instead.java.lang.StringgetActivationURL()Returns the URL that will be used for activation.static LicensingSupportgetInstance()Get an instance of this class.ProductLicenseInfogetProductLicenseInfo(int product)Returns aProductLicenseInfoinstance that contains cached license information for the specified product.ProductLicenseInfogetProductLicenseInfo(int product, boolean refreshCache)Returns aProductLicenseInfoinstance that contains license information for the specified product.WebLicenseInfogetWebLicenseInfo()Deprecated.UsegetProductLicenseInfo(int)instead.WebLicenseInfogetWebLicenseInfo(boolean refreshCache)Deprecated.UsegetProductLicenseInfo(int, boolean)instead.booleanisRequiredSupportAvailable()Tells the caller whether the support required for retrieving license information is available. 
 - 
 
- 
- 
Method Detail
- 
getInstance
public static LicensingSupport getInstance()
Get an instance of this class.- Returns:
 - A 
LicensingSupportinstance. 
 
- 
isRequiredSupportAvailable
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 likegetWebLicenseInfowill throw an exception.- Returns:
 - true if the support required for retrieving license information is available; false otherwise.
 
 
- 
getWebLicenseInfo
public WebLicenseInfo getWebLicenseInfo() throws LicensingException
Deprecated.UsegetProductLicenseInfo(int)instead.Returns aWebLicenseInfoinstance that contains cached license information pertaining to Web. This cache is refreshed every 24 hours by default.- Returns:
 - A 
WebLicenseInfoinstance corresponding to the Web installation on the local machine. - Throws:
 LicensingException- if the support required to retrieve license information is not available.
 
- 
getWebLicenseInfo
public WebLicenseInfo getWebLicenseInfo(boolean refreshCache) throws LicensingException
Deprecated.UsegetProductLicenseInfo(int, boolean)instead.Returns aWebLicenseInfoinstance that contains license information pertaining to Web. IfrefreshCacheis 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 
WebLicenseInfoinstance corresponding to the Web installation on the local machine. - Throws:
 LicensingException- if the support required to retrieve license information is not available.
 
- 
getProductLicenseInfo
public ProductLicenseInfo getProductLicenseInfo(int product) throws LicensingException
Returns aProductLicenseInfoinstance that contains cached license information for the specified product. This cache is refreshed every 24 hours by default.- Parameters:
 product- The desired product, fromEnumProducts.- Returns:
 - A 
ProductLicenseInfoinstance with information about the installation on the local machine. - Throws:
 LicensingException- if the support required to retrieve license information is not available.- Since:
 - MicroStrategy Web 8.1.1
 
 
- 
getProductLicenseInfo
public ProductLicenseInfo getProductLicenseInfo(int product, boolean refreshCache) throws LicensingException
Returns aProductLicenseInfoinstance that contains license information for the specified product. IfrefreshCacheis 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, fromEnumProducts.refreshCache- Indicates whether to refresh the cache or return cached information.- Returns:
 - A 
ProductLicenseInfoinstance with information about the installation on the local machine. - Throws:
 LicensingException- if the support required to retrieve license information is not available.- Since:
 - MicroStrategy Web 8.1.1
 
 
- 
getActivationURL
public java.lang.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.
 
 
- 
getActivationGracePeriod
public int getActivationGracePeriod()
Deprecated.UseProductLicenseInfo.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.
 
 
 - 
 
 -