private static boolean isEmpty(final ProcessGroupDTO dto) { if (dto == null) { return true; } final FlowSnippetDTO contents = dto.getContents(); if (contents == null) { return true; } return CollectionUtils.isEmpty(contents.getProcessors()) && CollectionUtils.isEmpty(contents.getConnections()) && CollectionUtils.isEmpty(contents.getFunnels()) && CollectionUtils.isEmpty(contents.getLabels()) && CollectionUtils.isEmpty(contents.getOutputPorts()) && CollectionUtils.isEmpty(contents.getProcessGroups()) && CollectionUtils.isEmpty(contents.getProcessors()) && CollectionUtils.isEmpty(contents.getRemoteProcessGroups()); }
.map(remoteOutputPort -> remoteOutputPort.getId()) .forEach(id -> identifiers.add(id)); snippet.getLabels().stream() .map(label -> label.getId()) .forEach(id -> identifiers.add(id));
dto.getLabels().add(createLabelDto(label));
for (final LabelDTO snippetLabel : snippet.getLabels()) { final Label label = group.getLabel(snippetLabel.getId());
rollbackClonedPolicy(ResourceFactory.getComponentResource(ResourceType.InputPort, inputPortDTO.getId(), inputPortDTO.getName())); }); snippet.getLabels().forEach(labelDTO -> { rollbackClonedPolicy(ResourceFactory.getComponentResource(ResourceType.Label, labelDTO.getId(), labelDTO.getLabel())); });
for (final LabelDTO labelDTO : dto.getLabels()) { final Label label = flowManager.createLabel(labelDTO.getId(), labelDTO.getLabel()); label.setPosition(toPosition(labelDTO.getPosition())); childTemplateDTO.setConnections(contents.getConnections()); childTemplateDTO.setInputPorts(contents.getInputPorts()); childTemplateDTO.setLabels(contents.getLabels()); childTemplateDTO.setOutputPorts(contents.getOutputPorts()); childTemplateDTO.setProcessGroups(contents.getProcessGroups());