public class MockLicensedApplications extends Object implements LicensedApplications
| Constructor and Description |
|---|
MockLicensedApplications() |
MockLicensedApplications(com.atlassian.application.api.ApplicationKey... roles) |
MockLicensedApplications(Iterable<com.atlassian.application.api.ApplicationKey> roles) |
MockLicensedApplications(Map<com.atlassian.application.api.ApplicationKey,Integer> applicationsWithCounts) |
| Modifier and Type | Method and Description |
|---|---|
MockLicensedApplications |
addSeats(com.atlassian.application.api.ApplicationKey application,
int numSeats)
Add the given number of seats to the given role, returning the new total.
|
String |
getDescription()
Returns a user-friendly string version of the
Applications
encoded in the source license, or the empty string
if there are no Applications in the source license. |
Set<com.atlassian.application.api.ApplicationKey> |
getKeys()
Returns the
ApplicationKeys encoded in the source
license. |
int |
getUserLimit(com.atlassian.application.api.ApplicationKey role)
Returns the number of seats for the given
ApplicationKey. |
boolean |
hasNativeRole()
Indicates whether the license key has been issued as an JIRA Application license ( role based license ) or
whether we have interpreted it as an JIRA Application license.
|
String |
toString() |
public MockLicensedApplications()
public MockLicensedApplications(@Nonnull Map<com.atlassian.application.api.ApplicationKey,Integer> applicationsWithCounts)
public MockLicensedApplications(@Nonnull Iterable<com.atlassian.application.api.ApplicationKey> roles)
public MockLicensedApplications(@Nonnull com.atlassian.application.api.ApplicationKey... roles)
public MockLicensedApplications addSeats(@Nonnull com.atlassian.application.api.ApplicationKey application, int numSeats)
@Nonnull public Set<com.atlassian.application.api.ApplicationKey> getKeys()
LicensedApplicationsApplicationKeys encoded in the source
license. This may return an empty set, but never
returns null.getKeys in interface LicensedApplicationspublic int getUserLimit(@Nonnull com.atlassian.application.api.ApplicationKey role)
LicensedApplicationsApplicationKey. It will return:
ApplicationKey is not licensed.LicensePropertiesConstants.UNLIMITED_USERS if the passed
ApplicationKey has no limit.
positive number when the passed ApplicationKey has that exact limit.getUserLimit in interface LicensedApplicationsApplicationKey, 0, or
LicensePropertiesConstants.UNLIMITED_USERS.@Nonnull public String getDescription()
LicensedApplicationsApplications
encoded in the source license, or the empty string
if there are no Applications in the source license.getDescription in interface LicensedApplicationspublic boolean hasNativeRole()
LicensedApplicationshasNativeRole in interface LicensedApplicationsCopyright © 2002-2017 Atlassian. All Rights Reserved.