@ExperimentalApi public class

DefaultLicenseRoleDetails

extends Object
implements LicenseRoleDetails
java.lang.Object
   ↳ com.atlassian.jira.license.DefaultLicenseRoleDetails

@ExperimentalApi

This class is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

Default implementation of LicenseRoleDetails.

This implementation fails fast (in the constructor) on detection of invalid license or license role details.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.license.LicenseRoleDetails
Public Constructors
DefaultLicenseRoleDetails(String license, LicenseDecoder licenseDecoder)
Public Methods
@Nonnull Set<LicenseRoleId> getLicenseRoles()
Returns the license roles encoded in the present license. Note: This implementation returns an unmodifiable Set.
int getUserLimit(LicenseRoleId role)
Returns the number of seats for the given LicenseRoleId.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.license.LicenseRoleDetails

Public Constructors

public DefaultLicenseRoleDetails (String license, LicenseDecoder licenseDecoder)

Parameters
license An encoded license string.
licenseDecoder A license decoder capable of decoding the given license.
Throws
LicenseException on detection of invalid roles or role user counts.

Public Methods

@Nonnull public Set<LicenseRoleId> getLicenseRoles ()

Returns the license roles encoded in the present license. Note: This implementation returns an unmodifiable Set.

public int getUserLimit (LicenseRoleId role)

Returns the number of seats for the given LicenseRoleId.

Returns
  • the number of users/seats for the given license role; see also UNLIMITED_USERS.