public class

DefaultUserChecker

extends Object
implements UserChecker
java.lang.Object
   ↳ com.atlassian.confluence.util.DefaultUserChecker

Summary

Constants
int UNLIMITED_USER_THRESHOLD
[Expand]
Inherited Constants
From interface com.atlassian.confluence.util.UserChecker
Fields
public static final String CACHE_KEY
[Expand]
Inherited Fields
From interface com.atlassian.confluence.util.UserChecker
Public Constructors
DefaultUserChecker()
Public Methods
void decrementRegisteredUserCount()
Decrements the cached number of registered users.
int getNumberOfRegisteredUsers()
Returns cached value of the number of registered users.
UserAccessor getUserAccessor()
cannot use spring injection here because userChecker is a dependency of userAccessor.
boolean hasTooManyUsers()
void incrementRegisteredUserCount()
Increments the cached number of registered users.
boolean isLicensedToAddMoreUsers()
boolean isRunning()
boolean isUnlimitedUserLicense()
boolean isUnlimitedUserLicense(License license)
void resetResult()
void setCacheFactory(CacheFactory cacheFactory)
void setLicenseCalculator(LicenseCalculator licenseCalculator)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.util.UserChecker

Constants

protected static final int UNLIMITED_USER_THRESHOLD

Constant Value: 9999 (0x0000270f)

Fields

public static final String CACHE_KEY

Public Constructors

public DefaultUserChecker ()

Public Methods

public void decrementRegisteredUserCount ()

Decrements the cached number of registered users.

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).

public UserAccessor getUserAccessor ()

cannot use spring injection here because userChecker is a dependency of userAccessor. retrieve from ContainerManager to avoid circular bean reference.

public boolean hasTooManyUsers ()

public void incrementRegisteredUserCount ()

Increments the cached number of registered users. only does so if cached value has been computed.

public boolean isLicensedToAddMoreUsers ()

public boolean isRunning ()

public boolean isUnlimitedUserLicense ()

public boolean isUnlimitedUserLicense (License license)

public void resetResult ()

public void setCacheFactory (CacheFactory cacheFactory)

public void setLicenseCalculator (LicenseCalculator licenseCalculator)