public static ProcessGroupDTO getProcessGroup(final String parentId, final Element element, final StringEncryptor encryptor, final FlowEncodingVersion encodingVersion) { final ProcessGroupDTO dto = new ProcessGroupDTO(); final String groupId = getString(element, "id"); dto.setId(groupId); dto.setVersionedComponentId(getString(element, "versionedComponentId")); dto.setParentGroupId(parentId);
processGroup.setId(generateUuid());
dto.setId(group.getIdentifier()); dto.setPosition(createPositionDto(group.getPosition())); dto.setComments(group.getComments());
for (final ProcessGroupDTO groupDTO : snippetContents.getProcessGroups()) { final ProcessGroupDTO cp = dtoFactory.copy(groupDTO, false); cp.setId(generateId(groupDTO.getId(), idGenerationSeed, isCopy)); cp.setParentGroupId(groupId);
public ProcessGroupDTO copy(final ProcessGroupDTO original, final boolean deep) { final ProcessGroupDTO copy = new ProcessGroupDTO(); copy.setComments(original.getComments()); copy.setContents(copy(original.getContents(), deep)); copy.setPosition(original.getPosition()); copy.setId(original.getId()); copy.setInputPortCount(original.getInputPortCount()); copy.setInvalidCount(original.getInvalidCount()); copy.setName(original.getName()); copy.setVersionControlInformation(copy(original.getVersionControlInformation())); copy.setOutputPortCount(original.getOutputPortCount()); copy.setParentGroupId(original.getParentGroupId()); copy.setVersionedComponentId(original.getVersionedComponentId()); copy.setRunningCount(original.getRunningCount()); copy.setStoppedCount(original.getStoppedCount()); copy.setDisabledCount(original.getDisabledCount()); copy.setActiveRemotePortCount(original.getActiveRemotePortCount()); copy.setInactiveRemotePortCount(original.getInactiveRemotePortCount()); copy.setUpToDateCount(original.getUpToDateCount()); copy.setLocallyModifiedCount(original.getLocallyModifiedCount()); copy.setStaleCount(original.getStaleCount()); copy.setLocallyModifiedAndStaleCount(original.getLocallyModifiedAndStaleCount()); copy.setSyncFailureCount(original.getSyncFailureCount()); if (original.getVariables() != null) { copy.setVariables(new HashMap<>(original.getVariables())); } return copy; }