public class QuotaStatsServiceImpl extends DefaultComponent implements QuotaStatsService
QuotaStatsService.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_SIZE |
static String |
QUOTA_STATS_UPDATERS_EP |
protected QuotaStatsUpdaterRegistry |
quotaStatsUpdaterRegistry |
static String |
STATUS_INITIAL_COMPUTATION_COMPLETED |
static String |
STATUS_INITIAL_COMPUTATION_PENDING |
static String |
STATUS_INITIAL_COMPUTATION_QUEUED |
lastModified| Constructor and Description |
|---|
QuotaStatsServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
activateQuotaOnUserWorkspaces(long maxQuota,
CoreSession session)
Activates the quota on user personal workspaces
|
boolean |
canSetMaxQuota(long maxQuota,
DocumentModel doc,
CoreSession session)
Test to see if quota allowed.
|
void |
computeInitialStatistics(String updaterName,
CoreSession session,
QuotaStatsInitialWork currentWorker)
Compute the initial statistics for the given @{code updaterName}.
|
protected List<DocumentModel> |
getParentsInReverseOrder(DocumentModel doc,
CoreSession session) |
String |
getProgressStatus(String updaterName,
String repositoryName)
Returns the progress status of
updaterName. |
long |
getQuotaFromParent(DocumentModel doc,
CoreSession session)
Gets the quota from the first parent where quota has been set.
|
long |
getQuotaSetOnUserWorkspaces(CoreSession session) |
List<QuotaStatsUpdater> |
getQuotaStatsUpdaters() |
QuotaStatsUpdater |
getQuotaStatsUpdaters(String updaterName) |
String |
getUserWorkspaceRootId(DocumentModel context,
CoreSession session) |
void |
launchInitialStatisticsComputation(String updaterName,
String repositoryName)
Launch an asynchronously initial computation for the given
updaterName on repositoryName. |
void |
launchSetMaxQuotaOnUserWorkspaces(long maxSize,
DocumentModel context,
CoreSession session)
Sets this maxQuota on all user workspaces
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
updateStatistics(DocumentEventContext docCtx,
Event event)
Update the statistics for the given
docCtx and event. |
deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic static final String STATUS_INITIAL_COMPUTATION_QUEUED
public static final String STATUS_INITIAL_COMPUTATION_PENDING
public static final String STATUS_INITIAL_COMPUTATION_COMPLETED
public static final int DEFAULT_BATCH_SIZE
public static final String QUOTA_STATS_UPDATERS_EP
protected QuotaStatsUpdaterRegistry quotaStatsUpdaterRegistry
public QuotaStatsServiceImpl()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic List<QuotaStatsUpdater> getQuotaStatsUpdaters()
getQuotaStatsUpdaters in interface QuotaStatsServicepublic QuotaStatsUpdater getQuotaStatsUpdaters(String updaterName)
public void updateStatistics(DocumentEventContext docCtx, Event event)
QuotaStatsServiceupdateStatistics in interface QuotaStatsServicepublic void computeInitialStatistics(String updaterName, CoreSession session, QuotaStatsInitialWork currentWorker)
QuotaStatsServicecomputeInitialStatistics in interface QuotaStatsServicepublic void launchInitialStatisticsComputation(String updaterName, String repositoryName)
QuotaStatsServiceupdaterName on repositoryName.launchInitialStatisticsComputation in interface QuotaStatsServicepublic String getProgressStatus(String updaterName, String repositoryName)
QuotaStatsServiceupdaterName.getProgressStatus in interface QuotaStatsServicepublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic long getQuotaFromParent(DocumentModel doc, CoreSession session)
QuotaStatsServicegetQuotaFromParent in interface QuotaStatsServicepublic void activateQuotaOnUserWorkspaces(long maxQuota, CoreSession session)
QuotaStatsServiceactivateQuotaOnUserWorkspaces in interface QuotaStatsServicepublic long getQuotaSetOnUserWorkspaces(CoreSession session)
getQuotaSetOnUserWorkspaces in interface QuotaStatsServiceprotected List<DocumentModel> getParentsInReverseOrder(DocumentModel doc, CoreSession session)
public void launchSetMaxQuotaOnUserWorkspaces(long maxSize, DocumentModel context, CoreSession session)
QuotaStatsServicelaunchSetMaxQuotaOnUserWorkspaces in interface QuotaStatsServicepublic String getUserWorkspaceRootId(DocumentModel context, CoreSession session)
public boolean canSetMaxQuota(long maxQuota, DocumentModel doc, CoreSession session)
QuotaStatsServicecanSetMaxQuota in interface QuotaStatsServiceCopyright © 2018 Nuxeo. All rights reserved.