YAML Import via Code


I’m looking for a way to import YAML files using a groovy updater script. As far as I know, there is an option to do this with XML files. But since we switched to YAML I would like to do these automated imports as well with YAML. Does anyone know if there is a YAML variant of the following function?

HippoSession hippoSession = (HippoSession) session;
hippoSession.importEnhancedSystemViewXML("", null, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW, ImportReferenceBehavior.IMPORT_REFERENCE_NOT_FOUND_THROW, null);

Thanks in advance!


The Yaml import does it like:

final ConfigurationService configurationService = HippoServiceRegistry.getService(ConfigurationService.class);
configurationService.importPlainYaml(in, nodeModel.getNode())
1 Like