com.atlassian.confluence.util
Class DefaultUserChecker
java.lang.Object
com.atlassian.confluence.util.DefaultUserChecker
- All Implemented Interfaces:
- UserChecker
public class DefaultUserChecker
- extends java.lang.Object
- implements UserChecker
Field Summary |
static java.lang.String |
CACHE_KEY
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_KEY
public static final java.lang.String CACHE_KEY
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 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
public boolean isUnlimitedUserLicense(com.atlassian.extras.api.confluence.ConfluenceLicense 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
setLicenseService
public void setLicenseService(LicenseService licenseService)
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.
Copyright © 2003-2014 Atlassian. All Rights Reserved.