com.atlassian.bitbucket.license.LicenseService |
Provides license related functions.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a user is active and licensed to use the application.
| |||||||||||
Get the license of this instance.
| |||||||||||
Get the encoded license for this instance.
| |||||||||||
Get the number of licensed users currently in the system.
| |||||||||||
Get a message if the license is over its limits
| |||||||||||
Checks both the license validity and its limits.
| |||||||||||
Get a message regarding the validity of the currently configured license
| |||||||||||
Check whether a Data Center license is installed.
| |||||||||||
Check whether the license is valid, and operations are permitted.
| |||||||||||
Check whether the current instance has a license.
| |||||||||||
Add or replace the license of this instance.
| |||||||||||
Validate if the named user can be added to the specified group without violating license limits.
| |||||||||||
Validate if the specified group can be licensed without violating license limits.
| |||||||||||
Validate if the given user can be licensed without violating license limits
|
Check if a user is active and licensed to use the application.
principal | identifier for the user |
---|
true
if the user is both active and licensed
Get the license of this instance.
Get the encoded license for this instance. If no license has been set, this will return null
.
null
if no license is set
Get the number of licensed users currently in the system.
Get a message if the license is over its limits
Checks both the license validity and its limits.
Get a message regarding the validity of the currently configured license
Check whether a Data Center license is installed.
true
if a Data Center license is installed; otherwise, false
Check whether the license is valid, and operations are permitted.
true
if the license is valid and not exceeded, or in a grace period, false
otherwiseCheck whether the current instance has a license.
true
if the instance has an license (note: this will also return
true
if the license has expired.)
Add or replace the license of this instance.
license | new license of this instance |
---|
Validate if the named user can be added to the specified group without violating license limits.
If the group is not does not grant LICENSED_USER
, this check will always
pass. Otherwise, it validates that licensing an additional user would comply with license limits and will
throw a LicenseLimitException
if not.
username | the user to be added to the group |
---|---|
group | the group the user is to be added to |
LicenseLimitException | if adding the user to the group would exceed the number of licensed users allowed by the current license |
---|
Validate if the specified group can be licensed without violating license limits. Licensing a group licenses all of the users the group contains.
group | the group to be licensed |
---|---|
permission | the permission to be granted to the group |
LicenseLimitException | if granting the permission to the specified group, and all the users is contains, would exceed the number of licensed users allowed by the current license |
---|
Validate if the given user can be licensed without violating license limits
user | the user to be licensed |
---|---|
permission | the permission to be granted to the user |
LicenseLimitException | if granting the permission to the specified user would exceed the number of licensed users allowed by the current license |
---|