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
-
Constructor Summary
-
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 void
handleQuotaExceeded
(QuotaExceededException e, Event event) protected abstract boolean
needToProcessEventOnDocument
(Event event, DocumentModel doc) protected abstract void
processDocumentAboutToBeRemoved
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentBeforeCheckedIn
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentBeforeCheckedOut
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentBeforeRestore
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentBeforeUpdate
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentCheckedIn
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentCheckedOut
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentCopied
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentCreated
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentMoved
(CoreSession session, DocumentModel doc, DocumentModel sourceParent) protected abstract void
processDocumentRestored
(CoreSession session, DocumentModel doc) protected abstract void
processDocumentTrashOp
(CoreSession session, DocumentModel doc, boolean isTrashed) protected abstract void
processDocumentUpdated
(CoreSession session, DocumentModel doc) void
setDescriptionLabel
(String descriptionLabel) void
void
void
updateStatistics
(CoreSession session, DocumentEventContext docCtx, Event event) Update the statistics for the givendocCtx
andevent
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.quota.QuotaStatsUpdater
computeInitialStatistics, computeInitialStatistics
-
Field Details
-
name
-
label
-
descriptionLabel
-
-
Constructor Details
-
AbstractQuotaStatsUpdater
public AbstractQuotaStatsUpdater()
-
-
Method Details
-
setName
- Specified by:
setName
in interfaceQuotaStatsUpdater
-
getName
- Specified by:
getName
in interfaceQuotaStatsUpdater
-
setLabel
- Specified by:
setLabel
in interfaceQuotaStatsUpdater
-
getLabel
- Specified by:
getLabel
in interfaceQuotaStatsUpdater
-
setDescriptionLabel
- Specified by:
setDescriptionLabel
in interfaceQuotaStatsUpdater
-
getDescriptionLabel
- Specified by:
getDescriptionLabel
in interfaceQuotaStatsUpdater
-
updateStatistics
Description copied from interface:QuotaStatsUpdater
Update the statistics for the givendocCtx
andevent
. 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:
updateStatistics
in interfaceQuotaStatsUpdater
- Parameters:
session
- an unrestrictedCoreSession
to 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
-