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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_KEY
public static final String CACHE_KEY
UNLIMITED_USER_THRESHOLD
protected static final int UNLIMITED_USER_THRESHOLD
- See Also:
- Constant Field Values
DefaultUserChecker
public DefaultUserChecker()
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 seperate (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()
isUnlimitedUserLicense
public boolean isUnlimitedUserLicense(com.atlassian.license.License license)
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
setCacheFactory
public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
getUserAccessor
public UserAccessor getUserAccessor()
- cannot use spring injection here because userChecker is a dependency of userAccessor.
retrieve from ContainerManager to avoid circular bean reference.