Package com.logicaldoc.enterprise
Class UserCounter
- java.lang.Object
-
- com.logicaldoc.enterprise.UserCounter
-
- All Implemented Interfaces:
com.logicaldoc.core.security.UserListener
public class UserCounter extends Object implements com.logicaldoc.core.security.UserListener
Counter class optimized for database user counting. No internal static counter is maintained and a direct database query is always performed.- Since:
- 5.2
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description UserCounter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterStore(com.logicaldoc.core.security.User user, com.logicaldoc.core.security.UserHistory transaction, Map<String,Object> dictionary)
void
beforeStore(com.logicaldoc.core.security.User user, com.logicaldoc.core.security.UserHistory transaction, Map<String,Object> dictionary)
static void
validateGuestCount(long tenantId, boolean addingNewUser)
static void
validateGuestCount(com.logicaldoc.core.security.Tenant tenant, boolean addingNewUser)
static void
validateUserCount(long tenantId, boolean addingNewUser)
static void
validateUserCount(com.logicaldoc.core.security.Tenant tenant, boolean addingNewUser)
-
-
-
Method Detail
-
afterStore
public void afterStore(com.logicaldoc.core.security.User user, com.logicaldoc.core.security.UserHistory transaction, Map<String,Object> dictionary) throws Exception
- Specified by:
afterStore
in interfacecom.logicaldoc.core.security.UserListener
- Throws:
Exception
-
beforeStore
public void beforeStore(com.logicaldoc.core.security.User user, com.logicaldoc.core.security.UserHistory transaction, Map<String,Object> dictionary) throws Exception
- Specified by:
beforeStore
in interfacecom.logicaldoc.core.security.UserListener
- Throws:
Exception
-
validateUserCount
public static void validateUserCount(com.logicaldoc.core.security.Tenant tenant, boolean addingNewUser) throws MaxUsersException, com.logicaldoc.core.PersistenceException
- Throws:
MaxUsersException
com.logicaldoc.core.PersistenceException
-
validateGuestCount
public static void validateGuestCount(com.logicaldoc.core.security.Tenant tenant, boolean addingNewUser) throws MaxGuestsException, com.logicaldoc.core.PersistenceException
- Throws:
MaxGuestsException
com.logicaldoc.core.PersistenceException
-
validateUserCount
public static void validateUserCount(long tenantId, boolean addingNewUser) throws MaxUsersException, com.logicaldoc.core.PersistenceException
- Throws:
MaxUsersException
com.logicaldoc.core.PersistenceException
-
validateGuestCount
public static void validateGuestCount(long tenantId, boolean addingNewUser) throws MaxGuestsException, com.logicaldoc.core.PersistenceException
- Throws:
MaxGuestsException
com.logicaldoc.core.PersistenceException
-
-