jsferner commented on a change in pull request #3931: NIFI-6872: support 
download flow
URL: https://github.com/apache/nifi/pull/3931#discussion_r357752903
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
 ##########
 @@ -4395,6 +4396,78 @@ private VersionControlComponentMappingEntity 
createVersionControlComponentMappin
         return entity;
     }
 
+    @Override
+    public VersionedFlowSnapshot getCurrentFlowSnapshotByGroupId(final String 
processGroupId) {
+        final ProcessGroup processGroup = 
processGroupDAO.getProcessGroup(processGroupId);
+        final VersionControlInformation versionControlInfo = 
processGroup.getVersionControlInformation();
+
+        // Create a complete (include descendant flows) VersionedProcessGroup 
snapshot of the flow as it is
+        // currently without any registry related fields populated, even if 
the flow is currently versioned.
+        final NiFiRegistryFlowMapper mapper = 
makeNiFiRegistryFlowMapper(controllerFacade.getExtensionManager());
+        final InstantiatedVersionedProcessGroup nonVersionedProcessGroup =
+                mapper.mapNonVersionedProcessGroup(processGroup, 
controllerFacade.getControllerServiceProvider());
+
+        // Create a complete (include descendant flows) map of parameter 
contexts
+        final Collection<VersionedParameterContext> parameterContexts =
+                mapper.mapParameterContexts(processGroup, true);
+        final Map<String, VersionedParameterContext> parameterContextMap = 
parameterContexts.stream()
 
 Review comment:
   Agreed, moving everything to a Map as we discussed

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to