public interface CrowdLicenseManager
Modifier and Type | Method and Description |
---|---|
int |
getCurrentResourceUsageTotal()
This will calculate the number of unique Principals currently being used by Crowd.
|
com.atlassian.extras.api.crowd.CrowdLicense |
getLicense()
This will retrieve the license for the currently running Crowd instance.
|
boolean |
isBuildWithinMaintenancePeriod() |
boolean |
isBuildWithinMaintenancePeriod(com.atlassian.extras.api.crowd.CrowdLicense license)
Return's true if the current Build is within the maintenance period for the Crowd license
|
boolean |
isBuildWithinMaintenancePeriod(String key) |
boolean |
isLicenseKeyValid(String key)
Will validate that a given License key is valid
|
boolean |
isLicenseValid()
This will evaluate against the current license stored in Crowd LicenseStore
|
boolean |
isLicenseValid(com.atlassian.extras.api.crowd.CrowdLicense license)
Same logic as
isLicenseValid() |
boolean |
isResourceTotalOverLimit(float limit,
int currentResourceCount)
Calculates the percentage of currentResourceCount over the user limit on a license
and returns true or false if the percentage is above the passed in limit.
|
boolean |
isSetupLicenseKeyValid(String key)
Checks if a license key valid for set up.
|
com.atlassian.extras.api.crowd.CrowdLicense |
storeLicense(String license)
This will store the license in the LicenseStore for the currently running Crowd instance.
|
com.atlassian.extras.api.crowd.CrowdLicense getLicense()
com.atlassian.extras.api.crowd.CrowdLicense storeLicense(String license)
boolean isLicenseValid()
boolean isLicenseValid(com.atlassian.extras.api.crowd.CrowdLicense license)
isLicenseValid()
boolean isLicenseKeyValid(String key)
key
- the String to validateboolean isSetupLicenseKeyValid(String key)
key
- the String to validate.int getCurrentResourceUsageTotal() throws CrowdLicenseManagerException
LicenseResourceJob
.
Please use consider using PropertyManager.getCurrentLicenseResourceTotal()
Note: Do not call this method from the web layer, as this is wrapped in a Spring managed transactionCrowdLicenseManagerException
boolean isResourceTotalOverLimit(float limit, int currentResourceCount)
limit
- the percentage limit to test againstcurrentResourceCount
- the current number of resources in the system.boolean isBuildWithinMaintenancePeriod(com.atlassian.extras.api.crowd.CrowdLicense license)
license
- boolean isBuildWithinMaintenancePeriod(String key)
boolean isBuildWithinMaintenancePeriod()
Copyright © 2013 Atlassian. All Rights Reserved.