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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Number
void
addInnerSize
(long delta) void
addTotalSize
(long delta) void
addTrashSize
(long delta) void
addVersionsSize
(long delta) void
Resets quota info but keeps the user-specified max quota size, if present.protected void
getDoc()
long
long
long
long
long
void
void
save()
void
setAll
(long innerSize, long totalSize, long trashSize, long versionsSize) Set all quota info.void
setMaxQuota
(long maxSize) void
setMaxQuota
(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:
getDoc
in interfaceQuotaAware
-
getInnerSize
public long getInnerSize()- Specified by:
getInnerSize
in interfaceQuotaAware
-
getTotalSize
public long getTotalSize()- Specified by:
getTotalSize
in interfaceQuotaAware
-
getTrashSize
public long getTrashSize()- Specified by:
getTrashSize
in interfaceQuotaAware
-
getVersionsSize
public long getVersionsSize()- Specified by:
getVersionsSize
in interfaceQuotaAware
-
addDelta
-
addInnerSize
public void addInnerSize(long delta) - Specified by:
addInnerSize
in interfaceQuotaAware
-
addTotalSize
public void addTotalSize(long delta) - Specified by:
addTotalSize
in interfaceQuotaAware
-
addTrashSize
public void addTrashSize(long delta) - Specified by:
addTrashSize
in interfaceQuotaAware
-
addVersionsSize
public void addVersionsSize(long delta) - Specified by:
addVersionsSize
in interfaceQuotaAware
-
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 interfaceQuotaAware
-
save
public void save()- Specified by:
save
in interfaceQuotaAware
-
getMaxQuota
public long getMaxQuota()- Specified by:
getMaxQuota
in interfaceQuotaAware
-
setMaxQuota
public void setMaxQuota(long maxSize) - Specified by:
setMaxQuota
in interfaceQuotaAware
-
setMaxQuota
public void setMaxQuota(long maxSize, boolean skipValidation) - Specified by:
setMaxQuota
in interfaceQuotaAware
-
getQuotaInfo
- Specified by:
getQuotaInfo
in interfaceQuotaAware
-
resetInfos
public void resetInfos()- Specified by:
resetInfos
in interfaceQuotaAware
- 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 interfaceQuotaAware
-
clearMaxSize
protected void clearMaxSize()
-