@ExperimentalApi public class DefaultLicenseRoleDetails extends Object implements LicenseRoleDetails
LicenseRoleDetails
.
This implementation fails fast (in the constructor) on detection of invalid license or license role details.
UNLIMITED_USERS
Constructor and Description |
---|
DefaultLicenseRoleDetails(String license,
com.atlassian.extras.decoder.api.LicenseDecoder licenseDecoder) |
Modifier and Type | Method and Description |
---|---|
Set<LicenseRoleId> |
getIds()
Returns the
license roles encoded in the present license. |
Set<LicenseRoleId> |
getLicenseRoles()
Returns the
license roles encoded in the present license. |
int |
getUserLimit(LicenseRoleId role)
Returns the number of seats for the given
LicenseRoleId . |
public DefaultLicenseRoleDetails(@Nonnull String license, @Nonnull com.atlassian.extras.decoder.api.LicenseDecoder licenseDecoder) throws com.atlassian.extras.common.LicenseException
license
- An encoded license string.licenseDecoder
- A license decoder capable of decoding the given license.com.atlassian.extras.common.LicenseException
- on detection of invalid roles or role user counts.@Nonnull public Set<LicenseRoleId> getLicenseRoles()
license roles
encoded in the present license. This may return an empty set, but
never returns null.
Note: This implementation returns an unmodifiable Set
.getLicenseRoles
in interface LicenseRoleDetails
@Nonnull public Set<LicenseRoleId> getIds()
license roles
encoded in the present license. This may return an empty set, but
never returns null.
Note: This implementation returns an unmodifiable Set
.getIds
in interface LicenseRoleDetails
public int getUserLimit(@Nonnull LicenseRoleId role)
LicenseRoleDetails
LicenseRoleId
.getUserLimit
in interface LicenseRoleDetails
LicenseRoleDetails.UNLIMITED_USERS
.Copyright © 2002-2015 Atlassian. All Rights Reserved.