Class QuotaAwareDocument

java.lang.Object
org.nuxeo.ecm.quota.size.QuotaAwareDocument
All Implemented Interfaces:
QuotaAware

public class QuotaAwareDocument extends Object implements QuotaAware
Adapter to manage a DocumentModel that supports Quotas
Since:
5.6
Author:
Tiry
  • Field Details

  • Constructor Details

    • QuotaAwareDocument

      public QuotaAwareDocument(DocumentModel doc)
  • Method Details

    • getDoc

      public DocumentModel getDoc()
      Specified by:
      getDoc in interface QuotaAware
    • getInnerSize

      public long getInnerSize()
      Specified by:
      getInnerSize in interface QuotaAware
    • getTotalSize

      public long getTotalSize()
      Specified by:
      getTotalSize in interface QuotaAware
    • getTrashSize

      public long getTrashSize()
      Specified by:
      getTrashSize in interface QuotaAware
    • getVersionsSize

      public long getVersionsSize()
      Specified by:
      getVersionsSize in interface QuotaAware
    • addDelta

      protected Number addDelta(String property, long delta)
    • addInnerSize

      public void addInnerSize(long delta)
      Specified by:
      addInnerSize in interface QuotaAware
    • addTotalSize

      public void addTotalSize(long delta)
      Specified by:
      addTotalSize in interface QuotaAware
    • addTrashSize

      public void addTrashSize(long delta)
      Specified by:
      addTrashSize in interface QuotaAware
    • addVersionsSize

      public void addVersionsSize(long delta)
      Specified by:
      addVersionsSize in interface QuotaAware
    • setAll

      public void setAll(long innerSize, long totalSize, long trashSize, long versionsSize)
      Description copied from interface: QuotaAware
      Set all quota info.
      Specified by:
      setAll in interface QuotaAware
    • save

      public void save()
      Specified by:
      save in interface QuotaAware
    • getMaxQuota

      public long getMaxQuota()
      Specified by:
      getMaxQuota in interface QuotaAware
    • setMaxQuota

      public void setMaxQuota(long maxSize)
      Specified by:
      setMaxQuota in interface QuotaAware
    • setMaxQuota

      public void setMaxQuota(long maxSize, boolean skipValidation)
      Specified by:
      setMaxQuota in interface QuotaAware
    • getQuotaInfo

      public QuotaInfo getQuotaInfo()
      Specified by:
      getQuotaInfo in interface QuotaAware
    • resetInfos

      public void resetInfos()
      Specified by:
      resetInfos in interface QuotaAware
      Since:
      5.7
    • clearInfos

      public void clearInfos()
      Description copied from interface: QuotaAware
      Resets quota info but keeps the user-specified max quota size, if present.
      Specified by:
      clearInfos in interface QuotaAware
    • clearMaxSize

      protected void clearMaxSize()