Class CleanupConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAdministrators group receiving cleanup campaign WebSocket notifications.static final StringLogical sort key naming the RECLAIMABLE ordering of campaign items — the one and only name for it, shared by the REST sortable-field allowlist and by the Storage translating it into an ORDER BY onCleanupCampaignItemDAO#RECLAIMABLE_BYTES(the very column every reclaimable aggregate sums).Roots scanned (and watched) by cleanup campaigns.static final intDepth (JCR semantics: '/' = 0) of the space drive-root node/Groups/spaces/<space>/Documents: the empty-ancestors sweep of a deleted space file must stop at (and never remove) this node.static final StringRoot of the space drives in the collaboration workspace.Scan roots whose DIRECT CHILDREN are the parallel scan units — depth 1, and deliberately not deeper.static final StringScan roots taken WHOLE as a single unit, never partitioned: /Trash already has a dedicated trash cleaner on the platform, so splitting it buys nothing — it is scanned for the report only.static final StringName of the user drive-root folder holding private documents.static final StringName of the user drive-root folder holding public documents.static final StringRoot of the user drives in the collaboration workspace. -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetDriveMinDepth(String deletedNodePath) Depth of the drive-root node the empty-ancestors sweep of a deleted file must stop at (the drive root itself is preserved, only deeper empty folders may be removed): space drive:/Groups/spaces/<space>/Documents, always atSPACE_DRIVE_MIN_DEPTHuser drive: the user home'sPrivate(orPublic) folder.
-
Field Details
-
RECLAIMABLE_SORT_KEY
Logical sort key naming the RECLAIMABLE ordering of campaign items — the one and only name for it, shared by the REST sortable-field allowlist and by the Storage translating it into an ORDER BY onCleanupCampaignItemDAO#RECLAIMABLE_BYTES(the very column every reclaimable aggregate sums).Lives HERE, and not with the JPQL it ends up as, because it crosses layers: the REST layer must accept it without importing a DAO, the Storage must recognize it, and a second literal in either place would let the two drift apart silently. It happens to equal the entity's attribute name now that the figure is a persisted column — pinned by a test, since that equality is what lets the Storage translate this into an ordinary property sort instead of an unsafe one.
- See Also:
-
USERS_ROOT
Root of the user drives in the collaboration workspace.- See Also:
-
SPACES_ROOT
Root of the space drives in the collaboration workspace.- See Also:
-
TRASH_ROOT
- See Also:
-
SCAN_ROOTS
Roots scanned (and watched) by cleanup campaigns. -
SPLIT_SCAN_ROOTS
Scan roots whose DIRECT CHILDREN are the parallel scan units — depth 1, and deliberately not deeper.NOTE what a direct child of /Users actually is: under eXo's
READABLEdata distribution (depth = 4, suffix___) the children of /Users are FIRST-LETTER BUCKETS (/Users/r___), NOT user homes — a home sits at/Users/r___/ro___/roo___/root. So this yields ~26-40 units of very UNEQUAL size, and the largest bucket alone bounds the wall-clock of the whole scan.That imbalance is ACCEPTED, on purpose: enumeration stays a single one-level listing with no knowledge of the distribution's depth or suffix baked in, and the per-unit rows make the long tail measurable before anyone pays for a smarter split. Do NOT "improve" it by walking deeper.
-
UNSPLIT_SCAN_ROOTS
Scan roots taken WHOLE as a single unit, never partitioned: /Trash already has a dedicated trash cleaner on the platform, so splitting it buys nothing — it is scanned for the report only. -
USER_PRIVATE_FOLDER
Name of the user drive-root folder holding private documents.- See Also:
-
USER_PUBLIC_FOLDER
Name of the user drive-root folder holding public documents.- See Also:
-
SPACE_DRIVE_MIN_DEPTH
public static final int SPACE_DRIVE_MIN_DEPTHDepth (JCR semantics: '/' = 0) of the space drive-root node/Groups/spaces/<space>/Documents: the empty-ancestors sweep of a deleted space file must stop at (and never remove) this node.- See Also:
-
ADMINISTRATORS_GROUP
Administrators group receiving cleanup campaign WebSocket notifications. Static by design decision — see the cleanup tech spec: this group is deliberately NOT configurable and NOT resolved through UserACL.- See Also:
-
-
Method Details
-
getDriveMinDepth
Depth of the drive-root node the empty-ancestors sweep of a deleted file must stop at (the drive root itself is preserved, only deeper empty folders may be removed):- space drive:
/Groups/spaces/<space>/Documents, always atSPACE_DRIVE_MIN_DEPTH - user drive: the user home's
Private(orPublic) folder. User homes are nested at a VARIABLE depth under /Users (e.g./Users/j___/jo___/joh___/john/Private), so no constant depth exists: it is computed from the deleted node path, as the depth of its firstPrivate/Publicsegment
- Parameters:
deletedNodePath- absolute path of the deleted file node- Returns:
- the drive-root depth, or
Integer.MAX_VALUE(sweep nothing) when the path matches no known drive layout
- space drive:
-