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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNLIMITED_USER_THRESHOLD
protected static final int UNLIMITED_USER_THRESHOLD
- See Also:
- Constant Field Values
DefaultUserChecker
public DefaultUserChecker()
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).
Technically, if this value is still being computed, we should not attempt to display this value.
We should wrap a call to this method in a check for the isRunning() first.
- Specified by:
getNumberOfRegisteredUsers
in interface UserChecker
getNumberOfRegisteredUsers
public int getNumberOfRegisteredUsers(int retries)
- 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
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-2008 Atlassian Pty Ltd. All Rights Reserved.