fixed redaction-log read
This commit is contained in:
parent
ef8fad5310
commit
ef73b6ca3e
@ -0,0 +1,8 @@
|
||||
package com.iqser.red.service.redaction.report.v1.server.client;
|
||||
|
||||
import com.iqser.red.service.file.management.v1.api.resources.RedactionLogResource;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
@FeignClient(name = "RedactionLogResource", url = "${file-management-service.url}")
|
||||
public interface RedactionLogClient extends RedactionLogResource {
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.iqser.red.service.redaction.report.v1.api.model.ReportType;
|
||||
import com.iqser.red.service.redaction.report.v1.api.model.StoredFileInformation;
|
||||
import com.iqser.red.service.redaction.report.v1.server.client.FileStatusClient;
|
||||
import com.iqser.red.service.redaction.report.v1.server.client.DossierClient;
|
||||
import com.iqser.red.service.redaction.report.v1.server.client.RedactionLogClient;
|
||||
import com.iqser.red.service.redaction.report.v1.server.client.ReportTemplateClient;
|
||||
import com.iqser.red.service.redaction.report.v1.server.model.MultiFileWorkbook;
|
||||
import com.iqser.red.service.redaction.report.v1.server.model.ReportRedactionEntry;
|
||||
@ -41,6 +42,7 @@ public class ReportGenerationService {
|
||||
private final FileStatusClient fileStatusClient;
|
||||
private final DossierClient dossierClient;
|
||||
private final ReportTemplateClient reportTemplateClient;
|
||||
private final RedactionLogClient redactionLogClient;
|
||||
private final ExcelTemplateReportGenerationService excelTemplateReportGenerationService;
|
||||
|
||||
|
||||
@ -170,9 +172,9 @@ public class ReportGenerationService {
|
||||
}
|
||||
|
||||
private List<ReportRedactionEntry> getReportEntries(String dossierId, String fileId){
|
||||
RedactionLog redactionLog = null;
|
||||
RedactionLog redactionLog;
|
||||
try {
|
||||
redactionLog = reportStorageService.getRedactionLog(dossierId, fileId);
|
||||
redactionLog = redactionLogClient.getRedactionLog(dossierId, fileId, true);
|
||||
} catch (StorageObjectDoesNotExist e){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@ -17,19 +17,6 @@ import lombok.RequiredArgsConstructor;
|
||||
public class ReportStorageService {
|
||||
|
||||
private final StorageService storageService;
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
|
||||
public RedactionLog getRedactionLog(String dossierId, String fileId) {
|
||||
|
||||
var redactionLog = storageService.getObject(StorageIdUtils.getRedactionLogStorageId(dossierId, fileId));
|
||||
try {
|
||||
return objectMapper.readValue(redactionLog.getInputStream(), RedactionLog.class);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Could not convert RedactionLog", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String storeObject(String downloadId, byte[] data) {
|
||||
|
||||
|
||||
@ -2,12 +2,6 @@ package com.iqser.red.service.redaction.report.v1.server.storage;
|
||||
|
||||
public class StorageIdUtils {
|
||||
|
||||
public static String getRedactionLogStorageId(String dossierId, String fileId) {
|
||||
|
||||
return dossierId + "/" + fileId + ".REDACTION_LOG.json";
|
||||
}
|
||||
|
||||
|
||||
public static String getStorageId(String downloadId, String tmpFilename) {
|
||||
|
||||
return downloadId.substring(0, downloadId.length() - 3) + "/" + tmpFilename;
|
||||
|
||||
@ -1,30 +1,42 @@
|
||||
[
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2d)",
|
||||
"description": "methods of analysis for impurities in the active substance as manufactured except for methods for impurities that are considered to be toxicologically, ecotoxicologically or environmentally relevant"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2c)",
|
||||
"description": "results of production batches of the active substance including impurities"
|
||||
"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)"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2b)",
|
||||
"description": "the specification of impurity of the active substance except for the impurities that are considered to be toxicologically, ecotoxicologically or environmentally relevant"
|
||||
"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)"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2a)",
|
||||
"description": "the method of manufacture"
|
||||
"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)"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2g)",
|
||||
"description": "names and addresses of persons involved in testing on vertebrate animals"
|
||||
"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)"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2f)",
|
||||
"description": "information on the complete composition of a plant protection product"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"reason": "Reg (EC) No 1107/2009 Art. 63 (2e)",
|
||||
"description": "links between a producer or importer and the applicant or the authorisation holder"
|
||||
"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"
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user