Package com.atlassian.sal.api.license
Interface ProductLicense
- All Known Subinterfaces:
SingleProductLicenseDetailsView
@PublicApi
public interface ProductLicense
Represents license information for an individual role-based "Product" that lives on a platform.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of users allowed by the current license.Returns the "official" product name (e.g.Returns the canonical product key as defined by the respective source license.getProperty(String property) Returns the license property value for the given property of this product.booleanReturns true if this license authorises an unlimited number of users.
-
Field Details
-
UNLIMITED_USER_COUNT
static final int UNLIMITED_USER_COUNT- See Also:
-
-
Method Details
-
getProductKey
Returns the canonical product key as defined by the respective source license. Product keys both uniquely identify a product across all Atlassian products, but also define the product's license key namespace.For example, a license containing
com.gliffy.integration.jira.activewould return a product key ofcom.gliffy.integration.jira, and every other license key relevant to this plugin is expected to be of form:com.gliffy.integration.jira.interestingProperty- Returns:
- the product key
-
isUnlimitedNumberOfUsers
boolean isUnlimitedNumberOfUsers()Returns true if this license authorises an unlimited number of users.- Returns:
- true if this license authorises an unlimited number of users.
- See Also:
-
getNumberOfUsers
int getNumberOfUsers()Returns the number of users allowed by the current license.- Returns:
- the number of user allowed by the license,
UNLIMITED_USER_COUNTif there is no limit, or the number of users is unlimited. - See Also:
-
getProductDisplayName
Returns the "official" product name (e.g. "Service Desk") as it is defined in the license, otherwise on a best-effort basis. Typically, product names are expected to be defined by the plugin/product itself, or hardcoded in the host product/platform. The expected use-case for this method is providing a product name for the case where the license is installed but the plugin is not. Note that the product name is almost always a trademark and accordingly should never be internationalised.- Returns:
- the "official" product name as it appears in the license, or otherwise on a best-effort basis.
-
getProperty
Returns the license property value for the given property of this product. This is generally expected to be equivalent to the following expression:BaseLicenseDetails.getProperty(java.lang.String)(getProductKey()+ "." + property)- Parameters:
property- the license property name, without this product's namespace.- Returns:
- the license property value, or null if not defined.
-