RED-7317: Endpoint to change entity types of dict-based annotations
* fix test * make it clear, which field does what
This commit is contained in:
parent
7fcb52c90f
commit
701c65eac7
@ -107,8 +107,8 @@ public class ManualRedactionDictionaryUpdateHandler {
|
||||
|
||||
DictionaryEntryType dictionaryEntryType = manualRequestWithRemoveFromDictionary.getDictionaryEntryType();
|
||||
Set<String> typeIdsOfModifiedDictionaries = new HashSet<>();
|
||||
String dossierTemplateDictionaryTypeId = toTypeId(manualRequestWithRemoveFromDictionary.getType(), manualRequestWithRemoveFromDictionary.getDossierTemplateId());
|
||||
String dossierDictionaryTypeId = toTypeId(manualRequestWithRemoveFromDictionary.getType(),
|
||||
String dossierTemplateDictionaryTypeId = toTypeId(manualRequestWithRemoveFromDictionary.getTypeToRemove(), manualRequestWithRemoveFromDictionary.getDossierTemplateId());
|
||||
String dossierDictionaryTypeId = toTypeId(manualRequestWithRemoveFromDictionary.getTypeToRemove(),
|
||||
manualRequestWithRemoveFromDictionary.getDossierTemplateId(),
|
||||
manualRequestWithRemoveFromDictionary.getDossierId());
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ public class ManualRedactionMapper {
|
||||
.removeFromAllDossiers(removeRedactionRequest.isRemoveFromAllDossiers())
|
||||
.value(redactionLogEntry.getValue())
|
||||
.dictionaryEntryType(getDictionaryEntryType(redactionLogEntry))
|
||||
.type(redactionLogEntry.getType())
|
||||
.typeToRemove(redactionLogEntry.getType())
|
||||
.dossierId(dossierId)
|
||||
.dossierTemplateId(dossierTemplateId);
|
||||
|
||||
@ -151,7 +151,7 @@ public class ManualRedactionMapper {
|
||||
.addToAllDossiers(recategorizationRequest.isAddToAllDossiers())
|
||||
.dictionaryEntryType(getDictionaryEntryType(redactionLogEntry))
|
||||
.value(redactionLogEntry.getValue())
|
||||
.type(recategorizationRequest.getType())
|
||||
.typeToRemove(redactionLogEntry.getType())
|
||||
.dossierTemplateTypeId(toTypeId(recategorizationRequest.getType(), dossierTemplateId))
|
||||
.build();
|
||||
requests.add(build);
|
||||
|
||||
@ -116,7 +116,7 @@ public class ManualRedactionService {
|
||||
|
||||
for (RemoveRedactionRequest removeRedactionRequest : removeRedactionRequests) {
|
||||
manualRedactionDictionaryUpdateHandler.validateDictionariesForDelete(removeRedactionRequest,
|
||||
removeRedactionRequest.getType(),
|
||||
removeRedactionRequest.getTypeToRemove(),
|
||||
removeRedactionRequest.getDossierTemplateId());
|
||||
removeRedactionPersistenceService.insert(fileId, removeRedactionRequest);
|
||||
|
||||
@ -218,7 +218,7 @@ public class ManualRedactionService {
|
||||
for (var recategorizationRequest : recategorizationRequests) {
|
||||
manualRedactionDictionaryUpdateHandler.validateDictionariesForAdd(recategorizationRequest, recategorizationRequest.getValue());
|
||||
manualRedactionDictionaryUpdateHandler.validateDictionariesForDelete(recategorizationRequest,
|
||||
recategorizationRequest.getType(),
|
||||
recategorizationRequest.getTypeToRemove(),
|
||||
recategorizationRequest.getDossierTemplateId());
|
||||
|
||||
recategorizationPersistenceService.insert(fileId, recategorizationRequest);
|
||||
|
||||
@ -9,7 +9,7 @@ public interface ManualRequestWithRemoveFromDictionary extends BaseManualRequest
|
||||
|
||||
String getValue();
|
||||
|
||||
String getType();
|
||||
String getTypeToRemove();
|
||||
|
||||
String getDossierTemplateId();
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ public class RecategorizationRequest implements ManualRequestWithAddToDictionary
|
||||
String user;
|
||||
String value;
|
||||
AnnotationStatus status;
|
||||
String type;
|
||||
String typeToRemove;
|
||||
String dossierTemplateId;
|
||||
String dossierId;
|
||||
String dossierTemplateTypeId;
|
||||
|
||||
@ -22,7 +22,7 @@ public class RemoveRedactionRequest implements ManualRequestWithRemoveFromDictio
|
||||
String user;
|
||||
String dossierId;
|
||||
String dossierTemplateId;
|
||||
String type;
|
||||
String typeToRemove;
|
||||
AnnotationStatus status;
|
||||
boolean removeFromDictionary;
|
||||
boolean removeFromAllDossiers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user