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.getLicense()DefaultLicenseDetails.LinkLicenseDetails.LicenseContact, LicenseDetails.LicenseStatusMessage| Constructor and Description |
|---|
SubscriptionLicenseDetails(com.atlassian.extras.api.jira.JiraLicense license,
String licenseString,
ApplicationProperties applicationProperties,
ExternalLinkUtil externalLinkUtil,
BuildUtilsInfo buildUtilsInfo,
I18nHelper.BeanFactory i18nFactory,
DateTimeFormatter dateTimeFormatter,
com.atlassian.extras.decoder.api.LicenseDecoder licenseDecoder,
ClusterManager clusterManager,
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)
Returns an expiry status message; see also
getLicenseExpiryStatusMessage(I18nHelper, OutlookDate). |
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.
|
getBriefMaintenanceStatusMessage, getContacts, getDaysToLicenseExpiry, getDaysToMaintenanceExpiry, getDescription, getJiraLicense, getLicenseExpiryStatusMessage, getLicenseRoles, getLicenseStatusMessage, getLicenseStatusMessage, getLicenseString, getLicenseVersion, getMaintenanceEndString, getMaximumNumberOfUsers, getOrganisation, getPartnerName, getPurchaseDate, getSupportEntitlementNumber, getSupportRequestMessage, getSupportRequestMessage, hasLicenseTooOldForBuildConfirmationBeenDone, isCommercial, isCommunity, isDataCenter, isDemonstration, isDeveloper, isEnterpriseLicenseAgreement, isEntitledToSupport, isEvaluation, isLicenseSet, isMaintenanceValidForBuildDate, isNonProfit, isOnDemand, isOpenSource, isPersonalLicense, isStarter, isUnlimitedNumberOfUserspublic SubscriptionLicenseDetails(@Nonnull com.atlassian.extras.api.jira.JiraLicense license, @Nonnull String licenseString, @Nonnull ApplicationProperties applicationProperties, @Nonnull ExternalLinkUtil externalLinkUtil, @Nonnull BuildUtilsInfo buildUtilsInfo, @Nonnull I18nHelper.BeanFactory i18nFactory, @Nonnull DateTimeFormatter dateTimeFormatter, @Nonnull com.atlassian.extras.decoder.api.LicenseDecoder licenseDecoder, @Nonnull ClusterManager clusterManager, @Nonnull com.atlassian.core.util.Clock clock) throws IllegalArgumentException
IllegalArgumentException - if ProductLicense.getExpiryDate() is null (ie: a perpetual license).public boolean isExpired()
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)
getLicenseExpiryStatusMessage(I18nHelper, OutlookDate).getLicenseStatusMessage in interface LicenseDetailsgetLicenseStatusMessage in class DefaultLicenseDetailsi18n - i18n beanpublic String getLicenseExpiryStatusMessage(@Nonnull I18nHelper i18n, @Nullable OutlookDate date)
getLicenseExpiryStatusMessage in interface LicenseDetailsgetLicenseExpiryStatusMessage in class DefaultLicenseDetailsdate - ignoredi18n - i18n beanCopyright © 2002-2015 Atlassian. All Rights Reserved.