RedactionLogMergeService.java edited online with Bitbucket

This commit is contained in:
Timo Bejan 2021-08-13 13:19:42 +02:00
parent e43e8bccbf
commit 5312d5ffdf

View File

@ -37,6 +37,7 @@ public class RedactionLogMergeService {
processRedactionLogEntry(manualRedactionWrappers.stream().filter(mr -> entry.getId().equals(mr.getId()))
.collect(Collectors.toList()), dossierTemplateId, entry);
entry.setComments(manualRedactions.getComments().get(entry.getId()));
}
@ -47,30 +48,30 @@ public class RedactionLogMergeService {
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
log.info("Processing Manual Redactions: {}", manualRedactions);
List<ManualRedactionWrapper> manualRedactionWrappers = new ArrayList<>();
log.info("Processing Manual Redactions: {}", manualRedactions);
manualRedactions.getImageRecategorizations().forEach(item -> {
if (item.getSoftDeletedTime() == null) {
if (item.getSoftDeletedTime() != null) {
manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item));
}
});
manualRedactions.getIdsToRemove().forEach(item -> {
if (item.getSoftDeletedTime() == null) {
if (item.getSoftDeletedTime() != null) {
manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item));
}
});
manualRedactions.getForceRedacts().forEach(item -> {
if (item.getSoftDeletedTime() == null) {
if (item.getSoftDeletedTime() != null) {
manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item));
}
});
manualRedactions.getManualLegalBasisChanges().forEach(item -> {
if (item.getSoftDeletedTime() == null) {
if (item.getSoftDeletedTime() != null) {
manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item));
}
});
@ -84,6 +85,8 @@ public class RedactionLogMergeService {
private void processRedactionLogEntry(List<ManualRedactionWrapper> manualRedactionWrappers, String dossierTemplateId, RedactionLogEntry redactionLogEntry) {
log.info("Processing: {} for: {}", manualRedactionWrappers, redactionLogEntry);
manualRedactionWrappers.forEach(mrw -> {
if (mrw.getItem() instanceof ManualImageRecategorization) {
@ -287,3 +290,4 @@ public class RedactionLogMergeService {
}