Element () { final Element element = new Element("state"); for (Map.Entry<String, Long> entry : myLastModifications.entrySet()) { final Element update = new Element(MODIFY); update.setAttribute(RECORDER_ID, entry.getKey()); update.setAttribute(LAST_MODIFIED, String.valueOf(entry.getValue())); element.addContent(update); } for (Map.Entry<String, EventsSchemePathSettings> entry : myRecorderToPathSettings.entrySet()) { final Element path = new Element(PATH); path.setAttribute(RECORDER_ID, entry.getKey()); EventsSchemePathSettings value = entry.getValue(); path.setAttribute(CUSTOM_PATH, value.getCustomPath()); path.setAttribute(USE_CUSTOM_PATH, String.valueOf(value.isUseCustomPath())); element.addContent(path); } for (Map.Entry<String, EventLogExternalOptions> entry : myOptions.entrySet()) { Element options = new Element(OPTIONS); options.setAttribute(RECORDER_ID, entry.getKey()); for (Element option : entry.getValue().serialize()) { options.addContent(option); } element.addContent(options); } return element; }