Class LicensingSupport


  • public class LicensingSupport
    extends java.lang.Object
    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.
    Since:
    MicroStrategy Web 8.0.1
    • Method Detail

      • 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 like getWebLicenseInfo will throw an exception.
        Returns:
        true if the support required for retrieving license information is available; false otherwise.
      • getWebLicenseInfo

        public WebLicenseInfo getWebLicenseInfo​(boolean refreshCache)
                                         throws LicensingException
        Deprecated.
        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.
      • getProductLicenseInfo

        public ProductLicenseInfo getProductLicenseInfo​(int product)
                                                 throws LicensingException
        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.
        Since:
        MicroStrategy Web 8.1.1
      • getProductLicenseInfo

        public ProductLicenseInfo getProductLicenseInfo​(int product,
                                                        boolean refreshCache)
                                                 throws LicensingException
        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.
        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.
        Use ProductLicenseInfo.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.