From b2acdc646dd5d59d34daf7d4b75846115c6f10dc Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Fri, 13 Aug 2021 13:56:23 +0200 Subject: [PATCH] RedactionLogMergeService.java edited online with Bitbucket --- .../service/RedactionLogMergeService.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java index 406d01e8..86b90b7f 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java @@ -32,7 +32,6 @@ public class RedactionLogMergeService { var manualRedactionWrappers = createManualRedactionWrappers(manualRedactions); - log.info("Adding {}", manualRedactionLogEntries); for (RedactionLogEntry entry : redactionLog.getRedactionLogEntry()) { processRedactionLogEntry(manualRedactionWrappers.stream().filter(mr -> entry.getId().equals(mr.getId())) @@ -48,44 +47,44 @@ public class RedactionLogMergeService { private List createManualRedactionWrappers(ManualRedactions manualRedactions) { - log.info("Processing Manual Redactions: {}", manualRedactions); + List manualRedactionWrappers = new ArrayList<>(); manualRedactions.getImageRecategorizations().forEach(item -> { - if (item.getSoftDeletedTime() != null) { + if (item.getSoftDeletedTime() == null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getIdsToRemove().forEach(item -> { - if (item.getSoftDeletedTime() != null) { + if (item.getSoftDeletedTime() == null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getForceRedacts().forEach(item -> { - if (item.getSoftDeletedTime() != null) { + if (item.getSoftDeletedTime() == null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getManualLegalBasisChanges().forEach(item -> { - if (item.getSoftDeletedTime() != null) { + if (item.getSoftDeletedTime() == null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); Collections.sort(manualRedactionWrappers); - log.info("Obtained manual redaction wrappers: {}", manualRedactionWrappers); + return manualRedactionWrappers; } private void processRedactionLogEntry(List manualRedactionWrappers, String dossierTemplateId, RedactionLogEntry redactionLogEntry) { - log.info("Processing: {} for: {}", manualRedactionWrappers, redactionLogEntry); + manualRedactionWrappers.forEach(mrw -> {