Class LicensingSupport
- java.lang.Object
-
- com.microstrategy.utils.licensing.LicensingSupport
-
public class LicensingSupport extends java.lang.Object
This class serves as an entrypoint into thecom.microstrategy.utils.licensing
package. 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 int
getActivationGracePeriod()
Deprecated.UseProductLicenseInfo.getGracePeriodDays()
instead.java.lang.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 aProductLicenseInfo
instance that contains cached license information for the specified product.ProductLicenseInfo
getProductLicenseInfo(int product, boolean refreshCache)
Returns aProductLicenseInfo
instance that contains license information for the specified product.WebLicenseInfo
getWebLicenseInfo()
Deprecated.UsegetProductLicenseInfo(int)
instead.WebLicenseInfo
getWebLicenseInfo(boolean refreshCache)
Deprecated.UsegetProductLicenseInfo(int, boolean)
instead.boolean
isRequiredSupportAvailable()
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
LicensingSupport
instance.
-
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 likegetWebLicenseInfo
will throw an exception.- Returns:
- true if the support required for retrieving license information is available; false otherwise.
-
getWebLicenseInfo
@Deprecated public WebLicenseInfo getWebLicenseInfo() throws LicensingException
Deprecated.UsegetProductLicenseInfo(int)
instead.Returns aWebLicenseInfo
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.
-
getWebLicenseInfo
@Deprecated public WebLicenseInfo getWebLicenseInfo(boolean refreshCache) throws LicensingException
Deprecated.UsegetProductLicenseInfo(int, boolean)
instead.Returns aWebLicenseInfo
instance that contains license information pertaining to Web. IfrefreshCache
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.
-
getProductLicenseInfo
public ProductLicenseInfo getProductLicenseInfo(int product) throws LicensingException
Returns aProductLicenseInfo
instance 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
ProductLicenseInfo
instance 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 aProductLicenseInfo
instance that contains license information for the specified product. IfrefreshCache
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, fromEnumProducts
.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.- 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
@Deprecated 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.
-
-