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()) {
|
||||
entry.getPositions().forEach(pos -> {
|
||||
if (!entry.isLocalManualRedaction() && excludedPages.contains(pos.getPage())) {
|
||||
// if (!isLocalManualRedaction(entry.getManualChanges()) && excludedPages.contains(pos.getPage())) {
|
||||
entry.setExcluded(true);
|
||||
}
|
||||
});
|
||||
@ -131,6 +132,12 @@ public class RedactionLogMergeService {
|
||||
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) {
|
||||
|
||||
|
||||
@ -87,12 +87,7 @@ public class RedactionLogEntry {
|
||||
public boolean isLocalManualRedaction() {
|
||||
|
||||
return manualChanges != null && manualChanges.stream()
|
||||
.anyMatch(mc -> mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY && mc.getAnnotationStatus() == AnnotationStatus.APPROVED
|
||||
|| isResizeRedaction(mc));
|
||||
}
|
||||
|
||||
private boolean isResizeRedaction(ManualChange mc) {
|
||||
return mc.getManualRedactionType() == ManualRedactionType.RESIZE && mc.getAnnotationStatus() == AnnotationStatus.APPROVED;
|
||||
.anyMatch(mc -> (mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE) && mc.getAnnotationStatus() == AnnotationStatus.APPROVED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user