Class FlushUserCheckerCacheOnLicenseUpdate
- java.lang.Object
-
- com.atlassian.confluence.license.store.FlushUserCheckerCacheOnLicenseUpdate
-
- All Implemented Interfaces:
UserChecker
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class FlushUserCheckerCacheOnLicenseUpdate extends Object implements UserChecker, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Listens forLicenceUpdatedEvent
s in order to reset the cache inUserChecker.resetResult()
.
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.util.UserChecker
NUMBER_OF_REGISTERED_USERS, UNLIMITED_USERS
-
-
Constructor Summary
Constructors Constructor Description FlushUserCheckerCacheOnLicenseUpdate(UserChecker delegate, com.atlassian.event.api.EventPublisher eventPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
decrementRegisteredUserCount()
void
destroy()
int
getNumberOfRegisteredUsers()
boolean
hasTooManyUsers()
void
incrementRegisteredUserCount()
boolean
isLicensedToAddMoreUsers()
boolean
isUnlimitedUserLicense()
void
listenForLicenseUpdate(LicenceUpdatedEvent event)
void
resetResult()
-
-
-
Constructor Detail
-
FlushUserCheckerCacheOnLicenseUpdate
public FlushUserCheckerCacheOnLicenseUpdate(UserChecker delegate, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Detail
-
listenForLicenseUpdate
@EventListener public void listenForLicenseUpdate(LicenceUpdatedEvent event)
-
getNumberOfRegisteredUsers
public int getNumberOfRegisteredUsers()
- Specified by:
getNumberOfRegisteredUsers
in interfaceUserChecker
-
hasTooManyUsers
public boolean hasTooManyUsers()
- Specified by:
hasTooManyUsers
in interfaceUserChecker
-
isLicensedToAddMoreUsers
public boolean isLicensedToAddMoreUsers()
- Specified by:
isLicensedToAddMoreUsers
in interfaceUserChecker
-
incrementRegisteredUserCount
public void incrementRegisteredUserCount()
- Specified by:
incrementRegisteredUserCount
in interfaceUserChecker
-
decrementRegisteredUserCount
public void decrementRegisteredUserCount()
- Specified by:
decrementRegisteredUserCount
in interfaceUserChecker
-
resetResult
public void resetResult()
- Specified by:
resetResult
in interfaceUserChecker
-
isUnlimitedUserLicense
public boolean isUnlimitedUserLicense()
- Specified by:
isUnlimitedUserLicense
in interfaceUserChecker
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
-