Package com.atlassian.crowd.licensing
Class ApplicationLicensingServiceImpl
java.lang.Object
com.atlassian.crowd.licensing.ApplicationLicensingServiceImpl
- All Implemented Interfaces:
ApplicationLicensingService
@Transactional
public class ApplicationLicensingServiceImpl
extends Object
implements ApplicationLicensingService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionApplicationLicensingServiceImpl(DirectoryManager directoryManager, LicensingSummaryDao licensingSummaryDao, LicensedUserDao licensedUserDao, DirectoryInfoDao directoryInfoDao, ApplicationDAO applicationDAO, com.atlassian.beehive.ClusterLockService lockService, Clock clock, ApplicationLinkServiceSupplier serviceSupplier, com.atlassian.scheduler.SchedulerService schedulerService, ApplicationLicensingEnabledChecker licensingEnabledChecker) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanShowLicenseUsageForApplication(Long applicationId) Checks whether license usage data can be fetched/shown for the given applicationvoidclearAllJobs(Application application) Clears all jobs scheduled for an applicationgetLicensingSummary(Long applicationId, String appSubType, Long version) Return the licensing summary if availablebooleanisLicensingConfigured(Long applicationId) Checks if licensing is configured for specific applicationbooleanisVersionUptoDate(Long applicationId, String appSubType, Long version) Checks whether requested version is up to date or not for the givenApplicationSubtypeif 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.JIRAapplicationvoidscheduleRefreshApplicationDataJobImmediately(long applicationId) Schedules updating application license usage data immediatelyio.atlassian.fugue.Pair<List<ApplicationLicensedUser>,Long> searchLicensedUsers(Long applicationId, String searchText, String directoryId, String productType, 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 querybooleanupdateApplicationData(Application application) Fetches the license usage data from the application and updates the local copy
-
Field Details
-
APPLICATION_ID_PARAM
- See Also:
-
-
Constructor Details
-
ApplicationLicensingServiceImpl
public ApplicationLicensingServiceImpl(DirectoryManager directoryManager, LicensingSummaryDao licensingSummaryDao, LicensedUserDao licensedUserDao, DirectoryInfoDao directoryInfoDao, ApplicationDAO applicationDAO, com.atlassian.beehive.ClusterLockService lockService, Clock clock, ApplicationLinkServiceSupplier serviceSupplier, com.atlassian.scheduler.SchedulerService schedulerService, ApplicationLicensingEnabledChecker licensingEnabledChecker)
-
-
Method Details
-
canShowLicenseUsageForApplication
public boolean canShowLicenseUsageForApplication(Long applicationId) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceChecks whether license usage data can be fetched/shown for the given application- Specified by:
canShowLicenseUsageForApplicationin interfaceApplicationLicensingService- Throws:
ApplicationNotFoundException
-
isVersionUptoDate
public boolean isVersionUptoDate(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceChecks whether requested version is up to date or not for the givenApplicationSubtypeif supplied- Specified by:
isVersionUptoDatein interfaceApplicationLicensingService- Throws:
ApplicationNotFoundException
-
listJiraTypes
public List<ApplicationSubtype> listJiraTypes(Long applicationId, Long version) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceReturns list of jira sub-types available for the givenApplicationType.JIRAapplication- Specified by:
listJiraTypesin interfaceApplicationLicensingService- Throws:
ApplicationNotFoundException
-
listDirectories
public List<ApplicationLicensedDirectory> listDirectories(Long applicationId, String appSubType, Long version, int start, int limit) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceReturns list of directories linked to the users who are consuming licenses in the given application- Specified by:
listDirectoriesin interfaceApplicationLicensingService- 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 invalid
-
searchLicensedUsers
public io.atlassian.fugue.Pair<List<ApplicationLicensedUser>,Long> searchLicensedUsers(Long applicationId, String searchText, String directoryId, String productType, Long lastLoggedInDate, Long version, int start, int limit) throws ObjectNotFoundException Description copied from interface:ApplicationLicensingServiceReturns list of license consuming users in the products along with the total count of users matching the supplied query- Specified by:
searchLicensedUsersin interfaceApplicationLicensingService- Parameters:
applicationId- application idsearchText- search text to be matched across username, email and full namedirectoryId- directory id to which the user belongproductType- application subtype, only applicable for Jira applicationlastLoggedInDate- last logged in date on or beforeversion- versionstart- offsetlimit- max number of results- Throws:
ObjectNotFoundException
-
getLicensingSummary
public Optional<ApplicationLicensingSummary> getLicensingSummary(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceReturn the licensing summary if available- Specified by:
getLicensingSummaryin interfaceApplicationLicensingService- Throws:
ApplicationNotFoundException
-
updateApplicationData
Description copied from interface:ApplicationLicensingServiceFetches the license usage data from the application and updates the local copy- Specified by:
updateApplicationDatain interfaceApplicationLicensingService- Returns:
- true if application data was updated, or else false
-
scheduleRefreshApplicationDataJobImmediately
public void scheduleRefreshApplicationDataJobImmediately(long applicationId) throws ApplicationNotFoundException Description copied from interface:ApplicationLicensingServiceSchedules updating application license usage data immediately- Specified by:
scheduleRefreshApplicationDataJobImmediatelyin interfaceApplicationLicensingService- Throws:
ApplicationNotFoundException
-
clearAllJobs
Description copied from interface:ApplicationLicensingServiceClears all jobs scheduled for an application- Specified by:
clearAllJobsin interfaceApplicationLicensingService
-
isLicensingConfigured
Description copied from interface:ApplicationLicensingServiceChecks if licensing is configured for specific application- Specified by:
isLicensingConfiguredin interfaceApplicationLicensingService- Parameters:
applicationId- ID of application to check- Throws:
ApplicationNotFoundException
-