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
 String getBriefMaintenanceStatusMessage(I18nHelper i18n)
          Return the single word description of the maintenance status of the license.
 String getDescription()
           
 String getLicenseExpiryStatusMessage(I18nHelper i18n, OutlookDate ignored)
          Deprecated. Use getLicenseExpiryStatusMessage(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.
 String getLicenseExpiryStatusMessage(com.atlassian.crowd.embedded.api.User user)
          Return the HTML message that briefly describes the expiry status of the license.
 String getLicenseStatusMessage(I18nHelper i18n, OutlookDate ignored, String delimiter)
          Deprecated. Use getLicenseStatusMessage(com.atlassian.crowd.embedded.api.User, String) instead. Since v5.0.
 String getLicenseStatusMessage(com.atlassian.crowd.embedded.api.User user, String delimiter)
          Return the HTML message that describes the current status of the license.
 String getLicenseString()
           
 int getLicenseVersion()
          Gets the version of the current license, 0 if not set.
 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
 String getOrganisation()
          Gets the organisation this license belongs to
 String getPartnerName()
           
 String getPurchaseDate(OutlookDate outlookDate)
          Gets a nicely formatted purchase date for the current license
 String getSupportEntitlementNumber()
          Gets the SEN from the license
 String getSupportRequestMessage(I18nHelper i18n, OutlookDate ignored)
          Deprecated. Use getSupportRequestMessage(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.
 String getSupportRequestMessage(com.atlassian.crowd.embedded.api.User user)
          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(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

String getLicenseStatusMessage(@Nullable
                               com.atlassian.crowd.embedded.api.User user,
                               String delimiter)
Return the HTML message that describes the current status of the license.

Parameters:
user - the user for whom the message should be i18n'ed
delimiter - the line delimiter for the message
Returns:
the status message

getLicenseStatusMessage

@Deprecated
String getLicenseStatusMessage(I18nHelper i18n,
                                          @Nullable
                                          OutlookDate ignored,
                                          String delimiter)
Deprecated. Use getLicenseStatusMessage(com.atlassian.crowd.embedded.api.User, String) instead. Since v5.0.

Return the HTML message that describes the current status of the license.

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

getLicenseExpiryStatusMessage

String getLicenseExpiryStatusMessage(@Nullable
                                     com.atlassian.crowd.embedded.api.User user)
Return the HTML message that briefly describes the expiry status of the license. Intended for use with the Admin Portlet.

Parameters:
user - the user for whom the message should be i18n'ed
Returns:
the status message, null for normal license outside of support period

getLicenseExpiryStatusMessage

@Deprecated
String getLicenseExpiryStatusMessage(I18nHelper i18n,
                                                @Nullable
                                                OutlookDate ignored)
Deprecated. Use getLicenseExpiryStatusMessage(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

Return the HTML message that briefly describes the expiry status of the license. Intended for use with the Admin Portlet.

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

getBriefMaintenanceStatusMessage

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

String getSupportRequestMessage(com.atlassian.crowd.embedded.api.User user)
Return the HTML message for support request denial or send e-mail success page.

Parameters:
user - a User object for the calling user
Returns:
the support request message

getSupportRequestMessage

@Deprecated
String getSupportRequestMessage(I18nHelper i18n,
                                           @Nullable
                                           OutlookDate ignored)
Deprecated. Use getSupportRequestMessage(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

Return the HTML message for support request denial or send e-mail success page.

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

getMaintenanceEndString

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

String getDescription()
Returns:
the description of the current license

getPartnerName

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

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

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

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(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

String getSupportEntitlementNumber()
Gets the SEN from the license

Returns:
the SEN from the license


Copyright © 2002-2012 Atlassian. All Rights Reserved.