@Transactional public class ApplicationLicensingServiceImpl extends Object implements ApplicationLicensingService
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_ID_PARAM |
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
boolean |
canShowLicenseUsageForApplication(Long applicationId)
Checks whether license usage data can be fetched/shown for the given application
|
void |
clearAllJobs(Application application)
Clears all jobs scheduled for an application
|
Optional<ApplicationLicensingSummary> |
getLicensingSummary(Long applicationId,
String appSubType,
Long version)
Return the licensing summary if available
|
boolean |
isLicensingConfigured(Long applicationId)
Checks if licensing is configured for specific application
|
boolean |
isVersionUptoDate(Long applicationId,
String appSubType,
Long version)
Checks whether requested version is up to date or not for the given
ApplicationSubtype if supplied |
List<ApplicationLicensedDirectory> |
listDirectories(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 application
|
List<ApplicationSubtype> |
listJiraTypes(Long applicationId,
Long version)
Returns list of jira sub-types available for the given
ApplicationType.JIRA
application |
void |
scheduleRefreshApplicationDataJobImmediately(long applicationId)
Schedules updating application license usage data immediately
|
com.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
query
|
boolean |
updateApplicationData(Application application)
Fetches the license usage data from the application and updates the local copy
|
public static final String APPLICATION_ID_PARAM
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)
public boolean canShowLicenseUsageForApplication(Long applicationId) throws ApplicationNotFoundException
ApplicationLicensingService
canShowLicenseUsageForApplication
in interface ApplicationLicensingService
ApplicationNotFoundException
public boolean isVersionUptoDate(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException
ApplicationLicensingService
ApplicationSubtype
if suppliedisVersionUptoDate
in interface ApplicationLicensingService
ApplicationNotFoundException
public List<ApplicationSubtype> listJiraTypes(Long applicationId, Long version) throws ApplicationNotFoundException
ApplicationLicensingService
ApplicationType.JIRA
applicationlistJiraTypes
in interface ApplicationLicensingService
ApplicationNotFoundException
public List<ApplicationLicensedDirectory> listDirectories(Long applicationId, String appSubType, Long version, int start, int limit) throws ApplicationNotFoundException
ApplicationLicensingService
listDirectories
in interface ApplicationLicensingService
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 resultsApplicationNotFoundException
- if application id invalidpublic com.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
ApplicationLicensingService
searchLicensedUsers
in interface ApplicationLicensingService
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 resultsObjectNotFoundException
public Optional<ApplicationLicensingSummary> getLicensingSummary(Long applicationId, String appSubType, Long version) throws ApplicationNotFoundException
ApplicationLicensingService
getLicensingSummary
in interface ApplicationLicensingService
ApplicationNotFoundException
public boolean updateApplicationData(Application application)
ApplicationLicensingService
updateApplicationData
in interface ApplicationLicensingService
public void scheduleRefreshApplicationDataJobImmediately(long applicationId) throws ApplicationNotFoundException
ApplicationLicensingService
scheduleRefreshApplicationDataJobImmediately
in interface ApplicationLicensingService
ApplicationNotFoundException
public void clearAllJobs(Application application)
ApplicationLicensingService
clearAllJobs
in interface ApplicationLicensingService
public boolean isLicensingConfigured(Long applicationId) throws ApplicationNotFoundException
ApplicationLicensingService
isLicensingConfigured
in interface ApplicationLicensingService
applicationId
- ID of application to checkApplicationNotFoundException
Copyright © 2020 Atlassian. All rights reserved.