class IngestCleanupEligibilityValidationPlugin extends ActionHandler {

    @Override
    public ItemStatus execute(WorkerParameters param, HandlerIO handler)
        throws ProcessingException {

        try {

            String ingestOperationId = param.getParameterValue(WorkerParameterName.ingestOperationIdToCleanup);

            CleanupReportManager cleanupReportManager = CleanupReportManager.newReport(ingestOperationId);

            checkUnits(ingestOperationId, cleanupReportManager);
            checkObjectGroups(ingestOperationId, cleanupReportManager);

            cleanupReportManager.persistReportDataToWorkspace(handler);

            StatusCode globalStatusCode = cleanupReportManager.getGlobalStatus();
            if (globalStatusCode.isGreaterOrEqualToKo()) {
                LOGGER.error("Blocking validation errors...");
            } else if (globalStatusCode.isGreaterOrEqualToWarn()) {
                LOGGER.warn("Non blocking validation errors...");
            } else {
                LOGGER.info("Ingest cleanup eligibility validation succeeded");
            }
            return buildItemStatus(INGEST_CLEANUP_ELIGIBILITY_VALIDATION, globalStatusCode);

        } catch (ProcessingStatusException e) {

            LOGGER.error(String.format("Cleanup eligibility validation failed with status [%s]", e.getStatusCode()), e);
            return buildItemStatus(INGEST_CLEANUP_ELIGIBILITY_VALIDATION, e.getStatusCode(), e.getEventDetails());
        }
    }

    public  IngestCleanupEligibilityValidationPlugin();
    @VisibleForTesting public  IngestCleanupEligibilityValidationPlugin(IngestCleanupEligibilityService ingestCleanupEligibilityService);

}