use of de.symeda.sormas.backend.disease.DiseaseConfiguration in project SORMAS-Project by hzi-braunschweig.
the class StartupShutdownService method createMissingDiseaseConfigurations.
private void createMissingDiseaseConfigurations() {
List<DiseaseConfiguration> diseaseConfigurations = diseaseConfigurationService.getAll();
List<Disease> configuredDiseases = diseaseConfigurations.stream().map(DiseaseConfiguration::getDisease).collect(Collectors.toList());
Arrays.stream(Disease.values()).filter(d -> !configuredDiseases.contains(d)).forEach(d -> {
DiseaseConfiguration configuration = DiseaseConfiguration.build(d);
diseaseConfigurationService.ensurePersisted(configuration);
});
}
use of de.symeda.sormas.backend.disease.DiseaseConfiguration in project SORMAS-Project by hzi-braunschweig.
the class AbstractBeanTest method createDiseaseConfigurations.
@Before
public void createDiseaseConfigurations() {
List<DiseaseConfiguration> diseaseConfigurations = getDiseaseConfigurationService().getAll();
List<Disease> configuredDiseases = diseaseConfigurations.stream().map(DiseaseConfiguration::getDisease).collect(Collectors.toList());
Arrays.stream(Disease.values()).filter(d -> !configuredDiseases.contains(d)).forEach(d -> {
DiseaseConfiguration configuration = DiseaseConfiguration.build(d);
getDiseaseConfigurationService().ensurePersisted(configuration);
});
}
use of de.symeda.sormas.backend.disease.DiseaseConfiguration in project SORMAS-Project by hzi-braunschweig.
the class AbstractBeanTest method createDiseaseConfigurations.
@Before
public void createDiseaseConfigurations() {
List<DiseaseConfiguration> diseaseConfigurations = getDiseaseConfigurationService().getAll();
List<Disease> configuredDiseases = diseaseConfigurations.stream().map(c -> c.getDisease()).collect(Collectors.toList());
Arrays.stream(Disease.values()).filter(d -> !configuredDiseases.contains(d)).forEach(d -> {
DiseaseConfiguration configuration = DiseaseConfiguration.build(d);
getDiseaseConfigurationService().ensurePersisted(configuration);
});
}
Aggregations