Github user jtstorck commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2475#discussion_r169409286
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
 ---
    @@ -727,6 +729,41 @@ protected void writeLink(final XMLStreamWriter 
xmlStreamWriter, final String tex
             xmlStreamWriter.writeEndElement();
         }
     
    +    /**
    +     * Writes all the system resource considerations for this component
    +     *
    +     * @param configurableComponent the component to describe
    +     * @param xmlStreamWriter the xml stream writer to use
    +     * @throws XMLStreamException thrown if there was a problem writing 
the XML
    +     */
    +    private void 
writeSystemResourceConsiderationInfo(ConfigurableComponent 
configurableComponent, XMLStreamWriter xmlStreamWriter)
    +            throws XMLStreamException {
    +
    +        SystemResourceConsideration[] systemResourceConsiderations = 
configurableComponent.getClass().getAnnotationsByType(SystemResourceConsideration.class);
    +
    +        writeSimpleElement(xmlStreamWriter, "h3", "System Resource 
Considerations:");
    +        if (systemResourceConsiderations.length > 0) {
    +            xmlStreamWriter.writeStartElement("table");
    +            xmlStreamWriter.writeAttribute("id", 
"system-resource-considerations");
    +            xmlStreamWriter.writeStartElement("tr");
    +            writeSimpleElement(xmlStreamWriter, "th", "Resource");
    +            writeSimpleElement(xmlStreamWriter, "th", "Description");
    +            xmlStreamWriter.writeEndElement();
    +            for (SystemResourceConsideration systemResourceConsideration : 
systemResourceConsiderations) {
    +                xmlStreamWriter.writeStartElement("tr");
    +                writeSimpleElement(xmlStreamWriter, "td", 
systemResourceConsideration.resource().name());
    +                // TODO allow for HTML characters here.
    --- End diff --
    
    That TODO is also present on the reads/writes attributes code in 
HtmlProcessorDocumentationWriter.  Since the functionality is similar, I added 
the TODO there as well.  Will have to talk to @mcgilman about the intention 
there.


---

Reply via email to