Package com.atlassian.crowd.licensing
Interface ApplicationLicensingService
- All Known Implementing Classes:
ApplicationLicensingServiceImpl
public interface ApplicationLicensingService
Component controlling the feature of application license usage monitoring, it is a god class for fetching usage data
from the application as well as storing the data and serving the queries for it.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canShowLicenseUsageForApplication
(Long applicationId) Checks whether license usage data can be fetched/shown for the given applicationvoid
clearAllJobs
(Application application) Clears all jobs scheduled for an applicationgetLicensingSummary
(Long applicationId, String appSubType, Long version) Return the licensing summary if availableboolean
isLicensingConfigured
(Long applicationId) Checks if licensing is configured for specific applicationboolean
isVersionUptoDate
(Long applicationId, String appSubType, Long version) Checks whether requested version is up to date or not for the givenApplicationSubtype
if suppliedlistDirectories
(Long applicationId, String appSubType, Long version, int start, int limit) Returns list of directories linked to the users who are consuming licenses in the given applicationlistJiraTypes
(Long applicationId, Long version) Returns list of jira sub-types available for the givenApplicationType.JIRA
applicationvoid
scheduleRefreshApplicationDataJobImmediately
(long applicationId) Schedules updating application license usage data immediatelyio.atlassian.fugue.Pair<List<ApplicationLicensedUser>,
Long> searchLicensedUsers
(Long applicationId, String searchText, String directoryId, String appSubType, Long lastLoggedInDate, Long version, int start, int limit) Returns list of license consuming users in the products along with the total count of users matching the supplied queryboolean
updateApplicationData
(Application application) Fetches the license usage data from the application and updates the local copy
-
Method Details
-
canShowLicenseUsageForApplication
Checks whether license usage data can be fetched/shown for the given application- Throws:
ApplicationNotFoundException
-
isVersionUptoDate
boolean isVersionUptoDate(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException Checks whether requested version is up to date or not for the givenApplicationSubtype
if supplied- Throws:
ApplicationNotFoundException
-
listJiraTypes
List<ApplicationSubtype> listJiraTypes(Long applicationId, Long version) throws ApplicationNotFoundException Returns list of jira sub-types available for the givenApplicationType.JIRA
application- Throws:
IllegalArgumentException
- if application is not Jira typeApplicationNotFoundException
-
listDirectories
List<ApplicationLicensedDirectory> listDirectories(Long applicationId, String appSubType, Long version, int start, int limit) throws ApplicationNotFoundException Returns list of directories linked to the users who are consuming licenses in the given application- Parameters:
applicationId
- application id to search users forappSubType
- Jira subtype, only if the application type is Jiraversion
- version of data requestedstart
- start offset for the resultslimit
- maximum number of results- Throws:
ApplicationNotFoundException
- if application id invalidIllegalArgumentException
- If version is not availableIllegalStateException
- If supplied application sub type is invalid
-
searchLicensedUsers
io.atlassian.fugue.Pair<List<ApplicationLicensedUser>,Long> searchLicensedUsers(Long applicationId, String searchText, String directoryId, String appSubType, Long lastLoggedInDate, Long version, int start, int limit) throws ObjectNotFoundException Returns list of license consuming users in the products along with the total count of users matching the supplied query- Parameters:
applicationId
- application idsearchText
- search text to be matched across username, email and full namedirectoryId
- directory id to which the user belongappSubType
- application subtype, only applicable for Jira applicationlastLoggedInDate
- last logged in date on or beforeversion
- versionstart
- offsetlimit
- max number of results- Throws:
ObjectNotFoundException
-
getLicensingSummary
Optional<ApplicationLicensingSummary> getLicensingSummary(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException Return the licensing summary if available- Throws:
ApplicationNotFoundException
-
updateApplicationData
Fetches the license usage data from the application and updates the local copy- Returns:
- true if application data was updated, or else false
-
scheduleRefreshApplicationDataJobImmediately
void scheduleRefreshApplicationDataJobImmediately(long applicationId) throws ApplicationNotFoundException Schedules updating application license usage data immediately- Throws:
ApplicationNotFoundException
-
clearAllJobs
Clears all jobs scheduled for an application -
isLicensingConfigured
Checks if licensing is configured for specific application- Parameters:
applicationId
- ID of application to check- Throws:
ApplicationNotFoundException
-