* </p>
*/
void saveMasterPasswordProviderConfig(MasterPasswordProviderConfig config, boolean validate)
throws IOException,SecurityConfigException {
SecurityConfigValidator validator = SecurityConfigValidator
.getConfigurationValiator(MasterPasswordProvider.class, config.getClassName());
if (config.getId() == null) {
config.initBeforeSave();
if (validate) {
validator.validateAddMasterPasswordProvider(config);
}
}
else {
if (validate) {
validator.validateModifiedMasterPasswordProvider(config,
masterPasswordProviderHelper.loadConfig(config.getName()));
}
}
masterPasswordProviderHelper.saveConfig(config);