com.atlassian.jira.license
Interface LicenseDetails


public interface LicenseDetails

A set of methods which describe the state of the currently installed license.

Since:
v3.13

Method Summary
 java.lang.String getBriefMaintenanceStatusMessage(I18nHelper i18n)
          Return the single word description of the maintenance status of the license.
 java.lang.String getDescription()
           
 java.lang.String getLicenseExpiryStatusMessage(I18nHelper i18n, OutlookDate outlookDate)
          Return the HTML message that briefly describes the expiry status of the license.
 java.lang.String getLicenseStatusMessage(I18nHelper i18n, OutlookDate outlookDate, java.lang.String delimiter)
          Return the HTML message that describes the current status of the license.
 java.lang.String getLicenseString()
           
 int getLicenseVersion()
          Gets the version of the current license, 0 if not set.
 java.lang.String getMaintenanceEndString(OutlookDate outlookDate)
          Return the date string representing the end of maintenance of the license, whether the license is Evaluation, New Build Old License or otherwise.
 int getMaximumNumberOfUsers()
          Gets the maximum number of users allowed by the current license
 java.lang.String getOrganisation()
          Gets the organisation this license belongs to
 java.lang.String getPartnerName()
           
 java.lang.String getPurchaseDate(OutlookDate outlookDate)
          Gets a nicely formatted purchase date for the current license
 java.lang.String getSupportEntitlementNumber()
          Gets the SEN from the license
 java.lang.String getSupportRequestMessage(I18nHelper i18n, OutlookDate outlookDate)
          Return the HTML message for support request denial or send e-mail success page.
 boolean hasLicenseTooOldForBuildConfirmationBeenDone()
          Tells whether the admin has acknowledged that the JIRA instance is running on a too old license for its build number.
 boolean isCommercial()
          Tells whether this is a commercial license or not
 boolean isCommunity()
          Tells whether this is a community license or not
 boolean isDemonstration()
          Tells whether this is a demonstration license or not
 boolean isDeveloper()
          Tells whether this is a developer license or not
 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()
          If the license is Evaluation or Extended (New Build, Old License), returns true if we are within 7 days of the expiry date.
 boolean isLicenseSet()
          Tells whether a license has been set or not for this JIRA instance.
 boolean isMaintenanceValidForBuildDate(java.util.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 isOpenSource()
          Tells whether this is an open source license or not
 boolean isPersonalLicense()
          Tells whether this is a personal license or not
 boolean isStarter()
          Tells wheter this is a starter license or not
 boolean isUnlimitedNumberOfUsers()
          Tells whether the current license authorise an unlimited number of users.
 

Method Detail

isLicenseSet

boolean isLicenseSet()
Tells whether a license has been set or not for this JIRA instance.

Returns:
true if a license has been set, false otherwise.

getLicenseVersion

int getLicenseVersion()
Gets the version of the current license, 0 if not set. This is the version of encoder/decoder that was used with this license.

Returns:
the version of the current license, 0 if not set.

isEntitledToSupport

boolean isEntitledToSupport()
Returns:
true for licenses that are entitled to support and updates of JIRA. This includes everything which is not a Personal License or Non-Commercial-Non-Renewable.

isLicenseAlmostExpired

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. Otherwise, returns true if within 6 weeks before the supported period end date.

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

getLicenseStatusMessage

java.lang.String getLicenseStatusMessage(I18nHelper i18n,
                                         OutlookDate outlookDate,
                                         java.lang.String delimiter)
Return the HTML message that describes the current status of the license.

Parameters:
i18n - i18n bean
outlookDate - outlookDate bean
delimiter - the line delimiter for the message
Returns:
the status message

getLicenseExpiryStatusMessage

java.lang.String getLicenseExpiryStatusMessage(I18nHelper i18n,
                                               OutlookDate outlookDate)
Return the HTML message that briefly describes the expiry status of the license. Intended for use with the Admin Portlet.

Parameters:
i18n - i18n bean
outlookDate - outlookDate bean
Returns:
the status message, null for normal license outside of support period

getBriefMaintenanceStatusMessage

java.lang.String getBriefMaintenanceStatusMessage(I18nHelper i18n)
Return the single word description of the maintenance status of the license. Intended for use with the Support Request and System Info pages.

Parameters:
i18n - i18n bean
Returns:
the status message - either "Supported", "Expired" or "Unsupported"

getSupportRequestMessage

java.lang.String getSupportRequestMessage(I18nHelper i18n,
                                          OutlookDate outlookDate)
Return the HTML message for support request denial or send e-mail success page.

Parameters:
i18n - i18n bean
outlookDate - outlookDate bean
Returns:
the support request message

getMaintenanceEndString

java.lang.String getMaintenanceEndString(OutlookDate outlookDate)
Return the date string representing the end of maintenance of the license, whether the license is Evaluation, New Build Old License or otherwise.

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.

Parameters:
outlookDate - outlookDate bean
Returns:
the date as a string (should never be null)

isUnlimitedNumberOfUsers

boolean isUnlimitedNumberOfUsers()
Tells whether the current license authorise an unlimited number of users.

Returns:
true if the license authorise an unlimited number of users, false otherwise.
See Also:
getMaximumNumberOfUsers()

getMaximumNumberOfUsers

int getMaximumNumberOfUsers()
Gets the maximum number of users allowed by the current license

Returns:
the maximum number of user allowed by the license, -1 if unlimited
See Also:
isUnlimitedNumberOfUsers()

getDescription

java.lang.String getDescription()
Returns:
the description of the current license

getPartnerName

java.lang.String getPartnerName()
Returns:
the Partner name inside the current license or null if its not set

isExpired

boolean isExpired()
Checks whether the license is either expired or the grace period for an extended license (after upgrade) is over.

Returns:
true if has, false otherwise.

getPurchaseDate

java.lang.String getPurchaseDate(OutlookDate outlookDate)
Gets a nicely formatted purchase date for the current license

Parameters:
outlookDate - the date formatter
Returns:
a formatted purchased date.

isEvaluation

boolean isEvaluation()
Tells whether this is an evaluation license or not

Returns:
true if this is an evaluation license, false otherwise.

isStarter

boolean isStarter()
Tells wheter this is a starter license or not

Returns:
true if this is a starter license, false otherwise.

isCommercial

boolean isCommercial()
Tells whether this is a commercial license or not

Returns:
true if this is a commercial license, false otherwise.

isPersonalLicense

boolean isPersonalLicense()
Tells whether this is a personal license or not

Returns:
true if this is a personal license, false otherwise.

isCommunity

boolean isCommunity()
Tells whether this is a community license or not

Returns:
true if this is a community license, false otherwise.

isOpenSource

boolean isOpenSource()
Tells whether this is an open source license or not

Returns:
true if this is an open source license, false otherwise.

isNonProfit

boolean isNonProfit()
Tells whether this is a non profit license or not

Returns:
true if this is a non profit license, false otherwise.

isDemonstration

boolean isDemonstration()
Tells whether this is a demonstration license or not

Returns:
true if this is a demonstration license, false otherwise.

isDeveloper

boolean isDeveloper()
Tells whether this is a developer license or not

Returns:
true if this is a developer license, false otherwise.

getOrganisation

java.lang.String getOrganisation()
Gets the organisation this license belongs to

Returns:
the organisation this license belongs to

hasLicenseTooOldForBuildConfirmationBeenDone

boolean hasLicenseTooOldForBuildConfirmationBeenDone()
Tells whether the admin has acknowledged that the JIRA instance is running on a too old license for its build number. Typically JIRA allows for a 30 days grace period when doing so.

Returns:
true if the license in use is too old with regards to the build number, false otherwise.

getLicenseString

java.lang.String getLicenseString()
Returns:
the encoded license string that was was decode to produce the current lincence. This will return null if it is not set

isMaintenanceValidForBuildDate

boolean isMaintenanceValidForBuildDate(java.util.Date currentBuildDate)
Tells whether the current build date is within the maintenance of the license

Parameters:
currentBuildDate - the current build date
Returns:
true if the build date is within the maintenance period, false otherwise.

getSupportEntitlementNumber

java.lang.String getSupportEntitlementNumber()
Gets the SEN from the license

Returns:
the SEN from the license


Copyright © 2002-2010 Atlassian. All Rights Reserved.