Class DefaultUserChecker

java.lang.Object
com.atlassian.confluence.util.DefaultUserChecker
All Implemented Interfaces:
UserChecker

public class DefaultUserChecker extends Object implements UserChecker
  • Field Details

    • CACHE_KEY

      @Deprecated public static final String CACHE_KEY
      Deprecated.
      since 5.10. Don't. Just don't.
  • Constructor Details

    • DefaultUserChecker

      public DefaultUserChecker()
  • Method Details

    • setLicenseCalculator

      public void setLicenseCalculator(LicenseCalculator licenseCalculator)
    • getNumberOfRegisteredUsers

      public int getNumberOfRegisteredUsers()
      Returns cached value of the number of registered users. Computes it if it doesn't exist in cache (this may take a while for large user sets). The value is calculated in a separate (read-only) thread. Returns -1 if the value cannot be computed successfully (for compatibility with existing code).
      Specified by:
      getNumberOfRegisteredUsers in interface UserChecker
    • hasTooManyUsers

      public boolean hasTooManyUsers()
      Specified by:
      hasTooManyUsers in interface UserChecker
    • isUnlimitedUserLicense

      public boolean isUnlimitedUserLicense()
      Specified by:
      isUnlimitedUserLicense in interface UserChecker
    • isUnlimitedUserLicense

      @Deprecated public boolean isUnlimitedUserLicense(com.atlassian.extras.api.confluence.ConfluenceLicense license)
      Deprecated.
      since 5.10 Use ProductLicense.isUnlimitedNumberOfUsers()
    • isLicensedToAddMoreUsers

      public boolean isLicensedToAddMoreUsers()
      Specified by:
      isLicensedToAddMoreUsers in interface UserChecker
    • resetResult

      public void resetResult()
      Specified by:
      resetResult in interface UserChecker
    • isRunning

      public boolean isRunning()
    • incrementRegisteredUserCount

      public void incrementRegisteredUserCount()
      Increments the cached number of registered users. only does so if cached value has been computed.
      Specified by:
      incrementRegisteredUserCount in interface UserChecker
    • decrementRegisteredUserCount

      public void decrementRegisteredUserCount()
      Decrements the cached number of registered users.
      Specified by:
      decrementRegisteredUserCount in interface UserChecker
    • setLicenseService

      public void setLicenseService(LicenseService licenseService)
    • setCacheFactory

      @Deprecated public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
      Deprecated.
      since 5.10
    • setRegisteredUsersCache

      public void setRegisteredUsersCache(RegisteredUsersCache registeredUsersCache)