Class DefaultUserChecker
java.lang.Object
com.atlassian.confluence.impl.license.DefaultUserChecker
- All Implemented Interfaces:
UserChecker
-
Field Summary
Fields inherited from interface com.atlassian.confluence.util.UserChecker
NUMBER_OF_REGISTERED_USERS, UNLIMITED_USERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDecrements the cached number of registered users.intReturns cached value of the number of registered users.booleanvoidIncrements the cached number of registered users.booleanbooleanbooleanvoidvoidsetLicenseCalculator(LicenseCalculator licenseCalculator) voidsetLicenseService(LicenseService licenseService) voidsetRegisteredUsersCache(RegisteredUsersCache registeredUsersCache)
-
Constructor Details
-
DefaultUserChecker
public DefaultUserChecker()
-
-
Method Details
-
setLicenseCalculator
-
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:
getNumberOfRegisteredUsersin interfaceUserChecker
-
hasTooManyUsers
public boolean hasTooManyUsers()- Specified by:
hasTooManyUsersin interfaceUserChecker
-
isUnlimitedUserLicense
public boolean isUnlimitedUserLicense()- Specified by:
isUnlimitedUserLicensein interfaceUserChecker
-
isLicensedToAddMoreUsers
public boolean isLicensedToAddMoreUsers()- Specified by:
isLicensedToAddMoreUsersin interfaceUserChecker
-
resetResult
public void resetResult()- Specified by:
resetResultin interfaceUserChecker
-
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:
incrementRegisteredUserCountin interfaceUserChecker
-
decrementRegisteredUserCount
public void decrementRegisteredUserCount()Decrements the cached number of registered users.- Specified by:
decrementRegisteredUserCountin interfaceUserChecker
-
setLicenseService
-
setRegisteredUsersCache
-