RED-9555 - Keep force redacted image applied after changing legal basis #596
@ -36,6 +36,7 @@ import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog
|
|||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryState;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryState;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryType;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryType;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualChange;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualChange;
|
||||||
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualRedactionType;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Position;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Position;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.PropertyChange;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.PropertyChange;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.ChangeFactory;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.ChangeFactory;
|
||||||
@ -119,20 +120,30 @@ public class EntityLogMergeService {
|
|||||||
adjustEntityLogEntriesAfterLocalChangesBasedOnDict(entityLogEntries, trackLocalChangesBasedOnDictEntriesMap, analysisNumber);
|
adjustEntityLogEntriesAfterLocalChangesBasedOnDict(entityLogEntries, trackLocalChangesBasedOnDictEntriesMap, analysisNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void adjustEntityLogEntriesAfterLocalChangesBasedOnDict(List<EntityLogEntry> entityLogEntries, Map<String, String> trackLocalChangesBasedOnDictEntriesMap, int analysisNumber) {
|
|
||||||
|
private void adjustEntityLogEntriesAfterLocalChangesBasedOnDict(List<EntityLogEntry> entityLogEntries,
|
||||||
|
Map<String, String> trackLocalChangesBasedOnDictEntriesMap,
|
||||||
|
int analysisNumber) {
|
||||||
|
|
||||||
var dictEntryIdsToUpdate = trackLocalChangesBasedOnDictEntriesMap.values();
|
var dictEntryIdsToUpdate = trackLocalChangesBasedOnDictEntriesMap.values();
|
||||||
entityLogEntries.stream().filter(entityLogEntry -> dictEntryIdsToUpdate.contains(entityLogEntry.getId()))
|
entityLogEntries.stream()
|
||||||
|
.filter(entityLogEntry -> dictEntryIdsToUpdate.contains(entityLogEntry.getId()))
|
||||||
.forEach(entityLogEntry -> {
|
.forEach(entityLogEntry -> {
|
||||||
List<Change> changes = new ArrayList<>();
|
List<Change> changes = new ArrayList<>();
|
||||||
changes.add(ChangeFactory.toChange(ChangeType.REMOVED,
|
changes.add(ChangeFactory.toChange(ChangeType.REMOVED,
|
||||||
OffsetDateTime.now(),
|
OffsetDateTime.now(),
|
||||||
analysisNumber,
|
analysisNumber,
|
||||||
PropertyChange.builder().property("state").oldValue(entityLogEntry.getState().name()).newValue(EntryState.REMOVED.name()).build()));
|
PropertyChange.builder()
|
||||||
|
.property("state")
|
||||||
|
.oldValue(entityLogEntry.getState().name())
|
||||||
|
.newValue(EntryState.REMOVED.name())
|
||||||
|
.build()));
|
||||||
addChanges(entityLogEntry, changes);
|
addChanges(entityLogEntry, changes);
|
||||||
entityLogEntry.setState(EntryState.REMOVED);
|
entityLogEntry.setState(EntryState.REMOVED);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void processEntityLogEntries(DossierEntity dossier,
|
private void processEntityLogEntries(DossierEntity dossier,
|
||||||
List<EntityLogEntry> entityLogEntries,
|
List<EntityLogEntry> entityLogEntries,
|
||||||
Map<String, EntityLogEntry> addedLocalManualEntries,
|
Map<String, EntityLogEntry> addedLocalManualEntries,
|
||||||
@ -487,6 +498,10 @@ public class EntityLogMergeService {
|
|||||||
|
|
||||||
if (!Strings.isNullOrEmpty(recategorization.getLegalBasis())) {
|
if (!Strings.isNullOrEmpty(recategorization.getLegalBasis())) {
|
||||||
boolean isHint = isHint(entityLogEntry.getType(), dossier);
|
boolean isHint = isHint(entityLogEntry.getType(), dossier);
|
||||||
|
if ((entityLogEntry.getEntryType().equals(EntryType.IMAGE) || entityLogEntry.getEntryType().equals(EntryType.IMAGE_HINT)) && !entityLogEntry.getManualChanges()
|
||||||
|
.isEmpty() && determineHintForImages(entityLogEntry.getManualChanges())) {
|
||||||
|
isHint = false;
|
||||||
|
}
|
||||||
ChangeFactory.addPropertyChanges(change,
|
ChangeFactory.addPropertyChanges(change,
|
||||||
PropertyChange.builder()
|
PropertyChange.builder()
|
||||||
.property("legalBasis")
|
.property("legalBasis")
|
||||||
@ -558,6 +573,25 @@ public class EntityLogMergeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean determineHintForImages(List<ManualChange> manualChanges) {
|
||||||
|
|
||||||
|
boolean hasForce = false;
|
||||||
|
boolean hasRemoveAfterForce = false;
|
||||||
|
|
||||||
|
for (ManualChange change : manualChanges) {
|
||||||
|
if (change.getManualRedactionType() == ManualRedactionType.FORCE) {
|
||||||
|
hasForce = true;
|
||||||
|
}
|
||||||
|
if (hasForce && change.getManualRedactionType() == ManualRedactionType.REMOVE) {
|
||||||
|
hasRemoveAfterForce = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hasForce && !hasRemoveAfterForce;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isHint(String type, DossierEntity dossier) {
|
public boolean isHint(String type, DossierEntity dossier) {
|
||||||
|
|
||||||
String typeId = toTypeId(type, dossier.getDossierTemplateId());
|
String typeId = toTypeId(type, dossier.getDossierTemplateId());
|
||||||
|
|||||||
@ -45,6 +45,7 @@ import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog
|
|||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLogEntry;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLogEntry;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryState;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryState;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryType;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryType;
|
||||||
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualChange;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualRedactionType;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.ManualRedactionType;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Position;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Position;
|
||||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.ManualRedactions;
|
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.ManualRedactions;
|
||||||
@ -61,6 +62,7 @@ import com.iqser.red.service.persistence.service.v1.api.shared.mongo.service.Ent
|
|||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
public class EntityLogMergeTest {
|
public class EntityLogMergeTest {
|
||||||
|
|
||||||
final String FILE_ID = "fileId";
|
final String FILE_ID = "fileId";
|
||||||
@MockBean
|
@MockBean
|
||||||
private FileStatusService fileStatusService;
|
private FileStatusService fileStatusService;
|
||||||
@ -120,7 +122,14 @@ public class EntityLogMergeTest {
|
|||||||
String forceRedactionId = UUID.randomUUID().toString();
|
String forceRedactionId = UUID.randomUUID().toString();
|
||||||
String entryToRecategorizeId = UUID.randomUUID().toString();
|
String entryToRecategorizeId = UUID.randomUUID().toString();
|
||||||
|
|
||||||
ManualRedactions manualRedactions = provideManualRedactions(entryToAddId, entryToRemoveId, entryToResizeId, entryLegalBasisId, forceRedactionId, fileId, rectangleToAddId, entryToRecategorizeId);
|
ManualRedactions manualRedactions = provideManualRedactions(entryToAddId,
|
||||||
|
entryToRemoveId,
|
||||||
|
entryToResizeId,
|
||||||
|
entryLegalBasisId,
|
||||||
|
forceRedactionId,
|
||||||
|
fileId,
|
||||||
|
rectangleToAddId,
|
||||||
|
entryToRecategorizeId);
|
||||||
|
|
||||||
var entityLog = provideEntityLog(entryToRemoveId, entryToResizeId, entryLegalBasisId, forceRedactionId, entryToRecategorizeId, false);
|
var entityLog = provideEntityLog(entryToRemoveId, entryToResizeId, entryLegalBasisId, forceRedactionId, entryToRecategorizeId, false);
|
||||||
|
|
||||||
@ -188,8 +197,12 @@ public class EntityLogMergeTest {
|
|||||||
.get(0).getManualRedactionType(), ManualRedactionType.RESIZE);
|
.get(0).getManualRedactionType(), ManualRedactionType.RESIZE);
|
||||||
assertEquals(resizeEntryLogEntry.getChanges()
|
assertEquals(resizeEntryLogEntry.getChanges()
|
||||||
.get(0).getType(), ChangeType.RESIZED);
|
.get(0).getType(), ChangeType.RESIZED);
|
||||||
assertEquals(resizeEntryLogEntry.getChanges().get(0).getPropertyChanges().get("value"), "Darth Vader -> Random");
|
assertEquals(resizeEntryLogEntry.getChanges()
|
||||||
assertEquals(resizeEntryLogEntry.getChanges().get(0).getPropertyChanges().get("positions"), "[1.0, 1.0, 1.0, 1.0, 1] -> [2.0, 2.0, 2.0, 2.0, 1]");
|
.get(0).getPropertyChanges()
|
||||||
|
.get("value"), "Darth Vader -> Random");
|
||||||
|
assertEquals(resizeEntryLogEntry.getChanges()
|
||||||
|
.get(0).getPropertyChanges()
|
||||||
|
.get("positions"), "[1.0, 1.0, 1.0, 1.0, 1] -> [2.0, 2.0, 2.0, 2.0, 1]");
|
||||||
assertTrue(resizeEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
assertTrue(resizeEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||||
|
|
||||||
var optionalLegalBasisEntryLogEntry = response.getEntityLogEntry()
|
var optionalLegalBasisEntryLogEntry = response.getEntityLogEntry()
|
||||||
@ -205,7 +218,9 @@ public class EntityLogMergeTest {
|
|||||||
.get(0).getManualRedactionType(), ManualRedactionType.LEGAL_BASIS_CHANGE);
|
.get(0).getManualRedactionType(), ManualRedactionType.LEGAL_BASIS_CHANGE);
|
||||||
assertEquals(legalBasisEntryLogEntry.getChanges()
|
assertEquals(legalBasisEntryLogEntry.getChanges()
|
||||||
.get(0).getType(), ChangeType.LEGAL_BASIS_CHANGE);
|
.get(0).getType(), ChangeType.LEGAL_BASIS_CHANGE);
|
||||||
assertEquals(legalBasisEntryLogEntry.getChanges().get(0).getPropertyChanges().get("legalBasis"), "legalBasis -> New legal basis");
|
assertEquals(legalBasisEntryLogEntry.getChanges()
|
||||||
|
.get(0).getPropertyChanges()
|
||||||
|
.get("legalBasis"), "legalBasis -> New legal basis");
|
||||||
assertTrue(legalBasisEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
assertTrue(legalBasisEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||||
|
|
||||||
var optionalForceRedactionEntryLogEntry = response.getEntityLogEntry()
|
var optionalForceRedactionEntryLogEntry = response.getEntityLogEntry()
|
||||||
@ -221,8 +236,12 @@ public class EntityLogMergeTest {
|
|||||||
.get(0).getManualRedactionType(), ManualRedactionType.FORCE);
|
.get(0).getManualRedactionType(), ManualRedactionType.FORCE);
|
||||||
assertEquals(forceRedactionEntryLogEntry.getChanges()
|
assertEquals(forceRedactionEntryLogEntry.getChanges()
|
||||||
.get(0).getType(), ChangeType.FORCE_REDACT);
|
.get(0).getType(), ChangeType.FORCE_REDACT);
|
||||||
assertEquals(forceRedactionEntryLogEntry.getChanges().get(0).getPropertyChanges().get("legalBasis"), "null -> Force");
|
assertEquals(forceRedactionEntryLogEntry.getChanges()
|
||||||
assertEquals(forceRedactionEntryLogEntry.getChanges().get(0).getPropertyChanges().get("state"), "SKIPPED -> APPLIED");
|
.get(0).getPropertyChanges()
|
||||||
|
.get("legalBasis"), "null -> Force");
|
||||||
|
assertEquals(forceRedactionEntryLogEntry.getChanges()
|
||||||
|
.get(0).getPropertyChanges()
|
||||||
|
.get("state"), "SKIPPED -> APPLIED");
|
||||||
assertTrue(forceRedactionEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
assertTrue(forceRedactionEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||||
|
|
||||||
var optionalRectangleEntryLogEntry = response.getEntityLogEntry()
|
var optionalRectangleEntryLogEntry = response.getEntityLogEntry()
|
||||||
@ -253,8 +272,12 @@ public class EntityLogMergeTest {
|
|||||||
.get(0).getManualRedactionType(), ManualRedactionType.RECATEGORIZE);
|
.get(0).getManualRedactionType(), ManualRedactionType.RECATEGORIZE);
|
||||||
assertEquals(recategorizationEntryLogEntry.getChanges()
|
assertEquals(recategorizationEntryLogEntry.getChanges()
|
||||||
.get(0).getType(), ChangeType.RECATEGORIZE);
|
.get(0).getType(), ChangeType.RECATEGORIZE);
|
||||||
assertEquals(recategorizationEntryLogEntry.getChanges().get(0).getPropertyChanges().get("legalBasis"), "legalBasis -> New legal basis");
|
assertEquals(recategorizationEntryLogEntry.getChanges()
|
||||||
assertEquals(recategorizationEntryLogEntry.getChanges().get(0).getPropertyChanges().get("type"), "CBI_author -> PII");
|
.get(0).getPropertyChanges()
|
||||||
|
.get("legalBasis"), "legalBasis -> New legal basis");
|
||||||
|
assertEquals(recategorizationEntryLogEntry.getChanges()
|
||||||
|
.get(0).getPropertyChanges()
|
||||||
|
.get("type"), "CBI_author -> PII");
|
||||||
assertTrue(recategorizationEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
assertTrue(recategorizationEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,7 +302,8 @@ public class EntityLogMergeTest {
|
|||||||
entryLegalBasisId,
|
entryLegalBasisId,
|
||||||
forceRedactionId,
|
forceRedactionId,
|
||||||
fileId,
|
fileId,
|
||||||
rectangleToAddId, entryToRecategorizeId);
|
rectangleToAddId,
|
||||||
|
entryToRecategorizeId);
|
||||||
|
|
||||||
var entityLog = provideEntityLog(entryToRemoveId, entryToResizeId, entryLegalBasisId, forceRedactionId, entryToRecategorizeId, true);
|
var entityLog = provideEntityLog(entryToRemoveId, entryToResizeId, entryLegalBasisId, forceRedactionId, entryToRecategorizeId, true);
|
||||||
|
|
||||||
@ -378,6 +402,7 @@ public class EntityLogMergeTest {
|
|||||||
.get(index + 1).getState(), EntryState.PENDING);
|
.get(index + 1).getState(), EntryState.PENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//dict entry, resize local
|
//dict entry, resize local
|
||||||
@Test
|
@Test
|
||||||
public void testMergeEntityLogWithManualResizeBasedOnDictRedaction() {
|
public void testMergeEntityLogWithManualResizeBasedOnDictRedaction() {
|
||||||
@ -487,6 +512,7 @@ public class EntityLogMergeTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testMergeEntityLogWithManualAddAndRemoveChanges() {
|
void testMergeEntityLogWithManualAddAndRemoveChanges() {
|
||||||
|
|
||||||
@ -531,6 +557,7 @@ public class EntityLogMergeTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testMergeEntityLogWithManualAddAndResizeAndRemoveChanges() {
|
void testMergeEntityLogWithManualAddAndResizeAndRemoveChanges() {
|
||||||
|
|
||||||
@ -576,7 +603,81 @@ public class EntityLogMergeTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private EntityLog provideEntityLog(String entryToRemoveId, String entryToResizeId, String entryLegalBasisId, String forceRedactionId, String entryToRecategorizeId, boolean dictEntry) {
|
|
||||||
|
@Test
|
||||||
|
public void testForceAndRecategorizeImage() {
|
||||||
|
|
||||||
|
String dossierId = "dossierId";
|
||||||
|
String dossierTemplateId = "dossierTemplateId";
|
||||||
|
|
||||||
|
String entryId = UUID.randomUUID().toString();
|
||||||
|
|
||||||
|
ManualRedactions manualRedactions = ManualRedactions.builder()
|
||||||
|
.recategorizations(Set.of(ManualRecategorization.builder()
|
||||||
|
.legalBasis("1")
|
||||||
|
.type("manual")
|
||||||
|
.annotationId(entryId)
|
||||||
|
.fileId("file")
|
||||||
|
.requestDate(OffsetDateTime.now())
|
||||||
|
.user("user")
|
||||||
|
.build()))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<ManualChange> manualChanges = new ArrayList<>();
|
||||||
|
manualChanges.add(ManualChange.builder()
|
||||||
|
.manualRedactionType(ManualRedactionType.FORCE)
|
||||||
|
.processedDate(OffsetDateTime.now())
|
||||||
|
.propertyChanges(Collections.emptyMap())
|
||||||
|
.userId("user")
|
||||||
|
.requestedDate(OffsetDateTime.now())
|
||||||
|
.build());
|
||||||
|
var entityLog = new EntityLog(1,
|
||||||
|
1,
|
||||||
|
Lists.newArrayList(EntityLogEntry.builder()
|
||||||
|
.id(entryId)
|
||||||
|
.type("manual")
|
||||||
|
.value("Image:Other")
|
||||||
|
.entryType(EntryType.IMAGE)
|
||||||
|
.state(EntryState.APPLIED)
|
||||||
|
.dictionaryEntry(false)
|
||||||
|
.positions(List.of(new Position(1, 1, 1, 1, 1)))
|
||||||
|
.manualChanges(manualChanges)
|
||||||
|
.build()),
|
||||||
|
Collections.emptyList(),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
|
|
||||||
|
when(manualRedactionProviderService.getManualRedactions(any(), any())).thenReturn(manualRedactions);
|
||||||
|
when(fileStatusService.getStatus(FILE_ID)).thenReturn(FileModel.builder().excluded(false).dossierStatusId(dossierTemplateId).id(FILE_ID).build());
|
||||||
|
when(fileManagementStorageService.getEntityLog(dossierId, FILE_ID)).thenReturn(entityLog);
|
||||||
|
when(dossierService.getDossierById(dossierId)).thenReturn(DossierEntity.builder().dossierTemplateId(dossierTemplateId).build());
|
||||||
|
when(dictionaryPersistenceService.getType(anyString())).thenReturn(TypeEntity.builder().isHint(false).build());
|
||||||
|
when(fileStatusPersistenceService.getStatus(FILE_ID)).thenReturn(FileEntity.builder().id(FILE_ID).fileAttributes(Collections.emptyList()).build());
|
||||||
|
when(fileStatusService.convertAttributes(any(), anyString())).thenReturn(Collections.emptyList());
|
||||||
|
|
||||||
|
EntityLog response = entityLogMergeService.mergeEntityLog(manualRedactions, entityLog, DossierEntity.builder().dossierTemplateId(dossierTemplateId).build());
|
||||||
|
|
||||||
|
assertNotNull(response);
|
||||||
|
assertFalse(response.getEntityLogEntry().isEmpty());
|
||||||
|
|
||||||
|
var optionalEntityLogEntry = response.getEntityLogEntry()
|
||||||
|
.stream()
|
||||||
|
.filter(entityLogEntry -> entityLogEntry.getId().equals(entryId))
|
||||||
|
.findFirst();
|
||||||
|
assertTrue(optionalEntityLogEntry.isPresent());
|
||||||
|
assertEquals(EntryType.IMAGE, optionalEntityLogEntry.get().getEntryType());
|
||||||
|
assertEquals(EntryState.APPLIED, optionalEntityLogEntry.get().getState());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private EntityLog provideEntityLog(String entryToRemoveId,
|
||||||
|
String entryToResizeId,
|
||||||
|
String entryLegalBasisId,
|
||||||
|
String forceRedactionId,
|
||||||
|
String entryToRecategorizeId,
|
||||||
|
boolean dictEntry) {
|
||||||
|
|
||||||
List<Position> positions = new ArrayList<>();
|
List<Position> positions = new ArrayList<>();
|
||||||
positions.add(new Position(1, 1, 1, 1, 1));
|
positions.add(new Position(1, 1, 1, 1, 1));
|
||||||
@ -643,7 +744,8 @@ public class EntityLogMergeTest {
|
|||||||
String entryLegalBasisId,
|
String entryLegalBasisId,
|
||||||
String forceRedactionId,
|
String forceRedactionId,
|
||||||
String fileId,
|
String fileId,
|
||||||
String rectangleToAddId, String entryToRecategorizeId) {
|
String rectangleToAddId,
|
||||||
|
String entryToRecategorizeId) {
|
||||||
|
|
||||||
List<Rectangle> positions = new ArrayList<>();
|
List<Rectangle> positions = new ArrayList<>();
|
||||||
positions.add(new Rectangle(2, 2, 2, 2, 1));
|
positions.add(new Rectangle(2, 2, 2, 2, 1));
|
||||||
@ -717,7 +819,9 @@ public class EntityLogMergeTest {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ManualRedactionEntry provideManualAdd(String entryToAddId, String valueToAdd) {
|
private ManualRedactionEntry provideManualAdd(String entryToAddId, String valueToAdd) {
|
||||||
|
|
||||||
return ManualRedactionEntry.builder()
|
return ManualRedactionEntry.builder()
|
||||||
.positions(List.of(new Rectangle(1f, 2f, 3f, 4f, 1)))
|
.positions(List.of(new Rectangle(1f, 2f, 3f, 4f, 1)))
|
||||||
.annotationId(entryToAddId)
|
.annotationId(entryToAddId)
|
||||||
@ -734,7 +838,9 @@ public class EntityLogMergeTest {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ManualResizeRedaction provideManualResize(String entryToResizeId, String resizedValue, String dictId) {
|
private ManualResizeRedaction provideManualResize(String entryToResizeId, String resizedValue, String dictId) {
|
||||||
|
|
||||||
List<Rectangle> positions = new ArrayList<>();
|
List<Rectangle> positions = new ArrayList<>();
|
||||||
positions.add(new Rectangle(2, 2, 2, 2, 1));
|
positions.add(new Rectangle(2, 2, 2, 2, 1));
|
||||||
return ManualResizeRedaction.builder()
|
return ManualResizeRedaction.builder()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user