Class QuotaUtil

java.lang.Object
com.logicaldoc.enterprise.QuotaUtil

public class QuotaUtil extends Object
Utility methods for quota handling
Since:
7.6.2
Author:
Marco Meschieri - LogicalDOC
  • Method Details

    • notifyQuotaAlert

      public static void notifyQuotaAlert(com.logicaldoc.core.security.Tenant tenant, com.logicaldoc.core.folder.Folder workspace, Long totalDocs, Long totalSize, Integer totalUsers, Integer totalGuests)
      Notifies a list of users about the quota threshold overcoming. The notification is both sent as a system message and email(in a different thread).
      Parameters:
      tenant - optional if workspace is not null
      workspace - optional if tenant is not null
      totalDocs - actual number of documents(optional)
      totalSize - actual size in bytes (optional)
      totalUsers - actual number of users(optional)
      totalGuests - actual number of guests(optional)
    • registerWorkspaceThresholdOvercame

      public static void registerWorkspaceThresholdOvercame(com.logicaldoc.core.folder.Folder workspace, Long totalSize, Long totalDocs) throws com.logicaldoc.core.PersistenceException
      Takes care of saving an event that registers the overcome of a quota
      Parameters:
      workspace - the workspace's folder
      totalSize - the total documents size
      totalDocs - total number of documents
      Throws:
      com.logicaldoc.core.PersistenceException - error at data layer
    • retrieveTenant

      public static com.logicaldoc.core.security.Tenant retrieveTenant(long tenantId) throws com.logicaldoc.core.PersistenceException
      Throws:
      com.logicaldoc.core.PersistenceException