Class CleanupSizeUtil
java.lang.Object
org.exoplatform.addons.documents.cleanup.util.CleanupSizeUtil
The ONE definition of what an item's action reclaims, in Java.
There are three consumers of this rule and there must be one rule: the JPQL
expression the aggregates sum and the item lists order by
(CleanupCampaignItemDAO#RECLAIMABLE_BYTES), the in-memory comparator
that merges the owner-chunked pages, and the REST DTO every console row
displays. They were drifting apart by construction — the review list had
re-implemented the CASE in JavaScript — and a list that ranks by one definition
of reclaimable while the totals sum another is a quiet wrong number on
the one screen whose purpose is triage.
A DELETE frees its content AND the whole version history it destroys; a
PURGE_VERSIONS frees the removal set alone, which is what versionsSize
already holds for that action.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longreclaimableBytes(String action, long fileSize, long versionsSize) static longreclaimableBytes(CleanupAction action, long fileSize, long versionsSize)
-
Method Details
-
reclaimableBytes
- Parameters:
action- the item's action, as its enum namefileSize- content bytes of the fileversionsSize- version bytes THIS action reclaims- Returns:
- bytes the action frees
-
reclaimableBytes
- Parameters:
action- the item's actionfileSize- content bytes of the fileversionsSize- version bytes THIS action reclaims- Returns:
- bytes the action frees
-