Pull request #28: RED-1428 3

Merge in RED/redaction-report-service from RED-1428-3 to master

* commit '96d86b06030fa9deead5b15e28de74eeac5cdbfe':
  RED-1428: use file attributes placeholder from configuration-service
  RED-1422: enable to use custom report templates
This commit is contained in:
Dominique Eiflaender 2021-05-19 16:26:57 +02:00
commit 9da075cf43
5 changed files with 8 additions and 7 deletions

View File

@ -40,7 +40,7 @@
<dependency>
<groupId>com.iqser.red.service</groupId>
<artifactId>configuration-service-api-v1</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
<exclusions>
<exclusion>
<groupId>com.iqser.red.service</groupId>
@ -57,7 +57,7 @@
<dependency>
<groupId>com.iqser.red.service</groupId>
<artifactId>file-management-service-api-v1</artifactId>
<version>2.14.0</version>
<version>2.21.0</version>
</dependency>
<dependency>

View File

@ -101,8 +101,7 @@ public class WordReportGenerationService {
FileAttributesConfig fileAttributesConfig = fileAttributesClient.getFileAttributes(ruleSetId);
fileAttributesConfig.getFileAttributeConfigs().forEach(fileAttributeConfig -> {
String fileAttributePlaceholderName = "{{file.attribute." + fileAttributeConfig.getLabel().replace(" ", "-").toLowerCase(Locale.ROOT) + "}}";
fileAttributePlaceholders.put(fileAttributePlaceholderName, fileAttributeConfig.getId());
fileAttributePlaceholders.put(fileAttributeConfig.getPlaceholder(), fileAttributeConfig.getId());
});
return fileAttributePlaceholders;
}

View File

@ -78,12 +78,12 @@ public class RedactionReportIntegrationTest {
@Test
public void testWordReportGeneration() throws IOException {
ClassPathResource redactionLogResource = new ClassPathResource("files/RedactedLog.txt");
ClassPathResource redactionLogResource = new ClassPathResource("files/redactionLog.json");
RedactionLog redactionLog = objectMapper.readValue(redactionLogResource.getInputStream(), RedactionLog.class);
ClassPathResource legalBasisMappingResource = new ClassPathResource("files/LegalBasisMapping.json");
ClassPathResource legalBasisMappingResource = new ClassPathResource("files/legalBasisMapping.json");
List<LegalBasisMapping> legalBasisMapping = objectMapper.readValue(legalBasisMappingResource.getInputStream(), new TypeReference<>() {
});
@ -91,7 +91,7 @@ public class RedactionReportIntegrationTest {
List<ReportRedactionEntry> reportEntries = redactionLogConverterService.convertAndSort(redactionLog, legalBasisMapping);
List<FileAttributeConfig> fileAttributeConfigs = new ArrayList<>();
fileAttributeConfigs.add(new FileAttributeConfig("3e9b9569-5d2e-4619-848b-dd0a3e96527f", "", "Document Title", true, true, FileAttributeConfig.FileAttributeType.TEXT));
fileAttributeConfigs.add(new FileAttributeConfig("3e9b9569-5d2e-4619-848b-dd0a3e96527f", "", "Document Title", true, true, FileAttributeConfig.FileAttributeType.TEXT, "{{file.attribute.placeholder}}"));
FileAttributesConfig fileAttributesConfig = new FileAttributesConfig("", "", fileAttributeConfigs);
when(fileAttributesClient.getFileAttributes(redactionLog.getRuleSetId())).thenReturn(fileAttributesConfig);

View File

@ -0,0 +1 @@
[{"name":"1. personal data (incl. geolocation)","description":"any other personal data except for\n a. the name and address of the applicant;\n b. the names of authors of published or publicly available studies supporting such requests; and the names of all participants and observers in meetings of the Scientific Committee and the Scientific Panels, their working groups and any other ad hoc group meeting on the subject matter.\nand except for personal data (names and addresses) of individuals involved in testing on vertebrate studies or in obtaining toxicological information","reason":"Article 39(e)(1) and Article 39(e)(2) of Regulation (EC) No 178/2002"},{"name":"2. manufacturing or production process","description":"the manufacturing or production process, including the method and innovative aspects thereof, as well as other technical and industrial specifications inherent to that process or method, except for information which is relevant to the assessment of safety","reason":"Article 63(2)(a) of Regulation (EC) No 1107/2009 (making reference to Article 39 of Regulation EC No 178/2002)"},{"name":"3. links between a producer and applicant","description":"commercial links between a producer or importer and the applicant or the authorisation holder, where applicable;","reason":"Article 63(2)(a) of Regulation (EC) No 1107/2009 (making reference to Article 39 of Regulation EC No 178/2002)"},{"name":"4. commercial information","description":"commercial information revealing sourcing, market shares or business strategy of the applicant","reason":"Article 63(2)(a) of Regulation (EC) No 1107/2009 (making reference to Article 39 of Regulation EC No 178/2002)"},{"name":"5. quantitative composition","description":"quantitative composition of the subject matter of the request, except for information which is relevant to the assessment of safety","reason":"Article 63(2)(a) of Regulation (EC) No 1107/2009 (making reference to Article 39 of Regulation EC No 178/2002)"},{"name":"6. specification of impurity","description":"the specification of impurity of the active substance and the related methods of analysis for impurities in the active substance as manufactured, except for the impurities that are considered to be toxicologically, ecotoxicologically or environmentally relevant and the related methods of analysis for such impurities","reason":"Article 63(2)(b) of Regulation (EC) No 1107/2009"},{"name":"7. results of production batches","description":"results of production batches of the active substance including impurities","reason":"Article 63(2)(c) of Regulation (EC) No 1107/2009"},{"name":"8. composition of a plant protection product","description":"information on the complete composition of a plant protection product","reason":"Article 63(2)(d) of Regulation (EC) No 1107/2009"}]

File diff suppressed because one or more lines are too long