RED-9965: component definitions are outside of template folder for file export #697
@ -124,6 +124,7 @@ public class DossierTemplateExportService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Observed(name = "DossierTemplateExportService", contextualName = "export-dossier-template")
|
||||
public long createDownloadArchive(ExportDownloadMessage downloadJob) throws IOException {
|
||||
|
||||
@ -143,6 +144,7 @@ public class DossierTemplateExportService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Observed(name = "DossierTemplateExportService", contextualName = "write-dossier-template-to-archive")
|
||||
public void addDossierTemplateToArchive(FileSystemBackedArchiver fileSystemBackedArchiver, String folder, DossierTemplateEntity dossierTemplate) throws IOException {
|
||||
|
||||
@ -276,7 +278,7 @@ public class DossierTemplateExportService {
|
||||
// components
|
||||
List<ComponentDefinitionEntity> componentDefinitions = componentDefinitionPersistenceService.findByDossierTemplateIdAndNotSoftDeleted(dossierTemplate.getId());
|
||||
for (ComponentDefinitionEntity componentDefinition : componentDefinitions) {
|
||||
fileSystemBackedArchiver.addEntries(new FileSystemBackedArchiver.ArchiveModel(componentDefinition.getTechnicalName(),
|
||||
fileSystemBackedArchiver.addEntries(new FileSystemBackedArchiver.ArchiveModel(resolveFolder(folder, componentDefinition.getTechnicalName()),
|
||||
getFilename(ExportFilename.COMPONENTS, JSON_EXT),
|
||||
objectMapper.writeValueAsBytes(componentDefinition)));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user