use of com.helger.settings.exchange.xml.SettingsMicroDocumentConverter in project phoss-smp by phax.
the class SMPSettingsManagerXML method createWriteData.
@Override
@Nonnull
protected IMicroDocument createWriteData() {
final IMicroDocument ret = new MicroDocument();
final SettingsMicroDocumentConverter<Settings> aConverter = new SettingsMicroDocumentConverter<>(ISettingsFactory.newInstance());
ret.appendChild(aConverter.convertToMicroElement(m_aSettings.getAsSettings(), null, "root"));
return ret;
}
use of com.helger.settings.exchange.xml.SettingsMicroDocumentConverter in project phoss-smp by phax.
the class SMPSettingsManagerXML method onRead.
@Override
@Nonnull
protected EChange onRead(@Nonnull final IMicroDocument aDoc) {
final SettingsMicroDocumentConverter<Settings> aConverter = new SettingsMicroDocumentConverter<>(ISettingsFactory.newInstance());
final ISettings aSettings = aConverter.convertToNative(aDoc.getDocumentElement());
m_aSettings.initFromSettings(aSettings);
return EChange.UNCHANGED;
}
Aggregations