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