com.license4j

## Class LicenseKey

- java.lang.Object
- - com.license4j.LicenseKey

-     public class LicenseKey
      extends java.lang.Object

  License Key class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LicenseKey()` Constructor, creates an empty license key object.
    `LicenseKey(java.lang.String key)` Constructor, creates license key object from a license key.
    `LicenseKey(java.lang.String internalString, java.lang.String nameforValidation, java.lang.String companyforValidation, java.lang.String hardwareID)` Constructor, creates license key object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getActivationPeriod()` Returns defined activation period.
    `java.lang.String` | `getCompanyforValidation()` Returns company name used in validation.
    `java.util.Date` | `getGenerationDateTime()` Returns license generation date.
    `java.lang.String` | `getHardwareID()` Returns hardware id for the license key.
    `java.lang.String` | `getHardwareIDValidationMethod()` Returns hardware ID validation method.
    `java.lang.String` | `getInternalString()` Returns hidden internal string.
    `int` | `getLicenseActivationDaysRemaining(java.util.Date currentDate)` Returns remaining activation days if license requires activation.
    `java.lang.String` | `getNameforValidation()` Returns name used in key validation.
    `java.lang.String` | `getTheKey()` Returns license key.
    `boolean` | `isActivationCompleted()` Return boolean value, activation completed or not.
    `boolean` | `isActivationRequired()` Returns activation required boolean.
    `void` | `setActivationCompleted(boolean activationCompleted)` Sets activation required value.
    `void` | `setActivationPeriod(int activationPeriod)` Sets activation period.
    `void` | `setActivationRequired(boolean activationRequired)` Sets activation required boolean value.
    `void` | `setCompanyforValidation(java.lang.String companyforValidation)` Sets company name.
    `void` | `setGenerationDateTime(java.util.Date value)` Sets license generation date.
    `void` | `setHardwareID(java.lang.String hardwareID)` Sets hardware id.
    `void` | `setHardwareIDValidationMethod(java.lang.String hardwareIDValidationMethod)` Sets hardware ID validation method.
    `void` | `setInternalString(java.lang.String internalString)` Sets hidden internal string.
    `void` | `setNameforValidation(java.lang.String nameforValidation)` Sets name to be used in validation.
    `void` | `setTheKey(java.lang.String theKey)` Sets the key.

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

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

- - ### Constructor Detail

    - #### LicenseKey

          public LicenseKey(java.lang.String key)

      Constructor, creates license key object from a license key.
      Parameters:
        `key` -

    - #### LicenseKey

          public LicenseKey()

      Constructor, creates an empty license key object.

    - #### LicenseKey

          public LicenseKey(java.lang.String internalString,
                    java.lang.String nameforValidation,
                    java.lang.String companyforValidation,
                    java.lang.String hardwareID)

      Constructor, creates license key object.
      Parameters:
        `internalString` -
        `nameforValidation` -
        `companyforValidation` -
        `hardwareID` -

  - ### Method Detail

    - #### getInternalString

          public java.lang.String getInternalString()

      Returns hidden internal string.
      Returns:
        key internal hidden string

    - #### setInternalString

          public void setInternalString(java.lang.String internalString)

      Sets hidden internal string.
      Parameters:
        `internalString` -

    - #### getNameforValidation

          public java.lang.String getNameforValidation()

      Returns name used in key validation.
      Returns:
        name

    - #### setNameforValidation

          public void setNameforValidation(java.lang.String nameforValidation)

      Sets name to be used in validation.
      Parameters:
        `nameforValidation` -

    - #### getCompanyforValidation

          public java.lang.String getCompanyforValidation()

      Returns company name used in validation.
      Returns:
        company name

    - #### setCompanyforValidation

          public void setCompanyforValidation(java.lang.String companyforValidation)

      Sets company name.
      Parameters:
        `companyforValidation` -

    - #### getHardwareID

          public java.lang.String getHardwareID()

      Returns hardware id for the license key.
      Returns:
        hardware id

    - #### setHardwareID

          public void setHardwareID(java.lang.String hardwareID)

      Sets hardware id.
      Parameters:
        `hardwareID` -

    - #### getTheKey

          public java.lang.String getTheKey()

      Returns license key.
      Returns:
        key

    - #### setTheKey

          public void setTheKey(java.lang.String theKey)

      Sets the key.
      Parameters:
        `theKey` -

    - #### isActivationRequired

          public boolean isActivationRequired()

      Returns activation required boolean.
      Returns:
        boolean of activation required

    - #### setActivationRequired

          public void setActivationRequired(boolean activationRequired)

      Sets activation required boolean value.
      Parameters:
        `activationRequired` -

    - #### isActivationCompleted

          public boolean isActivationCompleted()

      Return boolean value, activation completed or not.
      Returns:
        boolean activation completed

    - #### setActivationCompleted

          public void setActivationCompleted(boolean activationCompleted)

      Sets activation required value.
      Parameters:
        `activationCompleted` -

    - #### getActivationPeriod

          public int getActivationPeriod()

      Returns defined activation period.
      Returns:
        activation period

    - #### setActivationPeriod

          public void setActivationPeriod(int activationPeriod)

      Sets activation period.
      Parameters:
        `activationPeriod` -

    - #### getGenerationDateTime

          public java.util.Date getGenerationDateTime()

      Returns license generation date.
      Returns:
        date

    - #### setGenerationDateTime

          public void setGenerationDateTime(java.util.Date value)

      Sets license generation date.
      Parameters:
        `value` -

    - #### getHardwareIDValidationMethod

          public java.lang.String getHardwareIDValidationMethod()

      Returns hardware ID validation method.
      Returns:
        hardwareIDValidationMethod

    - #### setHardwareIDValidationMethod

          public void setHardwareIDValidationMethod(java.lang.String hardwareIDValidationMethod)

      Sets hardware ID validation method.
      Parameters:
        `hardwareIDValidationMethod` -

    - #### getLicenseActivationDaysRemaining

          public int getLicenseActivationDaysRemaining(java.util.Date currentDate)

      Returns remaining activation days if license requires activation.
      Parameters:
        `currentDate` -
      Returns:
        days for activation