RED-5473: fixed output of value placeholder for empty values by adding type of entry

This commit is contained in:
Ali Oezyetimoglu 2022-12-05 14:27:53 +01:00
parent 318882d8c3
commit e7a05a670e
2 changed files with 1 additions and 18 deletions

View File

@ -384,19 +384,8 @@ public class ExcelReportGenerationService {
}
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(" ", " ") : computeValueForSignatureRedactions(input);
return input -> input.getEntry().getValue() != null ? input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ") : input.getEntry().getEntityDisplayName();
// return input -> {
// String value = "";
// if (input.getEntry().getValue() != null) {
// value = input.getEntry().getValue().replaceAll("\n", " ").replaceAll(" ", " ");
// } else {
// value = computeValueForSignatureRedactions(input);
// }
// return value;
// };
}
if (placeholder.equals(REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER)) {
return input -> input.getEntry().getEntityDisplayName();
@ -404,12 +393,6 @@ public class ExcelReportGenerationService {
return input -> "";
}
// private String computeValueForSignatureRedactions(PlaceholderInput input) {
//
// System.out.println(input.getEntry().getEntityDisplayName());
// return input.getEntry().getEntityDisplayName();
// }
private void replacePlaceholdersForCell(Cell cell, String search, String replace) {

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(" ", " "));
}