As of Feb 15, 2024, Atlassian Marketplace will no longer offer sales and support for server apps. We are in the process of updating the server related information in DAC to reflect this change and some of the existing information may not align with the current experience. If you're considering cloud or have migrating customers, here's the step-by-step guide to help moving your app and customers to cloud.
The UPM licensing API checks app licenses for validity, and returns an error that apps can use to enforce license validity in a custom manner. The error conditions are listed below.
By default, an invalid license is enforced differently between standard and evaluation licenses, as follows:
You can implement your own license enforcement behavior through the PluginLicenseManager
class. For example, an invalid license may cause your app to function in read-only mode, or you might choose to display a renewal banner.
The class includes the getLicense()
method, which lets you check the validity of the license for the current app. You can check the license validity using the getError()
method, as in the following form:
1 2if (licenseManager.getLicense().isDefined()) { PluginLicense license = licenseManager.getLicense().get(); if (license.getError().isDefined()) { // handle license error scenario // (e.g., expiration or user mismatch) } else { // handle valid license scenario } } else { // handle unlicensed scenario }
If there are no error conditions, the license is valid.
We recommend that you check for license validity at each of the app's entry points. Upon detecting an invalid license you can either hide all UI elements, make your app read-only, disable your app, or any other behavior your define.
If there is a license error, the getError()
method will return one of the following conditions:
Conditions | Description |
---|---|
| A license is invalid if the current date is greater than or equal to the license's expiration date. Normally, only evaluation and subscription licenses have expiration dates. Perpetual licenses do not have expiration dates; instead, perpetual licenses have maintenance expiration dates after which the app should continue to be fully functioning, but the customer will no longer be eligible for app updates or support. Suggested error message:
|
| A license is invalid if its type (commercial, developer, academic, etc.) is incompatible with the type of the application license:
Starting with UPM 2.7, Enterprise license enforcement is also supported. Customers using UPM 2.7 or later will also have an incompatibility:
Suggested error message:
|
| A license is invalid if its maximum number of users property is less than that of the application license:
Suggested error message:
|
| This error currently only applies to Bamboo app licenses. A license is invalid if its maximum number of remote agents property is less than that of the application license:
Suggested error message:
|
| A license is invalid if the app's build date is greater than or equal to the license's maintenance expiration date. That is, if the license says that support is only available through 1/1/2012, then an existing installation of a app version with a build date of 1/1/2011 will continue working indefinitely, but if you install a new version built on 1/2/2012 or later it will not work with the old license. The app build date is indicated by an Atlassian-specific property in the manifest of the app JAR,
|
Rate this page: