/** * Populate the internal list of notification commands from an XML file. * * @param reader contains the XML file to be parsed * @throws IOException */ protected void parseXML(InputStream stream) throws IOException { final NotificationCommands config; try (final Reader reader = new InputStreamReader(stream)) { config = JaxbUtils.unmarshal(NotificationCommands.class, reader); } Map<String, Command> commands = new HashMap<String, Command>(); for (Command curCommand : getCommandsFromConfig(config)) { if (curCommand != null && curCommand.getName() != null) { commands.put(curCommand.getName(), curCommand); } else { LOG.warn("invalid notification command: {}", curCommand); } } m_commands = commands; }