public interface

LicensedApplications

com.atlassian.jira.license.LicensedApplications
Known Indirect Subclasses

Class Overview

Encapsulates the application/role information embedded in a license.

Typical usage:

 JiraLicenseManager jlm = ...;
     LicenseDetails licenseDetails = jlm.getLicense();
     LicensedApplications applications = licenseDetails.getLicensedApplications();

     Set<ApplicationKey> keys = applications.getKeys();
     for (ApplicationKey key : keys)
     {
         int numSeats = roleDetails.getUserLimit( key );
         ...
     
 }
 

Summary

Public Methods
@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 key)
Returns the number of seats for the given com.atlassian.application.api.ApplicationKey.
@Internal 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.

Public Methods

@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 key)

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.

@Internal public boolean hasNativeRole ()

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

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.