Pull request #205: RED-5473

Merge in RED/redaction-report-service from RED-5473 to master

* commit '4473060ddaec611ceeefad13a60373dac85e1331':
  RED-5473: added value fix for Word reports
  RED-5473: removed unnecessary log of typeslist
  RED-5473: fixed output of value placeholder for empty values by adding type of entry
  RED-5473: try to get redaction value
  RED-5473: try to get redaction value
  RED-5473: try to get redaction value
  RED-5473: try to get list of types
This commit is contained in:
Ali Oezyetimoglu 2022-12-05 15:09:52 +01:00
commit 1298131d56
4 changed files with 6 additions and 3 deletions

View File

@ -383,7 +383,9 @@ public class ExcelReportGenerationService {
return input -> input.getEntry().getExcerpt();
}
if (placeholder.equals(REDACTION_VALUE_PLACEHOLDER)) {
return input -> input.getEntry().getValue() != null ? input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ") : "";
return input -> input.getEntry().getValue() != null ? input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ") : input.getEntry().getEntityDisplayName();
}
if (placeholder.equals(REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER)) {
return input -> input.getEntry().getEntityDisplayName();

View File

@ -36,7 +36,7 @@ public class IuclidFunctionService {
ReportRedactionEntry entry = iterator.next();
s.append("P").append(entry.getPage()).append(" ");
if (StringUtils.isBlank(entry.getValue()) || entry.getValue().equalsIgnoreCase("Rectangle")) {
s.append("non-readable content");
s.append(entry.getEntityDisplayName()).append(" - non-readable content");
} else {
s.append(entry.getValue().replaceAll("\n", " ").replaceAll(" ", " "));
}

View File

@ -8,6 +8,7 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

View File

@ -433,7 +433,7 @@ public class WordReportGenerationService {
}
if (placeholder.equals(REDACTION_VALUE_PLACEHOLDER)) {
foundPlaceholders.add(REDACTION_VALUE_PLACEHOLDER);
return input -> input.getEntry().getValue() != null ? input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ") : "";
return input -> input.getEntry().getValue() != null ? input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ") : input.getEntry().getEntityDisplayName();
}
if (placeholder.equals(REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER)) {
foundPlaceholders.add(REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER);