Moved the inner storing of settings to value objects and changed the

Settings hierarchy to be restored after deserialization to support both,
Java and GWT serialization
This commit is contained in:
Steffen Schaefer committed 2016-04-13 16:02:17 +02:00
1 parent 61d296cbdf
commit 459651cb4a
29 files changed
+664 -124

No files matched your search

@@ -23,22 +23,32 @@ import com.sap.sse.common.settings.StringToEnumConverter;
public abstract class AbstractSettingsSerializationTest<SOT> {
private static class TestOuterSettings extends AbstractSettings {
private SimpleTestSettings nested = new SimpleTestSettings("nested", this);
private SimpleTestSettings nested;
public TestOuterSettings() {
}
@Override
protected void addChildSettings() {
nested = new SimpleTestSettings("nested", this);
}
}
private static class TestListSettings extends AbstractSettings {
private SettingsList<SimpleTestSettings> l = new SettingsList<>("l", this, SimpleTestSettings::new);
private SettingsList<SimpleTestSettings> l;
public TestListSettings() {
}
@Override
protected void addChildSettings() {
l = new SettingsList<>("l", this, SimpleTestSettings::new);
}
}
private static class SimpleTestSettings extends AbstractSettings {
private final StringSetting string = new StringSetting("string", this);
private final DecimalSetting num = new DecimalSetting("num", this);
private StringSetting string;
private DecimalSetting num;
public SimpleTestSettings() {
}
@@ -51,6 +61,12 @@ public abstract class AbstractSettingsSerializationTest<SOT> {
public SimpleTestSettings(String name, AbstractSettings parent) {
super(name, parent);
}
@Override
protected void addChildSettings() {
string = new StringSetting("string", this);
num = new DecimalSetting("num", this);
}
}
private static class TestSettings extends AbstractSettings {