added dictionary entries

This commit is contained in:
Timo 2021-07-12 10:33:30 +03:00
parent e3b8022b54
commit 6741b8a596

View File

@ -624,9 +624,27 @@ public class RedactionLogCreatorService {
processRedactionLogEntry(manualRedactions, dossierTemplateId, entry, reasonHolder);
}
handleAddToDictionary(redactionLog, manualRedactions, dossierTemplateId);
return redactionLog;
}
private void handleAddToDictionary(RedactionLog redactionLog, ManualRedactions manualRedactions, String dossierTemplateId) {
for (var manualRedaction : manualRedactions.getEntriesToAdd()) {
if (manualRedaction.isAddToDictionary() || manualRedaction.isAddToDossierDictionary()) {
var redactionLogEntry = createRedactionLogEntry(manualRedaction, manualRedaction.getId(), dossierTemplateId);
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
redactionLog.getRedactionLogEntry().add(redactionLogEntry);
}
}
}
public static class PreviewReasonHolder implements ReasonHolder {
private final RedactionLogEntry entry;