com.dlsc.flexgantt.util

## Class FlexGanttLicenseManager

- java.lang.Object
- - com.dlsc.flexgantt.util.FlexGanttLicenseManager

-     public final class FlexGanttLicenseManager
      extends Object

  Handles anything related to licensing. The license key needs to be set by calling `setLicenseKey(String)`. If no license key has been set then FlexGantt will enter trial / evaluation mode.
  Since:
    1.1
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FEATURE_LICENSEE` Represents the "Licensee" feature.
    `static String` | `FEATURE_RUNTIME` Represents the "Runtime" feature.
    `static String` | `FEATURE_VENDOR` Represents the "Vendor" feature.
    `static String` | `FEATURE_VERSION` Represents the "Version" feature.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getLicensee()` Returns the name of the licensee.
    `static String` | `getPublicKey()` Returns the public key used for decoding the license key.
    `static String` | `getVendor()` Returns the name of the vendor (e.g.
    `static String` | `getVersion()` Returns the product version (e.g. "1", "1", ...).
    `static boolean` | `isDevelopmentLicense()` Determines if the product uses a development license.
    `static boolean` | `isRuntimeLicense()` Determines if the product uses a runtime license.
    `static boolean` | `isTrialLicense()` Determines if the product is run as a trial.
    `static void` | `setLicenseKey(String key)` Sets the license key used for FlexGantt.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FEATURE_LICENSEE

          public static final String FEATURE_LICENSEE

      Represents the "Licensee" feature.
      Since:
        1.1
      See Also:
        Constant Field Values

    - #### FEATURE_VENDOR

          public static final String FEATURE_VENDOR

      Represents the "Vendor" feature.
      Since:
        1.1
      See Also:
        Constant Field Values

    - #### FEATURE_RUNTIME

          public static final String FEATURE_RUNTIME

      Represents the "Runtime" feature.
      Since:
        1.1
      See Also:
        Constant Field Values

    - #### FEATURE_VERSION

          public static final String FEATURE_VERSION

      Represents the "Version" feature.
      Since:
        1.1
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setLicenseKey

          public static void setLicenseKey(String key)

      Sets the license key used for FlexGantt. The key determines whether the product uses a development or a runtime license.
      Parameters:
        `key` - the license key
      Throws:
        `IllegalStateException` - if the license key gets set more than once
      Since:
        1.1

    - #### isTrialLicense

          public static boolean isTrialLicense()

      Determines if the product is run as a trial.
      Returns:
        TRUE if the product is run as a trial
      Since:
        1.1

    - #### isRuntimeLicense

          public static boolean isRuntimeLicense()

      Determines if the product uses a runtime license.
      Returns:
        TRUE if the product uses a runtime license
      Since:
        1.1

    - #### isDevelopmentLicense

          public static boolean isDevelopmentLicense()

      Determines if the product uses a development license.
      Returns:
        TRUE if the product uses a development license
      Since:
        1.1

    - #### getPublicKey

          public static String getPublicKey()

      Returns the public key used for decoding the license key.
      Returns:
        the public key used for decoding the license key
      Since:
        1.0

    - #### getLicensee

          public static String getLicensee()

      Returns the name of the licensee.
      Returns:
        the licensee's name
      Since:
        1.1

    - #### getVendor

          public static String getVendor()

      Returns the name of the vendor (e.g. ComponentSource, DLSC, Evget, ...).
      Returns:
        the vendor's name
      Since:
        1.1

    - #### getVersion

          public static String getVersion()

      Returns the product version (e.g. "1", "1", ...). This number is the version number used for licensing issues only. It represents the major version number. A more detailed version number can be looked up by calling `Version.getVersion()`.
      Returns:
        the product version
      Since:
        1.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.