class IngestCleanupEligibilityService {

    public void checkUnitUpdatesFromOtherOperations(String ingestOperationId,
        CleanupReportManager cleanupReportManager)
        throws ProcessingStatusException {

        try (MetaDataClient client = metaDataClientFactory.getClient()) {

            SelectMultiQuery query = new SelectMultiQuery();
            query.addUsedProjection(
                VitamFieldsHelper.id(),
                VitamFieldsHelper.operations());
            query.addQueries(eq(VitamFieldsHelper.initialOperation(), ingestOperationId));

            ScrollSpliterator<JsonNode> scrollRequest = ScrollSpliteratorHelper
                .createUnitScrollSplitIterator(client, query, VitamConfiguration.getBatchSize());

            scrollRequest.forEachRemaining(unitNode -> {
                try {

                    List<String> ops = JsonHandler
                        .getFromJsonNode(unitNode.get(VitamFieldsHelper.operations()), STRING_LIST_TYPE_REFERENCE);
                    if (ops.size() != 1) {

                        List<String> otherOperations = ops.stream().filter(op -> !op.equals(ingestOperationId))
                            .collect(Collectors.toList());

                        String id = unitNode.get(VitamFieldsHelper.id()).asText();
                        cleanupReportManager
                            .reportUnitWarning(id, "Updates occurred to unit by operations " + otherOperations);
                    }
                } catch (InvalidParseOperationException e) {
                    throw new RuntimeException(e);
                }
            });

        } catch (InvalidParseOperationException | InvalidCreateOperationException e) {
            throw new ProcessingStatusException(StatusCode.FATAL, "Could not checks updated units", e);
        }
    }

    public  IngestCleanupEligibilityService(MetaDataClientFactory metaDataClientFactory,
        LogbookOperationsClientFactory logbookOperationsClientFactory);

}