Package tigase.licence

# Interface Licence

public interface Licence

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `APP_ID_KEY`
  `static final String`
  `BANNED_KEY`
  `static final String`
  `DISPLAY_LICENCE_NOTICE_KEY`
  `static final String`
  `MAX_CLUSTER_NODES_KEY`
  `static final String`
  `MAX_ONLINE_USERS_KEY`
  `static final String`
  `SENDING_STATISTICS_KEY`
  `static final String`
  `SIGNATURE_ALGO`
  `static final String`
  `VALID_SINCE_KEY`
  `static final String`
  `VALID_UNTIL_KEY`
  `static final String`
  `VHOST_NAME_KEY`
  `static final String`
  `VHOSTS_DIFF_RATIO_KEY`
  `static final String`
  `VHOSTS_KEY`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LicenceValidator.ValidationResult`
  `check()`
  `byte[]`
  `getBytes()`
  `String`
  `getLicenceDigest()`
  `Boolean`
  `getPropertyAsBoolean(String key)`
  Searches for the property with the specified key in licence and try to convert property to `Boolean`.
  `Calendar`
  `getPropertyAsCalendar(String key)`
  Searches for the property with the specified key in licence and try to convert property to `Calendar`.
  `Date`
  `getPropertyAsDate(String key)`
  Searches for the property with the specified key in licence and try to convert property to `Integer`.
  `Double`
  `getPropertyAsDouble(String key)`
  Searches for the property with the specified key in licence and try to convert property to `Double`.
  `Integer`
  `getPropertyAsInteger(String key)`
  Searches for the property with the specified key in licence and try to convert property to `Integer`.
  `String`
  `getPropertyAsString(String key)`
  Searches for the property with the specified key in licence.

- ## Field Details

  - ### APP_ID_KEY

    static final String APP_ID_KEY
    See Also:
      - Constant Field Values

  - ### BANNED_KEY

    static final String BANNED_KEY
    See Also:
      - Constant Field Values

  - ### DISPLAY_LICENCE_NOTICE_KEY

    static final String DISPLAY_LICENCE_NOTICE_KEY
    See Also:
      - Constant Field Values

  - ### SENDING_STATISTICS_KEY

    static final String SENDING_STATISTICS_KEY
    See Also:
      - Constant Field Values

  - ### MAX_ONLINE_USERS_KEY

    static final String MAX_ONLINE_USERS_KEY
    See Also:
      - Constant Field Values

  - ### MAX_CLUSTER_NODES_KEY

    static final String MAX_CLUSTER_NODES_KEY
    See Also:
      - Constant Field Values

  - ### SIGNATURE_ALGO

    static final String SIGNATURE_ALGO
    See Also:
      - Constant Field Values

  - ### VALID_SINCE_KEY

    static final String VALID_SINCE_KEY
    See Also:
      - Constant Field Values

  - ### VALID_UNTIL_KEY

    static final String VALID_UNTIL_KEY
    See Also:
      - Constant Field Values

  - ### VHOST_NAME_KEY

    static final String VHOST_NAME_KEY
    See Also:
      - Constant Field Values

  - ### VHOSTS_KEY

    static final String VHOSTS_KEY
    See Also:
      - Constant Field Values

  - ### VHOSTS_DIFF_RATIO_KEY

    static final String VHOSTS_DIFF_RATIO_KEY
    See Also:
      - Constant Field Values

- ## Method Details

  - ### check

    LicenceValidator.ValidationResult check() throws InvalidKeyException, NoSuchAlgorithmException, SignatureException, ParseException
    Throws:
      `InvalidKeyException`
      `NoSuchAlgorithmException`
      `SignatureException`
      `ParseException`

  - ### getBytes

    byte[] getBytes()

  - ### getLicenceDigest

    String getLicenceDigest()

  - ### getPropertyAsBoolean

    Boolean getPropertyAsBoolean(String key)
    Searches for the property with the specified key in licence and try to convert property to `Boolean`. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.

  - ### getPropertyAsCalendar

    Calendar getPropertyAsCalendar(String key) throws ParseException
    Searches for the property with the specified key in licence and try to convert property to `Calendar`. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.
    Throws:
      `ParseException` - if the specified properties cannot be parsed.

  - ### getPropertyAsDate

    Date getPropertyAsDate(String key) throws ParseException
    Searches for the property with the specified key in licence and try to convert property to `Integer`. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.
    Throws:
      `ParseException` - if the specified properties cannot be parsed.

  - ### getPropertyAsDouble

    Double getPropertyAsDouble(String key)
    Searches for the property with the specified key in licence and try to convert property to `Double`. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.

  - ### getPropertyAsInteger

    Integer getPropertyAsInteger(String key)
    Searches for the property with the specified key in licence and try to convert property to `Integer`. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.

  - ### getPropertyAsString

    String getPropertyAsString(String key)
    Searches for the property with the specified key in licence. The method returns `null` if the property is not found.
    Parameters:
      `key` - the property key.
    Returns:
      the value in this licence with the specified key value.