Package com.logicaldoc.enterprise
Class QuotaUtil
java.lang.Object
com.logicaldoc.enterprise.QuotaUtil
Utility methods for quota handling
- Since:
- 7.6.2
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidnotifyQuotaAlert(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.static voidregisterWorkspaceThresholdOvercame(com.logicaldoc.core.folder.Folder workspace, Long totalSize, Long totalDocs) Takes care of saving an event that registers the overcome of a quotastatic com.logicaldoc.core.security.TenantretrieveTenant(long tenantId)
-
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 nullworkspace- optional if tenant is not nulltotalDocs- 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 foldertotalSize- the total documents sizetotalDocs- 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
-