RED-7400: changed place of isLocalManualRedaction as it is not needed in RedactionLogEntry anymore
This commit is contained in:
parent
f06f73c55c
commit
cf82406e69
@ -102,7 +102,7 @@ public class RedactionLogMergeService {
|
|||||||
|
|
||||||
if (excludedPages != null && !excludedPages.isEmpty()) {
|
if (excludedPages != null && !excludedPages.isEmpty()) {
|
||||||
entry.getPositions().forEach(pos -> {
|
entry.getPositions().forEach(pos -> {
|
||||||
if (!entry.isLocalManualRedaction() && excludedPages.contains(pos.getPage())) {
|
if (!isLocalManualRedaction(entry) && excludedPages.contains(pos.getPage())) {
|
||||||
entry.setExcluded(true);
|
entry.setExcluded(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -132,6 +132,16 @@ public class RedactionLogMergeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean isLocalManualRedaction(RedactionLogEntry entry) {
|
||||||
|
|
||||||
|
return entry.getManualChanges() != null && entry.getManualChanges()
|
||||||
|
.stream()
|
||||||
|
.anyMatch(mc -> mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE && mc.getAnnotationStatus() == AnnotationStatus.APPROVED && entry.getEngines()
|
||||||
|
.contains(Engine.RULE) && !entry.getEngines().contains(Engine.DICTIONARY));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
|
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
|
||||||
|
|
||||||
List<ManualRedactionWrapper> manualRedactionWrappers = new ArrayList<>();
|
List<ManualRedactionWrapper> manualRedactionWrappers = new ArrayList<>();
|
||||||
|
|||||||
@ -84,14 +84,6 @@ public class RedactionLogEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isLocalManualRedaction() {
|
|
||||||
|
|
||||||
return manualChanges != null && manualChanges.stream()
|
|
||||||
.anyMatch(mc -> mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY && mc.getAnnotationStatus() == AnnotationStatus.APPROVED
|
|
||||||
|| mc.getManualRedactionType() == ManualRedactionType.RESIZE && mc.getAnnotationStatus() == AnnotationStatus.APPROVED && engines.contains(Engine.RULE) && !engines.contains(Engine.DICTIONARY));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean isManuallyRemoved() {
|
public boolean isManuallyRemoved() {
|
||||||
|
|
||||||
return manualChanges != null && manualChanges.stream()
|
return manualChanges != null && manualChanges.stream()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user