public class

SubscriptionLicenseDetails

extends DefaultLicenseDetails
java.lang.Object
   ↳ com.atlassian.jira.license.DefaultLicenseDetails
     ↳ com.atlassian.jira.license.SubscriptionLicenseDetails

Class Overview

Subclass of DefaultLicenseDetails for implementing enterprise license-specific behaviour. There are currently 2 kinds of enterprise license: DataCenter (which enables clustering) and ELA (Enterprise License Agreement, which allows use of all Atlassian products). Both of these are issued on a subscription basis, and behave differently on expiry.

As the name suggests, licenses represented by this class have a finite expiry date, representing the end of the current subscription period.

See Also

Summary

Public Constructors
SubscriptionLicenseDetails(JiraProductLicense license, String licenseString, ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18nFactory, DateTimeFormatter dateTimeFormatter, Clock clock)
Public Methods
String getLicenseExpiryStatusMessage(I18nHelper i18n, OutlookDate date)
Returns a duration-based brief expiry message of form "Expires in XX months, YY days".
LicenseDetails.LicenseStatusMessage getLicenseStatusMessage(I18nHelper i18n, UserManager ignored)
Returns an expiry status message; see also getLicenseExpiryStatusMessage(I18nHelper, OutlookDate).
LicenseDetails.LicenseStatusMessage getMaintenanceMessage(I18nHelper i18n, String applicationName)
Get the maintenance message for this license, this does not evaluate the maintenance date, it only provides the message that should be displayed when license out of maintenance for a given JIRA Application.
boolean isExpired()
Checks whether the license is either expired for Evaluation or Extended Licenses (New Build, Old License).

This is logically similar to DefaultLicenseDetails, but these kinds of licenses do not have to worry about legacy version 1 licenses so this logic is simpler.

boolean isLicenseAlmostExpired()
If the license is Evaluation or Extended (New Build, Old License), returns true if we are within 7 days of the expiry date.
[Expand]
Inherited Methods
From class com.atlassian.jira.license.DefaultLicenseDetails
From class java.lang.Object
From interface com.atlassian.jira.license.LicenseDetails

Public Constructors

public SubscriptionLicenseDetails (JiraProductLicense license, String licenseString, ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18nFactory, DateTimeFormatter dateTimeFormatter, Clock clock)

Throws
IllegalArgumentException if getExpiryDate() is null (ie: a perpetual license).

Public Methods

public String getLicenseExpiryStatusMessage (I18nHelper i18n, OutlookDate date)

Returns a duration-based brief expiry message of form "Expires in XX months, YY days".

Parameters
i18n i18n bean
date ignored
Returns
  • the status message, null for normal license outside of support period

public LicenseDetails.LicenseStatusMessage getLicenseStatusMessage (I18nHelper i18n, UserManager ignored)

Returns an expiry status message; see also getLicenseExpiryStatusMessage(I18nHelper, OutlookDate).

Parameters
i18n i18n bean
ignored used to get user context if necessary
Returns
  • An expiry status message.

public LicenseDetails.LicenseStatusMessage getMaintenanceMessage (I18nHelper i18n, String applicationName)

Get the maintenance message for this license, this does not evaluate the maintenance date, it only provides the message that should be displayed when license out of maintenance for a given JIRA Application. For subscription license no message would be returned hasAnyMessages() would return false.

Parameters
i18n i18n helper
applicationName JIRA Application name (trademark for display)
Returns
  • the status message, subscription license would return no messages.

public boolean isExpired ()

Checks whether the license is either expired for Evaluation or Extended Licenses (New Build, Old License).

This is logically similar to DefaultLicenseDetails, but these kinds of licenses do not have to worry about legacy version 1 licenses so this logic is simpler.

Returns
  • true if has; false otherwise.

public boolean isLicenseAlmostExpired ()

If the license is Evaluation or Extended (New Build, Old License), returns true if we are within 7 days of the expiry date.

Returns
  • true if the license is close to expiry; false otherwise.