Interface AutomationLicenseService

All Known Implementing Classes:
JiraAutomationLicenseService

public interface AutomationLicenseService
  • Field Details

  • Method Details

    • getLicenseStatus

      LicenseStatus getLicenseStatus(TenantContext tenant)
      If this tenant is running automation lite, this method will check if we are currently below the monthly limit of rule executions.

      Otherwise it performs a license check to ensure this tenant's license is active.

      Parameters:
      tenant - The tenant context
      Returns:
      true only if this tenant is licensed, or below the usage limit allowed for the lite version
    • isRuleLicensed

      boolean isRuleLicensed(TenantContext tenant, com.codebarrel.automation.api.config.RuleConfigBean rule)
      If the rule is licensed to execute
      Parameters:
      tenant - The tenant context
      rule - The rule configuration
      Returns:
      false if the rule contains "pro only components" and the user has downgraded from pro to lite, or has an expired "in-product" pro trial (Server Only).
    • isLite

      boolean isLite(TenantContext tenant)
      Returns:
      true if this tenant currently is running the lite version of automation
    • getAppKey

      String getAppKey(TenantContext tenantContext)
      Returns the currently active application key for this tenant.
      Parameters:
      tenantContext - The tenant
      Returns:
      Either the LITE or PRO app key
    • getUsedMonthlyRuleExecutions

      long getUsedMonthlyRuleExecutions(TenantContext tenant)
      Returns the number of used rule executions this month. Does not check if this is the lite version.
      Returns:
      total number of rule exectuions this month.
    • getMaxMonthlyRuleExecutions

      long getMaxMonthlyRuleExecutions(TenantContext tenant)
      Returns the maximum number of allowed rule executions per month.
      Returns:
      the maximum number of allowed rule executions per month.
    • notifyLicenseOrLimitExceeded

      void notifyLicenseOrLimitExceeded(TenantContext context, Set<String> authorsToNotify)
      Sends e-mails to the users provided letting them know they have exceeded their license limit.
      Parameters:
      context - The tenant context
      authorsToNotify - Users to notify.