Package org.nuxeo.ecm.quota
Class AbstractQuotaStatsUpdater
- java.lang.Object
-
- org.nuxeo.ecm.quota.AbstractQuotaStatsUpdater
-
- All Implemented Interfaces:
QuotaStatsUpdater
- Direct Known Subclasses:
DocumentsCountUpdater
,DocumentsSizeUpdater
public abstract class AbstractQuotaStatsUpdater extends Object implements QuotaStatsUpdater
Abstract class implementingQuotaStatsUpdater
to handle common cases.Provides abstract methods to override for common events.
- Since:
- 5.5
- Author:
- Thomas Roger
-
-
Constructor Summary
Constructors Constructor Description AbstractQuotaStatsUpdater()
-
Method Summary
-
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
-
-
-
-
Method Detail
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceQuotaStatsUpdater
-
getName
public String getName()
- Specified by:
getName
in interfaceQuotaStatsUpdater
-
setLabel
public void setLabel(String label)
- Specified by:
setLabel
in interfaceQuotaStatsUpdater
-
getLabel
public String getLabel()
- Specified by:
getLabel
in interfaceQuotaStatsUpdater
-
setDescriptionLabel
public void setDescriptionLabel(String descriptionLabel)
- Specified by:
setDescriptionLabel
in interfaceQuotaStatsUpdater
-
getDescriptionLabel
public String getDescriptionLabel()
- Specified by:
getDescriptionLabel
in interfaceQuotaStatsUpdater
-
updateStatistics
public void updateStatistics(CoreSession session, DocumentEventContext docCtx, Event event)
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
protected List<DocumentModel> getAncestors(CoreSession session, DocumentModel doc)
Gets all the ancestors of the document, including the root.
-
handleQuotaExceeded
protected abstract void handleQuotaExceeded(QuotaExceededException e, Event event)
-
needToProcessEventOnDocument
protected abstract boolean needToProcessEventOnDocument(Event event, DocumentModel doc)
-
processDocumentCreated
protected abstract void processDocumentCreated(CoreSession session, DocumentModel doc)
-
processDocumentCopied
protected abstract void processDocumentCopied(CoreSession session, DocumentModel doc)
-
processDocumentCheckedIn
protected abstract void processDocumentCheckedIn(CoreSession session, DocumentModel doc)
-
processDocumentBeforeCheckedIn
protected abstract void processDocumentBeforeCheckedIn(CoreSession session, DocumentModel doc)
- Since:
- 11.1
-
processDocumentCheckedOut
protected abstract void processDocumentCheckedOut(CoreSession session, DocumentModel doc)
-
processDocumentBeforeCheckedOut
protected abstract void processDocumentBeforeCheckedOut(CoreSession session, DocumentModel doc)
- Since:
- 11.1
-
processDocumentUpdated
protected abstract void processDocumentUpdated(CoreSession session, DocumentModel doc)
-
processDocumentMoved
protected abstract void processDocumentMoved(CoreSession session, DocumentModel doc, DocumentModel sourceParent)
-
processDocumentAboutToBeRemoved
protected abstract void processDocumentAboutToBeRemoved(CoreSession session, DocumentModel doc)
-
processDocumentBeforeUpdate
protected abstract void processDocumentBeforeUpdate(CoreSession session, DocumentModel doc)
-
processDocumentTrashOp
protected abstract void processDocumentTrashOp(CoreSession session, DocumentModel doc, boolean isTrashed)
-
processDocumentRestored
protected abstract void processDocumentRestored(CoreSession session, DocumentModel doc)
-
processDocumentBeforeRestore
protected abstract void processDocumentBeforeRestore(CoreSession session, DocumentModel doc)
-
-