Package org.nuxeo.ecm.quota
Class AbstractQuotaStatsUpdater
java.lang.Object
org.nuxeo.ecm.quota.AbstractQuotaStatsUpdater
- All Implemented Interfaces:
QuotaStatsUpdater
- Direct Known Subclasses:
DocumentsCountUpdater,DocumentsSizeUpdater
Abstract class implementing
QuotaStatsUpdater to handle common cases.
Provides abstract methods to override for common events.
- Since:
- 5.5
- Author:
- Thomas Roger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<DocumentModel> getAncestors(CoreSession session, DocumentModel doc) Gets all the ancestors of the document, including the root.getLabel()getName()protected abstract voidhandleQuotaExceeded(QuotaExceededException e, Event event) protected abstract booleanneedToProcessEventOnDocument(Event event, DocumentModel doc) protected abstract voidprocessDocumentAboutToBeRemoved(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentBeforeCheckedIn(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentBeforeCheckedOut(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentBeforeRestore(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentBeforeUpdate(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentCheckedIn(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentCheckedOut(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentCopied(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentCreated(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentMoved(CoreSession session, DocumentModel doc, DocumentModel sourceParent) protected abstract voidprocessDocumentRestored(CoreSession session, DocumentModel doc) protected abstract voidprocessDocumentTrashOp(CoreSession session, DocumentModel doc, boolean isTrashed) protected abstract voidprocessDocumentUpdated(CoreSession session, DocumentModel doc) voidsetDescriptionLabel(String descriptionLabel) voidvoidvoidupdateStatistics(CoreSession session, DocumentEventContext docCtx, Event event) Update the statistics for the givendocCtxandevent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.quota.QuotaStatsUpdater
computeInitialStatistics
-
Field Details
-
name
-
label
-
descriptionLabel
-
-
Constructor Details
-
AbstractQuotaStatsUpdater
public AbstractQuotaStatsUpdater()
-
-
Method Details
-
setName
- Specified by:
setNamein interfaceQuotaStatsUpdater
-
getName
- Specified by:
getNamein interfaceQuotaStatsUpdater
-
setLabel
- Specified by:
setLabelin interfaceQuotaStatsUpdater
-
getLabel
- Specified by:
getLabelin interfaceQuotaStatsUpdater
-
setDescriptionLabel
- Specified by:
setDescriptionLabelin interfaceQuotaStatsUpdater
-
getDescriptionLabel
- Specified by:
getDescriptionLabelin interfaceQuotaStatsUpdater
-
updateStatistics
Description copied from interface:QuotaStatsUpdaterUpdate the statistics for the givendocCtxandevent. Signature was changed in 5.6 to pass the Event instead of the eventName to allow the implementer to rollback the transaction if needed- Specified by:
updateStatisticsin interfaceQuotaStatsUpdater- Parameters:
session- an unrestrictedCoreSessionto be used
-
getAncestors
Gets all the ancestors of the document, including the root. -
handleQuotaExceeded
-
needToProcessEventOnDocument
-
processDocumentCreated
-
processDocumentCopied
-
processDocumentCheckedIn
-
processDocumentBeforeCheckedIn
- Since:
- 11.1
-
processDocumentCheckedOut
-
processDocumentBeforeCheckedOut
- Since:
- 11.1
-
processDocumentUpdated
-
processDocumentMoved
protected abstract void processDocumentMoved(CoreSession session, DocumentModel doc, DocumentModel sourceParent) -
processDocumentAboutToBeRemoved
-
processDocumentBeforeUpdate
-
processDocumentTrashOp
protected abstract void processDocumentTrashOp(CoreSession session, DocumentModel doc, boolean isTrashed) -
processDocumentRestored
-
processDocumentBeforeRestore
-