group.setName(proposed.getName());
copy.setGroupIdentifier(processGroup.getGroupIdentifier()); copy.setIdentifier(processGroup.getIdentifier()); copy.setName(processGroup.getName()); copy.setPosition(processGroup.getPosition()); copy.setVersionedFlowCoordinates(topLevel ? null : processGroup.getVersionedFlowCoordinates()); childCopy.setGroupIdentifier(childGroup.getGroupIdentifier()); childCopy.setIdentifier(childGroup.getIdentifier()); childCopy.setName(childGroup.getName()); childCopy.setPosition(childGroup.getPosition()); childCopy.setVersionedFlowCoordinates(childGroup.getVersionedFlowCoordinates());
.map(p -> addVersionedProcessGroup(new HashMap<>(), p.getIdentifier(), p.getName(), p)).collect(Collectors.toList()));
.map(p -> addVersionedProcessGroup(new HashMap<>(), p.getIdentifier(), p.getName(), p)).collect(Collectors.toList()));
@Override public FlowControllerSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { // If the VersionedFlowSnapshot came directly from NiFi Registry without modification, as would be the // case with C2 server, then we should have a non-null VersionedFlow, but if we're using a snapshot that // was export from another tool like the CLI, the flow may be null'd out, so fall back to root group. String name; String description; if (versionedFlowSnapshot.getFlow() == null) { name = versionedFlowSnapshot.getFlowContents().getName(); description = versionedFlowSnapshot.getFlowContents().getComments(); } else { name = versionedFlowSnapshot.getFlow().getName(); description = versionedFlowSnapshot.getFlow().getDescription(); } Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.NAME_KEY, name); map.put(CommonPropertyKeys.COMMENT_KEY, description); return new FlowControllerSchema(map); } }
@Override public FlowControllerSchema apply(final VersionedFlowSnapshot versionedFlowSnapshot) { // If the VersionedFlowSnapshot came directly from NiFi Registry without modification, as would be the // case with C2 server, then we should have a non-null VersionedFlow, but if we're using a snapshot that // was export from another tool like the CLI, the flow may be null'd out, so fall back to root group. String name; String description; if (versionedFlowSnapshot.getFlow() == null) { name = versionedFlowSnapshot.getFlowContents().getName(); description = versionedFlowSnapshot.getFlowContents().getComments(); } else { name = versionedFlowSnapshot.getFlow().getName(); description = versionedFlowSnapshot.getFlow().getDescription(); } Map<String, Object> map = new HashMap<>(); map.put(CommonPropertyKeys.NAME_KEY, name); map.put(CommonPropertyKeys.COMMENT_KEY, description); return new FlowControllerSchema(map); } }