Apply minor file transformer fixes

This commit is contained in:
George Kalampokis 2024-02-06 09:40:28 +02:00
parent 02a1437a91
commit 3ac4ed1237
2 changed files with 4 additions and 5 deletions

View File

@ -229,7 +229,9 @@ public class DescriptionTemplateDefinitionFileTransformerBuilder extends BaseFil
m.setMethod(d.getMethod()); m.setMethod(d.getMethod());
m.setHasAuth(d.getHasAuth()); m.setHasAuth(d.getHasAuth());
m.setOptionsRoot(d.getOptionsRoot()); m.setOptionsRoot(d.getOptionsRoot());
if (d.getAuth() != null) {
m.setAuth(convertAuthData(d.getAuth())); m.setAuth(convertAuthData(d.getAuth()));
}
m.setSourceBinding(convertComboBoxOption(d.getSourceBinding())); m.setSourceBinding(convertComboBoxOption(d.getSourceBinding()));
result.add(m); result.add(m);
} }

View File

@ -111,7 +111,6 @@ public class FileTransformerService {
List<TransformerRepository> repositories = transformerProperties.getSources().stream().map(depositSource -> getRepository(depositSource.getCodes().get(0))).toList(); List<TransformerRepository> repositories = transformerProperties.getSources().stream().map(depositSource -> getRepository(depositSource.getCodes().get(0))).toList();
repositories = new ArrayList<>(repositories); repositories = new ArrayList<>(repositories);
List<TransformerRepository> toDelete = new ArrayList<>();
repositories.forEach((client) -> { repositories.forEach((client) -> {
try { try {
FileTransformerConfiguration repositoryConfigs = client.getConfiguration(); FileTransformerConfiguration repositoryConfigs = client.getConfiguration();
@ -119,12 +118,10 @@ public class FileTransformerService {
configurations.addAll(repositoryConfigs.getExportVariants()); configurations.addAll(repositoryConfigs.getExportVariants());
} }
} catch (Exception e) { } catch (Exception e) {
toDelete.add(client); logger.warn(e.getLocalizedMessage(), e);
} }
}); });
repositories.removeAll(toDelete);
configs = new TransformerCacheModel(configurations); configs = new TransformerCacheModel(configurations);
this.fileTransformerConfigurationCache.put("base", configs); this.fileTransformerConfigurationCache.put("base", configs);
} }