IProviderInfo providerInfo = registry.getProviderInfo(providerId);
if (providerInfo == null) {
throw new UmiSettingsManagerException("There is no registered provider found by id= " + providerId); //$NON-NLS-1$
}
Settings settings = new Settings();
settings.setProviderId(providerInfo.getId());
Collection<? extends IProviderPropertyGroupInfo> groups = providerInfo.getPropertyGroups();
for (IProviderPropertyGroupInfo group : groups) {
Collection<? extends IProviderPropertyInfo> properties = group.getConfigurationInfo();
PropertyGroup propertyGroup = new PropertyGroup();
propertyGroup.setName(group.getName());
for (IProviderPropertyInfo property : properties) {
NamedValue nv = new NamedValue();
nv.setName(property.getName());
nv.setValue(property.getDefaultValue());
propertyGroup.addProperty(nv);
}
settings.addGroup(propertyGroup);
}
return settings;
}