Interface AutomationLicenseService
- All Known Implementing Classes:
JiraAutomationLicenseService
public interface AutomationLicenseService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetAppKey(TenantContext tenantContext) Returns the currently active application key for this tenant.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.longReturns the maximum number of allowed rule executions per month.longReturns the number of used rule executions this month.booleanisLite(TenantContext tenant) booleanisRuleLicensed(TenantContext tenant, com.codebarrel.automation.api.config.RuleConfigBean rule) If the rule is licensed to executevoidnotifyLicenseOrLimitExceeded(TenantContext context, Set<String> authorsToNotify) Sends e-mails to the users provided letting them know they have exceeded their license limit.
-
Field Details
-
SERVER_ADDON_KEY_LITE
- See Also:
-
ADDON_KEY_PRO
- See Also:
-
-
Method Details
-
getLicenseStatus
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 contextrule- 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
- Returns:
- true if this tenant currently is running the lite version of automation
-
getAppKey
Returns the currently active application key for this tenant.- Parameters:
tenantContext- The tenant- Returns:
- Either the LITE or PRO app key
-
getUsedMonthlyRuleExecutions
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
Returns the maximum number of allowed rule executions per month.- Returns:
- the maximum number of allowed rule executions per month.
-
notifyLicenseOrLimitExceeded
Sends e-mails to the users provided letting them know they have exceeded their license limit.- Parameters:
context- The tenant contextauthorsToNotify- Users to notify.
-