RED-7317: Endpoint to change entity types of dict-based annotations
* rebased
This commit is contained in:
parent
d25b8c3934
commit
80e602fb07
@ -68,7 +68,7 @@ public class ManualRedactionDictionaryUpdateHandler {
|
||||
private Set<String> addToDossierTemplateDictionary(String fileId, String value, ManualRequestWithAddToDictionary manualRequestWithAddToDictionary, Set<String> typeIdsOfModifiedDictionaries) {
|
||||
|
||||
List<DictionaryEntry> dictionaryEntriesToUnDelete = dictionaryManagementService.getAllEntriesInDossierTemplate(manualRequestWithAddToDictionary.getDossierTemplateTypeId(),
|
||||
value);
|
||||
value, manualRequestWithAddToDictionary.getDictionaryEntryType());
|
||||
dictionaryEntriesToUnDelete.forEach(entry -> {
|
||||
typeIdsOfModifiedDictionaries.add(entry.getTypeId());
|
||||
addToDictionary(entry.getTypeId(), value,
|
||||
@ -111,7 +111,7 @@ public class ManualRedactionDictionaryUpdateHandler {
|
||||
Set<String> typeIdsOfModifiedDictionaries = new HashSet<>();
|
||||
if (manualRequestWithRemoveFromDictionary.isRemoveFromAllDossiers()) {
|
||||
var dictionaryEntriesToRemove = dictionaryManagementService.getAllEntriesInDossierTemplate(toTypeId(redactionLogEntry.getType(), dossierTemplateId),
|
||||
redactionLogEntry.getValue());
|
||||
redactionLogEntry.getValue(), DictionaryEntryType.ENTRY);
|
||||
dictionaryEntriesToRemove.forEach(entry -> {
|
||||
typeIdsOfModifiedDictionaries.add(entry.getTypeId());
|
||||
removeFromDictionary(entry.getTypeId(), entry.getValue(), dossierId, fileId, DictionaryEntryType.ENTRY);
|
||||
@ -212,9 +212,7 @@ public class ManualRedactionDictionaryUpdateHandler {
|
||||
|
||||
public void revertAddToDictionary(String value, DictionaryEntryType dictionaryEntryType, String fileId, String dossierId, Set<String> typeIdsOfModifiedDictionaries) {
|
||||
|
||||
typeIdsOfModifiedDictionaries.forEach(typeId -> {
|
||||
removeFromDictionary(typeId, value, dossierId, fileId, dictionaryEntryType);
|
||||
});
|
||||
typeIdsOfModifiedDictionaries.forEach(typeId -> removeFromDictionary(typeId, value, dossierId, fileId, dictionaryEntryType));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user