Package com.atlassian.jira.license
Class SubscriptionLicenseDetails
java.lang.Object
com.atlassian.jira.license.DefaultLicenseDetails
com.atlassian.jira.license.SubscriptionLicenseDetails
- All Implemented Interfaces:
LicenseDetails
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.
- Since:
- v6.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.license.DefaultLicenseDetails
DefaultLicenseDetails.LinkNested classes/interfaces inherited from interface com.atlassian.jira.license.LicenseDetails
LicenseDetails.LicenseContact, LicenseDetails.LicenseStatusMessage -
Field Summary
Fields inherited from class com.atlassian.jira.license.DefaultLicenseDetails
clock -
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionLicenseDetails(JiraProductLicense license, String licenseString, ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18nFactory, DateTimeFormatter dateTimeFormatter, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptiongetLicenseExpiryStatusMessage(I18nHelper i18n, OutlookDate date) Returns a duration-based brief expiry message of form "Expires in XX months, YY days".getLicenseStatusMessage(I18nHelper i18n, UserManager ignored) Returns an expiry status message; see alsogetLicenseExpiryStatusMessage(I18nHelper, OutlookDate).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.booleanChecks whether the license is either expired for Evaluation or Extended Licenses (New Build, Old License).Methods inherited from class com.atlassian.jira.license.DefaultLicenseDetails
equals, getApplicationDescription, getBriefMaintenanceStatusMessage, getContacts, getDaysToLicenseExpiry, getDaysToMaintenanceExpiry, getDescription, getJiraLicense, getLicensedApplications, getLicenseExpiryStatusMessage, getLicenseString, getLicenseType, getLicenseVersion, getMaintenanceEndString, getMaintenanceExpiry, getMaintenanceExpiryDate, getOrganisation, getPartnerName, getPurchaseDate, getPurchaseDate, getSupportEntitlementNumber, hasApplication, hashCode, isCommercial, isCommunity, isDataCenter, isDemonstration, isDeveloper, isEnterpriseLicenseAgreement, isEntitledToSupport, isEvaluation, isLicenseAlmostExpired, isMaintenanceValidForBuildDate, isNonProfit, isOnDemand, isOpenSource, isPaidType, isPersonalLicense, isStarter, isUnlimitedNumberOfUsers
-
Constructor Details
-
SubscriptionLicenseDetails
public SubscriptionLicenseDetails(@Nonnull JiraProductLicense license, @Nonnull String licenseString, @Nonnull ApplicationProperties applicationProperties, @Nonnull ExternalLinkUtil externalLinkUtil, @Nonnull BuildUtilsInfo buildUtilsInfo, @Nonnull I18nHelper.BeanFactory i18nFactory, @Nonnull DateTimeFormatter dateTimeFormatter, @Nonnull Clock clock) throws IllegalArgumentException - Throws:
IllegalArgumentException- ifProductLicense.getExpiryDate()is null (ie: a perpetual license).
-
-
Method Details
-
isExpired
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.- Specified by:
isExpiredin interfaceLicenseDetails- Overrides:
isExpiredin classDefaultLicenseDetails- Returns:
- true if has; false otherwise.
-
getLicenseStatusMessage
public LicenseDetails.LicenseStatusMessage getLicenseStatusMessage(@Nonnull I18nHelper i18n, UserManager ignored) Returns an expiry status message; see alsogetLicenseExpiryStatusMessage(I18nHelper, OutlookDate).- Specified by:
getLicenseStatusMessagein interfaceLicenseDetails- Overrides:
getLicenseStatusMessagein classDefaultLicenseDetails- Parameters:
i18n- i18n beanignored- used to get user context if necessary- Returns:
- An expiry status message.
-
getLicenseExpiryStatusMessage
Returns a duration-based brief expiry message of form "Expires in XX months, YY days".- Specified by:
getLicenseExpiryStatusMessagein interfaceLicenseDetails- Overrides:
getLicenseExpiryStatusMessagein classDefaultLicenseDetails- Parameters:
i18n- i18n beandate- ignored- Returns:
- the status message, null for normal license outside of support period
-
getMaintenanceMessage
public LicenseDetails.LicenseStatusMessage getMaintenanceMessage(@Nonnull I18nHelper i18n, String applicationName) Description copied from interface:LicenseDetailsGet 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 returnedLicenseDetails.LicenseStatusMessage.hasAnyMessages()would return false.- Specified by:
getMaintenanceMessagein interfaceLicenseDetails- Overrides:
getMaintenanceMessagein classDefaultLicenseDetails- Parameters:
i18n- i18n helperapplicationName- JIRA Application name (trademark for display)- Returns:
- the status message, subscription license would return no messages.
-