@PublicApi
public interface LicenseDetails
Modifier and Type | Interface and Description |
---|---|
static interface |
LicenseDetails.LicenseContact
Represents a license contact name/email pair.
|
static interface |
LicenseDetails.LicenseStatusMessage
Encapsulates a collection of unordered, internationalised license-related status messages.
|
Modifier and Type | Method and Description |
---|---|
String |
getApplicationDescription()
Returns a user-friendly
String description of the Application (s)
granted by this license. |
String |
getBriefMaintenanceStatusMessage(I18nHelper i18n)
Deprecated.
since 7.0.0 No replacement, generate your own message
|
Collection<LicenseDetails.LicenseContact> |
getContacts()
Gets the contact people for the license (e.g.
|
int |
getDaysToLicenseExpiry()
Returns the number of days until the license expires (i.e.
|
int |
getDaysToMaintenanceExpiry()
Returns the number of days until the license maintenance expires (i.e.
|
String |
getDescription()
Returns the literal description of the current license as given in the license itself.
|
com.atlassian.extras.api.jira.JiraLicense |
getJiraLicense()
Retrieve the JiraLicense object corresponding to this license.
|
LicensedApplications |
getLicensedApplications()
Returns all the application/role information contained within this license, even if they are non active.
|
String |
getLicenseExpiryStatusMessage(ApplicationUser user)
Deprecated.
since 7.0.0 No replacement, generate your own message
|
String |
getLicenseExpiryStatusMessage(I18nHelper i18n,
OutlookDate ignored)
Deprecated.
since 5.0 No replacement, generate your own message
|
String |
getLicenseStatusMessage(ApplicationUser user,
String delimiter,
UserManager userManager)
|
String |
getLicenseStatusMessage(I18nHelper i18n,
OutlookDate ignored,
String delimiter,
UserManager userManager)
|
LicenseDetails.LicenseStatusMessage |
getLicenseStatusMessage(I18nHelper i18n,
UserManager userManager)
Return the all messages which contain status message.
|
String |
getLicenseString() |
com.atlassian.extras.api.LicenseType |
getLicenseType() |
int |
getLicenseVersion()
Gets the version of the current license, 0 if not set.
|
String |
getMaintenanceEndString(OutlookDate outlookDate)
Deprecated.
since 7.0.0 No replacement, generate your own message
|
Date |
getMaintenanceExpiryDate()
Returns the maintenance expiry
Date of this license, or null if the maintenance period of this
license is unlimited. |
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.
|
String |
getOrganisation()
Gets the organisation this license belongs to
|
String |
getPartnerName() |
default String |
getPurchaseDate(DateTimeFormatter dateTimeFormatter)
Gets a nicely formatted purchase date for the current license
|
String |
getPurchaseDate(OutlookDate outlookDate)
Deprecated.
Use
getPurchaseDate(DateTimeFormatter) instead. Since v7.1 |
String |
getSupportEntitlementNumber()
Gets the SEN from the license
|
boolean |
hasApplication(com.atlassian.application.api.ApplicationKey application)
Returns true if the given
application is contained within this license. |
boolean |
isCommercial()
Tells whether this is a commercial license or not
|
boolean |
isCommunity()
Tells whether this is a community license or not
|
boolean |
isDataCenter()
Returns true if this is a DataCenter license.
|
boolean |
isDemonstration()
Tells whether this is a demonstration license or not
|
boolean |
isDeveloper()
Tells whether this is a developer license or not
|
boolean |
isEnterpriseLicenseAgreement()
Indicates whether this licence is a subscription-based Enterprise License Agreement (ELA).
|
boolean |
isEntitledToSupport() |
boolean |
isEvaluation()
Tells whether this is an evaluation license or not
|
boolean |
isExpired()
Checks whether the license is either expired or the grace period for an extended license (after upgrade) is
over.
|
boolean |
isLicenseAlmostExpired()
Deprecated.
since 7.0.0 use
getMaintenanceExpiryDate() instead |
boolean |
isMaintenanceValidForBuildDate(Date currentBuildDate)
Tells whether the current build date is within the maintenance of the license
|
boolean |
isNonProfit()
Tells whether this is a non profit license or not
|
boolean |
isOnDemand()
Tells whether this is an OnDemand license or not
|
boolean |
isOpenSource()
Tells whether this is an open source license or not
|
boolean |
isPaidType()
Checks whether the license type is a paid type.
|
boolean |
isPersonalLicense()
Tells whether this is a personal license or not
|
boolean |
isStarter()
Tells whether this is a starter license or not
|
boolean |
isUnlimitedNumberOfUsers()
Deprecated.
|
int getLicenseVersion()
boolean isEntitledToSupport()
@Deprecated boolean isLicenseAlmostExpired()
getMaintenanceExpiryDate()
insteadcom.atlassian.extras.api.jira.JiraLicense getJiraLicense()
@Nonnull LicensedApplications getLicensedApplications()
boolean hasApplication(@Nonnull com.atlassian.application.api.ApplicationKey application)
application
is contained within this license.application
- the application to queryLicenseDetails.LicenseStatusMessage getLicenseStatusMessage(I18nHelper i18n, UserManager userManager)
i18n
- i18n beanuserManager
- used to get user context if necessaryLicenseDetails.LicenseStatusMessage getMaintenanceMessage(@Nonnull I18nHelper i18n, String applicationName)
LicenseDetails.LicenseStatusMessage.hasAnyMessages()
would return false.i18n
- i18n helperapplicationName
- JIRA Application name (trademark for display)@Deprecated String getLicenseStatusMessage(@Nullable ApplicationUser user, String delimiter, UserManager userManager)
user
- the user for whom the message should be i18n'eddelimiter
- the line delimiter for the messageuserManager
- used to get user context if necessary@Deprecated String getLicenseStatusMessage(I18nHelper i18n, @Nullable OutlookDate ignored, String delimiter, UserManager userManager)
i18n
- i18n beanignored
- ignoreduserManager
- used to get user context if necessarydelimiter
- the line delimiter for the message@Deprecated String getLicenseExpiryStatusMessage(@Nullable ApplicationUser user)
user
- the user for whom the message should be i18n'ed@Deprecated String getLicenseExpiryStatusMessage(I18nHelper i18n, @Nullable OutlookDate ignored)
i18n
- i18n beanignored
- outlookDate bean@Deprecated String getBriefMaintenanceStatusMessage(I18nHelper i18n)
i18n
- i18n bean@Nullable Date getMaintenanceExpiryDate()
Date
of this license, or null if the maintenance period of this
license is unlimited.Date
of this license, or null if the maintenance period of this
license is unlimited.@Deprecated String getMaintenanceEndString(OutlookDate outlookDate)
Note that the return type here is a String to intentionally signify that this value should not be used in any logic calculations and only for displaying to the user.
outlookDate
- outlookDate bean@Deprecated boolean isUnlimitedNumberOfUsers()
getLicensedApplications()
and LicensedApplications.getKeys()
LicensedApplications.getUserLimit(com.atlassian.application.api.ApplicationKey)
instead. Since 7.0true
if the license authorise an unlimited number of users, false
otherwise.String getDescription()
String getPartnerName()
boolean isExpired()
@Deprecated String getPurchaseDate(OutlookDate outlookDate)
getPurchaseDate(DateTimeFormatter)
instead. Since v7.1outlookDate
- the date formatterdefault String getPurchaseDate(DateTimeFormatter dateTimeFormatter)
dateTimeFormatter
- the date formatterboolean isEvaluation()
true
if this is an evaluation license, false
otherwise.boolean isStarter()
true
if this is a starter license, false
otherwise.boolean isPaidType()
true
if the license is a paid type, false
otherwise.boolean isCommercial()
true
if this is a commercial license, false
otherwise.boolean isPersonalLicense()
true
if this is a personal license, false
otherwise.boolean isCommunity()
true
if this is a community license, false
otherwise.boolean isOpenSource()
true
if this is an open source license, false
otherwise.boolean isNonProfit()
true
if this is a non profit license, false
otherwise.boolean isDemonstration()
true
if this is a demonstration license, false
otherwise.boolean isOnDemand()
true
if this is a OnDemand, false
otherwise.boolean isDataCenter()
boolean isDeveloper()
true
if this is a developer license, false
otherwise.String getOrganisation()
String getLicenseString()
boolean isMaintenanceValidForBuildDate(Date currentBuildDate)
currentBuildDate
- the current build datetrue
if the build date is within the maintenance period, false
otherwise.String getSupportEntitlementNumber()
Collection<LicenseDetails.LicenseContact> getContacts()
boolean isEnterpriseLicenseAgreement()
int getDaysToLicenseExpiry()
0
indicates that license will expire today (but is still valid).Integer.MAX_VALUE
indicates that the license will never expire.
A partial day will be rounded down. For example, 1.5
days will be reported as 1
while
-0.5
days will be reported as -1
days.
int getDaysToMaintenanceExpiry()
0
indicates that license maintenance will expire today (but is still valid).Integer.MAX_VALUE
indicates that the license maintenance will never expire.
A partial day will be rounded down. For example, 1.5
days will be reported as 1
while
-0.5
days will be reported as -1
days.
com.atlassian.extras.api.LicenseType getLicenseType()
@Nonnull String getApplicationDescription()
String
description of the Application
(s)
granted by this license. This method differs from getDescription()
in that the returned String is
Application
-focused and heuristically determined, and does not include license type information,
number of seats etc.
If there are no Application
s in the current license, then this method returns the String "JIRA"
.
Copyright © 2002-2019 Atlassian. All Rights Reserved.