public class MockLicenseDetails extends Object implements LicenseDetails
LicenseDetails.LicenseContact, LicenseDetails.LicenseStatusMessage
Constructor and Description |
---|
MockLicenseDetails() |
Modifier and Type | Method and Description |
---|---|
String |
getBriefMaintenanceStatusMessage(I18nHelper i18n)
Return the single word description of the maintenance status of the license.
|
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() |
com.atlassian.extras.api.jira.JiraLicense |
getJiraLicense()
Retrieve the JiraLicense object corresponding to this license.
|
String |
getLicenseExpiryStatusMessage(I18nHelper i18n,
OutlookDate ignored)
Return the HTML message that briefly describes the expiry status of the license.
|
String |
getLicenseExpiryStatusMessage(com.atlassian.crowd.embedded.api.User user)
Return the HTML message that briefly describes the expiry status of the license.
|
LicenseRoleDetails |
getLicenseRoles()
Returns the license role information contained within this license.
|
LicenseDetails.LicenseStatusMessage |
getLicenseStatusMessage(I18nHelper i18n)
Return the all messages which contain status message.
|
String |
getLicenseStatusMessage(I18nHelper i18n,
OutlookDate ignored,
String delimiter)
Return the HTML message that describes the current status of the license.
|
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)
Return the HTML message for support request denial or send e-mail success page.
|
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 |
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()
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 |
isOnDemand()
Tells whether this is an OnDemand 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 whether this is a starter license or not
|
boolean |
isUnlimitedNumberOfUsers()
Tells whether the current license authorise an unlimited number of users.
|
MockLicenseDetails |
makeUnset() |
MockLicenseDetails |
setDaysToLicenseExpiry(int days) |
MockLicenseDetails |
setDaysToMaintenanceExpiry(int days) |
MockLicenseDetails |
setDeveloper(boolean developer) |
MockLicenseDetails |
setEvaluation(boolean eval) |
MockLicenseDetails |
setLicenseRoleDetails(LicenseRoleDetails licenseRoleDetails) |
MockLicenseDetails |
setMaxUsers(int users) |
MockLicenseDetails |
setUnlimitedUsers() |
public boolean isLicenseSet()
LicenseDetails
isLicenseSet
in interface LicenseDetails
true
if a license has been set, false
otherwise.public int getLicenseVersion()
LicenseDetails
getLicenseVersion
in interface LicenseDetails
public boolean isEntitledToSupport()
isEntitledToSupport
in interface LicenseDetails
public boolean isLicenseAlmostExpired()
LicenseDetails
isLicenseAlmostExpired
in interface LicenseDetails
public com.atlassian.extras.api.jira.JiraLicense getJiraLicense()
LicenseDetails
getJiraLicense
in interface LicenseDetails
public LicenseRoleDetails getLicenseRoles()
LicenseDetails
getLicenseRoles
in interface LicenseDetails
public MockLicenseDetails setLicenseRoleDetails(LicenseRoleDetails licenseRoleDetails)
public LicenseDetails.LicenseStatusMessage getLicenseStatusMessage(I18nHelper i18n)
LicenseDetails
getLicenseStatusMessage
in interface LicenseDetails
i18n
- i18n beanpublic String getLicenseStatusMessage(@Nullable com.atlassian.crowd.embedded.api.User user, String delimiter)
LicenseDetails
getLicenseStatusMessage
in interface LicenseDetails
user
- the user for whom the message should be i18n'eddelimiter
- the line delimiter for the messagepublic String getLicenseStatusMessage(I18nHelper i18n, @Nullable OutlookDate ignored, String delimiter)
LicenseDetails
getLicenseStatusMessage
in interface LicenseDetails
i18n
- i18n beanignored
- ignoreddelimiter
- the line delimiter for the messagepublic String getLicenseExpiryStatusMessage(@Nullable com.atlassian.crowd.embedded.api.User user)
LicenseDetails
getLicenseExpiryStatusMessage
in interface LicenseDetails
user
- the user for whom the message should be i18n'edpublic String getLicenseExpiryStatusMessage(I18nHelper i18n, @Nullable OutlookDate ignored)
LicenseDetails
getLicenseExpiryStatusMessage
in interface LicenseDetails
i18n
- i18n beanignored
- outlookDate beanpublic String getBriefMaintenanceStatusMessage(I18nHelper i18n)
LicenseDetails
getBriefMaintenanceStatusMessage
in interface LicenseDetails
i18n
- i18n beanpublic String getSupportRequestMessage(com.atlassian.crowd.embedded.api.User user)
LicenseDetails
getSupportRequestMessage
in interface LicenseDetails
user
- a User object for the calling userpublic String getSupportRequestMessage(I18nHelper i18n, @Nullable OutlookDate ignored)
LicenseDetails
getSupportRequestMessage
in interface LicenseDetails
i18n
- i18n beanignored
- ignoredpublic String getMaintenanceEndString(OutlookDate outlookDate)
LicenseDetails
getMaintenanceEndString
in interface LicenseDetails
outlookDate
- outlookDate beanpublic MockLicenseDetails setUnlimitedUsers()
public boolean isUnlimitedNumberOfUsers()
LicenseDetails
isUnlimitedNumberOfUsers
in interface LicenseDetails
true
if the license authorise an unlimited number of users, false
otherwise.LicenseDetails.getMaximumNumberOfUsers()
public int getMaximumNumberOfUsers()
LicenseDetails
getMaximumNumberOfUsers
in interface LicenseDetails
LicenseDetails.isUnlimitedNumberOfUsers()
public MockLicenseDetails setMaxUsers(int users)
public String getDescription()
getDescription
in interface LicenseDetails
public String getPartnerName()
getPartnerName
in interface LicenseDetails
public boolean isExpired()
LicenseDetails
isExpired
in interface LicenseDetails
public String getPurchaseDate(OutlookDate outlookDate)
LicenseDetails
getPurchaseDate
in interface LicenseDetails
outlookDate
- the date formatterpublic MockLicenseDetails setEvaluation(boolean eval)
public boolean isEvaluation()
LicenseDetails
isEvaluation
in interface LicenseDetails
true
if this is an evaluation license, false
otherwise.public boolean isStarter()
LicenseDetails
isStarter
in interface LicenseDetails
true
if this is a starter license, false
otherwise.public boolean isCommercial()
LicenseDetails
isCommercial
in interface LicenseDetails
true
if this is a commercial license, false
otherwise.public boolean isPersonalLicense()
LicenseDetails
isPersonalLicense
in interface LicenseDetails
true
if this is a personal license, false
otherwise.public boolean isCommunity()
LicenseDetails
isCommunity
in interface LicenseDetails
true
if this is a community license, false
otherwise.public boolean isOpenSource()
LicenseDetails
isOpenSource
in interface LicenseDetails
true
if this is an open source license, false
otherwise.public boolean isNonProfit()
LicenseDetails
isNonProfit
in interface LicenseDetails
true
if this is a non profit license, false
otherwise.public boolean isDemonstration()
LicenseDetails
isDemonstration
in interface LicenseDetails
true
if this is a demonstration license, false
otherwise.public boolean isOnDemand()
LicenseDetails
isOnDemand
in interface LicenseDetails
true
if this is a OnDemand, false
otherwise.public boolean isDataCenter()
LicenseDetails
isDataCenter
in interface LicenseDetails
public boolean isEnterpriseLicenseAgreement()
LicenseDetails
isEnterpriseLicenseAgreement
in interface LicenseDetails
public boolean isDeveloper()
LicenseDetails
isDeveloper
in interface LicenseDetails
true
if this is a developer license, false
otherwise.public MockLicenseDetails setDeveloper(boolean developer)
public String getOrganisation()
LicenseDetails
getOrganisation
in interface LicenseDetails
public boolean hasLicenseTooOldForBuildConfirmationBeenDone()
LicenseDetails
hasLicenseTooOldForBuildConfirmationBeenDone
in interface LicenseDetails
true
if the license in use is too old with regards to the build number, false
otherwise.public String getLicenseString()
getLicenseString
in interface LicenseDetails
public boolean isMaintenanceValidForBuildDate(Date currentBuildDate)
LicenseDetails
isMaintenanceValidForBuildDate
in interface LicenseDetails
currentBuildDate
- the current build datetrue
if the build date is within the maintenance period, false
otherwise.public String getSupportEntitlementNumber()
LicenseDetails
getSupportEntitlementNumber
in interface LicenseDetails
public Collection<LicenseDetails.LicenseContact> getContacts()
LicenseDetails
getContacts
in interface LicenseDetails
public int getDaysToLicenseExpiry()
LicenseDetails
0
indicates that license will expire today (but is still valid).Integer.MAX_VALUE
indicates that the license will never expire.1.5
days will be reported as 1
while
-0.5
days will be reported as -1
days.getDaysToLicenseExpiry
in interface LicenseDetails
public MockLicenseDetails setDaysToLicenseExpiry(int days)
public int getDaysToMaintenanceExpiry()
LicenseDetails
0
indicates that license maintenance will expire today (but is still valid).Integer.MAX_VALUE
indicates that the license maintenance will never expire.1.5
days will be reported as 1
while
-0.5
days will be reported as -1
days.getDaysToMaintenanceExpiry
in interface LicenseDetails
public MockLicenseDetails setDaysToMaintenanceExpiry(int days)
public MockLicenseDetails makeUnset()
Copyright © 2002-2015 Atlassian. All Rights Reserved.