From 5db6db52e5f30c467196306ffdf38e48f4ed7e3e Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Sat, 19 Mar 2022 21:44:32 +0200 Subject: [PATCH] test all entries in dict --- .../service/RedactionLogMergeService.java | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 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 effd9a6c..5f2f8a75 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 @@ -277,17 +277,15 @@ public class RedactionLogMergeService { for (ManualRedactionEntry manualRedactionEntry : manualAdds) { - if (!approvedAndShouldBeInDictionary(manualRedactionEntry)) { - RedactionLogEntry redactionLogEntry = createRedactionLogEntry(manualRedactionEntry, manualRedactionEntry.getAnnotationId(), dossierTemplateId); - redactionLogEntry.setPositions(convertPositions(manualRedactionEntry.getPositions())); - redactionLogEntry.setComments(comments.get(manualRedactionEntry.getAnnotationId())); - redactionLogEntry.setTextBefore(manualRedactionEntry.getTextBefore()); - redactionLogEntry.setTextAfter(manualRedactionEntry.getTextAfter()); + RedactionLogEntry redactionLogEntry = createRedactionLogEntry(manualRedactionEntry, manualRedactionEntry.getAnnotationId(), dossierTemplateId); + redactionLogEntry.setPositions(convertPositions(manualRedactionEntry.getPositions())); + redactionLogEntry.setComments(comments.get(manualRedactionEntry.getAnnotationId())); + redactionLogEntry.setTextBefore(manualRedactionEntry.getTextBefore()); + redactionLogEntry.setTextAfter(manualRedactionEntry.getTextAfter()); - sectionTextService.handleSectionText(sectionGrid, redactionLogEntry); + sectionTextService.handleSectionText(sectionGrid, redactionLogEntry); - redactionLogEntries.add(redactionLogEntry); - } + redactionLogEntries.add(redactionLogEntry); } return redactionLogEntries; @@ -302,14 +300,6 @@ public class RedactionLogMergeService { .collect(Collectors.toList()); } - - private boolean approvedAndShouldBeInDictionary(ManualRedactionEntry manualRedactionEntry) { - - return manualRedactionEntry.getStatus().equals(AnnotationStatus.APPROVED) && - (manualRedactionEntry.isAddToDictionary() || manualRedactionEntry.isAddToDossierDictionary()); - } - - private RedactionLogEntry createRedactionLogEntry(ManualRedactionEntry manualRedactionEntry, String id, String dossierTemplateId) {