@Override public String[] listRegisteredHL7ApplicationNames() throws ConfigurationException { Preferences rootPrefs = config.getRootPrefs(); if (!PreferencesUtils.nodeExists(rootPrefs, HL7_UNIQUE_APPLICATION_NAMES_REGISTRY_ROOT)) return StringUtils.EMPTY_STRING; try { return rootPrefs.node(HL7_UNIQUE_APPLICATION_NAMES_REGISTRY_ROOT).childrenNames(); } catch (BackingStoreException e) { throw new ConfigurationException(e); } }
@Override public boolean registerHL7Application(String name) throws ConfigurationException { String pathName = applicationNameRegistryPathNameOf(name); Preferences rootPrefs = config.getRootPrefs(); if (PreferencesUtils.nodeExists(rootPrefs, pathName)) return false; try { rootPrefs.node(pathName).flush(); return true; } catch (BackingStoreException e) { throw new ConfigurationException(e); } }