com.atlassian.confluence.license.store
Class FlushUserCheckerCacheOnLicenseUpdate

java.lang.Object
  extended by 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 for LicenceUpdatedEvents in order to reset the cache in UserChecker.resetResult().


Field Summary
 
Fields inherited from interface com.atlassian.confluence.util.UserChecker
log, NUMBER_OF_REGISTERED_USERS, UNLIMITED_USERS
 
Constructor Summary
FlushUserCheckerCacheOnLicenseUpdate(UserChecker delegate, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void afterPropertiesSet()
           
 void decrementRegisteredUserCount()
           
 void destroy()
           
 int getNumberOfRegisteredUsers()
           
 boolean hasTooManyUsers()
           
 void incrementRegisteredUserCount()
           
 boolean isLicensedToAddMoreUsers()
           
 void listenForLicenseUpdate(LicenceUpdatedEvent event)
           
 void resetResult()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface UserChecker

hasTooManyUsers

public boolean hasTooManyUsers()
Specified by:
hasTooManyUsers in interface UserChecker

isLicensedToAddMoreUsers

public boolean isLicensedToAddMoreUsers()
Specified by:
isLicensedToAddMoreUsers in interface UserChecker

incrementRegisteredUserCount

public void incrementRegisteredUserCount()
Specified by:
incrementRegisteredUserCount in interface UserChecker

decrementRegisteredUserCount

public void decrementRegisteredUserCount()
Specified by:
decrementRegisteredUserCount in interface UserChecker

resetResult

public void resetResult()
Specified by:
resetResult in interface UserChecker

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception


Copyright © 2003-2013 Atlassian. All Rights Reserved.