public class

MockLicensedApplications

extends Object
implements LicensedApplications
java.lang.Object
   ↳ com.atlassian.jira.license.MockLicensedApplications

Summary

Public Constructors
MockLicensedApplications()
MockLicensedApplications(Map<ApplicationKey, Integer> applicationsWithCounts)
MockLicensedApplications(Iterable<ApplicationKey> roles)
MockLicensedApplications(ApplicationKey... roles)
Public Methods
MockLicensedApplications addSeats(ApplicationKey application, int numSeats)
Add the given number of seats to the given role, returning the new total.
@Nonnull String getDescription()
Returns a user-friendly string version of the com.atlassian.application.api.Applications encoded in the source license, or the empty string if there are no Applications in the source license.
@Nonnull Set<ApplicationKey> getKeys()
Returns the com.atlassian.application.api.ApplicationKeys encoded in the source license.
int getUserLimit(ApplicationKey role)
Returns the number of seats for the given com.atlassian.application.api.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()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.license.LicensedApplications

Public Constructors

public MockLicensedApplications ()

public MockLicensedApplications (Map<ApplicationKey, Integer> applicationsWithCounts)

public MockLicensedApplications (Iterable<ApplicationKey> roles)

public MockLicensedApplications (ApplicationKey... roles)

Public Methods

public MockLicensedApplications addSeats (ApplicationKey application, int numSeats)

Add the given number of seats to the given role, returning the new total.

@Nonnull public String getDescription ()

Returns a user-friendly string version of the com.atlassian.application.api.Applications encoded in the source license, or the empty string if there are no Applications in the source license.

@Nonnull public Set<ApplicationKey> getKeys ()

Returns the com.atlassian.application.api.ApplicationKeys encoded in the source license. This may return an empty set, but never returns null.

public int getUserLimit (ApplicationKey role)

Returns the number of seats for the given com.atlassian.application.api.ApplicationKey. It will return:

  1. 0 if the passed ApplicationKey is not licensed.
  2. UNLIMITED_USERS if the passed ApplicationKey has no limit.
  3. positive number when the passed ApplicationKey has that exact limit.

Returns
  • the number of users/seats for the given ApplicationKey, 0, or UNLIMITED_USERS.

public 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.

Returns
  • true if license key was issued as an JIRA Application license ( role based license ), false if we have interpreted license as JIRA Application license or when no interpretation occurred.

public String toString ()