RED-515: Added manualRedactionType to redactionLog, to know if it must added or not in pdftron-redaction-service if it is requested
This commit is contained in:
parent
c650361ec2
commit
c6d3e3a4cf
@ -0,0 +1,5 @@
|
|||||||
|
package com.iqser.red.service.redaction.v1.model;
|
||||||
|
|
||||||
|
public enum ManualRedactionType {
|
||||||
|
ADD, REMOVE
|
||||||
|
}
|
||||||
@ -29,5 +29,6 @@ public class RedactionLogEntry {
|
|||||||
private int sectionNumber;
|
private int sectionNumber;
|
||||||
private boolean manual;
|
private boolean manual;
|
||||||
private Status status;
|
private Status status;
|
||||||
|
private ManualRedactionType manualRedactionType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.iqser.red.service.redaction.v1.model.Comment;
|
import com.iqser.red.service.redaction.v1.model.Comment;
|
||||||
import com.iqser.red.service.redaction.v1.model.IdRemoval;
|
import com.iqser.red.service.redaction.v1.model.IdRemoval;
|
||||||
import com.iqser.red.service.redaction.v1.model.ManualRedactionEntry;
|
import com.iqser.red.service.redaction.v1.model.ManualRedactionEntry;
|
||||||
|
import com.iqser.red.service.redaction.v1.model.ManualRedactionType;
|
||||||
import com.iqser.red.service.redaction.v1.model.ManualRedactions;
|
import com.iqser.red.service.redaction.v1.model.ManualRedactions;
|
||||||
import com.iqser.red.service.redaction.v1.model.Rectangle;
|
import com.iqser.red.service.redaction.v1.model.Rectangle;
|
||||||
import com.iqser.red.service.redaction.v1.model.RedactionLogEntry;
|
import com.iqser.red.service.redaction.v1.model.RedactionLogEntry;
|
||||||
@ -118,11 +119,13 @@ public class AnnotationHighlightService {
|
|||||||
} else if (manualRemoval.getStatus().equals(Status.REQUESTED)) {
|
} else if (manualRemoval.getStatus().equals(Status.REQUESTED)) {
|
||||||
requestedToRemove = true;
|
requestedToRemove = true;
|
||||||
manualOverrideReason = entity.getRedactionReason() + ", requested to remove";
|
manualOverrideReason = entity.getRedactionReason() + ", requested to remove";
|
||||||
|
redactionLogEntry.setStatus(Status.REQUESTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
entity.setRedactionReason(manualOverrideReason != null ? manualOverrideReason : entity.getRedactionReason());
|
entity.setRedactionReason(manualOverrideReason != null ? manualOverrideReason : entity.getRedactionReason());
|
||||||
redactionLogEntry.setReason(manualOverrideReason);
|
redactionLogEntry.setReason(manualOverrideReason);
|
||||||
redactionLogEntry.setManual(true);
|
redactionLogEntry.setManual(true);
|
||||||
|
redactionLogEntry.setManualRedactionType(ManualRedactionType.REMOVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,6 +231,7 @@ public class AnnotationHighlightService {
|
|||||||
.sectionNumber(manualRedactionEntry.getSectionNumber())
|
.sectionNumber(manualRedactionEntry.getSectionNumber())
|
||||||
.manual(true)
|
.manual(true)
|
||||||
.status(manualRedactionEntry.getStatus())
|
.status(manualRedactionEntry.getStatus())
|
||||||
|
.manualRedactionType(ManualRedactionType.ADD)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user