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
Application s
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
ApplicationKey s 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()
LicensedApplications
ApplicationKey
s encoded in the source
license
. This may return an empty set, but never
returns null.getKeys
in interface LicensedApplications
public int getUserLimit(@Nonnull com.atlassian.application.api.ApplicationKey role)
LicensedApplications
ApplicationKey
. 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 LicensedApplications
ApplicationKey
, 0, or
LicensePropertiesConstants.UNLIMITED_USERS
.@Nonnull public String getDescription()
LicensedApplications
Application
s
encoded in the source license
, or the empty string
if there are no Applications in the source license.getDescription
in interface LicensedApplications
public boolean hasNativeRole()
LicensedApplications
hasNativeRole
in interface LicensedApplications
Copyright © 2002-2019 Atlassian. All Rights Reserved.