use of com.thoughtworks.go.config.parser.ConfigReferenceElements in project gocd by gocd.
the class MagicalGoConfigXmlLoader method deserializeConfig.
public CruiseConfig deserializeConfig(String content) throws Exception {
String md5 = CachedDigestUtils.md5Hex(content);
Element element = parseInputStream(new ByteArrayInputStream(content.getBytes()));
LOGGER.debug("[Config Save] Updating config cache with new XML");
CruiseConfig configForEdit = classParser(element, BasicCruiseConfig.class, configCache, new GoCipher(), registry, new ConfigReferenceElements()).parse();
setMd5(configForEdit, md5);
configForEdit.setOrigins(new FileConfigOrigin());
return configForEdit;
}
use of com.thoughtworks.go.config.parser.ConfigReferenceElements in project gocd by gocd.
the class MagicalGoConfigXmlLoader method fromXmlPartial.
public <T> T fromXmlPartial(InputStream inputStream, Class<T> o) throws Exception {
Document document = new SAXBuilder().build(inputStream);
Element element = document.getRootElement();
return classParser(element, o, configCache, new GoCipher(), registry, new ConfigReferenceElements()).parse();
}
Aggregations