Merge branch 'RED-8480-B' into 'master'
RED-8480: updated code according to changes from ManualRecategorization Closes RED-8480 See merge request redactmanager/redaction-service!332
This commit is contained in:
commit
d36d2ea2fa
@ -16,7 +16,7 @@ val layoutParserVersion = "0.96.0"
|
||||
val jacksonVersion = "2.15.2"
|
||||
val droolsVersion = "9.44.0.Final"
|
||||
val pdfBoxVersion = "3.0.0"
|
||||
val persistenceServiceVersion = "2.366.0"
|
||||
val persistenceServiceVersion = "2.377.0"
|
||||
val springBootStarterVersion = "3.1.5"
|
||||
|
||||
configurations {
|
||||
|
||||
@ -202,7 +202,11 @@ public class LegacyRedactionLogMergeService {
|
||||
}
|
||||
|
||||
redactionLogEntry.getManualChanges()
|
||||
.add(ManualChange.from(imageRecategorization).withManualRedactionType(ManualRedactionType.RECATEGORIZE).withChange("type", imageRecategorization.getType()));
|
||||
.add(ManualChange.from(imageRecategorization)
|
||||
.withManualRedactionType(ManualRedactionType.RECATEGORIZE)
|
||||
.withChange("type", imageRecategorization.getType())
|
||||
.withChange("section", imageRecategorization.getSection())
|
||||
.withChange("legalBasis", imageRecategorization.getLegalBasis()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -131,6 +131,7 @@ public class ManualChangeOverwrite {
|
||||
if (manualChange instanceof ManualRecategorization recategorization) {
|
||||
recategorized = true;
|
||||
type = recategorization.getType();
|
||||
section = recategorization.getSection();
|
||||
if (recategorization.getLegalBasis() != null && !recategorization.getLegalBasis().isEmpty()) {
|
||||
legalBasis = recategorization.getLegalBasis();
|
||||
}
|
||||
|
||||
@ -30,8 +30,11 @@ public class ManualChangeFactory {
|
||||
public ManualChange toManualChange(BaseAnnotation baseAnnotation, boolean isHint) {
|
||||
|
||||
ManualChange manualChange = ManualChange.from(baseAnnotation);
|
||||
if (baseAnnotation instanceof ManualRecategorization imageRecategorization) {
|
||||
manualChange.withManualRedactionType(ManualRedactionType.RECATEGORIZE).withChange("type", imageRecategorization.getType());
|
||||
if (baseAnnotation instanceof ManualRecategorization recategorization) {
|
||||
manualChange.withManualRedactionType(ManualRedactionType.RECATEGORIZE)
|
||||
.withChange("type", recategorization.getType())
|
||||
.withChange("section", recategorization.getSection())
|
||||
.withChange("legalBasis", recategorization.getLegalBasis());
|
||||
} else if (baseAnnotation instanceof IdRemoval manualRemoval) {
|
||||
manualChange.withManualRedactionType(manualRemoval.isRemoveFromDictionary() ? ManualRedactionType.REMOVE_FROM_DICTIONARY : ManualRedactionType.REMOVE);
|
||||
} else if (baseAnnotation instanceof ManualForceRedaction manualForceRedaction) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user