/** * This method adds an {@code Info} to the information list. * * @param messageTag {@code MessageTag} contains the unique message identifier and the content of the warning * @return created {@code Info} */ public Info addInfo(final MessageTag messageTag, final String... dynamicParameters) { final Info info = new Info(messageTag, dynamicParameters); ensureInfoList(); infoList.add(info); return info; }
/** * This method adds an {@code Info} to the information list. * * @param messageTag {@code MessageTag} contains the unique message identifier and the content of the warning * @return created {@code Info} */ public Info addInfo(final MessageTag messageTag) { final Info info = new Info(messageTag); ensureInfoList(); infoList.add(info); return info; }
/** * This method adds an {@code Info} to the information list. * * @return created {@code Info} */ public Info addInfo() { final Info info = new Info(); ensureInfoList(); infoList.add(info); return info; }
/** * The children of the given {@code XmlNode} are added to the list of information. * * @param infoContainerXmlNode the {@code XmlNode} to integrate. */ public void addInfo(final XmlNode infoContainerXmlNode) { List<XmlNode> children; if (infoContainerXmlNode == null || (children = infoContainerXmlNode.getChildren()).isEmpty()) { return; } ensureInfoList(); for (final XmlNode child : children) { final String value = child.getValue(); final String messageId = DSSUtils.getMessageId(value); final Info info = new Info(messageId, value); final Map<String, String> attributes = child.getAttributes(); for (final Entry<String, String> entry : attributes.entrySet()) { final String attributeName = entry.getKey(); final String attributeValue = entry.getValue(); info.setAttribute(attributeName, attributeValue); } infoList.add(info); } }
/** * This method adds the content of nodes contained in the given {@code List} of {@code XmlDom}(s) as information. * * @param infoList the {@code List} of {@code XmlDom}(s) to be integrated. */ public void addInfo(final List<XmlDom> infoList) { if (infoList == null || infoList.isEmpty()) { return; } ensureInfoList(); for (final XmlDom xmlDom : infoList) { final String value = xmlDom.getText(); final Info info = new Info(value); copyAttributes(xmlDom, info); this.infoList.add(info); } }
/** * This method adds an {@code Info} to the information list. * * @param messageTag {@code MessageTag} contains the unique message identifier and the content of the warning * @param attributes {@code Map} contains all attributes associated to the warning. * @return created {@code Info} */ public Info addInfo(final MessageTag messageTag, Map<String, String> attributes) { final Info info = new Info(messageTag, attributes); ensureInfoList(); infoList.add(info); return info; }