From 9da3e2d966b912433a6fda53a3d5c2c40f095e23 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 15:26:07 +0200 Subject: [PATCH 1/5] DM-285: adjust reports to new component log --- redaction-report-service-v1/pom.xml | 2 +- .../pom.xml | 6 +- .../service/ComponentRowsReportService.java | 90 +++++++++++++++++++ .../service/ExcelReportGenerationService.java | 34 +------ 4 files changed, 99 insertions(+), 33 deletions(-) create mode 100644 redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java diff --git a/redaction-report-service-v1/pom.xml b/redaction-report-service-v1/pom.xml index 41f2822..64b5469 100644 --- a/redaction-report-service-v1/pom.xml +++ b/redaction-report-service-v1/pom.xml @@ -24,7 +24,7 @@ - 2.79.0 + 2.197.0 5.2.3 diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml index d0bf47f..b6c2571 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml +++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml @@ -83,7 +83,11 @@ - + + com.iqser.red.service + persistence-service-external-api-v2 + ${persistence-service.version} + com.iqser.red.commons test-commons diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java new file mode 100644 index 0000000..afcd2ec --- /dev/null +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java @@ -0,0 +1,90 @@ +package com.iqser.red.service.redaction.report.v1.server.service; + +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Sheet; +import org.springframework.stereotype.Service; + +import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileAttributeConfig; +import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileModel; +import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponents; +import com.iqser.red.service.persistence.service.v2.api.external.resource.ComponentResource; +import com.iqser.red.service.redaction.report.v1.server.client.FileAttributesConfigClient; +import com.iqser.red.service.redaction.report.v1.server.model.ExcelModel; + +import lombok.AccessLevel; +import lombok.RequiredArgsConstructor; +import lombok.experimental.FieldDefaults; + +@Service +@RequiredArgsConstructor +@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) +public class ComponentRowsReportService { + + ComponentResource componentResource; + FileAttributesConfigClient fileAttributesClient; + + static int FILENAME_COL = 0; + static int COMPONENT_NAME_COL = 1; + static int COMPONENT_VALUE_COL = 2; + + + public void addComponentRows(Sheet sheet, FileModel fileModel, ExcelModel excelModel) { + + FileComponents fileComponents = componentResource.getComponents(fileModel.getDossierTemplateId(), fileModel.getDossierId(), fileModel.getId(), false); + + AtomicInteger rowIndex = new AtomicInteger(excelModel.getRedactionPlaceholderRow()); + + String oecd = getOecdNumber(fileModel); + int fileNameRow = rowIndex.getAndIncrement(); + sheet.createRow(fileNameRow); + excelModel.getWrittenRows().add(fileNameRow); + Cell fileNameCell = sheet.getRow(fileNameRow).createCell(FILENAME_COL); + fileNameCell.setCellValue(fileComponents.getFilename()); + + fileComponents.getComponents().forEach((componentName, values) -> { + + if (values.isEmpty()) { + return; + } + int componentNameRow = rowIndex.getAndIncrement(); + sheet.createRow(componentNameRow); + excelModel.getWrittenRows().add(componentNameRow); + + Cell componentNameCell = sheet.getRow(componentNameRow).createCell(COMPONENT_NAME_COL); + componentNameCell.setCellValue(oecd + "-" + componentName.replaceAll("_", " ")); + + Cell valueCell = sheet.getRow(componentNameRow).createCell(COMPONENT_VALUE_COL); + valueCell.setCellValue(values.get(0)); + + for (String value : values.subList(1, values.size())) { + int additionalValueRow = rowIndex.getAndIncrement(); + Cell additionalValueCell = sheet.createRow(additionalValueRow).createCell(COMPONENT_VALUE_COL); + excelModel.getWrittenRows().add(additionalValueRow); + additionalValueCell.setCellValue(value); + } + + }); + + sheet.createRow(rowIndex.get()); + excelModel.getWrittenRows().add(rowIndex.get()); + + excelModel.setRedactionPlaceholderRow(rowIndex.getAndIncrement()); + + } + + + private String getOecdNumber(FileModel file) { + + return fileAttributesClient.getFileAttributeConfigs(file.getDossierTemplateId()) + .stream() + .filter(f -> f.getLabel().equals("OECD Number")) + .map(FileAttributeConfig::getId) + .findFirst() + .map(oecd -> file.getFileAttributes().get(oecd)) + .orElse(null); + + } + +} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java index c978cff..11c1026 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java @@ -59,7 +59,6 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.springframework.stereotype.Service; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileModel; -import com.iqser.red.service.redaction.report.v1.api.model.rss.SCMComponent; import com.iqser.red.service.redaction.report.v1.server.model.CellIdentifier; import com.iqser.red.service.redaction.report.v1.server.model.ExcelModel; import com.iqser.red.service.redaction.report.v1.server.model.ImagePlaceholder; @@ -94,7 +93,8 @@ public class ExcelReportGenerationService { REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER, SCM_FUNCTION_PLACEHOLDER, SKIPPED_PLACEHOLDER); - private final RSSPoc2Service rSSPoc2Service; + private final ComponentRowsReportService componentRowsReportService; + @Timed("redactmanager_generateExcelReport") @@ -142,7 +142,7 @@ public class ExcelReportGenerationService { } if (excelModel.isScmFunctionPlaceholderPresent()) { - addSCMEntryRows(sheet, fileModel, excelModel); + componentRowsReportService.addComponentRows(sheet, fileModel, excelModel); } if (isLastFile) { @@ -239,35 +239,7 @@ public class ExcelReportGenerationService { } - private void addSCMEntryRows(Sheet sheet, FileModel fileModel, ExcelModel excelModel) { - var scm = rSSPoc2Service.getRSS(fileModel.getDossierId(), fileModel.getId()); - var scmResultMap = scm.getFiles().get(0).getResult(); - - AtomicInteger rowIndex = new AtomicInteger(excelModel.getRedactionPlaceholderRow()); - - var oecd = rSSPoc2Service.getOecdNumber(fileModel); - - for (Map.Entry entry : scmResultMap.entrySet()) { - - sheet.createRow(rowIndex.get()); - excelModel.getWrittenRows().add(rowIndex.get()); - - Cell keyCell = sheet.getRow(rowIndex.get()).createCell(0); - keyCell.setCellValue(oecd + "-" + entry.getKey().replaceAll("_", " ")); - - Cell valueCell = sheet.getRow(rowIndex.get()).createCell(1); - valueCell.setCellValue(entry.getValue().getValue() != null ? entry.getValue().getValue() : entry.getValue().getOriginalValue()); - - rowIndex.getAndIncrement(); - } - - sheet.createRow(rowIndex.get()); - excelModel.getWrittenRows().add(rowIndex.get()); - - excelModel.setRedactionPlaceholderRow(rowIndex.getAndIncrement()); - - } private void replacePlaceholders(Cell cell, PlaceholderModel placeholderModel, String dossierName, String filename) { From 0d40d379f69e9b9c1ff55734e075e3682b65bf03 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 15:32:55 +0200 Subject: [PATCH 2/5] DM-285: adjust reports to new component log --- publish-custom-docker-img.sh | 27 +++++++++++++++++++ .../pom.xml | 3 ++- .../StatusReportGenerationServiceTest.java | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 publish-custom-docker-img.sh diff --git a/publish-custom-docker-img.sh b/publish-custom-docker-img.sh new file mode 100755 index 0000000..4b70fde --- /dev/null +++ b/publish-custom-docker-img.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# This script compiles the project, builds a docker image with the tag - and pushes it to our nexus. + +# Set the Nexus repository URL +NEXUS_REPO="nexus.knecon.com:5001" +# Set the image name +IMAGE_NAME="red/redaction-report-service-server-v1" +# path to image repo +IMAGE_REPO="redaction-report-service-image-v1" + +echo "Running build" +mvn clean install -Pquickbuild + +# Get the current Git branch +GIT_BRANCH=$(git symbolic-ref --short HEAD) +# Get the first 5 characters of the commit hash +GIT_COMMIT_HASH=$(git rev-parse --short=5 HEAD) +# Create the image tag by combining branch and commit hash +IMAGE_TAG="${GIT_BRANCH}-${GIT_COMMIT_HASH}" +IMAGE_NAME="$NEXUS_REPO/$IMAGE_NAME:$IMAGE_TAG" + +echo "Building docker image: {$IMAGE_NAME}" +# Build the Docker image with the specified name and tag and push to nexus +mvn -f $IMAGE_REPO docker:build docker:push -Ddocker.image.version=$IMAGE_TAG + +echo "Docker image '$IMAGE_NAME' has been built and pushed to Nexus." diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml index b6c2571..1c083cb 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml +++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml @@ -83,9 +83,10 @@ + com.iqser.red.service - persistence-service-external-api-v2 + persistence-service-external-api-impl-v2 ${persistence-service.version} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java index 599f9b1..8c56541 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java @@ -44,7 +44,7 @@ public class StatusReportGenerationServiceTest { String dossierId = "dossierId"; - Dossier dossier = Dossier.builder().dossierName("dossierName").id(dossierId).build(); + Dossier dossier = Dossier.builder().name("dossierName").id(dossierId).build(); when(dossierClient.getDossierById(dossierId, true, false)).thenReturn(dossier); FileModel fileStatus1 = FileModel.builder() From c1868f5eb7f7752a68b40f1889411a887292b705 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 15:38:05 +0200 Subject: [PATCH 3/5] DM-285: adjust reports to new component log --- .../redaction-report-service-server-v1/pom.xml | 2 +- .../report/v1/server/client/ComponentClient.java | 10 ++++++++++ .../v1/server/service/ComponentRowsReportService.java | 8 ++++---- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml index 1c083cb..185abc0 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml +++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml @@ -86,7 +86,7 @@ com.iqser.red.service - persistence-service-external-api-impl-v2 + persistence-service-external-api-v2 ${persistence-service.version} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java new file mode 100644 index 0000000..be0d519 --- /dev/null +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java @@ -0,0 +1,10 @@ +package com.iqser.red.service.redaction.report.v1.server.client; + +import org.springframework.cloud.openfeign.FeignClient; + +import com.iqser.red.service.persistence.service.v2.api.external.resource.ComponentResource; + +@FeignClient(name = "ComponentResource", url = "${persistence-service.url}") +public interface ComponentClient extends ComponentResource { + +} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java index afcd2ec..ea0ecac 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Service; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileAttributeConfig; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileModel; import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponents; -import com.iqser.red.service.persistence.service.v2.api.external.resource.ComponentResource; +import com.iqser.red.service.redaction.report.v1.server.client.ComponentClient; import com.iqser.red.service.redaction.report.v1.server.client.FileAttributesConfigClient; import com.iqser.red.service.redaction.report.v1.server.model.ExcelModel; @@ -22,7 +22,7 @@ import lombok.experimental.FieldDefaults; @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) public class ComponentRowsReportService { - ComponentResource componentResource; + ComponentClient componentResource; FileAttributesConfigClient fileAttributesClient; static int FILENAME_COL = 0; @@ -41,7 +41,7 @@ public class ComponentRowsReportService { sheet.createRow(fileNameRow); excelModel.getWrittenRows().add(fileNameRow); Cell fileNameCell = sheet.getRow(fileNameRow).createCell(FILENAME_COL); - fileNameCell.setCellValue(fileComponents.getFilename()); + fileNameCell.setCellValue(fileComponents.getFilename() + "-" + oecd); fileComponents.getComponents().forEach((componentName, values) -> { @@ -53,7 +53,7 @@ public class ComponentRowsReportService { excelModel.getWrittenRows().add(componentNameRow); Cell componentNameCell = sheet.getRow(componentNameRow).createCell(COMPONENT_NAME_COL); - componentNameCell.setCellValue(oecd + "-" + componentName.replaceAll("_", " ")); + componentNameCell.setCellValue(componentName.replaceAll("_", " ")); Cell valueCell = sheet.getRow(componentNameRow).createCell(COMPONENT_VALUE_COL); valueCell.setCellValue(values.get(0)); From b78de6857eae2bfe3c7fd536b6def5565fa06c68 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 16:47:45 +0200 Subject: [PATCH 4/5] DM-285: adjust reports to new component log --- redaction-report-service-v1/pom.xml | 2 +- .../pom.xml | 2 +- .../v1/server/client/ComponentClient.java | 6 +-- .../service/ComponentRowsReportService.java | 40 +++++++------------ 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/redaction-report-service-v1/pom.xml b/redaction-report-service-v1/pom.xml index 64b5469..70b59ae 100644 --- a/redaction-report-service-v1/pom.xml +++ b/redaction-report-service-v1/pom.xml @@ -24,7 +24,7 @@ - 2.197.0 + 2.198.0 5.2.3 diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml index 185abc0..5b0ccf0 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml +++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml @@ -86,7 +86,7 @@ com.iqser.red.service - persistence-service-external-api-v2 + persistence-service-internal-api-v1 ${persistence-service.version} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java index be0d519..334b19c 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/client/ComponentClient.java @@ -2,9 +2,9 @@ package com.iqser.red.service.redaction.report.v1.server.client; import org.springframework.cloud.openfeign.FeignClient; -import com.iqser.red.service.persistence.service.v2.api.external.resource.ComponentResource; +import com.iqser.red.service.persistence.service.v1.api.internal.resources.InternalComponentResource; -@FeignClient(name = "ComponentResource", url = "${persistence-service.url}") -public interface ComponentClient extends ComponentResource { +@FeignClient(name = "InternalComponentResource", url = "${persistence-service.url}") +public interface ComponentClient extends InternalComponentResource { } diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java index ea0ecac..c0e76d4 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java @@ -3,12 +3,13 @@ package com.iqser.red.service.redaction.report.v1.server.service; import java.util.concurrent.atomic.AtomicInteger; import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.springframework.stereotype.Service; +import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.componentlog.ComponentLog; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileAttributeConfig; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileModel; -import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponents; import com.iqser.red.service.redaction.report.v1.server.client.ComponentClient; import com.iqser.red.service.redaction.report.v1.server.client.FileAttributesConfigClient; import com.iqser.red.service.redaction.report.v1.server.model.ExcelModel; @@ -25,44 +26,33 @@ public class ComponentRowsReportService { ComponentClient componentResource; FileAttributesConfigClient fileAttributesClient; - static int FILENAME_COL = 0; - static int COMPONENT_NAME_COL = 1; - static int COMPONENT_VALUE_COL = 2; + static int COMPONENT_NAME_COL = 0; + static int COMPONENT_VALUE_STARTING_COL = 1; public void addComponentRows(Sheet sheet, FileModel fileModel, ExcelModel excelModel) { - FileComponents fileComponents = componentResource.getComponents(fileModel.getDossierTemplateId(), fileModel.getDossierId(), fileModel.getId(), false); + ComponentLog componentLog = componentResource.getComponentLog(fileModel.getDossierId(), fileModel.getId(), true); AtomicInteger rowIndex = new AtomicInteger(excelModel.getRedactionPlaceholderRow()); String oecd = getOecdNumber(fileModel); - int fileNameRow = rowIndex.getAndIncrement(); - sheet.createRow(fileNameRow); - excelModel.getWrittenRows().add(fileNameRow); - Cell fileNameCell = sheet.getRow(fileNameRow).createCell(FILENAME_COL); - fileNameCell.setCellValue(fileComponents.getFilename() + "-" + oecd); - fileComponents.getComponents().forEach((componentName, values) -> { + componentLog.getComponentLogEntries().forEach(componentLogEntry -> { - if (values.isEmpty()) { + if (componentLogEntry.getComponentValues().isEmpty()) { return; } - int componentNameRow = rowIndex.getAndIncrement(); - sheet.createRow(componentNameRow); - excelModel.getWrittenRows().add(componentNameRow); + int componentRowIdx = rowIndex.getAndIncrement(); + Row componentRow = sheet.createRow(componentRowIdx); + excelModel.getWrittenRows().add(componentRowIdx); - Cell componentNameCell = sheet.getRow(componentNameRow).createCell(COMPONENT_NAME_COL); - componentNameCell.setCellValue(componentName.replaceAll("_", " ")); + Cell componentNameCell = componentRow.createCell(COMPONENT_NAME_COL); + componentNameCell.setCellValue(oecd + "-" + componentLogEntry.getName().replaceAll("_", " ")); - Cell valueCell = sheet.getRow(componentNameRow).createCell(COMPONENT_VALUE_COL); - valueCell.setCellValue(values.get(0)); - - for (String value : values.subList(1, values.size())) { - int additionalValueRow = rowIndex.getAndIncrement(); - Cell additionalValueCell = sheet.createRow(additionalValueRow).createCell(COMPONENT_VALUE_COL); - excelModel.getWrittenRows().add(additionalValueRow); - additionalValueCell.setCellValue(value); + for (int valueIdx = 0; valueIdx < componentLogEntry.getComponentValues().size(); valueIdx++) { + String value = componentLogEntry.getComponentValues().get(valueIdx).getValue(); + componentRow.createCell(COMPONENT_VALUE_STARTING_COL + valueIdx).setCellValue(value); } }); From 0fff9698fcd342e5423a5b6c168606ff4231244e Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 17:06:34 +0200 Subject: [PATCH 5/5] DM-285: adjust reports to new component log * ignore checkstyle error, because i want to explicitly initialize the field --- .../report/v1/server/service/ComponentRowsReportService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java index c0e76d4..7ab8773 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ComponentRowsReportService.java @@ -26,6 +26,7 @@ public class ComponentRowsReportService { ComponentClient componentResource; FileAttributesConfigClient fileAttributesClient; + @SuppressWarnings("checkstyle:all") static int COMPONENT_NAME_COL = 0; static int COMPONENT_VALUE_STARTING_COL = 1;