DSpaceServiceManager implements ServiceManagerSystem { public void pushConfig(Map<String, Object> properties) { checkRunning(); if (properties != null && !properties.isEmpty()) { String[] changedNames = configurationService.loadConfiguration(properties); if (changedNames.length > 0) { ArrayList<String> changedSettingNames = new ArrayList<String>(); Map<String, String> changedSettings = new LinkedHashMap<String, String>(); for (String configName : changedNames) { changedSettingNames.add(configName); changedSettings.put( configName, configurationService.getProperty(configName) ); } for (ServiceManagerSystem sms : serviceManagers) { List<ConfigChangeListener> configChangeListeners = sms.getServicesByType(ConfigChangeListener.class); for (ConfigChangeListener configChangeListener : configChangeListeners) { try { boolean notify = false; String[] notifyNames = configChangeListener.notifyForConfigNames(); if (notifyNames == null || notifyNames.length == 0) { notify = true; } else { for (String notifyName : notifyNames) { for (String changedName : changedNames) { if (notifyName != null && notifyName.equals(changedName)) { notify = true; break; } } } } if (notify) { configChangeListener.configurationChanged(changedSettingNames, changedSettings); } } catch (Exception e) { log.error("Failure occurred while trying to notify service of config change: " + e.getMessage(), e); } } } } } } DSpaceServiceManager(DSpaceConfigurationService configurationService); protected  DSpaceServiceManager(DSpaceConfigurationService configurationService, String... springXmlConfigFiles); boolean isRunning(); void notifyServiceManagerReady(); @Override void shutdown(); @Override void startup(); void registerService(String name, Object service); @Override void registerServiceNoAutowire(String name, Object service); T registerServiceClass(String name, Class<T> type); void unregisterService(String name); T getServiceByName(String name, Class<T> type); List<T> getServicesByType(Class<T> type); List<String> getServicesNames(); boolean isServiceExists(String name); Map<String, Object> getServices(); void pushConfig(Map<String, Object> properties); static void configureService(String serviceName, Object service, ConfigurationService config); static void initService(Object service); static void shutdownService(Object service);  }
@Test public void testPushConfig() { dsm.startup(); Map<String, Object> properties = new HashMap<String, Object>(); properties.put("some.test.thing", "A value"); dsm.pushConfig(properties); }