Class UserCounter

java.lang.Object
com.logicaldoc.enterprise.UserCounter
All Implemented Interfaces:
com.logicaldoc.core.security.user.UserListener

public class UserCounter extends Object implements 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 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 interface com.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 interface com.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