Interface ApplicationLicensingService


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 Details

    • canShowLicenseUsageForApplication

      boolean canShowLicenseUsageForApplication(Long applicationId) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Checks whether license usage data can be fetched/shown for the given application
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException
    • isVersionUptoDate

      boolean isVersionUptoDate(Long applicationId, String appSubType, Long version) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Checks whether requested version is up to date or not for the given ApplicationSubtype if supplied
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException
    • listJiraTypes

      List<com.atlassian.crowd.model.ApplicationSubtype> listJiraTypes(Long applicationId, Long version) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Returns list of jira sub-types available for the given ApplicationType.JIRA application
      Throws:
      IllegalArgumentException - if application is not Jira type
      com.atlassian.crowd.exception.ApplicationNotFoundException
    • listDirectories

      List<ApplicationLicensedDirectory> listDirectories(Long applicationId, String appSubType, Long version, int start, int limit) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Returns list of directories linked to the users who are consuming licenses in the given application
      Parameters:
      applicationId - application id to search users for
      appSubType - Jira subtype, only if the application type is Jira
      version - version of data requested
      start - start offset for the results
      limit - maximum number of results
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException - if application id invalid
      IllegalArgumentException - If version is not available
      IllegalStateException - 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 com.atlassian.crowd.exception.ObjectNotFoundException
      Returns list of license consuming users in the products along with the total count of users matching the supplied query
      Parameters:
      applicationId - application id
      searchText - search text to be matched across username, email and full name
      directoryId - directory id to which the user belong
      appSubType - application subtype, only applicable for Jira application
      lastLoggedInDate - last logged in date on or before
      version - version
      start - offset
      limit - max number of results
      Throws:
      com.atlassian.crowd.exception.ObjectNotFoundException
    • getLicensingSummary

      Optional<ApplicationLicensingSummary> getLicensingSummary(Long applicationId, String appSubType, Long version) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Return the licensing summary if available
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException
    • updateApplicationData

      boolean updateApplicationData(com.atlassian.crowd.model.application.Application application)
      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 com.atlassian.crowd.exception.ApplicationNotFoundException
      Schedules updating application license usage data immediately
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException
    • clearAllJobs

      void clearAllJobs(com.atlassian.crowd.model.application.Application application)
      Clears all jobs scheduled for an application
    • isLicensingConfigured

      boolean isLicensingConfigured(Long applicationId) throws com.atlassian.crowd.exception.ApplicationNotFoundException
      Checks if licensing is configured for specific application
      Parameters:
      applicationId - ID of application to check
      Throws:
      com.atlassian.crowd.exception.ApplicationNotFoundException