Package org.nuxeo.ecm.quota.size
Class QuotaAwareDocument
java.lang.Object
org.nuxeo.ecm.quota.size.QuotaAwareDocument
- All Implemented Interfaces:
QuotaAware
Adapter to manage a DocumentModel that supports Quotas
- Since:
- 5.6
- Author:
- Tiry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NumbervoidaddInnerSize(long delta) voidaddTotalSize(long delta) voidaddTrashSize(long delta) voidaddVersionsSize(long delta) voidResets quota info but keeps the user-specified max quota size, if present.protected voidgetDoc()longlonglonglonglongvoidvoidsave()voidsetAll(long innerSize, long totalSize, long trashSize, long versionsSize) Set all quota info.voidsetMaxQuota(long maxSize) voidsetMaxQuota(long maxSize, boolean skipValidation)
-
Field Details
-
DOCUMENTS_SIZE_STATISTICS_FACET
- See Also:
-
DOCUMENTS_SIZE_INNER_SIZE_PROPERTY
- See Also:
-
DOCUMENTS_SIZE_TOTAL_SIZE_PROPERTY
- See Also:
-
DOCUMENTS_SIZE_TRASH_SIZE_PROPERTY
- See Also:
-
DOCUMENTS_SIZE_VERSIONS_SIZE_PROPERTY
- See Also:
-
DOCUMENTS_SIZE_MAX_SIZE_PROPERTY
- See Also:
-
doc
-
-
Constructor Details
-
QuotaAwareDocument
-
-
Method Details
-
getDoc
- Specified by:
getDocin interfaceQuotaAware
-
getInnerSize
public long getInnerSize()- Specified by:
getInnerSizein interfaceQuotaAware
-
getTotalSize
public long getTotalSize()- Specified by:
getTotalSizein interfaceQuotaAware
-
getTrashSize
public long getTrashSize()- Specified by:
getTrashSizein interfaceQuotaAware
-
getVersionsSize
public long getVersionsSize()- Specified by:
getVersionsSizein interfaceQuotaAware
-
addDelta
-
addInnerSize
public void addInnerSize(long delta) - Specified by:
addInnerSizein interfaceQuotaAware
-
addTotalSize
public void addTotalSize(long delta) - Specified by:
addTotalSizein interfaceQuotaAware
-
addTrashSize
public void addTrashSize(long delta) - Specified by:
addTrashSizein interfaceQuotaAware
-
addVersionsSize
public void addVersionsSize(long delta) - Specified by:
addVersionsSizein interfaceQuotaAware
-
setAll
public void setAll(long innerSize, long totalSize, long trashSize, long versionsSize) Description copied from interface:QuotaAwareSet all quota info.- Specified by:
setAllin interfaceQuotaAware
-
save
public void save()- Specified by:
savein interfaceQuotaAware
-
getMaxQuota
public long getMaxQuota()- Specified by:
getMaxQuotain interfaceQuotaAware
-
setMaxQuota
public void setMaxQuota(long maxSize) - Specified by:
setMaxQuotain interfaceQuotaAware
-
setMaxQuota
public void setMaxQuota(long maxSize, boolean skipValidation) - Specified by:
setMaxQuotain interfaceQuotaAware
-
getQuotaInfo
- Specified by:
getQuotaInfoin interfaceQuotaAware
-
resetInfos
public void resetInfos()- Specified by:
resetInfosin interfaceQuotaAware- Since:
- 5.7
-
clearInfos
public void clearInfos()Description copied from interface:QuotaAwareResets quota info but keeps the user-specified max quota size, if present.- Specified by:
clearInfosin interfaceQuotaAware
-
clearMaxSize
protected void clearMaxSize()
-