tlsmith109 commented on a change in pull request #4668:
URL: https://github.com/apache/nifi/pull/4668#discussion_r546059483



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java
##########
@@ -400,4 +444,39 @@ private PropertyDescriptor 
locatePropertyDescriptor(Set<PropertyDescriptor> prop
         return specDescriptor;
     }
 
+    /**
+     * Gets Item Paths and set path and node in Map map
+     * @param nl NodeList to generate path
+     * @param path String path to ParentNode
+     * @param map  Map of path to node, and node reference
+     */
+    private void getItemPaths(NodeList nl, String path, Map<String,Node> map){
+        if(nl!=null) {
+
+
+            for (int i = 0; i < nl.getLength(); i++) {
+                Node n;
+                if (( n = nl.item(i)) != null) {
+                    if(n.getNodeType() == Node.ELEMENT_NODE || n.getNodeType() 
== Node.TEXT_NODE) {
+                        if(n.hasChildNodes()){
+                           if(n.getNodeType() == Node.ELEMENT_NODE) {
+                                getItemPaths(n.getChildNodes(), path + ":" + 
n.getNodeName(), map);
+                           }
+                        }
+                        if(!n.hasChildNodes()) {
+                            map.put(path + ":" + 
n.getNodeName().trim()+":"+n.getNodeValue(), n);
+                        }
+
+                        if (n.hasAttributes()) {
+                            NamedNodeMap na = n.getAttributes();
+                            for (int j = 0; j < na.getLength(); j++) {
+                                map.put(path + ":" + n.getNodeName() + ":" + 
na.item(j).getNodeName().trim()+":"+na.item(j).getNodeValue(), n);

Review comment:
       Short answer is yes. The issue being that annotation structure varies 
between processor types so presentation schema would have to be carried through 
to view the changes in context. I do not believe the model currently supports. 
This approach, while not near perfect,  allows viewing breadcrumbs that 
indicate changes negatively impacting flow.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to