/** * Removes a role service configuration. * * @param config The role service configuration. */ public void removeRoleService(SecurityRoleServiceConfig config) throws IOException, SecurityConfigException { SecurityConfigValidator validator = SecurityConfigValidator.getConfigurationValiator( GeoServerRoleService.class, config.getClassName()); validator.validateRemoveRoleService(config); roleServices.remove(config.getName()); roleServiceHelper.removeConfig(config.getName()); }
/** Saves/persists a role service configuration. */ public void saveRoleService(SecurityRoleServiceConfig config) throws IOException, SecurityConfigException { SecurityConfigValidator validator = SecurityConfigValidator.getConfigurationValiator( GeoServerRoleService.class, config.getClassName()); if (config.getId() == null) { config.initBeforeSave(); validator.validateAddRoleService(config); } else { validator.validateModifiedRoleService( config, roleServiceHelper.loadConfig(config.getName())); } roleServiceHelper.saveConfig(config); // remove from cache roleServices.remove(config.getName()); // update active role service if (activeRoleService != null && config.getName().equals(activeRoleService.getName())) { synchronized (activeRoleService) { activeRoleService.initializeFromConfig(config); } } }
@Override protected void validateRemoveConfig(SecurityRoleServiceConfig config) throws SecurityConfigException { SecurityConfigValidator.getConfigurationValiator(GeoServerRoleService.class, config.getClassName()).validateRemoveRoleService(config); }
@Override protected void validateRemoveConfig(SecurityRoleServiceConfig config) throws SecurityConfigException { SecurityConfigValidator.getConfigurationValiator( GeoServerRoleService.class, config.getClassName()) .validateRemoveRoleService(config); }
@Override protected void validateRemoveConfig(SecurityRoleServiceConfig config) throws SecurityConfigException { SecurityConfigValidator.getConfigurationValiator(GeoServerRoleService.class, config.getClassName()).validateRemoveRoleService(config); }