Package com.atlassian.confluence.util
Class DefaultUserChecker
java.lang.Object
com.atlassian.confluence.util.DefaultUserChecker
- All Implemented Interfaces:
UserChecker
-
Field Summary
Fields inherited from interface com.atlassian.confluence.util.UserChecker
NUMBER_OF_REGISTERED_USERS, UNLIMITED_USERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Decrements the cached number of registered users.int
Returns cached value of the number of registered users.boolean
void
Increments the cached number of registered users.boolean
boolean
boolean
boolean
isUnlimitedUserLicense
(com.atlassian.extras.api.confluence.ConfluenceLicense license) Deprecated.since 5.10 UseProductLicense.isUnlimitedNumberOfUsers()
void
void
setCacheFactory
(com.atlassian.cache.CacheFactory cacheFactory) Deprecated.since 5.10void
setLicenseCalculator
(LicenseCalculator licenseCalculator) void
setLicenseService
(LicenseService licenseService) void
setRegisteredUsersCache
(RegisteredUsersCache registeredUsersCache)
-
Field Details
-
CACHE_KEY
Deprecated.since 5.10. Don't. Just don't.
-
-
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:
getNumberOfRegisteredUsers
in interfaceUserChecker
-
hasTooManyUsers
public boolean hasTooManyUsers()- Specified by:
hasTooManyUsers
in interfaceUserChecker
-
isUnlimitedUserLicense
public boolean isUnlimitedUserLicense()- Specified by:
isUnlimitedUserLicense
in interfaceUserChecker
-
isUnlimitedUserLicense
@Deprecated public boolean isUnlimitedUserLicense(com.atlassian.extras.api.confluence.ConfluenceLicense license) Deprecated.since 5.10 UseProductLicense.isUnlimitedNumberOfUsers()
-
isLicensedToAddMoreUsers
public boolean isLicensedToAddMoreUsers()- Specified by:
isLicensedToAddMoreUsers
in interfaceUserChecker
-
resetResult
public void resetResult()- Specified by:
resetResult
in 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:
incrementRegisteredUserCount
in interfaceUserChecker
-
decrementRegisteredUserCount
public void decrementRegisteredUserCount()Decrements the cached number of registered users.- Specified by:
decrementRegisteredUserCount
in interfaceUserChecker
-
setLicenseService
-
setCacheFactory
Deprecated.since 5.10 -
setRegisteredUsersCache
-