RED-7400: changed logic for flag isLocalManualRedaction
This commit is contained in:
parent
2eecf7c428
commit
067fb8a814
@ -103,6 +103,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 (!entry.isLocalManualRedaction() && excludedPages.contains(pos.getPage())) {
|
||||||
|
// if (!isLocalManualRedaction(entry.getManualChanges()) && excludedPages.contains(pos.getPage())) {
|
||||||
entry.setExcluded(true);
|
entry.setExcluded(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -131,6 +132,12 @@ public class RedactionLogMergeService {
|
|||||||
return redactionLog;
|
return redactionLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// private boolean isLocalManualRedaction(List<ManualChange> manualChanges) {
|
||||||
|
//
|
||||||
|
// return manualChanges != null && manualChanges.stream()
|
||||||
|
// .anyMatch(mc -> (mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE) && mc.getAnnotationStatus() == AnnotationStatus.APPROVED);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
|
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
|
||||||
|
|
||||||
|
|||||||
@ -87,12 +87,7 @@ public class RedactionLogEntry {
|
|||||||
public boolean isLocalManualRedaction() {
|
public boolean isLocalManualRedaction() {
|
||||||
|
|
||||||
return manualChanges != null && manualChanges.stream()
|
return manualChanges != null && manualChanges.stream()
|
||||||
.anyMatch(mc -> mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY && mc.getAnnotationStatus() == AnnotationStatus.APPROVED
|
.anyMatch(mc -> (mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE) && mc.getAnnotationStatus() == AnnotationStatus.APPROVED);
|
||||||
|| isResizeRedaction(mc));
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isResizeRedaction(ManualChange mc) {
|
|
||||||
return mc.getManualRedactionType() == ManualRedactionType.RESIZE && mc.getAnnotationStatus() == AnnotationStatus.APPROVED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user