Class CleanupPurgeResult
java.lang.Object
org.exoplatform.addons.documents.cleanup.model.CleanupPurgeResult
Outcome of a purge operation (hard delete or versions purge) on one item.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CleanupPurgeResultgone()static CleanupPurgeResultpurged(long reclaimedBytes) static CleanupPurgeResultA skip with NO exception behind it — a deterministic refusal such ascleanup.notVersionable, whose message code already says everything there is to say.static CleanupPurgeResultA skip that reclaimed nothing at all.static CleanupPurgeResultA PARTIAL purge: the item stays SKIPPED and keeps its failure reason (an administrator must still see that the file needs attention), but the bytes really reclaimed before the failure are CARRIED, so the campaign's reclaimed total reports the work actually done instead of silently under-reporting it.
-
Constructor Details
-
CleanupPurgeResult
public CleanupPurgeResult()
-
-
Method Details
-
purged
-
gone
-
skipped
A skip with NO exception behind it — a deterministic refusal such ascleanup.notVersionable, whose message code already says everything there is to say. Kept as an overload precisely so those call sites are not forced to pass a null detail.- Parameters:
failureReason- bare message code of the failure- Returns:
- a SKIPPED result with zero reclaimed bytes and no detail
-
skipped
A skip that reclaimed nothing at all.- Parameters:
failureReason- bare message code of the failurefailureDetail- compact diagnostic of the exception behind it- Returns:
- a SKIPPED result with zero reclaimed bytes
-
skipped
public static CleanupPurgeResult skipped(String failureReason, String failureDetail, long reclaimedBytes) A PARTIAL purge: the item stays SKIPPED and keeps its failure reason (an administrator must still see that the file needs attention), but the bytes really reclaimed before the failure are CARRIED, so the campaign's reclaimed total reports the work actually done instead of silently under-reporting it.- Parameters:
failureReason- bare message code of the failure that interrupted the purgefailureDetail- compact diagnostic of the exception behind itreclaimedBytes- bytes effectively reclaimed before that failure- Returns:
- a SKIPPED result carrying the bytes already reclaimed
-