class XYZSettingsBroker implements SettingsBroker {

    @Override
    public XYZSettings getSettings(XYZTileLayerInfo layer)
    {
        XYZSettings defaultSettings = new XYZSettings();
        defaultSettings.setLayerId(layer.getName());
        defaultSettings.setMaxZoomLevelCurrent(layer.getMaxLevels());
        defaultSettings.setMaxZoomLevelDefault(layer.getMaxLevelsDefault());

        XYZSettings settings = myPreferences.getJAXBObject(XYZSettings.class, layer.getName(), defaultSettings);
        settings.setMaxZoomLevelDefault(layer.getMaxLevelsDefault());

        return settings;
    }

    public  XYZSettingsBroker(PreferencesRegistry prefsRegistry);

}