public class SubscriptionLicenseDetails extends DefaultLicenseDetails
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.
JiraLicenseManager.getLicenses()DefaultLicenseDetails.LinkLicenseDetails.LicenseContact, LicenseDetails.LicenseStatusMessage| Constructor and Description |
|---|
SubscriptionLicenseDetails(JiraProductLicense license,
String licenseString,
ApplicationProperties applicationProperties,
ExternalLinkUtil externalLinkUtil,
BuildUtilsInfo buildUtilsInfo,
I18nHelper.BeanFactory i18nFactory,
DateTimeFormatter dateTimeFormatter,
com.atlassian.core.util.Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
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).
|
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.
|
equals, getApplicationDescription, getBriefMaintenanceStatusMessage, getContacts, getDaysToLicenseExpiry, getDaysToMaintenanceExpiry, getDescription, getJiraLicense, getLicensedApplications, getLicenseExpiryStatusMessage, getLicenseStatusMessage, getLicenseStatusMessage, getLicenseString, getLicenseType, getLicenseVersion, getMaintenanceEndString, getMaintenanceExpiryDate, getOrganisation, getPartnerName, getPurchaseDate, getPurchaseDate, getSupportEntitlementNumber, hasApplication, hashCode, isCommercial, isCommunity, isDataCenter, isDemonstration, isDeveloper, isEnterpriseLicenseAgreement, isEntitledToSupport, isEvaluation, isMaintenanceValidForBuildDate, isNonProfit, isOnDemand, isOpenSource, isPaidType, isPersonalLicense, isStarter, isUnlimitedNumberOfUserspublic SubscriptionLicenseDetails(@Nonnull JiraProductLicense license, @Nonnull String licenseString, @Nonnull ApplicationProperties applicationProperties, @Nonnull ExternalLinkUtil externalLinkUtil, @Nonnull BuildUtilsInfo buildUtilsInfo, @Nonnull I18nHelper.BeanFactory i18nFactory, @Nonnull DateTimeFormatter dateTimeFormatter, @Nonnull com.atlassian.core.util.Clock clock) throws IllegalArgumentException
IllegalArgumentException - if ProductLicense.getExpiryDate() is null (ie: a perpetual license).public boolean isExpired()
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.
isExpired in interface LicenseDetailsisExpired in class DefaultLicenseDetailspublic boolean isLicenseAlmostExpired()
DefaultLicenseDetailsisLicenseAlmostExpired in interface LicenseDetailsisLicenseAlmostExpired in class DefaultLicenseDetails#isExpired()}public LicenseDetails.LicenseStatusMessage getLicenseStatusMessage(@Nonnull I18nHelper i18n, UserManager ignored)
getLicenseExpiryStatusMessage(I18nHelper, OutlookDate).getLicenseStatusMessage in interface LicenseDetailsgetLicenseStatusMessage in class DefaultLicenseDetailsi18n - i18n beanignored - used to get user context if necessarypublic String getLicenseExpiryStatusMessage(@Nonnull I18nHelper i18n, @Nullable OutlookDate date)
getLicenseExpiryStatusMessage in interface LicenseDetailsgetLicenseExpiryStatusMessage in class DefaultLicenseDetailsdate - ignoredi18n - i18n beanpublic LicenseDetails.LicenseStatusMessage getMaintenanceMessage(@Nonnull I18nHelper i18n, String applicationName)
LicenseDetailsLicenseDetails.LicenseStatusMessage.hasAnyMessages()
would return false.getMaintenanceMessage in interface LicenseDetailsgetMaintenanceMessage in class DefaultLicenseDetailsi18n - i18n helperapplicationName - JIRA Application name (trademark for display)Copyright © 2002-2021 Atlassian. All Rights Reserved.