Package com.logicaldoc.enterprise
Class UserCounter
java.lang.Object
com.logicaldoc.enterprise.UserCounter
- All Implemented Interfaces:
com.logicaldoc.core.security.user.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterStore
(com.logicaldoc.core.security.user.User user, com.logicaldoc.core.security.user.UserHistory transaction, Map<String, Object> dictionary) void
beforeStore
(com.logicaldoc.core.security.user.User user, com.logicaldoc.core.security.user.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)
-
Constructor Details
-
UserCounter
public UserCounter()
-
-
Method Details
-
afterStore
public void afterStore(com.logicaldoc.core.security.user.User user, com.logicaldoc.core.security.user.UserHistory transaction, Map<String, Object> dictionary) throws com.logicaldoc.core.PersistenceException- Specified by:
afterStore
in interfacecom.logicaldoc.core.security.user.UserListener
- Throws:
com.logicaldoc.core.PersistenceException
-
beforeStore
public void beforeStore(com.logicaldoc.core.security.user.User user, com.logicaldoc.core.security.user.UserHistory transaction, Map<String, Object> dictionary) throws com.logicaldoc.core.PersistenceException- Specified by:
beforeStore
in interfacecom.logicaldoc.core.security.user.UserListener
- Throws:
com.logicaldoc.core.PersistenceException
-
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
-